diff options
Diffstat (limited to 'sc/source/ui/docshell/dbdocfun.cxx')
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 19 |
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; |