diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-17 12:41:11 +0000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-01-18 00:38:23 +0100 |
commit | 23c099a0236062724430efb986251637095c8d4f (patch) | |
tree | 255f304eee928b5969629a5c9d30c570aff1b185 /xmloff/source/text/txtexppr.cxx | |
parent | 17b264b2269d2f1b1a9a44971a41c578c7b591fd (diff) |
Resolves: fdo#58730 workaround [UL|LR]Space 100% problem
If all paragraph margins are 100% on import, ignore that as being the implicit
default. That avoids explicit 100% being set onto the awesome [UL|LR]Space
which takes a relative propsize of 100% as a flag that its value field is
absolute and so rejected by SwTxtFmtColl::Modify as a candidate for getting its
true value initialized relative to its parent, so it ends up as an absolute 0
Always elide the property on export because writing individual
margin-foos provides better backward compatibility with older versions
anyway.
Trigged by 3c5facfce42a0dbe362d6b9fa5ac374fd76f51a1
Change-Id: I55f6ceeae287b7d8e99befa4bd3cc06738a21299
Diffstat (limited to 'xmloff/source/text/txtexppr.cxx')
-rw-r--r-- | xmloff/source/text/txtexppr.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx index ceff1d0025d6..56e36e7663f9 100644 --- a/xmloff/source/text/txtexppr.cxx +++ b/xmloff/source/text/txtexppr.cxx @@ -455,6 +455,8 @@ void XMLTextExportPropertySetMapper::ContextFilter( XMLPropertyState* pClip11State = NULL; XMLPropertyState* pClipState = NULL; + // filter fo:margin + XMLPropertyState* pAllParaMarginRel = NULL; XMLPropertyState* pAllParaMargin = NULL; XMLPropertyState* pAllMargin = NULL; @@ -572,6 +574,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( case CTF_NUMBERINGSTYLENAME: pListStyleName = propertie; break; case CTF_TEXT_CLIP11: pClip11State = propertie; break; case CTF_TEXT_CLIP: pClipState = propertie; break; + case CTF_PARAMARGINALL_REL: pAllParaMarginRel = propertie; break; case CTF_PARAMARGINALL: pAllParaMargin = propertie; break; case CTF_MARGINALL: pAllMargin = propertie; break; } @@ -625,6 +628,11 @@ void XMLTextExportPropertySetMapper::ContextFilter( lcl_checkMultiProperty(pParaBottomMarginState, pParaBottomMarginRelState); lcl_checkMultiProperty(pParaFirstLineState, pParaFirstLineRelState); + if (pAllParaMarginRel) + { // because older OOo/LO versions can't read fo:margin: + pAllParaMarginRel->mnIndex = -1; // just export individual attributes... + pAllParaMarginRel->maValue.clear(); + } if (pAllParaMargin) { pAllParaMargin->mnIndex = -1; // just export individual attributes... |