diff options
author | László Németh <nemeth@numbertext.org> | 2024-02-29 14:07:34 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2024-03-04 23:39:51 +0100 |
commit | 9574a62add8e4901405e12117e75c86c2d2c2f21 (patch) | |
tree | 519ec81796776b97d2ea72f3a0f08c344c1779c2 /svx | |
parent | 2eba8bb8d43d39eb229a81947907e70f50859a76 (diff) |
tdf#132599 cui offapi sw xmloff: implement hyphenate-keep
Both parts of a hyphenated word shall lie within a single
page with ODF paragraph setting fo:hyphenation-keep="page".
The implementation follows the default page layout of
MSO 2016 and newer by shifting the bottom hyphenated line
to the next page (and to the next column, see last note).
Note: this is a MSO DOCX interoperability feature, used
also in DTP software, XSL and CSS.
* Add checkbox/combobox to Text Flow in paragraph dialog
* Store property in paragraph model (com::sun::star::style::ParagraphProperties::ParaHyphenationKeep)
* Add ODF import/export
* Add ODF unit tests
New constants of com::sun::star::text::ParagraphHyphenationKeepType,
containing ODF AUTO and PAGE (borrowed from XSL), and for the
planned extension ParaHyphenationKeepType of ParagraphProperties:
– COLUMN (standard XSL value, defined in
https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#hyphenation-keep)
– SPREAD and ALWAYS (CSS 4 values of hyphenate-limit-last,
equivalent of hyphenation-keep, defined in
https://www.w3.org/TR/css-text-4/#hyphenate-line-limits).
Note: the implementation truncates only a single hyphenated
line, like MSO does: the pages can end in hyphenated
lines (i.e. in the case of consecutive hyphenated lines),
but less often, than before.
Clean-up hyphenation dialog by collecting "Don't hyphenate"
options at the end of the hyphenation settings, and negating them
(similar to MSO and DTP), adding also the new option
"Hyphenate across column and page":
[x] Hyphenate words in CAPS
[x] Hyphenate last word
[x] Hyphenate across column and page
Note: ODF fo:hyphenation-keep has got only "auto" and
"page" attributes, while XSL defines also "column".
Because of the interoperability with MSO and DTP,
fo:hyphenation-keep="page" is interpreted as
XSL "column", avoiding hyphenation at the end
of column, not only at the end of page.
Change-Id: I5c6b7adc0671a5a790568e7bf1d33256e607f85f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164158
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/sdi/svxitems.sdi | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi index 6e8773315d29..f965dcc00780 100644 --- a/svx/sdi/svxitems.sdi +++ b/svx/sdi/svxitems.sdi @@ -275,6 +275,7 @@ struct SvxHyphenZone INT16 MaxHyphens MID_HYPHEN_MAX_HYPHENS; INT16 MinWordLength MID_HYPHEN_MIN_WORD_LENGTH; INT16 HyphenZone MID_HYPHEN_ZONE; + INT16 HyphenKeep MID_HYPHEN_KEEP; }; item SvxHyphenZone SvxHyphenZoneItem; |