Hello Ariel, Benjamin,

On 06/21/09 20:06, Ariel Constenla-Haile wrote:
Here are some doubts I had when looking at the code that used to work fine in OOo 2.x:

* if you see the C++ code attached, in previous versions I had to change first the size of the BaseFrame object's shape (that is, change the size of the visual representation), and then change the embedded object's visual area size. Now changing the embedded object's visual area updates automatically the shape's size, am I right?
At least it should be so, resizing of the object should affect the replacement image. From other side, resizing of the replacement image should not affect the object, it is container only change that should let object be scaled. If it was not so before, it was a bug. There were a number of problems with replacement image update in 2.x that should be fixed now.

Changing first the shape's size makes the spreadsheet document rows higher.
Exactly, resizing of the replacement image is a change in the container document. It should not affect the object until the object has a special flag that let it be notified on resize ( the chart objects for example have this flag set, so resizing of the replacement image will resize the object as well ). For normal objects resizing of replacement image let the object be scaled, since the object itself is not changed. In case of Spreadsheet the scaling changes the size of rows and columns.

* May be an issue (or my code is bad...):

I'm changing the embedded object's visual area size, so that it's width is no wider than the width of (the text document page - left/right margins). But the resulting width is indeed wider.

When I understand the description correctly it is neither issue nor problem with your source code. The design allows object to decide which size it accepts, you could see it while resizing Spreadsheet object using UI, the object gets closest accepted size to the one you set using the mouse. So in case of your implementation the object gets the closest accepted size to the requested one as well.

Hope that helps.

Best regards,
Mikhail.

See the example output:


Embedded object Info:
        getAspect()                = 1
        getMapUnit()               = 0
        getVisualAreaSize().Width  = 9,03 cm
        getVisualAreaSize().Height = 2,13 cm


BaseFrame object Info:
        Width  = 9,03 cm
        Height = 2,13 cm


Spreadsheet Used Area size:
        Width  = 22,67 cm
        Height = 6,41 cm


TextDocument page text area size:
        Width  = 17,00 cm
        Height = 25,70 cm


New size for the embedded object:
        Width  = 17,00 cm
        Height = 6,41 cm

Press ENTER to change the size of embedded object's visual area

BaseFrame object new size:
        Width  = 18,07 cm
        Height = 6,38 cm



Regards
------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to