bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 3 bean/com/sun/star/comp/beans/OOoBean.java | 18 ++--- filter/qa/complex/filter/misc/FinalizedMandatoryTest.java | 1 jurt/com/sun/star/lib/uno/environments/remote/Job.java | 1 jurt/workbench/com/sun/star/comp/urlresolver/UrlResolver_Test.java | 2 jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java | 2 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java | 35 ++++------ nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java | 1 qadevOOo/runner/convwatch/PerformanceContainer.java | 2 qadevOOo/runner/convwatch/SimpleFileSemaphore.java | 2 qadevOOo/runner/graphical/PerformanceContainer.java | 2 reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java | 1 reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java | 2 scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java | 12 +-- scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java | 10 +- scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java | 2 scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java | 12 --- scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java | 1 scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java | 2 scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java | 5 - sw/qa/complex/writer/CheckBookmarks.java | 4 - sw/qa/complex/writer/TextPortionEnumerationTest.java | 2 swext/mediawiki/src/com/sun/star/wiki/Helper.java | 4 - swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java | 9 -- testtools/com/sun/star/comp/bridge/TestComponent.java | 5 - toolkit/test/accessibility/TopWindowListener.java | 1 toolkit/test/accessibility/ov/StateSetView.java | 1 wizards/com/sun/star/wizards/common/NumberFormatter.java | 26 ++----- wizards/com/sun/star/wizards/db/TableDescriptor.java | 2 wizards/com/sun/star/wizards/document/Control.java | 4 - wizards/com/sun/star/wizards/document/FormHandler.java | 1 wizards/com/sun/star/wizards/form/FieldLinker.java | 2 wizards/com/sun/star/wizards/ui/CommandFieldSelection.java | 30 ++------ wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java | 2 wizards/com/sun/star/wizards/ui/TitlesComponent.java | 2 35 files changed, 69 insertions(+), 142 deletions(-)
New commits: commit 7716243236a047932240de275ecac17b149b88a9 Author: Noel Grandin <n...@peralex.com> Date: Fri Dec 5 11:07:01 2014 +0200 java: remove some comment noise Change-Id: I51118fecf9de27407b4c5a66cd6577574939e001 diff --git a/qadevOOo/runner/convwatch/PerformanceContainer.java b/qadevOOo/runner/convwatch/PerformanceContainer.java index 81cbb95..0590ef3 100644 --- a/qadevOOo/runner/convwatch/PerformanceContainer.java +++ b/qadevOOo/runner/convwatch/PerformanceContainer.java @@ -22,7 +22,7 @@ import java.io.File; import java.io.FileWriter; import java.io.RandomAccessFile; -public class PerformanceContainer /* extends *//* implements */ { +public class PerformanceContainer { /* simple helper functions to start/stop a timer, to know how long a process need in milliseconds */ diff --git a/qadevOOo/runner/convwatch/SimpleFileSemaphore.java b/qadevOOo/runner/convwatch/SimpleFileSemaphore.java index 7f1864f..0fd9882 100644 --- a/qadevOOo/runner/convwatch/SimpleFileSemaphore.java +++ b/qadevOOo/runner/convwatch/SimpleFileSemaphore.java @@ -22,7 +22,7 @@ import java.io.File; import java.io.RandomAccessFile; import helper.OSHelper; -public class SimpleFileSemaphore /* extends *//* implements */ +public class SimpleFileSemaphore { String m_sInternSemaphoreFile; File m_aInternSemaphoreFile; diff --git a/qadevOOo/runner/graphical/PerformanceContainer.java b/qadevOOo/runner/graphical/PerformanceContainer.java index abb5eb9..5812f59 100644 --- a/qadevOOo/runner/graphical/PerformanceContainer.java +++ b/qadevOOo/runner/graphical/PerformanceContainer.java @@ -23,7 +23,7 @@ import java.io.PrintStream; import java.io.RandomAccessFile; -public class PerformanceContainer /* extends *//* implements */ { +public class PerformanceContainer { /* simple helper functions to start/stop a timer, to know how long a process need in milliseconds */ commit c199b76d882619bf9c4169631bc265e5bd2ca7fe Author: Noel Grandin <n...@peralex.com> Date: Fri Dec 5 11:03:50 2014 +0200 java: remove some unused local variables Change-Id: Ia01528460e2f4b610d123e29cad66520abc6a965 diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java index 5a57dcd..c6f6fa3 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java @@ -303,7 +303,7 @@ public class LocalOfficeConnection com.sun.star.comp.helper.Bootstrap.createInitialComponentContext(null); // initial serviceManager - XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager(); + xLocalContext.getServiceManager(); // try to connect to soffice Object aInitialObject = null; @@ -403,7 +403,6 @@ public class LocalOfficeConnection } else { // new style int index = dcp.indexOf(':'); - String url = dcp.substring(0, index).trim(); dcp = dcp.substring(index + 1).trim(); index = dcp.indexOf(';'); diff --git a/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java b/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java index fcf8efd..fea027b 100644 --- a/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java +++ b/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java @@ -159,7 +159,6 @@ public class FinalizedMandatoryTest System.out.println("------------------------------------------------"); try { - PropertyValue instanceProp = new PropertyValue(); filterName = filterNames[i]; System.out.println(filterName); diff --git a/jurt/com/sun/star/lib/uno/environments/remote/Job.java b/jurt/com/sun/star/lib/uno/environments/remote/Job.java index 1d8b366..a9cd28d 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/Job.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/Job.java @@ -77,7 +77,6 @@ public class Job { * @return the result of the message. */ public Object execute() throws Throwable { - Object msgResult = _iMessage.getResult(); if (_iMessage.isRequest()) { Object result = null; Throwable exception = null; diff --git a/jurt/workbench/com/sun/star/comp/urlresolver/UrlResolver_Test.java b/jurt/workbench/com/sun/star/comp/urlresolver/UrlResolver_Test.java index 05b91a1..e0b4ac8 100644 --- a/jurt/workbench/com/sun/star/comp/urlresolver/UrlResolver_Test.java +++ b/jurt/workbench/com/sun/star/comp/urlresolver/UrlResolver_Test.java @@ -36,7 +36,7 @@ public class UrlResolver_Test XComponentContext xcomponentcontext = Bootstrap.createInitialComponentContext( null ); // initial serviceManager - XMultiComponentFactory xLocalServiceManager = xcomponentcontext.getServiceManager(); + xcomponentcontext.getServiceManager(); // create a connector, so that it can contact the office XUnoUrlResolver urlResolver diff --git a/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java b/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java index bf3aef0..65c273b 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java +++ b/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java @@ -53,7 +53,7 @@ public class JREProperties { try{ //This line is needed to get the accessibility properties - Toolkit tk = java.awt.Toolkit.getDefaultToolkit(); + java.awt.Toolkit.getDefaultToolkit(); } catch(Throwable e) { diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java index bf73962..84db968 100644 --- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java +++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java @@ -90,7 +90,6 @@ public abstract class BaseDialog extends BaseControl { public BaseDialog(XComponentContext context, String title, int x, int y, int width, int height) { super(context); - ModalState modalState = ModalState.Exit; try { xMCF = context.getServiceManager(); setUnoModel(xMCF.createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", context)); diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java index a054794..fba3625 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java @@ -135,7 +135,6 @@ public class PentahoReportJob implements ReportJob this.masterValues = (ArrayList<?>) jobProperties.getProperty(ReportEngineParameterNames.INPUT_MASTER_VALUES); this.detailColumns = (ArrayList<?>) jobProperties.getProperty(ReportEngineParameterNames.INPUT_DETAIL_COLUMNS); - Integer maxRows=(Integer) jobProperties.getProperty(ReportEngineParameterNames.MAXROWS); this.resourceManager = new ResourceManager(); this.resourceManager.registerDefaults(); diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java index 9c579e8..9f07ace 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java @@ -1037,7 +1037,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document document = dBuilder.parse(new InputSource(inputStream)); - NodeList nl = document.getElementsByTagName("document-meta/meta/generator"); + document.getElementsByTagName("document-meta/meta/generator"); Node node = document.getFirstChild().getFirstChild().getFirstChild().getFirstChild(); String creator = node.getNodeValue(); node.setNodeValue(creator + "/report_builder"); diff --git a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java index 85b8b3d..c4ae664 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java @@ -76,18 +76,14 @@ public class ParcelBrowseNode extends PropertySet implements registerProperty("Creatable", new Type(boolean.class), (short)0, "creatable"); registerProperty("Renamable", new Type(boolean.class), (short)0, "renamable"); - String parcelDirUrl = parcel.getPathToParcel(); XComponentContext xCtx = provider.getScriptingContext().getComponentContext(); XMultiComponentFactory xFac = xCtx.getServiceManager(); try { - - XSimpleFileAccess xSFA = - UnoRuntime.queryInterface(XSimpleFileAccess.class, - xFac.createInstanceWithContext( - "com.sun.star.ucb.SimpleFileAccess", - xCtx)); - + UnoRuntime.queryInterface(XSimpleFileAccess.class, + xFac.createInstanceWithContext( + "com.sun.star.ucb.SimpleFileAccess", + xCtx)); } catch (com.sun.star.uno.Exception e) { // TODO propagate potential errors LogUtils.DEBUG("Caught exception creating ParcelBrowseNode " + e); diff --git a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java index 3bcf706..2e9ee68 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java @@ -65,15 +65,13 @@ public class ProviderBrowseNode extends PropertySet implements registerProperty("Deletable", new Type(boolean.class), (short)0, "deletable"); registerProperty("Creatable", new Type(boolean.class), (short)0, "creatable"); registerProperty("Editable", new Type(boolean.class), (short)0, "editable"); - XSimpleFileAccess xSFA = null; XMultiComponentFactory xFac = m_xCtx.getServiceManager(); try { - - xSFA = UnoRuntime.queryInterface(XSimpleFileAccess.class, - xFac.createInstanceWithContext( - "com.sun.star.ucb.SimpleFileAccess", - xCtx)); + UnoRuntime.queryInterface(XSimpleFileAccess.class, + xFac.createInstanceWithContext( + "com.sun.star.ucb.SimpleFileAccess", + xCtx)); } // TODO propage errors catch (com.sun.star.uno.Exception e) { diff --git a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java index 3c7bfa0..903a45f 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java @@ -71,8 +71,6 @@ public class ScriptBrowseNode extends PropertySet implements XMultiComponentFactory xFac = xCtx.getServiceManager(); try { - ScriptMetaData data = (ScriptMetaData)parent.getByName(name); - XSimpleFileAccess xSFA = UnoRuntime.queryInterface( XSimpleFileAccess.class, xFac.createInstanceWithContext( diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java index 529332e..31c9f82 100644 --- a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java +++ b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java @@ -148,7 +148,7 @@ public class ParcelDescriptor { return new ScriptEntry[0]; for (int i = 0; i < len; i++) { - String language, languagename, logicalname, description = ""; + String language, languagename, description = ""; Map<String, String> langProps = new HashMap<String, String>(); NodeList nl; Element tmp; @@ -158,11 +158,9 @@ public class ParcelDescriptor { nl = scriptElement.getElementsByTagName("logicalname"); - if (nl == null) - logicalname = ""; - else { + if (nl != null) + { tmp = (Element)nl.item(0); - logicalname = tmp.getAttribute("value"); } // get the text of the description element diff --git a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java index ec22608..29d059d 100644 --- a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java +++ b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java @@ -165,7 +165,6 @@ public class UnoPkgContainer extends ParcelContainer { com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException { - ScriptMetaData scriptData = null; String functionName = psu.function; String parcelName = psu.parcel; String location = psu.location; diff --git a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java index fb18d34..5e6686b 100644 --- a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java +++ b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java @@ -180,8 +180,6 @@ class ScriptImpl implements XScript { aOutParamIndex[0] = new short[0]; aOutParam[0] = new Object[0]; - Map<String, String> languageProps = metaData.getLanguageProperties(); - ScriptDescriptor scriptDesc = new ScriptDescriptor(metaData.getLanguageName()); diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java index a2f7891..636511d 100644 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java @@ -182,11 +182,10 @@ class ScriptImpl implements XScript { aOutParam[0] = new Object[0]; ClassLoader cl = null; - URL sourceUrl = null; try { cl = ClassLoaderFactory.getURLClassLoader(metaData); - sourceUrl = metaData.getSourceURL(); + metaData.getSourceURL(); } catch (java.net.MalformedURLException mfu) { throw new ScriptFrameworkErrorException( mfu.getMessage(), null, @@ -197,14 +196,12 @@ class ScriptImpl implements XScript { Context ctxt = null; try { - String editorURL = sourceUrl.toString(); Object result = null; ScriptEditorForJavaScript editor = ScriptEditorForJavaScript.getEditor(metaData.getSourceURL()); if (editor != null) { - editorURL = editor.getURL(); result = editor.execute(); if (result != null && diff --git a/sw/qa/complex/writer/CheckBookmarks.java b/sw/qa/complex/writer/CheckBookmarks.java index 8dc6b76..607064a 100644 --- a/sw/qa/complex/writer/CheckBookmarks.java +++ b/sw/qa/complex/writer/CheckBookmarks.java @@ -146,9 +146,7 @@ public class CheckBookmarks { throws com.sun.star.uno.Exception { XText xText = m_xDoc.getText(); - XSimpleText xSimpleText = UnoRuntime.queryInterface( - XSimpleText.class, - xText); + UnoRuntime.queryInterface(XSimpleText.class, xText); for(int nPara=0; nPara<10; ++nPara) { for(int nBookmark=0; nBookmark<100; ++nBookmark){ insertBookmark( diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java index e5d64ef..ed5885b 100644 --- a/sw/qa/complex/writer/TextPortionEnumerationTest.java +++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java @@ -589,7 +589,7 @@ class FuzzyTester TreeNode node = m_BufferExpected.get(i); int j = m_BufferActual.indexOf(node); if (j >= 0) { - TreeNode other = m_BufferActual.get(j); + m_BufferActual.get(j); if (j != i) { //FIXME how bad is this? diff --git a/swext/mediawiki/src/com/sun/star/wiki/Helper.java b/swext/mediawiki/src/com/sun/star/wiki/Helper.java index fa48a35..5900e9a 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/Helper.java +++ b/swext/mediawiki/src/com/sun/star/wiki/Helper.java @@ -608,7 +608,6 @@ public class Helper aProxyPortProp = "ooInetHTTPSProxyPort"; } - String aNoProxyList = AnyConverter.toString( xNameAccess.getByName( "ooInetNoProxy" ) ); String aProxyName = AnyConverter.toString( xNameAccess.getByName( aProxyNameProp ) ); int nProxyPort = 80; diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java index 3ad6b5c..8abc01b 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java @@ -107,18 +107,11 @@ public final class WikiEditorImpl extends WeakBase } - private boolean m_bInitialized; public synchronized void initialize( Object[] args ) throws com.sun.star.uno.Exception { - if ( m_bInitialized ) - { - } if ( args.length > 0 ) { - m_bInitialized = true; m_xFrame = UnoRuntime.queryInterface( XFrame.class, args[0] ); - // become close listener - XCloseBroadcaster cb = UnoRuntime.queryInterface( XCloseBroadcaster.class, m_xFrame ); } } @@ -197,7 +190,7 @@ public final class WikiEditorImpl extends WeakBase { try { - URI uri = new URI( uristring ); + new URI( uristring ); // check whether any blogs are live... setListenerState( "command"); diff --git a/toolkit/test/accessibility/TopWindowListener.java b/toolkit/test/accessibility/TopWindowListener.java index 3654b970..a35b51a 100644 --- a/toolkit/test/accessibility/TopWindowListener.java +++ b/toolkit/test/accessibility/TopWindowListener.java @@ -108,7 +108,6 @@ class TopWindowListener if (aObject instanceof VectorNode && xTopLevelObject != null) { System.out.println ("removing node " + xTopLevelObject); - VectorNode aRoot = (VectorNode) aObject; maModel.removeNode (xTopLevelObject.getAccessibleContext()); } } diff --git a/toolkit/test/accessibility/ov/StateSetView.java b/toolkit/test/accessibility/ov/StateSetView.java index 4829889..f967f71 100644 --- a/toolkit/test/accessibility/ov/StateSetView.java +++ b/toolkit/test/accessibility/ov/StateSetView.java @@ -179,7 +179,6 @@ public static class StateSetAllView XAccessibleStateSet xStateSet = mxContext.getAccessibleStateSet(); if (xStateSet != null) { - short aStates[] = xStateSet.getStates (); final int nMaxStateIndex = AccessibleStateType.MANAGES_DESCENDANTS; int nStateWidth = (aWidgetArea.width-12) / (nMaxStateIndex+1); AffineTransform aTransform = g.getTransform (); commit db203e59d6b54112cbf42923d4f02940b15e3c9f Author: Noel Grandin <n...@peralex.com> Date: Fri Dec 5 10:53:55 2014 +0200 java: remove some unused fields Change-Id: I1b6fb6b47439c448ac31983702772e2115c70d56 diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java index ddf20b2..964ff80 100644 --- a/bean/com/sun/star/comp/beans/OOoBean.java +++ b/bean/com/sun/star/comp/beans/OOoBean.java @@ -64,7 +64,6 @@ public class OOoBean private transient OfficeDocument aDocument; // slot command execution environment - private transient com.sun.star.frame.XDispatchProvider xDispatcher; private transient com.sun.star.util.XURLTransformer xURLTransformer; // properties @@ -389,7 +388,6 @@ public class OOoBean } aDocument = null; - xDispatcher = null; aFrame = null; // clear xFrameWindow @@ -589,14 +587,14 @@ public class OOoBean com.sun.star.util.XURLTransformer.class, xServiceFactory.createInstance( "com.sun.star.util.URLTransformer") ); - try - { - xDispatcher = UnoRuntime.queryInterface(com.sun.star.frame.XDispatchProvider.class, aFrame); - } - catch (Exception e) - { - /*ignore!*/ - } + try + { + UnoRuntime.queryInterface(com.sun.star.frame.XDispatchProvider.class, aFrame); + } + catch (Exception e) + { + /*ignore!*/ + } // get XComponentLoader from frame com.sun.star.frame.XComponentLoader xLoader = UnoRuntime.queryInterface( com.sun.star.frame.XComponentLoader.class, aFrame ); diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java index 975b2eb..d7dafeb 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java @@ -26,27 +26,22 @@ package net.adaptivebox.global; import java.util.*; public class GlobalString { - private static final String NEGLECT_TAG = "#$@"; - -/** - * Tokenize a String with given key. - * @param input the String to be tokenized. - * @param tokenKey the delimiters. - * @return a String array that include the elements of input string that - * divided by the tokenKey. - */ - public static String[] tokenize(String input , String tokenKey) { - ArrayList<String> v = new ArrayList<String>(); - StringTokenizer t = new StringTokenizer(input, tokenKey); - while (t.hasMoreTokens()) { - v.add(t.nextToken()); + /** + * Tokenize a String with given key. + * + * @param input the String to be tokenized. + * @param tokenKey the delimiters. + * @return a String array that include the elements of input string that + * divided by the tokenKey. + */ + public static String[] tokenize(String input, String tokenKey) { + ArrayList<String> v = new ArrayList<String>(); + StringTokenizer t = new StringTokenizer(input, tokenKey); + while (t.hasMoreTokens()) { + v.add(t.nextToken()); + } + return v.toArray(new String[v.size()]); } - return v.toArray(new String[v.size()]); - } - - - - } \ No newline at end of file diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java index b6db239..529332e 100644 --- a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java +++ b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java @@ -41,10 +41,6 @@ public class ParcelDescriptor { public static final String PARCEL_DESCRIPTOR_NAME = "parcel-descriptor.xml"; - // Collection of all ParcelDescriptor created for files - private static final Map<File, ParcelDescriptor> PARCEL_DESCRIPTOR_MAP = - new HashMap<File, ParcelDescriptor>(5); - // This is the default contents of a parcel descriptor to be used when // creating empty descriptors private static final byte[] EMPTY_DOCUMENT = diff --git a/swext/mediawiki/src/com/sun/star/wiki/Helper.java b/swext/mediawiki/src/com/sun/star/wiki/Helper.java index 6aad820..fa48a35 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/Helper.java +++ b/swext/mediawiki/src/com/sun/star/wiki/Helper.java @@ -142,9 +142,6 @@ public class Helper private static String[] m_pConfigStrings; - private static final String sHTMLHeader = "<HTML><HEAD><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><TITLE></TITLE></HEAD><BODY>"; - private static final String sHTMLFooter = "</BODY></HTML>"; - private static MultiThreadedHttpConnectionManager m_aConnectionManager; private static HttpClient m_aClient; private static boolean m_bAllowConnection = true; diff --git a/testtools/com/sun/star/comp/bridge/TestComponent.java b/testtools/com/sun/star/comp/bridge/TestComponent.java index bee487b..bf1524d 100644 --- a/testtools/com/sun/star/comp/bridge/TestComponent.java +++ b/testtools/com/sun/star/comp/bridge/TestComponent.java @@ -67,12 +67,7 @@ public class TestComponent { static public class _PerformancTestObject implements XPerformanceTest, XServiceInfo, XTypeProvider { static private final String __serviceName = "com.sun.star.comp.benchmark.JavaTestObject"; - private boolean _bool; - private char _char; - private byte _byte; - private short _short; private int _long; - private int _ulong; private long _hyper; private float _float; private double _double; diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java index 39aaa57..3f9d370 100644 --- a/wizards/com/sun/star/wizards/document/FormHandler.java +++ b/wizards/com/sun/star/wizards/document/FormHandler.java @@ -57,7 +57,6 @@ public class FormHandler private static final String CHECKBOX = "CheckBox"; private static final String DATEFIELD = "DateField"; private static final String FORMATTEDFIELD = "FormattedField"; - private static final String IMAGECONTROL = "ImageControl"; private static final String TEXTFIELD = "TextField"; private static final String TIMEFIELD = "TimeField"; commit 4ae96069bbdc243c40e98872fe5090f6bf4880f1 Author: Noel Grandin <n...@peralex.com> Date: Fri Dec 5 10:50:07 2014 +0200 java: static fields should be accessed in a static way Change-Id: I727e7f2a7527c60bb45f0ba5d0e88a66c5ccdd6f diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java b/wizards/com/sun/star/wizards/common/NumberFormatter.java index 1a7338e..52651bb 100644 --- a/wizards/com/sun/star/wizards/common/NumberFormatter.java +++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java @@ -47,7 +47,6 @@ public class NumberFormatter public XNumberFormats xNumberFormats; public XNumberFormatTypes xNumberFormatTypes; public XPropertySet xNumberFormatSettings; - private static final boolean bNullDateCorrectionIsDefined = false; private final Locale aLocale; @@ -165,22 +164,15 @@ public class NumberFormatter public long getNullDateCorrection() { - if (!this.bNullDateCorrectionIsDefined) - { - com.sun.star.util.Date dNullDate = (com.sun.star.util.Date) Helper.getUnoStructValue(this.xNumberFormatSettings, "NullDate"); - long lNullDate = Helper.convertUnoDatetoInteger(dNullDate); - java.util.Calendar oCal = java.util.Calendar.getInstance(); - oCal.set(1900, 1, 1); - Date dTime = oCal.getTime(); - long lTime = dTime.getTime(); - long lDBNullDate = lTime / (3600 * 24000); - lDateCorrection = lDBNullDate - lNullDate; - return lDateCorrection; - } - else - { - return this.lDateCorrection; - } + com.sun.star.util.Date dNullDate = (com.sun.star.util.Date) Helper.getUnoStructValue(this.xNumberFormatSettings, "NullDate"); + long lNullDate = Helper.convertUnoDatetoInteger(dNullDate); + java.util.Calendar oCal = java.util.Calendar.getInstance(); + oCal.set(1900, 1, 1); + Date dTime = oCal.getTime(); + long lTime = dTime.getTime(); + long lDBNullDate = lTime / (3600 * 24000); + lDateCorrection = lDBNullDate - lNullDate; + return lDateCorrection; } diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index d28db51..e4ff971 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -168,7 +168,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen if (_bAutoincrementation) { int nDataType = oTypeInspector.getAutoIncrementIndex(xColPropertySet); - if (nDataType != oTypeInspector.INVALID) + if (nDataType != TypeInspector.INVALID) { if (xColPropertySet.getPropertySetInfo().hasPropertyByName("IsAutoIncrement")) { diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java index a7bfb13..fd6241a 100644 --- a/wizards/com/sun/star/wizards/document/Control.java +++ b/wizards/com/sun/star/wizards/document/Control.java @@ -309,9 +309,9 @@ public class Control extends Shape { String stext; short iTextLength = AnyConverter.toShort(xPropertySet.getPropertyValue("MaxTextLen")); - if (iTextLength < this.SOMAXTEXTSIZE) + if (iTextLength < SOMAXTEXTSIZE) { - stext = FormHandler.SOSIZETEXT.substring(0, this.SOMAXTEXTSIZE); + stext = FormHandler.SOSIZETEXT.substring(0, SOMAXTEXTSIZE); } else { diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java index b358f3a..4f7ffb1 100644 --- a/wizards/com/sun/star/wizards/form/FieldLinker.java +++ b/wizards/com/sun/star/wizards/form/FieldLinker.java @@ -222,7 +222,7 @@ public class FieldLinker extends DBLimitedFieldSelection String[] SlaveLinkNames = JavaTools.ArrayOutOfMultiDimArray(_LinkFieldNames, SOSLAVEINDEX); String[] ViewMasterFieldNames = addNoneFieldItemToList(_AllMasterFieldNames); // add '-undefined-' String[] ViewSlaveFieldNames = addNoneFieldItemToList(_AllSlaveFieldNames); - for (int i = 0; i < super.rowcount; i++) + for (int i = 0; i < rowcount; i++) { super.initializeListBox(lstMasterFields[i], ViewMasterFieldNames, MasterLinkNames, i); super.initializeListBox(lstSlaveFields[i], ViewSlaveFieldNames, SlaveLinkNames, i); diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index 07995ad..54797e3 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -39,7 +39,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< private String sTablePrefix; private short m_iSelPos = -1; private short iOldSelPos = -1; - private static final boolean bpreselectCommand = true; private boolean bgetQueries; private final WizardDialog oWizardDialog; private Collator aCollator = null; @@ -180,13 +179,10 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< } else { - if (this.bpreselectCommand) + String[] sItemList = ((String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST)); + if (sItemList.length > 0) { - String[] sItemList = ((String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST)); - if (sItemList.length > 0) - { - return (short) 0; - } + return (short) 0; } return (short) -1; } @@ -272,21 +268,13 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< java.util.Arrays.sort(ContentList, this); Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST, ContentList); short iSelPos = getselectedItemPos(); - if (bpreselectCommand) - { - if (iSelPos > -1) - { - bgetFields = true; - iSelArray = new short[] - { - iSelPos - }; - } - } - else + if (iSelPos > -1) { - emptyFieldsListBoxes(); - iSelArray = new short[] {iSelPos}; + bgetFields = true; + iSelArray = new short[] + { + iSelPos + }; } Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, iSelArray); toggleCommandListBox(true); diff --git a/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java b/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java index 6777e5c..3282282 100644 --- a/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java @@ -33,7 +33,7 @@ public abstract class DBLimitedFieldSelection protected String sNoField; protected Integer IStep; protected static final int rowcount = 4; - protected final int MAXSELINDEX = rowcount - 1; + protected static final int MAXSELINDEX = rowcount - 1; protected short curtabindex; protected int iCurPosY; protected int FirstHelpIndex; diff --git a/wizards/com/sun/star/wizards/ui/TitlesComponent.java b/wizards/com/sun/star/wizards/ui/TitlesComponent.java index a543773..7fc279c 100644 --- a/wizards/com/sun/star/wizards/ui/TitlesComponent.java +++ b/wizards/com/sun/star/wizards/ui/TitlesComponent.java @@ -198,7 +198,7 @@ public class TitlesComponent extends ControlScroller { String sTitleModelName = (String) Helper.getUnoPropertyValue(_fieldtitlemodel, PropertyNames.PROPERTY_NAME); String sindex = JavaTools.getSuffixNumber(sTitleModelName); - return (String) CurUnoDialog.getControlProperty(this.SOLABELPREFIX + sindex, PropertyNames.PROPERTY_LABEL); + return (String) CurUnoDialog.getControlProperty(SOLABELPREFIX + sindex, PropertyNames.PROPERTY_LABEL); } public String[] getFieldTitles() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits