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


Hi,

A patch for EasyHack "Leftover data after Undo operation" (qa issue
#106711).

Before pushing, please check if this patch:
- Does fix the problem.
- Do not introduce new issues. (Not fixing a problem and generated new
ones.)

MPL 1.1 / GPLv3+ / LGPLv3+, Joost Wezenbeek

Joost
From 7abfa9d9d1f21fa58110f533db99be4e302505ff Mon Sep 17 00:00:00 2001
From: Joost Wezenbeek <joost.eekhoorn@gmail.com>
Date: Mon, 20 Dec 2010 23:02:07 +0100
Subject: [PATCH] Leftover data after Undo operation

qa issue #106711
---
 sc/source/ui/view/viewfun3.cxx |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 42f75c6..10cea3a 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1063,6 +1063,27 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
         }
         aFilteredMark.SetMarkArea( aMarkRange);
     }
+    else
+    {
+        // FIX for issue #106711 : leftover data after undo.
+        if (!bNoPaste )
+        {
+            ScRange rRange;
+            aFilteredMark.GetMarkArea( rRange );
+            if( (rRange.aEnd.Col() - rRange.aStart.Col()) < nDestSizeX )
+            {
+                nStartCol = rRange.aStart.Col();
+                nStartRow = rRange.aStart.Row();
+                nStartTab = rRange.aStart.Tab();
+                nEndCol = nStartCol + nDestSizeX;
+                nEndRow = rRange.aEnd.Row();
+                nEndTab = rRange.aEnd.Tab();
+                aMarkRange = ScRange( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab);
+                aFilteredMark.SetMarkArea( aMarkRange);
+            }
+        }
+    }
+
     if (bNoPaste)
     {
         ErrorMessage(STR_MSSG_PASTEFROMCLIP_0);
-- 
1.7.1


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.