[Libreoffice-commits] .: 4 commits -

René Engelhard rene at kemper.freedesktop.org
Sat Jan 1 17:15:14 PST 2011


 0 files changed

New commits:
commit 98445eee70200c84b4c3452e8592e01256d5af46
Merge: ebd5f54... 208ef63...
Author: Rene Engelhard <rene at debian.org>
Date:   Sun Jan 2 01:05:01 2011 +0100

    Merge remote branch 'origin/libreoffice-3-3'

commit 208ef6386f934012bcc7bbdbc2271ebd04952536
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Dec 23 12:14:45 2010 -0500

    Remove bogus check for numerical sheet names. (fdo#32570)
    
    We apparently put numerical sheet name into quotes somewhere else,
    so checking for a number followed by a '.' and flagging it as bad
    is not only necessary, it's not appropriate.  E.g. we do support
    other formula syntax where the sheet-to-reference separator is not
    '.' (Excel A1 and Excel R1C1), thereby making this test even more
    inappropriate.
    
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index e93f25a..efbbb92 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2663,8 +2663,7 @@ BOOL ScCompiler::IsValue( const String& rSym )
     double fVal;
     sal_uInt32 nIndex = ( mxSymbols->isEnglish() ?
         pDoc->GetFormatTable()->GetStandardIndex( LANGUAGE_ENGLISH_US ) : 0 );
-//  ULONG nIndex = 0;
-////    ULONG nIndex = pDoc->GetFormatTable()->GetStandardIndex(ScGlobal::eLnge);
+
     if (pDoc->GetFormatTable()->IsNumberFormat( rSym, nIndex, fVal ) )
     {
         USHORT nType = pDoc->GetFormatTable()->GetType(nIndex);
@@ -2686,10 +2685,6 @@ BOOL ScCompiler::IsValue( const String& rSym )
                 return FALSE;   // Boolean function instead.
         }
 
-        if( aFormula.GetChar(nSrcPos) == '.' )
-            // numerical sheet name?
-            return FALSE;
-
         if( nType == NUMBERFORMAT_TEXT )
             // HACK: number too big!
             SetError( errIllegalArgument );
commit 25aea9775c2e6777c998d2db7d2d5d5314129fd0
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 22 12:45:47 2010 -0500

    Actually the object doesn't have to be a cell note.
    
    The same problem happens even when the object is not a cell note,
    but, say, a regular text box.  Let's not check whether or not the
    object is a cell note.
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index bc08010..e765ebf 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4306,13 +4306,10 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
         for (ULONG i = 0; i < nCount; ++i)
         {
             SdrObject* pObj = pDrawView->GetMarkedObjectByIndex(i);
-            if (pObj && ScDrawLayer::IsNoteCaption(pObj))
+            if (pObj && pObj->GetLogicRect().IsInside(aLogicPos))
             {
-                if (pObj->GetLogicRect().IsInside(aLogicPos))
-                {
-                    // Inside an active note object.  Bail out.
-                    return;
-                }
+                // Inside an active drawing object.  Bail out.
+                return;
             }
         }
     }
commit 9d59ebed31d016c44f91f8b4587f9852ba65e5b4
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 22 12:31:22 2010 -0500

    Avoid double-paste when pasting text into cell comment. (fdo#32572)
    
    Original patch is from Caolan.  I re-worked it to handle more use
    cases.
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 7e5f55d..bc08010 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4297,6 +4297,26 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
     SCsROW	nPosY;
     pViewData->GetPosFromPixel( rPosPixel.X(), rPosPixel.Y(), eWhich, nPosX, nPosY );
 
+    // If the mouse down was inside a visible note window, ignore it and
+    // leave it up to the ScPostIt to handle it
+    SdrView* pDrawView = pViewData->GetViewShell()->GetSdrView();
+    if (pDrawView)
+    {
+        ULONG nCount = pDrawView->GetMarkedObjectCount();
+        for (ULONG i = 0; i < nCount; ++i)
+        {
+            SdrObject* pObj = pDrawView->GetMarkedObjectByIndex(i);
+            if (pObj && ScDrawLayer::IsNoteCaption(pObj))
+            {
+                if (pObj->GetLogicRect().IsInside(aLogicPos))
+                {
+                    // Inside an active note object.  Bail out.
+                    return;
+                }
+            }
+        }
+    }
+
     ScSelectionTransferObj* pOwnSelection = SC_MOD()->GetSelectionTransfer();
     if ( pOwnSelection )
     {


More information about the Libreoffice-commits mailing list