diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-10-04 09:57:57 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-10-04 13:29:36 +0200 |
commit | 54204d53eb4854715500edc064123e8d687381b2 (patch) | |
tree | 00a338064899077e8a0ce00ec961cd283d6572c4 /sw/source | |
parent | 6ed7696c35599068a29af355da1173416a4e7196 (diff) |
tdf#120287 sw layout, TabOverMargin: imply PrinterIndependentLayout=high-res
In case an ODT document has the usual layout compat flags enabled (by
the DOC/DOCX/RTF imports) to emulate Word behavior, then it's expected
that Word will lay out the resulting ODT document similar to Writer.
This works most of the time, but in case exact spacing matters, it's
important that PrinterIndependentLayout is not disabled, as that doesn't
match the Word default and will result in mismatching Writer vs Word
layout.
Change-Id: I0fbe110a6417ffa5d919fb81236a60bfa1fc30f5
Reviewed-on: https://gerrit.libreoffice.org/61352
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index dd419b586119..e76ae1a787fe 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1388,6 +1388,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC bool bClippedPictures = false; bool bBackgroundParaOverDrawings = false; bool bTabOverMargin = false; + bool bTabOverMarginValue = false; bool bPropLineSpacingShrinksFirstLine = false; bool bSubtractFlysAnchoredAtFlys = false; bool bDisableOffPagePositioning = false; @@ -1478,7 +1479,10 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC else if ( pValues->Name == "BackgroundParaOverDrawings" ) bBackgroundParaOverDrawings = true; else if ( pValues->Name == "TabOverMargin" ) + { bTabOverMargin = true; + pValues->Value >>= bTabOverMarginValue; + } else if ( pValues->Name == "PropLineSpacingShrinksFirstLine" ) bPropLineSpacingShrinksFirstLine = true; else if (pValues->Name == "SubtractFlysAnchoredAtFlys") @@ -1639,6 +1643,14 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC if ( !bTabOverMargin ) xProps->setPropertyValue("TabOverMargin", makeAny( false ) ); + if (bTabOverMarginValue) + // Let TabOverMargin imply the new default for + // PrinterIndependentLayout, knowing the first is set by Word import + // filters and Word defaults to our new default as well. + xProps->setPropertyValue( + "PrinterIndependentLayout", + uno::Any(static_cast<sal_Int16>(document::PrinterIndependentLayout::HIGH_RESOLUTION))); + if (!bPropLineSpacingShrinksFirstLine) xProps->setPropertyValue("PropLineSpacingShrinksFirstLine", makeAny(false)); |