Kaydet (Commit) a96c308e authored tarafından Noel Grandin's avatar Noel Grandin

java: these fields can be converted to local variables

Change-Id: Ifefb5de196a3e5cbaa8945759da42886c69daacf
üst 0897aae2
...@@ -102,7 +102,9 @@ public class OOoBean ...@@ -102,7 +102,9 @@ public class OOoBean
Neither a connection is established nor any document loaded. Neither a connection is established nor any document loaded.
*/ */
public OOoBean() public OOoBean()
{} {
setLayout(new java.awt.BorderLayout());
}
// @requirement FUNC.CON.MULT/0.3 // @requirement FUNC.CON.MULT/0.3
/** Constructor for an OOoBean which uses a specific office connection. /** Constructor for an OOoBean which uses a specific office connection.
...@@ -120,6 +122,7 @@ public class OOoBean ...@@ -120,6 +122,7 @@ public class OOoBean
public OOoBean( OfficeConnection iConnection ) public OOoBean( OfficeConnection iConnection )
throws NoConnectionException throws NoConnectionException
{ {
setLayout(new java.awt.BorderLayout());
try { setOOoConnection( iConnection ); } try { setOOoConnection( iConnection ); }
catch ( HasConnectionException aExc ) catch ( HasConnectionException aExc )
{ /* impossible here */ } { /* impossible here */ }
...@@ -1305,11 +1308,6 @@ xLayoutManager.showElement("private:resource/menubar/menubar"); ...@@ -1305,11 +1308,6 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
// Helper Methods / Internal Methods // Helper Methods / Internal Methods
// general instance intializer
{
setLayout(new java.awt.BorderLayout());
}
@Deprecated @Deprecated
@Override @Override
public void paint( java.awt.Graphics aGraphics ) public void paint( java.awt.Graphics aGraphics )
......
...@@ -33,10 +33,8 @@ public class DatabaseDocument ...@@ -33,10 +33,8 @@ public class DatabaseDocument
{ {
protected DatabaseDocument( final DataSource _dataSource ) protected DatabaseDocument( final DataSource _dataSource )
{ {
m_dataSource = _dataSource;
XDocumentDataSource docDataSource = UnoRuntime.queryInterface( XDocumentDataSource docDataSource = UnoRuntime.queryInterface(
XDocumentDataSource.class, m_dataSource.getDataSource() ); XDocumentDataSource.class, _dataSource.getDataSource() );
m_databaseDocument = UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, m_databaseDocument = UnoRuntime.queryInterface(XOfficeDatabaseDocument.class,
docDataSource.getDatabaseDocument() ); docDataSource.getDatabaseDocument() );
...@@ -67,7 +65,6 @@ public class DatabaseDocument ...@@ -67,7 +65,6 @@ public class DatabaseDocument
m_storeDoc.storeAsURL( _url, new PropertyValue[] { } ); m_storeDoc.storeAsURL( _url, new PropertyValue[] { } );
} }
private final DataSource m_dataSource;
private final XOfficeDatabaseDocument m_databaseDocument; private final XOfficeDatabaseDocument m_databaseDocument;
private final XModel m_model; private final XModel m_model;
private final XStorable m_storeDoc; private final XStorable m_storeDoc;
......
...@@ -27,22 +27,16 @@ import com.sun.star.uno.UnoRuntime; ...@@ -27,22 +27,16 @@ import com.sun.star.uno.UnoRuntime;
public class Resource public class Resource
{ {
private XMultiServiceFactory xMSF;
private String Module;
private XIndexAccess xStringIndexAccess; private XIndexAccess xStringIndexAccess;
private XIndexAccess xStringListIndexAccess;
/** Creates a new instance of Resource /** Creates a new instance of Resource
*/ */
public Resource(XMultiServiceFactory _xMSF, String _Module) public Resource(XMultiServiceFactory _xMSF, String _Module)
{ {
this.xMSF = _xMSF;
this.Module = _Module;
try try
{ {
Object[] aArgs = new Object[1]; Object[] aArgs = new Object[] { _Module };
aArgs[0] = this.Module; XInterface xResource = (XInterface) _xMSF.createInstanceWithArguments(
XInterface xResource = (XInterface) xMSF.createInstanceWithArguments(
"org.libreoffice.resource.ResourceIndexAccess", "org.libreoffice.resource.ResourceIndexAccess",
aArgs); aArgs);
if (xResource == null) if (xResource == null)
...@@ -55,10 +49,10 @@ public class Resource ...@@ -55,10 +49,10 @@ public class Resource
this.xStringIndexAccess = UnoRuntime.queryInterface( this.xStringIndexAccess = UnoRuntime.queryInterface(
XIndexAccess.class, XIndexAccess.class,
xNameAccess.getByName("String")); xNameAccess.getByName("String"));
this.xStringListIndexAccess = UnoRuntime.queryInterface( XIndexAccess xStringListIndexAccess = UnoRuntime.queryInterface(
XIndexAccess.class, XIndexAccess.class,
xNameAccess.getByName("StringList")); xNameAccess.getByName("StringList"));
if(this.xStringListIndexAccess == null) if(xStringListIndexAccess == null)
throw new Exception("could not initialize xStringListIndexAccess"); throw new Exception("could not initialize xStringListIndexAccess");
if(this.xStringIndexAccess == null) if(this.xStringIndexAccess == null)
throw new Exception("could not initialize xStringIndexAccess"); throw new Exception("could not initialize xStringIndexAccess");
...@@ -66,7 +60,7 @@ public class Resource ...@@ -66,7 +60,7 @@ public class Resource
catch (Exception exception) catch (Exception exception)
{ {
exception.printStackTrace(); exception.printStackTrace();
showCommonResourceError(xMSF); showCommonResourceError(_xMSF);
} }
} }
......
...@@ -34,9 +34,6 @@ public class QueryMetaData extends CommandMetaData ...@@ -34,9 +34,6 @@ public class QueryMetaData extends CommandMetaData
public PropertyValue[][] GroupByFilterConditions = new PropertyValue[][] public PropertyValue[][] GroupByFilterConditions = new PropertyValue[][]
{ {
}; };
private String[] UniqueAggregateFieldNames = new String[]
{
};
public int Type = QueryType.SODETAILQUERY; public int Type = QueryType.SODETAILQUERY;
public interface QueryType public interface QueryType
...@@ -212,9 +209,7 @@ public class QueryMetaData extends CommandMetaData ...@@ -212,9 +209,7 @@ public class QueryMetaData extends CommandMetaData
UniqueAggregateFieldVector.add(AggregateFieldNames[i][0]); UniqueAggregateFieldVector.add(AggregateFieldNames[i][0]);
} }
} }
UniqueAggregateFieldNames = new String[UniqueAggregateFieldVector.size()]; return UniqueAggregateFieldVector.toArray(new String[UniqueAggregateFieldVector.size()]);
UniqueAggregateFieldVector.toArray(UniqueAggregateFieldNames);
return UniqueAggregateFieldNames;
} }
public boolean hasNumericalFields() public boolean hasNumericalFields()
......
...@@ -45,7 +45,6 @@ public class TypeInspector ...@@ -45,7 +45,6 @@ public class TypeInspector
DataType.INTEGER, DataType.FLOAT, DataType.REAL, DataType.DOUBLE, DataType.NUMERIC, DataType.DECIMAL DataType.INTEGER, DataType.FLOAT, DataType.REAL, DataType.DOUBLE, DataType.NUMERIC, DataType.DECIMAL
}; };
static final int INVALID = 999999; static final int INVALID = 999999;
private XResultSet xResultSet;
public class TypeInfo public class TypeInfo
{ {
...@@ -61,7 +60,6 @@ public class TypeInspector ...@@ -61,7 +60,6 @@ public class TypeInspector
{ {
try try
{ {
xResultSet = _xResultSet;
ArrayList<String> aTypeNameVector = new ArrayList<String>(); ArrayList<String> aTypeNameVector = new ArrayList<String>();
ArrayList<Integer> aTypeVector = new ArrayList<Integer>(); ArrayList<Integer> aTypeVector = new ArrayList<Integer>();
ArrayList<Integer> aNullableVector = new ArrayList<Integer>(); ArrayList<Integer> aNullableVector = new ArrayList<Integer>();
...@@ -70,8 +68,8 @@ public class TypeInspector ...@@ -70,8 +68,8 @@ public class TypeInspector
ArrayList<Integer> aMinScaleVector = new ArrayList<Integer>(); ArrayList<Integer> aMinScaleVector = new ArrayList<Integer>();
ArrayList<Integer> aMaxScaleVector = new ArrayList<Integer>(); ArrayList<Integer> aMaxScaleVector = new ArrayList<Integer>();
ArrayList<Integer> aSearchableVector = new ArrayList<Integer>(); ArrayList<Integer> aSearchableVector = new ArrayList<Integer>();
XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet); XRow xRow = UnoRuntime.queryInterface(XRow.class, _xResultSet);
while (xResultSet.next()) while (_xResultSet.next())
{ {
aTypeNameVector.add(xRow.getString(1)); aTypeNameVector.add(xRow.getString(1));
aTypeVector.add(Integer.valueOf(xRow.getShort(2))); aTypeVector.add(Integer.valueOf(xRow.getShort(2)));
......
...@@ -43,7 +43,6 @@ public class Control extends Shape ...@@ -43,7 +43,6 @@ public class Control extends Shape
private XControl xControl; private XControl xControl;
public XPropertySet xPropertySet; public XPropertySet xPropertySet;
XWindowPeer xWindowPeer; XWindowPeer xWindowPeer;
private String sServiceName;
private static final int SOMAXTEXTSIZE = 50; private static final int SOMAXTEXTSIZE = 50;
private int icontroltype; private int icontroltype;
private XNameContainer xFormName; private XNameContainer xFormName;
...@@ -76,7 +75,7 @@ public class Control extends Shape ...@@ -76,7 +75,7 @@ public class Control extends Shape
try try
{ {
icontroltype = _icontroltype; icontroltype = _icontroltype;
sServiceName = oFormHandler.sModelServices[getControlType()]; String sServiceName = oFormHandler.sModelServices[getControlType()];
Object oControlModel = oFormHandler.xMSFDoc.createInstance(sServiceName); Object oControlModel = oFormHandler.xMSFDoc.createInstance(sServiceName);
xControlModel = UnoRuntime.queryInterface( XControlModel.class, oControlModel ); xControlModel = UnoRuntime.queryInterface( XControlModel.class, oControlModel );
xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, oControlModel ); xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, oControlModel );
......
...@@ -88,7 +88,6 @@ public class FormHandler ...@@ -88,7 +88,6 @@ public class FormHandler
private XNameAccess xNamedForms; private XNameAccess xNamedForms;
XControlAccess xControlAccess; XControlAccess xControlAccess;
XShapeGrouper xShapeGrouper; XShapeGrouper xShapeGrouper;
private XNameContainer xNamedFormContainer;
public static class ControlData public static class ControlData
{ {
...@@ -224,7 +223,7 @@ public class FormHandler ...@@ -224,7 +223,7 @@ public class FormHandler
private boolean hasFormByName(String _FormName) private boolean hasFormByName(String _FormName)
{ {
xNamedFormContainer = getDocumentForms(); XNameContainer xNamedFormContainer = getDocumentForms();
xNamedForms = UnoRuntime.queryInterface(XNameAccess.class, xNamedFormContainer); xNamedForms = UnoRuntime.queryInterface(XNameAccess.class, xNamedFormContainer);
return xNamedForms.hasByName(_FormName); return xNamedForms.hasByName(_FormName);
} }
......
...@@ -35,12 +35,10 @@ import com.sun.star.lang.XMultiServiceFactory; ...@@ -35,12 +35,10 @@ import com.sun.star.lang.XMultiServiceFactory;
public class GridControl extends Shape public class GridControl extends Shape
{ {
private FieldColumn[] fieldcolumns;
public XNameContainer xNameContainer; public XNameContainer xNameContainer;
public XGridColumnFactory xGridColumnFactory; public XGridColumnFactory xGridColumnFactory;
public XPropertySet xPropertySet; public XPropertySet xPropertySet;
XNameAccess xNameAccess; XNameAccess xNameAccess;
private XControlModel xControlModel;
public XComponent xComponent; public XComponent xComponent;
public GridControl(XMultiServiceFactory _xMSF, String _sname, FormHandler _oFormHandler, XNameContainer _xFormName, FieldColumn[] _fieldcolumns, Point _aPoint, Size _aSize) public GridControl(XMultiServiceFactory _xMSF, String _sname, FormHandler _oFormHandler, XNameContainer _xFormName, FieldColumn[] _fieldcolumns, Point _aPoint, Size _aSize)
...@@ -48,21 +46,20 @@ public class GridControl extends Shape ...@@ -48,21 +46,20 @@ public class GridControl extends Shape
super(_oFormHandler, _aPoint, _aSize); super(_oFormHandler, _aPoint, _aSize);
try try
{ {
fieldcolumns = _fieldcolumns;
Object oGridModel = oFormHandler.xMSFDoc.createInstance(oFormHandler.sModelServices[FormHandler.SOGRIDCONTROL]); Object oGridModel = oFormHandler.xMSFDoc.createInstance(oFormHandler.sModelServices[FormHandler.SOGRIDCONTROL]);
xNameContainer = UnoRuntime.queryInterface( XNameContainer.class, oGridModel ); xNameContainer = UnoRuntime.queryInterface( XNameContainer.class, oGridModel );
xNameAccess = UnoRuntime.queryInterface( XNameAccess.class, oGridModel ); xNameAccess = UnoRuntime.queryInterface( XNameAccess.class, oGridModel );
_xFormName.insertByName(_sname, oGridModel); _xFormName.insertByName(_sname, oGridModel);
xControlModel = UnoRuntime.queryInterface( XControlModel.class, oGridModel ); XControlModel xControlModel = UnoRuntime.queryInterface( XControlModel.class, oGridModel );
xControlShape.setControl(xControlModel); xControlShape.setControl(xControlModel);
xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, oGridModel ); xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, oGridModel );
oFormHandler.xDrawPage.add(xShape); oFormHandler.xDrawPage.add(xShape);
xGridColumnFactory = UnoRuntime.queryInterface( XGridColumnFactory.class, oGridModel ); xGridColumnFactory = UnoRuntime.queryInterface( XGridColumnFactory.class, oGridModel );
xComponent = UnoRuntime.queryInterface( XComponent.class, oGridModel ); xComponent = UnoRuntime.queryInterface( XComponent.class, oGridModel );
for (int i = 0; i < fieldcolumns.length; i++) for (int i = 0; i < _fieldcolumns.length; i++)
{ {
FieldColumn curfieldcolumn = fieldcolumns[i]; FieldColumn curfieldcolumn = _fieldcolumns[i];
if (curfieldcolumn.getFieldType() == DataType.TIMESTAMP) if (curfieldcolumn.getFieldType() == DataType.TIMESTAMP)
{ {
new TimeStampControl(new Resource(_xMSF, "dbw"), this, curfieldcolumn); new TimeStampControl(new Resource(_xMSF, "dbw"), this, curfieldcolumn);
......
...@@ -39,9 +39,7 @@ public class TimeStampControl extends DatabaseControl ...@@ -39,9 +39,7 @@ public class TimeStampControl extends DatabaseControl
private Resource oResource; private Resource oResource;
private double nreldatewidth; private double nreldatewidth;
private double nreltimewidth; private double nreltimewidth;
private int nTimeWidth;
private int nDBWidth; private int nDBWidth;
private int nDateWidth;
XShape xShapeGroup; XShape xShapeGroup;
public TimeStampControl(Resource _oResource, FormHandler _oFormHandler, XNameContainer _xFormName, String _curFieldName, Point _aPoint) public TimeStampControl(Resource _oResource, FormHandler _oFormHandler, XNameContainer _xFormName, String _curFieldName, Point _aPoint)
...@@ -50,11 +48,11 @@ public class TimeStampControl extends DatabaseControl ...@@ -50,11 +48,11 @@ public class TimeStampControl extends DatabaseControl
oResource = _oResource; oResource = _oResource;
oDateControl = new DatabaseControl(oFormHandler, _xFormName, _curFieldName, DataType.DATE, aPoint); oDateControl = new DatabaseControl(oFormHandler, _xFormName, _curFieldName, DataType.DATE, aPoint);
int nDBHeight = oDateControl.getControlHeight(); int nDBHeight = oDateControl.getControlHeight();
nDateWidth = oDateControl.getPreferredWidth(); int nDateWidth = oDateControl.getPreferredWidth();
oDateControl.setSize(new Size(nDateWidth, nDBHeight)); oDateControl.setSize(new Size(nDateWidth, nDBHeight));
Point aTimePoint = new Point(aPoint.X + 10 + nDateWidth, aPoint.Y); Point aTimePoint = new Point(aPoint.X + 10 + nDateWidth, aPoint.Y);
oTimeControl = new DatabaseControl(oFormHandler, _xFormName, _curFieldName, DataType.TIME, aTimePoint); oTimeControl = new DatabaseControl(oFormHandler, _xFormName, _curFieldName, DataType.TIME, aTimePoint);
nTimeWidth = oTimeControl.getPreferredWidth(); int nTimeWidth = oTimeControl.getPreferredWidth();
oTimeControl.setSize(new Size(nTimeWidth, nDBHeight)); oTimeControl.setSize(new Size(nTimeWidth, nDBHeight));
nDBWidth = nDateWidth + nTimeWidth + 10; nDBWidth = nDateWidth + nTimeWidth + 10;
xShapes.add(oDateControl.xShape); xShapes.add(oDateControl.xShape);
......
...@@ -34,7 +34,6 @@ public class Finalizer ...@@ -34,7 +34,6 @@ public class Finalizer
{ {
private WizardDialog CurUnoDialog; private WizardDialog CurUnoDialog;
private short curtabindex;
private XRadioButton optModifyForm; private XRadioButton optModifyForm;
private XTextComponent txtFormName; private XTextComponent txtFormName;
private FormDocument oFormDocument; private FormDocument oFormDocument;
...@@ -42,7 +41,7 @@ public class Finalizer ...@@ -42,7 +41,7 @@ public class Finalizer
public Finalizer(WizardDialog _CurUnoDialog) public Finalizer(WizardDialog _CurUnoDialog)
{ {
this.CurUnoDialog = _CurUnoDialog; this.CurUnoDialog = _CurUnoDialog;
curtabindex = (short) (FormWizard.SOSTORE_PAGE * 100); short curtabindex = (short) (FormWizard.SOSTORE_PAGE * 100);
String slblFormName = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 50); String slblFormName = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 50);
String slblProceed = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 51); String slblProceed = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 51);
......
...@@ -41,7 +41,6 @@ public class FormConfiguration ...@@ -41,7 +41,6 @@ public class FormConfiguration
{ {
private WizardDialog CurUnoDialog; private WizardDialog CurUnoDialog;
private short curtabindex;
private XRadioButton optOnExistingRelation; private XRadioButton optOnExistingRelation;
private XCheckBox chkcreateSubForm; private XCheckBox chkcreateSubForm;
private XRadioButton optSelectManually; private XRadioButton optSelectManually;
...@@ -55,7 +54,7 @@ public class FormConfiguration ...@@ -55,7 +54,7 @@ public class FormConfiguration
public FormConfiguration(WizardDialog _CurUnoDialog) public FormConfiguration(WizardDialog _CurUnoDialog)
{ {
this.CurUnoDialog = _CurUnoDialog; this.CurUnoDialog = _CurUnoDialog;
curtabindex = (short) (FormWizard.SOSUBFORM_PAGE * 100); short curtabindex = (short) (FormWizard.SOSUBFORM_PAGE * 100);
Integer ISubFormStep = Integer.valueOf(FormWizard.SOSUBFORM_PAGE); Integer ISubFormStep = Integer.valueOf(FormWizard.SOSUBFORM_PAGE);
String sOnExistingRelation = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 5); String sOnExistingRelation = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 5);
String sOnManualRelation = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 7); String sOnManualRelation = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 7);
......
...@@ -38,7 +38,6 @@ public class ReportFinalizer ...@@ -38,7 +38,6 @@ public class ReportFinalizer
private WizardDialog CurUnoDialog; private WizardDialog CurUnoDialog;
private XTextComponent xTitleTextBox; private XTextComponent xTitleTextBox;
private String StoreName; private String StoreName;
private String DefaultName;
private String OldDefaultName; private String OldDefaultName;
private IReportDocument CurReportDocument; private IReportDocument CurReportDocument;
public static final int SOCREATEDOCUMENT = 1; public static final int SOCREATEDOCUMENT = 1;
...@@ -189,7 +188,7 @@ public class ReportFinalizer ...@@ -189,7 +188,7 @@ public class ReportFinalizer
public void initialize(RecordParser _CurDBMetaData) public void initialize(RecordParser _CurDBMetaData)
{ {
String FirstCommandName = (_CurDBMetaData.getIncludedCommandNames())[0]; String FirstCommandName = (_CurDBMetaData.getIncludedCommandNames())[0];
DefaultName = Desktop.getUniqueName(_CurDBMetaData.getReportDocuments(), FirstCommandName); String DefaultName = Desktop.getUniqueName(_CurDBMetaData.getReportDocuments(), FirstCommandName);
if (!DefaultName.equals(OldDefaultName)) if (!DefaultName.equals(OldDefaultName))
{ {
OldDefaultName = DefaultName; OldDefaultName = DefaultName;
......
...@@ -34,7 +34,6 @@ public class CGCategory ...@@ -34,7 +34,6 @@ public class CGCategory
private XMultiServiceFactory xMSF; private XMultiServiceFactory xMSF;
XNameAccess xNameAccessTablesNode; XNameAccess xNameAccessTablesNode;
private XNameAccess xNameAccessCurBusinessNode; private XNameAccess xNameAccessCurBusinessNode;
private Object oconfigView;
public CGCategory(XMultiServiceFactory _xMSF) public CGCategory(XMultiServiceFactory _xMSF)
{ {
...@@ -45,7 +44,7 @@ public class CGCategory ...@@ -45,7 +44,7 @@ public class CGCategory
{ {
try try
{ {
oconfigView = Configuration.getConfigurationRoot(xMSF, CGROOTPATH, false); //business/Tables Object oconfigView = Configuration.getConfigurationRoot(xMSF, CGROOTPATH, false); //business/Tables
xNameAccessCurBusinessNode = Configuration.getChildNodebyName( xNameAccessCurBusinessNode = Configuration.getChildNodebyName(
UnoRuntime.queryInterface(XNameAccess.class, oconfigView), UnoRuntime.queryInterface(XNameAccess.class, oconfigView),
category); category);
......
...@@ -28,7 +28,6 @@ public class CGTable ...@@ -28,7 +28,6 @@ public class CGTable
private XMultiServiceFactory xMSF; private XMultiServiceFactory xMSF;
XNameAccess xNameAccessFieldsNode; XNameAccess xNameAccessFieldsNode;
private XNameAccess xNameAccessTableNode;
public CGTable(XMultiServiceFactory _xMSF) public CGTable(XMultiServiceFactory _xMSF)
{ {
...@@ -39,7 +38,7 @@ public class CGTable ...@@ -39,7 +38,7 @@ public class CGTable
{ {
try try
{ {
xNameAccessTableNode = Configuration.getChildNodebyIndex(_xNameAccessParentNode, _index); XNameAccess xNameAccessTableNode = Configuration.getChildNodebyIndex(_xNameAccessParentNode, _index);
xNameAccessFieldsNode = Configuration.getChildNodebyName(xNameAccessTableNode, "Fields"); xNameAccessFieldsNode = Configuration.getChildNodebyName(xNameAccessTableNode, "Fields");
} }
catch (Exception e) catch (Exception e)
......
...@@ -46,7 +46,6 @@ public class FieldFormatter implements XItemListener ...@@ -46,7 +46,6 @@ public class FieldFormatter implements XItemListener
private Object oColumnDescriptorModel; private Object oColumnDescriptorModel;
private XTextComponent txtfieldname; private XTextComponent txtfieldname;
private XListBox xlstFieldNames; private XListBox xlstFieldNames;
private XButton btnplus;
private XButton btnminus; private XButton btnminus;
private XButton btnShiftUp; private XButton btnShiftUp;
private XButton btnShiftDown; private XButton btnShiftDown;
...@@ -144,7 +143,7 @@ public class FieldFormatter implements XItemListener ...@@ -144,7 +143,7 @@ public class FieldFormatter implements XItemListener
oFontDesc, 14, "HID:WIZARDS_HID_DLGTABLE_CMDMINUS", "-", 118, 175, IFieldFormatStep, Short.valueOf(curtabindex++), 14 oFontDesc, 14, "HID:WIZARDS_HID_DLGTABLE_CMDMINUS", "-", 118, 175, IFieldFormatStep, Short.valueOf(curtabindex++), 14
}); });
btnplus = CurUnoDialog.insertButton("btnplus", new XActionListenerAdapter() { XButton btnplus = CurUnoDialog.insertButton("btnplus", new XActionListenerAdapter() {
@Override @Override
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
addFieldName(); addFieldName();
......
...@@ -33,7 +33,6 @@ public class Finalizer ...@@ -33,7 +33,6 @@ public class Finalizer
{ {
private TableWizard CurUnoDialog; private TableWizard CurUnoDialog;
private short curtabindex;
private XRadioButton optModifyTable; private XRadioButton optModifyTable;
private XRadioButton optWorkWithTable; private XRadioButton optWorkWithTable;
private XTextComponent txtTableName; private XTextComponent txtTableName;
...@@ -50,7 +49,7 @@ public class Finalizer ...@@ -50,7 +49,7 @@ public class Finalizer
{ {
this.CurUnoDialog = _CurUnoDialog; this.CurUnoDialog = _CurUnoDialog;
this.curtabledescriptor = _curtabledescriptor; this.curtabledescriptor = _curtabledescriptor;
curtabindex = (short) (TableWizard.SOFINALPAGE * 100); short curtabindex = (short) (TableWizard.SOFINALPAGE * 100);
Integer IFINALSTEP = Integer.valueOf(TableWizard.SOFINALPAGE); Integer IFINALSTEP = Integer.valueOf(TableWizard.SOFINALPAGE);
String slblTableName = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 34); String slblTableName = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 34);
String slblProceed = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 36); String slblProceed = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 36);
......
...@@ -52,7 +52,6 @@ public class AggregateComponent extends ControlScroller ...@@ -52,7 +52,6 @@ public class AggregateComponent extends ControlScroller
private static final int SOADDROW = 1; private static final int SOADDROW = 1;
private static final int SOREMOVEROW = 2; private static final int SOREMOVEROW = 2;
private ArrayList<ControlRow> ControlRowVector; private ArrayList<ControlRow> ControlRowVector;
private int curHelpID;
private int lastHelpIndex; private int lastHelpIndex;
/** Creates a new instance of AggrgateComponent */ /** Creates a new instance of AggrgateComponent */
...@@ -61,7 +60,6 @@ public class AggregateComponent extends ControlScroller ...@@ -61,7 +60,6 @@ public class AggregateComponent extends ControlScroller
super(_CurUnoDialog, _iStep, _iPosX + 10, _iPosY, _iWidth - 12, _uitextfieldcount, 18, _firstHelpID + 2); super(_CurUnoDialog, _iStep, _iPosX + 10, _iPosY, _iWidth - 12, _uitextfieldcount, 18, _firstHelpID + 2);
try try
{ {
curHelpID = _firstHelpID;
this.CurDBMetaData = _CurDBMetaData; this.CurDBMetaData = _CurDBMetaData;
Count = 1; Count = 1;
CurUnoDialog.insertRadioButton("optDetailQuery", 0, new ActionListenerImpl(), CurUnoDialog.insertRadioButton("optDetailQuery", 0, new ActionListenerImpl(),
...@@ -71,7 +69,7 @@ public class AggregateComponent extends ControlScroller ...@@ -71,7 +69,7 @@ public class AggregateComponent extends ControlScroller
}, },
new Object[] new Object[]
{ {
8, HelpIds.getHelpIdString(curHelpID), soptDetailQuery, Integer.valueOf(_iPosX), Integer.valueOf(iCompPosY - 42), Short.valueOf((short) 1), IStep, Short.valueOf(curtabindex++), Integer.valueOf(iCompWidth) 8, HelpIds.getHelpIdString(_firstHelpID), soptDetailQuery, Integer.valueOf(_iPosX), Integer.valueOf(iCompPosY - 42), Short.valueOf((short) 1), IStep, Short.valueOf(curtabindex++), Integer.valueOf(iCompWidth)
}); });
CurUnoDialog.insertRadioButton("optSummaryQuery", 0, new ActionListenerImpl(), CurUnoDialog.insertRadioButton("optSummaryQuery", 0, new ActionListenerImpl(),
...@@ -81,7 +79,7 @@ public class AggregateComponent extends ControlScroller ...@@ -81,7 +79,7 @@ public class AggregateComponent extends ControlScroller
}, },
new Object[] new Object[]
{ {
16, HelpIds.getHelpIdString(curHelpID + 1), soptSummaryQuery, Boolean.TRUE, Integer.valueOf(_iPosX), Integer.valueOf(iCompPosY - 32), IStep, Short.valueOf(curtabindex++), Integer.valueOf(iCompWidth) 16, HelpIds.getHelpIdString(_firstHelpID + 1), soptSummaryQuery, Boolean.TRUE, Integer.valueOf(_iPosX), Integer.valueOf(iCompPosY - 32), IStep, Short.valueOf(curtabindex++), Integer.valueOf(iCompWidth)
}); });
CurUnoDialog.insertLabel("lblAggregate", CurUnoDialog.insertLabel("lblAggregate",
new String[] new String[]
......
...@@ -38,11 +38,8 @@ public abstract class ControlScroller ...@@ -38,11 +38,8 @@ public abstract class ControlScroller
protected int iCompPosY; protected int iCompPosY;
protected int iCompWidth; protected int iCompWidth;
protected int iCompHeight; protected int iCompHeight;
private int iStartPosY;
protected short curtabindex; protected short curtabindex;
private int iStep;
protected Integer IStep; protected Integer IStep;
private int linedistance;
int iScrollBarWidth = 10; int iScrollBarWidth = 10;
private int SORELFIRSTPOSY = 3; private int SORELFIRSTPOSY = 3;
protected int curHelpIndex; protected int curHelpIndex;
...@@ -77,16 +74,14 @@ public abstract class ControlScroller ...@@ -77,16 +74,14 @@ public abstract class ControlScroller
{ {
this.nblockincrement = _nblockincrement; this.nblockincrement = _nblockincrement;
this.CurUnoDialog = _CurUnoDialog; this.CurUnoDialog = _CurUnoDialog;
this.iStep = _iStep;
this.curHelpIndex = _firsthelpindex; this.curHelpIndex = _firsthelpindex;
curtabindex = UnoDialog.setInitialTabindex(iStep); curtabindex = UnoDialog.setInitialTabindex(_iStep);
this.linedistance = _nlinedistance; IStep = Integer.valueOf(_iStep);
IStep = Integer.valueOf(iStep);
this.iCompPosX = _iCompPosX; this.iCompPosX = _iCompPosX;
this.iCompPosY = _iCompPosY; this.iCompPosY = _iCompPosY;
this.iCompWidth = _iCompWidth; this.iCompWidth = _iCompWidth;
this.iCompHeight = 2 * SORELFIRSTPOSY + nblockincrement * linedistance; this.iCompHeight = 2 * SORELFIRSTPOSY + nblockincrement * _nlinedistance;
iStartPosY = iCompPosY + SORELFIRSTPOSY; int iStartPosY = iCompPosY + SORELFIRSTPOSY;
int ScrollHeight = iCompHeight - 2; int ScrollHeight = iCompHeight - 2;
nlineincrement = 1; nlineincrement = 1;
sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), "TitleScrollBar"); sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), "TitleScrollBar");
...@@ -105,7 +100,7 @@ public abstract class ControlScroller ...@@ -105,7 +100,7 @@ public abstract class ControlScroller
for (int i = 0; i < nblockincrement; i++) for (int i = 0; i < nblockincrement; i++)
{ {
insertControlGroup(i, ypos); insertControlGroup(i, ypos);
ypos += linedistance; ypos += _nlinedistance;
} }
} }
......
...@@ -51,7 +51,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL ...@@ -51,7 +51,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
private int nNewStep = 1; private int nNewStep = 1;
private int nOldStep = 1; private int nOldStep = 1;
private int nMaxStep = 1; private int nMaxStep = 1;
private XItemEventBroadcaster xRoadmapBroadcaster;
private String[] sRMItemLabels; private String[] sRMItemLabels;
private Object oRoadmap; private Object oRoadmap;
private XSingleServiceFactory xSSFRoadmap; private XSingleServiceFactory xSSFRoadmap;
...@@ -221,7 +220,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL ...@@ -221,7 +220,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
xIndexContRoadmap = UnoRuntime.queryInterface(XIndexContainer.class, oRoadmap); xIndexContRoadmap = UnoRuntime.queryInterface(XIndexContainer.class, oRoadmap);
XControl xRoadmapControl = this.xDlgContainer.getControl("rdmNavi"); XControl xRoadmapControl = this.xDlgContainer.getControl("rdmNavi");
xRoadmapBroadcaster = UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRoadmapControl); XItemEventBroadcaster xRoadmapBroadcaster = UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRoadmapControl);
xRoadmapBroadcaster.addItemListener(new XItemListenerAdapter() { xRoadmapBroadcaster.addItemListener(new XItemListenerAdapter() {
public void itemStateChanged(com.sun.star.awt.ItemEvent itemEvent) { public void itemStateChanged(com.sun.star.awt.ItemEvent itemEvent) {
try try
......
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