[Libreoffice-commits] core.git: 3 commits - wizards/com
Noel Grandin
noel at peralex.com
Wed Nov 26 23:29:11 PST 2014
wizards/com/sun/star/wizards/common/PlaceholderTextElement.java | 1
wizards/com/sun/star/wizards/common/PropertyNames.java | 1
wizards/com/sun/star/wizards/db/DBMetaData.java | 1
wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java | 15 +-
wizards/com/sun/star/wizards/db/QueryMetaData.java | 1
wizards/com/sun/star/wizards/db/RecordParser.java | 1
wizards/com/sun/star/wizards/db/SQLQueryComposer.java | 1
wizards/com/sun/star/wizards/db/TableDescriptor.java | 1
wizards/com/sun/star/wizards/document/Control.java | 3
wizards/com/sun/star/wizards/document/TimeStampControl.java | 1
wizards/com/sun/star/wizards/form/Finalizer.java | 1
wizards/com/sun/star/wizards/form/FormWizard.java | 7 +
wizards/com/sun/star/wizards/query/CallQueryWizard.java | 1
wizards/com/sun/star/wizards/query/QueryWizard.java | 7 +
wizards/com/sun/star/wizards/report/DBColumn.java | 4
wizards/com/sun/star/wizards/report/Dataimport.java | 2
wizards/com/sun/star/wizards/report/RecordTable.java | 2
wizards/com/sun/star/wizards/report/ReportFinalizer.java | 4
wizards/com/sun/star/wizards/report/ReportTextImplementation.java | 2
wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java | 59 ++--------
wizards/com/sun/star/wizards/table/CGCategory.java | 2
wizards/com/sun/star/wizards/table/CGTable.java | 2
wizards/com/sun/star/wizards/table/CallTableWizard.java | 1
wizards/com/sun/star/wizards/table/FieldFormatter.java | 1
wizards/com/sun/star/wizards/table/TableWizard.java | 1
wizards/com/sun/star/wizards/text/TextDocument.java | 3
wizards/com/sun/star/wizards/ui/AggregateComponent.java | 10 -
wizards/com/sun/star/wizards/ui/ButtonList.java | 1
wizards/com/sun/star/wizards/ui/ControlScroller.java | 2
wizards/com/sun/star/wizards/ui/FilterComponent.java | 6 -
wizards/com/sun/star/wizards/ui/SortingComponent.java | 2
wizards/com/sun/star/wizards/ui/TitlesComponent.java | 2
wizards/com/sun/star/wizards/ui/UIConsts.java | 12 --
wizards/com/sun/star/wizards/ui/WizardDialog.java | 2
34 files changed, 34 insertions(+), 128 deletions(-)
New commits:
commit 898186c40ff730d153b43547c65e53f7ca8be516
Author: Noel Grandin <noel at peralex.com>
Date: Wed Nov 26 11:20:00 2014 +0200
java,wizards: remove completely unreferenced fields
found by UCDetector
Change-Id: I00a35337478111991dec7fa6310e57d3b5a146fa
diff --git a/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java b/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java
index 8299d48..b1b9cb6 100644
--- a/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java
+++ b/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java
@@ -30,7 +30,6 @@ public class PlaceholderTextElement extends TextElement
String hint;
String placeHolderText;
XMultiServiceFactory xmsf;
- TextDocument templateDocument;
public PlaceholderTextElement(XTextRange textRange, String placeHolderText_, String hint_, XMultiServiceFactory xmsf_)
{
diff --git a/wizards/com/sun/star/wizards/common/PropertyNames.java b/wizards/com/sun/star/wizards/common/PropertyNames.java
index c851b743..2d7cdd8 100644
--- a/wizards/com/sun/star/wizards/common/PropertyNames.java
+++ b/wizards/com/sun/star/wizards/common/PropertyNames.java
@@ -36,7 +36,6 @@ public class PropertyNames
public static String PROPERTY_TITLE = "Title";
public static String PROPERTY_BORDER = "Border";
public static String PROPERTY_MOVEABLE = "Moveable";
- public static String PROPERTY_CLOSEABLE = "Closeable";
public static String PROPERTY_ALIGN = "Align";
public static String COMMAND = "Command";
public static String COMMAND_TYPE = "CommandType";
diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java
index dc6b0fb..2a8ee9c 100644
--- a/wizards/com/sun/star/wizards/db/DBMetaData.java
+++ b/wizards/com/sun/star/wizards/db/DBMetaData.java
@@ -86,7 +86,6 @@ public class DBMetaData
private XOfficeDatabaseDocument xModel;
private XPropertySet xDataSourcePropertySet;
public String[] DataSourceNames;
- public String[] CommandNames;
public java.util.ArrayList<CommandObject> CommandObjects = new ArrayList<CommandObject>(1);
public Locale aLocale;
public int[] CommandTypes;
diff --git a/wizards/com/sun/star/wizards/db/QueryMetaData.java b/wizards/com/sun/star/wizards/db/QueryMetaData.java
index c3befda..c5695e5 100644
--- a/wizards/com/sun/star/wizards/db/QueryMetaData.java
+++ b/wizards/com/sun/star/wizards/db/QueryMetaData.java
@@ -28,7 +28,6 @@ public class QueryMetaData extends CommandMetaData
{
private SQLQueryComposer oSQLQueryComposer = null;
- FieldColumn CurFieldColumn;
public String Command;
// Vector CommandNamesV;
private PropertyValue[][] m_aFilterConditions; /* = new PropertyValue[][] {}; */
diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java
index cbca3d0..4c11a9b 100644
--- a/wizards/com/sun/star/wizards/db/RecordParser.java
+++ b/wizards/com/sun/star/wizards/db/RecordParser.java
@@ -41,7 +41,6 @@ public class RecordParser extends QueryMetaData
{
XNameAccess xColumns;
- com.sun.star.sdbc.XRow xRow;
com.sun.star.sdbc.XRow xResultSetRow;
public XResultSet ResultSet;
XInterface xRowSet;
diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index 897e4bc..da08c29 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -39,7 +39,6 @@ import java.util.ArrayList;
public class SQLQueryComposer
{
- public XColumnsSupplier xColSuppl;
QueryMetaData CurDBMetaData;
public XSingleSelectQueryAnalyzer m_xQueryAnalyzer;
ArrayList<CommandName> composedCommandNames = new ArrayList<CommandName>(1);
diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java
index 4b28e84..5439663 100644
--- a/wizards/com/sun/star/wizards/db/TableDescriptor.java
+++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java
@@ -66,7 +66,6 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
private String[] sTableFilters = null;
private final ArrayList<ColumnDescriptor> columncontainer;
private final ArrayList<XPropertySet> keycolumncontainer;
- public XHierarchicalNameAccess xTableHierarchicalNameAccess;
private CommandName ComposedTableName;
private XAppend xKeyColAppend;
private XColumnsSupplier xKeyColumnSupplier;
diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java
index e9b2695..6c0e1c9 100644
--- a/wizards/com/sun/star/wizards/document/Control.java
+++ b/wizards/com/sun/star/wizards/document/Control.java
@@ -45,10 +45,7 @@ public class Control extends Shape
public XPropertySet xPropertySet;
XPropertySet xControlPropertySet;
XWindowPeer xWindowPeer;
- Object oDefaultValue;
- GridControl oGridControl;
String sServiceName;
- XNamed xNamed;
static final int SOMAXTEXTSIZE = 50;
private int icontroltype;
protected XNameContainer xFormName;
diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java b/wizards/com/sun/star/wizards/document/TimeStampControl.java
index c2a5c4a..5bac092 100644
--- a/wizards/com/sun/star/wizards/document/TimeStampControl.java
+++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java
@@ -38,7 +38,6 @@ public class TimeStampControl extends DatabaseControl
DatabaseControl oDateControl;
DatabaseControl oTimeControl;
Resource oResource;
- XShapes xGroupShapes = null;
double nreldatewidth;
double nreltimewidth;
int nTimeWidth;
diff --git a/wizards/com/sun/star/wizards/form/Finalizer.java b/wizards/com/sun/star/wizards/form/Finalizer.java
index ee994b4..c1ed3a0 100644
--- a/wizards/com/sun/star/wizards/form/Finalizer.java
+++ b/wizards/com/sun/star/wizards/form/Finalizer.java
@@ -36,7 +36,6 @@ public class Finalizer
WizardDialog CurUnoDialog;
short curtabindex;
XRadioButton optModifyForm;
- XRadioButton optWorkWithForm;
XTextComponent txtFormName;
FormDocument oFormDocument;
diff --git a/wizards/com/sun/star/wizards/query/CallQueryWizard.java b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
index 181b67d..a40e70d 100644
--- a/wizards/com/sun/star/wizards/query/CallQueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
@@ -57,7 +57,6 @@ public class CallQueryWizard
{
private PropertyValue[] m_wizardContext;
public String Command;
- public final Integer CommandType = com.sun.star.sdb.CommandType.QUERY;
/** The constructor of the inner class has a XMultiServiceFactory parameter.
* @param i_serviceFactory A special service factory could be introduced while initializing.
diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java
index d122637..d0a039f 100644
--- a/wizards/com/sun/star/wizards/report/DBColumn.java
+++ b/wizards/com/sun/star/wizards/report/DBColumn.java
@@ -47,13 +47,10 @@ public class DBColumn
public XCell xValCell;
public XTextRange xValTextCell;
public XTextCursor xValCellCursor;
- public XNumberFormats xValCellNumberFormats;
public XCell xNameCell;
public XTextRange xNameTextCell;
public boolean bAlignLeft;
- public Object DefaultValue;
public String CharFontName;
- public int FormatKey;
public PropertyState PropertyState;
public int ValColumn = 1;
public int ValRow = 0;
@@ -63,7 +60,6 @@ public class DBColumn
private XCellRange xCellRange;
public XNamed xTableName;
private boolean bIsGroupColumn;
- TextDocument oTextDocument;
RecordParser CurDBMetaData;
RecordTable CurRecordTable;
TextTableHandler oTextTableHandler;
diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java
index 3eecd4c..ba3dc22 100644
--- a/wizards/com/sun/star/wizards/report/Dataimport.java
+++ b/wizards/com/sun/star/wizards/report/Dataimport.java
@@ -34,11 +34,9 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi
// ReportTextDocument CurReportDocument;
IReportDocument CurReportDocument;
- static boolean bStopProcess;
static String sProgressDBConnection;
static String sProgressDataImport;
static String sProgressBaseCurRecord;
- static String sProgressCurRecord;
static String sProgressTitle;
static String sStop;
diff --git a/wizards/com/sun/star/wizards/report/RecordTable.java b/wizards/com/sun/star/wizards/report/RecordTable.java
index f0079b1..132cb76 100644
--- a/wizards/com/sun/star/wizards/report/RecordTable.java
+++ b/wizards/com/sun/star/wizards/report/RecordTable.java
@@ -33,8 +33,6 @@ import com.sun.star.wizards.text.ViewHandler;
public class RecordTable
{
- String CurFieldName;
- String LabelDescription;
public XNamed xTableName;
public XCellRange xCellRange;
public XTextTable xTextTable;
diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java
index af5ea07..c20e9fd 100644
--- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java
+++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java
@@ -37,11 +37,7 @@ public class ReportFinalizer
WizardDialog CurUnoDialog;
XTextComponent xTitleTextBox;
- XTextComponent[] xSaveTextBox = new XTextComponent[2];
- Object chkTemplate;
- String TemplatePath;
String StoreName;
- boolean bfinalaskbeforeOverwrite;
String DefaultName;
String OldDefaultName;
IReportDocument CurReportDocument;
diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
index 8ccf7a6..fff21ad 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
@@ -129,9 +129,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
static String sReportFormNotExisting;
static String sMsgHiddenControlMissing;
static String sMsgEndAutopilot;
- static String sMsgConnectionImpossible;
static String sMsgNoConnection;
- static String[] ReportMessages = new String[4];
private void initialResources()
{
diff --git a/wizards/com/sun/star/wizards/table/CGCategory.java b/wizards/com/sun/star/wizards/table/CGCategory.java
index 05d3d6c..d2b649a 100644
--- a/wizards/com/sun/star/wizards/table/CGCategory.java
+++ b/wizards/com/sun/star/wizards/table/CGCategory.java
@@ -30,8 +30,6 @@ import com.sun.star.wizards.common.Configuration;
public class CGCategory
{
- public String Name;
- public int Index;
private static final String CGROOTPATH = "/org.openoffice.Office.TableWizard/TableWizard/";
XMultiServiceFactory xMSF;
XNameAccess xNameAccessTablesNode;
diff --git a/wizards/com/sun/star/wizards/table/CGTable.java b/wizards/com/sun/star/wizards/table/CGTable.java
index 21f8a91..b6c8d1b 100644
--- a/wizards/com/sun/star/wizards/table/CGTable.java
+++ b/wizards/com/sun/star/wizards/table/CGTable.java
@@ -29,8 +29,6 @@ public class CGTable
XMultiServiceFactory xMSF;
XNameAccess xNameAccessFieldsNode;
XNameAccess xNameAccessTableNode;
- public String Index;
- public String Name;
public CGTable(XMultiServiceFactory _xMSF)
{
diff --git a/wizards/com/sun/star/wizards/table/CallTableWizard.java b/wizards/com/sun/star/wizards/table/CallTableWizard.java
index 5c4e35d..605a796 100644
--- a/wizards/com/sun/star/wizards/table/CallTableWizard.java
+++ b/wizards/com/sun/star/wizards/table/CallTableWizard.java
@@ -58,7 +58,6 @@ public class CallTableWizard
private PropertyValue[] m_wizardContext;
// <properties>
public String Command;
- public final Integer CommandType = com.sun.star.sdb.CommandType.TABLE;
// </properties>
/** The constructor of the inner class has a XMultiServiceFactory parameter.
diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java b/wizards/com/sun/star/wizards/table/FieldFormatter.java
index a9a41ca..fdeaed6 100644
--- a/wizards/com/sun/star/wizards/table/FieldFormatter.java
+++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java
@@ -51,7 +51,6 @@ public class FieldFormatter implements XItemListener
XButton btnShiftUp;
XButton btnShiftDown;
short curtabindex;
- String[] fieldnames;
String suntitled;
Integer IFieldFormatStep;
diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java
index 79069f8..cdc6c10 100644
--- a/wizards/com/sun/star/wizards/table/TableWizard.java
+++ b/wizards/com/sun/star/wizards/table/TableWizard.java
@@ -58,7 +58,6 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener
public static final int SOPRIMARYKEYPAGE = 3;
public static final int SOFINALPAGE = 4;
private String sMsgColumnAlreadyExists = PropertyNames.EMPTY_STRING;
- String WizardHeaderText[] = new String[8];
private String m_tableName;
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java b/wizards/com/sun/star/wizards/text/TextDocument.java
index 43b2a56..8f4bb37 100644
--- a/wizards/com/sun/star/wizards/text/TextDocument.java
+++ b/wizards/com/sun/star/wizards/text/TextDocument.java
@@ -72,7 +72,6 @@ public class TextDocument
public XComponent xComponent;
public com.sun.star.text.XTextDocument xTextDocument;
- public com.sun.star.util.XNumberFormats NumberFormats;
public com.sun.star.document.XDocumentProperties m_xDocProps;
public com.sun.star.task.XStatusIndicator xProgressBar;
public com.sun.star.frame.XFrame xFrame;
@@ -82,9 +81,7 @@ public class TextDocument
public com.sun.star.util.XNumberFormatsSupplier xNumberFormatsSupplier;
public com.sun.star.awt.XWindowPeer xWindowPeer;
public int PageWidth;
- public int ScaleWidth;
public Size DocSize;
- public com.sun.star.awt.Rectangle PosSize;
public com.sun.star.lang.Locale CharLocale;
public XStorable xStorable;
diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
index 308b618..4981052 100644
--- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java
+++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
@@ -52,20 +52,10 @@ public class AggregateComponent extends ControlScroller
String slblFieldNames;
String sDuplicateAggregateFunction;
int Count;
- int iQueryType;
static final int SOADDROW = 1;
static final int SOREMOVEROW = 2;
static final int CONTROLROWDIST = 18;
ArrayList<ControlRow> ControlRowVector;
- String OPTIONBUTTONDETAILQUERY_ITEM_CHANGED = "toggleComponent";
- String OPTIONBUTTONSUMMARYQUERY_ITEM_CHANGED = "toggleComponent";
- String LISTBOXFUNCTIONS_ACTION_PERFORMED;
- String LISTBOXFUNCTIONS_ITEM_CHANGED;
- String LISTBOXFIELDNAMES_ACTION_PERFORMED;
- String LISTBOXFIELDNAMES_ITEM_CHANGED;
- String COMMANDBUTTONPLUS_ACTION_PERFORMED = "addRow";
- String COMMANDBUTTONMINUS_ACTION_PERFORMED = "removeRow";
- ArrayList<String> ControlRows;
int curHelpID;
int lastHelpIndex;
diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java
index 76d06fb..ea6aa95 100644
--- a/wizards/com/sun/star/wizards/ui/ButtonList.java
+++ b/wizards/com/sun/star/wizards/ui/ButtonList.java
@@ -61,7 +61,6 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
private static final int imageTextLines = 1;
private boolean rowSelect = false;
public int tabIndex;
- public Boolean scaleImages = Boolean.TRUE;
private String m_aControlName = "il";
private int m_nCurrentSelection = -1;
private int pageStart = 0;
diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java
index ed9f747..67349aa 100644
--- a/wizards/com/sun/star/wizards/ui/ControlScroller.java
+++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java
@@ -42,7 +42,6 @@ public abstract class ControlScroller
protected int iCompPosY;
protected Integer ICompWidth;
protected int iCompWidth;
- protected Integer ICompHeight;
protected int iCompHeight;
protected int iStartPosY;
protected short curtabindex;
@@ -54,7 +53,6 @@ public abstract class ControlScroller
protected int curHelpIndex;
String sIncSuffix;
protected ArrayList<Object> ControlGroupVector = new ArrayList<Object>();
- protected PeerConfig oTitlePeerConfig;
class AdjustmentListenerImpl implements com.sun.star.awt.XAdjustmentListener
{
diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java
index b7975e2..baa1728 100644
--- a/wizards/com/sun/star/wizards/ui/FilterComponent.java
+++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java
@@ -101,12 +101,6 @@ public class FilterComponent
static final int SO_SECONDBOOLFIELDNAME = 256 + 2;
static final int SO_THIRDBOOLFIELDNAME = 256 + 3;
static final int SO_FOURTHBOOLFIELDNAME = 256 + 4;
- int SO_BOOLEANLIST[] =
-
-
- {
- SO_FIRSTBOOLFIELDNAME, SO_SECONDBOOLFIELDNAME, SO_THIRDBOOLFIELDNAME, SO_FOURTHBOOLFIELDNAME
- };
static final int SO_OPTQUERYMODE = 5;
int SOI_MATCHALL = 0;
int SOI_MATCHANY = 1;
diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java
index 7f9d476..9e6df49 100644
--- a/wizards/com/sun/star/wizards/ui/SortingComponent.java
+++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java
@@ -30,13 +30,11 @@ public class SortingComponent
com.sun.star.lang.XMultiServiceFactory xMSF;
WizardDialog CurUnoDialog;
int MaxSortIndex = -1;
- public String[][] FieldNames;
static String sNoSorting;
static String sSortCriteriaisduplicate;
static String[] sSortHeader = new String[4];
static String[] sSortAscend = new String[4];
static String[] sSortDescend = new String[4];
- static short[] bOldSortValues = new short[4];
public int MAXSORTCRITERIAINDEX = 3;
static final int SOFIRSTSORTLST = 0;
static final int SOSECSORTLST = 1;
diff --git a/wizards/com/sun/star/wizards/ui/TitlesComponent.java b/wizards/com/sun/star/wizards/ui/TitlesComponent.java
index 14a7815..eb999d0 100644
--- a/wizards/com/sun/star/wizards/ui/TitlesComponent.java
+++ b/wizards/com/sun/star/wizards/ui/TitlesComponent.java
@@ -34,7 +34,6 @@ public class TitlesComponent extends ControlScroller
public String[] fieldnames;
public Map<String, String> fieldtitleset;
public String[] fieldtitles;
- public XTextListener xTextListener;
static final String SOLABELPREFIX = "lblColumnName_";
static final String SOTITLEPREFIX = "lblTitleName_";
@@ -87,7 +86,6 @@ public class TitlesComponent extends ControlScroller
class ControlRow
{
- PropertyValue[] regproperties;
XTextComponent xTextComponent;
public ControlRow(int _index, int _iCompPosY)
diff --git a/wizards/com/sun/star/wizards/ui/UIConsts.java b/wizards/com/sun/star/wizards/ui/UIConsts.java
index 0d2e956..eb5c64d 100644
--- a/wizards/com/sun/star/wizards/ui/UIConsts.java
+++ b/wizards/com/sun/star/wizards/ui/UIConsts.java
@@ -27,9 +27,7 @@ public interface UIConsts
int RID_QUERY = 2300;
int RID_REPORT = 2400;
int RID_TABLE = 2600;
- int RID_IMG_REPORT = 1000;
int RID_IMG_FORM = 1100;
- int RID_IMG_WEB = 1200;
Integer INVISIBLESTEP = 99;
String INFOIMAGEURL = "private:resource/dbu/image/19205";
String INFOIMAGEURL_HC = "private:resource/dbu/image/19230";
@@ -38,23 +36,13 @@ public interface UIConsts
* high tabindex because on every step their taborder must appear at the end
*/
short SOFIRSTWIZARDNAVITABINDEX = 30000;
- Integer INTEGER_8 = 8;
Integer INTEGER_12 = 12;
- Integer INTEGER_14 = 14;
- Integer INTEGER_16 = 16;
- Integer INTEGER_40 = 40;
- Integer INTEGER_50 = 50;
/**Steps of the QueryWizard
*
*/
- int SOFIELDSELECTIONPAGE = 1;
- int SOSORTINGPAGE = 2;
- int SOFILTERPAGE = 3;
- int SOAGGREGATEPAGE = 4;
int SOGROUPSELECTIONPAGE = 5;
int SOGROUPFILTERPAGE = 6;
int SOTITLESPAGE = 7;
- int SOSUMMARYPAGE = 8;
Integer[] INTEGERS = new Integer[]
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index 3d80b09..fb69831 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -50,12 +50,10 @@ import com.sun.star.wizards.ui.event.XWindowListenerAdapter;
public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeListener, XTerminateListener, XCompletion
{
- public VetoableChangeSupport vetos = new VetoableChangeSupport(this);
private static final int iButtonWidth = 50;
private int nNewStep = 1;
private int nOldStep = 1;
private int nMaxStep = 1;
- protected XItemListener RoadmapItemListener;
XItemEventBroadcaster xRoadmapBroadcaster;
String[] sRMItemLabels;
private Object oRoadmap;
commit d4daa09f94085a0fb11f4574756929418a48bf48
Author: Noel Grandin <noel at peralex.com>
Date: Wed Nov 26 10:51:57 2014 +0200
java,wizards: remove unnecessary use of reflection
Change-Id: I44750fa6673c7b5e0a796b6e443028aa3a5e68fc
diff --git a/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java b/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java
index ca0ec1f..013fb54 100644
--- a/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java
+++ b/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java
@@ -31,8 +31,6 @@ import com.sun.star.wizards.common.Desktop;
import com.sun.star.wizards.common.NamedValueCollection;
import com.sun.star.wizards.common.Properties;
import com.sun.star.wizards.ui.WizardDialog;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -89,7 +87,12 @@ public abstract class DatabaseObjectWizard extends WizardDialog
}
}
- protected static void executeWizardFromCommandLine( final String i_args[], final String i_className )
+ public interface WizardFromCommandLineStarter
+ {
+ void start(XMultiServiceFactory factory, PropertyValue[] curproperties);
+ }
+
+ protected static void executeWizardFromCommandLine( final String i_args[], WizardFromCommandLineStarter starter )
{
final String settings[] = new String[] { null, null, null };
final int IDX_PIPE_NAME = 0;
@@ -156,11 +159,7 @@ public abstract class DatabaseObjectWizard extends WizardDialog
else
curproperties[0] = Properties.createProperty( "DataSourceName", settings[ IDX_DSN ] );
- final Class wizardClass = Class.forName( i_className );
- final Constructor ctor = wizardClass.getConstructor( XMultiServiceFactory.class, PropertyValue[].class );
- final Method invokeMethod = wizardClass.getMethod( "start", new Class[0] );
- final Object wizardInstance = ctor.newInstance( serviceFactory, curproperties );
- invokeMethod.invoke( wizardInstance );
+ starter.start(serviceFactory, curproperties);
}
}
catch (java.lang.Exception jexception)
diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java b/wizards/com/sun/star/wizards/form/FormWizard.java
index 44dcec8..17e45ba 100644
--- a/wizards/com/sun/star/wizards/form/FormWizard.java
+++ b/wizards/com/sun/star/wizards/form/FormWizard.java
@@ -84,7 +84,12 @@ public class FormWizard extends DatabaseObjectWizard
public static void main(String i_args[])
{
- executeWizardFromCommandLine( i_args, FormWizard.class.getName() );
+ executeWizardFromCommandLine( i_args, new WizardFromCommandLineStarter() {
+ public void start(XMultiServiceFactory factory, PropertyValue[] curproperties) {
+ FormWizard wizard = new FormWizard(factory, curproperties);
+ wizard.start();
+ }
+ });
}
// @Override
diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java
index 1e068af..e47ffe5 100644
--- a/wizards/com/sun/star/wizards/query/QueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/QueryWizard.java
@@ -79,7 +79,12 @@ public class QueryWizard extends DatabaseObjectWizard
public static void main(String i_args[])
{
- executeWizardFromCommandLine( i_args, QueryWizard.class.getName() );
+ executeWizardFromCommandLine( i_args, new WizardFromCommandLineStarter() {
+ public void start(XMultiServiceFactory factory, PropertyValue[] curproperties) {
+ QueryWizard wizard = new QueryWizard(factory, curproperties);
+ wizard.start();
+ }
+ });
}
public final XFrame getFrame()
commit c0d1f38fb4de1bfa3eea0501e36e85e8dd3a0269
Author: Noel Grandin <noel at peralex.com>
Date: Wed Nov 26 10:17:01 2014 +0200
java,wizards: remove unnecessary use of reflection
Change-Id: I6c879957e4dcd003eb155900d4cc9cd8f445ef32
diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
index 42c15d4..a090b36 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
@@ -17,7 +17,12 @@
*/
package com.sun.star.wizards.reportbuilder;
-import com.sun.star.util.XModeSelector;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import com.sun.star.awt.XWindowPeer;
import com.sun.star.beans.PropertyValue;
@@ -35,18 +40,14 @@ import com.sun.star.sdb.application.DatabaseObject;
import com.sun.star.sdb.application.XDatabaseDocumentUI;
import com.sun.star.ucb.XCommandProcessor;
import com.sun.star.uno.UnoRuntime;
+import com.sun.star.util.XModeSelector;
import com.sun.star.util.XModifiable;
import com.sun.star.util.XURLTransformer;
-import com.sun.star.wizards.common.Resource;
-import com.sun.star.wizards.db.FieldColumn;
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Set;
import com.sun.star.wizards.common.FileAccess;
import com.sun.star.wizards.common.NamedValueCollection;
import com.sun.star.wizards.common.PropertyNames;
+import com.sun.star.wizards.common.Resource;
+import com.sun.star.wizards.db.FieldColumn;
import com.sun.star.wizards.report.IReportBuilderLayouter;
import com.sun.star.wizards.report.IReportDefinitionReadAccess;
import com.sun.star.wizards.report.IReportDocument;
@@ -54,8 +55,6 @@ import com.sun.star.wizards.report.ReportImplementationHelper;
import com.sun.star.wizards.report.ReportLayouter;
import com.sun.star.wizards.report.ReportWizard;
import com.sun.star.wizards.ui.UIConsts;
-import java.util.logging.Level;
-import java.util.logging.Logger;
/**
* This class use the IReportDocument Interface to communicate between the UI
@@ -520,34 +519,6 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
return m_nDefaultPageOrientation;
}
- /**
- * Helper function to get a com.sun.star.wizards.report.layout.ReportBuilderLayouter by its name
- *
- * @param _sClassName
- * @return the object or null
- */
- private IReportBuilderLayouter getLayoutInstanceFrom(String _sClassName)
- {
- try
- {
- // TODO: Use Package.getPackages(...)
- final Class<?> a = Class.forName(_sClassName);
-
- final Constructor<?> cTor = a.getConstructor(new Class[]
- {
- IReportDefinitionReadAccess.class, Resource.class
- });
- Object[] aParams = new Object[2];
- aParams[0] = this;
- aParams[1] = m_resource;
- return (IReportBuilderLayouter) cTor.newInstance(aParams);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return null;
- }
private LinkedHashMap<String, IReportBuilderLayouter> m_aLayoutMap = null;
private void insertIntoLayoutMap(IReportBuilderLayouter _aLayout)
@@ -579,17 +550,17 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
m_aLayoutMap = new LinkedHashMap<String, IReportBuilderLayouter>();
// TODO: We must know the name of a layouts, There should be a way to say where to find, not the names.
- IReportBuilderLayouter aLayout = getLayoutInstanceFrom("com.sun.star.wizards.reportbuilder.layout.Tabular");
+ IReportBuilderLayouter aLayout = new com.sun.star.wizards.reportbuilder.layout.Tabular(this, m_resource);
insertIntoLayoutMap(aLayout, true);
- aLayout = getLayoutInstanceFrom("com.sun.star.wizards.reportbuilder.layout.ColumnarSingleColumn");
+ aLayout = new com.sun.star.wizards.reportbuilder.layout.ColumnarSingleColumn(this, m_resource);
insertIntoLayoutMap(aLayout);
- aLayout = getLayoutInstanceFrom("com.sun.star.wizards.reportbuilder.layout.ColumnarTwoColumns");
+ aLayout = new com.sun.star.wizards.reportbuilder.layout.ColumnarTwoColumns(this, m_resource);
insertIntoLayoutMap(aLayout);
- aLayout = getLayoutInstanceFrom("com.sun.star.wizards.reportbuilder.layout.ColumnarThreeColumns");
+ aLayout = new com.sun.star.wizards.reportbuilder.layout.ColumnarThreeColumns(this, m_resource);
insertIntoLayoutMap(aLayout);
- aLayout = getLayoutInstanceFrom("com.sun.star.wizards.reportbuilder.layout.InBlocksLabelsAbove");
+ aLayout = new com.sun.star.wizards.reportbuilder.layout.InBlocksLabelsAbove(this, m_resource);
insertIntoLayoutMap(aLayout);
- aLayout = getLayoutInstanceFrom("com.sun.star.wizards.reportbuilder.layout.InBlocksLabelsLeft");
+ aLayout = new com.sun.star.wizards.reportbuilder.layout.InBlocksLabelsLeft(this, m_resource);
insertIntoLayoutMap(aLayout);
}
More information about the Libreoffice-commits
mailing list