Bug 137185 - EDITING Textbox and random text in shape forms two layers and it looks confusing
Summary: EDITING Textbox and random text in shape forms two layers and it looks confusing
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Attila Bakos (NISZ)
URL:
Whiteboard: target:7.1.0
Keywords:
Depends on:
Blocks: Shape-Textbox
  Show dependency treegraph
 
Reported: 2020-10-01 13:16 UTC by NISZ LibreOffice Team
Modified: 2020-12-30 13:40 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the problem in Writer (227.38 KB, image/png)
2020-10-01 13:16 UTC, NISZ LibreOffice Team
Details
Example file from Writer (17.07 KB, application/vnd.oasis.opendocument.text)
2020-10-02 11:42 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-10-01 13:16:17 UTC
Description:
In Writer, after inserting a shape, then clicking in it, typing a random text and after then, inserting a textbox also in the shape, both types of text appear at the same time, and it looks confusing. 
Maybe it would be more useful if the previous text would be copied into the textbox.

Steps to Reproduce:
    1. Insert a shape in Writer
    2. Click inside the shape
    3. Type random text
    4. Insert a textbox into the shape with right click – Add Text box
    5. Type random text in the textbox.

Actual Results:
Both types of text appear at the same time.

Expected Results:
The previously typed text should be copied into the textbox.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 52a49f9e480ca03e231cfda82640a928393131c9
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-GB
Calc: threaded
Comment 1 NISZ LibreOffice Team 2020-10-01 13:16:50 UTC
Created attachment 166003 [details]
Screenshot of the problem in Writer
Comment 2 NISZ LibreOffice Team 2020-10-02 11:42:26 UTC
Created attachment 166033 [details]
Example file from Writer
Comment 3 Dieter 2020-10-27 07:35:51 UTC
I confirm the expected behaviour, but I don't know, why this should be a bug. Textbox is transparent, so it's clear, that both texts appear.

Please eplain, why you expect something different
=> NEEDINFO
Comment 4 NISZ LibreOffice Team 2020-10-27 09:25:00 UTC
(In reply to Dieter from comment #3)
> I confirm the expected behaviour, but I don't know, why this should be a
> bug. Textbox is transparent, so it's clear, that both texts appear.
> 

Because that this happening makes no sense.

A (editeng) shape can have text in Writer, and a Writer textframe can have text and complex contents: paragraph styles, bullets+numbering, images, tables, charts, change tracking, etc. I heard the whole point of inventing it was to have these on shapes.

A Writer textframe can be added to a shape with the context menu, when I'd expect to have the former text transferred from the shape to the textframe.
Otherwise the previous text is mostly hidden from editing by the new textframe, which is rather confusing.

Also: don't even try to save this mess in attachment #166033 [details] to docx format ;).
Comment 5 Dieter 2020-10-27 09:37:34 UTC
So perhaps more an enhancement request than a bug.

cc: Design-Team for further input and decision
Comment 6 Heiko Tietze 2020-10-27 10:05:42 UTC
Messing up with shapes smells like round-trip issues. What do you think, Miklos?
Comment 7 Miklos Vajna 2020-10-27 10:17:45 UTC
I think the expected behavior is that whenever a shape has a textbox in Writer, then the original (editeng) text of the shape is empty. The suggested "copy" behavior (actually probably "move") sounds sensible.
Comment 8 Heiko Tietze 2020-10-27 10:45:18 UTC
(In reply to Miklos Vajna from comment #7)
> The suggested "copy" behavior (actually probably "move") sounds sensible.

Don't see a disadvantage, so let's do it.
Comment 9 Commit Notification 2020-11-20 21:17:22 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ae8bc80952fafc791ce8bbddd99c99626a93989c

tdf#137185 sw: move shape text on adding textbox

It will be available in 7.1.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.
Comment 10 NISZ LibreOffice Team 2020-12-30 13:40:16 UTC
Verified in:

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 368c56144aab5794c39d5bc2082d9b3d6d7cebdb
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded

Thanks for fixing!