summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-12 09:55:57 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-11-12 11:03:29 +0000
commitbb437029c1e5331bcc3f8fb2fc87837142a52f33 (patch)
tree56bde4059792a5284e90ae3b10ee4388cc913a54 /wizards
parent84f7f412bfc9e18b1ff8b133ceda7757eae28c36 (diff)
java: convert fields to local variables where possible
found by PMD Change-Id: I05b45382b8fb1b734657ce9421a20e6ef6fbe542 Reviewed-on: https://gerrit.libreoffice.org/12376 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/document/FormHandler.java3
-rw-r--r--wizards/com/sun/star/wizards/document/TimeStampControl.java8
-rw-r--r--wizards/com/sun/star/wizards/form/DataEntrySetter.java10
-rw-r--r--wizards/com/sun/star/wizards/form/FormDocument.java3
-rw-r--r--wizards/com/sun/star/wizards/form/StyleApplier.java13
-rw-r--r--wizards/com/sun/star/wizards/report/ReportTextDocument.java8
-rw-r--r--wizards/com/sun/star/wizards/table/FieldDescription.java18
-rw-r--r--wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java3
-rw-r--r--wizards/com/sun/star/wizards/table/ScenarioSelector.java9
-rw-r--r--wizards/com/sun/star/wizards/text/TextTableHandler.java3
-rw-r--r--wizards/com/sun/star/wizards/ui/CommandFieldSelection.java3
-rw-r--r--wizards/com/sun/star/wizards/ui/DocumentPreview.java9
-rw-r--r--wizards/com/sun/star/wizards/ui/FieldSelection.java4
-rw-r--r--wizards/com/sun/star/wizards/ui/WizardDialog.java8
14 files changed, 31 insertions, 71 deletions
diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java
index 38615afc7800..b07f45a2a762 100644
--- a/wizards/com/sun/star/wizards/document/FormHandler.java
+++ b/wizards/com/sun/star/wizards/document/FormHandler.java
@@ -65,7 +65,6 @@ public class FormHandler
public XMultiServiceFactory xMSFDoc;
public XMultiServiceFactory xMSF;
public XDrawPage xDrawPage;
- private XDrawPageSupplier xDrawPageSupplier;
public String[] sModelServices = new String[8];
public static ControlData[] oControlData;
@@ -106,7 +105,7 @@ public class FormHandler
public FormHandler(XMultiServiceFactory _xMSF, XTextDocument xTextDocument)
{
this.xMSF = _xMSF;
- xDrawPageSupplier = UnoRuntime.queryInterface(XDrawPageSupplier.class, xTextDocument);
+ XDrawPageSupplier xDrawPageSupplier = UnoRuntime.queryInterface(XDrawPageSupplier.class, xTextDocument);
xDrawPage = xDrawPageSupplier.getDrawPage();
xFormsSupplier = UnoRuntime.queryInterface(XFormsSupplier.class, xDrawPage);
xShapeGrouper = UnoRuntime.queryInterface(XShapeGrouper.class, xDrawPage);
diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java b/wizards/com/sun/star/wizards/document/TimeStampControl.java
index 476c6bfdfd3d..c2a5c4a218ba 100644
--- a/wizards/com/sun/star/wizards/document/TimeStampControl.java
+++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java
@@ -37,10 +37,7 @@ public class TimeStampControl extends DatabaseControl
DatabaseControl oDateControl;
DatabaseControl oTimeControl;
-// XShape xGroupShape;
Resource oResource;
- private String sDateAppendix; // = GetResText(RID_FORM + 4)
- private String sTimeAppendix; // = GetResText(RID_FORM + 5)
XShapes xGroupShapes = null;
double nreldatewidth;
double nreltimewidth;
@@ -53,7 +50,6 @@ public class TimeStampControl extends DatabaseControl
{
super(_oFormHandler, "com.sun.star.drawing.ShapeCollection", _aPoint);
oResource = _oResource;
-// xGroupShape = xShape;
oDateControl = new DatabaseControl(oFormHandler, _xFormName, _curFieldName, DataType.DATE, aPoint);
int nDBHeight = oDateControl.getControlHeight();
nDateWidth = oDateControl.getPreferredWidth();
@@ -93,8 +89,8 @@ public class TimeStampControl extends DatabaseControl
{
super(_oGridControl, _curfieldcolumn);
oResource = _oResource;
- sDateAppendix = oResource.getResText(UIConsts.RID_FORM + 88);
- sTimeAppendix = oResource.getResText(UIConsts.RID_FORM + 89);
+ String sDateAppendix = oResource.getResText(UIConsts.RID_FORM + 88);
+ String sTimeAppendix = oResource.getResText(UIConsts.RID_FORM + 89);
oDateControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.DATE, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sDateAppendix);
oTimeControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.TIME, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sTimeAppendix);
}
diff --git a/wizards/com/sun/star/wizards/form/DataEntrySetter.java b/wizards/com/sun/star/wizards/form/DataEntrySetter.java
index 4774fbb29dbb..e7787e58c5c1 100644
--- a/wizards/com/sun/star/wizards/form/DataEntrySetter.java
+++ b/wizards/com/sun/star/wizards/form/DataEntrySetter.java
@@ -30,18 +30,14 @@ import com.sun.star.wizards.common.PropertyNames;
public class DataEntrySetter
{
- private WizardDialog CurUnoDialog;
- private short curtabindex;
- private XRadioButton optNewDataOnly;
private XRadioButton optDisplayAllData;
private XCheckBox chknomodification;
private XCheckBox chknodeletion;
private XCheckBox chknoaddition;
- public DataEntrySetter(WizardDialog _CurUnoDialog)
+ public DataEntrySetter(WizardDialog CurUnoDialog)
{
- this.CurUnoDialog = _CurUnoDialog;
- curtabindex = (short) (FormWizard.SODATA_PAGE * 100);
+ short curtabindex = (short) (FormWizard.SODATA_PAGE * 100);
Integer IDataStep = Integer.valueOf(FormWizard.SODATA_PAGE);
String sNewDataOnly = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 44);
String sDisplayAllData = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 46);
@@ -50,7 +46,7 @@ public class DataEntrySetter
String sNoAddition = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 49); // AlowInserts
String sdontdisplayExistingData = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 45);
- optNewDataOnly = CurUnoDialog.insertRadioButton("optNewDataOnly", "toggleCheckBoxes", this,
+ CurUnoDialog.insertRadioButton("optNewDataOnly", "toggleCheckBoxes", this,
new String[]
{
PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java
index ae59f843595d..37b20638dd11 100644
--- a/wizards/com/sun/star/wizards/form/FormDocument.java
+++ b/wizards/com/sun/star/wizards/form/FormDocument.java
@@ -47,7 +47,6 @@ public class FormDocument extends TextDocument
private FormHandler oFormHandler;
private ViewHandler oViewHandler;
- private TextStyleHandler oTextStyleHandler;
private XPropertySet xPropPageStyle;
private static final int SOFORMGAP = 2000;
private boolean bhasSubForm;
@@ -68,7 +67,7 @@ public class FormDocument extends TextDocument
{
oFormHandler = new FormHandler(xMSF, xTextDocument);
oFormHandler.setDrawObjectsCaptureMode(false);
- oTextStyleHandler = new TextStyleHandler(xMSFDoc, xTextDocument);
+ TextStyleHandler oTextStyleHandler = new TextStyleHandler(xMSFDoc, xTextDocument);
oViewHandler = new ViewHandler(xMSFDoc, xTextDocument);
oMainFormDBMetaData = new CommandMetaData(xMSF);// , CharLocale);
oSubFormDBMetaData = new CommandMetaData(xMSF);// , CharLocale);
diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java
index feaef038a334..d7ae4181fd2b 100644
--- a/wizards/com/sun/star/wizards/form/StyleApplier.java
+++ b/wizards/com/sun/star/wizards/form/StyleApplier.java
@@ -43,20 +43,16 @@ import com.sun.star.wizards.ui.*;
public class StyleApplier
{
- private WizardDialog CurUnoDialog;
private XPropertySet xPageStylePropertySet;
private XMultiServiceFactory xMSF;
- private short curtabindex;
private XRadioButton optNoBorder;
private XRadioButton opt3DLook;
- private XRadioButton optFlat;
private XListBox lstStyles;
private FormDocument curFormDocument;
private short iOldLayoutPos;
private static final String SCHANGELAYOUT = "changeLayout";
private static final String SCHANGEBORDERTYPE = "changeBorderLayouts";
private String[] StyleNames;
- private String[] StyleNodeNames;
private String[] FileNames;
private final static int SOBACKGROUNDCOLOR = 0;
private final static int SODBTEXTCOLOR = 1;
@@ -64,15 +60,14 @@ public class StyleApplier
private final static int SOBORDERCOLOR = 5;
private Short IBorderValue = Short.valueOf((short) 1);
- public StyleApplier(WizardDialog _CurUnoDialog, FormDocument _curFormDocument)
+ public StyleApplier(WizardDialog CurUnoDialog, FormDocument _curFormDocument)
{
this.curFormDocument = _curFormDocument;
xMSF = curFormDocument.xMSF;
TextStyleHandler oTextStyleHandler = new TextStyleHandler(xMSF, curFormDocument.xTextDocument);
xPageStylePropertySet = oTextStyleHandler.getStyleByName("PageStyles", "Standard");
- this.CurUnoDialog = _CurUnoDialog;
- curtabindex = (short) (FormWizard.SOSTYLE_PAGE * 100);
+ short curtabindex = (short) (FormWizard.SOSTYLE_PAGE * 100);
Integer IStyleStep = Integer.valueOf(FormWizard.SOSTYLE_PAGE);
String sPageStyles = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 86);
String sNoBorder = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 29);
@@ -126,7 +121,7 @@ public class StyleApplier
UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", s3DLook, 196, 53, Short.valueOf((short) 1), IStyleStep, Short.valueOf(curtabindex++), "1", 93
});
- optFlat = CurUnoDialog.insertRadioButton("otpFlat", SCHANGEBORDERTYPE, this,
+ XRadioButton optFlat = CurUnoDialog.insertRadioButton("otpFlat", SCHANGEBORDERTYPE, this,
new String[]
{
PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH
@@ -153,7 +148,7 @@ public class StyleApplier
{
Object oRootNode = Configuration.getConfigurationRoot(xMSF, "org.openoffice.Office.FormWizard/FormWizard/Styles", false);
XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oRootNode);
- StyleNodeNames = xNameAccess.getElementNames();
+ String[] StyleNodeNames = xNameAccess.getElementNames();
StyleNames = new String[StyleNodeNames.length];
FileNames = new String[StyleNodeNames.length];
for (int i = 0; i < StyleNodeNames.length; i++)
diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java
index ed6a9bcfe319..569b03456f7d 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java
@@ -54,10 +54,8 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
private Object FirstPageStyle;
public ArrayList<DBColumn> DBColumnsVector;
private RecordTable CurRecordTable;
- private String sMsgTableNotExisting;
private String sMsgCommonReportError;
private String ContentTemplatePath;
- private String sMsgEndAutopilot;
public boolean bIsCurLandscape;
public TextTableHandler oTextTableHandler;
public TextSectionHandler oTextSectionHandler;
@@ -99,16 +97,14 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
oTextFieldHandler = new TextFieldHandler(xMSFDoc, xTextDocument);
DBColumnsVector = new java.util.ArrayList<DBColumn>();
oNumberFormatter = oTextTableHandler.getNumberFormatter();
- // CurDBMetaData = new RecordParser(xMSF); //, CharLocale, oNumberFormatter);
CurDBMetaData = _aRecordParser;
long lDateCorrection = oNumberFormatter.getNullDateCorrection();
oNumberFormatter.setBooleanReportDisplayNumberFormat();
oNumberFormatter.setNullDateCorrection(lDateCorrection);
- // sMsgInvalidTextField = oResource.getResText(UIConsts.RID_REPORT + 73);
- sMsgTableNotExisting = oResource.getResText(UIConsts.RID_REPORT + 61);
+ String sMsgTableNotExisting = oResource.getResText(UIConsts.RID_REPORT + 61);
sMsgCommonReportError = oResource.getResText(UIConsts.RID_REPORT + 72);
sMsgCommonReportError = JavaTools.replaceSubString(sMsgCommonReportError, String.valueOf((char) 13), "<BR>");
- sMsgEndAutopilot = oResource.getResText(UIConsts.RID_DB_COMMON + 33);
+ String sMsgEndAutopilot = oResource.getResText(UIConsts.RID_DB_COMMON + 33);
sMsgTableNotExisting = sMsgTableNotExisting + (char) 13 + sMsgEndAutopilot;
bIsCurLandscape = true;
getReportPageStyles();
diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java
index 826989c611df..d7ae9693d0c8 100644
--- a/wizards/com/sun/star/wizards/table/FieldDescription.java
+++ b/wizards/com/sun/star/wizards/table/FieldDescription.java
@@ -32,32 +32,24 @@ import com.sun.star.wizards.common.PropertyNames;
public class FieldDescription
{
private String tablename = PropertyNames.EMPTY_STRING;
- private String keyname;
- private XNameAccess xNameAccessTableNode;
private XPropertySet xPropertySet;
private ArrayList<PropertyValue> aPropertyValues;
- private Integer Type;
private String Name;
- private XMultiServiceFactory xMSF;
- private Locale aLocale;
- public FieldDescription(XMultiServiceFactory _xMSF, Locale _aLocale, ScenarioSelector _curscenarioselector, String _fieldname, String _keyname, int _nmaxcharCount)
+ public FieldDescription(XMultiServiceFactory _xMSF, Locale _aLocale, ScenarioSelector _curscenarioselector, String _fieldname, String keyname, int _nmaxcharCount)
{
- xMSF = _xMSF;
- aLocale = _aLocale;
tablename = _curscenarioselector.getTableName();
Name = _fieldname;
- keyname = _keyname;
aPropertyValues = new ArrayList<PropertyValue>();
- xNameAccessTableNode = _curscenarioselector.oCGTable.xNameAccessFieldsNode;
+ XNameAccess xNameAccessTableNode = _curscenarioselector.oCGTable.xNameAccessFieldsNode;
XNameAccess xNameAccessFieldNode;
if (_curscenarioselector.bcolumnnameislimited)
{
- xNameAccessFieldNode = Configuration.getChildNodebyDisplayName(xMSF, aLocale, xNameAccessTableNode, keyname, "ShortName", _nmaxcharCount);
+ xNameAccessFieldNode = Configuration.getChildNodebyDisplayName(_xMSF, _aLocale, xNameAccessTableNode, keyname, "ShortName", _nmaxcharCount);
}
else
{
- xNameAccessFieldNode = Configuration.getChildNodebyDisplayName(xMSF, aLocale, xNameAccessTableNode, keyname, PropertyNames.PROPERTY_NAME, _nmaxcharCount);
+ xNameAccessFieldNode = Configuration.getChildNodebyDisplayName(_xMSF, _aLocale, xNameAccessTableNode, keyname, PropertyNames.PROPERTY_NAME, _nmaxcharCount);
}
setFieldProperties(xNameAccessFieldNode);
}
@@ -66,7 +58,7 @@ public class FieldDescription
{
Name = _fieldname;
aPropertyValues = new ArrayList<PropertyValue>();
- Type = Integer.valueOf(com.sun.star.sdbc.DataType.VARCHAR);
+ Integer Type = Integer.valueOf(com.sun.star.sdbc.DataType.VARCHAR);
aPropertyValues.add(Properties.createProperty(PropertyNames.PROPERTY_NAME, _fieldname));
aPropertyValues.add(Properties.createProperty("Type", Type));
}
diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
index e33b86253fa0..ffbce45d52c7 100644
--- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
+++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
@@ -38,7 +38,6 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
{
private TableWizard CurUnoDialog;
- private short curtabindex;
private final static String SPRIMEKEYMODE = "togglePrimeKeyFields";
private XRadioButton optAddAutomatically;
private XRadioButton optUseExisting;
@@ -59,7 +58,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
this.CurUnoDialog = _CurUnoDialog;
curTableDescriptor = _curTableDescriptor;
bAutoPrimaryKeysupportsAutoIncrmentation = isAutoPrimeKeyAutoIncrementationsupported();
- curtabindex = (short) ((TableWizard.SOPRIMARYKEYPAGE * 100) - 20);
+ short curtabindex = (short) ((TableWizard.SOPRIMARYKEYPAGE * 100) - 20);
Integer IPRIMEKEYSTEP = Integer.valueOf(TableWizard.SOPRIMARYKEYPAGE);
final String sExplanations = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 26);
final String screatePrimaryKey = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 27);
diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java
index a78d14fe6624..886549de8b9e 100644
--- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java
+++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java
@@ -48,10 +48,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
final static int PRIVATE = 0;
final static int BUSINESS = 1;
- private XFixedText lblExplanation;
- private XFixedText lblCategories;
private XRadioButton optBusiness;
- private XRadioButton optPrivate;
private XListBox xTableListBox;
private TableWizard CurTableWizardUnoDialog;
private TableDescriptor curtabledescriptor;
@@ -84,7 +81,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
Integer IMAINSTEP = Integer.valueOf(TableWizard.SOMAINPAGE);
oCGCategory = new CGCategory(CurUnoDialog.xMSF);
oCGTable = new CGTable(CurUnoDialog.xMSF);
- lblExplanation = CurUnoDialog.insertLabel("lblScenarioExplanation",
+ CurUnoDialog.insertLabel("lblScenarioExplanation",
new String[]
{
PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
@@ -94,7 +91,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
32, sExplanation, Boolean.TRUE, 91, 27, IMAINSTEP, Short.valueOf(pretabindex++), 233
});
- lblCategories = CurUnoDialog.insertLabel("lblCategories",
+ CurUnoDialog.insertLabel("lblCategories",
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
@@ -114,7 +111,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", sBusiness, 98, 70, Short.valueOf((short) 1), IMAINSTEP, Short.valueOf(pretabindex++), 78
});
- optPrivate = CurTableWizardUnoDialog.insertRadioButton("optPrivate", SELECTCATEGORY, this,
+ CurTableWizardUnoDialog.insertRadioButton("optPrivate", SELECTCATEGORY, this,
new String[]
{
PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
diff --git a/wizards/com/sun/star/wizards/text/TextTableHandler.java b/wizards/com/sun/star/wizards/text/TextTableHandler.java
index 64e77070bcde..112dd44f5e72 100644
--- a/wizards/com/sun/star/wizards/text/TextTableHandler.java
+++ b/wizards/com/sun/star/wizards/text/TextTableHandler.java
@@ -48,7 +48,6 @@ public class TextTableHandler
public XTextDocument xTextDocument;
public XSimpleText xSimpleText;
private NumberFormatter oNumberFormatter;
- private Locale aCharLocale;
/** Creates a new instance of TextTableHandler */
public TextTableHandler(XMultiServiceFactory xMSF, XTextDocument xTextDocument)
@@ -60,7 +59,7 @@ public class TextTableHandler
xTextTablesSupplier = UnoRuntime.queryInterface(XTextTablesSupplier.class, xTextDocument);
xSimpleText = UnoRuntime.queryInterface(XSimpleText.class, xTextDocument.getText());
XNumberFormatsSupplier xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
- aCharLocale = (Locale) Helper.getUnoStructValue(xTextDocument, "CharLocale");
+ Locale aCharLocale = (Locale) Helper.getUnoStructValue(xTextDocument, "CharLocale");
oNumberFormatter = new NumberFormatter(xNumberFormatsSupplier, aCharLocale);
}
catch (java.lang.Exception e)
diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
index f3f4cbc13d14..f7ded90df20a 100644
--- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
+++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
@@ -35,7 +35,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator<
private XListBox xTableListBox;
private XFixedText xlblTable;
private String sTableListBoxName;
- private String sTableLabelName;
private String sQueryPrefix;
private String sTablePrefix;
private short m_iSelPos = -1;
@@ -99,7 +98,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator<
this.bgetQueries = _bgetQueries;
this.CurDBMetaData = _CurDBMetaData;
toggleListboxControls(Boolean.FALSE);
- sTableLabelName = "lblTables_" + super.sIncSuffix;
+ String sTableLabelName = "lblTables_" + super.sIncSuffix;
sTableListBoxName = "lstTables_" + super.sIncSuffix;
sTablePrefix = getTablePrefix();
sQueryPrefix = getQueryPrefix();
diff --git a/wizards/com/sun/star/wizards/ui/DocumentPreview.java b/wizards/com/sun/star/wizards/ui/DocumentPreview.java
index 56dbc3d06777..d5f2e9653a99 100644
--- a/wizards/com/sun/star/wizards/ui/DocumentPreview.java
+++ b/wizards/com/sun/star/wizards/ui/DocumentPreview.java
@@ -34,10 +34,6 @@ public class DocumentPreview
{
/**
- * The window in which the preview is showed.
- */
- private XWindow xWindow;
- /**
* The frame service which is used to show the preview
*/
private XFrame xFrame;
@@ -144,7 +140,10 @@ public class DocumentPreview
aDescriptor.WindowAttributes = VclWindowPeerAttribute.CLIPCHILDREN | WindowAttribute.SHOW;
XWindowPeer xPeer = xToolkit.createWindow(aDescriptor);
- xWindow = UnoRuntime.queryInterface(XWindow.class, xPeer);
+ /*
+ * The window in which the preview is showed.
+ */
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, xPeer);
Object frame = xmsf.createInstance("com.sun.star.frame.Frame");
xFrame = UnoRuntime.queryInterface(XFrame.class, frame);
xFrame.initialize(xWindow);
diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java
index 193aa26aadae..9f43570e3276 100644
--- a/wizards/com/sun/star/wizards/ui/FieldSelection.java
+++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java
@@ -44,8 +44,6 @@ public class FieldSelection
private String[] AllFieldNames;
private Integer ListBoxWidth;
- private Integer SelListBoxPosX;
-
private boolean bisModified = false;
private final static int SOCMDMOVESEL = 1;
@@ -180,7 +178,7 @@ public class FieldSelection
Integer cmdShiftButtonPosX = Integer.valueOf((CompPosX + ListBoxWidth.intValue() + cmdButtonHoriDist));
Integer ListBoxPosY = Integer.valueOf(CompPosY + lblVertiDist + lblHeight);
Integer ListBoxHeight = Integer.valueOf(CompHeight - 8 - 2);
- SelListBoxPosX = Integer.valueOf(cmdShiftButtonPosX.intValue() + cmdButtonWidth + cmdButtonHoriDist);
+ Integer SelListBoxPosX = Integer.valueOf(cmdShiftButtonPosX.intValue() + cmdButtonWidth + cmdButtonHoriDist);
IStep = Integer.valueOf(_iStep);
if (bshowFourButtons)
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index 5d6292409faa..4fe8221d5a2c 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -49,7 +49,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
private static final String CANCEL_ACTION_PERFORMED = "cancelWizard_1";
private static final String HELP_ACTION_PERFORMED = "callHelp";
public VetoableChangeSupport vetos = new VetoableChangeSupport(this);
- private String[] sRightPaneHeaders;
private int iButtonWidth = 50;
private int nNewStep = 1;
private int nOldStep = 1;
@@ -81,8 +80,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
hid = hid_;
oWizardResource = new Resource(xMSF, "Common", "dbw");
sMsgEndAutopilot = oWizardResource.getResText(UIConsts.RID_DB_COMMON + 33);
-
- //new Resource(xMSF,"Common","com");
}
public Resource getResource()
@@ -694,11 +691,10 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
public void setRightPaneHeaders(String[] _sRightPaneHeaders)
{
this.nMaxStep = _sRightPaneHeaders.length;
- this.sRightPaneHeaders = _sRightPaneHeaders;
FontDescriptor oFontDesc = new FontDescriptor();
oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD;
- for (int i = 0; i < sRightPaneHeaders.length; i++)
+ for (int i = 0; i < _sRightPaneHeaders.length; i++)
{
insertLabel("lblQueryTitle" + i,
new String[]
@@ -707,7 +703,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
},
new Object[]
{
- oFontDesc, 16, sRightPaneHeaders[i], Boolean.TRUE, 91, 8, Integer.valueOf(i + 1), Short.valueOf((short) 12), 212
+ oFontDesc, 16, _sRightPaneHeaders[i], Boolean.TRUE, 91, 8, Integer.valueOf(i + 1), Short.valueOf((short) 12), 212
});
}
}