Legacy reports (not Sun/Oracle Report Builder ones) don't sort by the
grouping columns.
Commit message is explanatory; shout if you have other question.
Please apply to libreoffice-3-5 branch.
--
Lionel
From 9fd39a5047a7735c2532787de8f98423eae9da06 Mon Sep 17 00:00:00 2001
From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Wed, 6 Jun 2012 14:22:45 +0200
Subject: [PATCH] fdo#48018 legacy reports do not sort by group columns
Legacy report means done with the "old" report system, as opposed to
with report builder.
This was caused by a misguided attempt to sort-of work around i#110536
instead of fixing it cleanly. Revert that.
Apparently the idea was to not explicitly set grouping columns as
sorting columns, but that the report execution would automagically add
grouping columns at begin of sorting list at report execution
time. That's a bad idea for at least two reasons:
* This does not allow the user to chose ASC/DESC for grouping columns
* In rare / advanced cases, sorting on another column *before*
grouping is desirable.
Plus, the "automagic adding" part apparently wasn't implemented
anyway.
Change-Id: I81e76eb4b6a0e543571a4df97d0ead77f6a2d7c8
---
.../com/sun/star/wizards/ui/SortingComponent.java | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java
b/wizards/com/sun/star/wizards/ui/SortingComponent.java
index e24ef33..6c50c9b 100644
--- a/wizards/com/sun/star/wizards/ui/SortingComponent.java
+++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java
@@ -258,13 +258,10 @@ public class SortingComponent
ArrayList<String> SortDescriptions = new ArrayList<String>();
for (int i = 0; i <= MaxSortIndex; i++)
{
- if (!((Boolean) CurUnoDialog.getControlProperty("lstSort" + (i + 1),
PropertyNames.READ_ONLY)))
- {
- CurFieldName = xSortListBox[i].getSelectedItem();
- SortDescriptions.add(CurFieldName);
- iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" +
Integer.toString(i + 1), PropertyNames.PROPERTY_STATE)).shortValue();
- SortFieldNames.add(new String[]{CurFieldName,iCurState == 1 ?
PropertyNames.ASC :"DESC" });
- }
+ CurFieldName = xSortListBox[i].getSelectedItem();
+ SortDescriptions.add(CurFieldName);
+ iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" +
Integer.toString(i + 1), PropertyNames.PROPERTY_STATE)).shortValue();
+ SortFieldNames.add(new String[]{CurFieldName,iCurState == 1 ? PropertyNames.ASC
:"DESC" });
}
// When searching for a duplicate entry we can neglect whether the entries are to be
sorted ascending or descending
// TODO for the future we should deliver a messagebox when two different sorting modes
have been applied to one field
--
1.7.7.3
Context
- [PATCH] [REVIEW:3-5] fdo#48018 legacy reports don't sort on grouping columns · Lionel Elie Mamane
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.