Bug 119638 - Text boxes copied from Draw to Writer get wrapped
Summary: Text boxes copied from Draw to Writer get wrapped
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Textbox
  Show dependency treegraph
 
Reported: 2018-09-01 20:50 UTC by Michael Zapf
Modified: 2024-11-14 09:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
The Draw source document (33.89 KB, application/vnd.oasis.opendocument.graphics)
2020-12-11 10:09 UTC, Frédéric Bisson
Details
The Writer destination document (46.47 KB, application/vnd.oasis.opendocument.text)
2020-12-11 10:09 UTC, Frédéric Bisson
Details
What it looks like in LibreOffice Writer (290.57 KB, image/png)
2020-12-11 10:10 UTC, Frédéric Bisson
Details
A drawing that looks OK in Draw but looks different (text is wrapped) when pasted in Writer (13.41 KB, application/vnd.oasis.opendocument.graphics)
2024-11-14 09:16 UTC, Panos Stokas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Zapf 2018-09-01 20:50:13 UTC
Description:
Contents of text boxes from Draw get wrapped after the text box has been pasted into a Writer document. The text box shows the same dimensions in Writer as in Draw, yet the text is wrapped. This is a nasty bug if you want to copy drawings into your text document that have many text boxes, because all text boxes are affected, and you have to resize each one.


Steps to Reproduce:
1. Open a new Draw document, open a new Writer document
2. Insert a text box in the Draw document, write 12 into the box
3. Copy the box
4. Paste the box into the Writer document


Actual Results:
Text is wrapped in the text box. The box looks like 12 in Draw, but in Writer it is 1, next line 2:
1
2

Expected Results:
The text box should show the contents 12 like in Draw.


Reproducible: Always


User Profile Reset: No



Additional Info:
Font is Liberation Sans 18. The effect was shown on LO 6.1.0.3 both on Linux and on Windows (x64).

Happens in 6.2.0.0 as well, but not for capital letters. It is still unclear which contents are affected. For longer strings, only the last letter is wrapped to the next line.

The dimensions of the box are equal between the original and the pasted box, according to the settings dialog.
Comment 1 Dieter 2018-09-02 08:49:08 UTC
I can't confirm this with

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 414ef6cb187dd3bbcc917dbedf3c0c1cc8668f60
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-08-21_00:13:04
Locale: en-US (de_DE); Calc: CL


