xmloff: make the export of the horrible field marks aware of auto-styles
When exporting the .DOC bugdoc of fdo#87110 to ODF, the auto-styles export will iterate over the fieldmarks in the page header and add the attributes for them but not export the elements, so the first auto-style gets a bunch of duplicate attributes. Change-Id: I3fcf39f03e3d9ae5fca661efa7eb4bbb3eab9f5c
This commit is contained in:
@@ -2277,6 +2277,8 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
||||
Reference< ::com::sun::star::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
||||
|
||||
/* As of now, textmarks are a proposed extension to the OpenDocument standard. */
|
||||
if (!bAutoStyles)
|
||||
{
|
||||
if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
|
||||
{
|
||||
Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
||||
@@ -2336,7 +2338,10 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sType.equals(sTextFieldEnd))
|
||||
{
|
||||
if (!bAutoStyles)
|
||||
{
|
||||
Reference< ::com::sun::star::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
||||
|
||||
@@ -2371,7 +2376,10 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sType.equals(sTextFieldStartEnd))
|
||||
{
|
||||
if (!bAutoStyles)
|
||||
{
|
||||
if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
|
||||
{
|
||||
@@ -2404,6 +2412,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sType.equals(sSoftPageBreak))
|
||||
{
|
||||
exportSoftPageBreak(xPropSet, bAutoStyles);
|
||||
|
Reference in New Issue
Block a user