summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-05-05 17:59:58 +0200
committerKohei Yoshida <kyoshida@novell.com>2011-05-09 14:47:50 -0400
commitc831d4236f705d40b6bdd2280a15ccb56037c567 (patch)
treed92a06fa7dec790cef147577b1ce8a7bc00efe4d /sc/source/ui/docshell
parentee5f0edcaf34d4ff2228ff0836969f68382502aa (diff)
use sheet local db data in ScVbaRange::Autofilter
Signed-off-by: Kohei Yoshida <kyoshida@novell.com>
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 8991706293a1..8fde7e29e57a 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -255,7 +255,7 @@ sal_Bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, sal_Bool /* bApi *
// -----------------------------------------------------------------
-sal_Bool ScDBDocFunc::RepeatDB( const String& rDBName, sal_Bool bRecord, sal_Bool bApi )
+sal_Bool ScDBDocFunc::RepeatDB( const String& rDBName, sal_Bool bRecord, sal_Bool bApi, bool bIsUnnamed, SCTAB aTab )
{
//! auch fuer ScDBFunc::RepeatDB benutzen!
@@ -263,12 +263,21 @@ sal_Bool ScDBDocFunc::RepeatDB( const String& rDBName, sal_Bool bRecord, sal_Boo
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
bRecord = false;
- ScDBCollection* pColl = pDoc->GetDBCollection();
- sal_uInt16 nIndex;
- if ( pColl && pColl->SearchName( rDBName, nIndex ) )
+ ScDBData* pDBData = NULL;
+ if (bIsUnnamed)
{
- ScDBData* pDBData = (*pColl)[nIndex];
+ pDBData = pDoc->GetAnonymousDBData( aTab );
+ }
+ else
+ {
+ sal_uInt16 nIndex;
+ ScDBCollection* pColl = pDoc->GetDBCollection();
+ if ( pColl && pColl->SearchName( rDBName, nIndex ) )
+ pDBData = (*pColl)[nIndex];
+ }
+ if ( pDBData )
+ {
ScQueryParam aQueryParam;
pDBData->GetQueryParam( aQueryParam );
sal_Bool bQuery = aQueryParam.GetEntry(0).bDoQuery;