diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-12-28 16:23:35 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-12-28 16:23:35 +0000 |
commit | ea926cf24d74ea22c5509a1462c0ad7698d65f16 (patch) | |
tree | 3fe796b702aafdb015f2c36b29e72942ab68fabd /wizards/com/sun/star/wizards/table/FieldFormatter.java | |
parent | 581a3f3ff4cf24ba608a8739fc6ee6a9f1b95fe5 (diff) |
INTEGRATION: CWS dbwizardpp1 (1.5.26); FILE MERGED
2005/12/15 18:09:59 bc 1.5.26.4: #i56509# label's width reduced
Issue number:
Submitted by:
Reviewed by:
2005/12/13 16:46:40 bc 1.5.26.3: #i37223#several changes
2005/12/06 01:06:46 bc 1.5.26.2: RESYNC: (1.5-1.6); FILE MERGED
2005/05/27 13:54:15 bc 1.5.26.1: #i48562# implemented Fallback for too long shortfieldnames
Diffstat (limited to 'wizards/com/sun/star/wizards/table/FieldFormatter.java')
-rw-r--r-- | wizards/com/sun/star/wizards/table/FieldFormatter.java | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java b/wizards/com/sun/star/wizards/table/FieldFormatter.java index 884fbd6dba9f..cee1fddbbdcb 100644 --- a/wizards/com/sun/star/wizards/table/FieldFormatter.java +++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java @@ -4,9 +4,9 @@ * * $RCSfile: FieldFormatter.java,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: rt $ $Date: 2005-09-09 09:40:15 $ + * last change: $Author: hr $ $Date: 2005-12-28 17:23:35 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -134,7 +134,7 @@ public class FieldFormatter implements XItemListener{ CurUnoDialog.insertLabel("lblFieldName", new String[] {"Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width"}, - new Object[] {UIConsts.INTEGERS[8], sFieldName, new Integer(158), new Integer(39),IFieldFormatStep, new Short(curtabindex++), new Integer(100)}); + new Object[] {UIConsts.INTEGERS[8], sFieldName, new Integer(158), new Integer(39),IFieldFormatStep, new Short(curtabindex++), new Integer(94)}); txtfieldname = CurUnoDialog.insertTextField("txtfieldname", MODIFYFIELDNAME, this, new String[] {"Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Text", "Width"}, @@ -243,6 +243,8 @@ public class FieldFormatter implements XItemListener{ String oldfieldname = xlstFieldNames.getSelectedItem(); if (!newfieldname.equals(oldfieldname)){ if (curTableDescriptor.modifyColumnName(oldfieldname, newfieldname)){ + Object oColumn = Helper.getUnoPropertyValue(oColumnDescriptorModel, "Column"); + Helper.setUnoPropertyValue(oColumn, "Name", newfieldname); FieldDescription curfielddescription = (FieldDescription) CurUnoDialog.fielditems.get(oldfieldname); CurUnoDialog.fielditems.remove(oldfieldname); curfielddescription.setName(newfieldname); @@ -261,8 +263,10 @@ public class FieldFormatter implements XItemListener{ short ipos = xlstFieldNames.getSelectedItemPos(); String[] snewlist = shiftArrayItem(xlstFieldNames.getItems(), ipos, -1); Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", snewlist); - if ((ipos - 1) > -1) - xlstFieldNames.selectItemPos((short) (ipos - 1), true); + if ((ipos - 1) > -1){ + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[] {(short) (ipos-1)}); + curTableDescriptor.moveColumn(ipos, ipos-1); + } toggleButtons(); } @@ -271,8 +275,10 @@ public class FieldFormatter implements XItemListener{ short ipos = xlstFieldNames.getSelectedItemPos(); String[] snewlist = shiftArrayItem(xlstFieldNames.getItems(), ipos, 1); Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", snewlist); - if ((ipos + 1) < xlstFieldNames.getItemCount()) - xlstFieldNames.selectItemPos((short) (ipos + 1), true); + if ((ipos + 1) < xlstFieldNames.getItemCount()){ + Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[] {(short) (ipos+1)}); + curTableDescriptor.moveColumn(ipos, ipos+1); + } toggleButtons(); } |