sw/source/uibase/shells/frmsh.cxx | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
New commits: commit de91b7772d18b3584b48f47e21adc142c6289cf0 Author: Marco Cecchetti <mrcek...@gmail.com> AuthorDate: Wed Dec 12 10:39:39 2018 +0100 Commit: Marco Cecchetti <mrcek...@gmail.com> CommitDate: Mon May 20 10:31:29 2019 +0200 lok: sw: dragging image through SID_ATTR_TRANSFORM uno messages In writer the new solution for dragging images through a uno message to the transformation dialog didn't work. Change-Id: Ie2c5fa7c3b724b6a8cba9970ee070c9998730a29 (cherry picked from commit c52d94454c46fa6a0e64081127b511bcde4f7a3e) Reviewed-on: https://gerrit.libreoffice.org/70564 Tested-by: Jenkins Reviewed-by: Marco Cecchetti <mrcek...@gmail.com> diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index ee9a830620c2..d0fead931a0b 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -346,8 +346,23 @@ void SwFrameShell::Execute(SfxRequest &rReq) case SID_ATTR_TRANSFORM: { + bool bApplyNewPos = false; bool bApplyNewSize = false; + Point aNewPos = aMgr.GetPos(); + if (pArgs && + SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_POS_X, false, &pItem)) + { + aNewPos.setX( static_cast<const SfxInt32Item*>(pItem)->GetValue() ); + bApplyNewPos = true; + } + if (pArgs && + SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_POS_Y, false, &pItem)) + { + aNewPos.setY( static_cast<const SfxInt32Item*>(pItem)->GetValue() ); + bApplyNewPos = true; + } + Size aNewSize = aMgr.GetSize(); if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_WIDTH, false, &pItem)) @@ -389,11 +404,15 @@ void SwFrameShell::Execute(SfxRequest &rReq) } } + if (bApplyNewPos) + { + aMgr.SetAbsPos(aNewPos); + } if ( bApplyNewSize ) { aMgr.SetSize( aNewSize ); } - else + if (!bApplyNewPos && !bApplyNewSize) { bUpdateMgr = false; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits