diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2004-08-20 07:34:25 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2004-08-20 07:34:25 +0000 |
commit | 4ad94a590d2afb9fa81cce8712bc23f2219d1b0a (patch) | |
tree | 543042e92e6d0f654cbe7851b4e03b9a286148af /sc/source/filter/xml/xmlwrap.cxx | |
parent | fc2777dad7f353e4b58421928ab419556221026d (diff) |
INTEGRATION: CWS oasis2 (1.50.10); FILE MERGED
2004/07/27 14:12:36 mib 1.50.10.1: #i31910#: Don't set StreamRelPath for root storages
Diffstat (limited to 'sc/source/filter/xml/xmlwrap.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index cc3d07d6ac92..548f748c5dcf 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlwrap.cxx,v $ * - * $Revision: 1.50 $ + * $Revision: 1.51 $ * - * last change: $Author: rt $ $Date: 2004-07-13 07:49:33 $ + * last change: $Author: rt $ $Date: 2004-08-20 08:34:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -481,7 +481,8 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly) rtl::OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BaseURI") ); xInfoSet->setPropertyValue( sPropName, uno::makeAny( rtl::OUString(INetURLObject::GetBaseURL()) ) ); - if( SFX_CREATE_MODE_EMBEDDED == pObjSh->GetCreateMode() ) + if( SFX_CREATE_MODE_EMBEDDED == pObjSh->GetCreateMode() && + !pStorage->IsRoot() ) { rtl::OUString aName( pStorage->GetName() ); if( aName.getLength() ) @@ -778,6 +779,21 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly) aUsePrettyPrinting <<= bUsePrettyPrinting; xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UsePrettyPrinting")), aUsePrettyPrinting); + // Set base URI + OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BaseURI") ); + xInfoSet->setPropertyValue( sPropName, + uno::makeAny( OUString(INetURLObject::GetBaseURL()) ) ); + if( SFX_CREATE_MODE_EMBEDDED == pObjSh->GetCreateMode() && + !pStorage->IsRoot() ) + { + OUString aName( pStorage->GetName() ); + if( aName.getLength() ) + { + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")); + xInfoSet->setPropertyValue( sPropName, uno::makeAny( aName ) ); + } + } + sal_Bool bMetaRet(pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED); sal_Bool bStylesRet (sal_False); sal_Bool bDocRet(sal_False); |