Bug 84691 - Wrong position of textbox in shape, if shape anchored to page
Summary: Wrong position of textbox in shape, if shape anchored to page
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Attila Bakos (NISZ)
URL:
Whiteboard: target:7.1.0
Keywords:
: 121462 (view as bug list)
Depends on:
Blocks: Shape-Textbox
  Show dependency treegraph
 
Reported: 2014-10-05 19:04 UTC by Regina Henschel
Modified: 2020-12-30 09:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
document with textbox in shape (9.54 KB, application/vnd.oasis.opendocument.text)
2014-10-05 19:04 UTC, Regina Henschel
Details
shape with textbox immediately after creation (6.01 KB, image/png)
2014-10-05 19:07 UTC, Regina Henschel
Details
shape with textbox after reload (4.03 KB, image/png)
2014-10-05 19:07 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2014-10-05 19:04:02 UTC
Created attachment 107366 [details]
document with textbox in shape

Start with a new Writer document.
Insert a custom shape, a rounded rectangle for example.
Anchor the shape to page.
Add textbox to the shape.
Notice, the textbox is not centered to shape, but shifted down-right.
Save the file and reload
Notice, now the textboc is vertically centered to shape, but still shifted right.

I use Version: 4.4.0.0.alpha0+
Build ID: 86a3fe47a66950e26d23d7d7f2680fa7d4fb0839
TinderBox: Win-x86@39, Branch:master, Time: 2014-10-05_02:45:20
Comment 1 Regina Henschel 2014-10-05 19:07:16 UTC
Created attachment 107367 [details]
shape with textbox immediately after creation
Comment 2 Regina Henschel 2014-10-05 19:07:49 UTC
Created attachment 107368 [details]
shape with textbox after reload
Comment 3 Buovjaga 2014-11-14 19:09:32 UTC
Opening the file, I could see the effect, but reproducing from scratch did not show any of the problems.

Win 7 64-bit Version: 4.4.0.0.alpha2+
Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08
Comment 4 Alex Thurgood 2015-02-01 12:05:46 UTC
Confirming on
Version: 4.5.0.0.alpha0+
Build ID: 8fd9c25ac66dd238d4c68be3974241a18cb21705
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2015-01-27_22:43:15
Locale: fr_FR
Comment 5 Alex Thurgood 2015-02-01 12:06:42 UTC
When I say confirming, I can reproduce from scratch.
Comment 6 QA Administrators 2016-02-21 08:34:18 UTC Comment hidden (obsolete)
Comment 7 Regina Henschel 2016-02-21 11:24:32 UTC
The error still exists in LO 5.2
Comment 8 Telesto 2016-12-06 11:25:20 UTC
Still reproducible with:
Version: 5.4.0.0.alpha0+
Build ID: 33f5bc54aaa7fe7aa9335726e30f9c349155e04d
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-12-01_23:21:05
Locale: nl-NL (nl_NL); Calc: CL

I can reproduce with 'Anchoring to character" and "Anchoring to Page" dragging the shape around.
Comment 9 QA Administrators 2017-12-08 08:05:39 UTC Comment hidden (obsolete)
Comment 10 Regina Henschel 2018-11-06 15:00:42 UTC
The initial position is still wrong. It is wrong too in case of anchor to paragraph. Tested in Version: 6.2.0.0.alpha1+ (x64)
Build ID: f825e6d4082c0d0beb1c95b881f6a2ee9bfc9161
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-05_00:20:26
Locale: de-DE (en_US); Calc: CL
Comment 11 Buovjaga 2019-01-24 17:48:11 UTC
*** Bug 121462 has been marked as a duplicate of this bug. ***
Comment 12 Gabor Kelemen (allotropia) 2020-10-15 15:12:51 UTC
There are two problems here:

"Start with a new Writer document.
Insert a custom shape, a rounded rectangle for example.
Anchor the shape to page.
Add textbox to the shape.
Notice, the textbox is not centered to shape, but shifted down-right."

This is related to the .uno:SetAnchorToPage command that used to be in the popup menu.
Since 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=09c24681a3414092fde50ec0f617c9f7c79e8a61 

author	Seth Chaiklin <sdc.blanco@youmail.dk>	2020-09-29 18:47:13 +0200
committer	Heiko Tietze <heiko.tietze@documentfoundation.org>	2020-09-30 10:56:57 +0200

tdf#135836 remove "to page" from shape/image contextmenu

This command is not available in the menu, so one is forced to use the Position and Size dialogs controls. Anchoring to page this way the added textbox does not fall out of the shape.
It is still possible to add the .uno:SetAnchorToPage command to the toolbar and changing the anchoring this way still triggers the problem. 

But since that's not on the default toolbar/menu anymore, maybe it's not that important to fix this command.

The other problem is:

"Save the file and reload
Notice, now the textboc is vertically centered to shape, but still shifted right."

This part, i.e. opening the attachment is fixed since:

https://git.libreoffice.org/core/+/fd88bb81236ad6d1a63436b7ce20f2f93410d359

author	Bakos Attila <bakos.attilakaroly@nisz.hu>	Thu Jul 16 16:56:33 2020 +0200
committer	László Németh <nemeth@numbertext.org>	Thu Jul 23 17:28:00 2020 +0200

tdf#107225 tdf#122887 sw: fix reanchoring of textboxes
Comment 13 Commit Notification 2020-11-17 15:02:44 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137802 tdf#84691 sw: sync anchoring of textbox with UNO

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 14 Regina Henschel 2020-11-18 12:13:48 UTC
It is OK in Version: 7.1.0.0.alpha1+ (x64)
Build ID: 93b1adf7442839dcfbf16660b1fbe1139f14a4d0
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: default; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: threaded
Comment 15 NISZ LibreOffice Team 2020-12-30 09:53:47 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!