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,7 +2277,9 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
|||||||
Reference< ::com::sun::star::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
Reference< ::com::sun::star::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
||||||
|
|
||||||
/* As of now, textmarks are a proposed extension to the OpenDocument standard. */
|
/* As of now, textmarks are a proposed extension to the OpenDocument standard. */
|
||||||
if ( GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
|
if (!bAutoStyles)
|
||||||
|
{
|
||||||
|
if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
|
||||||
{
|
{
|
||||||
Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
||||||
if (xBookmark.is())
|
if (xBookmark.is())
|
||||||
@@ -2336,7 +2338,10 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (sType.equals(sTextFieldEnd))
|
else if (sType.equals(sTextFieldEnd))
|
||||||
|
{
|
||||||
|
if (!bAutoStyles)
|
||||||
{
|
{
|
||||||
Reference< ::com::sun::star::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
Reference< ::com::sun::star::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
||||||
|
|
||||||
@@ -2371,9 +2376,12 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (sType.equals(sTextFieldStartEnd))
|
else if (sType.equals(sTextFieldStartEnd))
|
||||||
{
|
{
|
||||||
if ( GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
|
if (!bAutoStyles)
|
||||||
|
{
|
||||||
|
if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
|
||||||
{
|
{
|
||||||
Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
|
||||||
if (xBookmark.is())
|
if (xBookmark.is())
|
||||||
@@ -2404,6 +2412,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (sType.equals(sSoftPageBreak))
|
else if (sType.equals(sSoftPageBreak))
|
||||||
{
|
{
|
||||||
exportSoftPageBreak(xPropSet, bAutoStyles);
|
exportSoftPageBreak(xPropSet, bAutoStyles);
|
||||||
|
Reference in New Issue
Block a user