summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorPascal Junck <pjunck@openoffice.org>2004-10-27 12:42:16 +0000
committerPascal Junck <pjunck@openoffice.org>2004-10-27 12:42:16 +0000
commit7a78f7020adc937e74fa76733c0794f1a1df40b0 (patch)
treeb47d168525948498fb78136ffe9b7171ef1866ea /wizards
parent8db811b65b2d2b80a2ab3ce099fdf555a319258c (diff)
INTEGRATION: CWS dbwizard1 (1.2.36); FILE MERGED
2004/10/01 12:39:05 bc 1.2.36.2: ## several changes in dbwizards 2004/09/15 19:41:46 bc 1.2.36.1: ##several changes for all database wizards
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/ui/SortingComponent.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java
index ef8ab6724de5..796ac6f94437 100644
--- a/wizards/com/sun/star/wizards/ui/SortingComponent.java
+++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java
@@ -2,9 +2,9 @@
*
* $RCSfile: SortingComponent.java,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: kz $ $Date: 2004-05-19 13:05:52 $
+ * last change: $Author: pjunck $ $Date: 2004-10-27 13:42:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -206,9 +206,11 @@ public class SortingComponent {
String CurFieldTitle;
setMaxSortIndex();
String[][] SortFieldNames = new String[MaxSortIndex + 1][2];
+ String[] SortDescriptions = new String[MaxSortIndex+1];
for (int i = 0; i <= MaxSortIndex; i++) {
CurFieldName = xSortListBox[i].getSelectedItem();
SortFieldNames[i][0] = CurFieldName;
+ SortDescriptions[i] = CurFieldName;
iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" + new Integer(i + 1).toString(), "State")).shortValue();
SortFieldNames[i][0] = CurFieldName;
if (iCurState == 1)
@@ -216,11 +218,14 @@ public class SortingComponent {
else
SortFieldNames[i][1] = "DESC";
}
- int iduplicate = JavaTools.getDuplicateFieldIndex(SortFieldNames);
+ // 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
+ int iduplicate = JavaTools.getDuplicateFieldIndex(SortDescriptions);
if (iduplicate != -1) {
String sLocSortCriteriaisduplicate = JavaTools.replaceSubString(sSortCriteriaisduplicate, SortFieldNames[iduplicate][0], "<FIELDNAME>");
- SystemDialog.showMessageBox(xMSF, "WarningBox", VclWindowPeerAttribute.OK, sLocSortCriteriaisduplicate);
+ CurUnoDialog.showMessageBox("WarningBox", VclWindowPeerAttribute.OK, sLocSortCriteriaisduplicate);
CurUnoDialog.vetoableChange(new PropertyChangeEvent(CurUnoDialog, "Steps", new Integer(1), new Integer(2)));
+ CurUnoDialog.setFocus("lstSort" + (iduplicate + 1));
return new String[][] {
};
} else