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


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2786

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/86/2786/1

fdo#55430 allowing click-from-textmode without causing fdo#61025

the last fix for #55430 caused #61025.
Markus Mohrhardt fixed that with by removing parts of the calc part
in 16f6ef0423cd0fd7c0e50ee28e8b32e72e21e090
I got it back where it causes no harm to the labels.

Change-Id: Ifb366a004701d7ec93b66662e14dba850d500e60
Signed-off-by: Lennard Wasserthal <Wasserthal@nefkom.net>
---
M sc/source/ui/drawfunc/fudraw.cxx
M sc/source/ui/drawfunc/futext.cxx
M sc/source/ui/inc/fudraw.hxx
3 files changed, 36 insertions(+), 2 deletions(-)



diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 59922ae..fc72d7b 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -768,6 +768,21 @@
     }
 }
 
+sal_Bool FuDraw::IsEditingANote( const MouseEvent& rMEvt ) const
+{
+    const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
+    sal_Int32 backval=rMarkList.GetMarkCount();
+    for (sal_Int32 nlv1=0;nlv1<backval;nlv1++)
+    {
+        SdrObject* pObj = rMarkList.GetMark( nlv1 )->GetMarkedSdrObj();
+        if ( ScDrawLayer::IsNoteCaption( pObj ) )
+        {
+            return true;
+        }
+    }
+    return false;
+}
+
 sal_Bool FuDraw::IsSizingOrMovingNote( const MouseEvent& rMEvt ) const
 {
     sal_Bool bIsSizingOrMoving = false;
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 02d086a..70be824 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -132,9 +132,19 @@
 
     if ( pView->IsTextEdit() )
     {
-        if( !IsSizingOrMovingNote(rMEvt) )
+        if ( IsEditingANote(rMEvt) )
         {
-            StopEditMode();            // Danebengeklickt, Ende mit Edit
+            if( !IsSizingOrMovingNote(rMEvt) )
+            {
+                StopEditMode();            // Danebengeklickt, Ende mit Edit
+                bStraightEnter = false;
+            }
+        }
+        else
+        {
+            StopEditMode();            // Clicked outside, ending edit.
+            pView->UnmarkAll();
+            bStraightEnter = false;
         }
         pView->SetCreateMode();
     }
@@ -322,6 +332,8 @@
                     else if (pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, 
SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK))
                     {
                         pView->UnmarkAllObj();
+                        ScViewData& rViewData = *pViewShell->GetViewData();
+                        rViewData.GetDispatcher().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT 
| SFX_CALLMODE_RECORD);
                         pView->MarkObj(pObj,pPV,false,false);
 
                         pHdl=pView->PickHandle(aMDPos);
@@ -343,6 +355,12 @@
 
     pViewShell->SetActivePointer(pView->GetPreferedPointer(
                     pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow ));
+    if (!bStraightEnter)
+    {
+            pView->UnmarkAll();
+            ScViewData& rViewData = *pViewShell->GetViewData();
+            rViewData.GetDispatcher().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | 
SFX_CALLMODE_RECORD);
+    }
 
 //  return (bReturn);
     return sal_True;
diff --git a/sc/source/ui/inc/fudraw.hxx b/sc/source/ui/inc/fudraw.hxx
index 158b032..fdff18a 100644
--- a/sc/source/ui/inc/fudraw.hxx
+++ b/sc/source/ui/inc/fudraw.hxx
@@ -49,6 +49,7 @@
     // II
     virtual void SelectionHasChanged();
 
+    sal_Bool IsEditingANote( const MouseEvent& rMEvt ) const;
     sal_Bool IsSizingOrMovingNote( const MouseEvent& rMEvt ) const;
 
  private:

-- 
To view, visit https://gerrit.libreoffice.org/2786
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb366a004701d7ec93b66662e14dba850d500e60
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Lennard Wasserthal <Wasserthal@nefkom.net>


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.