diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-11-28 11:13:44 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2019-12-07 19:58:33 +0100 |
commit | ad86ebb1f86f6347ccb9bbe40b0ca080562cbae8 (patch) | |
tree | b598bad7d2ae57861cc57cd81271bd96b9aa9929 /writerfilter | |
parent | e000187243b9b90f9c8c9110fcd9a82c01ba0fe7 (diff) |
tdf#121658 Add option to not hyphenate words in CAPS
* Add checkbox to pagraph dialog
* Store property in paragraph model
* Move docx import/export from grabbag to paragraph model
* Add ODF import/export
* Add ODF unit test
* Add layout test
Change-Id: Id4e7c5a0ad145c042f862995d227c31ae2aa0abd
Reviewed-on: https://gerrit.libreoffice.org/83979
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 72bd0df107ee47c4d54fa88b4960d32ea03e9f69)
Reviewed-on: https://gerrit.libreoffice.org/84620
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/PropertyIds.cxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyIds.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/SettingsTable.cxx | 7 |
3 files changed, 8 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 8667929183e2..0d5740e9fa83 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -91,6 +91,7 @@ OUString getPropertyName( PropertyIds eId ) case PROP_PARA_CONTEXT_MARGIN: sName = "ParaContextMargin"; break; case PROP_PARA_BOTTOM_MARGIN: sName = "ParaBottomMargin"; break; case PROP_PARA_IS_HYPHENATION: sName = "ParaIsHyphenation"; break; + case PROP_PARA_HYPHENATION_NO_CAPS: sName = "ParaHyphenationNoCaps"; break; case PROP_PARA_LINE_NUMBER_COUNT: sName = "ParaLineNumberCount"; break; case PROP_PARA_IS_HANGING_PUNCTUATION: sName = "ParaIsHangingPunctuation"; break; case PROP_PARA_LINE_SPACING: sName = "ParaLineSpacing"; break; diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index ce44a1520e6d..a1a0c8f851a1 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -225,6 +225,7 @@ enum PropertyIds ,PROP_PARA_FIRST_LINE_INDENT ,PROP_PARA_IS_HANGING_PUNCTUATION ,PROP_PARA_IS_HYPHENATION + ,PROP_PARA_HYPHENATION_NO_CAPS ,PROP_PARA_KEEP_TOGETHER ,PROP_PARA_LAST_LINE_ADJUST ,PROP_PARA_LEFT_MARGIN diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx index 05f655675e66..7852547945e7 100644 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -722,7 +722,7 @@ void SettingsTable::ApplyProperties(uno::Reference<text::XTextDocument> const& x // Auto hyphenation: turns on hyphenation by default, <w:suppressAutoHyphens/> may still disable it at a paragraph level. // Situation is similar for RTF_WIDOWCTRL, which turns on widow / orphan control by default. - if (m_pImpl->m_bAutoHyphenation || m_pImpl->m_bWidowControl) + if (m_pImpl->m_bAutoHyphenation || m_pImpl->m_bNoHyphenateCaps || m_pImpl->m_bWidowControl) { uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xDoc, uno::UNO_QUERY); if (!xStyleFamiliesSupplier.is()) @@ -737,6 +737,11 @@ void SettingsTable::ApplyProperties(uno::Reference<text::XTextDocument> const& x uno::Reference<beans::XPropertySet> xPropertySet(xDefault, uno::UNO_QUERY); xPropertySet->setPropertyValue("ParaIsHyphenation", uno::makeAny(true)); } + if (m_pImpl->m_bNoHyphenateCaps) + { + uno::Reference<beans::XPropertySet> xPropertySet(xDefault, uno::UNO_QUERY); + xPropertySet->setPropertyValue("ParaHyphenationNoCaps", uno::makeAny(true)); + } if (m_pImpl->m_bWidowControl && lcl_isDefault(xPropertyState, "ParaWidows") && lcl_isDefault(xPropertyState, "ParaOrphans")) { uno::Reference<beans::XPropertySet> xPropertySet(xDefault, uno::UNO_QUERY); |