diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-18 12:05:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-11-18 12:44:37 +0200 |
commit | f5d1368659fdead1ae7ff5dc625a8c0d56d4da9a (patch) | |
tree | ce9ab3b2448f3c21d61576acc75ece16bd24c9ea /wizards | |
parent | a3a57bebcd761a0c0910e482ffdc4a3f11cbcde5 (diff) |
java, wizards: remove unused local variables and fields
Change-Id: I77dfcaae8950397e0f22c9a3e744e744055b6cf3
Diffstat (limited to 'wizards')
37 files changed, 45 insertions, 94 deletions
diff --git a/wizards/com/sun/star/wizards/common/Desktop.java b/wizards/com/sun/star/wizards/common/Desktop.java index 665b23ec3823..70ef5a725708 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.java +++ b/wizards/com/sun/star/wizards/common/Desktop.java @@ -93,7 +93,7 @@ public class Desktop return UnoRuntime.queryInterface(XSpreadsheetDocument.class, xComponent); } - public static XDispatch getDispatcher(XMultiServiceFactory xMSF, XFrame xFrame, String _stargetframe, com.sun.star.util.URL oURL) + public static XDispatch getDispatcher(XFrame xFrame, String _stargetframe, com.sun.star.util.URL oURL) { try { @@ -131,7 +131,7 @@ public class Desktop public static void dispatchURL(XMultiServiceFactory xMSF, String sURL, XFrame xFrame, String _stargetframe) { com.sun.star.util.URL oURL = getDispatchURL(xMSF, sURL); - XDispatch xDispatch = getDispatcher(xMSF, xFrame, _stargetframe, oURL); + XDispatch xDispatch = getDispatcher(xFrame, _stargetframe, oURL); dispatchURL(xDispatch, oURL); } diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java index 6935c1f3e3c7..3afc8ec3f394 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.java +++ b/wizards/com/sun/star/wizards/common/FileAccess.java @@ -54,8 +54,7 @@ public class FileAccess public static void addOfficePath(XMultiServiceFactory xMSF, String sPath, String sAddPath) { - XSimpleFileAccess xSimpleFileAccess = null; - String ResultPath = getOfficePath(xMSF, sPath, xSimpleFileAccess); + String ResultPath = getOfficePath(xMSF, sPath); // As there are several conventions about the look of Url (e.g. with " " or with "%20") you cannot make a // simple String comparison to find out, if a path is already in "ResultPath" String[] PathList = JavaTools.ArrayoutofString(ResultPath, PropertyNames.SEMI_COLON); @@ -92,7 +91,7 @@ public class FileAccess * chapter 6.2.7 * @return the respective path of the office application. A probable following "/" at the end is trimmed. */ - public static String getOfficePath(XMultiServiceFactory xMSF, String sPath, XSimpleFileAccess xSimpleFileAccess) + public static String getOfficePath(XMultiServiceFactory xMSF, String sPath) { try { @@ -187,7 +186,7 @@ public class FileAccess return ResultPath; } - public static ArrayList<String> getOfficePaths(XMultiServiceFactory xMSF, String _sPath, String sType, String sSearchDir) + public static ArrayList<String> getOfficePaths(XMultiServiceFactory xMSF, String _sPath) { //This method currently only works with sPath="Template" @@ -366,7 +365,7 @@ public class FileAccess String sNoDirCreation = PropertyNames.EMPTY_STRING; try { - Resource oResource = new Resource(xMSF, "ImportWizard", "imp"); + Resource oResource = new Resource(xMSF, "imp"); sNoDirCreation = oResource.getResText(1050); String sMsgDirNotThere = oResource.getResText(1051); String sQueryForNewCreation = oResource.getResText(1052); @@ -416,7 +415,7 @@ public class FileAccess { if (xSimpleFileAccess.exists(Path)) { - Resource oResource = new Resource(xMSF, "ImportWizard", "imp"); + Resource oResource = new Resource(xMSF, "imp"); String sFileexists = oResource.getResText(1053); String NewString = JavaTools.convertfromURLNotation(Path); sFileexists = JavaTools.replaceSubString(sFileexists, NewString, "<1>"); diff --git a/wizards/com/sun/star/wizards/common/Helper.java b/wizards/com/sun/star/wizards/common/Helper.java index 9d6b79aaa4d6..556d750b184d 100644 --- a/wizards/com/sun/star/wizards/common/Helper.java +++ b/wizards/com/sun/star/wizards/common/Helper.java @@ -21,7 +21,6 @@ import com.sun.star.uno.XComponentContext; import com.sun.star.util.XMacroExpander; import java.util.Calendar; -import com.sun.star.beans.Property; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.XPropertySet; import com.sun.star.lang.Locale; @@ -56,7 +55,6 @@ public class Helper } else { - Property[] selementnames = xPSet.getPropertySetInfo().getProperties(); throw new java.lang.IllegalArgumentException("No Such Property: '" + PropertyName + "'"); } } diff --git a/wizards/com/sun/star/wizards/common/Resource.java b/wizards/com/sun/star/wizards/common/Resource.java index 657e750792f6..c54cb3f2a2ae 100644 --- a/wizards/com/sun/star/wizards/common/Resource.java +++ b/wizards/com/sun/star/wizards/common/Resource.java @@ -35,7 +35,7 @@ public class Resource /** Creates a new instance of Resource */ - public Resource(XMultiServiceFactory _xMSF, String _Unit /* unused */, String _Module) + public Resource(XMultiServiceFactory _xMSF, String _Module) { this.xMSF = _xMSF; this.Module = _Module; diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.java b/wizards/com/sun/star/wizards/common/SystemDialog.java index 62ebeb5bffde..2486db840915 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.java +++ b/wizards/com/sun/star/wizards/common/SystemDialog.java @@ -279,7 +279,7 @@ public class SystemDialog { Resource oResource; String ProductName = Configuration.getProductName(xMSF); - oResource = new Resource(xMSF, ResName, ResPrefix); + oResource = new Resource(xMSF, ResPrefix); String sErrorMessage = oResource.getResText(ResID); sErrorMessage = JavaTools.replaceSubString(sErrorMessage, ProductName, "%PRODUCTNAME"); sErrorMessage = JavaTools.replaceSubString(sErrorMessage, String.valueOf((char) 13), "<BR>"); @@ -291,7 +291,7 @@ public class SystemDialog { Resource oResource; String ProductName = Configuration.getProductName(xMSF); - oResource = new Resource(xMSF, ResName, ResPrefix); + oResource = new Resource(xMSF, ResPrefix); String sErrorMessage = oResource.getResText(ResID); sErrorMessage = JavaTools.replaceSubString(sErrorMessage, ProductName, "%PRODUCTNAME"); sErrorMessage = JavaTools.replaceSubString(sErrorMessage, String.valueOf((char) 13), "<BR>"); diff --git a/wizards/com/sun/star/wizards/common/TerminateWizardException.java b/wizards/com/sun/star/wizards/common/TerminateWizardException.java index 507836caa250..ba8e5717f2d1 100644 --- a/wizards/com/sun/star/wizards/common/TerminateWizardException.java +++ b/wizards/com/sun/star/wizards/common/TerminateWizardException.java @@ -24,7 +24,7 @@ public class TerminateWizardException extends Exception public TerminateWizardException(XMultiServiceFactory xMSF) { - Resource oResource = new Resource(xMSF, "AutoPilot", "dbw"); + Resource oResource = new Resource(xMSF, "dbw"); String sErrorMessage = oResource.getResText(1006); SystemDialog.showMessageBox(xMSF, "ErrorBox", com.sun.star.awt.VclWindowPeerAttribute.OK, sErrorMessage); printStackTrace(System.out); diff --git a/wizards/com/sun/star/wizards/common/UCB.java b/wizards/com/sun/star/wizards/common/UCB.java index e7500a62910b..c73eee6b6dee 100644 --- a/wizards/com/sun/star/wizards/common/UCB.java +++ b/wizards/com/sun/star/wizards/common/UCB.java @@ -32,7 +32,6 @@ import com.sun.star.ucb.OpenCommandArgument2; import com.sun.star.ucb.OpenMode; import com.sun.star.ucb.TransferCommandOperation; import com.sun.star.ucb.XCommandProcessor; -import com.sun.star.ucb.XContentAccess; import com.sun.star.ucb.XContentIdentifier; import com.sun.star.ucb.XContentIdentifierFactory; import com.sun.star.ucb.XContentProvider; @@ -161,14 +160,9 @@ public class UCB if (xResultSet.first()) { - // obtain XContentAccess interface for child content access and XRow for properties - XContentAccess xContentAccess = UnoRuntime.queryInterface( - XContentAccess.class, xResultSet); XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet); do { - // Obtain URL of child. - String aId = xContentAccess.queryContentIdentifierString(); // First column: Title (column numbers are 1-based!) String aTitle = xRow.getString(1); if (aTitle.length() == 0 && xRow.wasNull()) diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 87e26b6ec515..02929b973ff0 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -305,7 +305,7 @@ public class CommandMetaData extends DBMetaData { exception.printStackTrace(System.err); } - Resource oResource = new Resource(xMSF, "Database", "dbw"); + Resource oResource = new Resource(xMSF, "dbw"); String sMsgNoFieldsFromCommand = oResource.getResText(RID_DB_COMMON + 45); sMsgNoFieldsFromCommand = JavaTools.replaceSubString(sMsgNoFieldsFromCommand, _commandname, "%NAME"); showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMsgNoFieldsFromCommand); diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index a4c49c2e8d79..dc6b0fbb2882 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -668,7 +668,7 @@ public class DBMetaData private boolean getConnection(XDataSource _dataSource) { - Resource oResource = new Resource(xMSF, "Database", "dbw"); + Resource oResource = new Resource(xMSF, "dbw"); try { int iMsg = 0; @@ -1003,9 +1003,7 @@ public class DBMetaData { try { - XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface( XSimpleFileAccess.class, xInterface ); - String storepath = FileAccess.getOfficePath(xMSF, "Temp", xSimpleFileAccess) + "/" + _storename; + String storepath = FileAccess.getOfficePath(xMSF, "Temp") + "/" + _storename; XStorable xStoreable = UnoRuntime.queryInterface( XStorable.class, _xcomponent ); PropertyValue[] oStoreProperties = new PropertyValue[1]; oStoreProperties[0] = Properties.createProperty("FilterName", "writer8"); diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java index 0f83ef1d78c6..cbca3d0eaaa0 100644 --- a/wizards/com/sun/star/wizards/db/RecordParser.java +++ b/wizards/com/sun/star/wizards/db/RecordParser.java @@ -191,7 +191,6 @@ public class RecordParser extends QueryMetaData initializeFieldColumns(_sFieldNames, xColumns); } String[] AllQueryFieldNames = xColumns.getElementNames(); - String[] sFieldNames = getFieldNames(); for (int i = 0; i < FieldColumns.length; i++) { String sFieldName = FieldColumns[i].getFieldName(); diff --git a/wizards/com/sun/star/wizards/db/RelationController.java b/wizards/com/sun/star/wizards/db/RelationController.java index d08a13a60d76..a25b7961dd08 100644 --- a/wizards/com/sun/star/wizards/db/RelationController.java +++ b/wizards/com/sun/star/wizards/db/RelationController.java @@ -59,7 +59,6 @@ public class RelationController extends CommandName }; try { - String[] sTableNames = super.getCommandMetaData().getTableNames(); ArrayList<String> aReferencedTableVector = new ArrayList<String>(); XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getExportedKeys((getCatalogName(this)), getSchemaName(), getTableName()); XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet); diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index de25e25a06ef..897e4bcd8ff1 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -21,7 +21,6 @@ package com.sun.star.wizards.db; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.beans.*; import com.sun.star.container.XIndexAccess; -import com.sun.star.container.XNameAccess; import com.sun.star.sdbcx.XColumnsSupplier; import com.sun.star.sdb.XSingleSelectQueryComposer; import com.sun.star.sdb.XSingleSelectQueryAnalyzer; @@ -229,8 +228,6 @@ public class SQLQueryComposer private PropertyValue[][] replaceConditionsByAlias(PropertyValue _filterconditions[][]) { - XColumnsSupplier columnSup = UnoRuntime.queryInterface(XColumnsSupplier.class, m_xQueryAnalyzer); - XNameAccess columns = columnSup.getColumns(); for (int n = 0; n < _filterconditions.length; n++) { for (int m = 0; m < _filterconditions[n].length; m++) diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index 68b2e95317ea..4b28e84fc83f 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -709,7 +709,6 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { ColumnDescriptor oColumnDescriptor = columncontainer.get(i); XPropertySet xColPropertySet = getByName(oColumnDescriptor.Name); - Property[] aProperties = xColPropertySet.getPropertySetInfo().getProperties(); int itype; try { diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java index e07b784850c8..e9b26954844f 100644 --- a/wizards/com/sun/star/wizards/document/Control.java +++ b/wizards/com/sun/star/wizards/document/Control.java @@ -276,7 +276,6 @@ public class Control extends Shape double dblEffMax = 0; if (xPropertySet.getPropertySetInfo().hasPropertyByName("EffectiveMax")) { - Object oValue = xPropertySet.getPropertyValue("EffectiveMax"); if (xPropertySet.getPropertyValue("EffectiveMax") != com.sun.star.uno.Any.VOID) { dblEffMax = AnyConverter.toDouble(xPropertySet.getPropertyValue("EffectiveMax")); diff --git a/wizards/com/sun/star/wizards/document/GridControl.java b/wizards/com/sun/star/wizards/document/GridControl.java index 5d25a74f253e..ad11636b7bb0 100644 --- a/wizards/com/sun/star/wizards/document/GridControl.java +++ b/wizards/com/sun/star/wizards/document/GridControl.java @@ -61,17 +61,16 @@ public class GridControl extends Shape xGridColumnFactory = UnoRuntime.queryInterface( XGridColumnFactory.class, oGridModel ); xComponent = UnoRuntime.queryInterface( XComponent.class, oGridModel ); -// Helper.setUnoPropertyValue(oGridModel, PropertyNames.PROPERTY_NAME, _sname); for (int i = 0; i < fieldcolumns.length; i++) { FieldColumn curfieldcolumn = fieldcolumns[i]; if (curfieldcolumn.getFieldType() == DataType.TIMESTAMP) { - TimeStampControl oControl = new TimeStampControl(new Resource(_xMSF, PropertyNames.EMPTY_STRING, "dbw"), this, curfieldcolumn); + new TimeStampControl(new Resource(_xMSF, "dbw"), this, curfieldcolumn); } else { - Control oControl = new DatabaseControl(this, curfieldcolumn); + new DatabaseControl(this, curfieldcolumn); } } diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index b2ac659bb504..4e2613498dd1 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -597,7 +597,7 @@ public class FormControlArranger { if (nFieldType == DataType.TIMESTAMP) { - DBControlList[i] = new TimeStampControl(new Resource(xMSF, "FormWizard", "dbw"), oFormHandler, xFormName, sFieldName, aPoint); + DBControlList[i] = new TimeStampControl(new Resource(xMSF, "dbw"), oFormHandler, xFormName, sFieldName, aPoint); } else { diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java index 37b20638dd11..9fe87522a35c 100644 --- a/wizards/com/sun/star/wizards/form/FormDocument.java +++ b/wizards/com/sun/star/wizards/form/FormDocument.java @@ -46,7 +46,6 @@ public class FormDocument extends TextDocument protected String[][] LinkFieldNames; private FormHandler oFormHandler; - private ViewHandler oViewHandler; private XPropertySet xPropPageStyle; private static final int SOFORMGAP = 2000; private boolean bhasSubForm; @@ -67,12 +66,12 @@ public class FormDocument extends TextDocument { oFormHandler = new FormHandler(xMSF, xTextDocument); oFormHandler.setDrawObjectsCaptureMode(false); - TextStyleHandler oTextStyleHandler = new TextStyleHandler(xMSFDoc, xTextDocument); - oViewHandler = new ViewHandler(xMSFDoc, xTextDocument); + TextStyleHandler oTextStyleHandler = new TextStyleHandler(xTextDocument); + new ViewHandler(xTextDocument); oMainFormDBMetaData = new CommandMetaData(xMSF);// , CharLocale); oSubFormDBMetaData = new CommandMetaData(xMSF);// , CharLocale); - ViewHandler oViewHandler = new ViewHandler(xMSF, xTextDocument); - TextStyleHandler oTextStyleSupplier = new TextStyleHandler(xMSFDoc, xTextDocument); + ViewHandler oViewHandler = new ViewHandler(xTextDocument); + TextStyleHandler oTextStyleSupplier = new TextStyleHandler(xTextDocument); Helper.setUnoPropertyValue(xTextDocument, "ApplyFormDesignMode", Boolean.FALSE); oViewHandler.setViewSetting("ShowTableBoundaries", Boolean.FALSE); oViewHandler.setViewSetting("ShowOnlineLayout", Boolean.TRUE); diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 699d202dc7d3..262fc4f312c1 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -65,7 +65,7 @@ public class StyleApplier this.curFormDocument = _curFormDocument; xMSF = curFormDocument.xMSF; - TextStyleHandler oTextStyleHandler = new TextStyleHandler(xMSF, curFormDocument.xTextDocument); + TextStyleHandler oTextStyleHandler = new TextStyleHandler(curFormDocument.xTextDocument); xPageStylePropertySet = oTextStyleHandler.getStyleByName("PageStyles", "Standard"); short curtabindex = (short) (FormWizard.SOSTYLE_PAGE * 100); Integer IStyleStep = Integer.valueOf(FormWizard.SOSTYLE_PAGE); @@ -121,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 }); - XRadioButton optFlat = CurUnoDialog.insertRadioButton("otpFlat", SCHANGEBORDERTYPE, this, + 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 diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index e10945825b5c..1e068af5698f 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -231,7 +231,7 @@ public class QueryWizard extends DatabaseObjectWizard m_DBCommandFieldSelectio.setAppendMode(true); m_DBCommandFieldSelectio.addFieldSelectionListener(new FieldSelectionListener()); m_sortingComponent = new SortingComponent(this, SOSORTING_PAGE, 95, 27, 210, 40865); - m_filterComponent = new FilterComponent(this, xMSF, SOFILTER_PAGE, 97, 27, 209, 3, m_DBMetaData, 40878); + m_filterComponent = new FilterComponent(this, xMSF, SOFILTER_PAGE, 97, 27, 3, m_DBMetaData, 40878); m_filterComponent.addNumberFormats(); if (m_DBMetaData.xDBMetaData.supportsCoreSQLGrammar()) @@ -242,7 +242,7 @@ public class QueryWizard extends DatabaseObjectWizard { m_groupFieldSelection = new FieldSelection(this, SOGROUPSELECTION_PAGE, 95, 27, 210, 150, reslblFields, this.reslblGroupBy, 40915, false); m_groupFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); - m_groupFilterComponent = new FilterComponent(this, xMSF, SOGROUPFILTER_PAGE, 97, 27, 209, 3, m_DBMetaData, 40923); + m_groupFilterComponent = new FilterComponent(this, xMSF, SOGROUPFILTER_PAGE, 97, 27, 3, m_DBMetaData, 40923); } m_titlesComponent = new TitlesComponent(this, SOTITLES_PAGE, 97, 37, 207, 7, reslblFieldHeader, reslblAliasHeader, 40940); m_finalizer = new Finalizer(this, m_DBMetaData); diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index cbb98ee2ae3c..3eecd4c4d506 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -64,7 +64,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi CurReportDocument.StopProcess(); } - public void showProgressDisplay(XMultiServiceFactory xMSF, boolean bgetConnection) + public void showProgressDisplay(boolean bgetConnection) { try { @@ -166,7 +166,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi PropertyValue[] properties) { CurReportDocument = ReportTextImplementation.create( xMSF, i_documentUI, _textDocument, m_oResource ); - showProgressDisplay(xMSF, true); + showProgressDisplay(true); importReportData(xMSF, this, CurReportDocument, properties); } } diff --git a/wizards/com/sun/star/wizards/report/RecordTable.java b/wizards/com/sun/star/wizards/report/RecordTable.java index 7b4cd1a76e78..f0079b122011 100644 --- a/wizards/com/sun/star/wizards/report/RecordTable.java +++ b/wizards/com/sun/star/wizards/report/RecordTable.java @@ -47,7 +47,6 @@ public class RecordTable try { this.oTextTableHandler = _oTextTableHandler; - String[] TableNames = oTextTableHandler.xTextTablesSupplier.getTextTables().getElementNames(); XNameAccess xAllTextTables = oTextTableHandler.xTextTablesSupplier.getTextTables(); if ((xAllTextTables.hasByName(ReportTextDocument.TBLRECORDSECTION)) || (xAllTextTables.hasByName(ReportTextDocument.COPYOFTBLRECORDSECTION))) { diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 415b7f5fda89..4386d8a7a093 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -16,10 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ package com.sun.star.wizards.report; -import com.sun.star.ucb.XSimpleFileAccess; import com.sun.star.uno.Exception; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; import com.sun.star.wizards.common.*; import com.sun.star.wizards.ui.*; import com.sun.star.awt.VclWindowPeerAttribute; @@ -52,7 +49,6 @@ public class ReportFinalizer this.CurUnoDialog = _CurUnoDialog; this.CurReportDocument = _CurReportDocument; short curtabindex = (short) (ReportWizard.SOSTOREPAGE * 100); - Desktop odesktop = new Desktop(); String sSaveAsTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 40); String sUseTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 41); @@ -188,20 +184,9 @@ public class ReportFinalizer public String getStorePath() { - try - { - StoreName = getStoreName(); - String StorePath; - XInterface xInterface = (XInterface) m_xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); - StorePath = FileAccess.getOfficePath(m_xMSF, "Temp", xSimpleFileAccess) + "/" + StoreName; - return StorePath; - } - catch (Exception e) - { - e.printStackTrace(System.err); - return PropertyNames.EMPTY_STRING; - } + StoreName = getStoreName(); + String StorePath = FileAccess.getOfficePath(m_xMSF, "Temp") + "/" + StoreName; + return StorePath; } public void changeReportTitle() diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index c761d244ab89..7582da8cfbaf 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -92,8 +92,8 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen oTextTableHandler = new TextTableHandler(xMSFDoc, xTextDocument); oTextSectionHandler = new TextSectionHandler(xMSFDoc, xTextDocument); oFormHandler = new FormHandler(xMSFDoc, xTextDocument); - oTextStyleHandler = new TextStyleHandler(xMSFDoc, xTextDocument); - oViewHandler = new ViewHandler(xMSFDoc, xTextDocument); + oTextStyleHandler = new TextStyleHandler(xTextDocument); + oViewHandler = new ViewHandler(xTextDocument); oTextFieldHandler = new TextFieldHandler(xMSFDoc, xTextDocument); DBColumnsVector = new java.util.ArrayList<DBColumn>(); oNumberFormatter = oTextTableHandler.getNumberFormatter(); diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index da043ee00220..8ccf7a64629f 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -600,7 +600,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme // Check general availability of office paths try { - m_aReportPath = FileAccess.getOfficePaths(getMSF(), "Template", "share", "/wizard"); + m_aReportPath = FileAccess.getOfficePaths(getMSF(), "Template"); FileAccess.combinePaths(getMSF(), m_aReportPath, "/wizard/report"); } catch (Exception e) diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java index e3e25206eef5..42c15d4e4c63 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java +++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java @@ -504,7 +504,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper if (m_aReportPath == null) { // Check general availability of office paths - m_aReportPath = FileAccess.getOfficePaths(getMSF(), "Template", "share", "/wizard"); + m_aReportPath = FileAccess.getOfficePaths(getMSF(), "Template"); FileAccess.combinePaths(getMSF(), m_aReportPath, "/wizard/report"); } return m_aReportPath; @@ -631,7 +631,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper try { // TODO: check different languages in header layouts - ArrayList<String> aReportPath = FileAccess.getOfficePaths(getMSF(), "Template", "share", "/wizard"); + ArrayList<String> aReportPath = FileAccess.getOfficePaths(getMSF(), "Template"); FileAccess.combinePaths(getMSF(), aReportPath, "/wizard/report"); LayoutFiles = FileAccess.getFolderTitles(getMSF(), null, aReportPath, ".otr"); diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java index 02548d0c7bc6..32a0f07841d0 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java @@ -225,7 +225,6 @@ public class DesignTemplate m_aGroupTextField[nGroup] = SectionTextField.create(aFormattedField); } } - int dummy = 0; } catch (com.sun.star.lang.IndexOutOfBoundsException ex) { diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index 3d13ad939c4d..dd39e3e18c95 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -20,7 +20,6 @@ package com.sun.star.wizards.table; import java.util.ArrayList; import com.sun.star.awt.ItemEvent; -import com.sun.star.awt.XFixedText; import com.sun.star.awt.XItemListener; import com.sun.star.awt.XListBox; import com.sun.star.awt.XRadioButton; diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java b/wizards/com/sun/star/wizards/text/TextDocument.java index e836a818656f..43b2a56e7acb 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.java +++ b/wizards/com/sun/star/wizards/text/TextDocument.java @@ -266,7 +266,7 @@ public class TextDocument DocSize = getPageSize(); xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); - ViewHandler myViewHandler = new ViewHandler(xMSFDoc, xTextDocument); + ViewHandler myViewHandler = new ViewHandler(xTextDocument); try { myViewHandler.setViewSetting("ZoomType", Short.valueOf(com.sun.star.view.DocumentZoomType.ENTIRE_PAGE)); @@ -307,7 +307,6 @@ public class TextDocument public TextDocument(XMultiServiceFactory xMSF, String URL, PropertyValue[] xArgs, XTerminateListener listener) { this.xMSF = xMSF; - XDesktop xDesktop = Desktop.getDesktop(xMSF); xFrame = OfficeDocument.createNewFrame(xMSF, listener); Object oDoc = OfficeDocument.load(xFrame, URL, "_self", xArgs); diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.java b/wizards/com/sun/star/wizards/text/TextSectionHandler.java index d8bc579c6112..dfc3485312ad 100644 --- a/wizards/com/sun/star/wizards/text/TextSectionHandler.java +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.java @@ -133,7 +133,6 @@ public class TextSectionHandler for (int i = TextSectionCount - 1; i >= 0; i--) { XTextContent xTextContentTextSection = UnoRuntime.queryInterface(XTextContent.class, xAllTextSections.getByIndex(i)); - XPropertySet xTextSectionPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xTextContentTextSection); xText.removeTextContent(xTextContentTextSection); } } diff --git a/wizards/com/sun/star/wizards/text/TextStyleHandler.java b/wizards/com/sun/star/wizards/text/TextStyleHandler.java index 58e8584eb782..c36bdc670ef2 100644 --- a/wizards/com/sun/star/wizards/text/TextStyleHandler.java +++ b/wizards/com/sun/star/wizards/text/TextStyleHandler.java @@ -34,7 +34,7 @@ public class TextStyleHandler public XStyleFamiliesSupplier xStyleFamiliesSupplier; /** Creates a new instance of TextStyleHandler */ - public TextStyleHandler(com.sun.star.lang.XMultiServiceFactory xMSF, XTextDocument xTextDocument) + public TextStyleHandler(XTextDocument xTextDocument) { xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); } diff --git a/wizards/com/sun/star/wizards/text/TextTableHandler.java b/wizards/com/sun/star/wizards/text/TextTableHandler.java index 112dd44f5e72..1be1e6717ccb 100644 --- a/wizards/com/sun/star/wizards/text/TextTableHandler.java +++ b/wizards/com/sun/star/wizards/text/TextTableHandler.java @@ -207,7 +207,6 @@ public class TextTableHandler public static BreakType resetBreakTypeofTextTable(Object oTextTable) { - BreakType BreakValue = (BreakType) com.sun.star.wizards.common.Helper.getUnoStructValue(oTextTable, "BreakType"); Helper.setUnoPropertyValue(oTextTable, "BreakType", BreakType.NONE); return BreakType.NONE; } diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.java b/wizards/com/sun/star/wizards/text/ViewHandler.java index 11134f13caaf..fc7842996ab9 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.java +++ b/wizards/com/sun/star/wizards/text/ViewHandler.java @@ -23,7 +23,6 @@ import com.sun.star.container.XIndexAccess; import com.sun.star.container.XNameAccess; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.WrappedTargetException; -import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.style.XStyleFamiliesSupplier; import com.sun.star.text.XPageCursor; import com.sun.star.text.XTextContent; @@ -44,7 +43,7 @@ public class ViewHandler private final XViewSettingsSupplier xViewSettingsSupplier; /** Creates a new instance of View */ - public ViewHandler(XMultiServiceFactory xMSF, XTextDocument xTextDocument) + public ViewHandler(XTextDocument xTextDocument) { xTextViewCursorSupplier = UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xTextDocument.getCurrentController()); xViewSettingsSupplier = UnoRuntime.queryInterface(XViewSettingsSupplier.class, xTextDocument.getCurrentController()); diff --git a/wizards/com/sun/star/wizards/ui/DocumentPreview.java b/wizards/com/sun/star/wizards/ui/DocumentPreview.java index d989b10224fc..4d7cfeb90427 100644 --- a/wizards/com/sun/star/wizards/ui/DocumentPreview.java +++ b/wizards/com/sun/star/wizards/ui/DocumentPreview.java @@ -37,10 +37,6 @@ public class DocumentPreview * The frame service which is used to show the preview */ private XFrame xFrame; - /** - * The content component of the frame. - */ - private XComponent xComponent; private final XControl xControl; private PropertyValue[] loadArgs; private String url; @@ -78,7 +74,7 @@ public class DocumentPreview loadArgs = lArgs; XComponentLoader xCompLoader = UnoRuntime.queryInterface(XComponentLoader.class, xFrame); xFrame.activate(); - return xComponent = xCompLoader.loadComponentFromURL(url, "_self", 0, loadArgs); + return xCompLoader.loadComponentFromURL(url, "_self", 0, loadArgs); } public void reload(XMultiServiceFactory xmsf) throws com.sun.star.lang.IllegalArgumentException, IOException, CloseVetoException, com.sun.star.uno.Exception diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index 155a0c12ff97..52b4f5652d13 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -374,7 +374,7 @@ public class FilterComponent /** Creates a new instance of FilterComponent */ - public FilterComponent(WizardDialog CurUnoDialog, XMultiServiceFactory _xMSF, int iStep, int iPosX, int iPosY, int iWidth, int FilterCount, QueryMetaData _oQueryMetaData, int _firstHelpID) + public FilterComponent(WizardDialog CurUnoDialog, XMultiServiceFactory _xMSF, int iStep, int iPosX, int iPosY, int FilterCount, QueryMetaData _oQueryMetaData, int _firstHelpID) { this.curHelpID = _firstHelpID; this.xMSF = _xMSF; diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java index 1d8c3c5057d2..7f9d476da515 100644 --- a/wizards/com/sun/star/wizards/ui/SortingComponent.java +++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java @@ -105,7 +105,7 @@ public class SortingComponent }); //Short.valueOf((short) (17+i*4)) HIDString = HelpIds.getHelpIdString(FirstHelpIndex + 1); - XRadioButton xRadioButtonAsc = CurUnoDialog.insertRadioButton("optAscend" + Integer.toString(i + 1), 0, new String[] + CurUnoDialog.insertRadioButton("optAscend" + Integer.toString(i + 1), 0, new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] @@ -114,7 +114,7 @@ public class SortingComponent }); //, Short.valueOf((short) (18+i*4)) HIDString = HelpIds.getHelpIdString(FirstHelpIndex + 2); - XRadioButton xRadioButtonDesc = CurUnoDialog.insertRadioButton("optDescend" + Integer.toString(i + 1), 0, new String[] + CurUnoDialog.insertRadioButton("optDescend" + Integer.toString(i + 1), 0, new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 1f53e451875c..6ba5822c61c2 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -504,7 +504,7 @@ public class UnoDialog implements EventNames /** * The problem with setting the visibility of controls is that changing the current step * of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against - * the property "visible". Therfor a control meant to be invisible is placed on a step far far away. + * the property "visible". Therefore a control meant to be invisible is placed on a step far far away. * Afterwards the step property of the dialog has to be set with "repaintDialogStep". As the performance * of that method is very bad it should be used only once for all controls * @param controlname the name of the control @@ -514,7 +514,6 @@ public class UnoDialog implements EventNames { try { - int iCurControlStep = AnyConverter.toInt(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)); int iCurDialogStep = AnyConverter.toInt(Helper.getUnoPropertyValue(this.xDialogModel, PropertyNames.PROPERTY_STEP)); if (bIsVisible) { @@ -664,7 +663,6 @@ public class UnoDialog implements EventNames { createWindowPeer(); } - XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, xWindowPeer); xDialog = UnoRuntime.queryInterface(XDialog.class, xUnoDialog); this.xWindow.setVisible(true); } @@ -884,7 +882,6 @@ public class UnoDialog implements EventNames */ public static String getDisplayProperty(Object oControlModel) { - XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, oControlModel); int itype = getControlModelType(oControlModel); return getDisplayProperty(itype); } @@ -938,7 +935,7 @@ public class UnoDialog implements EventNames public void addResourceHandler(String _Unit, String _Module) { - m_oResource = new Resource(xMSF, _Unit, _Module); + m_oResource = new Resource(xMSF, _Module); } public static short setInitialTabindex(int _istep) diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index 81d05e722140..abc15222fddd 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -78,7 +78,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL { super(xMSF); hid = hid_; - oWizardResource = new Resource(xMSF, "Common", "dbw"); + oWizardResource = new Resource(xMSF, "dbw"); sMsgEndAutopilot = oWizardResource.getResText(UIConsts.RID_DB_COMMON + 33); } |