Hello, I tried to work on this bug last year and I had something nearly working. But, during this time, the code base changed (a lot) and I have no time for the moment to rework it. So I would like to share what I found. I will attach the patch "as is" to this ticket. It is not working at all with current trunk.
Basically, you have to use a virtual NbcCrop function on a parent that is common to SwVirtDraw and SdrGraph I am not going to detail every change I made in this ticket. Please read the patch and if you have any question feel free to ask. The crop code was in SdrDragCrop::EndSdrDrag. You have to move this code in SdrGraphObj. Now in SdrDragCrop::EndSdrDrag call the crop virtual => getSdrDragView().CropMarkedObj Now the problems I am facing: 1) cropping code has changed a lot in EndSdrDrag. Mine uses the old code. You will have to adapt it 2) Regarding links, you can also consider Armin Le Grand web page https://wiki.openoffice.org/wiki/Aw080_documentation. This explains the mathematical logic using transformation matrixes (If you "git blame" the cropping code, this will point to "alg"). If I am not mistaken, these changes come from evolution of OpenOffice merged into Libre Office. 3) I tried to contact alg and his advice is "I would suggest to *not* touch SwVirtFlyDrawObj at all, it's dead code. It's a kind of proxy, try to get the original SdrObject from it and modify that instead. Or better: just tunnel your call to the original object." Philippe -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libreoffice in Ubuntu. https://bugs.launchpad.net/bugs/491746 Title: [Upstream] No interactive crop in Writer Status in LibreOffice Productivity Suite: Confirmed Status in The OpenOffice.org Suite: Unknown Status in libreoffice package in Ubuntu: Won't Fix Status in openoffice.org package in Ubuntu: Won't Fix Bug description: Binary package hint: openoffice.org OpenOffice.org Writer in both Karmic and Lucid appears to lack the interactive crop feature. This feature is present in Draw, and in Windows Writer builds. WORKAROUND: Secondary click picture -> click Picture... -> tab Crop. ProblemType: Bug Architecture: i386 Date: Thu Dec 3 18:08:10 2009 DistroRelease: Ubuntu 10.04 Package: openoffice.org-writer 1:3.1.1-5ubuntu1 ProcEnviron: PATH=(custom, user) LANG=en_AU.UTF-8 SHELL=/bin/bash ProcVersionSignature: Ubuntu 2.6.32-5.6-generic SourcePackage: openoffice.org Uname: Linux 2.6.32-5-generic i686 To manage notifications about this bug go to: https://bugs.launchpad.net/df-libreoffice/+bug/491746/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp