diff options
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/impimagetree.cxx | 16 |
2 files changed, 4 insertions, 17 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); diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index 857a080f4756..6f7c566f8d8d 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -299,14 +299,8 @@ bool ImplImageTree::find( } if (!m_path.second.is()) { - css::uno::Sequence< css::uno::Any > args(1); - args[0] <<= m_path.first + ".zip"; try { - m_path.second.set( - comphelper::getProcessServiceFactory()->createInstanceWithArguments( - OUString( "com.sun.star.packages.zip.ZipFileAccess"), - args), - css::uno::UNO_QUERY_THROW); + m_path.second = css::packages::zip::ZipFileAccess::createWithURL(comphelper::getProcessComponentContext(), m_path.first + ".zip"); } catch (css::uno::RuntimeException &) { throw; } catch (const css::uno::Exception & e) { @@ -346,15 +340,9 @@ void ImplImageTree::loadImageLinks() if ( !m_path.second.is() ) { - css::uno::Sequence< css::uno::Any > args(1); - args[0] <<= m_path.first + ".zip"; try { - m_path.second.set( - comphelper::getProcessServiceFactory()->createInstanceWithArguments( - OUString( "com.sun.star.packages.zip.ZipFileAccess"), - args), - css::uno::UNO_QUERY_THROW); + m_path.second = css::packages::zip::ZipFileAccess::createWithURL(comphelper::getProcessComponentContext(), m_path.first + ".zip"); } catch (css::uno::RuntimeException &) { |