summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmloff/source/text/txtparae.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index cdc468cdc57e..5da84e001c49 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2208,13 +2208,16 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
else if ( sType.equals( 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 ) )
{