LibreOffice Productivity Suite

[Upstream] No interactive crop in Writer

Reported by William Grant on 2009-12-03
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
LibreOffice Productivity Suite
Confirmed
Wishlist
OpenOffice
Unknown
Low
libreoffice (Ubuntu)
Wishlist
Unassigned
openoffice.org (Ubuntu)
Wishlist
Unassigned

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

The new "crop" button added to OpenOffice.org 3 apears only on impress not on
writer, so is imposible to crop a image if you dont use the "old way"... I have
searched all around and there is no crop button.
Also you should change the icon, because is the same of a typical "cut" (of the
copy, paste, cut windows buttons).

Created attachment 56681
Crop apears on Impress picture toolbar

Created attachment 56682
Crop fails to appear on Writer

Created attachment 56683
Crop fails to appear on Writer

Created attachment 56684
Crop apears on Impress picture toolbar

Currently the crop tool has only be designed for draw. Writer's graphics are
designed differently from those in draw, thus it is not so easy to directly
integrate this feature.
This is also related to issue 3545.

MRU->OD: would it be possible somehow to overtake the cropping tool from
Impress/Draw in Writer?

*** Issue 99111 has been marked as a duplicate of this issue. ***

OD->HBRINKM:
Take over this issue.
It will be solved by project "Unification of Graphic Objects and Embedded
Objects" - see
http://wiki.services.openoffice.org/wiki/Unification_of_Graphic_Objects_and_Embedded_Objects#Interactive_cropping

William Grant (wgrant) wrote :
description: updated
Bryan Quigley (bryanquigley) wrote :

Thank you for your bug report. This bug has already been reported to openoffice and is being worked on upstream.

Changed in openoffice.org (Ubuntu):
status: New → Confirmed
Changed in openoffice:
status: Unknown → Confirmed
Chris Cheney (ccheney) on 2010-05-13
tags: added: lucid
Chris Cheney (ccheney) on 2010-05-18
Changed in openoffice.org (Ubuntu):
importance: Undecided → Wishlist
status: Confirmed → Triaged
summary: - No interactive crop in Writer
+ [upstream] No interactive crop in Writer

The original issue was for Windows. I have the same issue using Ubuntu. It is one
of the reasons I keep going back Microsoft Word!!

In libreoffice I can crop images only by entering numbers it tab "Crop". No other way and no tools to crop.

Please, add tool to crop. For example like in Gimp.

In DRAW clicking 'Crop' icon provides crop control marks, so I believe this one is more or less INVALID.

@sasha:
If that solution is not enough for your needs, please describe more exactly what you need. A simple reference to a pixel image editor is not sufficient.

In Draw it works perfectly. Thanks for this improvement.
But in Writer I can not find this tool. And I work mainly in Writer.

