summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/dbcolect.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/dbcolect.cxx')
-rw-r--r--sc/source/core/tool/dbcolect.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx
index 89234f9d4b37..4118f9dcd7f9 100644
--- a/sc/source/core/tool/dbcolect.cxx
+++ b/sc/source/core/tool/dbcolect.cxx
@@ -222,6 +222,11 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
return *this;
}
+SCTAB ScDBData::GetTable() const
+{
+ return nTable;
+}
+
bool ScDBData::operator== (const ScDBData& rData) const
{
// Daten, die nicht in den Params sind
@@ -820,6 +825,27 @@ ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO
return NULL;
}
+ScDBData* ScDBCollection::GetFilterDBAtTable(SCTAB nTab) const
+{
+ ScDBData* pDataEmpty = NULL;
+ if (pItems)
+ {
+ for (sal_uInt16 i = 0; i < nCount; i++)
+ {
+ ScDBData* pDBTemp = (ScDBData*)pItems[i];
+ if ( pDBTemp->GetTable() == nTab )
+ {
+ sal_Bool bFilter = pDBTemp->HasAutoFilter() || pDBTemp->HasQueryParam();
+
+ if ( bFilter )
+ return pDBTemp;
+ }
+ }
+ }
+
+ return pDataEmpty;
+}
+
sal_Bool ScDBCollection::SearchName( const String& rName, sal_uInt16& rIndex ) const
{
if (rtl::OUString(rName)==rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME)))