Commits

Ocke Janssen [oj]  committed d5c9ff1

hsqldb19: #i117627# merge conflict with newer versions solved

  • Participants
  • Parent commits cdddc69

Comments (0)

Files changed (1)

File wizards/com/sun/star/wizards/table/FieldFormatter.java

     TableWizard CurUnoDialog;
     TableDescriptor curTableDescriptor;
     Object oColumnDescriptorModel;
-    XTextComponent txtfieldname;
     XListBox xlstFieldNames;
     XButton btnplus;
     XButton btnminus;
     String TOGGLEBUTTONS = "toggleButtons";
     String ADDFIELDNAME = "addFieldName";
     String REMOVEFIELDNAME = "removeFieldName";
-    String MODIFYFIELDNAME = "modifyFieldName";
     String[] fieldnames;
     String suntitled;
     Integer IFieldFormatStep;
         this.CurUnoDialog = _CurUnoDialog;
         curtabindex = (short) (TableWizard.SOFIELDSFORMATPAGE * 100);
         IFieldFormatStep = new Integer(TableWizard.SOFIELDSFORMATPAGE);
-	String sFieldName = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 23);
+		String sFieldName = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 23);
         String sFieldNames = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 25);
         String sfieldinfo = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 20);
         String sbtnplushelptext = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 45);
                     new Integer(8), sfieldinfo, new Integer(0), new Integer(158), new Integer(27), IFieldFormatStep, new Short(curtabindex++), new Integer(165)
                 });
 
-
-        CurUnoDialog.insertLabel("lblFieldName",
-                new String[]
-                {
-                    PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
-                },
-                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[]
-                {
-                    PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH
-                },
-                new Object[]
-                {
-                    UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGTABLE_COLNAME", new Integer(274), new Integer(37), IFieldFormatStep, new Short(curtabindex++), "", new Integer(50)
-                });
-        txtfieldname.addTextListener(CurUnoDialog);
         CurUnoDialog.getPeerConfiguration().setAccessibleName(btnplus, sbtnplushelptext);
         CurUnoDialog.getPeerConfiguration().setAccessibleName(btnminus, sbtnminushelptext);
     }
                     }, // PropertyNames.PROPERTY_HELPURL
                     new Object[]
                     {
-                        new Integer(85), new Integer(158), new Integer(49), IFieldFormatStep, new Short(curtabindex++), new Integer(166), new Integer(50)
+                        new Integer(93), new Integer(158), new Integer(39), IFieldFormatStep, new Short(curtabindex++), new Integer(166), new Integer(60)
                     });  //, "HID:WIZARDS_HID_DLGTABLE_COLMODIFIER"
             curTableDescriptor = _curTableDescriptor;
             Helper.setUnoPropertyValue(oColumnDescriptorModel, "ActiveConnection", _curTableDescriptor.DBConnection);
         }
         else
         {
-            Helper.setUnoPropertyValue(UnoDialog.getModel(txtfieldname), "Text", "");
             Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(benable));
             CurUnoDialog.setcompleted(TableWizard.SOFIELDSFORMATPAGE, benable);
         }
         CurUnoDialog.repaintDialogStep();
     }
 
-    public void modifyFieldName()
-    {
-        String newfieldname = txtfieldname.getText();
-        String oldfieldname = xlstFieldNames.getSelectedItem();
-        if (!newfieldname.equals(oldfieldname))
-        {
-            if (curTableDescriptor.modifyColumnName(oldfieldname, newfieldname))
-            {
-                Object oColumn = Helper.getUnoPropertyValue(oColumnDescriptorModel, "Column");
-                Helper.setUnoPropertyValue(oColumn, PropertyNames.PROPERTY_NAME, newfieldname);
-                FieldDescription curfielddescription = (FieldDescription) CurUnoDialog.fielditems.get(oldfieldname);
-                CurUnoDialog.fielditems.remove(oldfieldname);
-                curfielddescription.setName(newfieldname);
-                CurUnoDialog.fielditems.put(newfieldname, curfielddescription);
-                String[] fieldnames = xlstFieldNames.getItems();
-                short ipos = xlstFieldNames.getSelectedItemPos();
-                fieldnames[ipos] = newfieldname;
-                Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", fieldnames);
-                Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[]
-                        {
-                            ipos
-                        });
-            }
-        }
-    }
-
     public void shiftFieldNameUp()
     {
         short ipos = xlstFieldNames.getSelectedItemPos();