diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-02 17:46:30 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-15 08:28:44 +0100 |
commit | 5837402fb1daa437d9a1a37edc9ede57319944f1 (patch) | |
tree | 61e39515cd546fe7ad76364ebb444850b93541ce /dbaccess | |
parent | 3f15a663b273e4a437fd68335d6eab2b11fc80c9 (diff) |
fdo#46808, use service constructor for ucb::SimpleFileAccess
I upgraded the service to return XSimpleFileAccess3, since it
already implemented that interface, and it's backwards
compatible.
Change-Id: I40001a46048bd21a23b6a2f58a95376f06fc634b
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwizsetup.cxx | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 8f5c6ae6d755..d17291a7f222 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -48,7 +48,6 @@ #include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/task/XStatusIndicatorFactory.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/ui/XUIConfigurationStorage.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/xml/sax/XDocumentHandler.hpp> @@ -1129,7 +1128,7 @@ void ODatabaseDocument::impl_storeAs_throw( const ::rtl::OUString& _rURL, const Reference< XStorage > ODatabaseDocument::impl_createStorageFor_throw( const ::rtl::OUString& _rURL ) const { - Reference< ucb::XSimpleFileAccess2 > xTempAccess(ucb::SimpleFileAccess::create(m_pImpl->m_aContext.getUNOContext())); + Reference< ucb::XSimpleFileAccess3 > xTempAccess(ucb::SimpleFileAccess::create(m_pImpl->m_aContext.getUNOContext())); Reference< io::XStream > xStream = xTempAccess->openFileReadWrite( _rURL ); Reference< io::XTruncate > xTruncate(xStream,UNO_QUERY); if ( xTruncate.is() ) diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 1f34d54c47df..55690f915e2f 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -59,7 +59,6 @@ #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/task/XJobExecutor.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/sdb/CommandType.hpp> @@ -842,7 +841,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() } else if ( m_pCollection->isFileSystemBased(eType) ) { - Reference< XSimpleFileAccess2 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getComponentContext(getORB()))); + Reference< XSimpleFileAccess3 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getComponentContext(getORB()))); INetURLObject aDBPathURL(m_sWorkPath); aDBPathURL.Append(m_aDocURL.getBase()); createUniqueFolderName(&aDBPathURL); @@ -910,7 +909,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() //------------------------------------------------------------------------- void ODbTypeWizDialogSetup::createUniqueFolderName(INetURLObject* pURL) { - Reference< XSimpleFileAccess2 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getComponentContext(getORB()))); + Reference< XSimpleFileAccess3 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getComponentContext(getORB()))); :: rtl::OUString sLastSegmentName = pURL->getName(); sal_Bool bFolderExists = sal_True; sal_Int32 i = 1; @@ -928,7 +927,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() //------------------------------------------------------------------------- String ODbTypeWizDialogSetup::createUniqueFileName(const INetURLObject& _rURL) { - Reference< XSimpleFileAccess2 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getComponentContext(getORB()))); + Reference< XSimpleFileAccess3 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getComponentContext(getORB()))); :: rtl::OUString sFilename = _rURL.getName(); ::rtl::OUString BaseName = _rURL.getBase(); ::rtl::OUString sExtension = _rURL.getExtension(); |