(In reply to comment #1)
> In DRAW clicking 'Crop' icon provides crop control marks, so I believe this one
> is more or less INVALID.

The crop tool is working perfectly in Draw and Impress, but it is completely missing in Writer (correct me if I'm wrong). That is really annoying, because every time you want to insert an excerpt from an image into your document you first have to crop the original image using another program like Gimp.

There is in fact a crop tool in Writer if you open the image's properties. But that one is quite useless because you have to define the crop area by entering dimensions instead of simply using the mouse, which would be a much more intuitive approach. In addition, the existing tool is very inaccurate because you have to rely on a very small preview image.

Isn't there a possibility to simply transfer the crop tool from Draw and Impress to other parts of the suite?

By the way: Did you know, this feature has been requested for OOo since way back in 2002? You can find the other project's thread here:

http://openoffice.org/bugzilla/show_bug.cgi?id=3545

After almost 10 years, adding this quite basic functionality should really be targeted seriously...

+1 for adding a mouse operated image crop functionality in writer.
thanks

*** Bug 38920 has been marked as a duplicate of this bug. ***

Changed in openoffice.org (Ubuntu):
status: Triaged → Won't Fix

[This is an automated message.]
There are no new official OpenOffice.org releases in Ubuntu packaging anymore => Won't Fix

If the problem persists, please mark this bug as "also affects project Libreoffice" or "also affects distribution Libreoffice (Ubuntu)" if that has not happened already.

Please leave references to upstream OpenOffice.org bugs in place to allow cross pollination.

+1. Please, do it in the next release. Often necessary function, but the present implementation is very-very inconvenient.

[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html

It's a pity that this isn't implemented yet. I'm currently helping a small company on their decision what office-suite they will use from March on.

Currently the only reason why they are not able to use libreOffice is that there's no crop tool in writer. Their main procedure includes inserting a lot of images into documents and croping them a bit. Using a full image manip. program or the sliders in the dialog box would mean large decrease of efficiency.

From outside, copying the implementation from LO-Draw to LO-Writer doesn't seem to be much work. I haven't looked into the code yet. Is there someone who can really estimate, how much effort it will be to port this from LO-Draw to LO-Writer? Is it worth to create a build environment etc.?

Thanks for all the good work!

@ Cedric
Please, see on comment 12

Bryan Quigley (bryanquigley) wrote :

Still an issue LibreOffice 3.5 beta2 (latest in Ubuntu right now)

William Grant / Bryan Quigley, this is:
- a clearcut upstream issue. Your welcome to send this to the developers of the software by following the instructions at http://wiki.documentfoundation.org/BugReport . If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status.
- won't be fixed in LibreOffice Packaging
Resolving as Won't Fix in LibreOffice Packaging. This does not mean the issue will not be cared about, but if it is cared about (even by Ubuntu/Canonical contributors), it is done upstream at LibreOffice.

libreoffice (Ubuntu) => Won't Fix

description: updated
Changed in libreoffice (Ubuntu):
importance: Undecided → Wishlist
status: New → Won't Fix
summary: - [upstream] No interactive crop in Writer
+ No interactive crop in Writer
Changed in df-libreoffice:
importance: Unknown → Wishlist
status: Unknown → Confirmed
summary: - No interactive crop in Writer
+ [Upstream] No interactive crop in Writer

(In reply to comment #12)
> From outside, copying the implementation from LO-Draw to LO-Writer doesn't seem
> to be much work. I haven't looked into the code yet. Is there someone who can
> really estimate, how much effort it will be to port this from LO-Draw to
> LO-Writer? Is it worth to create a build environment etc.?

I looked a bit into the code:

First of all, a crop button can be added to writer by editing

(draw) http://cgit.freedesktop.org/libreoffice/core/tree/sw/uiconfig/swriter/toolbar/graphicobjectbar.xml

similar to

(writer) http://cgit.freedesktop.org/libreoffice/core/tree/sw/uiconfig/swriter/toolbar/graphicobjectbar.xml

The button is then always deactivated and further editing is needed.

The files

(draw) http://cgit.freedesktop.org/libreoffice/core/tree/svx/source/tbxctrls/grafctrl.cxx
and
(writer) http://cgit.freedesktop.org/libreoffice/core/tree/sw/source/ui/shells/grfsh.cxx

are quite similar.

There are blocks labeled "SID_ATTR_GRAF_CROP" in SvxGrafAttrHelper::ExecuteGrafAttr() and SvxGrafAttrHelper::GetGrafAttrState() in the first file.

The corresponding functions SwGrfShell::ExecAttr() and SwGrfShell::GetAttrState() in the second file have quite similar structure but have different number of parameters. If I just copy the Crop-blocks from draw to writer there are a lot of errors of course.

Is there somebody who knows how to translate the draw-part into the writer-part? Is translating draw into writer the correct approach or shouldn't writer and draw use about the same functions when handling graphics?

Is there some further work to do that I missed?

@ <email address hidden>
Thanks for investigating office internals

> Is there some further work to do that I missed?
Try ask here: irc://chat.freenode.net/libreoffice-dev

About version: it should indicate most old version of office where bug appears for developers can more easy find source of problem (by which patch bug added)

(In reply to comment #16)
> have you ever tried the CropOOo extension?
>
> http://aoo-extensions.sourceforge.net/en/project/cropooo

Oh! It works in Writer! The description says "This extension provide an easy way to crop images in Draw or Impress." but after installing I have an icon also in writer and it works!

It's just a bit weird that you have to press Enter for applying the crop. Do you know if it's still developed and if this can be fixed (applying the crop after mousebutton is released)?

The CropOOo extension is not a good solution and their is no development since 2007.

The disadvantages and problems:

UNDO (ctrl-z) doesn't seem to work right. So you have only one trial to crop.
To cancel the changes I had made and close the document to undo the crop.

When cropping a picture, after pressing Enter, the left and top offset is incorrect, and CropOOo adds margin as big as the graphic's distance to the top-left corner of the current page.

Even when I move the picture to the top-left of the page (using Anchor To Page), the picture's dimension is not changed by CropOOo, leaving white space around the graphic.

If i had the time and skills, I would look into the code and try to fix this. Now i instead work with the swedish translation. Anyway: THIS IS IMPORTANT! Trying to convince people to switch from MSO to LO works fine until they try to crop an image, it is totally embarrassing to show them how to do it in writer.

Please update the bug if any progress is made!

This is an enhancement request, so improbable that it can be a MAB, I remove that relation.

We should not limit that feature to raster graphics and Writer, should also be available for vector graphics (wmf) in other applications (Calc)

@Thorsten:
Might be an EasyHack because the code already exists fro DRAW?

Yeps, and with code pointers already. Though not a trivial exercise.

*** Bug 58682 has been marked as a duplicate of this bug. ***

I am pleased with libreoffice, but I am agree with you in having a crop tool in writer. I think it would be more usefull, and a fast, easy way to crop images for people who usually add images to their texts. I hope to see this tool implemented soon.

Thanks for help and work =)

Hi,

I know it's not really productive to moan in bug reports, but you might want to take a look at the second paragraph in http://blogs.technet.com/b/office2010/archive/2010/02/01/office-2010-improvements-for-cropping-pictures.aspx

In particular "Cropping was overwhelmingly the most-used bit of editing used on pictures, so one of the first things we started work on was making cropping an easier-to-use and more powerful tool."

That matches my experience, but that assessment is obviously backed by tons of telemetry data from millions of users.

I'm not really advocating for the grey-out style of cropping (in my opinion it was a regression rather than an improvement), but visual cropping of any kind is a very important feature.

(In reply to comment #27)
> I know it's not really productive to moan in bug reports, but you might want
> to take a look at the second paragraph in
> http://blogs.technet.com/b/office2010/archive/2010/02/01/office-2010-
> improvements-for-cropping-pictures.aspx
>
This is marked as an easy hack, code ptrs are available - we'd gladly mentor someone willing to tackle this. It could be you - or someone you know!

Maybe I can try this!

I believe this is more easy than solving a great issue, so if you guys could guide me, maybe I can help :)

I'm looking at code pointers now!

@Marcos Souza

there's already a guy working on this (Philippe Jung) who recently posted a message on the Dev mailing list.

I told him to get in touch. maybe you can help him

Are there any developments in getting a crop button in Writer?

adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details

*** Bug 70482 has been marked as a duplicate of this bug. ***

Restricted my LibreOffice hacking area

Changed in openoffice:
status: Confirmed → Unknown
Changed in openoffice:
importance: Unknown → Low

I have just found this one! relatively new to Linux and LO and finding things as I need to use one.
Really, I'm shocked at the lack of a cropping tool. This is busines critical functionality - try writing a training manual without it. Anyone evaluating a switch from MS office to LO will find this and it will immediately be a shop stopper. Amazed that is it taking so long to fix

(In reply to comment #35)
> ...
> Really, I'm shocked at the lack of a cropping tool.
> ...
> Anyone evaluating a switch from MS office to LO will find this and it will immediately be a
> shop stopper.

in the meantime you can add that missing function using the CropOOo extension which in compatible with LibO too.

http://aoo-extensions.sourceforge.net/en/project/cropooo

*** Bug 48324 has been marked as a duplicate of this bug. ***

Hi, bug #61991 seem duplicate this one

*** Bug 61991 has been marked as a duplicate of this bug. ***

Issue 61991 is only partially a duplicate of this one. This issue has dealt exclusively with adding a cropping tool to Writer. Issue 61991 (and 74099, which I created and which was marked as a duplicate of 61991) deal with that AND with adding the same capability to Calc.

Because of that, and because of Bjorn's comment (in 61991) about "writing a short rationale", I decided to copy my statement from issue 74099 below.

--- copied from 74099 & 61991 ---
I have long found that when I need to print something from the computer screen, the easiest way to do it was to hit PrintScreen, then paste it into an Excel spreadsheet, then crop and resize it till I have what I want. For instance, I frequently want to crop & overlay two Google Maps screenshots so they fit together. Or save an entire year of cropped screenshots of payroll tax confirmation screens on the same spreadsheet page. (For me, Excel does these things far more easily than Word or Paint.)

For years I've occasionally tried the same thing using first OpenOffice Calc 3.x and now LibreOffice 4.0.x, and found that it is much more difficult. Calc brings up a window with measurements you can change, and its own small snapshot of the graphic that shows where you are moving the borders to. It works, but it is hard to get it just right. You cannot see it well, and must repeatedly invoke the tool, change the measurements, and quit the tool to see what you've really got. It takes several iterations to get it where you want it.

Excel's cropping tool (at least as far back as Excel 97) allows the mouse to grab the handles on the graphic's edges and drag them where you want them, which is far easier both to see and to do.

PLEASE add a mouse tool that can be used directly on the image in the spreadsheet. The cropping icon could still bring up the window (for those who prefer it), and then a button in that window could replace the window with the mouse tool.
--- end of copy ---

Thanks,
Tim

(In reply to comment #36)
> (In reply to comment #35)
> > ...
> > Really, I'm shocked at the lack of a cropping tool.
> > ...
> > Anyone evaluating a switch from MS office to LO will find this and it will immediately be a
> > shop stopper.
>
> in the meantime you can add that missing function using the CropOOo
> extension which in compatible with LibO too.
>
> http://aoo-extensions.sourceforge.net/en/project/cropooo

thanks. I tried installing this and did so successfully, but it doesn't seem to have done anything. There is no crop tool visible in the drawing tools, nor by right clicking on the image I need to crop. Am I doing something sill here?

@Wayne
you should see it's icon under "Tools/addons"

thanks - I can see it now! That will mitigate the issue I think, but I still think this should standard functionality within Writer. Thanks again.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.