[Libreoffice-commits] core.git: Branch 'aoo/trunk' - dbaccess/source

Damjan Jovanovic damjan at apache.org
Mon Nov 9 12:09:17 PST 2015


 dbaccess/source/ui/querydesign/QueryDesignView.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 97a42ad0d0816ffcc5fc12fed85a1f3789544fc8
Author: Damjan Jovanovic <damjan at apache.org>
Date:   Mon Nov 9 18:14:21 2015 +0000

    #i121096# When editing a table query in Design View, the ORDER BY clause of the the query being edited is ignored.
    
    When Base's Query Design View parses the SQL query, it looked at the wrong node position
    in the SQL parse tree for the ORDER BY clause (child 4 = join instead of child 5 = order by),
    causing the sort order to be forgotten. Fix this.
    
    Patch by: me

diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 60f4688..7bfff8b 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2400,9 +2400,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());


More information about the Libreoffice-commits mailing list