Set RES_GRFATR_CROPGRF atrtibute from SwVirtFlyDrawObj

Philippe Jung phil.jung at free.fr
Wed May 1 00:17:20 PDT 2013


Hi,

I am working on implementing the Crop Image feature in Writer.

Cropping ends in svx/source/svdraw/svddrgmt.cxx SdrDragCrop::EndSdrDrag. 
When cropping from Impress, marked object is SdrGrafObj. I rewrote part 
of the code so that Cropping is now part of SdrGrafObj (Similar to 
NbcMove, NbcResize and so on).

When cropping from Writer, the marked Object (and so the object to crop) 
is SwVirtFlyDrawObj (dflyobj.cxx). I have added SwVirtDrawObj::NbcCrop 
as Resize or Move. At this point, I would like to save the new values 
for crop attributes. That's where help is needed : how SwVirtFlyDrawObj 
relates to the embedded image and what is the "expected" way of applying 
an attribute to the image in a SwVirtFlyDrawObj?

Got various ways to read the current value of the image, but I did not 
succeed in writing new values. I am a bit lost betwwen GetFrm, 
GetFrm->Lower, FrameFmt, and all the possible attribute pools.

Any recommandation would be appreciated :-).

Regards
Philippe


<mailto:libreoffice at lists.freedesktop.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130501/99a4eba1/attachment.html>


More information about the LibreOffice mailing list