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


Ladies & gentlemen,

attached is the patch with (hopefully the final) fix for $subject. I'd like to 
push it to 3-4 and considering the fact that some data loss is involved, 
prolly also to 3-4-0 although I'm not entirely positive about that.

The orig. patch from IBM Symphony folks took just some scenarios into account 
and happily kept deleting cell data in drag-fill operation in all other cases 
(as described here: https://bugs.freedesktop.org/show_bug.cgi?id=35345#c10)

Now we're trying to look also for anonymous DB data in the current sheet and 
check those for the presence of autofilter or query params.

Please review & comment. /me doesn't know this particular pieces of code so 
well.

frozenB.
-- 
  \\\\\              Katarina Machalkova    
  \\\\\\\__o          LibO developer
__\\\\\\\'/_          & hedgehog painter
From 6b4c2666b8c4131371859191f322f5bfc0aca027 Mon Sep 17 00:00:00 2001
From: Katarina Machalkova <kmachalkova@suse.cz>
Date: Tue, 24 May 2011 17:23:35 +0200
Subject: [PATCH] fdo#35345: Query the sheet for the presence of anonymous DB ranges

... and for autofilters || query params in those. This avoids
overwriting the hidden cells in drag-fill operation
---
 sc/source/core/tool/dbcolect.cxx |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx
index 635ab5a..39b6575 100644
--- a/sc/source/core/tool/dbcolect.cxx
+++ b/sc/source/core/tool/dbcolect.cxx
@@ -827,7 +827,8 @@ ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO
 
 ScDBData* ScDBCollection::GetFilterDBAtTable(SCTAB nTab) const
 {
-    ScDBData* pDataEmpty = NULL;
+    ScDBData* pAnonData = pDoc->GetAnonymousDBData(nTab);
+
     if (pItems)
     {
         for (sal_uInt16 i = 0; i < nCount; i++)
@@ -843,7 +844,13 @@ ScDBData* ScDBCollection::GetFilterDBAtTable(SCTAB nTab) const
         }
     }
 
-    return pDataEmpty;
+    if (pAnonData)
+    {
+        if ( pAnonData->HasAutoFilter() || pAnonData->HasQueryParam())
+            return pAnonData;
+    }
+
+    return NULL;
 }
 
 sal_Bool ScDBCollection::SearchName( const String& rName, sal_uInt16& rIndex ) const
-- 
1.7.3.4

Attachment: signature.asc
Description: This is a digitally signed message part.


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.