Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Philippe Jung wrote:
Trying to implement crop Image in writer, I reached the "case
SDRDRAG_CROP" code in  SdrDragView::BegDragObj.

Nice, would be cool to have that!

This part of code calls new SdrDragCrop if and only if
IsCrookAllowed(true) or IsCrookAllowed(false)

This basically means that the cropped object must be RotateFreeAllowed
or ContortionPossible.

Looks like copypasta to me -

If I create a IsCropAllowed for the SDRDRAG_CROP case (not changing
anything for SDRDRAG_CROOK case) and in IsCropAllowed I put only

    ForcePossibilities();
    return (!bMoveProtect && bMoveAllowed)
           || (!bResizeProtect && bContortionPossible);

Yeah, would go for that - but the condition probably should be
something like (!bMoveProtect && bMoveAllowed && !bResizeProtect &&
bResizePropAllowed) or somesuch - this bContortionPossible contortion
relates to the crook functionality. Once you have that hacked, play a
bit with Draw/Impress, too, in the position/size dialog, you can lock
move and resize - if that behaves sensibly with your crop feature.

HTH,

-- Thorsten

Attachment: signature.asc
Description: Digital signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.