summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Machalkova <kmachalkova@suse.cz>2011-05-24 17:23:35 +0200
committerKohei Yoshida <kyoshida@novell.com>2011-05-24 13:07:02 -0400
commit465a643dfcd49d79f434c4959ead7b8bda39d88c (patch)
tree474d7517445d68ef005a5a611e42a78d2c50a205
parent345a5ab62a91822086392c9b2e196a2cc66e9bcc (diff)
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@googlemail.com> Signed-off-by: Kohei Yoshida <kyoshida@novell.com>
-rw-r--r--sc/source/core/tool/dbcolect.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx
index 635ab5a3f..39b65752c 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