summaryrefslogtreecommitdiff
path: root/package/source/zippackage/ZipPackage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'package/source/zippackage/ZipPackage.cxx')
-rw-r--r--package/source/zippackage/ZipPackage.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 799f2bf00002..eab1a6e1cd14 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -56,7 +56,8 @@
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <com/sun/star/ucb/XProgressHandler.hpp>
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
#include <com/sun/star/io/XActiveDataStreamer.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/embed/UseBackupException.hpp>
@@ -80,6 +81,7 @@
#include <ucbhelper/contentbroker.hxx>
#include <ucbhelper/fileidentifierconverter.hxx>
+#include <comphelper/componentcontext.hxx>
#include <comphelper/seekableinput.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/ofopxmlhelper.hxx>
@@ -1476,9 +1478,8 @@ void SAL_CALL ZipPackage::commitChanges()
if( isLocalFile_Impl( m_aURL ) )
{
// write directly in case of local file
- uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSimpleAccess(
- m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess") ) ),
- uno::UNO_QUERY );
+ uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > xSimpleAccess(
+ SimpleFileAccess::create( comphelper::ComponentContext(m_xFactory).getUNOContext() ) );
OSL_ENSURE( xSimpleAccess.is(), "Can't instatiate SimpleFileAccess service!\n" );
uno::Reference< io::XTruncate > xOrigTruncate;
if ( xSimpleAccess.is() )