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 /sd/source | |
parent | 2e284203da7f9882842111265f5f68ea0a145065 (diff) |
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 'sd/source')
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptexsoundcollection.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/dlg/TemplateScanner.cxx | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 47013f7af97b..d4632c65a984 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -73,8 +73,6 @@ #include <tools/urlobj.hxx> #include <comphelper/extract.hxx> #include <cppuhelper/proptypehlp.hxx> -#include <ucbhelper/content.hxx> -#include <ucbhelper/contentbroker.hxx> #include <toolkit/unohlp.hxx> #include <rtl/crc.h> #include <sot/clsids.hxx> diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx index d8c1fdd11e0f..4ce9f12c901e 100644 --- a/sd/source/filter/eppt/pptexsoundcollection.cxx +++ b/sd/source/filter/eppt/pptexsoundcollection.cxx @@ -30,7 +30,7 @@ #include "epptdef.hxx" #include <tools/urlobj.hxx> #include <ucbhelper/content.hxx> -#include <ucbhelper/contentbroker.hxx> +#include <comphelper/processfactory.hxx> #include <cppuhelper/proptypehlp.hxx> #include <unotools/ucbstreamhelper.hxx> @@ -44,7 +44,8 @@ ExSoundEntry::ExSoundEntry(const rtl::OUString& rString) try { ::ucbhelper::Content aCnt( aSoundURL, - ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), + comphelper::getProcessComponentContext() ); sal_Int64 nVal = 0; ::cppu::convertPropertyValue( nVal, aCnt.getPropertyValue( ::rtl::OUString( "Size" ) ) ); nFileSize = (sal_uInt32)nVal; @@ -99,7 +100,8 @@ void ExSoundEntry::Write( SvStream& rSt, sal_uInt32 nId ) const try { ::ucbhelper::Content aCnt( aSoundURL, - ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), + comphelper::getProcessComponentContext() ); // create SoundContainer rSt << (sal_uInt32)( ( EPP_Sound << 16 ) | 0xf ) << (sal_uInt32)( GetSize( nId ) - 8 ); diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx index c9e93c17f995..0f01371aa0c7 100644 --- a/sd/source/ui/dlg/TemplateScanner.cxx +++ b/sd/source/ui/dlg/TemplateScanner.cxx @@ -276,7 +276,7 @@ TemplateScanner::State TemplateScanner::ScanEntry (void) ::rtl::OUString sContentType (xRow->getString (3)); ::rtl::OUString aId = xContentAccess->queryContentIdentifierString(); - ::ucbhelper::Content aContent = ::ucbhelper::Content (aId, mxEntryEnvironment); + ::ucbhelper::Content aContent = ::ucbhelper::Content (aId, mxEntryEnvironment, comphelper::getProcessComponentContext()); if (aContent.isDocument ()) { // Check whether the entry is an impress template. If so @@ -332,7 +332,7 @@ TemplateScanner::State TemplateScanner::InitializeFolderScanning (void) { // Create content for template folders. mxFolderEnvironment = Reference<com::sun::star::ucb::XCommandEnvironment>(); - ::ucbhelper::Content aTemplateDir (mxTemplateRoot, mxFolderEnvironment); + ::ucbhelper::Content aTemplateDir (mxTemplateRoot, mxFolderEnvironment, comphelper::getProcessComponentContext()); // Define the list of properties we are interested in. Sequence<rtl::OUString> aProps (2); @@ -405,7 +405,7 @@ TemplateScanner::State TemplateScanner::ScanFolder (void) ::rtl::OUString sTargetDir (aDescriptor.msTargetDir); ::rtl::OUString aId (aDescriptor.msContentIdentifier); - maFolderContent = ::ucbhelper::Content (aId, aDescriptor.mxFolderEnvironment); + maFolderContent = ::ucbhelper::Content (aId, aDescriptor.mxFolderEnvironment, comphelper::getProcessComponentContext()); if (maFolderContent.isFolder()) { // Scan the folder and insert it into the list of template |