diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-14 18:08:57 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-14 18:24:49 +0200 |
commit | 9ac86f484b0c278aafbce685ed19d3ea005ee8f8 (patch) | |
tree | cf2fe16d76992bcbd1bd89a8693c5f4996cd55f2 /svx/source/gallery2 | |
parent | fdo#46808, Adapt ucb::UniversalContentBroker UNO service to new style (diff) | |
download | core-9ac86f484b0c278aafbce685ed19d3ea005ee8f8.tar.gz core-9ac86f484b0c278aafbce685ed19d3ea005ee8f8.zip |
Improvement on previous commit, UCB clean up
* As UCB is only ever initialized with "Local"/"Office", remove this
configuration vector completely. The "create" ctor creates an instance
internally initialized with those "Local"/"Office" keys. Special (test) code
can still instantiate an uninitialized one via plain createInstance. And for
backwards compatilibity process startup still ensures to create an initialized
instance early, in case there is still code out there (in extensions) that
later calls plain createInstance and expects to get the already-initialized
(single) instance.
* XInitialization is an "implementation detail" of the UniversalContentBroker
service, do not expose in XUniversalContentBroker.
* ucbhelper/configurationkeys.hxx is no longer needed and is removed.
* ucbhelper/contentbroker.hxx is an empty wrapper and is removed; however, that
requires ucbhelper::Content constructors to take explicit XComponentContext
arguments now.
* The only remaining code in ucbhelper/source/client/contentbroker.cxx is
Android-only InitUCBHelper. Is that relevant still?
Change-Id: I3f7bddd0456bffbcd13590c66d9011915c760f28
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 10 | ||||
-rw-r--r-- | svx/source/gallery2/galmisc.cxx | 10 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 4 |
4 files changed, 17 insertions, 11 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index df80ccf72bc9..4aa2875b3510 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -26,7 +26,9 @@ * ************************************************************************/ +#include "sal/config.h" +#include <comphelper/processfactory.hxx> #include <tools/datetime.hxx> #include <unotools/datetime.hxx> #include <vcl/msgbox.hxx> @@ -231,7 +233,7 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa try { - ::ucbhelper::Content aCnt( pThm->GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >() ); + ::ucbhelper::Content aCnt( pThm->GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); util::DateTime aDateTimeModified; DateTime aDateTime( DateTime::EMPTY ); diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 7f4303522646..856a92993926 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -26,7 +26,9 @@ * ************************************************************************/ +#include "sal/config.h" +#include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> #include <tools/vcompat.hxx> #include <ucbhelper/content.hxx> @@ -264,7 +266,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR try { uno::Reference< ucb::XCommandEnvironment > xEnv; - ::ucbhelper::Content aCnt( rBaseURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv ); + ::ucbhelper::Content aCnt( rBaseURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() ); uno::Sequence< OUString > aProps( 1 ); aProps.getArray()[ 0 ] = OUString("Url"); @@ -327,9 +329,9 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR try { - ::ucbhelper::Content aThmCnt( aThmURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv ); - ::ucbhelper::Content aSdgCnt( aSdgURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv ); - ::ucbhelper::Content aSdvCnt( aSdvURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv ); + ::ucbhelper::Content aThmCnt( aThmURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() ); + ::ucbhelper::Content aSdgCnt( aSdgURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() ); + ::ucbhelper::Content aSdvCnt( aSdvURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() ); try { diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 00ee9b709f19..4fd476915e20 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -280,7 +280,7 @@ sal_Bool FileExists( const INetURLObject& rURL ) { try { - ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >() ); + ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); OUString aTitle; aCnt.getPropertyValue( OUString("Title") ) >>= aTitle; @@ -313,14 +313,14 @@ sal_Bool CreateDir( const INetURLObject& rURL ) uno::Reference< ucb::XCommandEnvironment > aCmdEnv; INetURLObject aNewFolderURL( rURL ); INetURLObject aParentURL( aNewFolderURL ); aParentURL.removeSegment(); - ::ucbhelper::Content aParent( aParentURL.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv ); + ::ucbhelper::Content aParent( aParentURL.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv, comphelper::getProcessComponentContext() ); uno::Sequence< OUString > aProps( 1 ); uno::Sequence< uno::Any > aValues( 1 ); aProps.getArray()[ 0 ] = OUString("Title"); aValues.getArray()[ 0 ] = uno::makeAny( OUString( aNewFolderURL.GetName() ) ); - ::ucbhelper::Content aContent( aNewFolderURL.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv ); + ::ucbhelper::Content aContent( aNewFolderURL.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv, comphelper::getProcessComponentContext() ); bRet = aParent.insertNewContent( OUString("application/vnd.sun.staroffice.fsys-folder"), aProps, aValues, aContent ); } catch( const ucb::ContentCreationException& ) @@ -345,7 +345,7 @@ sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) try { - ::ucbhelper::Content aDestPath( rDstURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >() ); + ::ucbhelper::Content aDestPath( rDstURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); aDestPath.executeCommand( OUString("transfer"), uno::makeAny( ucb::TransferInfo( sal_False, rSrcURL.GetMainURL( INetURLObject::NO_DECODE ), @@ -375,7 +375,7 @@ sal_Bool KillFile( const INetURLObject& rURL ) { try { - ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >() ); + ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString("delete"), uno::makeAny( sal_Bool( sal_True ) ) ); } catch( const ucb::ContentCreationException& ) diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index e82289d5f970..0d1ff7db010c 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -26,7 +26,9 @@ * ************************************************************************/ +#include "sal/config.h" +#include <comphelper/processfactory.hxx> #include <tools/urlobj.hxx> #include <tools/vcompat.hxx> #include <unotools/streamwrap.hxx> @@ -1160,7 +1162,7 @@ sal_Bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, s try { - ::ucbhelper::Content aCnt( rFileOrDirURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >() ); + ::ucbhelper::Content aCnt( rFileOrDirURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); sal_Bool bFolder = false; aCnt.getPropertyValue( OUString("IsFolder") ) >>= bFolder; |