To be certain the reported issue is not
related to corruption in the user profile, could you please reset your
Libreoffice profile (https://wiki.documentfoundation.org/UserProfile) and re-test?

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the issue is still present
Comment 2 Michael Zapf 2018-09-02 12:55:17 UTC
Renamed the profile folder and tried again - same result. I tried

- 6.1.0.3 Linux x86_64
- 6.1.0.3 Windows x86_64 in Virtual Box
- 6.1.0.3 Windows x86_64 native (freshly installed LibreOffice, no profile existed)
- 6.2.0.0.alpha0+ Build ID: 1d0727a104d76210814f41c1169df318e40c9d80 Linux x86_64

Every time: Open Calc, open Writer, insert Text field in Calc doc, type 12 into text field, mark the field, CTRL-C (or Copy in context menu), put Writer doc in focus, CTRL-V (or Paste in context menu). Result is

1
2
Comment 3 Dieter 2018-09-02 13:44:27 UTC
(In reply to Michael Zapf from comment #2)

> Every time: Open Calc, open Writer, insert Text field in Calc doc, type 12
> into text field, mark the field, CTRL-C (or Copy in context menu), put
> Writer doc in focus, CTRL-V (or Paste in context menu). Result is

Just for clarification: Is this bug about Draw (see bug summary), about Calc (see comment 2) or is it about both?
Comment 4 Michael Zapf 2018-09-02 13:46:04 UTC
Sorry, s/Calc/Draw/g

I wanted to say DRAW.
Comment 5 Buovjaga 2018-09-24 17:29:15 UTC
No repro. Tried creating the text box both by clicking once and clicking'n'dragging.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 8b1501d80dc9d3f42c351c6e026fa737e116cae5
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: threaded
Built on 23 September 2018
Comment 6 Michael Zapf 2018-09-25 10:56:56 UTC
Could it be locale-specific? I tried a DE Windows installation of 6.1.1 on the PC of two other persons, and the issue is clearly there and safely reproducible. If desired, I could offer a screen capture.

It seems to me as if the pasted text box is a bit too small, maybe due to a rounding error. The original text box in Draw is 1.21cm x 0.96cm. When copied and pasted, the resulting box is 1.20cm x 0.96cm. When I increase the width to 1.21cm, the text is unwrapped. Also, when the size is flagged as protected, the text is not wrapped after pasting, and the pasted target is 1.21cm wide.
Comment 7 fatfish 2018-11-29 07:59:02 UTC
this bug is not reproduced.

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 0f25a3c36f27fd51453b9a9115f236b83c143684
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-27_20:06:55
Locale: zh-TW (zh_TW); UI-Language: en-US
Calc: threaded
Comment 8 Dieter 2018-11-29 08:25:44 UTC
(In reply to Michael Zapf from comment #6)
> Could it be locale-specific? I tried a DE Windows installation of 6.1.1 on
> the PC of two other persons, and the issue is clearly there and safely
> reproducible. If desired, I could offer a screen capture.
> 

Tried with German locale and

Version: 6.1.3.2 (x64)
Build-ID: 86daf60bf00efa86ad547e59e09d6bb77c699acb
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group threaded

but no repro.

Could you please attach your files from draw and fromk writer? Perhaps this can giv a hint. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested documents are provided.
Comment 9 Dorsan Li 2018-11-29 09:00:06 UTC
Bug confirmed
Version: 6.3.0.0.alpha0+ (x64)
Build ID: 0f25a3c36f27fd51453b9a9115f236b83c143684
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-27_20:06:55
Locale: zh-TW (zh_TW); UI-Language: en-US
Calc: threaded
Comment 10 Buovjaga 2018-11-29 16:48:36 UTC
NEW per previous comment
Comment 11 QA Administrators 2019-11-30 03:39:13 UTC Comment hidden (obsolete)
Comment 12 Michael Zapf 2019-11-30 22:21:42 UTC
Problem is still reproducible with LibreOffice 6.3.3.2 (x64) on Windows 10 and Linux as described in the first comment (2018-09-01 20:50:13 UTC).
Comment 13 dcstraney 2020-09-04 14:48:03 UTC
I can reproduce this too with a nightly build from a day or two ago:
Version: 7.0.2.0.0+ (x64)
Build ID: 8f1cb34bdb523e17478de2b0ef7d745c29743df7
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Additionally, this happens to me sometimes even when copying text boxes to a different Draw document.  I have an example file which consistently reproduces that; don't know if that would be relevant here (possibly the same underlying problem?) or worth its own bug.
Comment 14 Frédéric Bisson 2020-12-11 10:09:30 UTC
Created attachment 168048 [details]
The Draw source document
Comment 15 Frédéric Bisson 2020-12-11 10:09:54 UTC
Created attachment 168049 [details]
The Writer destination document
Comment 16 Frédéric Bisson 2020-12-11 10:10:49 UTC
Created attachment 168050 [details]
What it looks like in LibreOffice Writer
Comment 17 Frédéric Bisson 2020-12-11 10:12:40 UTC
Version: 7.0.3.1
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded

It seems related to drawing resize in Writer : it resizes everything except the text elements as shown in the attachments.
Comment 18 QA Administrators 2023-10-05 03:19:50 UTC Comment hidden (obsolete)
Comment 19 Michael Zapf 2023-10-10 19:16:59 UTC
Still reproducible on LO 7.6.1.2 (x86_64).

Note that the used font and the font size are relevant.

I can safely reproduce the effect with "Liberation Sans" at 18pt. With "Times New Roman", the effect does not occur for any sample between 12pt and 36pt (at least).

The effect for Liberation Sans 18 pt is that the width of the text box ("12") is reduced by 0.01cm when pasted into the new Writer document (see comment 6).

Observation: The width of the text box "12" using this Liberation Sans 18pt is 1.21 cm with "Fit width to text". If this setting is disabled and the size is changed to 1.22cm, then back to 1.21cm, copy/pasting the text box is done correctly without wrapping. My guess is that the auto-width is fractional and rounded, and that the digit resolution during copying is changed so that rounding on paste yields a slightly smaller dimension, thus wrapping the content.
Comment 20 Panos Stokas 2024-11-14 09:16:03 UTC
Created attachment 197608 [details]
A drawing that looks OK in Draw but looks different (text is wrapped) when pasted in Writer

I could not reproduce the issue on the original sample unless I would resize it in Writer after pasting.

I'm attaching a sample that showcases the bug with simple paste from Draw to Writer without any extra resizing.

Steps:

1. Open "A different Draw sample.odg" in Draw
2. Select all
3. Paste in Writer

You'll see that the drawing looks different (has text wrapping) in Writer.

This doesn't happen all of the time.

It also doesn't happen in OpenOffice. It looks like a LibreOffice regression.