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 /svtools | |
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 'svtools')
-rw-r--r-- | svtools/CppunitTest_svtools_filters_test.mk | 1 | ||||
-rw-r--r-- | svtools/langsupport/langsupport.cxx | 1 | ||||
-rw-r--r-- | svtools/source/contnr/contentenumeration.cxx | 4 | ||||
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 14 | ||||
-rw-r--r-- | svtools/source/control/inettbc.cxx | 3 | ||||
-rw-r--r-- | svtools/source/dialogs/ServerDetailsControls.cxx | 2 | ||||
-rw-r--r-- | svtools/source/filter/filter.cxx | 6 | ||||
-rw-r--r-- | svtools/source/misc/imagemgr.cxx | 4 | ||||
-rw-r--r-- | svtools/source/misc/templatefoldercache.cxx | 2 |
9 files changed, 20 insertions, 17 deletions
diff --git a/svtools/CppunitTest_svtools_filters_test.mk b/svtools/CppunitTest_svtools_filters_test.mk index f2669fbb1fbf..c6abe11a10ac 100644 --- a/svtools/CppunitTest_svtools_filters_test.mk +++ b/svtools/CppunitTest_svtools_filters_test.mk @@ -53,6 +53,7 @@ $(eval $(call gb_CppunitTest_use_ure,svtools_filters_test)) $(eval $(call gb_CppunitTest_use_components,svtools_filters_test,\ configmgr/source/configmgr \ + ucb/source/core/ucb1 \ )) $(eval $(call gb_CppunitTest_use_configuration,svtools_filters_test)) diff --git a/svtools/langsupport/langsupport.cxx b/svtools/langsupport/langsupport.cxx index 1728fd10b647..12855da0a3ba 100644 --- a/svtools/langsupport/langsupport.cxx +++ b/svtools/langsupport/langsupport.cxx @@ -35,7 +35,6 @@ #include <sal/main.h> #include <svtools/langtab.hxx> #include <tools/extendapplicationenvironment.hxx> -#include <ucbhelper/contentbroker.hxx> #include <vcl/svapp.hxx> #include <iostream> diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx index 924605628ca7..99bb35f75fe3 100644 --- a/svtools/source/contnr/contentenumeration.cxx +++ b/svtools/source/contnr/contentenumeration.cxx @@ -189,7 +189,7 @@ namespace svt } if ( !aFolder.aContent.get().is() ) { - aFolder.aContent = ::ucbhelper::Content( aFolder.sURL, xEnvironment ); + aFolder.aContent = ::ucbhelper::Content( aFolder.sURL, xEnvironment, comphelper::getProcessComponentContext() ); { ::osl::MutexGuard aGuard( m_aMutex ); m_aFolder.aContent = aFolder.aContent; @@ -269,7 +269,7 @@ namespace svt if ( bHasTargetURL && INetURLObject( aContentURL ).GetProtocol() == INET_PROT_VND_SUN_STAR_HIER ) { - ::ucbhelper::Content aCnt( aTargetURL, xEnvironment ); + ::ucbhelper::Content aCnt( aTargetURL, xEnvironment, comphelper::getProcessComponentContext() ); try { aCnt.getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" )) ) >>= pData->maSize; diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 2ada4c14be1a..a390c458fd40 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -365,7 +365,7 @@ void NameTranslationList::Init() try { - ::ucbhelper::Content aTestContent( maTransFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >() ); + ::ucbhelper::Content aTestContent( maTransFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() ); if( aTestContent.isDocument() ) { @@ -816,7 +816,7 @@ PopupMenu* ViewTabListBox_Impl::CreateContextMenu( void ) { OUString aURL( static_cast< SvtContentEntry * >( pEntry->GetUserData() )->maURL ); - aCnt = ::ucbhelper::Content( aURL, mxCmdEnv ); + aCnt = ::ucbhelper::Content( aURL, mxCmdEnv, comphelper::getProcessComponentContext() ); } catch( Exception const & ) { @@ -929,7 +929,7 @@ void ViewTabListBox_Impl::DeleteEntries() bool canDelete = true; try { - ::ucbhelper::Content aCnt( aURL, mxCmdEnv ); + ::ucbhelper::Content aCnt( aURL, mxCmdEnv, comphelper::getProcessComponentContext() ); Reference< XCommandInfo > aCommands = aCnt.getCommands(); if ( aCommands.is() ) canDelete @@ -996,7 +996,7 @@ sal_Bool ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry, { OUString aPropName( RTL_CONSTASCII_USTRINGPARAM( "Title" )); bool canRename = true; - ::ucbhelper::Content aContent( aURL, mxCmdEnv ); + ::ucbhelper::Content aContent( aURL, mxCmdEnv, comphelper::getProcessComponentContext() ); try { @@ -1125,7 +1125,7 @@ sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent ) try { - ::ucbhelper::Content aCnt( rContent, mxCmdEnv ); + ::ucbhelper::Content aCnt( rContent, mxCmdEnv, comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )), makeAny( sal_Bool( sal_True ) ) ); } catch( ::com::sun::star::ucb::CommandAbortedException const & ) @@ -1251,7 +1251,7 @@ sal_Bool SvtFileView::GetParentURL( String& rParentURL ) const sal_Bool bRet = sal_False; try { - ::ucbhelper::Content aCnt( mpImp->maViewURL, mpImp->mxCmdEnv ); + ::ucbhelper::Content aCnt( mpImp->maViewURL, mpImp->mxCmdEnv, comphelper::getProcessComponentContext() ); Reference< XContent > xContent( aCnt.get() ); Reference< com::sun::star::container::XChild > xChild( xContent, UNO_QUERY ); if ( xChild.is() ) @@ -1308,7 +1308,7 @@ sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com: WaitObject aWaitCursor( this ); mpImp->Clear(); - ::ucbhelper::Content aContent(_xContent, mpImp->mxCmdEnv ); + ::ucbhelper::Content aContent(_xContent, mpImp->mxCmdEnv, comphelper::getProcessComponentContext() ); FileViewResult eResult = mpImp->GetFolderContent_Impl( FolderDescriptor( aContent ), NULL ); OSL_ENSURE( eResult != eStillRunning, "SvtFileView::Initialize: this was expected to be synchronous!" ); if ( eResult != eSuccess ) diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 238ead8f89de..b0d80e773245 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -358,7 +358,8 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL, Content aCnt( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), new ::ucbhelper::CommandEnvironment( uno::Reference< XInteractionHandler >(), - uno::Reference< XProgressHandler >() ) ); + uno::Reference< XProgressHandler >() ), + comphelper::getProcessComponentContext() ); uno::Reference< XResultSet > xResultSet; Sequence< OUString > aProps(2); OUString* pProps = aProps.getArray(); diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index 567bb1e9fae1..e93be567293b 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -384,7 +384,7 @@ IMPL_LINK( CmisDetailsContainer, RefreshReposHdl, void *, EMPTYARG ) } // Get the Content - ::ucbhelper::Content aCnt( sUrl, m_xCmdEnv ); + ::ucbhelper::Content aCnt( sUrl, m_xCmdEnv, comphelper::getProcessComponentContext() ); Sequence< rtl::OUString > aProps( 1 ); aProps[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ); diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx index 217f9a207c1e..5cd2f8d7fd20 100644 --- a/svtools/source/filter/filter.cxx +++ b/svtools/source/filter/filter.cxx @@ -124,7 +124,8 @@ sal_Bool ImplDirEntryHelper::Exists( const INetURLObject& rObj ) try { ::ucbhelper::Content aCnt( rObj.GetMainURL( INetURLObject::NO_DECODE ), - ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), + comphelper::getProcessComponentContext() ); bExists = aCnt.isDocument(); } @@ -150,7 +151,8 @@ void ImplDirEntryHelper::Kill( const String& rMainUrl ) try { ::ucbhelper::Content aCnt( rMainUrl, - ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), + comphelper::getProcessComponentContext() ); aCnt.executeCommand( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )), ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 3a0943f726a9..69d5671479b3 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -340,7 +340,7 @@ static sal_uInt16 GetFolderImageId_Impl( const String& rURL ) ::svtools::VolumeInfo aVolumeInfo; try { - ::ucbhelper::Content aCnt( rURL, ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () ); + ::ucbhelper::Content aCnt( rURL, ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); if ( GetVolumeProperties_Impl( aCnt, aVolumeInfo ) ) { if ( aVolumeInfo.m_bIsRemote ) @@ -472,7 +472,7 @@ static sal_uInt16 GetFolderDescriptionId_Impl( const String& rURL ) svtools::VolumeInfo aVolumeInfo; try { - ::ucbhelper::Content aCnt( rURL, ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () ); + ::ucbhelper::Content aCnt( rURL, ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); if ( GetVolumeProperties_Impl( aCnt, aVolumeInfo ) ) { if ( aVolumeInfo.m_bIsRemote ) diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index da29646e7294..139d84ad7336 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -622,7 +622,7 @@ namespace svt { Reference< XDynamicResultSet > xDynResultSet; - ::ucbhelper::Content aTemplateRoot( _rxRoot->getURL(), Reference< XCommandEnvironment >() ); + ::ucbhelper::Content aTemplateRoot( _rxRoot->getURL(), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() ); xDynResultSet = aTemplateRoot.createDynamicCursor( aContentProperties, ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS ); if ( xDynResultSet.is() ) xResultSet = xDynResultSet->getStaticResultSet(); |