This is translated feature request from http://listarchives.libreoffice.org/de/discuss/msg20770.html Request: Add an option to exclude a portion of text from hyphenation. There is a workaround to set the language to "none". But then you loose spell check and thesaurus. ODF 1.2 has already the suitable attribute "fo:hyphenate" in section 20.188, part 1. Currently LibreOffice does not even keep the attribute, if it is present.
Ok -> NEW
20.195 fo:hyphenate in ODF 1.3 Implementation is still missing in Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 4ac9032163cf55c160145373e7c41741c9c339ca CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: de-DE (en_US); UI: en-US Calc: CL
Next step: Proposal for UI for the new feature.
I see no difference to v1.2 20.188 fo:hyphenate. What exactly has changed? Hyphenation is enabled for whole paragraph via Text Flow > Hyphenation = Automatically. So we need this option on the character properties dialog and I suggest to have one frame labeled "Hyphenation" under Spacing containing the checkbox "[ ] Exclude from hyphenation". The topic reminds me on bug 131487 where spell-checking should be suppressed for mixed-language words. We could name the frame Options and have another checkbox there.
(In reply to Heiko Tietze from comment #4) > I see no difference to v1.2 20.188 fo:hyphenate. What exactly has changed? No content change, but section number is shifted from ODF 1.2 to ODF 1.3.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/73bd04a71e741788a2f2f3b26cc46ddb6a361372 tdf#106733 xmloff: keep fo:hyphenate in character formatting It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Description of the previous commit: tdf#106733 xmloff: keep fo:hyphenate in character formatting In the case of character formatting, map fo:hyphenate to the unused CharNoHyphenation character property to keep it during ODF import/export instead of losing it completely. This is the first step to disable hyphenation for single words or text spans in paragraphs with automatic hyphenation. Note: using fo:hyphenate as character property is part of the ODF standard. Note: the old workaround to disable hyphenation, changing the language of the text to None had got some serious fallbacks: losing spell checking and losing language-dependent text layout (supported by both OpenType and Graphite font engines in LibreOffice).
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b5e275f47a54bd7fee39dad516a433fde5be872d tdf#106733 sw: implement CharNoHyphenation It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Description of the previous commit: tdf#106733 sw: implement CharNoHyphenation Implement CharNoHyphenation character property to disable automatic hyphenation of words in paragraphs with enabled hyphenation. Fix also fo:hyphenate mapping to CharNoHyphenation using automatic inversion of their boolean values defined by xmloff's XML_TYPE_NBOOL, as suggested by Michael Stahl. Update also the test for tdf#159102 to check the available hyphenation dictionary (also custom hyphenation patterns work only with supported locales of the hyphenator). Note: patch of thints.cxx contains also partial revert of commit 53b289eabb3d265b47bc7fb6cc430291c97f0c0b "use more TypedWhichId". Follow-up to commit 73bd04a71e741788a2f2f3b26cc46ddb6a361372 "tdf#106733 xmloff: keep fo:hyphenate in character formatting".
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/05292d3fd50c64ac0b2a927334c39fe63aa3a108 tdf#106733 xmloff: keep fo:hyphenate in character formatting It will be available in 24.2.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9193e61d3e7b850b3715c848c09434e24855340b tdf#106733 sw: fix bad downcast in SwTextNode::GetLang() It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/04c92ff9cfec039f7fc03277de46d77bb3109431 tdf#106733 sw: implement CharNoHyphenation It will be available in 24.2.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/de8a6c90c7aa5d26f758a590bad955cd62251702 tdf#106733 sw: fix bad downcast in SwTextNode::GetLang() It will be available in 24.2.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 192147 [details] screenshot of the new checkbox "Exclude from hyphenation"
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/03c5a31a0f374a90fbc821718c14dc5f8a385adf tdf#106733 sw cui: add CharNoHyphenation checkbox It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Commit description: tdf#106733 sw cui: add CharNoHyphenation checkbox On Position tab of Character formatting dialog window as a new checkbox "Exclude from hyphenation" (UX design by Heiko Tietze). With this, it's possible to disable hyphenation with direct character formatting (e.g. combined with Find All), or using character styles, and setting "Exclude from hyphenation" in them. This feature is conformant to the OpenDocument standard, and unlike the previous locale=None workaround, it keeps spell checking and locale dependent text layout. Note: Clear direct formatting (Ctrl-M) is an alternative way to remove the enabled CharNoHyphenation (e.g. in version 24.2, where this commit won't be back-ported). Follow-up to commit b5e275f47a54bd7fee39dad516a433fde5be872d "tdf#106733 sw: implement CharNoHyphenation".
Created attachment 192152 [details] test document
Created attachment 193056 [details] screenshot of kept spell checking and text layout Disabled hyphenation of the word “Ökobio” in paragraph 2 and 3. Using the old workaround in paragraph 2 (modifying language of the word to [None]) resulted lost text layout and spell checking. With the new “Exclude from hyphenation” character formatting (see bottom of the dialog window) in paragraph 3, the word “Ökobio” keeps spell checking and text layout: “Ö” (O with umlaut) gets wide dots only in German because of locale dependent font features of Linux Libertine (Display G)
Created attachment 193057 [details] test file of the previous screenshot Using Linux Libertine Display G to show kept locale dependent font features.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/c2349a58a8e43f44a796f8e21053f4ca6de6fb4c tdf#106733 tdf#158885 add "Exclude from hyphenation, Compound characters...
Bug 161563 and Bug 161565 added further improvements to this feature. @Regina and all: thanks for your bug report and feedback!
*** Bug 151612 has been marked as a duplicate of this bug. ***