Bug 126635 - HYPHENATION: Writer doesn't break the line correctly after closing double quotation mark and semicolon
Summary: HYPHENATION: Writer doesn't break the line correctly after closing double quo...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Hyphenation
  Show dependency treegraph
 
Reported: 2019-07-31 07:47 UTC by João Paulo
Modified: 2024-06-14 18:02 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
PDF showing how Writer incorrectly breaks the line and how it should have been broken (31.89 KB, application/pdf)
2019-07-31 07:49 UTC, João Paulo
Details
Source ODT for the attached PDF. (17.83 KB, application/vnd.oasis.opendocument.text)
2019-07-31 07:51 UTC, João Paulo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description João Paulo 2019-07-31 07:47:20 UTC
Description:
After ending a sentence with '“<reference to a heading>”;' (remove the single quotation marks), the line is broken after the ending double quotation mark, but before the semicolon (which becomes alone on the new line). The last word inside the <reference to a heading> should go to the next line with the closing quotation mark and the semicolon.

I created a sample PDF that shows the 1st sentence with the error and the 2nd sentence shows how it should have been formatted by Writer.

I also attached the source ODT file for examining. The font used to format it is Merriweather Sans, which can be obtained at "https://www.fontsquirrel.com/fonts/merriweather-sans".


Steps to Reproduce:
1. Create some heading with several words. The last word should not have an hyphen (for example it should be "word" and not "hyphenated-word").
2. Create a new paragraph and type some text. For example, it could be: This is some text that goes before the cross-reference
3. Go to Menu Insert, Cross-reference, Cross-references, select the "Type" "Headings", select the "Insert reference to" "Reference", select the created heading and select the button "Insert".
4. Insert the intelligent quotation marks surrounding the cross-reference you inserted.
5. Type ";" (without the quotation marks) after the closing curly quotation mark. It should be like this: “This is the reference that will be used for the test”;
6. If the line is not broken after the closing quotation mark (”) and before the semicolon (;), type a few letters before the inserted cross-reference until the line is broken incorrectly.

Actual Results:
The line is broken on the wrong place (after the closing quotation mark and before the semicolon).

Expected Results:
The line break should go before the last word, which should go to the next line along with the closing quotation mark and semicolon.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Tested with:

Version: 6.1.6.3
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: pt-BR (pt_BR); Calc: CL

Also tested with:

Versão: 6.2.5.2 (x64)
ID de compilação: 1ec314fa52f458adc18c4f025c545a4e8b22c159
Threads da CPU:8; SO:Windows 10.0; Realizador da interface: padrão; VCL: win; 
Local: pt-BR (pt_BR); Idioma de IU: pt-BR
Calc: threaded

Also tested with OpenGL enabled and disabled (it happens whether always).
Comment 1 João Paulo 2019-07-31 07:49:17 UTC
Created attachment 153064 [details]
PDF showing how Writer incorrectly breaks the line and how it should have been broken
Comment 2 João Paulo 2019-07-31 07:51:07 UTC
Created attachment 153065 [details]
Source ODT for the attached PDF.
Comment 3 João Paulo 2019-07-31 07:52:06 UTC
Comment on attachment 153065 [details]
Source ODT for the attached PDF.

 It needs the font at "https://www.fontsquirrel.com/fonts/merriweather-sans" to show the bug correctly, even if there are other missing fonts.
Comment 4 Dieter 2019-08-28 07:31:40 UTC
I can't confirm it (using your document from comment 3) with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 3e64065612acec2eb29aa21e2b515953422256d7
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-08-15_22:57:26
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

and also not with

Version: 6.2.5.2 (x64)
Build-ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159
CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded
Comment 5 João Paulo 2020-02-21 22:39:28 UTC
(In reply to Dieter from comment #4)
> I can't confirm it (using your document from comment 3) with

Dieter, have you tried installing the font on Comment 3 or just opened the document on Comment 3?
Comment 6 Dieter 2020-02-22 16:44:46 UTC
(In reply to João Paulo from comment #5)
> (In reply to Dieter from comment #4)
> > I can't confirm it (using your document from comment 3) with
> 
> Dieter, have you tried installing the font on Comment 3 or just opened the
> document on Comment 3?

I can't remember, but when I tried it again I got the message that extension for portugues language is missing on my system. I couldn't find an extension for LO 6. So perhaps it's not a problem of LO on general. => Component "Linguistic"
Comment 7 Dieter 2020-02-22 16:45:46 UTC
Additional information: I used Merriweather Sans.
Comment 8 Buovjaga 2020-05-10 14:30:33 UTC
(In reply to Dieter from comment #6)
> (In reply to João Paulo from comment #5)
> > (In reply to Dieter from comment #4)
> > > I can't confirm it (using your document from comment 3) with
> > 
> > Dieter, have you tried installing the font on Comment 3 or just opened the
> > document on Comment 3?
> 
> I can't remember, but when I tried it again I got the message that extension
> for portugues language is missing on my system. I couldn't find an extension
> for LO 6. So perhaps it's not a problem of LO on general. => Component
> "Linguistic"

João: can you tell us which pt-BR dictionary we should install?
Comment 9 João Paulo 2020-05-12 23:55:52 UTC
Hi Buovjaga!  I used the default Brazilian Portuguese as it is packaged on Windows Installer package (the LibreOffice_6.4.3_Win_x64.msi file).

If you want to reproduce exactly my installed LibreOffice on Windows 10, you can run the following line on Windows Command Prompt:

MsiExec.exe /Package LibreOffice_6.4.3_Win_x64.msi /Passive /NoRestart ADDLOCAL=ALL CREATEDESKTOPLINK=0 QUICKSTART=0 REGISTER_NO_MSO_TYPES=1 REMOVE=gm_o_Xsltfiltersamples,gm_o_Pyuno_LibreLogo,gm_o_Quickstart,gm_o_Activexcontrol,gm_Reportbuilder,gm_o_Extensions,gm_r_ex_Dictionary_Af,gm_r_ex_Dictionary_An,gm_r_ex_Dictionary_Ar,gm_r_ex_Dictionary_Be,gm_r_ex_Dictionary_Bg,gm_r_ex_Dictionary_Bn,gm_r_ex_Dictionary_Pt_Pt,gm_r_ex_Dictionary_Br,gm_r_ex_Dictionary_Bs,gm_r_ex_Dictionary_Ca,gm_r_ex_Dictionary_Bo,gm_r_ex_Dictionary_Cs,gm_r_ex_Dictionary_Da,gm_r_ex_Dictionary_Nl,gm_r_ex_Dictionary_En,gm_r_ex_Dictionary_Et,gm_r_ex_Dictionary_Fr,gm_r_ex_Dictionary_Gd,gm_r_ex_Dictionary_Gl,gm_r_ex_Dictionary_Gu,gm_r_ex_Dictionary_De,gm_r_ex_Dictionary_He,gm_r_ex_Dictionary_Hi,gm_r_ex_Dictionary_Hu,gm_r_ex_Dictionary_Hr,gm_r_ex_Dictionary_It,gm_r_ex_Dictionary_Is,gm_r_ex_Dictionary_Lt,gm_r_ex_Dictionary_Lo,gm_r_ex_Dictionary_Lv,gm_r_ex_Dictionary_Ne,gm_r_ex_Dictionary_No,gm_r_ex_Dictionary_Oc,gm_r_ex_Dictionary_Pl,gm_r_ex_Dictionary_Ro,gm_r_ex_Dictionary_Ru,gm_r_ex_Dictionary_Si,gm_r_ex_Dictionary_Sq,gm_r_ex_Dictionary_Sr,gm_r_ex_Dictionary_Sk,gm_r_ex_Dictionary_Sl,gm_r_ex_Dictionary_El,gm_r_ex_Dictionary_Es,gm_r_ex_Dictionary_Sv,gm_r_ex_Dictionary_Te,gm_r_ex_Dictionary_Th,gm_r_ex_Dictionary_Uk,gm_r_ex_Dictionary_Vi,gm_r_ex_Dictionary_Zu,gm_Langpack_r_af,gm_Langpack_r_am,gm_Langpack_r_ar,gm_Langpack_r_as,gm_Langpack_r_ast,gm_Langpack_r_be,gm_Langpack_r_bg,gm_Langpack_r_bn,gm_Langpack_r_bn_IN,gm_Langpack_r_bo,gm_Langpack_r_br,gm_Langpack_r_brx,gm_Langpack_r_bs,gm_Langpack_r_ca,gm_Langpack_r_ca_valencia,gm_Langpack_r_cs,gm_Langpack_r_cy,gm_Langpack_r_da,gm_Langpack_r_de,gm_Langpack_r_dgo,gm_Langpack_r_dsb,gm_Langpack_r_dz,gm_Langpack_r_el,gm_Langpack_r_en_GB,gm_Langpack_r_en_US,gm_Langpack_r_en_ZA,gm_Langpack_r_eo,gm_Langpack_r_es,gm_Langpack_r_et,gm_Langpack_r_eu,gm_Langpack_r_fa,gm_Langpack_r_fi,gm_Langpack_r_fr,gm_Langpack_r_ga,gm_Langpack_r_gd,gm_Langpack_r_gl,gm_Langpack_r_gu,gm_Langpack_r_gug,gm_Langpack_r_he,gm_Langpack_r_hi,gm_Langpack_r_hr,gm_Langpack_r_hsb,gm_Langpack_r_hu,gm_Langpack_r_id,gm_Langpack_r_is,gm_Langpack_r_it,gm_Langpack_r_ja,gm_Langpack_r_ka,gm_Langpack_r_kk,gm_Langpack_r_km,gm_Langpack_r_kmr_Latn,gm_Langpack_r_kn,gm_Langpack_r_ko,gm_Langpack_r_kok,gm_Langpack_r_ks,gm_Langpack_r_lb,gm_Langpack_r_lb,gm_Langpack_r_lo,gm_Langpack_r_lt,gm_Langpack_r_lv,gm_Langpack_r_mai,gm_Langpack_r_mk,gm_Langpack_r_ml,gm_Langpack_r_mn,gm_Langpack_r_mni,gm_Langpack_r_mr,gm_Langpack_r_my,gm_Langpack_r_nb,gm_Langpack_r_ne,gm_Langpack_r_nl,gm_Langpack_r_nn,gm_Langpack_r_nr,gm_Langpack_r_nso,gm_Langpack_r_oc,gm_Langpack_r_om,gm_Langpack_r_or,gm_Langpack_r_pa_IN,gm_Langpack_r_pl,gm_Langpack_r_pt,gm_Langpack_r_ro,gm_Langpack_r_ru,gm_Langpack_r_rw,gm_Langpack_r_sa_IN,gm_Langpack_r_sat,gm_Langpack_r_sd,gm_Langpack_r_si,gm_Langpack_r_sid,gm_Langpack_r_sk,gm_Langpack_r_sl,gm_Langpack_r_sq,gm_Langpack_r_sr,gm_Langpack_r_sr_Latn,gm_Langpack_r_ss,gm_Langpack_r_st,gm_Langpack_r_sv,gm_Langpack_r_sw_TZ,gm_Langpack_r_szl,gm_Langpack_r_ta,gm_Langpack_r_te,gm_Langpack_r_tg,gm_Langpack_r_th,gm_Langpack_r_tn,gm_Langpack_r_tr,gm_Langpack_r_ts,gm_Langpack_r_tt,gm_Langpack_r_ug,gm_Langpack_r_uk,gm_Langpack_r_uz,gm_Langpack_r_ve,gm_Langpack_r_vec,gm_Langpack_r_vi,gm_Langpack_r_xh,gm_Langpack_r_zh_CN,gm_Langpack_r_zh_TW,gm_Langpack_r_zu,gm_Langpack_r_kab,gm_Langpack_r_fy,gm_r_ex_Dictionary_Id

This is a single line and can be used for both the 32 bits or the 64 bits version of LibreOffice, and it installs everything and then remove unneeded components, so it will be left only the Brazilian Portuguese interface (you may modify the setup going to Control Panel\Add or Remove Programs to add your native language).  I got this info from https://wiki.documentfoundation.org/Deployment_and_Migration#Feature and tweaked for my needs.
Comment 10 Ming Hua 2020-05-13 01:47:22 UTC
I can reproduce with attached ODT example in 6.4.4 RC1 (all language packs installed):
版本: 6.4.4.1 (x64)
Build ID: b50bc319eca5cd5b66fbfe2ebd0d3bd1eed099b5
CPU 线程: 2; 操作系统: Windows 10.0 Build 18363; UI 渲染: 默认; VCL: win; 
区域语言: zh-CN (zh_CN); UI 语言: zh-CN
Calc: threaded

So looks like something is buggy with the Portuguese hyphenizer.

By the way I don't need to install the specific Merriweather Sans font, just adding random words earlier in the paragraph to change text length will trigger this bug.
Comment 11 Ming Hua 2020-05-13 02:17:17 UTC
Also reproduced with 5.2.7 (the oldest version I have installed):
Version: 5.2.7.2 (x64)
Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
CPU Threads: 2; OS Version: Windows 6.19; UI Render: default; 
Locale: zh-CN (zh_CN); Calc: group
Comment 12 QA Administrators 2022-05-14 03:41:44 UTC Comment hidden (obsolete)
Comment 13 João Paulo 2022-08-27 06:20:20 UTC
Tested on:

Version: 7.4.0.3 (x64) / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: pt-BR (pt_BR); UI: pt-BR
Calc: threaded

It seems fixed.
Comment 14 João Paulo 2024-03-01 19:37:12 UTC
I am reopening this bug, as it is not fixed as I thought before.

I believe that when we use cross-references or any fields containing texts, the double quotation mark is somehow "glued" to the field, but the semi-colon goes to the next line, instead of Writer breaking the line before the last sillable.

Just open the "Source ODT" file attached to this bug and you'll see the result is still the same as the PDF attached.