Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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.Janssen@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 <lionel@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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.