summaryrefslogtreecommitdiff
path: root/package/source/xstor/xstorage.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-05-29 17:17:28 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-06 10:01:22 +0200
commitd08578912f2c9ef42d4349079422e25b951e544e (patch)
treed029b5a9110bcdc255e72ef9c98887f3f8521ea6 /package/source/xstor/xstorage.cxx
parent7d2a5b5114987f1ab415e32ebb5bb9a46b98dc17 (diff)
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update calls to factories to use new SimpleFileAccess::create method Change-Id: Ie5b0696fe2228a9033b19969245a53c21a61aa14 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'package/source/xstor/xstorage.cxx')
-rw-r--r--package/source/xstor/xstorage.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 0950ec491fe4..84c9400467f1 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -31,6 +31,8 @@
#include <com/sun/star/embed/UseBackupException.hpp>
#include <com/sun/star/embed/StorageFormats.hpp>
#include <com/sun/star/ucb/XProgressHandler.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/container/XNamed.hpp>
@@ -5954,10 +5956,9 @@ void SAL_CALL OStorage::attachToURL( const ::rtl::OUString& sURL,
if ( !m_pImpl->m_pSwitchStream )
throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() );
- uno::Reference < ucb::XSimpleFileAccess > xAccess(
- m_pImpl->m_xFactory->createInstance (
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) ) ),
- uno::UNO_QUERY_THROW );
+ uno::Reference < ucb::XSimpleFileAccess2 > xAccess(
+ ucb::SimpleFileAccess::create(
+ comphelper::ComponentContext(m_pImpl->m_xFactory).getUNOContext() ) );
try
{