From 9f338a693e1f7ca0b649827103edab417bd9b4d5 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Tue, 4 Jan 2011 13:12:33 +0100 Subject: dba34c: #i20306# support for window function and limit fetch first, ... added --- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'dbaccess/source/ui/querydesign/QueryDesignView.cxx') diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 67385fd02d67..e0b4a665a8bc 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2061,6 +2061,13 @@ namespace break; } + const OSQLParseNode* pTableExp = pParseTree->getChild(3); + if ( pTableExp->getChild(6)->count() > 0 || pTableExp->getChild(7)->count() > 0 || pTableExp->getChild(8)->count() > 0) + { + eErrorCode = eStatementTooComplex; + break; + } + Reference< XConnection> xConnection = rController.getConnection(); if ( !xConnection.is() ) { @@ -2142,7 +2149,7 @@ namespace pTableView->RemoveTabWin(aIterTableMap->second); } - if ( eOk == (eErrorCode = FillOuterJoins(_pView,pParseTree->getChild(3)->getChild(0)->getChild(1))) ) + if ( eOk == (eErrorCode = FillOuterJoins(_pView,pTableExp->getChild(0)->getChild(1))) ) { // check if we have a distinct statement if(SQL_ISTOKEN(pParseTree->getChild(1),DISTINCT)) -- cgit From b7487b7abcf37bc54cdcb870454ded5bf8938e95 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Mon, 17 Jan 2011 14:06:45 +0100 Subject: dba34d: #i116345# create a new var in for loop --- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dbaccess/source/ui/querydesign/QueryDesignView.cxx') diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index e0b4a665a8bc..fc5f89a997b2 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2496,9 +2496,10 @@ namespace { OQueryController& rController = static_cast(_pView->getController()); ::connectivity::OSQLParseNode* pGroupBy = pSelectRoot->getChild(3)->getChild(2)->getChild(2); - OTableFieldDescRef aDragInfo = new OTableFieldDesc(); + for( sal_uInt32 i=0 ; i < pGroupBy->count() && eOk == eErrorCode; ++i ) { + OTableFieldDescRef aDragInfo = new OTableFieldDesc(); ::connectivity::OSQLParseNode* pParamRef = NULL; ::connectivity::OSQLParseNode* pArgument = pGroupBy->getChild( i ); if(SQL_ISRULE(pArgument,column_ref)) -- cgit