summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Symes <allsymes@gmail.com>2011-07-07 09:22:50 +0200
committerAndras Timar <atimar@suse.com>2011-07-07 09:22:50 +0200
commitb684f1144acf3da2d9e4951a47d433234d84e482 (patch)
treeeac33f3876ca2c8b33aba3b2efff657dd1b8264c
parentf67100c868396e728e1f4b828288ca1c44cffd8e (diff)
fdo#37482 selecting text box after editing gives rotation handles
Signed-off-by: Andras Timar <atimar@suse.com>
-rw-r--r--sd/source/ui/func/futext.cxx7
-rw-r--r--sd/source/ui/inc/futext.hxx1
2 files changed, 7 insertions, 1 deletions
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 281645d36..f68337072 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 ea5b3091f..a792a03a7 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;