Kaydet (Commit) bd75327c authored tarafından Caolán McNamara's avatar Caolán McNamara

fix assert on export of ooo63141-1.doc to odt

if bAutoStyles is true then the mbDoSomething of the SvXMLElementExport is
false, and the ctor/dtor doesn't do anything so any attributes added to the
exporter are not cleared by the SvXMLElementExport dtor

so only add the attribute if bAutoStyles if false and might as well extend the
block to cover the use of SvXMLElementExport and use the other ctor which
defaults mbDoSomething on

Change-Id: If35cd35e902372562fd7e78b3f970d91fcec3c16
üst 28764d7e
...@@ -2210,13 +2210,16 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( ...@@ -2210,13 +2210,16 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
} }
else if ( sType == sAnnotationEnd ) else if ( sType == sAnnotationEnd )
{ {
Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); if (!bAutoStyles)
const OUString& rName = xBookmark->getName();
if ( rName.getLength() > 0 )
{ {
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 ) ) else if( sType.equals( sFrame ) )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment