Bug 146458 - Opening typographic quotation mark always gets separate <text:span> tag when inside text box/shape
Summary: Opening typographic quotation mark always gets separate <text:span> tag when ...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-28 17:27 UTC by phv
Modified: 2023-10-14 21:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Issue with typographic quotation marks (29.56 KB, application/vnd.oasis.opendocument.text)
2022-01-19 17:29 UTC, phv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description phv 2021-12-28 17:27:28 UTC
Description:
When a text inside a text box/shape contains an opening typographic (also called typeset, curved or smart) quotation mark, LibreOffice Writer cuts this element out of the sentence with a specific <text:span> text attribut.

Steps to Reproduce:
1. In LibreOffice Writer, create a text box containing some text with an opening typographic quotation mark (“ or ‘).
Example: “Hello World!”.
2. Modify the font for all text inside the box so the sentence has now the text tag <text:span>.
3. Save the document as Flat XML (fodt).
4. Take a look at the code inside the document.

Actual Results:
The opening typographic quotation mark and the rest of the sentence are in two separate text tags <text:span> even though the style is the same.
Example: <text:span text:style-name="T1">“</text:span><text:span text:style-name="T1">Hello Word”</text:span>

Expected Results:
The opening typographic quotation mark and the rest of the sentence should be in the same text tag <text:span>.
Example: <text:span text:style-name="T1">“Hello Word”</text:span>


Reproducible: Always


User Profile Reset: Yes



Additional Info:
This issue occurs only for the opening quotation mark inside a text box/shape; the ending quotation mark is not affected. I tested some other type of quotation marks (typewriter quotation marks and French guillemets) and they are not affected. Also the bug does not compromise the text rendering.

But something seems to dissociate this particular character when applying the text tag related to character style.
Comment 1 Dieter 2022-01-13 18:40:20 UTC
As far as I can see, this is not related to text boxes / frames

I could reproduce it with following steps:
1. Open a new document
2. Typ: "Hello World"
3. Save (it doesn't matter, if you save it as fodt-file or "normal" odt-file)
4. Open fodt-file and content.xml (odt-file) in editor.

Tested with

Version: 7.2.5.2 (x64) / LibreOffice Community
Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

phv, could you please retest without textbox / frame?
=> NEEDINFO

Since I'm not a developer, I can't assess for 100%, if this is a bug or not.
Comment 2 phv 2022-01-13 20:36:26 UTC
I only manage to reproduce the bug by following my steps. Which require that:
- the paragraph is in a textbox (or a shape);
- the paragraph begins with an opening typographic quotation mark;
- a direct style is applied on the text containing this mark.

In this case, there is 100% success: the character of the opening typographic quotation mark gets a separate tag after saving.

It doesn't seem to be an issue if:
- the paragraph is not in a textbox;
- or the opening typographic quotation mark is not at the beginning of the paragraph;
- or no direct style is applied to the text containing this mark.

There is therefore an issue when this particular glyph is the first character of a paragraph. No matter the font, the paragraph style or the direct style.

I just noticed that this also happens with the closing typographic quotation mark. Could the AutoCorrect tool interferes when saving? Then why does it only happen at the beginning of the paragraph inside a textbox?
Comment 3 phv 2022-01-19 17:29:31 UTC
Created attachment 177655 [details]
Issue with typographic quotation marks

I add a fodt document containing the exact same text but written with different quotation marks. Reading the code, it's clear that the typographic opening quotation mark gets special treatment.
Comment 4 phv 2022-07-15 10:31:52 UTC
The bug is still present in LibreOfficeDev 7.5. I tested exporting the same document in XML format from Microsoft Word and the opening typographic quotation mark inside text box does not get a separate tag when saving. So this issue is specific to LibreOffice.

Since the report has been confirmed by another user, I would appreciate if someone could change its status to NEW. Thank you.
Comment 5 Michael Warner 2022-07-15 15:22:32 UTC
This sounds like it may be another instance of Bug 142443. Even if not that, there are many other bug reports about extraneous span elements in any kind of XML or HTML-based export, so this is likely a duplicate of something.