summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121658.docxbin0 -> 20859 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx8
-rw-r--r--sw/source/filter/ww8/docxexport.cxx7
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx3
-rw-r--r--writerfilter/source/dmapper/SettingsTable.cxx12
-rw-r--r--writerfilter/source/dmapper/SettingsTable.hxx1
6 files changed, 31 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121658.docx b/sw/qa/extras/ooxmlexport/data/tdf121658.docx
new file mode 100644
index 000000000000..fe42b5cde8e4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121658.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 3bafcab32d6b..352b9418d0e7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -129,6 +129,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121661, "tdf121661.docx")
assertXPath(pXmlSettings, "/w:settings/w:hyphenationZone", "val", "851");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf121658, "tdf121658.docx")
+{
+ xmlDocPtr pXmlSettings = parseExport("word/settings.xml");
+ if (!pXmlSettings)
+ return;
+ assertXPath(pXmlSettings, "/w:settings/w:doNotHyphenateCaps");
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf124367, "tdf124367.docx")
{
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 3e9c4bc5fd1b..2d04ac4986c0 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -1154,6 +1154,13 @@ void DocxExport::WriteSettings()
pFS->singleElementNS(XML_w, XML_hyphenationZone, FSNS(XML_w, XML_val),
OString::number(nHyphenationZone));
}
+ else if (rProp.Name == "NoHyphenateCaps")
+ {
+ bool bNoHyphenateCaps;
+ rProp.Value >>= bNoHyphenateCaps;
+ if (bNoHyphenateCaps)
+ pFS->singleElementNS(XML_w, XML_doNotHyphenateCaps);
+ }
}
}
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 58a9654e9bfc..16d42193ac6a 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -232,6 +232,9 @@ DomainMapper::~DomainMapper()
// Add the saved w:hypenationZone setting
aProperties["HyphenationZone"] <<= m_pImpl->GetSettingsTable()->GetHypenationZone();
+ // Add the saved w:doNotHyphenateCaps setting
+ aProperties["NoHyphenateCaps"] <<= m_pImpl->GetSettingsTable()->GetNoHyphenateCaps();
+
uno::Reference<beans::XPropertySet> xDocProps(m_pImpl->GetTextDocument(), uno::UNO_QUERY);
if (xDocProps.is())
{
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index c71850b30d0c..05f655675e66 100644
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -244,6 +244,7 @@ struct SettingsTable_Impl
bool m_bDoNotUseHTMLParagraphAutoSpacing;
bool m_bNoColumnBalance;
bool m_bAutoHyphenation;
+ bool m_bNoHyphenateCaps;
sal_Int16 m_nHyphenationZone;
bool m_bWidowControl;
bool m_bLongerSpaceSequence;
@@ -279,6 +280,7 @@ struct SettingsTable_Impl
, m_bDoNotUseHTMLParagraphAutoSpacing(false)
, m_bNoColumnBalance(false)
, m_bAutoHyphenation(false)
+ , m_bNoHyphenateCaps(false)
, m_nHyphenationZone(0)
, m_bWidowControl(false)
, m_bLongerSpaceSequence(false)
@@ -550,6 +552,9 @@ void SettingsTable::lcl_sprm(Sprm& rSprm)
case NS_ooxml::LN_CT_Settings_autoHyphenation:
m_pImpl->m_bAutoHyphenation = nIntValue;
break;
+ case NS_ooxml::LN_CT_Settings_doNotHyphenateCaps:
+ m_pImpl->m_bNoHyphenateCaps = nIntValue;
+ break;
case NS_ooxml::LN_CT_Settings_widowControl:
m_pImpl->m_bWidowControl = nIntValue;
break;
@@ -653,10 +658,17 @@ bool SettingsTable::GetProtectForm() const
{
return m_pImpl->m_bProtectForm;
}
+
+bool SettingsTable::GetNoHyphenateCaps() const
+{
+ return m_pImpl->m_bNoHyphenateCaps;
+}
+
sal_Int16 SettingsTable::GetHypenationZone() const
{
return m_pImpl->m_nHyphenationZone;
}
+
uno::Sequence<beans::PropertyValue> const & SettingsTable::GetThemeFontLangProperties() const
{
return m_pImpl->m_pThemeFontLangProps;
diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx
index 8d717c7212b0..26c69d907b35 100644
--- a/writerfilter/source/dmapper/SettingsTable.hxx
+++ b/writerfilter/source/dmapper/SettingsTable.hxx
@@ -78,6 +78,7 @@ class SettingsTable : public LoggedProperties, public LoggedTable
bool GetNoColumnBalance() const;
bool GetProtectForm() const;
bool GetLongerSpaceSequence() const;
+ bool GetNoHyphenateCaps() const;
sal_Int16 GetHypenationZone() const;
css::uno::Sequence<css::beans::PropertyValue> const & GetThemeFontLangProperties() const;