sc/source/ui/drawfunc/fusel.cxx  |   28 +++-----------------------
 sc/source/ui/drawfunc/futext.cxx |   41 ++++++++++-----------------------------
 svx/source/dialog/rubydialog.cxx |    1 
 3 files changed, 16 insertions(+), 54 deletions(-)

New commits:
commit d2157548221e28d8f702cc81991f7aef198b523e
Author: Markus Mohrhard <markus.mohrh...@googlemail.com>
Date:   Sat Mar 9 20:32:25 2013 +0100

    fix fdo#61025, Revert "fdo#55430 switches off text mode when ...
    
    This reverts commit e80a8b6f14fac6bb6cc7ea55b118f95472d5b654.
    
    Change-Id: I30305abb212907690933ff27899b0ad7b6793360

diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index a3568b0..4968f15 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -53,8 +53,6 @@
 //  Maximal erlaubte Mausbewegung um noch Drag&Drop zu starten
 //! fusel,fuconstr,futext - zusammenfassen!
 #define SC_MAXDRAGMOVE  3
-// Min necessary mouse motion for normal dragging
-#define SC_MINDRAGMOVE 2
 
 // -----------------------------------------------------------------------
 
@@ -383,14 +381,11 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& 
rMEvt)
     sal_Bool bReturn = FuDraw::MouseButtonUp(rMEvt);
     sal_Bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
 
-    SdrObject* pObj = NULL;
-    SdrPageView* pPV = NULL;
     if (aDragTimer.IsActive() )
     {
         aDragTimer.Stop();
     }
 
-    sal_uInt16 nDrgLog = sal_uInt16 ( 
pWindow->PixelToLogic(Size(SC_MINDRAGMOVE,0)).Width() );
     Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
 
     bool bCopy = false;
@@ -421,7 +416,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
                     for ( sal_uLong i = 0; i < nMarkCount; ++i )
                     {
                         SdrMark* pMark = rSdrMarkList.GetMark( i );
-                        pObj = ( pMark ? pMark->GetMarkedSdrObj() : NULL );
+                        SdrObject* pObj = ( pMark ? pMark->GetMarkedSdrObj() : 
NULL );
                         if ( pObj )
                         {
                             ScChartHelper::AddRangesIfProtectedChart( 
aProtectedChartRangesVector, pDocument, pObj );
@@ -431,21 +426,6 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& 
rMEvt)
                 bCopy = true;
             }
 
-            if (!rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() &&
-                Abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
-                Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
-            {
-                /*************************************************************
-                * If a user wants to click on an object in front of a marked
-                * one, he releases the mouse button immediately
-                **************************************************************/
-                if (pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, 
SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK))
-                {
-                    pView->UnmarkAllObj();
-                    pView->MarkObj(pObj,pPV,false,false);
-                    return (sal_True);
-                }
-            }
             pView->EndDragObj( rMEvt.IsMod1() );
             pView->ForceMarkedToAnotherPage();
 
@@ -453,7 +433,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
             if (rMarkList.GetMarkCount() == 1)
             {
                   SdrMark* pMark = rMarkList.GetMark(0);
-                  pObj = pMark->GetMarkedSdrObj();
+                  SdrObject* pObj = pMark->GetMarkedSdrObj();
                   FuPoor* pPoor = 
pViewShell->GetViewData()->GetView()->GetDrawFuncPtr();
                   FuText* pText = static_cast<FuText*>(pPoor);
                 pText->StopDragMode(pObj );
@@ -478,7 +458,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
                     bool bFound = false;
                     for( sal_uLong nIdx = 0; !bFound && (nIdx < nCount); 
++nIdx )
                     {
-                        pObj = rMarkList.GetMark( nIdx )->GetMarkedSdrObj();
+                        SdrObject* pObj = rMarkList.GetMark( nIdx 
)->GetMarkedSdrObj();
                         bFound = ScDrawLayer::IsNoteCaption( pObj );
                         if( bFound )
                         {
@@ -514,7 +494,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
             if (rMarkList.GetMarkCount() == 1)
             {
                 SdrMark* pMark = rMarkList.GetMark(0);
-                pObj = pMark->GetMarkedSdrObj();
+                SdrObject* pObj = pMark->GetMarkedSdrObj();
 
                 //  aktivieren nur, wenn die Maus auch (noch) ueber dem
                 //  selektierten Objekt steht
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 61fdf0a..71e4561 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -125,7 +125,6 @@ sal_Bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
 {
     // remember button state for creation of own MouseEvents
     SetMouseButtonCode(rMEvt.GetButtons());
-    sal_Bool bStraightEnter = true;
 
     if ( pView->MouseButtonDown(rMEvt, pWindow) )
         return (sal_True);                 // Event von der SdrView ausgewertet
@@ -133,13 +132,7 @@ sal_Bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
     if ( pView->IsTextEdit() )
     {
         if( !IsSizingOrMovingNote(rMEvt) )
-        {
             StopEditMode();            // Danebengeklickt, Ende mit Edit
-            pView->UnmarkAll();
-            bStraightEnter = false;
-            ScViewData& rViewData = *pViewShell->GetViewData();
-            rViewData.GetDispatcher().Execute(aSfxRequest.GetSlot(), 
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
-        }
         pView->SetCreateMode();
     }
 
@@ -308,30 +301,18 @@ sal_Bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
                 }
                 else
                 {
-                    if (bStraightEnter)//Hack for that silly idea that 
creating text fields is inside the text routine
-                    {
-                        
/**********************************************************
-                        * Objekt erzeugen
-                        
**********************************************************/
-                        // Hack  to align object to nearest grid position 
where object
-                        // would be anchored ( if it were cell anchored )
-                        // Get grid offset for current position ( note: aPnt is
-                        // also adjusted )
-                        Point aGridOff = CurrentGridSyncOffsetAndPos( aMDPos );
-
-                        bool bRet = pView->BegCreateObj(aMDPos, 
(OutputDevice*) NULL);
-                        if ( bRet )
+                    /**********************************************************
+                    * Objekt erzeugen
+                    **********************************************************/
+                    // Hack  to align object to nearest grid position where 
object
+                    // would be anchored ( if it were cell anchored )
+                    // Get grid offset for current position ( note: aPnt is
+                    // also adjusted )
+                    Point aGridOff = CurrentGridSyncOffsetAndPos( aMDPos );
+
+                    bool bRet = pView->BegCreateObj(aMDPos, (OutputDevice*) 
NULL);
+                    if ( bRet )
                         pView->GetCreateObj()->SetGridOffset( aGridOff );
-                    }
-                    else if (pView->PickObj(aMDPos, pView->getHitTolLog(), 
pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK))
-                    {
-                        pView->UnmarkAllObj();
-                        pView->MarkObj(pObj,pPV,false,false);
-
-                        pHdl=pView->PickHandle(aMDPos);
-                        pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl);
-                        return(sal_True);
-                    }
                 }
             }
         }
commit e5b3d7f32881701c416d4c96df4aa130adb894f5
Author: Markus Mohrhard <markus.mohrh...@googlemail.com>
Date:   Sat Mar 9 18:02:30 2013 +0100

    coverity#736492: fix memory leak
    
    Change-Id: I7a2558f7c302a95601160ddac449f224e05d238f

diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 414c88f..3d6c793 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -572,6 +572,7 @@ IMPL_LINK_NOARG(SvxRubyDialog, StylistHdl_Impl)
                               SFX_CALLMODE_ASYNCHRON |
                               SFX_CALLMODE_RECORD);
     }
+    delete pState;
     return 0;
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to