[Libreoffice-commits] .: Branch 'libreoffice-3-5' - wizards/com

Caolán McNamara caolan at kemper.freedesktop.org
Wed Jun 6 07:30:45 PDT 2012


 wizards/com/sun/star/wizards/ui/SortingComponent.java |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit b8b7e7ea20397fa9e0d0470a19667e88c7c049cb
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Jun 6 15:10:00 2012 +0100

    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: Ia7f3836bb1ecfbdf3575040bb1f3998d09a1c257

diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java
index 48ac44b..a6de255 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 wether 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


More information about the Libreoffice-commits mailing list