diff options
author | László Németh <nemeth@numbertext.org> | 2024-04-10 12:27:38 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2024-04-11 10:20:41 +0200 |
commit | 6e8819f29b6051a0e551d77512830539913ec277 (patch) | |
tree | 0b1db7dca582745986374695fade6a7a8ba42b49 /cui/uiconfig | |
parent | d890c27b670aa2fcd06a40021ddf6a5b44714a49 (diff) |
tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type
Support XSL attribute "column" and CSS 4 attribute "spread",
stored in loext:hyphenation-keep-type, to give better control
over hyphenation-keep. E.g. spread: both parts of a hyphenated
word shall lie within a single spread, i.e. when the next page
is not visible at the same time (e.g. the next page is not a
right page of a book).
– css::style::ParaHyphenationKeep is a boolean property now,
importing hyphenation-keep = "page" as true.
– type of ParaHyphenationKeep, including the new non-ODF types
is stored in the new ParagraphProperties::ParaHyphenationKeepType.
– default value of ParaHyphenationKeepType is COLUMN for
interoperability.
– Add checkboxes to Text Flow -> Hyphenation Across in
paragraph dialog:
* Column (previously: Hyphenate across column and page)
* Page
* Spread
– enabling/disabling them follows XSL/CSS 4/loext, i.e.
possible combinations:
* No Hyphenation across
(hyphenation-keep = "page" and loext:hyphenation-keep-type = "column")
* Hyphenation across [x] Column
(hyphenation-keep = "page" and loext:hyphenation-keep-type = "page")
* Hyphenation across [x] Column [x] Page
(hyphenation-keep = "page" and loext:hyphenation-keep-type = "spread")
* Hyphenation across [x] Column [x] Page [x] Spread
(hyphenation-keep = "auto")
– Add ODF import/export
– Update DOCX import
– Add ODF unit tests
Note: recent implementation depends on widow settings: disabling widow
handling allows hyphenation across columns and pages not only in table
cells.
Note: RTF import-only, but not used bPageEnd has been renamed to bKeep.
Depending on the RTF test results, likely it will need to disable
the layout change, e.g. GetKeepType()=ParagraphHyphenationKeepType::AUTO,
if PageEnd uses obsolete hyphenation rule, i.e. shifting only the
hyphenated word to the next page, not the full line.
More information:
– 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).
Follow-up to commit 9574a62add8e4901405e12117e75c86c2d2c2f21
"tdf#132599 cui offapi sw xmloff: implement hyphenate-keep" and
commit c8ee0e8f581b8a6e41b1a6b8aa4d40b442c1d463
"tdf160518 DOCX: import hyphenation-keep to fix layout".
Change-Id: I3ac6d9e86d0ed1646f105de8607c0e8ebc534eaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165954
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'cui/uiconfig')
-rw-r--r-- | cui/uiconfig/ui/textflowpage.ui | 105 |
1 files changed, 95 insertions, 10 deletions
diff --git a/cui/uiconfig/ui/textflowpage.ui b/cui/uiconfig/ui/textflowpage.ui index 1bcee0488950..3504d7988840 100644 --- a/cui/uiconfig/ui/textflowpage.ui +++ b/cui/uiconfig/ui/textflowpage.ui @@ -348,18 +348,27 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="checkKeep"> - <property name="label" translatable="yes" context="textflowpage|checkKeep">Hyphenate _across column and page</property> + <!-- n-columns=2 n-rows=1 --> + <object class="GtkGrid" id="gridHyphenAcrossLabel"> <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="use-underline">True</property> - <property name="inconsistent">True</property> - <property name="draw-indicator">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="checkKeep-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="textflowpage|extended_tip|checkKeep">Deselect this check box, if you don't want to hyphenate across column and page.</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> + <child> + <object class="GtkLabel" id="labelHyphenAcross"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="textflowpage|labelHyphenAcross">Hyphenation across</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">labelHyphenAcross</property> + <property name="xalign">0</property> </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> </child> </object> <packing> @@ -368,6 +377,82 @@ <property name="width">2</property> </packing> </child> + <child> + <!-- n-columns=2 n-rows=1 --> + <object class="GtkGrid" id="gridHyphenAcross"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> + <child> + <object class="GtkCheckButton" id="checkAcrossColumn"> + <property name="label" translatable="yes" context="textflowpage|checkAcrossColumn">Column</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="inconsistent">True</property> + <property name="draw-indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="checkAcrossColumn-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="textflowpage|extended_tip|checkAcrossColumn">Deselect this check box, if you don't want to hyphenate across column, page and spread.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkAcrossPage"> + <property name="label" translatable="yes" context="textflowpage|checkAcrossPage">Page</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="inconsistent">True</property> + <property name="draw-indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="checkAcrossPage-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="textflowpage|extended_tip|checkAcrossPage">Deselect this check box, if you don't want to hyphenate across page and spread.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkAcrossSpread"> + <property name="label" translatable="yes" context="textflowpage|checkAcrossSpread">Spread</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="inconsistent">True</property> + <property name="draw-indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="checkAcrossSpread-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="textflowpage|extended_tip|checkAcrossSpread">Deselect this check box, if you don't want to hyphenate across spread.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">11</property> + <property name="width">2</property> + </packing> + </child> </object> </child> <child type="label"> |