summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout/layout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/layout/layout.cxx')
-rw-r--r--sw/qa/extras/layout/layout.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 59ee1706ffa2..b98cb3e8cc50 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -22,6 +22,7 @@
#include <editeng/fontitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/postitem.hxx>
+#include <editeng/unolingu.hxx>
#include <fmtanchr.hxx>
#include <fmtfsize.hxx>
#include <fmtcntnt.hxx>
@@ -3556,6 +3557,20 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf105481)
CPPUNIT_ASSERT_LESSEQUAL(nTxtBottom, nFormula2Bottom);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf121658)
+{
+ uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator();
+ if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString())))
+ return;
+
+ createDoc("tdf121658.odt");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+
+ // Only 2 hyphenated words should appear in the document (in the lowercase words).
+ // Uppercase words should not be hyphenated.
+ assertXPath(pXmlDoc, "//Special[@nType='PortionType::Hyphen']", 2);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */