tdf#161628 DOCX import: set default hyphenation zone (1/4 inch)
Default value of hyphenationZone is 360 twips (0.25"). Apply this
value, if hyphenationZone is not defined, according to the OOXML
standard.
Follow-up to commit 5a079652c1
"tdf#149421 DOCX: import/export hyphenation zone".
Change-Id: Idadae973d93a14fbbe828fa74562db6262c40904
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169070
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
@@ -787,6 +787,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf149421, "tdf121661.docx")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECLARE_OOXMLEXPORT_TEST(testTdf149421_default, "tdf146171.docx")
|
||||||
|
{
|
||||||
|
uno::Reference<beans::XPropertySet> xStyle(getStyles(u"ParagraphStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY);
|
||||||
|
// This was 0 (not the default OOXML hyphenationZone)
|
||||||
|
CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int16>(360), getProperty<sal_Int16>(xStyle, u"ParaHyphenationZone"_ustr));
|
||||||
|
}
|
||||||
|
|
||||||
CPPUNIT_TEST_FIXTURE(Test, testTdf121658)
|
CPPUNIT_TEST_FIXTURE(Test, testTdf121658)
|
||||||
{
|
{
|
||||||
loadAndSave("tdf121658.docx");
|
loadAndSave("tdf121658.docx");
|
||||||
|
@@ -141,7 +141,7 @@ struct SettingsTable_Impl
|
|||||||
, m_bNoColumnBalance(false)
|
, m_bNoColumnBalance(false)
|
||||||
, m_bAutoHyphenation(false)
|
, m_bAutoHyphenation(false)
|
||||||
, m_bNoHyphenateCaps(false)
|
, m_bNoHyphenateCaps(false)
|
||||||
, m_nHyphenationZone(0)
|
, m_nHyphenationZone( 360 ) // default is 1/4 in
|
||||||
, m_nUseWord2013TrackBottomHyphenation(-1)
|
, m_nUseWord2013TrackBottomHyphenation(-1)
|
||||||
, m_nAllowHyphenationAtTrackBottom(-1)
|
, m_nAllowHyphenationAtTrackBottom(-1)
|
||||||
, m_bWidowControl(false)
|
, m_bWidowControl(false)
|
||||||
|
Reference in New Issue
Block a user