Commits

Anonymous committed e99e145

hsqldb19: #i115262# fallback for longvarbinary to blob

Comments (0)

Files changed (3)

wizards/com/sun/star/wizards/db/TypeInspector.java

                 case DataType.VARCHAR:
                     retDataType = getLastConversionFallbackDataType();
                     break;
+                case DataType.LONGVARBINARY:
+                    if (supportsDataType(DataType.BLOB))
+                    {
+                        retDataType = DataType.BLOB;
+                    }
+                    else
+                    {
+                        retDataType = getLastConversionFallbackDataType();
+                    }
+                    break;
                 default:
                     retDataType = getLastConversionFallbackDataType();
             }

wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java

                 int nType = getTypeFromFieldName(convertFromFieldName(_sFormattedfield));
                 if (nType == DataType.BINARY ||
                     nType == DataType.VARBINARY ||
-                    nType == DataType.LONGVARBINARY)
+                    nType == DataType.LONGVARBINARY ||
+                    nType == DataType.BLOB )
                 {
                     aField = getMSFofReportDefinition().createInstance("com.sun.star.report.ImageControl");
                     nHeight = LayoutConstants.BinaryHeight;
 
                     if (nType == DataType.BINARY ||
                         nType == DataType.VARBINARY ||
-                        nType == DataType.LONGVARBINARY)
+                        nType == DataType.LONGVARBINARY ||
+                        nType == DataType.BLOB)
                     {
                         // aField = getMSFofReportDefinition().createInstance("com.sun.star.report.ImageControl");
                         final XImageControl xImageControl = (XImageControl) UnoRuntime.queryInterface(XImageControl.class, xReportControlModel);

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

     TableWizard CurUnoDialog;
     TableDescriptor curTableDescriptor;
     Object oColumnDescriptorModel;
-    XTextComponent txtfieldname;
     XListBox xlstFieldNames;
     XButton btnplus;
     XButton btnminus;
         this.CurUnoDialog = _CurUnoDialog;
         curtabindex = (short) (TableWizard.SOFIELDSFORMATPAGE * 100);
         IFieldFormatStep = new Integer(TableWizard.SOFIELDSFORMATPAGE);
-        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);
                 });
 
 
-        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(94)
-                });
-
-        txtfieldname = CurUnoDialog.insertTextField("txtfieldname", MODIFYFIELDNAME, this,
-                new String[]
-                {
-                    "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Text", "Width"
-                },
-                new Object[]
-                {
-                    UIConsts.INTEGER_12, "HID:41225", 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);
     }
                     }, // "HelpURL"
                     new Object[]
                     {
-                        new Integer(85), new Integer(158), new Integer(49), IFieldFormatStep, new Short(curtabindex++), new Integer(166), new Integer(50)
+                        new Integer(95), new Integer(159), new Integer(39), IFieldFormatStep, new Short(curtabindex++), new Integer(166), new Integer(50)
                     });  //, "HID:41226"
             curTableDescriptor = _curTableDescriptor;
             Helper.setUnoPropertyValue(oColumnDescriptorModel, "ActiveConnection", _curTableDescriptor.DBConnection);
-            txtfieldname.setMaxTextLen((short) this.curTableDescriptor.getMaxColumnNameLength());
         }
         else
         {
         }
         else
         {
-            Helper.setUnoPropertyValue(UnoDialog.getModel(txtfieldname), "Text", "");
+
             Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), "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, "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();
 
     public boolean updateColumnofColumnDescriptor()
     {
-        Object oColumn = Helper.getUnoPropertyValue(oColumnDescriptorModel, "Column");
-        XPropertySet xColPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oColumn);
-        if (xColPropertySet != null)
-        {
-            curTableDescriptor.modifyColumn(txtfieldname.getText(), xColPropertySet);
-            return true;
-        }
-        return false;
+        return true;
     }
 
     private void updateColumnDescriptor(String _ColumnName, XPropertySet _xColumn)
         {
             Helper.setUnoPropertyValue(oColumnDescriptorModel, "Column", xNewPropertySet);
         }
-        txtfieldname.setText(_ColumnName);
     }
 
     public XPropertySet clonePropertySet(XPropertySet _xPropertySet)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.