diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-12-22 23:10:14 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-12-22 23:57:45 +0100 |
commit | c1e1ef80e8428514499b061e00801a6a6298d0b0 (patch) | |
tree | c4591d23c504bdc2f9444ccf5dd60e314e1f9bd0 /xmloff/source/style/PageMasterExportPropMapper.cxx | |
parent | f277d0c88a478917002b4da370cc170b29a219ed (diff) |
fdo#44073: ODF export: fix layout grid invalid ODF
The following 3 attributes have been added in ODF 1.2, so don't write
them into ODF 1.1 files:
style:layout-grid-base-width 20.297
style:layout-grid-snap-to 20.305
style:layout-grid-standard-mode 20.306
Additionally, style:layout-grid-snap-to was written wrongly as
style:layout-grid-snap-to-characters, which does not exist in any ODF
spec.
For backward compatibility with previous OOo/LO versions, write the
wrong attribute in addition to the correct one in ODF extended mode,
even though validators complain about it (consider removing that
some years from now).
Diffstat (limited to 'xmloff/source/style/PageMasterExportPropMapper.cxx')
-rw-r--r-- | xmloff/source/style/PageMasterExportPropMapper.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index 3a1c0a080f31..ba0f45b34506 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -360,7 +360,9 @@ void XMLPageMasterExportPropMapper::ContextFilter( XMLPropertyState* pPMScaleToY = NULL; XMLPropertyState* pPMStandardMode = NULL; XMLPropertyState* pPMGridBaseWidth = NULL; + // same as pPMGridSnapTo but for backward compatibility only XMLPropertyState* pPMGridSnapToChars = NULL; + XMLPropertyState* pPMGridSnapTo = NULL; XMLPropertyState* pPrint = NULL; @@ -421,6 +423,7 @@ void XMLPageMasterExportPropMapper::ContextFilter( case CTF_PM_STANDARD_MODE: pPMStandardMode = pProp; break; case CTP_PM_GRID_BASE_WIDTH: pPMGridBaseWidth = pProp; break; case CTP_PM_GRID_SNAP_TO_CHARS: pPMGridSnapToChars = pProp; break; + case CTP_PM_GRID_SNAP_TO: pPMGridSnapTo = pProp; break; } if (nPrintId == CTF_PM_PRINTMASK) { @@ -436,6 +439,10 @@ void XMLPageMasterExportPropMapper::ContextFilter( lcl_RemoveState(pPMGridBaseWidth); if( pPMGridSnapToChars ) lcl_RemoveState(pPMGridSnapToChars); + if (pPMGridSnapTo) + { + lcl_RemoveState(pPMGridSnapTo); + } } if( pPMGridBaseWidth && pPMStandardMode ) |