[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sd/source

Andras Timar timar at kemper.freedesktop.org
Thu Jul 7 00:23:31 PDT 2011


 sd/source/ui/func/futext.cxx |    7 ++++++-
 sd/source/ui/inc/futext.hxx  |    1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit b684f1144acf3da2d9e4951a47d433234d84e482
Author: Luke Symes <allsymes at gmail.com>
Date:   Thu Jul 7 09:22:50 2011 +0200

    fdo#37482 selecting text box after editing gives rotation handles
    
    Signed-off-by: Andras Timar <atimar at suse.com>

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;
 


More information about the Libreoffice-commits mailing list