Bug 112837

Summary: Implement .uno:GrafAttrCrop in Writer for "Impress 8" OLE objects
Product: LibreOffice Reporter: Telesto <telesto>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: rb.henschel, xiscofauli
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=34619
https://bugs.documentfoundation.org/show_bug.cgi?id=107843
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 86899, 108280    

Description Telesto 2017-10-02 17:17:35 UTC
Description:
"Drawing Format" produces a shape. In Draw/Impress the command .uno:GrafAttrCrop contains the cropping. This command is not available in Writer. Therefore not the original image is inserted, but an image that only has the part, that remains after cropping. 

Feature request: Implement .uno:GrafAttrCrop in Writer for those shapes, that would be able to be cropped in Draw/Impress and then insert the shape in original size and crop it.

Source: bug 107843 comment 3


Steps to Reproduce:
1. Open attachment 133308 [details]
2. Copy the image 
3. Open a new Writer document and paste the image
4. It's not possible to crop the image


Actual Results:  
Drawing cannot be cropped

Expected Results:
Cropping should work just like any other image


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Buovjaga 2017-11-09 13:41:52 UTC
Ok, sounds useful -> NEW
Comment 2 Xisco Faulí 2018-10-04 16:58:19 UTC
Dear Nickson Thanda,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 3 Bayram Çiçek 2021-03-06 10:40:25 UTC
I would like to work on this. Assigning to myself.
Comment 4 Bayram Çiçek 2021-03-08 09:56:31 UTC
I have a few questions:

I've searched for code pointers and what I found is:
	lcl_ApplyCropping(...) in filter/source/msfilter/msdffimp.cxx.
	officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu:2196:      <node oor:name=".uno:GrafAttrCrop" oor:op="replace">
	sd/uiconfig/sdraw/menubar/menubar.xml:419:        <menu:menuitem menu:id=".uno:GrafAttrCrop"/>
	sd/uiconfig/simpress/menubar/menubar.xml:450:     <menu:menuitem menu:id=".uno:GrafAttrCrop"/>
	sd/uiconfig/simpress/popupmenu/graphic.xml:15:    <menu:menuitem menu:id=".uno:Crop"/> 
	sw/uiconfig/swriter/popupmenu/graphic.xml:15:     <menu:menuitem menu:id=".uno:Crop"/>

...and I couldn't go any further than that.

- Where does the Crop function located (for both Impress and Writer)?
- In which file should I implement Crop function for OLE objects in Writer? (or does it needed?)
- Could you specify the code pointers, please?

Thanks.
Comment 5 Telesto 2021-03-08 10:26:03 UTC
@Regina
You might know, I surely don't

(In reply to Bayram Çiçek from comment #4)
> I have a few questions:
> 
> I've searched for code pointers and what I found is:
> 	lcl_ApplyCropping(...) in filter/source/msfilter/msdffimp.cxx.
> 	officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu:2196: 
> <node oor:name=".uno:GrafAttrCrop" oor:op="replace">
> 	sd/uiconfig/sdraw/menubar/menubar.xml:419:        <menu:menuitem
> menu:id=".uno:GrafAttrCrop"/>
> 	sd/uiconfig/simpress/menubar/menubar.xml:450:     <menu:menuitem
> menu:id=".uno:GrafAttrCrop"/>
> 	sd/uiconfig/simpress/popupmenu/graphic.xml:15:    <menu:menuitem
> menu:id=".uno:Crop"/> 
> 	sw/uiconfig/swriter/popupmenu/graphic.xml:15:     <menu:menuitem
> menu:id=".uno:Crop"/>
> 
> ...and I couldn't go any further than that.
> 
> - Where does the Crop function located (for both Impress and Writer)?
> - In which file should I implement Crop function for OLE objects in Writer?
> (or does it needed?)
> - Could you specify the code pointers, please?
> 
> Thanks.