diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-23 20:50:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-24 08:54:42 +0100 |
commit | 3168ba6c6eb995060842614a11c7bc5a780812d3 (patch) | |
tree | 66a22c74bf4a01a56aab8a880b34bfbd02588966 /sc | |
parent | d8a299e12937896f0346881cd7b9b7602010b2c4 (diff) |
rework TestImportXLS to take a SvStream arg
Change-Id: I65d02604ac489d8c8649673f3f851d1a6650406e
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/excel.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index cb818217a393..5f9addb25489 100644 --- a/sc/source/filter/excel/excel.cxx +++ b/sc/source/filter/excel/excel.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/document/XImporter.hpp> #include <scitems.hxx> #include <svl/stritem.hxx> +#include <unotools/streamwrap.hxx> #include <filter.hxx> #include <document.hxx> #include <optuno.hxx> @@ -243,10 +244,12 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportCalcRTF(SvStream &rStrea return ScFormatFilter::Get().ScImportRTF(rStream, OUString(), &aDocument, aRange) == ERRCODE_NONE; } -extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportXLS(const OUString &rURL) +extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportXLS(SvStream& rStream) { ScDLL::Init(); - SfxMedium aMedium(rURL, StreamMode::READ); + SfxMedium aMedium; + css::uno::Reference<css::io::XInputStream> xStm(new utl::OInputStreamWrapper(rStream)); + aMedium.GetItemSet()->Put(SfxUsrAnyItem(SID_INPUTSTREAM, css::uno::makeAny(xStm))); ScDocument aDocument; ScDocOptions aDocOpt = aDocument.GetDocOptions(); aDocOpt.SetLookUpColRowNames(false); |