diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2005-10-17 13:00:16 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2005-10-17 13:00:16 +0000 |
commit | 26e06fa56a40668b6e23314a139d60c04dcb440a (patch) | |
tree | 59a15aa99de737e95f3b67cd42e61efb20d3f8d5 /xmloff | |
parent | 201a75936c41cde55a88b205b4cc434ec9d243b0 (diff) |
INTEGRATION: CWS merge20to201v3 (1.16.30); FILE MERGED
2005/10/14 15:04:57 hr 1.16.30.1: #i55999#: merge OOO680 CWS ooo20m2 to SRC680
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/meta/xmlmetai.cxx | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx index 0b72c36c08..ec9ac2c5f5 100644 --- a/xmloff/source/meta/xmlmetai.cxx +++ b/xmloff/source/meta/xmlmetai.cxx @@ -4,9 +4,9 @@ * * $RCSfile: xmlmetai.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: rt $ $Date: 2005-09-09 14:18:17 $ + * last change: $Author: rt $ $Date: 2005-10-17 14:00:16 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -42,6 +42,10 @@ #include <com/sun/star/document/XDocumentInfoSupplier.hpp> #include <com/sun/star/beans/XPropertyContainer.hpp> +#ifndef _RTL_USTRBUF_HXX_ +#include <rtl/ustrbuf.hxx> +#endif + #include "xmlmetai.hxx" #include "xmltkmap.hxx" #include "xmlnmspe.hxx" @@ -57,6 +61,7 @@ #endif using ::rtl::OUString; +using ::rtl::OUStringBuffer; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Exception; using ::com::sun::star::beans::XPropertySet; @@ -627,12 +632,21 @@ void SfxXMLMetaElementContext::EndElement() if( nBegin == -1 ) break; - // cut off build id - sal_Int32 nEnd = sContent.indexOf( '$', nBegin ); + sal_Int32 nEnd = sContent.indexOf( 'm', nBegin ); if( nEnd == -1 ) break; - OUString sBuild( sContent.copy( nBegin+1, nEnd-nBegin-1 ) ); + OUStringBuffer sBuffer( sContent.copy( nBegin+1, nEnd-nBegin-1 ) ); + + const OUString sBuildCompare( RTL_CONSTASCII_USTRINGPARAM( "$Build-" ) ); + + nBegin = sContent.indexOf( sBuildCompare, nEnd ); + if( nBegin == -1 ) + break; + + sBuffer.append( (sal_Unicode)'$' ); + sBuffer.append( sContent.copy( nBegin+sBuildCompare.getLength() ) ); + try { Reference< XPropertySet > xSet( GetImport().getImportInfo() ); @@ -641,7 +655,7 @@ void SfxXMLMetaElementContext::EndElement() const OUString aPropName(RTL_CONSTASCII_USTRINGPARAM("BuildId")); Reference< XPropertySetInfo > xSetInfo( xSet->getPropertySetInfo() ); if( xSetInfo.is() && xSetInfo->hasPropertyByName( aPropName ) ) - xSet->setPropertyValue( aPropName, uno::makeAny( sBuild ) ); + xSet->setPropertyValue( aPropName, uno::makeAny( sBuffer.makeStringAndClear() ) ); } } catch( Exception& e ) |