[Libreoffice-commits] .: 10 commits - bean/test bridges/test extensions/test jurt/demo odk/examples reportbuilder/java reportdesign/qa scripting/java scripting/workben swext/mediawiki testtools/source toolkit/test vcl/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 10 14:45:43 PDT 2012
bean/test/applet/oooapplet/OOoViewer.java | 10
bridges/test/java_remote/Bug51323_Test.java | 1
bridges/test/java_remote/PolyStructTest.java | 6
bridges/test/java_uno/nativethreadpool/Relay.java | 1
bridges/test/testclient.java | 1
extensions/test/pgp/TestPGP.java | 50 --
jurt/demo/com/sun/star/demo/DemoServer.java | 92 -----
jurt/demo/com/sun/star/demo/TestOffice.java | 184 ----------
jurt/demo/com/sun/star/demo/makefile.mk | 48 --
odk/examples/DevelopersGuide/Accessibility/EventHandler.java | 10
odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java | 10
odk/examples/DevelopersGuide/Accessibility/TextualDisplay.java | 8
odk/examples/DevelopersGuide/Charts/CalcHelper.java | 18
odk/examples/DevelopersGuide/Charts/ChartHelper.java | 13
odk/examples/DevelopersGuide/Charts/ChartInCalc.java | 7
odk/examples/DevelopersGuide/Charts/ChartInDraw.java | 14
odk/examples/DevelopersGuide/Charts/ChartInWriter.java | 16
odk/examples/DevelopersGuide/Charts/Helper.java | 23 -
odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java | 6
odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java | 18
odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java | 4
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java | 4
odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java | 2
odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java | 2
odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java | 2
odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java | 5
odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java | 1
odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java | 2
odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java | 4
odk/examples/DevelopersGuide/Config/ConfigExamples.java | 4
odk/examples/DevelopersGuide/Database/CodeSamples.java | 6
odk/examples/DevelopersGuide/Database/OpenQuery.java | 1
odk/examples/DevelopersGuide/Database/RowSet.java | 7
odk/examples/DevelopersGuide/Database/Sales.java | 8
odk/examples/DevelopersGuide/Database/SalesMan.java | 9
odk/examples/DevelopersGuide/Database/sdbcx.java | 2
odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java | 18
odk/examples/DevelopersGuide/Forms/ButtonOperator.java | 10
odk/examples/DevelopersGuide/Forms/TableCellTextBinding.java | 10
odk/examples/DevelopersGuide/GUI/MessageBox.java | 1
odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java | 1
odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java | 4
odk/examples/DevelopersGuide/GUI/UnoMenu2.java | 1
odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java | 3
odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IOnewayLink.java | 2
odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java | 42 --
odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java | 101 +----
odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java | 30 -
odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java | 8
odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java | 4
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java | 8
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java | 8
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java | 2
odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java | 6
odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java | 1
odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java | 4
odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java | 8
odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java | 8
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java | 12
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java | 12
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java | 13
odk/examples/DevelopersGuide/OfficeDev/Linguistic/XMeaning_impl.java | 2
odk/examples/DevelopersGuide/OfficeDev/MenuElement.java | 1
odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java | 11
odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java | 2
odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java | 3
odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java | 3
odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/UrlResolver.java | 2
odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/SimpleBootstrap_java.java | 2
odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java | 15
odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java | 22 -
odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java | 8
odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java | 5
odk/examples/DevelopersGuide/Text/TextDocuments.java | 21 -
odk/examples/DevelopersGuide/UCB/ChildrenRetriever.java | 36 -
odk/examples/DevelopersGuide/UCB/PropertiesComposer.java | 20 -
odk/examples/DevelopersGuide/UCB/PropertiesRetriever.java | 26 -
odk/examples/java/ConverterServlet/ConverterServlet.java | 4
odk/examples/java/DocumentHandling/DocumentConverter.java | 1
odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java | 38 --
odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java | 6
odk/examples/java/Inspector/HideableTreeModel.java | 20 -
odk/examples/java/Inspector/Inspector.java | 48 +-
odk/examples/java/Inspector/Introspector.java | 40 +-
odk/examples/java/Inspector/MethodParametersDialog.java | 4
odk/examples/java/Inspector/SourceCodeGenerator.java | 38 --
odk/examples/java/Inspector/SwingUnoMethodNode.java | 2
odk/examples/java/Inspector/UnoMethodNode.java | 2
odk/examples/java/Inspector/UnoNode.java | 4
odk/examples/java/Inspector/XUnoMethodNode.java | 2
odk/examples/java/MinimalComponent/MinimalComponent.java | 4
odk/examples/java/MinimalComponent/TestMinimalComponent.java | 5
odk/examples/java/NotesAccess/NotesAccess.java | 3
odk/examples/java/Spreadsheet/CalcAddins.java | 6
odk/examples/java/Spreadsheet/EuroAdaption.java | 3
odk/examples/java/Spreadsheet/SCalc.java | 1
odk/examples/java/Storage/StorageFunctionality.java | 8
odk/examples/java/Storage/Test01.java | 4
odk/examples/java/Storage/Test02.java | 3
odk/examples/java/Storage/Test03.java | 4
odk/examples/java/Storage/Test04.java | 6
odk/examples/java/Storage/Test05.java | 3
odk/examples/java/Storage/Test06.java | 8
odk/examples/java/Storage/Test07.java | 4
odk/examples/java/Storage/Test08.java | 4
odk/examples/java/Storage/Test09.java | 4
odk/examples/java/Storage/TestHelper.java | 1
odk/examples/java/ToDo/ToDo.java | 81 +---
reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java | 10
reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java | 4
reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java | 6
reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java | 6
reportdesign/qa/complex/reportdesign/ReportDesignerTest.java | 6
scripting/java/org/openoffice/idesupport/ExtensionFinder.java | 4
scripting/java/org/openoffice/idesupport/JavaFinder.java | 36 -
scripting/java/org/openoffice/idesupport/LocalOffice.java | 2
scripting/java/org/openoffice/idesupport/OfficeDocument.java | 8
scripting/java/org/openoffice/idesupport/SVersionRCFile.java | 14
scripting/java/org/openoffice/idesupport/localoffice/LocalOfficeImpl.java | 3
scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java | 17
scripting/java/org/openoffice/idesupport/ui/MethodPanel.java | 17
scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java | 13
scripting/java/org/openoffice/idesupport/xml/Manifest.java | 6
scripting/java/org/openoffice/idesupport/zip/ParcelZipper.java | 4
scripting/workben/ifc/scripting/ScriptingUtils.java | 1
scripting/workben/ifc/scripting/SecurityDialogUtil.java | 1
scripting/workben/ifc/scripting/_XFunction.java | 8
scripting/workben/ifc/scripting/_XFunctionProvider.java | 8
scripting/workben/ifc/scripting/_XScriptInfo.java | 8
scripting/workben/ifc/scripting/_XScriptInfoAccess.java | 6
scripting/workben/ifc/scripting/_XScriptSecurity.java | 3
scripting/workben/ifc/scripting/_XScriptStorageManager.java | 3
scripting/workben/ifc/scripting/_XScriptStorageRefresh.java | 8
scripting/workben/installer/Final.java | 2
scripting/workben/installer/IdeFinal.java | 2
scripting/workben/installer/IdeUpdater.java | 8
scripting/workben/installer/IdeVersion.java | 15
scripting/workben/installer/InstUtil.java | 1
scripting/workben/installer/InstallWizard.java | 6
scripting/workben/installer/Version.java | 15
scripting/workben/installer/XmlUpdater.java | 8
scripting/workben/mod/_scripting/Dispatch.java | 5
scripting/workben/mod/_scripting/Function.java | 6
scripting/workben/mod/_scripting/FunctionProvider.java | 2
scripting/workben/mod/_scripting/ScriptInfo.java | 1
scripting/workben/mod/_scripting/ScriptStorage.java | 1
scripting/workben/mod/_scripting/ScriptStorageManager.java | 1
scripting/workben/mod/_scripting/TestDataLoader.java | 4
swext/mediawiki/src/com/sun/star/wiki/Settings.java | 64 +--
swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java | 1
swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java | 3
swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java | 4
swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java | 10
testtools/source/servicetests/RemoteServiceTest.java | 1
toolkit/test/accessibility/ov/StateSetView.java | 7
vcl/qa/complex/memCheck/CheckMemoryUsage.java | 1
156 files changed, 411 insertions(+), 1415 deletions(-)
New commits:
commit 4c9e62c6e3513a57e86dfb7ea06a74ce2943aaaa
Author: Noel Grandin <noel at peralex.com>
Date: Fri Sep 7 13:41:02 2012 +0200
Java cleanup, convert ArrayList and Vector to use generics
Change-Id: Ic668b46872ee0bfd259ca335aed9d68fb545c3a4
diff --git a/bean/test/applet/oooapplet/OOoViewer.java b/bean/test/applet/oooapplet/OOoViewer.java
index ae77242..e09f78e 100644
--- a/bean/test/applet/oooapplet/OOoViewer.java
+++ b/bean/test/applet/oooapplet/OOoViewer.java
@@ -73,7 +73,7 @@ public class OOoViewer extends Applet {
// Class arPropValClass = m_loader.loadClass("[Lcom.sun.star.beans.PropertyValue;");
Object arProp = Array.newInstance(
m_loader.loadClass("com.sun.star.beans.PropertyValue"), 1);
- Class clazz = arProp.getClass();
+ Class<? extends Object> clazz = arProp.getClass();
Method methLoad = beanClass.getMethod(
"loadFromURL", new Class[] {
@@ -124,7 +124,7 @@ public class OOoViewer extends Applet {
final class CustomURLClassLoader extends URLClassLoader {
- private Vector resourcePaths;
+ private Vector<URL> resourcePaths;
public CustomURLClassLoader( URL[] urls ) {
super( urls );
@@ -163,7 +163,7 @@ final class CustomURLClassLoader extends URLClassLoader {
}
public void addResourcePath(URL rurl) {
- if (resourcePaths == null) resourcePaths = new Vector();
+ if (resourcePaths == null) resourcePaths = new Vector<URL>();
resourcePaths.add(rurl);
}
@@ -177,8 +177,8 @@ final class CustomURLClassLoader extends URLClassLoader {
URL u = null;
URI uri = null;
- for (Enumeration e = resourcePaths.elements(); e.hasMoreElements();) {
- u = (URL)e.nextElement();
+ for (Enumeration<URL> e = resourcePaths.elements(); e.hasMoreElements();) {
+ u = e.nextElement();
if (u.getProtocol().startsWith("file")){
try {
File f1 = new File(u.getPath());
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
index d44de20..388e489 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
@@ -1,3 +1,5 @@
+import com.sun.star.sheet.XResultListener;
+
/*************************************************************************
*
* The Contents of this file are made available subject to the terms of
@@ -36,7 +38,7 @@ class ExampleAddInResult implements com.sun.star.sheet.XVolatileResult
{
private String aName;
private int nValue;
- private java.util.Vector aListeners = new java.util.Vector();
+ private java.util.Vector<XResultListener> aListeners = new java.util.Vector<XResultListener>();
public ExampleAddInResult( String aNewName )
{
@@ -70,18 +72,18 @@ class ExampleAddInResult implements com.sun.star.sheet.XVolatileResult
++nValue;
com.sun.star.sheet.ResultEvent aEvent = getResult();
- java.util.Enumeration aEnum = aListeners.elements();
+ java.util.Enumeration<XResultListener> aEnum = aListeners.elements();
while (aEnum.hasMoreElements())
- ((com.sun.star.sheet.XResultListener)aEnum.nextElement()).modified(
+ aEnum.nextElement().modified(
aEvent);
}
}
class ExampleAddInThread extends Thread
{
- private java.util.Hashtable aCounters;
+ private java.util.Hashtable<String, ExampleAddInResult> aCounters;
- public ExampleAddInThread( java.util.Hashtable aResults )
+ public ExampleAddInThread( java.util.Hashtable<String, ExampleAddInResult> aResults )
{
aCounters = aResults;
}
@@ -99,9 +101,9 @@ class ExampleAddInThread extends Thread
}
// increment all counters
- java.util.Enumeration aEnum = aCounters.elements();
+ java.util.Enumeration<ExampleAddInResult> aEnum = aCounters.elements();
while (aEnum.hasMoreElements())
- ((ExampleAddInResult)aEnum.nextElement()).incrementValue();
+ aEnum.nextElement().incrementValue();
}
}
}
@@ -149,7 +151,7 @@ public class ExampleAddIn
};
private com.sun.star.lang.Locale aFuncLocale;
- private java.util.Hashtable aResults;
+ private java.util.Hashtable<String, ExampleAddInResult> aResults;
public _ExampleAddIn( com.sun.star.lang.XMultiServiceFactory xFactory )
{
@@ -176,12 +178,12 @@ public class ExampleAddIn
{
// create the table of results, and start a thread to increment
// all counters
- aResults = new java.util.Hashtable();
+ aResults = new java.util.Hashtable<String, ExampleAddInResult>();
ExampleAddInThread aThread = new ExampleAddInThread( aResults );
aThread.start();
}
- ExampleAddInResult aResult = (ExampleAddInResult) aResults.get(aName);
+ ExampleAddInResult aResult = aResults.get(aName);
if ( aResult == null )
{
aResult = new ExampleAddInResult(aName);
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
index 4b293ce..44ee37c 100644
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
+++ b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
@@ -59,7 +59,7 @@ public final class OwnEmbeddedObject extends WeakBase
protected EditorFrame m_aEditorFrame;
- protected Vector m_aListeners;
+ protected Vector<Object> m_aListeners;
com.sun.star.embed.VerbDescriptor[] m_pOwnVerbs;
@@ -68,7 +68,7 @@ public final class OwnEmbeddedObject extends WeakBase
Dimension m_aObjSize;
// -------------------------------------------------------------
- protected Vector GetListeners()
+ protected Vector<Object> GetListeners()
{
if ( m_aListeners == null )
m_aListeners = new Vector<Object>( 10, 10 );
@@ -133,12 +133,12 @@ public final class OwnEmbeddedObject extends WeakBase
{
// save the text
XStream xStream = xStorage.openStreamElement( "content.txt", com.sun.star.embed.ElementModes.READWRITE );
- XComponent xStreamComp = ( XComponent ) UnoRuntime.queryInterface( XComponent.class, xStream );
+ XComponent xStreamComp = UnoRuntime.queryInterface( XComponent.class, xStream );
if ( xStreamComp == null )
throw new com.sun.star.uno.RuntimeException();
XOutputStream xOutStream = xStream.getOutputStream();
- XTruncate xTruncate = ( XTruncate ) UnoRuntime.queryInterface( XTruncate.class, xOutStream );
+ XTruncate xTruncate = UnoRuntime.queryInterface( XTruncate.class, xOutStream );
if ( xTruncate == null )
throw new com.sun.star.io.IOException();
@@ -147,12 +147,12 @@ public final class OwnEmbeddedObject extends WeakBase
// save the size
xStream = xStorage.openStreamElement( "properties.txt", com.sun.star.embed.ElementModes.READWRITE );
- xStreamComp = ( XComponent ) UnoRuntime.queryInterface( XComponent.class, xStream );
+ xStreamComp = UnoRuntime.queryInterface( XComponent.class, xStream );
if ( xStreamComp == null )
throw new com.sun.star.uno.RuntimeException();
xOutStream = xStream.getOutputStream();
- xTruncate = ( XTruncate ) UnoRuntime.queryInterface( XTruncate.class, xOutStream );
+ xTruncate = UnoRuntime.queryInterface( XTruncate.class, xOutStream );
if ( xTruncate == null )
throw new com.sun.star.io.IOException();
@@ -161,12 +161,12 @@ public final class OwnEmbeddedObject extends WeakBase
xOutStream.writeBytes( aProps.getBytes() );
// set the media type
- XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, xStorage );
+ XPropertySet xPropSet = UnoRuntime.queryInterface( XPropertySet.class, xStorage );
if ( xPropSet == null )
throw new com.sun.star.uno.RuntimeException();
xPropSet.setPropertyValue( "MediaType", "application/x-openoffice-embedded-69474366-FD6F-4806-8374-8EDD1B6E771D" );
- XTransactedObject xTransact = ( XTransactedObject ) UnoRuntime.queryInterface( XTransactedObject.class, xStorage );
+ XTransactedObject xTransact = UnoRuntime.queryInterface( XTransactedObject.class, xStorage );
if ( xTransact != null )
xTransact.commit();
@@ -196,8 +196,7 @@ public final class OwnEmbeddedObject extends WeakBase
{
try
{
- com.sun.star.document.XEventListener xListener = ( com.sun.star.document.XEventListener )
- UnoRuntime.queryInterface( com.sun.star.document.XEventListener.class, m_aListeners.get( nInd ) );
+ com.sun.star.document.XEventListener xListener = UnoRuntime.queryInterface( com.sun.star.document.XEventListener.class, m_aListeners.get( nInd ) );
if ( xListener != null )
xListener.notifyEvent( aEventObject );
@@ -220,8 +219,7 @@ public final class OwnEmbeddedObject extends WeakBase
{
try
{
- com.sun.star.embed.XStateChangeListener xListener = ( com.sun.star.embed.XStateChangeListener )
- UnoRuntime.queryInterface( com.sun.star.embed.XStateChangeListener.class, m_aListeners.get( nInd ) );
+ com.sun.star.embed.XStateChangeListener xListener = UnoRuntime.queryInterface( com.sun.star.embed.XStateChangeListener.class, m_aListeners.get( nInd ) );
if ( xListener != null )
{
@@ -248,7 +246,7 @@ public final class OwnEmbeddedObject extends WeakBase
try
{
XStream xStream = xStorage.openStreamElement( aStreamName, com.sun.star.embed.ElementModes.READWRITE );
- XComponent xStreamComp = ( XComponent ) UnoRuntime.queryInterface( XComponent.class, xStream );
+ XComponent xStreamComp = UnoRuntime.queryInterface( XComponent.class, xStream );
if ( xStreamComp == null )
throw new com.sun.star.uno.RuntimeException();
@@ -415,7 +413,7 @@ public final class OwnEmbeddedObject extends WeakBase
SwitchOwnPersistence( xStorage, aEntryName );
if ( bElExists )
{
- XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, m_xOwnStorage );
+ XPropertySet xPropSet = UnoRuntime.queryInterface( XPropertySet.class, m_xOwnStorage );
if ( xPropSet == null )
throw new com.sun.star.uno.RuntimeException();
@@ -993,19 +991,19 @@ public final class OwnEmbeddedObject extends WeakBase
{
XMultiComponentFactory xFactory = m_xContext.getServiceManager();
Object obj = xFactory.createInstanceWithContext( "com.sun.star.configuration.ConfigurationProvider", m_xContext );
- XMultiServiceFactory xConfProvider = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, obj );
+ XMultiServiceFactory xConfProvider = UnoRuntime.queryInterface( XMultiServiceFactory.class, obj );
if ( xConfProvider == null )
throw new com.sun.star.uno.RuntimeException();
Object[] aArgs = new Object[1];
aArgs[0] = "/org.openoffice.Office.Embedding/Objects";
Object oSettings = xConfProvider.createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aArgs );
- XNameAccess xObjConfNA = ( XNameAccess ) UnoRuntime.queryInterface( XNameAccess.class, oSettings );
+ XNameAccess xObjConfNA = UnoRuntime.queryInterface( XNameAccess.class, oSettings );
if ( xObjConfNA == null )
throw new com.sun.star.uno.RuntimeException();
Object oEmbObj = xObjConfNA.getByName( "69474366-FD6F-4806-8374-8EDD1B6E771D" );
- XNameAccess xEmbObjNA = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class, oEmbObj );
+ XNameAccess xEmbObjNA = UnoRuntime.queryInterface( XNameAccess.class, oEmbObj );
if ( xEmbObjNA == null )
throw new com.sun.star.uno.RuntimeException();
@@ -1015,7 +1013,7 @@ public final class OwnEmbeddedObject extends WeakBase
com.sun.star.embed.VerbDescriptor[] pVerbs = new com.sun.star.embed.VerbDescriptor[pVerbShortcuts.length];
aArgs[0] = "/org.openoffice.Office.Embedding/Verbs";
Object oVerbs = xConfProvider.createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aArgs );
- XNameAccess xVerbsConfNA = ( XNameAccess ) UnoRuntime.queryInterface( XNameAccess.class, oVerbs );
+ XNameAccess xVerbsConfNA = UnoRuntime.queryInterface( XNameAccess.class, oVerbs );
if ( xVerbsConfNA == null )
throw new com.sun.star.uno.RuntimeException();
@@ -1023,7 +1021,7 @@ public final class OwnEmbeddedObject extends WeakBase
{
try
{
- XNameAccess xVerbNA = (XNameAccess) UnoRuntime.queryInterface(
+ XNameAccess xVerbNA = UnoRuntime.queryInterface(
XNameAccess.class,
xVerbsConfNA.getByName( pVerbShortcuts[nInd] ) );
if ( xVerbNA != null )
diff --git a/odk/examples/java/ToDo/ToDo.java b/odk/examples/java/ToDo/ToDo.java
index cea3523..98ece61 100644
--- a/odk/examples/java/ToDo/ToDo.java
+++ b/odk/examples/java/ToDo/ToDo.java
@@ -171,21 +171,19 @@ public class ToDo {
try {
// Querying for the interface XSpreadsheetDocument
XSpreadsheetDocument xspreadsheetdocument =
- ( XSpreadsheetDocument ) UnoRuntime.queryInterface(
- XSpreadsheetDocument.class, aInstance );
+ UnoRuntime.queryInterface(
+ XSpreadsheetDocument.class, aInstance );
// Querying for the interface XIndexAccess
- XIndexAccess xindexaccess = ( XIndexAccess )
- UnoRuntime.queryInterface( XIndexAccess.class,
- xspreadsheetdocument.getSheets() );
+ XIndexAccess xindexaccess = UnoRuntime.queryInterface( XIndexAccess.class,
+ xspreadsheetdocument.getSheets() );
// Getting the first XSpreadsheet
- XSpreadsheet xspreadsheet = (XSpreadsheet)UnoRuntime.queryInterface(
+ XSpreadsheet xspreadsheet = UnoRuntime.queryInterface(
XSpreadsheet.class, xindexaccess.getByIndex( 0 ));
// Querying for the interface XCellRange on the XSpeadsheet
- XCellRange xcellrange = ( XCellRange )
- UnoRuntime.queryInterface( XCellRange.class, xspreadsheet );
+ XCellRange xcellrange = UnoRuntime.queryInterface( XCellRange.class, xspreadsheet );
/* Getting the gregorian calendar with the date on which to start
the calculation */
@@ -206,12 +204,11 @@ public class ToDo {
// Querying for the interface XFunctionAccess on service
// FunctionAccess
- XFunctionAccess xfunctionaccess = (XFunctionAccess)
- UnoRuntime.queryInterface(XFunctionAccess.class,
- objectFunctionAccess );
+ XFunctionAccess xfunctionaccess = UnoRuntime.queryInterface(XFunctionAccess.class,
+ objectFunctionAccess );
// Creating vector for holidays
- Vector vectorHolidays = new Vector();
+ Vector<Object> vectorHolidays = new Vector<Object>();
// Get the Official Holidays
this.getOfficialHolidays( vectorHolidays, xcellrange,
@@ -268,11 +265,10 @@ public class ToDo {
{
// Querying for the interface XPropertySet for the cell
// providing the due date
- XPropertySet xpropertyset = ( XPropertySet )
- UnoRuntime.queryInterface(XPropertySet.class,
+ XPropertySet xpropertyset = UnoRuntime.queryInterface(XPropertySet.class,
xcellrange.getCellByPosition(
- this.INT_COLUMN_DUEDATE,
- intRow ));
+ this.INT_COLUMN_DUEDATE,
+ intRow ));
// Changing the background color of the cell to white
xpropertyset.setPropertyValue( "CellBackColor",
@@ -283,15 +279,13 @@ public class ToDo {
this.INT_COLUMN_FEATURE, intRow );
// Querying for the interface XSimpleText
- XSimpleText xsimpletext = ( XSimpleText )
- UnoRuntime.queryInterface( XSimpleText.class, xcell );
+ XSimpleText xsimpletext = UnoRuntime.queryInterface( XSimpleText.class, xcell );
// Getting the text cursor
XTextCursor xtextcursor = xsimpletext.createTextCursor();
// Querying for the interface XTextRange
- XTextRange xtextrange = ( XTextRange )
- UnoRuntime.queryInterface( XTextRange.class, xtextcursor );
+ XTextRange xtextrange = UnoRuntime.queryInterface( XTextRange.class, xtextcursor );
// Getting the bug ID from the cell
String sBugID = xtextrange.getString();
@@ -302,8 +296,8 @@ public class ToDo {
// Querying for the interface XMultiServiceFactory
XMultiServiceFactory xMSFTextField =
- (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, aInstance );
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class, aInstance );
// Creating an instance of the text field URL
Object objectTextField =
@@ -311,14 +305,12 @@ public class ToDo {
"com.sun.star.text.TextField.URL" );
// Querying for the interface XTextField
- XTextField xtextfield = ( XTextField )
- UnoRuntime.queryInterface( XTextField.class,
- objectTextField );
+ XTextField xtextfield = UnoRuntime.queryInterface( XTextField.class,
+ objectTextField );
// Querying for the interface XPropertySet
- XPropertySet xpropertysetTextField = ( XPropertySet )
- UnoRuntime.queryInterface( XPropertySet.class,
- xtextfield );
+ XPropertySet xpropertysetTextField = UnoRuntime.queryInterface( XPropertySet.class,
+ xtextfield );
// Setting the URL
xpropertysetTextField.setPropertyValue( "URL",
@@ -329,7 +321,7 @@ public class ToDo {
sBugID );
// Querying for the interface XText
- XText xtext = ( XText )UnoRuntime.queryInterface(
+ XText xtext = UnoRuntime.queryInterface(
XText.class, xcell );
// Delete cell content
@@ -504,12 +496,11 @@ public class ToDo {
gregCalPreviousDueDate ) ) ) {
// Querying for the interface XPropertySet for
// the cell providing the due date
- XPropertySet xpropertyset = ( XPropertySet )
- UnoRuntime.queryInterface(
+ XPropertySet xpropertyset = UnoRuntime.queryInterface(
XPropertySet.class,
xcellrange.getCellByPosition(
- this.INT_COLUMN_DUEDATE,
- intRow ) );
+ this.INT_COLUMN_DUEDATE,
+ intRow ) );
// Changing the background color of the cell
// to red
@@ -519,8 +510,8 @@ public class ToDo {
// Querying for the interface XColumnRowRange
// on the XCellRange
XColumnRowRange xcolumnrowrange =
- ( XColumnRowRange)UnoRuntime.queryInterface(
- XColumnRowRange.class, xcellrange );
+ UnoRuntime.queryInterface(
+ XColumnRowRange.class, xcellrange );
// Inserting one row to the table
XTableRows xTableRows =
xcolumnrowrange.getRows();
@@ -529,7 +520,7 @@ public class ToDo {
// Querying for the interface
// XCellRangeMovement on XCellRange
XCellRangeMovement xcellrangemovement =
- (XCellRangeMovement)UnoRuntime.queryInterface(
+ UnoRuntime.queryInterface(
XCellRangeMovement.class, xcellrange );
// Creating the cell address of the destination
@@ -648,8 +639,7 @@ public class ToDo {
XCell xcellStartDate = xcellrange.getCellByPosition(intColumn,
intRow);
// Querying for the interface XTextRange on the XCell
- xtextrangeStartDate = (XTextRange)
- UnoRuntime.queryInterface(XTextRange.class, xcellStartDate);
+ xtextrangeStartDate = UnoRuntime.queryInterface(XTextRange.class, xcellStartDate);
}
catch( Exception exception ) {
this.showExceptionMessage( exception );
@@ -672,8 +662,7 @@ public class ToDo {
XCell xcellStartDate = xcellrange.getCellByPosition(intColumn,
intRow);
// Querying for the interface XTextRange on the XCell
- XTextRange xtextrange = (XTextRange)
- UnoRuntime.queryInterface(XTextRange.class, xcellStartDate);
+ XTextRange xtextrange = UnoRuntime.queryInterface(XTextRange.class, xcellStartDate);
// Setting the new start date
xtextrange.setString( sDate );
}
@@ -717,7 +706,7 @@ public class ToDo {
* @param intYear Year to calculate the official holidays.
*/
public void getOfficialHolidays(
- Vector vectorHolidays,
+ Vector<Object> vectorHolidays,
XCellRange xcellrange,
XFunctionAccess xfunctionaccess,
int intYear ) {
@@ -852,7 +841,7 @@ public class ToDo {
* @param xcellrange Providing the cells.
* @param xfunctionaccess Provides the access to functions of the Calc.
*/
- public void getPrivateHolidays( Vector vectorHolidays,
+ public void getPrivateHolidays( Vector<Object> vectorHolidays,
XCellRange xcellrange,
XFunctionAccess xfunctionaccess ) {
try {
diff --git a/scripting/java/org/openoffice/idesupport/JavaFinder.java b/scripting/java/org/openoffice/idesupport/JavaFinder.java
index d8e3ec0..8c00718 100644
--- a/scripting/java/org/openoffice/idesupport/JavaFinder.java
+++ b/scripting/java/org/openoffice/idesupport/JavaFinder.java
@@ -41,11 +41,11 @@ public class JavaFinder implements MethodFinder {
private static final String FIRST_PARAM =
"drafts.com.sun.star.script.framework.runtime.XScriptContext";
- private Vector classpath = null;
+ private Vector<String> classpath = null;
private JavaFinder() {}
- private JavaFinder(Vector classpath) {
+ private JavaFinder(Vector<String> classpath) {
this.classpath = classpath;
}
@@ -59,7 +59,7 @@ public class JavaFinder implements MethodFinder {
return finder;
}
- public static JavaFinder getInstance(Vector classpath) {
+ public static JavaFinder getInstance(Vector<String> classpath) {
return new JavaFinder(classpath);
}
@@ -126,7 +126,7 @@ public class JavaFinder implements MethodFinder {
}
if (result.size() != 0)
- return (ScriptEntry[])result.toArray(empty);
+ return result.toArray(empty);
return empty;
}
@@ -136,7 +136,7 @@ public class JavaFinder implements MethodFinder {
for (int i = 0; i < len; i++) {
try {
- String s = (String)classpath.elementAt(i);
+ String s = classpath.elementAt(i);
s = SVersionRCFile.toFileURL(s);
if (s != null)
@@ -146,7 +146,7 @@ public class JavaFinder implements MethodFinder {
}
}
- return new URLClassLoader((URL[])urls.toArray(new URL[0]));
+ return new URLClassLoader(urls.toArray(new URL[0]));
}
private ClassLoader getClassLoader(File basedir) {
@@ -175,7 +175,7 @@ public class JavaFinder implements MethodFinder {
File f;
for (int i = 0; i < urls.length; i++) {
try {
- f = (File)files.get(i);
+ f = files.get(i);
urlpath = SVersionRCFile.toFileURL(f.getAbsolutePath());
if (urlpath != null)
@@ -215,7 +215,7 @@ public class JavaFinder implements MethodFinder {
ArrayList<String> result = new ArrayList<String>();
for (int i = 0; i < classFiles.size(); i++)
{
- File classFile = (File)classFiles.get(i);
+ File classFile = classFiles.get(i);
String className = classFile.getName();
className = className.substring(0, className.lastIndexOf(CLASS_SUFFIX));
boolean finished = false;
@@ -223,7 +223,7 @@ public class JavaFinder implements MethodFinder {
for (int j = 0; j < javaFiles.size() && finished == false; j++)
{
- File javaFile = (File)javaFiles.get(j);
+ File javaFile = javaFiles.get(j);
String javaName = javaFile.getName();
javaName = javaName.substring(0, javaName.lastIndexOf(JAVA_SUFFIX));
@@ -240,6 +240,6 @@ public class JavaFinder implements MethodFinder {
}
}
}
- return (String[])result.toArray(new String[0]);
+ return result.toArray(new String[0]);
}
}
diff --git a/scripting/java/org/openoffice/idesupport/LocalOffice.java b/scripting/java/org/openoffice/idesupport/LocalOffice.java
index 3fa8dc5..ffbbb3f 100644
--- a/scripting/java/org/openoffice/idesupport/LocalOffice.java
+++ b/scripting/java/org/openoffice/idesupport/LocalOffice.java
@@ -43,7 +43,7 @@ public class LocalOffice
public static final LocalOffice create(
ClassLoader parent, String officePath, int port)
{
- Vector path = new Vector();
+ Vector<String> path = new Vector<String>();
path.addElement(officePath + "/program/classes/ridl.jar");
path.addElement(officePath + "/program/classes/jurt.jar");
path.addElement(officePath + "/program/classes/unoil.jar");
diff --git a/scripting/java/org/openoffice/idesupport/OfficeDocument.java b/scripting/java/org/openoffice/idesupport/OfficeDocument.java
index 02fdba5..72e17c6 100644
--- a/scripting/java/org/openoffice/idesupport/OfficeDocument.java
+++ b/scripting/java/org/openoffice/idesupport/OfficeDocument.java
@@ -51,9 +51,9 @@ public class OfficeDocument
return false;
}
- public Enumeration getParcels() {
+ public Enumeration<String> getParcels() {
- Vector parcels = new Vector();
+ Vector<String> parcels = new Vector<String>();
ZipFile zp = null;
try
diff --git a/scripting/java/org/openoffice/idesupport/SVersionRCFile.java b/scripting/java/org/openoffice/idesupport/SVersionRCFile.java
index 9fd9a81..9e7bbe2 100644
--- a/scripting/java/org/openoffice/idesupport/SVersionRCFile.java
+++ b/scripting/java/org/openoffice/idesupport/SVersionRCFile.java
@@ -57,11 +57,11 @@ public class SVersionRCFile {
/* Make sure this is in LowerCase !!!!! */
private static final String SCRIPTF = "scriptf";
- private static final HashMap files = new HashMap(3);
+ private static final HashMap<String, SVersionRCFile> files = new HashMap<String, SVersionRCFile>(3);
private File sversionrc = null;
private OfficeInstallation defaultversion = null;
- private Vector versions = null;
+ private Vector<OfficeInstallation> versions = null;
private long lastModified = 0;
public SVersionRCFile() {
@@ -70,7 +70,7 @@ public class SVersionRCFile {
public SVersionRCFile(String name) {
sversionrc = new File(name);
- versions = new Vector(5);
+ versions = new Vector<OfficeInstallation>(5);
}
public static SVersionRCFile createInstance() {
@@ -81,7 +81,7 @@ public class SVersionRCFile {
SVersionRCFile result = null;
synchronized(SVersionRCFile.class) {
- result = (SVersionRCFile)files.get(name);
+ result = files.get(name);
if (result == null) {
result = new SVersionRCFile(name);
@@ -99,7 +99,7 @@ public class SVersionRCFile {
return defaultversion;
}
- public Enumeration getVersions() throws IOException {
+ public Enumeration<OfficeInstallation> getVersions() throws IOException {
long l = sversionrc.lastModified();
@@ -209,7 +209,7 @@ public class SVersionRCFile {
else
ov = new SVersionRCFile(args[0]);
- Enumeration enumer;
+ Enumeration<OfficeInstallation> enumer;
try {
enumer = ov.getVersions();
@@ -220,7 +220,7 @@ public class SVersionRCFile {
}
while (enumer.hasMoreElements()) {
- OfficeInstallation oi = (OfficeInstallation)enumer.nextElement();
+ OfficeInstallation oi = enumer.nextElement();
System.out.println("Name: " + oi.getName() + ", Path: " + oi.getPath() +
", URL: " + oi.getURL());
}
diff --git a/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java b/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java
index 4030d68..b78f439 100644
--- a/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java
+++ b/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java
@@ -38,13 +38,14 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.sun.star.script.framework.container.ParcelDescriptor;
+import com.sun.star.script.framework.container.ScriptEntry;
import org.openoffice.idesupport.zip.ParcelZipper;
public class ConfigurePanel extends JPanel {
private File basedir;
- private Vector classpath;
+ private Vector<String> classpath;
private ParcelDescriptor descriptor;
private MethodPanel methodPanel;
@@ -53,7 +54,7 @@ public class ConfigurePanel extends JPanel {
public static final String DIALOG_TITLE =
"Choose What to Export as Scripts";
- public ConfigurePanel(String basedir, Vector classpath,
+ public ConfigurePanel(String basedir, Vector<String> classpath,
ParcelDescriptor descriptor) {
this.basedir = new File(basedir);
@@ -62,7 +63,7 @@ public class ConfigurePanel extends JPanel {
initUI();
}
- public ConfigurePanel(String basedir, Vector classpath)
+ public ConfigurePanel(String basedir, Vector<String> classpath)
throws IOException {
this.basedir = new File(basedir);
@@ -72,7 +73,7 @@ public class ConfigurePanel extends JPanel {
initUI();
}
- public void reload(String basedir, Vector classpath,
+ public void reload(String basedir, Vector<String> classpath,
ParcelDescriptor descriptor) {
if (basedir != null)
@@ -90,7 +91,7 @@ public class ConfigurePanel extends JPanel {
scriptPanel.reload(descriptor.getScriptEntries());
}
- public void reload(String basedir, Vector classpath)
+ public void reload(String basedir, Vector<String> classpath)
throws IOException {
if (basedir != null)
@@ -108,7 +109,7 @@ public class ConfigurePanel extends JPanel {
}
public ParcelDescriptor getConfiguration() throws Exception {
- Enumeration scripts = scriptPanel.getScriptEntries();
+ Enumeration<ScriptEntry> scripts = scriptPanel.getScriptEntries();
descriptor.setScriptEntries(scripts);
return descriptor;
}
diff --git a/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java b/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java
index 3e85f20..9bc31ed 100644
--- a/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java
+++ b/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java
@@ -33,7 +33,7 @@ import org.openoffice.idesupport.JavaFinder;
public class MethodPanel extends JPanel {
private File basedir;
- private Vector classpath;
+ private Vector<String> classpath;
private final static String FIRST_PARAM =
"drafts.com.sun.star.script.framework.runtime.XScriptContext";
@@ -42,7 +42,7 @@ public class MethodPanel extends JPanel {
private JList list;
private ScriptEntry[] values;
- public MethodPanel(File basedir, Vector classpath, String language) {
+ public MethodPanel(File basedir, Vector<String> classpath, String language) {
this.basedir = basedir;
this.classpath = classpath;
@@ -50,7 +50,7 @@ public class MethodPanel extends JPanel {
initUI();
}
- public void reload(File basedir, Vector classpath, String language) {
+ public void reload(File basedir, Vector<String> classpath, String language) {
this.basedir = basedir;
this.classpath = classpath;
diff --git a/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java b/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java
index b30e1a9..f34dd48 100644
--- a/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java
+++ b/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java
@@ -81,7 +81,7 @@ public class ScriptPanel extends JPanel {
model.removeAll();
}
- public Enumeration getScriptEntries() {
+ public Enumeration<ScriptEntry> getScriptEntries() {
return model.getScriptEntries();
}
@@ -121,11 +121,11 @@ public class ScriptPanel extends JPanel {
final String[] columnNames = {"Exported Method",
"Script Name"};
- private Vector scripts;
+ private Vector<ScriptEntry> scripts;
private int nextRow;
public ScriptTableModel(ScriptEntry[] entries) {
- scripts = new Vector(entries.length + 11);
+ scripts = new Vector<ScriptEntry>(entries.length + 11);
for (int i = 0; i < entries.length; i++) {
scripts.addElement(entries[i]);
}
@@ -162,7 +162,7 @@ public class ScriptPanel extends JPanel {
nextRow = 0;
}
- public Enumeration getScriptEntries() {
+ public Enumeration<ScriptEntry> getScriptEntries() {
return scripts.elements();
}
@@ -170,7 +170,7 @@ public class ScriptPanel extends JPanel {
String result = "";
ScriptEntry entry;
- entry = (ScriptEntry)scripts.elementAt(row);
+ entry = scripts.elementAt(row);
if (col == 0)
result = entry.getLanguageName();
@@ -188,7 +188,7 @@ public class ScriptPanel extends JPanel {
}
public void setValueAt(Object value, int row, int col) {
- ScriptEntry entry = (ScriptEntry)scripts.elementAt(row);
+ ScriptEntry entry = scripts.elementAt(row);
entry.setLogicalName((String)value);
fireTableCellUpdated(row, col);
}
diff --git a/scripting/workben/installer/IdeUpdater.java b/scripting/workben/installer/IdeUpdater.java
index 5d94cff..721a265 100644
--- a/scripting/workben/installer/IdeUpdater.java
+++ b/scripting/workben/installer/IdeUpdater.java
@@ -39,7 +39,7 @@ public class IdeUpdater extends Thread {
private JLabel statusLabel;
- private Vector listeners;
+ private Vector<InstallListener> listeners;
private Thread internalThread;
private boolean threadSuspended;
private JProgressBar progressBar;
@@ -69,7 +69,7 @@ public class IdeUpdater extends Thread {
System.out.println( "IdeUpdater installPath is " + installPath + " isNetbeansPath is " + isNetbeansPath );
this.installPath = installPath;
this.statusLabel = statusLabel;
- listeners = new Vector();
+ listeners = new Vector<InstallListener>();
threadSuspended = false;
progressBar=pBar;
progressBar.setStringPainted(true);
@@ -173,10 +173,10 @@ public class IdeUpdater extends Thread {
private void onInstallComplete()
{
- Enumeration e = listeners.elements();
+ Enumeration<InstallListener> e = listeners.elements();
while (e.hasMoreElements())
{
- InstallListener listener = (InstallListener)e.nextElement();
+ InstallListener listener = e.nextElement();
listener.installationComplete(null);
}
}// onInstallComplete
diff --git a/scripting/workben/installer/InstUtil.java b/scripting/workben/installer/InstUtil.java
index c3d673c..05d265d 100644
--- a/scripting/workben/installer/InstUtil.java
+++ b/scripting/workben/installer/InstUtil.java
@@ -331,7 +331,6 @@ public class InstUtil {
public static Properties getOfficeVersions(File sversionFile) throws IOException {
BufferedReader reader = new BufferedReader(new FileReader(sversionFile));
- Vector values;
String sectionName = null;
Properties results = new Properties();
diff --git a/scripting/workben/installer/XmlUpdater.java b/scripting/workben/installer/XmlUpdater.java
index 5f1c88c..5161350 100644
--- a/scripting/workben/installer/XmlUpdater.java
+++ b/scripting/workben/installer/XmlUpdater.java
@@ -38,7 +38,7 @@ public class XmlUpdater extends Thread {
private JLabel statusLabel;
- private Vector listeners;
+ private Vector<InstallListener> listeners;
private Thread internalThread;
private boolean threadSuspended;
private JProgressBar progressBar;
@@ -107,7 +107,7 @@ public class XmlUpdater extends Thread {
this.statusLabel = statusLabel;
this.netInstall = netInstall;
this.bindingsInstall = bindingsInstall;
- listeners = new Vector();
+ listeners = new Vector<InstallListener>();
threadSuspended = false;
progressBar=pBar;
progressBar.setStringPainted(true);
@@ -432,10 +432,10 @@ public class XmlUpdater extends Thread {
private void onInstallComplete()
{
- Enumeration e = listeners.elements();
+ Enumeration<InstallListener> e = listeners.elements();
while (e.hasMoreElements())
{
- InstallListener listener = (InstallListener)e.nextElement();
+ InstallListener listener = e.nextElement();
listener.installationComplete(null);
}
}// onInstallComplete
diff --git a/swext/mediawiki/src/com/sun/star/wiki/Settings.java b/swext/mediawiki/src/com/sun/star/wiki/Settings.java
index 7c96d4c..87cc378 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/Settings.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/Settings.java
@@ -42,8 +42,8 @@ public class Settings
private static Settings m_instance;
- private Vector m_WikiConnections = new Vector();
- private Vector m_aWikiDocs = new Vector();
+ private Vector<Hashtable<String, String>> m_WikiConnections = new Vector<Hashtable<String, String>>();
+ private Vector<Hashtable<String, Object>> m_aWikiDocs = new Vector<Hashtable<String, Object>>();
private Settings( XComponentContext ctx )
{
@@ -61,13 +61,13 @@ public class Settings
}
- public void addWikiCon ( Hashtable wikiCon )
+ public void addWikiCon ( Hashtable<String, String> wikiCon )
{
m_WikiConnections.add( wikiCon );
}
- public Vector getWikiCons()
+ public Vector<Hashtable<String, String>> getWikiCons()
{
return m_WikiConnections;
}
@@ -77,14 +77,14 @@ public class Settings
String url = "";
if ( num >=0 && num < m_WikiConnections.size() )
{
- Hashtable ht = ( Hashtable ) m_WikiConnections.get( num );
+ Hashtable ht = m_WikiConnections.get( num );
url = ( String ) ht.get( "Url" );
}
return url;
}
- public void addWikiDoc ( Hashtable aWikiDoc )
+ public void addWikiDoc ( Hashtable<String, Object> aWikiDoc )
{
String sURL = ( String ) aWikiDoc.get( "CompleteUrl" );
Hashtable aEntry = getDocByCompleteUrl( sURL );
@@ -104,7 +104,7 @@ public class Settings
}
- public Vector getWikiDocs()
+ public Vector<Hashtable<String, Object>> getWikiDocs()
{
return m_aWikiDocs;
}
@@ -112,11 +112,11 @@ public class Settings
public Object[] getWikiDocList( int serverid, int num )
{
String wikiserverurl = getWikiConUrlByNumber( serverid );
- Vector theDocs = new Vector();
+ Vector<String> theDocs = new Vector<String>();
String [] docs = new String[0];
for ( int i=0; i<m_aWikiDocs.size(); i++ )
{
- Hashtable ht = ( Hashtable ) m_aWikiDocs.get( i );
+ Hashtable ht = m_aWikiDocs.get( i );
String docurl = ( String ) ht.get( "Url" );
if ( docurl.equals( wikiserverurl ) )
{
@@ -141,27 +141,27 @@ public class Settings
String [] WikiList = new String [m_WikiConnections.size()];
for ( int i=0; i<m_WikiConnections.size(); i++ )
{
- Hashtable ht = ( Hashtable ) m_WikiConnections.get( i );
+ Hashtable ht = m_WikiConnections.get( i );
WikiList[i] = ( String ) ht.get( "Url" );
}
return WikiList;
}
- public Hashtable getSettingByUrl( String sUrl )
+ public Hashtable<String, String> getSettingByUrl( String sUrl )
{
- Hashtable ht = null;
+ Hashtable<String, String> ht = null;
for( int i=0;i<m_WikiConnections.size();i++ )
{
- Hashtable h1 = ( Hashtable ) m_WikiConnections.get( i );
- String u1 = ( String ) h1.get( "Url" );
+ Hashtable<String, String> h1 = m_WikiConnections.get( i );
+ String u1 = h1.get( "Url" );
if ( u1.equals( sUrl ) )
{
ht = h1;
try
{
- String sUserName = (String)ht.get( "Username" );
- String aPassword = (String)ht.get( "Password" );
+ String sUserName = ht.get( "Username" );
+ String aPassword = ht.get( "Password" );
if ( sUserName != null && sUserName.length() > 0 && ( aPassword == null || aPassword.length() == 0 ) )
{
String[] pPasswords = Helper.GetPasswordsForURLAndUser( m_xContext, sUrl, sUserName );
@@ -185,7 +185,7 @@ public class Settings
Hashtable ht = null;
for( int i=0;i<m_aWikiDocs.size();i++ )
{
- Hashtable h1 = ( Hashtable ) m_aWikiDocs.get( i );
+ Hashtable h1 = m_aWikiDocs.get( i );
String u1 = ( String ) h1.get( "CompleteUrl" );
if ( u1.equals( curl ) )
{
@@ -201,7 +201,7 @@ public class Settings
Hashtable ht = null;
for( int i=0;i<m_WikiConnections.size();i++ )
{
- Hashtable h1 = ( Hashtable ) m_WikiConnections.get( i );
+ Hashtable h1 = m_WikiConnections.get( i );
String u1 = ( String ) h1.get( "Url" );
if ( u1.equals( sUrl ) )
{
@@ -224,12 +224,12 @@ public class Settings
}
// store all connections
- XSingleServiceFactory xConnectionFactory = ( XSingleServiceFactory ) UnoRuntime.queryInterface( XSingleServiceFactory.class, xContainer );
+ XSingleServiceFactory xConnectionFactory = UnoRuntime.queryInterface( XSingleServiceFactory.class, xContainer );
for ( int i=0; i< m_WikiConnections.size(); i++ )
{
Object oNewConnection = xConnectionFactory.createInstance();
- Hashtable ht = ( Hashtable ) m_WikiConnections.get( i );
- XNameReplace xNewConn = ( XNameReplace ) UnoRuntime.queryInterface( XNameReplace.class, oNewConnection );
+ Hashtable ht = m_WikiConnections.get( i );
+ XNameReplace xNewConn = UnoRuntime.queryInterface( XNameReplace.class, oNewConnection );
if ( xNewConn != null )
xNewConn.replaceByName( "UserName", ht.get( "Username" ) );
@@ -237,7 +237,7 @@ public class Settings
xContainer.insertByName( (String)ht.get( "Url" ), xNewConn );
}
// commit changes
- XChangesBatch xBatch = ( XChangesBatch ) UnoRuntime.queryInterface( XChangesBatch.class, xContainer );
+ XChangesBatch xBatch = UnoRuntime.queryInterface( XChangesBatch.class, xContainer );
xBatch.commitChanges();
// remove stored connection information
@@ -248,13 +248,13 @@ public class Settings
xContainer2.removeByName( pNames2[i] );
}
// store all Docs
- XSingleServiceFactory xDocListFactory = ( XSingleServiceFactory ) UnoRuntime.queryInterface( XSingleServiceFactory.class, xContainer2 );
+ XSingleServiceFactory xDocListFactory = UnoRuntime.queryInterface( XSingleServiceFactory.class, xContainer2 );
for ( int i=0; i< m_aWikiDocs.size(); i++ )
{
- Hashtable ht = ( Hashtable ) m_aWikiDocs.get( i );
+ Hashtable ht = m_aWikiDocs.get( i );
Object oNewDoc = xDocListFactory.createInstance();
- XNameReplace xNewDoc = ( XNameReplace ) UnoRuntime.queryInterface( XNameReplace.class, oNewDoc );
+ XNameReplace xNewDoc = UnoRuntime.queryInterface( XNameReplace.class, oNewDoc );
Enumeration e = ht.keys();
while ( e.hasMoreElements() )
@@ -266,7 +266,7 @@ public class Settings
xContainer2.insertByName( "d" + i, xNewDoc );
}
// commit changes
- XChangesBatch xBatch2 = ( XChangesBatch ) UnoRuntime.queryInterface( XChangesBatch.class, xContainer2 );
+ XChangesBatch xBatch2 = UnoRuntime.queryInterface( XChangesBatch.class, xContainer2 );
xBatch2.commitChanges();
}
@@ -288,18 +288,18 @@ public class Settings
if ( xAccess != null )
{
Object oList = xAccess.getByName( "ConnectionList" );
- XNameAccess xConnectionList = ( XNameAccess ) UnoRuntime.queryInterface( XNameAccess.class, oList );
+ XNameAccess xConnectionList = UnoRuntime.queryInterface( XNameAccess.class, oList );
String [] allCons = xConnectionList.getElementNames();
for ( int i=0; i<allCons.length; i++ )
{
- Hashtable ht = new Hashtable();
+ Hashtable<String, String> ht = new Hashtable<String, String>();
ht.put( "Url", allCons[i] );
ht.put( "Username", "" );
ht.put( "Password", "" );
try
{
- XPropertySet xProps = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, xConnectionList.getByName( allCons[i] ) );
+ XPropertySet xProps = UnoRuntime.queryInterface( XPropertySet.class, xConnectionList.getByName( allCons[i] ) );
if ( xProps != null )
{
String aUsername = AnyConverter.toString( xProps.getPropertyValue( "UserName" ) );
@@ -316,13 +316,13 @@ public class Settings
}
Object oDocs = xAccess.getByName( "RecentDocs" );
- XNameAccess xRecentDocs = ( XNameAccess ) UnoRuntime.queryInterface( XNameAccess.class, oDocs );
+ XNameAccess xRecentDocs = UnoRuntime.queryInterface( XNameAccess.class, oDocs );
String [] allDocs = xRecentDocs.getElementNames();
for ( int i=0; i<allDocs.length; i++ )
{
Object oDoc = xRecentDocs.getByName( allDocs[i] );
- XNameAccess xDoc = ( XNameAccess ) UnoRuntime.queryInterface( XNameAccess.class, oDoc );
- Hashtable ht = new Hashtable();
+ XNameAccess xDoc = UnoRuntime.queryInterface( XNameAccess.class, oDoc );
+ Hashtable<String, Object> ht = new Hashtable<String, Object>();
ht.put( "Url", xDoc.getByName( "Url" ) );
ht.put( "CompleteUrl", xDoc.getByName( "CompleteUrl" ) );
ht.put( "Doc", xDoc.getByName( "Doc" ) );
commit 6bf09ecf1d97455af4a07ae3564886ee69e0a33b
Author: Noel Grandin <noel at peralex.com>
Date: Fri Sep 7 13:39:37 2012 +0200
Java cleanup, remove unnecessary imports
I guess I missed some last time :-)
Change-Id: I164a8baa07850f783b8cdf2e7f3eeaac53a3d29b
diff --git a/bridges/test/java_remote/Bug51323_Test.java b/bridges/test/java_remote/Bug51323_Test.java
index b3ea331..bf177fd 100644
--- a/bridges/test/java_remote/Bug51323_Test.java
+++ b/bridges/test/java_remote/Bug51323_Test.java
@@ -26,7 +26,6 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.uno.XInterface;
import complexlib.ComplexTestCase;
-import util.WaitUnreachable;
import test.lib.TestBed;
/**
diff --git a/bridges/test/java_remote/PolyStructTest.java b/bridges/test/java_remote/PolyStructTest.java
index 2243c86..146d14f 100644
--- a/bridges/test/java_remote/PolyStructTest.java
+++ b/bridges/test/java_remote/PolyStructTest.java
@@ -19,16 +19,10 @@
package test.java_remote;
import com.sun.star.bridge.XInstanceProvider;
-import com.sun.star.lib.uno.typeinfo.MemberTypeInfo;
-import com.sun.star.lib.uno.typeinfo.MethodTypeInfo;
-import com.sun.star.lib.uno.typeinfo.ParameterTypeInfo;
-import com.sun.star.lib.uno.typeinfo.TypeInfo;
import com.sun.star.uno.Any;
import com.sun.star.uno.Type;
-import com.sun.star.uno.TypeClass;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.XInterface;
import complexlib.ComplexTestCase;
import test.lib.TestBed;
diff --git a/bridges/test/java_uno/nativethreadpool/Relay.java b/bridges/test/java_uno/nativethreadpool/Relay.java
index 2690e10..d15d0d4 100644
--- a/bridges/test/java_uno/nativethreadpool/Relay.java
+++ b/bridges/test/java_uno/nativethreadpool/Relay.java
@@ -27,7 +27,6 @@ import com.sun.star.connection.AlreadyAcceptingException;
import com.sun.star.connection.ConnectionSetupException;
import com.sun.star.connection.Acceptor;
import com.sun.star.connection.XAcceptor;
-import com.sun.star.connection.XConnection;
import com.sun.star.lang.WrappedTargetRuntimeException;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XSingleServiceFactory;
diff --git a/bridges/test/testclient.java b/bridges/test/testclient.java
index 075f6b3..135030c 100644
--- a/bridges/test/testclient.java
+++ b/bridges/test/testclient.java
@@ -22,7 +22,6 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.IBridge;
import com.sun.star.connection.XConnector;
import com.sun.star.connection.XConnection;
-import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.bridge.XInstanceProvider;
import test.XCallMe;
diff --git a/odk/examples/DevelopersGuide/Charts/CalcHelper.java b/odk/examples/DevelopersGuide/Charts/CalcHelper.java
index c7a82f3..9e5f743 100644
--- a/odk/examples/DevelopersGuide/Charts/CalcHelper.java
+++ b/odk/examples/DevelopersGuide/Charts/CalcHelper.java
@@ -36,22 +36,8 @@
import java.util.Random;
-// base classes
-import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.*;
-
-// factory for creating components
-import com.sun.star.comp.servicemanager.ServiceManager;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XComponentLoader;
-
-// property access
-import com.sun.star.beans.*;
-
// container access
import com.sun.star.container.*;
@@ -63,8 +49,6 @@ import com.sun.star.text.XText;
import com.sun.star.document.XEmbeddedObjectSupplier;
import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
// base graphics things
import com.sun.star.awt.Point;
import com.sun.star.awt.Size;
@@ -73,8 +57,6 @@ import com.sun.star.awt.Rectangle;
// Exceptions
import com.sun.star.uno.RuntimeException;
import com.sun.star.container.NoSuchElementException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
// __________ Implementation __________
diff --git a/odk/examples/DevelopersGuide/Charts/ChartHelper.java b/odk/examples/DevelopersGuide/Charts/ChartHelper.java
index 0cffc0e..da61cb3 100644
--- a/odk/examples/DevelopersGuide/Charts/ChartHelper.java
+++ b/odk/examples/DevelopersGuide/Charts/ChartHelper.java
@@ -35,14 +35,11 @@
// __________ Imports __________
-// base classes
-import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.Any;
// factory for creating components
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XComponent;
import com.sun.star.beans.XPropertySet;
// application specific classes
@@ -54,20 +51,10 @@ import com.sun.star.text.XTextDocument;
import com.sun.star.text.XTextContent;
import com.sun.star.text.XTextCursor;
import com.sun.star.text.XText;
-//import com.sun.star.text.VertOrientation;
-//import com.sun.star.text.HoriOrientation;
-import com.sun.star.document.XEmbeddedObjectSupplier;
-
// base graphics things
import com.sun.star.awt.Point;
import com.sun.star.awt.Size;
-// Exceptions
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.container.NoSuchElementException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-
// __________ Implementation __________
/** Helper for creating an OLE chart
diff --git a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java
index 06f571b..28e6266 100644
--- a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java
+++ b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java
@@ -34,8 +34,6 @@
// __________ Imports __________
-// base classes
-import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.lang.*;
@@ -51,18 +49,13 @@ import com.sun.star.table.XCellRange;
import com.sun.star.sheet.XCellRangeAddressable;
import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
import com.sun.star.util.XNumberFormatsSupplier;
import com.sun.star.util.XNumberFormats;
// base graphics things
import com.sun.star.awt.Point;
import com.sun.star.awt.Size;
-import com.sun.star.awt.Rectangle;
import com.sun.star.awt.FontWeight;
-import com.sun.star.awt.FontRelief;
-
// Exceptions
import com.sun.star.uno.Exception;
import com.sun.star.uno.RuntimeException;
diff --git a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
index 9b206f5..224997b 100644
--- a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
+++ b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
@@ -34,8 +34,6 @@
// __________ Imports __________
-// base classes
-import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.lang.*;
@@ -46,26 +44,14 @@ import com.sun.star.beans.*;
import com.sun.star.chart.*;
import com.sun.star.drawing.*;
-import com.sun.star.table.CellRangeAddress;
import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-import com.sun.star.util.XNumberFormatsSupplier;
-import com.sun.star.util.XNumberFormats;
-
// base graphics things
import com.sun.star.awt.Point;
import com.sun.star.awt.Size;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.FontWeight;
-import com.sun.star.awt.FontRelief;
-
// Exceptions
import com.sun.star.uno.Exception;
import com.sun.star.uno.RuntimeException;
import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-import com.sun.star.util.MalformedNumberFormatException;
// __________ Implementation __________
diff --git a/odk/examples/DevelopersGuide/Charts/ChartInWriter.java b/odk/examples/DevelopersGuide/Charts/ChartInWriter.java
index 9f64e1f..f23a4ea 100644
--- a/odk/examples/DevelopersGuide/Charts/ChartInWriter.java
+++ b/odk/examples/DevelopersGuide/Charts/ChartInWriter.java
@@ -34,8 +34,6 @@
// __________ Imports __________
-// base classes
-import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.lang.*;
@@ -45,28 +43,14 @@ import com.sun.star.beans.*;
// application specific classes
import com.sun.star.chart.*;
import com.sun.star.drawing.*;
-import com.sun.star.text.XTextDocument;
-
-import com.sun.star.table.CellRangeAddress;
import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-import com.sun.star.util.XNumberFormatsSupplier;
-import com.sun.star.util.XNumberFormats;
-
// base graphics things
import com.sun.star.awt.Point;
import com.sun.star.awt.Size;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.FontWeight;
-import com.sun.star.awt.FontRelief;
-
// Exceptions
import com.sun.star.uno.Exception;
import com.sun.star.uno.RuntimeException;
import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-import com.sun.star.util.MalformedNumberFormatException;
// __________ Implementation __________
diff --git a/odk/examples/DevelopersGuide/Charts/Helper.java b/odk/examples/DevelopersGuide/Charts/Helper.java
index 13efc37..928acee 100644
--- a/odk/examples/DevelopersGuide/Charts/Helper.java
+++ b/odk/examples/DevelopersGuide/Charts/Helper.java
@@ -34,41 +34,18 @@
// __________ Imports __________
-import java.util.Random;
-
-// base classes
-import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.*;
-// factory for creating components
-import com.sun.star.comp.servicemanager.ServiceManager;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.frame.XDesktop;
import com.sun.star.frame.XComponentLoader;
// property access
import com.sun.star.beans.*;
-// container access
-import com.sun.star.container.*;
-
// application specific classes
import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.text.XTextDocument;
-
-import com.sun.star.document.XEmbeddedObjectSupplier;
import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-// Exceptions
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.container.NoSuchElementException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
// __________ Implementation __________
diff --git a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
index 06239b6..3ddb9d8 100644
--- a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
+++ b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
@@ -32,10 +32,7 @@
*
*************************************************************************/
-// base classes
-import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Type;
import com.sun.star.container.XIndexAccess;
import com.sun.star.lib.uno.helper.WeakBase;
@@ -46,7 +43,6 @@ import com.sun.star.lang.XSingleServiceFactory;
// graphics stuff
import com.sun.star.drawing.*;
import com.sun.star.awt.Point;
-import com.sun.star.awt.Rectangle;
import com.sun.star.awt.Size;
// chart stuff
@@ -60,8 +56,6 @@ import com.sun.star.lang.XInitialization;
import com.sun.star.util.XRefreshable;
import com.sun.star.lang.XServiceName;
import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XTypeProvider;
-
// Exceptions
import com.sun.star.uno.Exception;
import com.sun.star.uno.RuntimeException;
diff --git a/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java b/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java
index 9c37b4d..1548400 100644
--- a/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java
+++ b/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java
@@ -34,8 +34,6 @@
// __________ Imports __________
-// base classes
-import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.lang.*;
@@ -44,31 +42,15 @@ import com.sun.star.beans.*;
// application specific classes
import com.sun.star.chart.*;
-import com.sun.star.drawing.*;
-
-import com.sun.star.table.CellRangeAddress;
import com.sun.star.table.XCellRange;
import com.sun.star.sheet.XSpreadsheetDocument;
import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-import com.sun.star.util.XNumberFormatsSupplier;
-import com.sun.star.util.XNumberFormats;
-
// base graphics things
import com.sun.star.awt.Point;
import com.sun.star.awt.Size;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.FontWeight;
-import com.sun.star.awt.FontRelief;
-
// Exceptions
import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-import com.sun.star.util.MalformedNumberFormatException;
// __________ Implementation __________
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
index 6b53ece..efec7d8 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
@@ -36,12 +36,8 @@ import com.sun.star.uno.XComponentContext;
import com.sun.star.lib.uno.helper.Factory;
import com.sun.star.lib.uno.helper.WeakBase;
import com.sun.star.lang.XServiceInfo;
-import com.sun.star.awt.*;
-import com.sun.star.beans.*;
import com.sun.star.task.*;
import com.sun.star.uno.*;
-import java.lang.*;
-import javax.swing.*;
/** it implements a simple job component.
*
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
index debc2ce..a5fd969 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
@@ -37,15 +37,11 @@ import com.sun.star.lib.uno.helper.Factory;
import com.sun.star.lang.XSingleComponentFactory;
import com.sun.star.lib.uno.helper.WeakBase;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.registry.XRegistryKey;
import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XTypeProvider;
import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.Type;
import com.sun.star.frame.XStatusListener;
import com.sun.star.frame.XDispatchProvider;
import com.sun.star.frame.XDispatch;
-import com.sun.star.frame.XModel;
import com.sun.star.frame.XFrame;
import com.sun.star.frame.DispatchDescriptor;
import com.sun.star.awt.XToolkit;
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java
index 540328e..cdfa4af 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java
@@ -31,11 +31,9 @@
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*************************************************************************/
-import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lib.uno.helper.WeakBase;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.test.XSomethingA;
-import com.sun.star.uno.Type;
// TestComponentA use the implementation helper WeakBase
public class TestComponentA extends WeakBase implements XServiceInfo, XSomethingA {
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java
index 6b6c5a1..1474735 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java
@@ -35,10 +35,8 @@ import com.sun.star.uno.XComponentContext;
import com.sun.star.comp.helper.Bootstrap;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.test.XSomethingB;
import com.sun.star.test.SomethingB;
-import com.sun.star.lang.XSingleComponentFactory;
import com.sun.star.container.XSet;
// sample starbasic code, you can execute it after you have connected to the office.
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
index 15980bb..aa4b883 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
@@ -34,8 +34,6 @@
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.registry.XRegistryKey;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lang.XServiceInfo;
import com.sun.star.comp.loader.FactoryHelper;
public class TestServiceProvider
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
index d7b6716..1712bed 100644
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
+++ b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
@@ -36,13 +36,8 @@ import com.sun.star.lib.uno.helper.Factory;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XSingleComponentFactory;
import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XTypeProvider;
import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.Type;
/** This class capsulates the class, that implements the minimal component, a
* factory for creating the service (<CODE>__getComponentFactory</CODE>) and a
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java
index 5565d7d..7da0e91 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java
@@ -49,7 +49,6 @@ package org.openoffice.comp.test;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.registry.XRegistryKey;
import com.sun.star.comp.loader.FactoryHelper;
import com.sun.star.lib.uno.helper.WeakBase;
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java
index d5dbaf4..2da8ad5 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java
@@ -33,8 +33,6 @@
*************************************************************************/
package org.openoffice.comp.test;
-import com.sun.star.uno.UnoRuntime;
-
/**
* Test class for testing the ImageShrink service skeleton.
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
index 9d6409e..d654882 100644
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
+++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
@@ -35,15 +35,11 @@
import com.sun.star.uno.Type;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
-import com.sun.star.registry.XRegistryKey;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XSingleComponentFactory;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.comp.loader.FactoryHelper;
import com.sun.star.awt.XDialog;
import com.sun.star.awt.XDialogProvider2;
import com.sun.star.awt.XDialogEventHandler;
diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
index 2e4f3d0..5ea7fee 100644
--- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java
+++ b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
@@ -41,8 +41,6 @@ import com.sun.star.beans.XMultiHierarchicalPropertySet;
import com.sun.star.beans.XPropertyState;
import com.sun.star.beans.XMultiPropertyStates;
-import com.sun.star.bridge.XUnoUrlResolver;
-
import com.sun.star.configuration.XTemplateInstance;
import com.sun.star.container.XNameAccess;
@@ -57,14 +55,12 @@ import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.EventObject;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XNamingService;
import com.sun.star.uno.AnyConverter;
import com.sun.star.util.XChangesBatch;
diff --git a/odk/examples/DevelopersGuide/Database/CodeSamples.java b/odk/examples/DevelopersGuide/Database/CodeSamples.java
index 994e6e4..7d4cac1 100644
--- a/odk/examples/DevelopersGuide/Database/CodeSamples.java
+++ b/odk/examples/DevelopersGuide/Database/CodeSamples.java
@@ -32,15 +32,9 @@
*
*************************************************************************/
-import java.io.*;
-
-import com.sun.star.comp.helper.RegistryServiceFactory;
-import com.sun.star.comp.servicemanager.ServiceManager;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XComponent;
-import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.beans.XPropertySet;
diff --git a/odk/examples/DevelopersGuide/Database/OpenQuery.java b/odk/examples/DevelopersGuide/Database/OpenQuery.java
index c62d560..1b81ce2 100644
--- a/odk/examples/DevelopersGuide/Database/OpenQuery.java
+++ b/odk/examples/DevelopersGuide/Database/OpenQuery.java
@@ -32,7 +32,6 @@
*
*************************************************************************/
-import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.XMultiComponentFactory;
diff --git a/odk/examples/DevelopersGuide/Database/RowSet.java b/odk/examples/DevelopersGuide/Database/RowSet.java
index 52e9c25..780aaed 100644
--- a/odk/examples/DevelopersGuide/Database/RowSet.java
+++ b/odk/examples/DevelopersGuide/Database/RowSet.java
@@ -32,21 +32,14 @@
*
*************************************************************************/
-import java.io.*;
-
-import com.sun.star.comp.helper.RegistryServiceFactory;
-import com.sun.star.comp.servicemanager.ServiceManager;
import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XComponent;
-import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XNameAccess;
import com.sun.star.sdbc.*;
import com.sun.star.sdbcx.Privilege;
-import com.sun.star.sdb.CommandType;
import com.sun.star.sdb.XRowSetApproveBroadcaster;
public class RowSet
diff --git a/odk/examples/DevelopersGuide/Database/Sales.java b/odk/examples/DevelopersGuide/Database/Sales.java
index 191ed9f..7e7c310 100644
--- a/odk/examples/DevelopersGuide/Database/Sales.java
+++ b/odk/examples/DevelopersGuide/Database/Sales.java
@@ -32,18 +32,10 @@
*
*************************************************************************/
-import java.io.*;
-
-// import com.sun.star.comp.helper.RegistryServiceFactory;
-// import com.sun.star.comp.servicemanager.ServiceManager;
-// import com.sun.star.lang.XMultiServiceFactory;
-// import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XComponent;
// import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.uno.*;
import com.sun.star.util.Date;
import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XNameAccess;
import com.sun.star.sdbc.*;
public class Sales
diff --git a/odk/examples/DevelopersGuide/Database/SalesMan.java b/odk/examples/DevelopersGuide/Database/SalesMan.java
index e19bca7..ee1171a 100644
--- a/odk/examples/DevelopersGuide/Database/SalesMan.java
+++ b/odk/examples/DevelopersGuide/Database/SalesMan.java
@@ -32,18 +32,9 @@
*
*************************************************************************/
-import java.io.*;
-
-// import com.sun.star.comp.helper.RegistryServiceFactory;
-// import com.sun.star.comp.servicemanager.ServiceManager;
-// import com.sun.star.lang.XMultiServiceFactory;
-// import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XComponent;
// import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.uno.*;
import com.sun.star.util.Date;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XNameAccess;
import com.sun.star.sdbc.*;
public class SalesMan
diff --git a/odk/examples/DevelopersGuide/Database/sdbcx.java b/odk/examples/DevelopersGuide/Database/sdbcx.java
index 62a4f70..01677c7 100644
--- a/odk/examples/DevelopersGuide/Database/sdbcx.java
+++ b/odk/examples/DevelopersGuide/Database/sdbcx.java
@@ -32,8 +32,6 @@
*
*************************************************************************/
-import java.io.*;
-
import com.sun.star.lang.XComponent;
import com.sun.star.uno.*;
import com.sun.star.bridge.XUnoUrlResolver;
diff --git a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java
index 7c40da7..acbf18b 100644
--- a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java
+++ b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java
@@ -35,47 +35,29 @@
import com.sun.star.lang.XComponent;
import com.sun.star.uno.XComponentContext;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.frame.XComponentLoader;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertySetInfo;
import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.beans.PropertyVetoException;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XText;
import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XWordCursor;
import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextTable;
-import com.sun.star.text.XTextTableCursor;
-import com.sun.star.table.XTableRows;
import com.sun.star.table.XCellRange;
import com.sun.star.table.XCell;
-import com.sun.star.table.XCellCursor;
import com.sun.star.table.TableBorder;
import com.sun.star.table.BorderLine;
import com.sun.star.drawing.XShape;
import com.sun.star.awt.Size;
import com.sun.star.awt.Point;
import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XSheetCellCursor;
import com.sun.star.container.XIndexAccess;
import com.sun.star.drawing.XDrawPagesSupplier;
import com.sun.star.drawing.XDrawPageSupplier;
import com.sun.star.drawing.XDrawPage;
-import com.sun.star.text.XTextTablesSupplier;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.container.XNamed;
-import com.sun.star.text.XBookmarksSupplier;
-import com.sun.star.text.XTextRange;
-
/**
*
* @author dschulten
diff --git a/odk/examples/DevelopersGuide/GUI/MessageBox.java b/odk/examples/DevelopersGuide/GUI/MessageBox.java
index 65e2e8a..b9b3903 100644
--- a/odk/examples/DevelopersGuide/GUI/MessageBox.java
+++ b/odk/examples/DevelopersGuide/GUI/MessageBox.java
@@ -38,7 +38,6 @@ import com.sun.star.awt.XMessageBoxFactory;
import com.sun.star.awt.XVclWindowPeer;
import com.sun.star.awt.XWindow;
import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.PropertyValue;
import com.sun.star.frame.XFrame;
import com.sun.star.frame.XModel;
import com.sun.star.util.XCloseable;
diff --git a/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java b/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java
index 8ad61f3..6f2a824 100644
--- a/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java
+++ b/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java
@@ -32,7 +32,6 @@
*
*************************************************************************/
-import com.sun.star.awt.ItemEvent;
import com.sun.star.awt.XItemListener;
import com.sun.star.lang.EventObject;
import com.sun.star.beans.XPropertySet;
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
index 5d9781d..a410a16 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
@@ -32,18 +32,14 @@
*
*************************************************************************/
import com.sun.star.awt.PushButtonType;
-import com.sun.star.awt.XControl;
import com.sun.star.awt.XDialog;
-import com.sun.star.awt.XFixedText;
import com.sun.star.awt.XListBox;
-import com.sun.star.awt.XWindow;
import com.sun.star.beans.MethodConcept;
import com.sun.star.beans.Property;
import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XIntrospection;
import com.sun.star.beans.XIntrospectionAccess;
import com.sun.star.beans.XMultiPropertySet;
-import com.sun.star.beans.XPropertySet;
import com.sun.star.frame.XComponentLoader;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XServiceInfo;
diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu2.java b/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
index a9ba0a1..8964341 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
@@ -20,7 +20,6 @@ import com.sun.star.awt.MouseEvent;
import com.sun.star.awt.Rectangle;
import com.sun.star.awt.XControl;
import com.sun.star.awt.XMouseListener;
-import com.sun.star.awt.XTopWindow;
import com.sun.star.awt.XWindow;
import com.sun.star.beans.XMultiPropertySet;
import com.sun.star.lang.EventObject;
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java
index 0d79e1e..b4f6a46 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java
@@ -32,13 +32,10 @@
*
*************************************************************************/
-import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.uno.XComponentContext;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.frame.XComponentLoader;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
import com.sun.star.datatransfer.DataFlavor;
import com.sun.star.datatransfer.UnsupportedFlavorException;
import com.sun.star.datatransfer.XTransferable;
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java b/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
index a74c0d1..18dc21b 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
@@ -35,12 +35,8 @@
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.PropertyValue;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.util.XURLTransformer;
-import com.sun.star.frame.XDesktop;
import com.sun.star.frame.XComponentLoader;
import com.sun.star.text.XTextDocument;
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
index fd2674d..0b96c79 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
@@ -34,17 +34,12 @@
package FilterDevelopment.AsciiFilter;
-import com.sun.star.lib.uno.helper.Factory;
import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.registry.XRegistryKey;
import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XSingleComponentFactory;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Type;
import com.sun.star.uno.AnyConverter;
-import com.sun.star.beans.PropertyValue;
-
import com.sun.star.lang.XInitialization;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.container.XNamed;
@@ -52,9 +47,6 @@ import com.sun.star.document.XImporter;
import com.sun.star.document.XExporter;
import com.sun.star.document.XFilter;
-
-import com.sun.star.lang.IllegalArgumentException;
-
/*-************************************************************************
@title implements a filter to import pure ascii text files
@description This filter can use an existing In/OutputStream of given
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java
index b7e560e..3afd0e0 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java
@@ -35,18 +35,10 @@
package FilterDevelopment.AsciiFilter;
import com.sun.star.uno.AnyConverter;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.io.XInputStream;
-import com.sun.star.io.XOutputStream;
-import com.sun.star.ucb.XSimpleFileAccess;
import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Exception;
-import com.sun.star.ucb.CommandAbortedException;
-import com.sun.star.lang.IllegalArgumentException;
-
/*-************************************************************************
@title helper to analyze neccessary option properties of our filter
@description Our filter needs some neccessary properties for working:
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
index 689d9b8..ea62ae1 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
@@ -32,8 +32,6 @@
*
*************************************************************************/
-import java.io.*;
-import java.util.*;
import com.sun.star.uno.*;
import com.sun.star.lang.*;
import com.sun.star.beans.*;
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
index 6082960..3dafc66 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
@@ -48,15 +48,9 @@ import com.sun.star.linguistic2.XLinguServiceEventListener;
import com.sun.star.linguistic2.LinguServiceEvent;
import com.sun.star.beans.XPropertySet;
import com.sun.star.beans.PropertyValue;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.EventObject;
import com.sun.star.lang.Locale;
-import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Any;
-import com.sun.star.lang.XComponent;
public class LinguisticExamples
{
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java
index 9b2a224..05f34cc 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java
@@ -38,7 +38,6 @@ import com.sun.star.lang.XInitialization;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.beans.XPropertySet;
import com.sun.star.uno.XInterface;
-import com.sun.star.uno.Any;
import com.sun.star.uno.UnoRuntime;
import java.lang.reflect.Constructor;
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java
index 00d67df..cb0e281 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java
@@ -32,18 +32,10 @@
*
*************************************************************************/
-import com.sun.star.linguistic2.XLinguServiceEventBroadcaster;
-import com.sun.star.linguistic2.XLinguServiceEventListener;
import com.sun.star.linguistic2.LinguServiceEvent;
import com.sun.star.linguistic2.LinguServiceEventFlags;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertyChangeListener;
import com.sun.star.beans.PropertyChangeEvent;
-import com.sun.star.lang.EventObject;
import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-
-import java.util.ArrayList;
public class PropChgHelper_Hyph extends PropChgHelper
{
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java
index d399e13..68c3c3b 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java
@@ -32,18 +32,10 @@
*
*************************************************************************/
-import com.sun.star.linguistic2.XLinguServiceEventBroadcaster;
-import com.sun.star.linguistic2.XLinguServiceEventListener;
import com.sun.star.linguistic2.LinguServiceEvent;
import com.sun.star.linguistic2.LinguServiceEventFlags;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertyChangeListener;
import com.sun.star.beans.PropertyChangeEvent;
-import com.sun.star.lang.EventObject;
import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-
-import java.util.ArrayList;
public class PropChgHelper_Spell extends PropChgHelper
{
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
index e28fe57..a81aad0 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
@@ -44,13 +44,11 @@ import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.linguistic2.XHyphenator;
import com.sun.star.linguistic2.XLinguServiceEventBroadcaster;
import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XComponent;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XServiceDisplayName;
// Exceptions
import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
import com.sun.star.lang.IllegalArgumentException;
//used Interfaces
@@ -58,15 +56,9 @@ import com.sun.star.linguistic2.XLinguServiceEventListener;
import com.sun.star.linguistic2.XHyphenatedWord;
import com.sun.star.linguistic2.XPossibleHyphens;
import com.sun.star.lang.Locale;
-import com.sun.star.lang.XEventListener;
-import com.sun.star.lang.EventObject;
import com.sun.star.beans.XPropertySet;
import com.sun.star.beans.PropertyValue;
import com.sun.star.uno.AnyConverter;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.Type;
-
import java.util.ArrayList;
public class SampleHyphenator extends ComponentBase implements
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
index e7dd243..10ec0aa 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
@@ -44,13 +44,11 @@ import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.linguistic2.XSpellChecker;
import com.sun.star.linguistic2.XLinguServiceEventBroadcaster;
import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XComponent;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XServiceDisplayName;
// Exceptions
import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
import com.sun.star.lang.IllegalArgumentException;
//used Interfaces
@@ -58,15 +56,9 @@ import com.sun.star.linguistic2.XLinguServiceEventListener;
import com.sun.star.linguistic2.XSpellAlternatives;
import com.sun.star.linguistic2.SpellFailure;
import com.sun.star.lang.Locale;
-import com.sun.star.lang.XEventListener;
-import com.sun.star.lang.EventObject;
import com.sun.star.beans.XPropertySet;
import com.sun.star.beans.PropertyValue;
import com.sun.star.uno.AnyConverter;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.Type;
-
import java.util.ArrayList;
public class SampleSpellChecker extends ComponentBase implements
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
index 824ed09..e33929a 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
@@ -43,26 +43,17 @@ import com.sun.star.lang.XSingleServiceFactory;
// supported Interfaces
import com.sun.star.linguistic2.XThesaurus;
import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XComponent;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XServiceDisplayName;
// Exceptions
import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.lang.IllegalArgumentException;
-
//used Interfaces
import com.sun.star.linguistic2.XMeaning;
import com.sun.star.lang.Locale;
-import com.sun.star.lang.XEventListener;
-import com.sun.star.lang.EventObject;
import com.sun.star.beans.XPropertySet;
import com.sun.star.beans.PropertyValue;
import com.sun.star.uno.AnyConverter;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.uno.Type;
-
import java.util.ArrayList;
public class SampleThesaurus extends ComponentBase implements
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XMeaning_impl.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XMeaning_impl.java
index b1fc2e1..fd65d72 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XMeaning_impl.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XMeaning_impl.java
@@ -32,7 +32,7 @@
*
*************************************************************************/
-import com.sun.star.lang.Locale;
+
public class XMeaning_impl implements
com.sun.star.linguistic2.XMeaning
diff --git a/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java b/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java
index 71ec62d..6d695d5 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java
@@ -32,7 +32,6 @@
*
*************************************************************************/
-import com.sun.star.lang.XServiceInfo;
import com.sun.star.uno.UnoRuntime;
// A helper class to determine the menu element type
diff --git a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
index c7f08ab..97beab0 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
@@ -34,18 +34,7 @@
// __________ Imports __________
-// structs, const, ...
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.bridge.XUnoUrlResolver;
-
-// exceptions
-import com.sun.star.container.NoSuchElementException;
-
-// interfaces
-import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.Any;
-import com.sun.star.uno.Exception;
-
import com.sun.star.uno.UnoRuntime;
// others
diff --git a/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java b/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java
index 9aaeadc..8270599 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java
@@ -36,8 +36,6 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.UnknownPropertyException;
/*
*
diff --git a/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java b/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java
index 26faedd..22b6a82 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java
@@ -35,9 +35,6 @@
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.PropertyValue;
-
import com.sun.star.util.XStringSubstitution;
/*
diff --git a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java b/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java
index 5e7d871..a7bb8a2 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java
+++ b/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java
@@ -39,14 +39,11 @@ import com.sun.star.uno.XComponentContext;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list