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


On Wed, 2010-12-22 at 12:39 -0500, Kohei Yoshida wrote:
I just fixed this bug

https://bugs.freedesktop.org/show_bug.cgi?id=32572

which originally came from Caolan.

The fix is committed on master, but I think we can apply this to 3.3
branch as well.

I feel confident that this change won't introduce any regressions.
Could someone review this and give me a sign-off?

Here is the patch (that consists of two commits on master) that I'd like
to port to 3.3.

-- 
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida@novell.com>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 0d32bae..5481822 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4298,6 +4298,23 @@ 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 && pObj->GetLogicRect().IsInside(aLogicPos))
+            {
+                // Inside an active drawing object.  Bail out.
+                return;
+            }
+        }
+    }
+
     ScSelectionTransferObj* pOwnSelection = SC_MOD()->GetSelectionTransfer();
     if ( pOwnSelection )
     {

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.