Bug 112837 - Implement .uno:GrafAttrCrop in Writer for "Impress 8" OLE objects
Summary: Implement .uno:GrafAttrCrop in Writer for "Impress 8" OLE objects
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: UNO-Command-New Image-Crop
  Show dependency treegraph
 
Reported: 2017-10-02 17:17 UTC by Telesto
Modified: 2021-03-19 14:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.