Issue 124216 - Position and Size values not updated timely after 'Drawing Scale' modification
Summary: Position and Size values not updated timely after 'Drawing Scale' modification
Alias: None
Product: Draw
Classification: Application
Component: ui (show other issues)
Version: 4.0.0
Hardware: All Windows 7
: P5 (lowest) Minor (vote)
Target Milestone: ---
Assignee: Andre
QA Contact:
Depends on:
Reported: 2014-02-11 05:57 UTC by Rainer Bielefeld
Modified: 2017-05-20 10:35 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Bielefeld 2014-02-11 05:57:10 UTC
Steps how to reproduce Reproducible with server installation of "AOO 4.1.0-Dev – English UI / German locale - [AOO410m1(Build:9750) - Rev. 1565724 - 2014-02-09]" on German WIN7 Home Premium (64bit)", own separate user profile.

1. Open Sample document from 
   LibO "Bug#74812 - Rotate via sidebar not working properly"
2. Click rectangle and observe position and size values in Sidebar:
   X=600cm, Y=500cm, rotation = 0
3. Compare with values in Status bar: all the same
4. Menu 'Tools -> Options -> Draw -> General - Scale': Modify from "1:100" to
   "1:1" [ok]
   Expected: Status Bar and Sidebar now show  X=6cm, Y=5cm
   Actual: only Status Bar values have changed, in Sidebar still old values :-(
5. Click on white area of sheet and then click on rectangle will heal the 
   problem with wrong values in sidebar.
Comment 1 Rainer Bielefeld 2014-02-11 06:02:04 UTC
Already Reproducible with server installation of "AOO 4.0.0-Dev – English UI / German locale [AOO400m2(Build:9701) - Rev. 1489073 2013-06-03 13:48:37]" on German WIN7 Home Premium (64bit)", own separate user profile
Comment 2 Rainer Bielefeld 2014-02-11 12:08:01 UTC
Seems not to be a simple redraw problem:

(a) resize sidebar does not help after Step 4
(b) after change of area color in Format Toolbar that modification will be
    updated in sidebar, but wrong Position and Size values persist.
Comment 3 Armin Le Grand 2014-02-17 17:58:46 UTC
I would guess that the slots used for this need to be invalidated; this was not necessary before since the pos/size dialog used before is modal and thus it cannot happen that scaling changes while it is open. checking...
Comment 4 Armin Le Grand 2014-02-17 21:34:14 UTC
There is something like drawing::framework::XConfigurationChangeListener and drawing::framework::ConfigurationChangeEvent, looks as if the panel may somehow need to implement that and attach somewhere to get that messges, but I am no expert there. Adding Andre to cc, he might know more...
Comment 5 Andre 2014-02-18 08:13:15 UTC
@Armin: You only need the XConfigurationChangeListener when you want to be informed about context changes, caused for example by changes in the selection.  Probably not necessary here. 

Changes of slot values are notified via a different channel.  I think that your idea about a missing slot invalidation is the right one.

By the way: the issue can easily be reproduced without a bug doc from LO:

1 Just insert a rectangle into a new Draw document.
2 Select the rectangle
3 Change drawing scale from 1:1 to 1:100 as described in step 4 above.
-> Values in panel do not change

And I am not sure that I understand the "drawing scale" feature.  The page size remains unchanged, while position and size of shapes have values 100 times as large as before.
Comment 6 SVN Robot 2014-02-18 14:17:32 UTC
"af" committed SVN revision 1569337 into trunk:
124216: Detect changes of the UI scale.
Comment 7 Andre 2014-02-18 14:25:00 UTC
The root cause of the missing update is that the UI scale is basically an SD-only feature.  While the value of the UI scale is available via the SdrModel, the items with the x and y scale are 
 ATTR_OPTIONS_SCALE_Y which are defined in sd/inc/sdattr.hrc and thus not visible to the svx based PosSizePropertyPanel.  The changes of the item values are notified but can not be received by the panel for said reasons.

Fixed with a little trick/hack.  PosSizePropertyPanel checks the UI scale every time a value change of the SID_ATTR_METRIC item is notified.  When one is detected, the four items for position and size are invalidated to trigger callbacks with the (unchanged) values.