diff options
author | Noel Grandin <noel@peralex.com> | 2013-05-31 13:22:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-06-03 10:00:02 +0200 |
commit | 28e3aff576f06b0b02c7232da5d723e865b3c7ed (patch) | |
tree | 681ef3e9564f59aeeed9c20379cf51bfa66b578c /sw | |
parent | 8d28110439a9d069a7d1041423deef3de4472dc6 (diff) |
fdo#46808, Use service constructor for ZipFileAccess
Change-Id: I9c3f8e2df56953487329bdbbac251b3af8cd9917
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 278d71c33f88..ca6fad612ffa 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -11,6 +11,7 @@ #include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/awt/Gradient.hpp> #include <com/sun/star/style/TabStop.hpp> +#include <com/sun/star/packages/zip/ZipFileAccess.hpp> #include <com/sun/star/view/XViewSettingsSupplier.hpp> #include <com/sun/star/text/XTextFrame.hpp> #include <com/sun/star/text/XTextTable.hpp> @@ -586,9 +587,7 @@ void Test::testCellBtlr() save("Office Open XML Text", aTempFile); // Read the XML stream we're interested in. - uno::Sequence<uno::Any> aArgs(1); - aArgs[0] <<= OUString(aTempFile.GetURL()); - uno::Reference<container::XNameAccess> xNameAccess(m_xSFactory->createInstanceWithArguments("com.sun.star.packages.zip.ZipFileAccess", aArgs), uno::UNO_QUERY); + uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), aTempFile.GetURL()); uno::Reference<io::XInputStream> xInputStream(xNameAccess->getByName("word/document.xml"), uno::UNO_QUERY); boost::shared_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(xInputStream, sal_True)); pStream->Seek(STREAM_SEEK_TO_END); |