From 9fb421ee4d010fed92aa793a08d450f6e5cbe17f Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:36 +0100 Subject: [PATCH] odfmetadata4: #i109599#,#i109600#: set xml:id _after_ inserting section/index. --- xmloff/source/text/XMLIndexTOCContext.cxx | 7 +++---- xmloff/source/text/XMLSectionImportContext.cxx | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index daf0703803d7..14d18f7141d8 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -201,10 +201,6 @@ void XMLIndexTOCContext::StartElement( OUString::createFromAscii(aIndexServiceMap[eIndexType])); if( xIfc.is() ) { - - // xml:id for RDF metadata - GetImport().SetXmlId(xIfc, sXmlId); - // get Property set Reference xPropSet(xIfc, UNO_QUERY); xTOCPropertySet = xPropSet; @@ -246,6 +242,9 @@ void XMLIndexTOCContext::StartElement( return; } + // xml:id for RDF metadata + GetImport().SetXmlId(xIfc, sXmlId); + // b) insert marker and move cursor rImport->InsertString(sMarker); rImport->GetCursor()->goLeft(2, sal_False); diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index f31ce783565f..4b9b94b1ced7 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -161,9 +161,6 @@ void XMLSectionImportContext::StartElement( // save PropertySet (for CreateChildContext) xSectionPropertySet = xPropSet; - // xml:id for RDF metadata - GetImport().SetXmlId(xIfc, sXmlId); - // name Reference xNamed(xPropSet, UNO_QUERY); xNamed->setName(sName); @@ -253,6 +250,9 @@ void XMLSectionImportContext::StartElement( // finally, check for redlines that should start at // the section start node rHelper->RedlineAdjustStartNodeCursor(sal_True); // start ??? + + // xml:id for RDF metadata + GetImport().SetXmlId(xIfc, sXmlId); } } }