summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-09-15 13:34:43 +0000
committerOliver Bolte <obo@openoffice.org>2006-09-15 13:34:43 +0000
commit6ae6b1dca6915643314468cde285873f7a8e2884 (patch)
tree2886bb1e7797d5c53010b5fb3ccc859e9e59820f /ucb
parentbb88c00d012345680a90989613cb0a39e0003680 (diff)
INTEGRATION: CWS writerfilter (1.84.16); FILE MERGED
2006/07/21 07:41:19 hbrinkm 1.84.16.2: RESYNC: (1.84-1.85); FILE MERGED 2006/02/03 16:14:53 abi 1.84.16.1: #127098 call initialization for special args
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/file/shell.cxx29
1 files changed, 19 insertions, 10 deletions
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index bffff3b0f198..a8b35a3f7b3f 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: shell.cxx,v $
*
- * $Revision: 1.86 $
+ * $Revision: 1.87 $
*
- * last change: $Author: ihi $ $Date: 2006-08-29 11:08:31 $
+ * last change: $Author: obo $ $Date: 2006-09-15 14:34:43 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -232,8 +232,9 @@ shell::MyProperty::~MyProperty()
shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceFactory,
- FileProvider* pProvider )
+ FileProvider* pProvider, sal_Bool bWithConfig )
: TaskManager(),
+ m_bWithConfig( bWithConfig ),
m_pProvider( pProvider ),
m_xMultiServiceFactory( xMultiServiceFactory ),
Title( rtl::OUString::createFromAscii( "Title" ) ),
@@ -454,13 +455,18 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF
m_sCommandInfo[7].Handle = -1;
m_sCommandInfo[7].ArgType = getCppuType( static_cast< InsertCommandArgument* > ( 0 ) );
- rtl::OUString Store = rtl::OUString::createFromAscii( "com.sun.star.ucb.Store" );
- uno::Reference< XPropertySetRegistryFactory > xRegFac( m_xMultiServiceFactory->createInstance( Store ),
- uno::UNO_QUERY );
- if ( xRegFac.is() )
+
+ if(m_bWithConfig)
{
- // Open/create a registry
- m_xFileRegistry = xRegFac->createPropertySetRegistry( rtl::OUString() );
+ rtl::OUString Store = rtl::OUString::createFromAscii( "com.sun.star.ucb.Store" );
+ uno::Reference< XPropertySetRegistryFactory > xRegFac(
+ m_xMultiServiceFactory->createInstance( Store ),
+ uno::UNO_QUERY );
+ if ( xRegFac.is() )
+ {
+ // Open/create a registry
+ m_xFileRegistry = xRegFac->createPropertySetRegistry( rtl::OUString() );
+ }
}
}
@@ -616,7 +622,8 @@ shell::deassociate( const rtl::OUString& aUnqPath,
it->second.xS = 0;
it->second.xC = 0;
it->second.xA = 0;
- m_xFileRegistry->removePropertySet( aUnqPath );
+ if(m_xFileRegistry.is())
+ m_xFileRegistry->removePropertySet( aUnqPath );
}
}
notifyPropertyRemoved( getPropertySetListeners( aUnqPath ), PropertyName );
@@ -2935,6 +2942,7 @@ shell::erasePersistentSet( const rtl::OUString& aUnqPath,
if( ! m_xFileRegistry.is() )
{
VOS_ASSERT( m_xFileRegistry.is() );
+ return;
}
uno::Sequence< rtl::OUString > seqNames;
@@ -2997,6 +3005,7 @@ shell::copyPersistentSet( const rtl::OUString& srcUnqPath,
if( ! m_xFileRegistry.is() )
{
VOS_ASSERT( m_xFileRegistry.is() );
+ return;
}
uno::Sequence< rtl::OUString > seqNames;