diff options
51 files changed, 152 insertions, 198 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 27bdba100164..959fa8c70717 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -37,7 +37,6 @@ #include <basic/basmgr.hxx> #include <com/sun/star/resource/StringResourceWithLocation.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp> @@ -728,7 +727,7 @@ bool DialogWindow::SaveDialog() Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() ); Reference< XInputStream > xInput( xISP->createInputStream() ); - Reference< XSimpleFileAccess2 > xSFI( SimpleFileAccess::create(comphelper::getProcessComponentContext()) ); + Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create(comphelper::getProcessComponentContext()) ); Reference< XOutputStream > xOutput; try @@ -993,7 +992,7 @@ bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocum Reference< container::XNameContainer > xDialogModel( xMSF->createInstance ( "com.sun.star.awt.UnoControlDialogModel" ), UNO_QUERY_THROW ); - Reference< XSimpleFileAccess2 > xSFI( SimpleFileAccess::create(comphelper::getProcessComponentContext()) ); + Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create(comphelper::getProcessComponentContext()) ); Reference< XInputStream > xInput; if( xSFI->exists( aCurPath ) ) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 05f5c1051d8c..c0eebbe0774b 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -53,7 +53,6 @@ #include <com/sun/star/script/XLibraryContainerExport.hpp> #include <com/sun/star/task/InteractionHandler.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include "com/sun/star/ucb/XCommandEnvironment.hpp" #include <com/sun/star/ucb/NameClash.hpp> #include "com/sun/star/packages/manifest/ManifestWriter.hpp" @@ -855,7 +854,7 @@ void LibPage::InsertLib() if ( xMSF.is() ) { - Reference< XSimpleFileAccess2 > xSFA( SimpleFileAccess::create(comphelper::getProcessComponentContext()) ); + Reference< XSimpleFileAccess3 > xSFA( SimpleFileAccess::create(comphelper::getProcessComponentContext()) ); OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); if ( xSFA->exists( aModURL ) ) @@ -1257,7 +1256,7 @@ void LibPage::ExportAsPackage( const String& aLibName ) Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) ); - Reference< XSimpleFileAccess2 > xSFA = SimpleFileAccess::create(xContext); + Reference< XSimpleFileAccess3 > xSFA = SimpleFileAccess::create(xContext); Reference < XFilePicker > xFP; Sequence <Any> aServiceType(1); diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx index a6ae94761c29..3a50d5aaac5e 100644 --- a/basic/source/inc/dlgcont.hxx +++ b/basic/source/inc/dlgcont.hxx @@ -125,7 +125,7 @@ public: ModifiableHelper& _rModifiable, const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xMSF, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xSFI, + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xSFI, SfxDialogLibraryContainer* pParent ); @@ -134,7 +134,7 @@ public: ModifiableHelper& _rModifiable, const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xMSF, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xSFI, + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xSFI, const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& aStorageURL, sal_Bool ReadOnly, SfxDialogLibraryContainer* pParent ); diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index 5213510493fe..893990e95568 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -31,7 +31,7 @@ #include <com/sun/star/script/XLibraryContainer3.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/container/XContainer.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> +#include <com/sun/star/ucb/XSimpleFileAccess3.hpp> #include <com/sun/star/io/XOutputStream.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/util/XMacroExpander.hpp> @@ -219,7 +219,7 @@ class SfxLibraryContainer : public SfxLibraryContainer_BASE, public ::utl::OEven OUString msProjectName; protected: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; - ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > mxSFI; + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > mxSFI; ::com::sun::star::uno::Reference< ::com::sun::star::util::XMacroExpander > mxMacroExpander; ::com::sun::star::uno::Reference< ::com::sun::star::util::XStringSubstitution > mxStringSubstitution; ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XModel > mxOwnerDocument; @@ -260,7 +260,7 @@ protected: const OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, const OUString& aTargetURL, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > xToUseSFI, + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > xToUseSFI, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); void implStoreLibraryIndexFile( SfxLibrary* pLib, const ::xmlscript::LibDescriptor& rLib, @@ -270,7 +270,7 @@ protected: void implStoreLibraryIndexFile( SfxLibrary* pLib, const ::xmlscript::LibDescriptor& rLib, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, const OUString& aTargetURL, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > xToUseSFI ); + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > xToUseSFI ); bool implLoadLibraryIndexFile( SfxLibrary* pLib, ::xmlscript::LibDescriptor& rLib, @@ -310,7 +310,7 @@ protected: virtual sal_Bool implStorePasswordLibrary( SfxLibrary* pLib, const OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, const OUString& aTargetURL, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > xToUseSFI, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ); + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > xToUseSFI, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ); virtual sal_Bool implLoadPasswordLibrary( SfxLibrary* pLib, const OUString& Name, sal_Bool bVerifyPasswordOnly=false ) @@ -560,7 +560,7 @@ class SfxLibrary friend class SfxScriptLibraryContainer; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; - ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > mxSFI; + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > mxSFI; ModifiableHelper& mrModifiable; NameContainer maNameContainer; @@ -621,16 +621,15 @@ public: ModifiableHelper& _rModifiable, const ::com::sun::star::uno::Type& aType, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xMSF, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xSFI + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xSFI ); SfxLibrary( ModifiableHelper& _rModifiable, const ::com::sun::star::uno::Type& aType, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xMSF, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xSFI, + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xSFI, const OUString& aLibInfoFileURL, - const OUString& - aStorageURL, + const OUString& aStorageURL, sal_Bool ReadOnly ); diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx index a7bdb200444e..5b063d3d66cb 100644 --- a/basic/source/inc/scriptcont.hxx +++ b/basic/source/inc/scriptcont.hxx @@ -70,7 +70,7 @@ class SfxScriptLibraryContainer : public SfxLibraryContainer, public OldBasicPas virtual sal_Bool implStorePasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, const ::rtl::OUString& aTargetURL, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > xToUseSFI, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ); + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > xToUseSFI, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ); virtual sal_Bool implLoadPasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& Name, sal_Bool bVerifyPasswordOnly=false ) @@ -160,14 +160,14 @@ public: ( ModifiableHelper& _rModifiable, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xMSF, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xSFI + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xSFI ); SfxScriptLibrary ( ModifiableHelper& _rModifiable, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xMSF, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xSFI, + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xSFI, const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& aStorageURL, sal_Bool ReadOnly ); diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index c6cf5fad1cb5..124608eaafc1 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -47,7 +47,6 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/ucb/UniversalContentBroker.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/ucb/XContentProvider.hpp> #include <com/sun/star/ucb/XContentProviderManager.hpp> #include <com/sun/star/io/XInputStream.hpp> @@ -55,7 +54,6 @@ #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/io/XSeekable.hpp> -using namespace comphelper; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::ucb; @@ -224,7 +222,7 @@ bool needSecurityRestrictions( void ) return true; } - Reference< XComponentContext > xContext = getProcessComponentContext(); + Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); Reference< XBridgeFactory2 > xBridgeFac( BridgeFactory::create(xContext) ); Sequence< Reference< XBridge > > aBridgeSeq = xBridgeFac->getExistingBridges(); @@ -279,7 +277,7 @@ bool hasUno( void ) if( bNeedInit ) { bNeedInit = false; - Reference< XComponentContext > xContext = getProcessComponentContext(); + Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); if( !xContext.is() ) { // No service manager at all @@ -571,42 +569,37 @@ SbError SbiStream::Open if( hasUno() ) { - Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); - if( xSMgr.is() ) + Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create( comphelper::getProcessComponentContext() ) ); + try { - Reference< XSimpleFileAccess2 > - xSFI( SimpleFileAccess::create( comphelper::getComponentContext(xSMgr) ) ); - try - { - // #??? For write access delete file if it already exists (not for appending) - if( (nStrmMode & STREAM_WRITE) != 0 && !IsAppend() && !IsBinary() && - xSFI->exists( aNameStr ) && !xSFI->isFolder( aNameStr ) ) - { - xSFI->kill( aNameStr ); - } + // #??? For write access delete file if it already exists (not for appending) + if( (nStrmMode & STREAM_WRITE) != 0 && !IsAppend() && !IsBinary() && + xSFI->exists( aNameStr ) && !xSFI->isFolder( aNameStr ) ) + { + xSFI->kill( aNameStr ); + } - if( (nStrmMode & (STREAM_READ | STREAM_WRITE)) == (STREAM_READ | STREAM_WRITE) ) - { - Reference< XStream > xIS = xSFI->openFileReadWrite( aNameStr ); - pStrm = new UCBStream( xIS ); - } - else if( nStrmMode & STREAM_WRITE ) - { - Reference< XStream > xIS = xSFI->openFileReadWrite( aNameStr ); - pStrm = new UCBStream( xIS ); - } - else //if( nStrmMode & STREAM_READ ) - { - Reference< XInputStream > xIS = xSFI->openFileRead( aNameStr ); - pStrm = new UCBStream( xIS ); - } + if( (nStrmMode & (STREAM_READ | STREAM_WRITE)) == (STREAM_READ | STREAM_WRITE) ) + { + Reference< XStream > xIS = xSFI->openFileReadWrite( aNameStr ); + pStrm = new UCBStream( xIS ); + } + else if( nStrmMode & STREAM_WRITE ) + { + Reference< XStream > xIS = xSFI->openFileReadWrite( aNameStr ); + pStrm = new UCBStream( xIS ); + } + else //if( nStrmMode & STREAM_READ ) + { + Reference< XInputStream > xIS = xSFI->openFileRead( aNameStr ); + pStrm = new UCBStream( xIS ); + } - } - catch(const Exception & ) - { - nError = ERRCODE_IO_GENERAL; - } + } + catch(const Exception & ) + { + nError = ERRCODE_IO_GENERAL; } } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 881ee8678c0e..08d6699f9785 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -52,7 +52,7 @@ #include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/Locale.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess3.hpp> +#include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/script/XErrorQuery.hpp> #include <ooo/vba/XHelperInterface.hpp> #include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp> @@ -175,12 +175,7 @@ static uno::Reference< ucb::XSimpleFileAccess3 > getFileAccess( void ) static uno::Reference< ucb::XSimpleFileAccess3 > xSFI; if( !xSFI.is() ) { - uno::Reference< lang::XMultiServiceFactory > xSMgr = getProcessServiceFactory(); - if( xSMgr.is() ) - { - xSFI = uno::Reference< ucb::XSimpleFileAccess3 >( xSMgr->createInstance - ( OUString("com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY ); - } + xSFI = ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ); } return xSFI; } diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 1d77d41ed59e..7820e721bff5 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -539,7 +539,7 @@ Reference< XInterface > SAL_CALL SfxDialogLibraryContainer::Create( const Refere SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable, const ::rtl::OUString& aName, const Reference< XMultiServiceFactory >& xMSF, - const Reference< XSimpleFileAccess2 >& xSFI, + const Reference< XSimpleFileAccess3 >& xSFI, SfxDialogLibraryContainer* pParent ) : SfxLibrary( _rModifiable, getCppuType( (const Reference< XInputStreamProvider > *)0 ), xMSF, xSFI ) , m_pParent( pParent ) @@ -550,7 +550,7 @@ SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable, SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable, const ::rtl::OUString& aName, const Reference< XMultiServiceFactory >& xMSF, - const Reference< XSimpleFileAccess2 >& xSFI, + const Reference< XSimpleFileAccess3 >& xSFI, const OUString& aLibInfoFileURL, const OUString& aStorageURL, sal_Bool ReadOnly, diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 7d49a15ef850..c9a67b64e627 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -574,7 +574,7 @@ static void checkAndCopyFileImpl( const INetURLObject& rSourceFolderInetObj, const INetURLObject& rTargetFolderInetObj, const OUString& rCheckFileName, const OUString& rCheckExtension, - Reference< XSimpleFileAccess2 > xSFI ) + Reference< XSimpleFileAccess3 > xSFI ) { INetURLObject aTargetFolderInetObj( rTargetFolderInetObj ); aTargetFolderInetObj.insertName( rCheckFileName, sal_True, INetURLObject::LAST_SEGMENT, @@ -1357,7 +1357,7 @@ sal_Bool SfxLibraryContainer::implStorePasswordLibrary( const OUString& /*aName*/, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& /*xStorage*/, const OUString& /*aTargetURL*/, - const Reference< XSimpleFileAccess2 > /*xToUseSFI*/, + const Reference< XSimpleFileAccess3 > /*xToUseSFI*/, const uno::Reference< task::XInteractionHandler >& ) { return sal_False; @@ -1407,7 +1407,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, const uno::Reference< embed::XStorage >& xStorage ) { OUString aDummyLocation; - Reference< XSimpleFileAccess2 > xDummySFA; + Reference< XSimpleFileAccess3 > xDummySFA; Reference< XInteractionHandler > xDummyHandler; implStoreLibrary( pLib, aName, xStorage, aDummyLocation, xDummySFA, xDummyHandler ); } @@ -1417,7 +1417,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, const OUString& aName, const uno::Reference< embed::XStorage >& xStorage, const OUString& aTargetURL, - Reference< XSimpleFileAccess2 > xToUseSFI, + Reference< XSimpleFileAccess3 > xToUseSFI, const Reference< XInteractionHandler >& xHandler ) { sal_Bool bLink = pLib->mbLink; @@ -1483,7 +1483,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, bool bExport = !aTargetURL.isEmpty(); try { - Reference< XSimpleFileAccess2 > xSFI = mxSFI; + Reference< XSimpleFileAccess3 > xSFI = mxSFI; if( xToUseSFI.is() ) { xSFI = xToUseSFI; @@ -1565,7 +1565,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, const uno::Reference< embed::XStorage >& xStorage ) { OUString aDummyLocation; - Reference< XSimpleFileAccess2 > xDummySFA; + Reference< XSimpleFileAccess3 > xDummySFA; implStoreLibraryIndexFile( pLib, rLib, xStorage, aDummyLocation, xDummySFA ); } @@ -1573,8 +1573,8 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, const ::xmlscript::LibDescriptor& rLib, const uno::Reference< embed::XStorage >& xStorage, - const OUString& aTargetURL, - Reference< XSimpleFileAccess2 > xToUseSFI ) + const ::rtl::OUString& aTargetURL, + Reference< XSimpleFileAccess3 > xToUseSFI ) { // Create sax writer Reference< XWriter > xWriter = xml::sax::Writer::create(comphelper::getComponentContext(mxMSF)); @@ -1618,7 +1618,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, { // Export? bool bExport = !aTargetURL.isEmpty(); - Reference< XSimpleFileAccess2 > xSFI = mxSFI; + Reference< XSimpleFileAccess3 > xSFI = mxSFI; if( xToUseSFI.is() ) { xSFI = xToUseSFI; @@ -2812,7 +2812,7 @@ void SAL_CALL SfxLibraryContainer::exportLibrary( const OUString& Name, const OU LibraryContainerMethodGuard aGuard( *this ); SfxLibrary* pImplLib = getImplLib( Name ); - Reference< XSimpleFileAccess2 > xToUseSFI; + Reference< XSimpleFileAccess3 > xToUseSFI; if( Handler.is() ) { xToUseSFI = ucb::SimpleFileAccess::create( comphelper::getComponentContext(mxMSF) ); @@ -3021,7 +3021,7 @@ sal_Bool SAL_CALL SfxLibraryContainer::supportsService( const OUString& _rServic // Ctor SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType, - const Reference< XMultiServiceFactory >& xMSF, const Reference< XSimpleFileAccess2 >& xSFI ) + const Reference< XMultiServiceFactory >& xMSF, const Reference< XSimpleFileAccess3 >& xSFI ) : OComponentHelper( m_aMutex ) , mxMSF( xMSF ) , mxSFI( xSFI ) @@ -3043,7 +3043,7 @@ SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType, } SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType, - const Reference< XMultiServiceFactory >& xMSF, const Reference< XSimpleFileAccess2 >& xSFI, + const Reference< XMultiServiceFactory >& xMSF, const Reference< XSimpleFileAccess3 >& xSFI, const OUString& aLibInfoFileURL, const OUString& aStorageURL, sal_Bool ReadOnly ) : OComponentHelper( m_aMutex ) , mxMSF( xMSF ) diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 00ffe7893b94..40bbef1afba1 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -26,7 +26,7 @@ #include <com/sun/star/io/XOutputStream.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> +#include <com/sun/star/ucb/XSimpleFileAccess3.hpp> #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/XEncryptionProtectedSource.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -581,14 +581,14 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ) { OUString aDummyLocation; - Reference< XSimpleFileAccess2 > xDummySFA; + Reference< XSimpleFileAccess3 > xDummySFA; return implStorePasswordLibrary( pLib, aName, xStorage, aDummyLocation, xDummySFA, xHandler ); } sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, const ::rtl::OUString& aTargetURL, - const Reference< XSimpleFileAccess2 > xToUseSFI, + const Reference< XSimpleFileAccess3 > xToUseSFI, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ) { bool bExport = !aTargetURL.isEmpty(); @@ -730,7 +730,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, { try { - Reference< XSimpleFileAccess2 > xSFI = mxSFI; + Reference< XSimpleFileAccess3 > xSFI = mxSFI; if( xToUseSFI.is() ) { xSFI = xToUseSFI; @@ -1234,7 +1234,7 @@ Reference< XInterface > SAL_CALL SfxScriptLibraryContainer::Create( const Refere // Ctor SfxScriptLibrary::SfxScriptLibrary( ModifiableHelper& _rModifiable, const Reference< XMultiServiceFactory >& xMSF, - const Reference< XSimpleFileAccess2 >& xSFI ) + const Reference< XSimpleFileAccess3 >& xSFI ) : SfxLibrary( _rModifiable, getCppuType( (const OUString *)0 ), xMSF, xSFI ) , mbLoadedSource( false ) , mbLoadedBinary( false ) @@ -1243,7 +1243,7 @@ SfxScriptLibrary::SfxScriptLibrary( ModifiableHelper& _rModifiable, SfxScriptLibrary::SfxScriptLibrary( ModifiableHelper& _rModifiable, const Reference< XMultiServiceFactory >& xMSF, - const Reference< XSimpleFileAccess2 >& xSFI, + const Reference< XSimpleFileAccess3 >& xSFI, const OUString& aLibInfoFileURL, const OUString& aStorageURL, sal_Bool ReadOnly ) 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(); diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx index 18e648d3d103..6b74a490fe83 100644 --- a/desktop/source/deployment/dp_log.cxx +++ b/desktop/source/deployment/dp_log.cxx @@ -38,7 +38,6 @@ #include "com/sun/star/deployment/DeploymentException.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/io/XSeekable.hpp" #include <stdio.h> @@ -104,7 +103,7 @@ ProgressLogImpl::ProgressLogImpl( boost::optional< Reference<task::XInteractionHandler> > interactionHandler; comphelper::unwrapArgs( args, log_file, interactionHandler ); - Reference<ucb::XSimpleFileAccess2> xSimpleFileAccess( ucb::SimpleFileAccess::create(xContext) ); + Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess( ucb::SimpleFileAccess::create(xContext) ); // optional ia handler: if (interactionHandler) xSimpleFileAccess->setInteractionHandler( *interactionHandler ); diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index a5bd86141340..caf702a9143c 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -45,7 +45,6 @@ #include <helpcompiler/HelpIndexer.hxx> #endif #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/util/XMacroExpander.hpp> #include <com/sun/star/uri/XUriReferenceFactory.hpp> #include <com/sun/star/uri/XVndSunStarExpandUrl.hpp> @@ -115,8 +114,8 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend void revokeEntryFromDb(OUString const & url); bool activateEntry(OUString const & url); - Reference< ucb::XSimpleFileAccess2 > getFileAccess( void ); - Reference< ucb::XSimpleFileAccess2 > m_xSFA; + Reference< ucb::XSimpleFileAccess3 > getFileAccess( void ); + Reference< ucb::XSimpleFileAccess3 > m_xSFA; const Reference<deployment::XPackageTypeInfo> m_xHelpTypeInfo; Sequence< Reference<deployment::XPackageTypeInfo> > m_typeInfos; @@ -403,7 +402,7 @@ void BackendImpl::implProcessHelp( const OUString sHelpFolder = createFolder(OUString(), xCmdEnv); data.dataUrl = sHelpFolder; - Reference< ucb::XSimpleFileAccess2 > xSFA = getFileAccess(); + Reference< ucb::XSimpleFileAccess3 > xSFA = getFileAccess(); rtl::OUString aHelpURL = xPackage->getURL(); rtl::OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl( aHelpURL ); rtl::OUString aName = xPackage->getName(); @@ -586,7 +585,7 @@ void BackendImpl::implProcessHelp( void BackendImpl::implCollectXhpFiles( const rtl::OUString& aDir, std::vector< rtl::OUString >& o_rXhpFileVector ) { - Reference< ucb::XSimpleFileAccess2 > xSFA = getFileAccess(); + Reference< ucb::XSimpleFileAccess3 > xSFA = getFileAccess(); // Scan xhp files recursively Sequence< rtl::OUString > aSeq = xSFA->getFolderContents( aDir, true ); @@ -612,7 +611,7 @@ void BackendImpl::implCollectXhpFiles( const rtl::OUString& aDir, } } -Reference< ucb::XSimpleFileAccess2 > BackendImpl::getFileAccess( void ) +Reference< ucb::XSimpleFileAccess3 > BackendImpl::getFileAccess( void ) { if( !m_xSFA.is() ) { diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx index 950473a23b37..b0a70bb2e02f 100644 --- a/desktop/source/migration/services/oo3extensionmigration.hxx +++ b/desktop/source/migration/services/oo3extensionmigration.hxx @@ -35,7 +35,6 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/xml/dom/XDocumentBuilder.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/deployment/XExtensionManager.hpp> #include <osl/mutex.hxx> @@ -77,7 +76,7 @@ namespace migration private: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_ctx; ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XDocumentBuilder > m_xDocBuilder; - ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > m_xSimpleFileAccess; + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > m_xSimpleFileAccess; ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XExtensionManager > m_xExtensionManager; ::osl::Mutex m_aMutex; ::rtl::OUString m_sSourceDir; diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 9938ae91fdcd..ccf816153bdc 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -37,7 +37,6 @@ #include <com/sun/star/frame/XLoadable.hpp> #include <com/sun/star/document/XStorageBasedDocument.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/system/SystemShellExecute.hpp> @@ -730,7 +729,7 @@ namespace xNativeTempFile = uno::Reference<beans::XPropertySet>(); - uno::Reference < ucb::XSimpleFileAccess2 > xSimpleFileAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xSimpleFileAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) ); xSimpleFileAccess->setReadOnly(sUrl, sal_True); diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 31563944c214..18e01cd12817 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -36,7 +36,6 @@ #include <com/sun/star/io/XTruncate.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <rtl/logfile.hxx> @@ -62,7 +61,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: try { - uno::Reference < ucb::XSimpleFileAccess2 > xAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) ); xAccess->kill( aURL ); @@ -114,7 +113,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: if ( !aResult.isEmpty() ) { try { - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) ); uno::Reference< io::XOutputStream > xTempOutStream = xTempAccess->openFileWrite( aResult ); @@ -577,7 +576,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() try { // open temporary file for reading - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) ); xStream = xTempAccess->openFileRead( m_aTempURL ); @@ -1043,7 +1042,7 @@ void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream > throw uno::RuntimeException(); // open temporary file for reading - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) ); uno::Reference< io::XInputStream > xTempInStream = xTempAccess->openFileRead( m_aTempURL ); diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index d92b305d0b63..01475efcc85a 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -29,7 +29,6 @@ #include <com/sun/star/io/XSeekable.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -414,7 +413,7 @@ void OwnView_Impl::CreateNative() try { - uno::Reference < ucb::XSimpleFileAccess2 > xAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) ); uno::Reference< io::XInputStream > xInStream = xAccess->openFileRead( m_aTempFileURL ); diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index 030fd93ae537..1a97e5968b54 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -229,7 +229,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) } //create stream for the document - Reference< ucb::XSimpleFileAccess2 > xSimpleFileAccess( ucb::SimpleFileAccess::create(xContext) ); + Reference< ucb::XSimpleFileAccess3 > xSimpleFileAccess( ucb::SimpleFileAccess::create(xContext) ); Reference<io::XInputStream> xInputStream = xSimpleFileAccess->openFileRead( m_sURL ); if(!xInputStream.is()) diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 53e7239f6d4a..9a18fdfb456a 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -74,7 +74,7 @@ using com::sun::star::beans::UnknownPropertyException; using com::sun::star::util::VetoException; using com::sun::star::lang::WrappedTargetException; using com::sun::star::lang::IllegalArgumentException; -using com::sun::star::ucb::XSimpleFileAccess2; +using com::sun::star::ucb::XSimpleFileAccess3; using com::sun::star::ucb::SimpleFileAccess; using com::sun::star::io::XInputStream; @@ -409,7 +409,7 @@ void Model::loadInstance( sal_Int32 nInstance ) try { Reference<XInputStream> xInput = - Reference<XSimpleFileAccess2>( SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) )->openFileRead( sURL ); + Reference<XSimpleFileAccess3>( SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) )->openFileRead( sURL ); if( xInput.is() ) { Reference<XDocument> xInstance = diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index ed7a9c5a98b6..6824e9f11127 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -40,7 +40,6 @@ #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/lang/EventObject.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/uno/Reference.h> #include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/util/XFlushListener.hpp> @@ -85,7 +84,7 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport ) uno::Reference< io::XInputStream > xIn; try { - uno::Reference< ucb::XSimpleFileAccess2 > xAccess( ucb::SimpleFileAccess::create(xContext) ); + uno::Reference< ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create(xContext) ); xIn = xAccess->openFileRead( rMainURL ); } catch (const uno::Exception &) @@ -248,7 +247,7 @@ void ConvDic::Save() uno::Reference< io::XStream > xStream; try { - uno::Reference< ucb::XSimpleFileAccess2 > xAccess( ucb::SimpleFileAccess::create(xContext) ); + uno::Reference< ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create(xContext) ); xStream = xAccess->openFileReadWrite( aMainURL ); } catch (const uno::Exception &) diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx index 39658f181d09..71dd8f0385ab 100644 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -34,7 +34,6 @@ #include <unotools/ucbstreamhelper.hxx> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/linguistic2/DictionaryType.hpp> #include <com/sun/star/linguistic2/DictionaryEventFlags.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> @@ -264,7 +263,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL) uno::Reference< io::XInputStream > xStream; try { - uno::Reference< ucb::XSimpleFileAccess2 > xAccess( ucb::SimpleFileAccess::create(xContext) ); + uno::Reference< ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create(xContext) ); xStream = xAccess->openFileRead( rMainURL ); } catch (const uno::Exception &) @@ -400,7 +399,7 @@ sal_uLong DictionaryNeo::saveEntries(const OUString &rURL) uno::Reference< io::XStream > xStream; try { - uno::Reference< ucb::XSimpleFileAccess2 > xAccess( ucb::SimpleFileAccess::create(xContext) ); + uno::Reference< ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create(xContext) ); xStream = xAccess->openFileReadWrite( rURL ); } catch (const uno::Exception &) diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx index a705657cb78e..fd9f377057de 100644 --- a/linguistic/source/dlistimp.cxx +++ b/linguistic/source/dlistimp.cxx @@ -38,7 +38,6 @@ #include <com/sun/star/linguistic2/DictionaryListEventFlags.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include "defs.hxx" #include "dlistimp.hxx" @@ -897,7 +896,7 @@ static sal_Bool IsVers2OrNewer( const String& rFileURL, sal_uInt16& nLng, sal_Bo uno::Reference< io::XInputStream > xStream; try { - uno::Reference< ucb::XSimpleFileAccess2 > xAccess( ucb::SimpleFileAccess::create(xContext) ); + uno::Reference< ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create(xContext) ); xStream = xAccess->openFileRead( rFileURL ); } catch (const uno::Exception &) diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx index 63c32c041aa0..71ccd97c0597 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx @@ -54,7 +54,6 @@ #include <com/sun/star/document/XExtendedFilterDetection.hpp> #include <com/sun/star/beans/PropertyState.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -98,7 +97,7 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments ) if (!xInStream.is()) { // open the stream if it was not suplied by the framework - Reference< XSimpleFileAccess2 > xSFI(SimpleFileAccess::create(mxContext)); + Reference< XSimpleFileAccess3 > xSFI(SimpleFileAccess::create(mxContext)); if (sURL.getLength() > 0) { try diff --git a/offapi/com/sun/star/ucb/SimpleFileAccess.idl b/offapi/com/sun/star/ucb/SimpleFileAccess.idl index 918715d04516..1aa80f638848 100644 --- a/offapi/com/sun/star/ucb/SimpleFileAccess.idl +++ b/offapi/com/sun/star/ucb/SimpleFileAccess.idl @@ -19,7 +19,7 @@ #ifndef __com_sun_star_ucb_SimpleFileAccess_idl__ #define __com_sun_star_ucb_SimpleFileAccess_idl__ -#include <com/sun/star/ucb/XSimpleFileAccess2.idl> +#include <com/sun/star/ucb/XSimpleFileAccess3.idl> @@ -31,7 +31,7 @@ local file system or on an WebDAV server. @author Andreas Bregas @version 1.0 07/25/2000 */ -published service SimpleFileAccess : XSimpleFileAccess2; +published service SimpleFileAccess : XSimpleFileAccess3; }; }; }; }; diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 31b1a2ffd720..02bfa4cbfd0d 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -24,7 +24,6 @@ #include <com/sun/star/io/XActiveDataSource.hpp> #include <com/sun/star/io/XTextOutputStream.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <comphelper/docpasswordhelper.hxx> #include <osl/file.hxx> #include <rtl/math.hxx> @@ -109,7 +108,7 @@ Reference< XInputStream > InputOutputHelper::openInputStream( Reference< XInputStream > xInStrm; if( rxContext.is() ) try { - Reference<XSimpleFileAccess2> xFileAccess(SimpleFileAccess::create(rxContext)); + Reference<XSimpleFileAccess3> xFileAccess(SimpleFileAccess::create(rxContext)); xInStrm = xFileAccess->openFileRead( rFileName ); } catch( Exception& ) @@ -126,7 +125,7 @@ Reference< XOutputStream > InputOutputHelper::openOutputStream( Reference< XOutputStream > xOutStrm; if( rxContext.is() ) try { - Reference<XSimpleFileAccess2> xFileAccess(SimpleFileAccess::create(rxContext)); + Reference<XSimpleFileAccess3> xFileAccess(SimpleFileAccess::create(rxContext)); xOutStrm = xFileAccess->openFileWrite( rFileName ); } catch( Exception& ) @@ -1886,7 +1885,7 @@ void StorageObjectBase::implDump() if( bIsRoot ) try { aSysOutPath += OOX_DUMP_DUMPEXT; - Reference<XSimpleFileAccess2> xFileAccess(SimpleFileAccess::create(getContext())); + Reference<XSimpleFileAccess3> xFileAccess(SimpleFileAccess::create(getContext())); xFileAccess->kill( aSysOutPath ); } catch( Exception& ) diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 3e2017f2d426..4da325384247 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -19,7 +19,6 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/ucb/XCommandEnvironment.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> @@ -215,7 +214,7 @@ sal_Bool KillFile( const ::rtl::OUString& aURL, const uno::Reference< uno::XComp try { - uno::Reference < ucb::XSimpleFileAccess2 > xAccess( ucb::SimpleFileAccess::create( xContext ) ); + uno::Reference < ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create( xContext ) ); xAccess->kill( aURL ); bRet = sal_True; @@ -555,7 +554,7 @@ uno::Reference< lang::XMultiServiceFactory > OWriteStream_Impl::GetServiceFactor try { if ( !aTempURL.isEmpty() && xStream.is() ) { - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( ucb::SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) ); + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) ); uno::Reference< io::XOutputStream > xTempOutStream = xTempAccess->openFileWrite( aTempURL ); if ( xTempOutStream.is() ) @@ -639,7 +638,7 @@ uno::Reference< lang::XMultiServiceFactory > OWriteStream_Impl::GetServiceFactor try { if ( !m_aTempURL.isEmpty() ) { - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( ucb::SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) ); + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) ); uno::Reference< io::XOutputStream > xTempOutStream = xTempAccess->openFileWrite( m_aTempURL ); if ( xTempOutStream.is() ) @@ -688,7 +687,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetTempFileAsStream() if ( !m_aTempURL.isEmpty() ) { // the temporary file is not used if the cache is used - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( ucb::SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) ); + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) ); try { @@ -727,7 +726,7 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetTempFileAsInputStream() if ( !m_aTempURL.isEmpty() ) { // the temporary file is not used if the cache is used - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( ucb::SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) ); + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) ); try { diff --git a/package/source/xstor/selfterminatefilestream.hxx b/package/source/xstor/selfterminatefilestream.hxx index 8698c3761059..85da3585b00f 100644 --- a/package/source/xstor/selfterminatefilestream.hxx +++ b/package/source/xstor/selfterminatefilestream.hxx @@ -22,7 +22,7 @@ #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XSeekable.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> +#include <com/sun/star/ucb/XSimpleFileAccess3.hpp> #include <cppuhelper/implbase2.hxx> struct OWriteStream_Impl; @@ -31,7 +31,7 @@ class OSelfTerminateFileStream : public cppu::WeakImplHelper2< ::com::sun::star: ::com::sun::star::io::XSeekable > { protected: - ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > m_xFileAccess; + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > m_xFileAccess; ::rtl::OUString m_aURL; diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx index adb6207cd02d..c34155d031aa 100644 --- a/package/source/xstor/xfactory.cxx +++ b/package/source/xstor/xfactory.cxx @@ -18,7 +18,6 @@ */ #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/StorageFormats.hpp> #include <com/sun/star/beans/PropertyValue.hpp> @@ -153,7 +152,7 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr throw lang::IllegalArgumentException(); // TODO: } - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) ); diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 478df445d8a9..a42e68074242 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -24,7 +24,6 @@ #include <com/sun/star/ucb/XProgressHandler.hpp> #include <com/sun/star/io/TempFile.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> @@ -5943,7 +5942,7 @@ void SAL_CALL OStorage::attachToURL( const ::rtl::OUString& sURL, if ( !m_pImpl->m_pSwitchStream ) throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); - uno::Reference < ucb::XSimpleFileAccess2 > xAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_pImpl->m_xFactory) ) ); diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index f24774755a9e..89b3f2f4e8dc 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -50,7 +50,6 @@ #include <com/sun/star/ucb/XProgressHandler.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/ucb/UniversalContentBroker.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> @@ -1440,7 +1439,7 @@ void SAL_CALL ZipPackage::commitChanges() if( isLocalFile() ) { // write directly in case of local file - uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > xSimpleAccess( + uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > xSimpleAccess( SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) ); OSL_ENSURE( xSimpleAccess.is(), "Can't instatiate SimpleFileAccess service!\n" ); uno::Reference< io::XTruncate > xOrigTruncate; diff --git a/sc/source/ui/vba/testvba/testvba.cxx b/sc/source/ui/vba/testvba/testvba.cxx index 9f58d30643e9..62f56457b9a2 100644 --- a/sc/source/ui/vba/testvba/testvba.cxx +++ b/sc/source/ui/vba/testvba/testvba.cxx @@ -13,7 +13,6 @@ #include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/script/provider/XScriptProviderSupplier.hpp> #include <com/sun/star/document/XTypeDetection.hpp> @@ -40,7 +39,7 @@ using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::UNO_QUERY_THROW; using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::uno::XInterface; -using ::com::sun::star::ucb::XSimpleFileAccess; +using ::com::sun::star::ucb::XSimpleFileAccess3; using ::com::sun::star::document::XTypeDetection; using ::rtl::OUString; @@ -89,7 +88,7 @@ private: Reference< XComponentContext > mxContext; Reference< XMultiComponentFactory > mxMCF; Reference< XComponentLoader > mxCompLoader; - Reference< XSimpleFileAccess2 > mxSFA; + Reference< XSimpleFileAccess3 > mxSFA; rtl::OUString msOutDirPath; protected: public: diff --git a/scripting/source/dlgprov/DialogModelProvider.cxx b/scripting/source/dlgprov/DialogModelProvider.cxx index 9fb6bb27f905..176ed1452745 100644 --- a/scripting/source/dlgprov/DialogModelProvider.cxx +++ b/scripting/source/dlgprov/DialogModelProvider.cxx @@ -21,7 +21,6 @@ #include "dlgprov.hxx" #include <com/sun/star/resource/XStringResourceManager.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> // component helper namespace @@ -70,7 +69,7 @@ void SAL_CALL DialogModelProvider::initialize(const css::uno::Sequence< uno::Any if ( !( aArguments[ 0 ] >>= sURL )) throw css::lang::IllegalArgumentException(); // Try any other URL with SimpleFileAccess - Reference< ucb::XSimpleFileAccess2 > xSFI = ucb::SimpleFileAccess::create(m_xContext); + Reference< ucb::XSimpleFileAccess3 > xSFI = ucb::SimpleFileAccess::create(m_xContext); try { diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx index 4392c99cb37d..61e60d951ebe 100644 --- a/scripting/source/dlgprov/dlgprov.cxx +++ b/scripting/source/dlgprov/dlgprov.cxx @@ -35,7 +35,6 @@ #include <com/sun/star/resource/XStringResourceManager.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/resource/XStringResourceWithLocation.hpp> #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <sfx2/app.hxx> @@ -325,7 +324,7 @@ static ::rtl::OUString aResourceResolverPropName("ResourceResolver"); bSingleDialog = true; // Try any other URL with SimpleFileAccess - Reference< ucb::XSimpleFileAccess2 > xSFI = ucb::SimpleFileAccess::create(m_xContext); + Reference< ucb::XSimpleFileAccess3 > xSFI = ucb::SimpleFileAccess::create(m_xContext); try { diff --git a/scripting/source/inc/util/MiscUtils.hxx b/scripting/source/inc/util/MiscUtils.hxx index 8ad4f8f505de..41a57fe5d9ef 100644 --- a/scripting/source/inc/util/MiscUtils.hxx +++ b/scripting/source/inc/util/MiscUtils.hxx @@ -31,7 +31,6 @@ #include <com/sun/star/container/XContentEnumerationAccess.hpp> #include <com/sun/star/ucb/XCommandEnvironment.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/ucb/XContentAccess.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbc/XRow.hpp> @@ -57,11 +56,8 @@ public: { return result; } - css::uno::Reference < css::ucb::XSimpleFileAccess2 > xSFA( css::ucb::SimpleFileAccess::create(xCtx) ); - if ( xSFA.is() ) - { - result = xSFA->getFolderContents( OUSTR("vnd.sun.star.tdoc:/"), true ); - } + css::uno::Reference < css::ucb::XSimpleFileAccess3 > xSFA( css::ucb::SimpleFileAccess::create(xCtx) ); + result = xSFA->getFolderContents( OUSTR("vnd.sun.star.tdoc:/"), true ); } catch ( css::uno::Exception& ) { diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx index ec7ba77551ac..13677d1f24be 100644 --- a/scripting/source/provider/URIHelper.cxx +++ b/scripting/source/provider/URIHelper.cxx @@ -59,7 +59,7 @@ ScriptingFrameworkURIHelper::ScriptingFrameworkURIHelper( { try { - m_xSimpleFileAccess = uno::Reference< ucb::XSimpleFileAccess2 >( ucb::SimpleFileAccess::create(xContext) ); + m_xSimpleFileAccess = ucb::SimpleFileAccess::create(xContext); } catch (uno::Exception&) { diff --git a/scripting/source/provider/URIHelper.hxx b/scripting/source/provider/URIHelper.hxx index aae68be61efe..ddf65c04db0c 100644 --- a/scripting/source/provider/URIHelper.hxx +++ b/scripting/source/provider/URIHelper.hxx @@ -26,7 +26,6 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/uri/XUriReferenceFactory.hpp> #include <rtl/ustring.hxx> @@ -45,7 +44,7 @@ class ScriptingFrameworkURIHelper : { private: - css::uno::Reference< css::ucb::XSimpleFileAccess2 > m_xSimpleFileAccess; + css::uno::Reference< css::ucb::XSimpleFileAccess3 > m_xSimpleFileAccess; css::uno::Reference<css::uri::XUriReferenceFactory> m_xUriReferenceFactory; ::rtl::OUString m_sLanguage; diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index 338883dbf7e5..0086ea9d9a5e 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -1140,7 +1140,7 @@ void StringResourcePersistenceImpl::storeToURL( const ::rtl::OUString& URL, bool bUsedForStore = false; bool bStoreAll = true; - Reference< ucb::XSimpleFileAccess2 > xFileAccess = ucb::SimpleFileAccess::create(m_xContext); + Reference< ucb::XSimpleFileAccess3 > xFileAccess = ucb::SimpleFileAccess::create(m_xContext); if( xFileAccess.is() && Handler.is() ) xFileAccess->setInteractionHandler( Handler ); @@ -1151,7 +1151,7 @@ void StringResourcePersistenceImpl::implKillRemovedLocaleFiles ( const ::rtl::OUString& Location, const ::rtl::OUString& aNameBase, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xFileAccess + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xFileAccess ) throw (Exception, RuntimeException) { @@ -1177,7 +1177,7 @@ void StringResourcePersistenceImpl::implKillChangedDefaultFiles ( const ::rtl::OUString& Location, const ::rtl::OUString& aNameBase, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xFileAccess + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xFileAccess ) throw (Exception, RuntimeException) { @@ -1204,7 +1204,7 @@ void StringResourcePersistenceImpl::implStoreAtLocation const ::rtl::OUString& Location, const ::rtl::OUString& aNameBase, const ::rtl::OUString& aComment, - const Reference< ucb::XSimpleFileAccess2 >& xFileAccess, + const Reference< ucb::XSimpleFileAccess3 >& xFileAccess, bool bUsedForStore, bool bStoreAll, bool bKillAll @@ -2874,7 +2874,7 @@ void StringResourceWithLocationImpl::store() if( !m_bModified && !bStoreAll ) return; - Reference< ucb::XSimpleFileAccess2 > xFileAccess = getFileAccess(); + Reference< ucb::XSimpleFileAccess3 > xFileAccess = getFileAccess(); implStoreAtLocation( m_aLocation, m_aNameBase, m_aComment, xFileAccess, bUsedForStore, bStoreAll ); m_bModified = false; @@ -2960,7 +2960,7 @@ void StringResourceWithLocationImpl::setURL( const ::rtl::OUString& URL ) // Scan locale properties files void StringResourceWithLocationImpl::implScanLocales( void ) { - const Reference< ucb::XSimpleFileAccess2 > xFileAccess = getFileAccess(); + const Reference< ucb::XSimpleFileAccess3 > xFileAccess = getFileAccess(); if( xFileAccess.is() && xFileAccess->isFolder( m_aLocation ) ) { Sequence< ::rtl::OUString > aContentSeq = xFileAccess->getFolderContents( m_aLocation, false ); @@ -2973,7 +2973,7 @@ bool StringResourceWithLocationImpl::implLoadLocale( LocaleItem* pLocaleItem ) { bool bSuccess = false; - const Reference< ucb::XSimpleFileAccess2 > xFileAccess = getFileAccess(); + const Reference< ucb::XSimpleFileAccess3 > xFileAccess = getFileAccess(); if( xFileAccess.is() ) { ::rtl::OUString aCompleteFileName = @@ -2996,7 +2996,7 @@ bool StringResourceWithLocationImpl::implLoadLocale( LocaleItem* pLocaleItem ) return bSuccess; } -const Reference< ucb::XSimpleFileAccess2 > StringResourceWithLocationImpl::getFileAccess( void ) +const Reference< ucb::XSimpleFileAccess3 > StringResourceWithLocationImpl::getFileAccess( void ) { ::osl::MutexGuard aGuard( getMutex() ); diff --git a/scripting/source/stringresource/stringresource.hxx b/scripting/source/stringresource/stringresource.hxx index 6697eb8aa1ac..90f9a8dc8a9b 100644 --- a/scripting/source/stringresource/stringresource.hxx +++ b/scripting/source/stringresource/stringresource.hxx @@ -25,7 +25,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> +#include <com/sun/star/ucb/XSimpleFileAccess3.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XOutputStream.hpp> #include <cppuhelper/implbase1.hxx> @@ -305,7 +305,7 @@ protected: ( const ::rtl::OUString& Location, const ::rtl::OUString& aNameBase, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xFileAccess + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xFileAccess ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); @@ -313,7 +313,7 @@ protected: ( const ::rtl::OUString& Location, const ::rtl::OUString& aNameBase, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xFileAccess + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xFileAccess ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); @@ -322,7 +322,7 @@ protected: const ::rtl::OUString& Location, const ::rtl::OUString& aNameBase, const ::rtl::OUString& aComment, - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xFileAccess, + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xFileAccess, bool bUsedForStore, bool bStoreAll, bool bKillAll = false @@ -557,10 +557,10 @@ class StringResourceWithLocationImpl : public StringResourceWithLocationImpl_BAS { ::rtl::OUString m_aLocation; bool m_bLocationChanged; - com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess2 > m_xSFI; + com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess3 > m_xSFI; com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler > m_xInteractionHandler; - const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > getFileAccess( void ); + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > getFileAccess( void ); virtual void implScanLocales( void ); virtual bool implLoadLocale( LocaleItem* pLocaleItem ); diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index f63fb5e9d89f..3c690634b7fb 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -3099,7 +3099,7 @@ bool HtmlExport::CopyFile( const String& rSourceFile, const String& rDestPath ) // ===================================================================== -bool HtmlExport::checkFileExists( Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xFileAccess, String const & aFileName ) +bool HtmlExport::checkFileExists( Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xFileAccess, String const & aFileName ) { try { @@ -3125,7 +3125,7 @@ bool HtmlExport::checkForExistingFiles() try { Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); - uno::Reference<ucb::XSimpleFileAccess2> xFA(ucb::SimpleFileAccess::create(xContext)); + uno::Reference<ucb::XSimpleFileAccess3> xFA(ucb::SimpleFileAccess::create(xContext)); sal_uInt16 nSdPage; for( nSdPage = 0; !bFound && (nSdPage < mnSdPageCount); nSdPage++) diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index 7a4ac0061c78..38e22bc230f5 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -30,7 +30,7 @@ #define _SD_HTMLEX_HXX #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> +#include <com/sun/star/ucb/XSimpleFileAccess3.hpp> #include <vcl/gdimtf.hxx> #include <svl/itemset.hxx> #include "resltn.hxx" // enum PublishingResolution @@ -177,7 +177,7 @@ class HtmlExport bool CreateImageNumberFile(); bool checkForExistingFiles(); - bool checkFileExists( ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 >& xFileAccess, String const & aFileName ); + bool checkFileExists( ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xFileAccess, String const & aFileName ); String getDocumentTitle(); bool SavePresentation(); diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index c34bb2ed116a..2dd1cc63d7a3 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -60,7 +60,6 @@ #include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/frame/XModuleManager.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/XImageManager.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> @@ -792,7 +791,7 @@ void AssistentDlgImpl::ScanDocmenu (void) uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); uno::Reference< container::XNameAccess > xFilterFactory( xFactory->createInstance( "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY ); - uno::Reference<ucb::XSimpleFileAccess2> xFileAccess(ucb::SimpleFileAccess::create(::comphelper::getProcessComponentContext())); + uno::Reference<ucb::XSimpleFileAccess3> xFileAccess(ucb::SimpleFileAccess::create(::comphelper::getProcessComponentContext())); sal_uInt32 nCount = aHistory.getLength(); for (sal_uInt32 nItem=0; nItem<nCount; ++nItem) diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index a183008549c9..4315fb73880d 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -21,7 +21,6 @@ #include <com/sun/star/registry/XSimpleRegistry.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/document/XTypeDetection.hpp> #include <com/sun/star/frame/ModuleManager.hpp> #include <com/sun/star/frame/XLoadable.hpp> @@ -251,7 +250,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri aUserTemplateURL += DEF_TPL_STR; aUserTemplateURL += aExt; - uno::Reference<ucb::XSimpleFileAccess2> xSimpleFileAccess( + uno::Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess( ucb::SimpleFileAccess::create( ::comphelper::getComponentContext(xFactory) ) ); ::rtl::OUString aBackupURL; diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index a30765346b15..a1b3c26db956 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -49,7 +49,6 @@ #include <com/sun/star/util/XModifiable.hpp> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/script/provider/XScript.hpp> #include <com/sun/star/script/provider/XScriptProvider.hpp> #include <com/sun/star/script/provider/XScriptProviderSupplier.hpp> @@ -2099,7 +2098,7 @@ void SfxObjectShell::StoreLog() try { uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); - uno::Reference< ucb::XSimpleFileAccess2 > xSimpleFileAccess(ucb::SimpleFileAccess::create(xContext)); + uno::Reference< ucb::XSimpleFileAccess3 > xSimpleFileAccess(ucb::SimpleFileAccess::create(xContext)); uno::Reference< io::XStream > xStream( xSimpleFileAccess->openFileReadWrite( aFileURL ), uno::UNO_SET_THROW ); uno::Reference< io::XOutputStream > xOutStream( xStream->getOutputStream(), uno::UNO_SET_THROW ); uno::Reference< io::XTruncate > xTruncate( xOutStream, uno::UNO_QUERY_THROW ); diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index 98908c3abf1c..368ebd5457fe 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -25,7 +25,6 @@ #include <com/sun/star/ucb/XProgressHandler.hpp> #include <com/sun/star/ucb/XContentAccess.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/ucb/InteractiveIOException.hpp> #include <com/sun/star/ucb/IOErrorCode.hpp> @@ -473,7 +472,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement( { if ( isLocalFile_Impl( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) { - uno::Reference<ucb::XSimpleFileAccess2> xSimpleFileAccess( + uno::Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_pImpl->m_xFactory) ) ); xResult = xSimpleFileAccess->openFileReadWrite( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -1463,7 +1462,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl { if ( isLocalFile_Impl( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) { - uno::Reference<ucb::XSimpleFileAccess2> xSimpleFileAccess( + uno::Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_pImpl->m_xFactory) ) ); uno::Reference< io::XStream > xStream = diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx index 2d2a4d93b418..c0e7daa539bc 100644 --- a/svl/source/misc/sharecontrolfile.cxx +++ b/svl/source/misc/sharecontrolfile.cxx @@ -21,7 +21,6 @@ #include <stdio.h> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/ucb/XCommandEnvironment.hpp> #include <com/sun/star/ucb/XContent.hpp> #include <com/sun/star/ucb/InsertCommandArgument.hpp> @@ -352,7 +351,7 @@ void ShareControlFile::RemoveFile() Close(); - uno::Reference<ucb::XSimpleFileAccess2> xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getProcessComponentContext())); + uno::Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getProcessComponentContext())); xSimpleFileAccess->kill( m_aURL ); } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 4110bfc401a8..b04597e175d5 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4278,7 +4278,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedF uno::Sequence< rtl::OUString > sGlobalTemplates; // first get the autoload addins in the directory STARTUP - uno::Reference<ucb::XSimpleFileAccess2> xSFA(ucb::SimpleFileAccess::create(::comphelper::getProcessComponentContext())); + uno::Reference<ucb::XSimpleFileAccess3> xSFA(ucb::SimpleFileAccess::create(::comphelper::getProcessComponentContext())); if( xSFA->isFolder( aAddinPath ) ) sGlobalTemplates = xSFA->getFolderContents( aAddinPath, sal_False ); diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx index 034f6adfe4b5..e996f23e9fa2 100644 --- a/sw/source/ui/vba/vbaaddins.cxx +++ b/sw/source/ui/vba/vbaaddins.cxx @@ -31,7 +31,6 @@ #include <unotools/pathoptions.hxx> #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -42,7 +41,7 @@ static uno::Reference< container::XIndexAccess > lcl_getAddinCollection( const u // first get the autoload addins in the directory STARTUP uno::Reference< lang::XMultiComponentFactory > xMCF( xContext->getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference<ucb::XSimpleFileAccess2> xSFA(ucb::SimpleFileAccess::create(xContext)); + uno::Reference<ucb::XSimpleFileAccess3> xSFA(ucb::SimpleFileAccess::create(xContext)); SvtPathOptions aPathOpt; // FIXME: temporary the STARTUP path is located in $OO/basic3.1/program/addin String aAddinPath = aPathOpt.GetAddinPath(); diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx index 1722972e55b4..1afcdba26011 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.hxx +++ b/xmlhelp/source/cxxhelp/provider/databases.hxx @@ -47,7 +47,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/i18n/XCollator.hpp> #include <com/sun/star/deployment/XPackage.hpp> -#include "com/sun/star/ucb/XSimpleFileAccess2.hpp" +#include "com/sun/star/ucb/XSimpleFileAccess3.hpp" // Forward declaration @@ -296,7 +296,7 @@ namespace chelp { osl::Mutex m_aMutex; com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; com::sun::star::uno::Reference< com::sun::star::lang::XMultiComponentFactory > m_xSMgr; - com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess2 > m_xSFA; + com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess3 > m_xSFA; bool m_bShowBasic; char* m_pErrorDoc; @@ -438,7 +438,7 @@ namespace chelp { com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > xPackage ); com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; - com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess2 > m_xSFA; + com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess3 > m_xSFA; Databases& m_rDatabases; IteratorState m_eState; diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx index 2b0749fc95f7..2b5697d96fd5 100644 --- a/xmlhelp/source/cxxhelp/provider/db.hxx +++ b/xmlhelp/source/cxxhelp/provider/db.hxx @@ -34,7 +34,7 @@ #include <berkeleydb/db.h> #endif -#include "com/sun/star/ucb/XSimpleFileAccess2.hpp" +#include "com/sun/star/ucb/XSimpleFileAccess3.hpp" #ifndef HAVE_CXX0X #define BOOST_NO_0X_HDR_TYPEINDEX @@ -123,7 +123,7 @@ namespace berkeleydbproxy { rtl::OUString m_aFileURL; StringToDataMap* m_pStringToDataMap; StringToValPosMap* m_pStringToValPosMap; - com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess2 > + com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess3 > m_xSFA; com::sun::star::uno::Sequence< sal_Int8 > @@ -139,7 +139,7 @@ namespace berkeleydbproxy { //SimpleFileAccess requires file URLs as arguments. Passing file path may work but fails //for example when using long file paths on Windows, which start with "\\?\" DBHelp( const rtl::OUString& rFileURL, - com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess2 > xSFA ) + com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess3 > xSFA ) : m_aFileURL( rFileURL ) , m_pStringToDataMap( NULL ) , m_pStringToValPosMap( NULL ) diff --git a/xmlhelp/source/treeview/tvread.hxx b/xmlhelp/source/treeview/tvread.hxx index a35da146b417..dc3bffdaf67c 100644 --- a/xmlhelp/source/treeview/tvread.hxx +++ b/xmlhelp/source/treeview/tvread.hxx @@ -43,7 +43,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/deployment/XPackage.hpp> -#include "com/sun/star/ucb/XSimpleFileAccess2.hpp" +#include "com/sun/star/ucb/XSimpleFileAccess3.hpp" namespace treeview { @@ -358,7 +358,7 @@ namespace treeview { osl::Mutex m_aMutex; com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; - com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess2 > m_xSFA; + com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess3 > m_xSFA; IteratorState m_eState; rtl::OUString m_aLanguage; |