diff options
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 3b1ab768e507..636323acb535 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2210,13 +2210,16 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( } else if ( sType == sAnnotationEnd ) { - Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); - const OUString& rName = xBookmark->getName(); - if ( rName.getLength() > 0 ) + if (!bAutoStyles) { - GetExport().AddAttribute(XML_NAMESPACE_OFFICE, XML_NAME, rName); + Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); + const OUString& rName = xBookmark->getName(); + if (!rName.isEmpty()) + { + GetExport().AddAttribute(XML_NAMESPACE_OFFICE, XML_NAME, rName); + } + SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_OFFICE, XML_ANNOTATION_END, false, false ); } - SvXMLElementExport aElem( GetExport(), !bAutoStyles, XML_NAMESPACE_OFFICE, XML_ANNOTATION_END, false, false ); } else if( sType.equals( sFrame ) ) { |