summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-14 18:08:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-14 18:24:49 +0200
commit9ac86f484b0c278aafbce685ed19d3ea005ee8f8 (patch)
treecf2fe16d76992bcbd1bd89a8693c5f4996cd55f2 /sot
parent2e284203da7f9882842111265f5f68ea0a145065 (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 'sot')
-rw-r--r--sot/source/sdstor/storage.cxx2
-rw-r--r--sot/source/sdstor/ucbstorage.cxx18
2 files changed, 10 insertions, 10 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 56a367976adb..bc0ab823386b 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -483,7 +483,7 @@ void SotStorage::CreateStorage( sal_Bool bForceUCBStorage, StreamMode nMode, Sto
String aURL = UCBStorage::CreateLinkFile( m_aName );
if ( aURL.Len() )
{
- ::ucbhelper::Content aContent( aURL, ::com::sun::star::uno::Reference < ::com::sun::star::ucb::XCommandEnvironment >() );
+ ::ucbhelper::Content aContent( aURL, ::com::sun::star::uno::Reference < ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
m_pOwnStg = new UCBStorage( aContent, aURL, nMode, sal_False );
}
else
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 46fb25ea1a20..d1ff3c13285b 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -663,7 +663,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nM
aTemp += rtl::OUString("?repairpackage");
}
- m_pContent = new ::ucbhelper::Content( aTemp, xComEnv );
+ m_pContent = new ::ucbhelper::Content( aTemp, xComEnv, comphelper::getProcessComponentContext() );
if ( pKey )
{
@@ -1539,7 +1539,7 @@ UCBStorage::UCBStorage( SvStream& rStrm, sal_Bool bDirect )
if( rStrm.IsWritable() )
nMode = STREAM_READ | STREAM_WRITE;
- ::ucbhelper::Content aContent( aURL, Reference < XCommandEnvironment >() );
+ ::ucbhelper::Content aContent( aURL, Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
pImp = new UCBStorage_Impl( aContent, aURL, nMode, this, bDirect, sal_True );
}
else
@@ -1850,7 +1850,7 @@ void UCBStorage_Impl::CreateContent()
aTemp += rtl::OUString("?repairpackage");
}
- m_pContent = new ::ucbhelper::Content( aTemp, xComEnv );
+ m_pContent = new ::ucbhelper::Content( aTemp, xComEnv, comphelper::getProcessComponentContext() );
}
catch (const ContentCreationException&)
{
@@ -1935,7 +1935,7 @@ void UCBStorage_Impl::ReadContent()
aName += String( "?repairpackage" );
}
- ::ucbhelper::Content aContent( aName, xComEnv );
+ ::ucbhelper::Content aContent( aName, xComEnv, comphelper::getProcessComponentContext() );
::rtl::OUString aMediaType;
Any aAny = aContent.getPropertyValue( ::rtl::OUString("MediaType") );
@@ -2229,7 +2229,7 @@ sal_Int16 UCBStorage_Impl::Commit()
String aName( m_aURL );
aName += '/';
aName += pElement->m_aOriginalName;
- pContent = new ::ucbhelper::Content( aName, Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ pContent = new ::ucbhelper::Content( aName, Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
}
if ( pElement->m_bIsRemoved )
@@ -2377,7 +2377,7 @@ sal_Int16 UCBStorage_Impl::Commit()
xWriter->writeManifestSequence( xOutputStream, aProps );
// move the stream to its desired location
- Content aSource( pTempFile->GetURL(), Reference < XCommandEnvironment >() );
+ Content aSource( pTempFile->GetURL(), Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
xWriter = NULL;
xOutputStream = NULL;
DELETEZ( pTempFile );
@@ -2967,7 +2967,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
String aName = aFolderObj.GetName();
aFolderObj.removeSegment();
- Content aFolder( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), Reference < XCommandEnvironment >() );
+ Content aFolder( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
pImp->m_pContent = new Content;
sal_Bool bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, pImp->m_aName, *pImp->m_pContent );
if ( !bRet )
@@ -3283,7 +3283,7 @@ String UCBStorage::CreateLinkFile( const String& rName )
aTitle += aTmpName;
// create a folder and store its URL
- Content aFolder( aFolderURL, Reference < XCommandEnvironment >() );
+ Content aFolder( aFolderURL, Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
Content aNewFolder;
sal_Bool bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, aTitle, aNewFolder );
if ( !bRet )
@@ -3325,7 +3325,7 @@ String UCBStorage::CreateLinkFile( const String& rName )
pStream->Flush();
// move the stream to its desired location
- Content aSource( pTempFile->GetURL(), Reference < XCommandEnvironment >() );
+ Content aSource( pTempFile->GetURL(), Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
DELETEZ( pTempFile );
aFolder.transferContent( aSource, InsertOperation_MOVE, aName, NameClash::OVERWRITE );
return aURL;