[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Tue May 24 10:08:00 PDT 2011


 sc/source/core/tool/dbcolect.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 465a643dfcd49d79f434c4959ead7b8bda39d88c
Author: Katarina Machalkova <kmachalkova at suse.cz>
Date:   Tue May 24 17:23:35 2011 +0200

    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
    
    Signed-off-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Signed-off-by: Kohei Yoshida <kyoshida at novell.com>

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


More information about the Libreoffice-commits mailing list