Bug 38545 - Cell anchor symbol does not get refreshed when the anchoring type changes.
Summary: Cell anchor symbol does not get refreshed when the anchoring type changes.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.1 RC1
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:3.5
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 17:05 UTC by Regina Henschel
Modified: 2011-12-09 13:36 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Document, see Comment 1 (12.02 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-06-21 23:28 UTC, Rainer Bielefeld Retired
Details
Sample Document, see Comment 4 (16.77 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-06-22 02:50 UTC, Rainer Bielefeld Retired
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2011-06-21 17:05:52 UTC
When an object is inserted in Calc yo can toggle the anchor type between 'Cell' and 'Page. Click on the object so that it gets green handles. Now click on the icon 'Change anchor'. nothing happens. You can still toggle the anchor via context menu and via Format > Anchor.

It is OK in LO3.3.2 and broken in LO3.4.0
Comment 1 Rainer Bielefeld Retired 2011-06-21 23:25:34 UTC
NOT Reproducible with "LibreOffice 3.4.1RC1  – WIN7  Home Premium  (64bit) English UI [OOO340m1 (Build:101)]"

Steps to reproduce
1. Download and open attached sample 
2. highlight rows 3,4, 
3. press icon 'Insert Row'. 
   2 Lines will be inserted
   Numbers starting with "5" will be shifted down
   Picture remains in lines 9-12, what means "Anchored to page"
   (you can use context menu to check that)
4. Close context menu if necessary, click into any free cell
5. Click Anchor Icon to toggle anchor from "Anchored to page" to 
   "Anchored to Cell"
6. highlight rows 3,4, 
3. press icon 'Insert Row'. 
   2 Lines will be inserted
   Numbers starting with "5" and 2 empty lines will be shifted down
   Picture will be shifted down to lines 11-13, what means "Anchored to cell"
   (you can use context menu to check that)

So every thing works fine for me.

@Regina:
Can you please add some more information how you indicated that toggling does not work? Are your results form 3.4.1 (picker) or 3.4.0 (report)?
Comment 2 Rainer Bielefeld Retired 2011-06-21 23:28:04 UTC
Created attachment 48267 [details]
Sample Document, see Comment 1
Comment 3 Regina Henschel 2011-06-22 00:42:27 UTC
I use "LibreOffice 3.4.1 OOo340m1 (Build:101)".

Step 4 cannot work, because the object looses focus.

(1) Open attached document.
(2) Click on picture. It gets green handles and the picture toolbar opens.
(3) Right click picture > Anchor. Notice picture is anchored to page. Click somewhere to close context menu, picture still with green handles.
(4) Click on the anchor icon in the picture toolbar.
Expected behavior: The anchor type toggles to 'to cell'. You should get a grey square with anchor nearby the picture.
Seen behavior: Open context menu > Anchor. Notice anchor type is still 'To Page'.

Please try it in a LO3.3. Select the picture. Each click on the icon 'Anchor' will show/remove the grey square, indicating, that the picture is anchored to cell/page.
Comment 4 Rainer Bielefeld Retired 2011-06-22 02:32:17 UTC
Indeed, I also was a little worried not to see the grey anchor button, I have been used to see it when picture is anchored to cell and not to see it when picture is anchored to page. I also get anchor button visible when I move the picture (anchored to cell) a little, but the reliable relation to anchor mode seems to be broken, also for toggling using context menu.

Because of this problem I already assign the bug (and modify Subject line for now), but still some observations differ between Regina and me.

@Regina:
I also rechecked all anchor icon toggles in context menu, and I always saw anchoring toggled after I had clicked the icon in the task bar. 

I still wonder why our observations differ so much. I wil attach "mynewsample.ods", may be you have an idea?

BTW:
I should have mentioned that I closed context menu with additional right click, what works for closing due to 
"Bug 31438 - UI: Context menu closed instead of moved on a new right-click"
And for me <esc> also closes the context menu without loosing control points, even click into an empty cell or on the marked object closes the context menu without loosing object focus. So I wonder why we have those different observations.

@Christoph:
CC because design might be related

@Kohei:
Can you please check the 'Cell anchor symbol does not disappear when anchoring changes to "page"' problem?
Please feel free to reassign if it’s not your area or if provided information is not sufficient.
Comment 5 Rainer Bielefeld Retired 2011-06-22 02:50:24 UTC
Created attachment 48273 [details]
Sample Document, see Comment 4
Comment 6 Regina Henschel 2011-06-22 08:48:52 UTC
@Rainer: You are right. It is an update problem of the view. The anchor type changes indeed, but the gray button to show the anchor is not refreshed accordingly. It will be refreshed, when the object is moved or deselected and selected again.
Comment 7 Christoph 2011-06-22 11:09:09 UTC
@Regina, Rainer: You are right - the view isn't refreshed; tested in "LibO 3.4.0 OOo340m1 Build 11". But, it works perfectly well in LibO 3.3.2 on Ubuntu. Thus, doesn't seem to be something design related at the moment.
Comment 8 Rainer Bielefeld Retired 2011-06-22 11:14:23 UTC
@Christoph:
Think so, too. The reduction to a refresh problem makes design considerations unnecessary
Comment 9 Kohei Yoshida 2011-07-07 16:49:10 UTC
Changing the title accordingly.  This is a simple refresh issue.
Comment 10 Kohei Yoshida 2011-07-07 17:15:44 UTC
I'd like to fix this for 3.4.x.
Comment 11 Kohei Yoshida 2011-12-09 13:36:48 UTC
Ok.  Fixed on master and libreoffice-3-5 branches.

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4345b5cb72980dc351147da77505ed06a93028ab

It may have missed the deadline for Beta1. So if it's not in Beta1, check Beta2.