summaryrefslogtreecommitdiff
path: root/writerfilter/source/filter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-06-03 13:38:33 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-06-08 15:23:29 +0200
commita2d8a737f41cbb0ed8a51a99b1c233b25e433d1c (patch)
treeccdd9e7607b7b0d08aff136181132009b0775a79 /writerfilter/source/filter
parentc4c8202359e574bce784f6b40ce95e49e983c7bb (diff)
tdf#142404 DOCX c15: add compat flag TabOverSpacing
DOCX in 2013 (compatibilityMode 15) no longer supports TabOverMargin (i.e. the text margin), but it does a similar kind of thing if the tab goes into the spacing-after of a paragraph. So add a compat flag to handle this in-between kind of situation. I grepped -i "tab_*over_*margin" to see if I was missing anything. Decimal/Center proved to be only tabOverMargin. IsInSect shouldn't matter since it fits inside the printing range. The other places where I didn't insert TabOverSpacing didn't seem relevant based on a code read. Tab-after-tab still doesn't work great, but what we have is already a massive house of cards that will just collapse if changed. No real provision for handling tabs-over-paragraph-end. -auto-tabs are created instead of "beyond nMyRight" tab, unless it is the first tab defined. -doesn't allow auto-tabs to fill the remaining space. But on the other hand, MS Word's implementation of tabs follows some kind of incomprehensible bizarre logic, so just ignore the tabs completely, please. Change-Id: I3723107b29ec3e287ea8661544711c13eee3ca48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116667 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter/source/filter')
-rw-r--r--writerfilter/source/filter/WriterFilter.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx
index 55bb89f1e21b..f665fbdc29a6 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -319,6 +319,11 @@ void WriterFilter::setTargetDocument(const uno::Reference<lang::XComponent>& xDo
xSettings->setPropertyValue("InvertBorderSpacing", uno::makeAny(true));
xSettings->setPropertyValue("CollapseEmptyCellPara", uno::makeAny(true));
xSettings->setPropertyValue("TabOverflow", uno::makeAny(true));
+ // tdf#142404 TabOverSpacing (new for compatiblityMode15/Word2013+) is a subset of TabOverMargin
+ // (which applied to DOCX <= compatibilityMode14).
+ // TabOverMargin looks at tabs beyond the normal text area,
+ // while TabOverSpacing only refers to a tab beyond the paragraph margin.
+ xSettings->setPropertyValue("TabOverSpacing", uno::makeAny(true));
xSettings->setPropertyValue("UnbreakableNumberings", uno::makeAny(true));
xSettings->setPropertyValue("FloattableNomargins", uno::makeAny(true));