summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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