sc/source/filter/excel/xestream.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
New commits: commit 23dcc4bc32ee4f792af1c32c7a162f3d10b6c9cd Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Sep 9 03:54:51 2015 +0200 copy the vba stream to the xlsx file Change-Id: I48d4a37a35e047b6f26b7d1da03e2d423cab1241 diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 9cc3b74..e51e3c5 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -59,6 +59,7 @@ #include <com/sun/star/task/XStatusIndicator.hpp> #include <memory> +#include <comphelper/storagehelper.hxx> #define DEBUG_XL_ENCRYPTION 0 @@ -1094,9 +1095,15 @@ bool XclExpXmlStream::exportDocument() if (aExport.containsVBAProject()) { const OUString aVbaStreamLocation("/tmp/vba_out.bin"); - SvFileStream aVbaStream(aVbaStreamLocation, STREAM_READWRITE); + SvMemoryStream aVbaStream(4096, 4096); tools::SvRef<SotStorage> pVBAStorage(new SotStorage(aVbaStream)); aExport.exportVBA(pVBAStorage); + aVbaStream.Seek(0); + css::uno::Reference<css::io::XInputStream> xVBAStream( + new utl::OInputStreamWrapper(aVbaStream)); + css::uno::Reference<css::io::XOutputStream> xVBAOutput = + openFragmentStream("xl/vbaProject.bin", "VBA"); + comphelper::OStorageHelper::CopyInputToOutput(xVBAStream, xVBAOutput); } // destruct at the end of the block commit 65360b916c67e9f3d5613f7a253f51508e926940 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Sep 9 03:22:35 2015 +0200 remove unused using statements Change-Id: I096a6f61677b451074bf3626f21c694ef7193bc1 diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 363339f..9cc3b74 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -62,13 +62,11 @@ #define DEBUG_XL_ENCRYPTION 0 -using ::com::sun::star::embed::XStorage; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::registry::InvalidRegistryException; using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::XInterface; -using ::utl::OStreamWrapper; using ::std::vector; using namespace com::sun::star; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits