Attached patch fixes fdo#46843, namely that the graphical query editor loses the query's sorting order. (most annoying, severity critical)
Culprit: commit 33b9b857ea6cb5a6f731de68f58e532242c43d30 Author: Ocke Janssen [oj] <ocke.jans...@oracle.com> Date: Tue Jan 4 13:12:33 2011 +0100 dba34c: #i20306# support for window function and limit fetch first, ... added Which pushed the order by clause from fourth to fifth position in table_exp rule of connectivity/source/parse/sqlbison.y Please apply to libreoffice-3-5. -- Lionel
>From 80c235510aeb19d4df6a07be7499e70122313bbf Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane <lio...@mamane.lu> Date: Thu, 15 Mar 2012 11:22:32 +0100 Subject: [PATCH] fdo#46843 look for order by clause as fifth child of select_statement Since commit 33b9b857ea6cb5a6f731de68f58e532242c43d30 (dba34c: #i20306# support for window function and limit fetch first, ... added), order by is the fifth child. It was the fourth one before. --- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 397cedb..267c7a9 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2319,10 +2319,9 @@ namespace const ::connectivity::OSQLParseNode* pParseRoot ) { SqlParseError eErrorCode = eOk; - if (!pParseRoot->getChild(3)->getChild(4)->isLeaf()) + if (!pParseRoot->getChild(3)->getChild(ORDER_BY_CHILD_POS)->isLeaf()) { - ::connectivity::OSQLParseNode* pNode = pParseRoot->getChild(3)->getChild(4)->getChild(2); + ::connectivity::OSQLParseNode* pNode = pParseRoot->getChild(3)->getChild(ORDER_BY_CHILD_POS)->getChild(2); ::connectivity::OSQLParseNode* pParamRef = NULL; OQueryController& rController = static_cast<OQueryController&>(_pView->getController()); -- 1.7.7.3
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice