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


Hello,

Here is the patch that fixes the Query wizard, it seems that it works
fine now, however the problem mentioned in the patch was a minor
problem, wizard worked wrong for all queries where I wanted to sort by
an aggregate field. Please review it,and push it to git.

Thanks,

Gabor
From 3210fcf363e242ecca3bfca686ef9b8ac91305ee Mon Sep 17 00:00:00 2001
From: Gabor Jenei <jengab@elte.hu>
Date: Fri, 12 Aug 2011 10:15:24 +0200
Subject: [PATCH] Bug 38486 SQL fix

---
 .../com/sun/star/wizards/db/SQLQueryComposer.java  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java 
b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index a6d2c2b..3f595f2 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -205,7 +205,7 @@ public class SQLQueryComposer
                 {
                     sOrder += ", ";
                 }
-                sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + 
CurDBMetaData.AggregateFieldNames[iAggregate][0] + ")";
+                sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + 
getComposedAliasFieldName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + ")";
                 sOrder += " " + CurDBMetaData.getSortFieldNames()[i][1];
                 m_queryComposer.setOrder(sOrder);
             }
-- 
1.7.2.5


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.