Question on call to IsCrookAllowed in SdrDragView::BegDragObj

Philippe Jung phil.jung at free.fr
Sun Mar 10 09:51:23 PDT 2013


Hello,

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

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.

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);

this works and I can continue implementing the feature.

However, does it makes sense? Is there a risk of side effect in another
module?

Regards
Philippe


More information about the LibreOffice mailing list