Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Image control in dialog does not obey Scale : Keep Ratio | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | General | Reporter: | bmarcelly <marcelly.bernard> | ||||||
Component: | code | Assignee: | AOO issues mailing list <issues> | ||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||
Severity: | Trivial | ||||||||
Priority: | P3 | CC: | ab, frank.schoenheit, hanya.runo, issues | ||||||
Version: | DEV300m39 | Keywords: | oooqa | ||||||
Target Milestone: | 4.2.0 | ||||||||
Hardware: | PC | ||||||||
OS: | All | ||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Attachments: |
|
Description
bmarcelly
2009-02-02 11:07:49 UTC
fs->ab: oops, this property slipped into the dialog editor by accident only. Since dialogs use a positive-list during export (i.e. only properties on that list are exported), every new AWT-level property needs explicit handling in the dialog editor, which is why I usually disable new properties there :) confirmed by fs → setting to new. 11 months later, this bug is still not corrected in OOo 3.3. There is not even a target milestone set. This control is nearly unusable in dialogs. Created attachment 82390 [details]
Patch to support ScaleMode export and import for Image control
ScaleMode property is not exported/imported to xdl file from ImageControl
when the dialog is stored.
The attached patch contains the changes to support ScaleMode property for
ImageControl.
There is a problem between ScaleImage and ScaleMode property during createPeer call.
Dialog importer loads xdl file and construct dialog model and loads properties from
the file. It is happend before the peer created of the dialog.
When the peer is created by calling UnoControl::createPeer method,
in the method, the control is updated from properties of the model by updateFromModel method.
This makes the property change event fired, so UnoControl::ImplModelPropertiesChanged respond to it.
The problem is happend at the end of this method, ImplSetPeerProperty method
is called for each properties should be to set to the peer.
VCLXImageControl::setProperty method is called for ScaleImage property and
the value from ScaleMode property is overwritten.
ob clause: The following should be read with keeping in mind that it is a few years ago when I last really worked on the OOo codebase... ImplModelPropertiesChanged has that DoesDependOnOthers call, which is already used for the purpose of deferring certain properties, so they're set only after other props have been set. That mechanism is ugly, but works. Maybe you can just return sal_True in that method, for the ScaleMode. Thanks, Frank. Works well now with bDependsOnOthers == true. "hanya" committed SVN revision 1654744 into trunk: #i98734# store and load ScaleMode property of image control on dialogs Created attachment 84470 [details]
Document contains test macro to verify
To verify the fix,
- open the attached document
- click "Execute" field on the writer document
-> opens the dialog having three image controls with the image placed on the writer document
The middle image having label "Keep ratio" should be shown with correct image ratio.
On AOO 4.1.1, the middle image is shown like the same with "Fit to size".
Fixed on trunk. |