diff options
author | László Németh <nemeth@numbertext.org> | 2022-05-26 09:09:38 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2022-05-26 16:37:02 +0200 |
commit | 8c018910ae4d8701b1ce2a95727b9baed4016da3 (patch) | |
tree | e0155b8a29d3b60cd78dd98c8bcf57df612d477a /xmloff | |
parent | ec694a32ea6c9f0287e8c12f4de62047abfcde72 (diff) |
tdf#149248 sw offapi xmloff: add option to not hyphenate last word
Add option to disable automatic hyphenation of the last word of
paragraphs for better typography.
Note: the same option used e.g. in Adobe InDesign, and a
similar one in CSS Text Module Level 4 (hyphenate-limit-last).
* Add checkbox to Text Flow in paragraph dialog
* Store property in paragraph model (com::sun::star::style::ParagraphProperties::ParaHyphenationNoLastWord)
* Add ODF import/export
* Add ODF unit test
* Add layout test
Follow-up to commit 72bd0df107ee47c4d54fa88b4960d32ea03e9f69
"tdf#121658 Add option to not hyphenate words in CAPS".
Change-Id: Ida29c65b5a7cbfd7c399c342781531a6fb86f639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134985
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/txtprmap.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/token/tokens.txt | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 949178c67f09..34371453c815 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -1064,6 +1064,7 @@ namespace xmloff::token { TOKEN( "hyphenation-push-char-count", XML_HYPHENATION_PUSH_CHAR_COUNT ), TOKEN( "hyphenation-remain-char-count", XML_HYPHENATION_REMAIN_CHAR_COUNT ), TOKEN( "hyphenation-no-caps", XML_HYPHENATION_NO_CAPS ), + TOKEN( "hyphenation-no-last-word", XML_HYPHENATION_NO_LAST_WORD ), TOKEN( "i", XML_I ), TOKEN( "icon", XML_ICON ), TOKEN( "icon-set", XML_ICON_SET ), diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index ce09a85c917a..b116b16c836e 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -343,6 +343,7 @@ XMLPropertyMapEntry const aXMLParaPropMap[] = MT_E( "ParaHyphenationMaxTrailingChars",FO, HYPHENATION_PUSH_CHAR_COUNT, XML_TYPE_NUMBER16_NO_ZERO, 0 ), MP_E( "ParaHyphenationMaxHyphens", FO, HYPHENATION_LADDER_COUNT, XML_TYPE_NUMBER16_NONE, 0 ), MAP_EXT( "ParaHyphenationNoCaps", XML_NAMESPACE_LO_EXT, XML_HYPHENATION_NO_CAPS, XML_TYPE_BOOL|XML_TYPE_PROP_TEXT, 0 ), + MAP_EXT( "ParaHyphenationNoLastWord", XML_NAMESPACE_LO_EXT, XML_HYPHENATION_NO_LAST_WORD, XML_TYPE_BOOL|XML_TYPE_PROP_TEXT, 0 ), // RES_PARATR_DROP MP_E( "DropCapWholeWord", STYLE, LENGTH, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_DROPCAPWHOLEWORD ), MP_E( "DropCapCharStyleName", STYLE, STYLE_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_DROPCAPCHARSTYLE ), diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt index 04b8b62de5d3..cc365e61d3a0 100644 --- a/xmloff/source/token/tokens.txt +++ b/xmloff/source/token/tokens.txt @@ -964,6 +964,7 @@ hyphenation-ladder-count hyphenation-push-char-count hyphenation-remain-char-count hyphenation-no-caps +hyphenation-no-last-word i icon icon-set |