Kaydet (Commit) 7a78f702 authored tarafından Pascal Junck's avatar Pascal Junck

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
üst 8db811b6
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: SortingComponent.java,v $ * $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 * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -206,9 +206,11 @@ public class SortingComponent { ...@@ -206,9 +206,11 @@ public class SortingComponent {
String CurFieldTitle; String CurFieldTitle;
setMaxSortIndex(); setMaxSortIndex();
String[][] SortFieldNames = new String[MaxSortIndex + 1][2]; String[][] SortFieldNames = new String[MaxSortIndex + 1][2];
String[] SortDescriptions = new String[MaxSortIndex+1];
for (int i = 0; i <= MaxSortIndex; i++) { for (int i = 0; i <= MaxSortIndex; i++) {
CurFieldName = xSortListBox[i].getSelectedItem(); CurFieldName = xSortListBox[i].getSelectedItem();
SortFieldNames[i][0] = CurFieldName; SortFieldNames[i][0] = CurFieldName;
SortDescriptions[i] = CurFieldName;
iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" + new Integer(i + 1).toString(), "State")).shortValue(); iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" + new Integer(i + 1).toString(), "State")).shortValue();
SortFieldNames[i][0] = CurFieldName; SortFieldNames[i][0] = CurFieldName;
if (iCurState == 1) if (iCurState == 1)
...@@ -216,11 +218,14 @@ public class SortingComponent { ...@@ -216,11 +218,14 @@ public class SortingComponent {
else else
SortFieldNames[i][1] = "DESC"; 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) { if (iduplicate != -1) {
String sLocSortCriteriaisduplicate = JavaTools.replaceSubString(sSortCriteriaisduplicate, SortFieldNames[iduplicate][0], "<FIELDNAME>"); 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.vetoableChange(new PropertyChangeEvent(CurUnoDialog, "Steps", new Integer(1), new Integer(2)));
CurUnoDialog.setFocus("lstSort" + (iduplicate + 1));
return new String[][] { return new String[][] {
}; };
} else } else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment