Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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 <allsymes@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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.