diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2004-07-13 07:30:52 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2004-07-13 07:30:52 +0000 |
commit | a9019e76812a947eb54cfa8d728c19361c929458 (patch) | |
tree | b9b5555160d0e07992c145b294c2866698250f45 /xmloff/source/text/XMLChangeInfoContext.cxx | |
parent | e9d64de2528b69f3d78a9b8291978297d4558714 (diff) |
INTEGRATION: CWS oasis (1.3.276); FILE MERGED
2004/05/12 11:00:37 mib 1.3.276.1: - #i20153#: changed <office:annotation> and <office:change-info>
Diffstat (limited to 'xmloff/source/text/XMLChangeInfoContext.cxx')
-rw-r--r-- | xmloff/source/text/XMLChangeInfoContext.cxx | 47 |
1 files changed, 17 insertions, 30 deletions
diff --git a/xmloff/source/text/XMLChangeInfoContext.cxx b/xmloff/source/text/XMLChangeInfoContext.cxx index 06437107afb5..0967aeab68b6 100644 --- a/xmloff/source/text/XMLChangeInfoContext.cxx +++ b/xmloff/source/text/XMLChangeInfoContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLChangeInfoContext.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $ + * last change: $Author: rt $ $Date: 2004-07-13 08:30:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -121,30 +121,7 @@ XMLChangeInfoContext::~XMLChangeInfoContext() void XMLChangeInfoContext::StartElement( const Reference<XAttributeList> & xAttrList) { - // process attributes: chg-author, chg-date-time - sal_Int16 nLength = xAttrList->getLength(); - for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++) - { - OUString sLocalName; - sal_uInt16 nPrefix = GetImport().GetNamespaceMap(). - GetKeyByAttrName( xAttrList->getNameByIndex(nAttr), - &sLocalName ); - OUString sValue = xAttrList->getValueByIndex(nAttr); - if (XML_NAMESPACE_OFFICE == nPrefix) - { - if ( IsXMLToken( sLocalName, XML_CHG_AUTHOR ) ) - { - sAuthor = sValue; - } - else if ( IsXMLToken( sLocalName, XML_CHG_DATE_TIME ) ) - { - sDateTime = sValue; - } - // else: unknown attribute - } - // else: unknown namespace - } - + // no attributes } SvXMLImportContext* XMLChangeInfoContext::CreateChildContext( @@ -154,13 +131,23 @@ SvXMLImportContext* XMLChangeInfoContext::CreateChildContext( { SvXMLImportContext* pContext = NULL; - if ( ( XML_NAMESPACE_TEXT == nPrefix ) && + if( XML_NAMESPACE_DC == nPrefix ) + { + if( IsXMLToken( rLocalName, XML_CREATOR ) ) + pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, + rLocalName, sAuthorBuffer); + else if( IsXMLToken( rLocalName, XML_DATE ) ) + pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, + rLocalName, sDateTimeBuffer); + } + else if ( ( XML_NAMESPACE_TEXT == nPrefix ) && IsXMLToken( rLocalName, XML_P ) ) { pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, sCommentBuffer); } - else + + if( !pContext ) { pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); @@ -172,7 +159,7 @@ SvXMLImportContext* XMLChangeInfoContext::CreateChildContext( void XMLChangeInfoContext::EndElement() { // set values at changed region context - rChangedRegion.SetChangeInfo(rType, sAuthor, + rChangedRegion.SetChangeInfo(rType, sAuthorBuffer.makeStringAndClear(), sCommentBuffer.makeStringAndClear(), - sDateTime); + sDateTimeBuffer.makeStringAndClear()); } |