summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/SettingsTable.cxx
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-11-11 10:05:12 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-11 11:38:36 +0100
commit24f17f0336badfbba276c1e6713a89b4f9bb7cb8 (patch)
tree186b623027bc0edca336ae448716904b8c6436e8 /writerfilter/source/dmapper/SettingsTable.cxx
parent5e279f175289234b91f272bbbf48e70315fff5ac (diff)
tdf#128428 RTF: clean-up for longer space sequence mode
Fix regressions from commit 24b04db5a63b57a74e58a7616091437ad68548ac (tdf#123703 RTF import: fix length of space character sequence). It seems, longer space sequence is an obsolete RTF-only feature, eg. new RTF documents created in MSO don't use it, but old RTF documents still keep their layout (only in RTF). - Only old-style (without \stshfdbch) or compatible (\stshfdbch31505) RTF documents get longer space sequences using a one-time conversion; - because Writer always exports old-style RTF documents, to avoid of enlargement of space sequences of new-style RTF documents later, RTF import doesn't modify the RTF documents saved in Writer (checking \generator); - text in monospaced font "Courier New" doesn't get longer space sequence (despite its \prq2 (not monospaced) font setting). Change-Id: I308ab06db57a2db5deec1d4c4573da3317cad8e9 Reviewed-on: https://gerrit.libreoffice.org/82145 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter/source/dmapper/SettingsTable.cxx')
-rw-r--r--writerfilter/source/dmapper/SettingsTable.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index a861ac7a9ff7..c71850b30d0c 100644
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -246,6 +246,7 @@ struct SettingsTable_Impl
bool m_bAutoHyphenation;
sal_Int16 m_nHyphenationZone;
bool m_bWidowControl;
+ bool m_bLongerSpaceSequence;
bool m_bSplitPgBreakAndParaMark;
bool m_bMirrorMargin;
bool m_bDoNotExpandShiftReturn;
@@ -280,6 +281,7 @@ struct SettingsTable_Impl
, m_bAutoHyphenation(false)
, m_nHyphenationZone(0)
, m_bWidowControl(false)
+ , m_bLongerSpaceSequence(false)
, m_bSplitPgBreakAndParaMark(false)
, m_bMirrorMargin(false)
, m_bDoNotExpandShiftReturn(false)
@@ -298,9 +300,13 @@ SettingsTable::SettingsTable(const DomainMapper& rDomainMapper)
, LoggedTable("SettingsTable")
, m_pImpl( new SettingsTable_Impl )
{
- // HTML paragraph auto-spacing is opt-in for RTF, opt-out for OOXML.
if (rDomainMapper.IsRTFImport())
+ {
+ // HTML paragraph auto-spacing is opt-in for RTF, opt-out for OOXML.
m_pImpl->m_bDoNotUseHTMLParagraphAutoSpacing = true;
+ // Longer space sequence is opt-in for RTF, and not in OOXML.
+ m_pImpl->m_bLongerSpaceSequence = true;
+ }
}
SettingsTable::~SettingsTable()
@@ -547,6 +553,9 @@ void SettingsTable::lcl_sprm(Sprm& rSprm)
case NS_ooxml::LN_CT_Settings_widowControl:
m_pImpl->m_bWidowControl = nIntValue;
break;
+ case NS_ooxml::LN_CT_Settings_longerSpaceSequence:
+ m_pImpl->m_bLongerSpaceSequence = nIntValue;
+ break;
case NS_ooxml::LN_CT_Compat_doNotExpandShiftReturn:
m_pImpl->m_bDoNotExpandShiftReturn = true;
break;
@@ -753,6 +762,11 @@ sal_Int32 SettingsTable::GetWordCompatibilityMode() const
return -1; // Word compatibility mode not found
}
+bool SettingsTable::GetLongerSpaceSequence() const
+{
+ return m_pImpl->m_bLongerSpaceSequence;
+}
+
}//namespace dmapper
} //namespace writerfilter