Bug 90993 - EDITING: Objects anchored to frame disappear when frame anchor is changed.
Summary: EDITING: Objects anchored to frame disappear when frame anchor is changed.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.6.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap Frame
  Show dependency treegraph
 
Reported: 2015-05-01 14:43 UTC by Gordo
Modified: 2023-12-30 10:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
odt to doc and docx test cases (135.34 KB, application/zip)
2015-05-01 14:43 UTC, Gordo
Details
odt to doc, docx, and rtf test cases (148.27 KB, application/zip)
2015-06-04 16:02 UTC, Gordo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gordo 2015-05-01 14:43:19 UTC
Created attachment 115238 [details]
odt to doc and docx test cases

1. New Text Document.
2. Insert → Frame and adjust size to fit a shape.
Note:
Frame is anchored to paragraph.
3. Insert → Shape → Rectangle and draw it in frame.
4. Change drawing object anchor from paragraph to frame.
5. Change frame anchor from paragraph to page.
Result:
Drawing object goes walkabout and is nowhere to be seen.
6. Save, close, and reopen document.
Result:
Drawing object realises the wandering life is not for it and appears back where it was.

While looking into this, I had a look for duplicates and such.  Bug 40540 and bug 67318 deal with saving as doc and docx.  I saved the odt from this test as a doc, closed and reopened the document, and the result was the object had disappeared.

This got me thinking that maybe there is some code reuse between changing frame anchors in odt and when converting--anchors change depending on format.  So I ran a battery of tests which can be found in the attachment.  Saving as doc failed to keep the object in all instances.  Saving as docx when the object is anchored to the frame showed promise but in test 7 the frame does not change anchor.

Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Comment 1 Buovjaga 2015-05-01 18:24:30 UTC
Reproduced with steps in desc.
Saving as .doc & reloading does not bring the rectangle back.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha1+ (x64)
Build ID: f0edb677f09ad338e22ac3b5d91497b4479e0b3c
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-27_01:54:20
Locale: fi_FI
Comment 2 Cor Nouws 2015-06-02 22:16:44 UTC
was this OK in previous versions, that you know, Gordo?
Comment 3 Gordo 2015-06-02 22:35:42 UTC
I tested just the steps and the save as a doc (not any of the other doc and docx conversion stuff) and it happens back in 4.1.6.2.
Comment 4 Gordo 2015-06-02 22:37:22 UTC
Which is to say that I don't have an earlier version so I don't know if it has always been that way or if it is a regression.
Comment 5 Cor Nouws 2015-06-02 23:18:14 UTC
(In reply to Gordo from comment #0)
> 5. Change frame anchor from paragraph to page.
> Result:
> Drawing object goes walkabout and is nowhere to be seen.

In 4.4.3.2 on Ubuntu 32 bits, I still see it.

> 6. Save, close, and reopen document.
> Result:
> Drawing object realises the wandering life is not for it and appears back
> where it was.

Same here.
Comment 6 Cor Nouws 2015-06-02 23:20:00 UTC
(In reply to Cor Nouws from comment #5)
> (In reply to Gordo from comment #0)
> > 5. Change frame anchor from paragraph to page.
> > Result:
> > Drawing object goes walkabout and is nowhere to be seen.
> 
> In 4.4.3.2 on Ubuntu 32 bits, I still see it.
> 
> > 6. Save, close, and reopen document.
> > Result:
> > Drawing object realises the wandering life is not for it and appears back
> > where it was.
> 
> Same here.

Same results in 3.6.6.1.

(All saving as .odt)

thanks for the test kit. Sorry I cannot confirm (if I understood the idea correct..)
Comment 7 Gordo 2015-06-04 16:02:59 UTC
Created attachment 116285 [details]
odt to doc, docx, and rtf test cases

Test kit updated to include rtf.
Comment 8 QA Administrators 2016-09-20 09:45:55 UTC Comment hidden (obsolete)
Comment 9 sdc.blanco 2019-10-30 01:08:15 UTC
Repro:

Version: 6.3.3.1 (x64)
Build ID: f41f4c7f9507aeca13cb9df51f34d80e8ba30a99
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 

Can change the anchor of the frame to any value, to get the shape to disappea.  Not just anchor to page (as in step 5).

I just filed a similar report bug #128471, with some variations that go beyond this report.  (I searched for similar bugs before submitting mine, but this one did not include my search word "hidden").
Comment 10 QA Administrators 2021-10-30 04:37:18 UTC Comment hidden (obsolete)
Comment 11 sdc.blanco 2021-11-01 10:44:32 UTC
Repro: 

Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: da-DK (en_DK); UI: en-US
Calc: threaded

(anchor to page is no longer offered in context menu, but as noted in comment 9, this problem also appears when changing other frame anchors.)
Comment 12 QA Administrators 2023-12-29 03:12:00 UTC Comment hidden (obsolete)
Comment 13 sdc.blanco 2023-12-30 10:24:42 UTC
repro

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 0ddd9f7e055a0c1ecb120de3e40c3fdb8373e9dc
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL threaded

When anchor of frame is changed (to anything), then the shape (anchored "to frame") is hidden (as seen in Navigator).  Saving and reloading the document will make the shape unhidden.

This bug is a duplicate (or close to) bug 128471 (which is more general, because not just limited to "page" anchor.

Bug 90993 uses save and reload to return the shape.
Bug 128471 uses copy and paste to return the shape, so I will leave both versions.