Hi, Attached is a patch to fix fdo#37482. Could this be reviewed & pushed?
Kind regards, Luke.
From e7e9e5fb3bfa117a2f30d8d070d3705980e59dae Mon Sep 17 00:00:00 2001 From: Luke Symes <allsy...@gmail.com> Date: Mon, 4 Jul 2011 19:08:09 +1200 Subject: [PATCH] Fix fdo#37482 (selecting text box after editing gives rotation handles) --- sd/source/ui/func/futext.cxx | 7 ++++++- sd/source/ui/inc/futext.hxx | 1 + 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 281645d..f683370 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -140,6 +140,7 @@ static sal_Bool bTestText = 0; FuText::FuText( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) : FuConstruct(pViewSh, pWin, pView, pDoc, rReq) , bFirstObjCreated(sal_False) +, bJustEndedEdit(false) , rRequest (rReq) { } @@ -400,6 +401,7 @@ sal_Bool FuText::MouseButtonDown(const MouseEvent& rMEvt) if( mpView->IsTextEdit() ) { mpView->SdrEndTextEdit(); + bJustEndedEdit = true; if(aVEvt.pHdl) { @@ -682,7 +684,7 @@ sal_Bool FuText::MouseButtonUp(const MouseEvent& rMEvt) sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() ); - if ( mpView->IsRotateAllowed() && mpViewShell->GetFrameView()->IsClickChangeRotation() && (rMEvt.GetClicks() != 2) && + if ( mpView->IsRotateAllowed() && mpViewShell->GetFrameView()->IsClickChangeRotation() && (rMEvt.GetClicks() != 2) && !bJustEndedEdit && !rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() && !rMEvt.IsRight() && Abs(aPnt.X() - aMDPos.X()) < nDrgLog && Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog) @@ -690,6 +692,9 @@ sal_Bool FuText::MouseButtonUp(const MouseEvent& rMEvt) // toggle to rotation mode mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_OBJECT_ROTATE, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD ); } + + if( bJustEndedEdit ) + bJustEndedEdit = false; } else if( mpView && mpView->IsCreateObj() && rMEvt.IsLeft()) { diff --git a/sd/source/ui/inc/futext.hxx b/sd/source/ui/inc/futext.hxx index ea5b309..a792a03 100644 --- a/sd/source/ui/inc/futext.hxx +++ b/sd/source/ui/inc/futext.hxx @@ -98,6 +98,7 @@ protected: SdrObjectWeakRef mxTextObj; Link aOldLink; sal_Bool bFirstObjCreated; + bool bJustEndedEdit; SfxRequest& rRequest; -- 1.7.5.4
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice