[Libreoffice-commits] core.git: 4 commits - bean/com jurt/com nlpsolver/ThirdParty odk/examples qadevOOo/runner ridljar/com
Noel Grandin
noel at peralex.com
Mon Aug 4 05:51:37 PDT 2014
bean/com/sun/star/beans/LocalOfficeConnection.java | 22 ------
bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 22 ------
jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java | 19 -----
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java | 3
odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java | 26 -------
odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java | 11 ---
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java | 21 ------
odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java | 14 ----
odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java | 17 -----
odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java | 11 ---
odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java | 18 -----
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java | 25 -------
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java | 11 ---
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java | 26 -------
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java | 26 -------
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java | 26 -------
odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java | 14 ----
odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java | 12 ---
odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java | 10 --
odk/examples/java/MinimalComponent/MinimalComponent.java | 18 -----
odk/examples/java/PropertySet/PropTest.java | 10 --
odk/examples/java/Spreadsheet/CalcAddins.java | 18 -----
odk/examples/java/ToDo/ToDo.java | 17 -----
qadevOOo/runner/convwatch/FilenameHelper.java | 8 +-
qadevOOo/runner/convwatch/PRNCompare.java | 2
qadevOOo/runner/graphical/JPEGComparator.java | 2
qadevOOo/runner/graphical/JPEGCreator.java | 4 -
qadevOOo/runner/helper/ClParser.java | 2
qadevOOo/runner/helper/OfficeProvider.java | 2
qadevOOo/runner/util/UITools.java | 6 -
qadevOOo/runner/util/utils.java | 34 ----------
ridljar/com/sun/star/uno/UnoRuntime.java | 7 +-
32 files changed, 25 insertions(+), 439 deletions(-)
New commits:
commit 884e1460b9bbed06717cc0404db6652f82001cc7
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 4 14:02:40 2014 +0200
java: implement optimisation in UnoRuntime#setCurrentContext
which is now available since we started requiring Java 1.5
Change-Id: I9847b89af7f487be7812a5717716900e9a517381
diff --git a/ridljar/com/sun/star/uno/UnoRuntime.java b/ridljar/com/sun/star/uno/UnoRuntime.java
index 8178b51..28e79cb 100644
--- a/ridljar/com/sun/star/uno/UnoRuntime.java
+++ b/ridljar/com/sun/star/uno/UnoRuntime.java
@@ -382,8 +382,11 @@ public class UnoRuntime {
* previously set context will be removed
*/
public static void setCurrentContext(XCurrentContext context) {
- // optimize this by using Java 1.5 ThreadLocal.remove if context == null
- currentContext.set(context);
+ if (context == null) {
+ currentContext.remove();
+ } else {
+ currentContext.set(context);
+ }
}
/**
commit 0781dad870cb48b8604e84df1750422c91d70f1a
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 4 13:51:59 2014 +0200
java: remove commented out code for OpenOffice 3.3
Specifically the comment says:
This method not longer necessary since OOo 3.4 where the component registration
was changed to passive component registration. For more details see
http://wiki.openoffice.org/wiki/Passive_Component_Registration
Change-Id: Icfeec634ebc30a270533787b94e2a9a4318778db
diff --git a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
index c714965..1af68e7 100644
--- a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
+++ b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
@@ -445,30 +445,4 @@ public class JavaSampleChartAddIn extends WeakBase implements
return xSingleServiceFactory;
}
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo( com.sun.star.registry.XRegistryKey regKey )
-// {
-// boolean bResult = true;
-
-// String[] aServices = getSupportedServiceNames_Static();
-// int i, nLength = aServices.length;
-
-// for( i = 0; i < nLength; ++i )
-// {
-// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// JavaSampleChartAddIn.class.getName(), aServices[ i ], regKey );
-// }
-// return bResult;
-// }
}
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
index 422de9f..a7bd3b9 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
@@ -419,15 +419,4 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
}
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public synchronized static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xRegKey)
-// {
-// return Factory.writeRegistryServiceInfo(
-// AsyncJob.IMPLEMENTATIONNAME,
-// AsyncJob.SERVICENAMES,
-// xRegKey);
-// }
}
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
index 0653ee1..d939447 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
@@ -255,25 +255,4 @@ public class ProtocolHandlerAddon {
return xFactory;
}
-
- /** Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>.
- * @return returns true if the operation succeeded
- * @see com.sun.star.comp.loader.JavaLoader#
- * @see com.sun.star.lib.uno.helper.Factory#
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single
- * registry key accessible.
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// XRegistryKey xRegistryKey ) {
-// return Factory.writeRegistryServiceInfo(
-// ProtocolHandlerAddonImpl.class.getName(),
-// ProtocolHandlerAddonImpl.getServiceNames(),
-// xRegistryKey );
-// }
}
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
index 65c2d11..1a3b27f 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
@@ -54,20 +54,6 @@ public class TestServiceProvider
multiFactory, regKey);
return xSingleServiceFactory;
}
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey){
-// boolean bregA= FactoryHelper.writeRegistryServiceInfo(
-// TestComponentA.class.getName(),
-// TestComponentA.__serviceName, regKey);
-// boolean bregB= FactoryHelper.writeRegistryServiceInfo(
-// TestComponentB.class.getName(),
-// TestComponentB.__serviceName, regKey);
-// return bregA && bregB;
-// }
}
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
index b3bc1e3..d02c967 100644
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
+++ b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
@@ -135,23 +135,6 @@ public class LicenseTest {
return xFactory;
}
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// return Factory.writeRegistryServiceInfo(_LicenseTest.class.getName(),
-// _LicenseTest.getServiceNames(),
-// regKey);
-// }
/** This method is a member of the interface for initializing an object
* directly after its creation.
* @param object This array of arbitrary objects will be passed to the
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 44fe056..684a95d 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
@@ -81,17 +81,6 @@ public class ImageShrink extends WeakBase
return xSingleServiceFactory;
}
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// //System.out.println(ImageShrink.class.getName());
-// return FactoryHelper.writeRegistryServiceInfo( ImageShrink.class.getName(),
-// __serviceName,
-// regKey);
-// }
-
// XFilter implementation (a sub-interface of XImageShrinkFilter)
public void cancel() {
cancel = true;
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
index e408843..32473a3 100644
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
+++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
@@ -290,22 +290,4 @@ public class DialogComponent {
return xFactory;
}
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// return Factory.writeRegistryServiceInfo(_DialogComponent.class.getName(),
-// _DialogComponent.getServiceNames(),
-// regKey);
-// }
}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
index 4dce982..1cade50 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
@@ -697,29 +697,4 @@ public class AsciiReplaceFilter
_AsciiReplaceFilter.m_serviceNames);
return xFactory;
}
-
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>.
- *
- * @param xRegistryKey
- * Makes structural information (except regarding tree
- * structures) of a single registry key accessible.
- *
- * @return returns true if the operation succeeded
- *
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo( com.sun.star.registry.XRegistryKey xRegistryKey )
-// {
-// return Factory.writeRegistryServiceInfo(
-// _AsciiReplaceFilter.class.getName(),
-// _AsciiReplaceFilter.m_serviceNames,
-// xRegistryKey );
-// }
}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
index 942c97a..e096eb4 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
@@ -261,15 +261,4 @@ public class FlatXml implements XImportFilter, XExportFilter, XServiceName,
}
return xSingleServiceFactory;
}
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey)
-// {
-// return FactoryHelper.writeRegistryServiceInfo(__implName,
-// __serviceName, regKey);
-// }
-
}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
index f74c5a7..f7f156f 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
@@ -508,31 +508,5 @@ public class SampleHyphenator extends ComponentBase implements
}
return xSingleComponentFactory;
}
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param xRegKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// com.sun.star.registry.XRegistryKey xRegKey )
-// {
-// boolean bResult = true;
-// String[] aServices = getSupportedServiceNames_Static();
-// int i, nLength = aServices.length;
-// for( i = 0; i < nLength; ++i )
-// {
-// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _aSvcImplName, aServices[i], xRegKey );
-// }
-// return bResult;
-// }
}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
index 7887fa0..0b6be21 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
@@ -451,31 +451,5 @@ public class SampleSpellChecker extends ComponentBase implements
}
return xSingleComponentFactory;
}
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param xRegKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// com.sun.star.registry.XRegistryKey xRegKey )
-// {
-// boolean bResult = true;
-// String[] aServices = getSupportedServiceNames_Static();
-// int i, nLength = aServices.length;
-// for( i = 0; i < nLength; ++i )
-// {
-// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _aSvcImplName, aServices[i], xRegKey );
-// }
-// return bResult;
-// }
}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
index 5feb49b..9491421 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
@@ -287,31 +287,5 @@ public class SampleThesaurus extends ComponentBase implements
}
return xSingleComponentFactory;
}
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param xRegKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// com.sun.star.registry.XRegistryKey xRegKey )
-// {
-// boolean bResult = true;
-// String[] aServices = getSupportedServiceNames_Static();
-// int i, nLength = aServices.length;
-// for( i = 0; i < nLength; ++i )
-// {
-// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _aSvcImplName, aServices[i], xRegKey );
-// }
-// return bResult;
-// }
}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
index eefe3bb..cb78f88 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
@@ -299,19 +299,5 @@ public class ExampleAddIn
multiFactory, regKey);
return xSingleServiceFactory;
}
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// com.sun.star.registry.XRegistryKey regKey)
-// {
-// // register for both the base AddIn and the own service
-// return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _ExampleAddIn.aImplName, _ExampleAddIn.aExampleService, regKey)
-// && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _ExampleAddIn.aImplName, _ExampleAddIn.aAddInService, regKey);
-// }
}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
index 0ef2a09..b28daf1 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
@@ -983,17 +983,5 @@ public class ExampleDataPilotSource
return xSingleServiceFactory;
}
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// com.sun.star.registry.XRegistryKey regKey)
-// {
-// return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _ExampleDataPilotSource.aImplName,
-// _ExampleDataPilotSource.aServiceName, regKey);
-// }
}
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java
index 983f651..84547be 100644
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java
+++ b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java
@@ -45,16 +45,6 @@ public final class OwnEmbeddedObjectFactory extends WeakBase
return xFactory;
}
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo( XRegistryKey xRegistryKey ) {
-// return Factory.writeRegistryServiceInfo(m_implementationName,
-// m_serviceNames,
-// xRegistryKey);
-// }
-
// com.sun.star.lang.XServiceInfo:
public String getImplementationName() {
return m_implementationName;
diff --git a/odk/examples/java/MinimalComponent/MinimalComponent.java b/odk/examples/java/MinimalComponent/MinimalComponent.java
index a540482..1a585df 100644
--- a/odk/examples/java/MinimalComponent/MinimalComponent.java
+++ b/odk/examples/java/MinimalComponent/MinimalComponent.java
@@ -150,22 +150,4 @@ public class MinimalComponent {
return xFactory;
}
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// return Factory.writeRegistryServiceInfo(_MinimalComponent.class.getName(),
-// _MinimalComponent.getServiceNames(),
-// regKey);
-// }
}
diff --git a/odk/examples/java/PropertySet/PropTest.java b/odk/examples/java/PropertySet/PropTest.java
index 6749b4f..fd77886 100644
--- a/odk/examples/java/PropertySet/PropTest.java
+++ b/odk/examples/java/PropertySet/PropTest.java
@@ -256,14 +256,4 @@ public class PropTest extends PropertySet implements XServiceInfo
return xSingleServiceFactory;
}
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey)
-// {
-// return FactoryHelper.writeRegistryServiceInfo( PropTest.class.getName(),
-// PropTest.__serviceName, regKey);
-// }
}
diff --git a/odk/examples/java/Spreadsheet/CalcAddins.java b/odk/examples/java/Spreadsheet/CalcAddins.java
index e0387a4..7b4a285 100644
--- a/odk/examples/java/Spreadsheet/CalcAddins.java
+++ b/odk/examples/java/Spreadsheet/CalcAddins.java
@@ -281,22 +281,4 @@ public class CalcAddins {
return xSingleServiceFactory;
}
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// return FactoryHelper.writeRegistryServiceInfo(_CalcAddins.class.getName(),
-// _CalcAddins.__serviceName, regKey)
-// && FactoryHelper.writeRegistryServiceInfo(_CalcAddins.class.getName(),
-// _CalcAddins.ADDIN_SERVICE, regKey);
-// }
}
diff --git a/odk/examples/java/ToDo/ToDo.java b/odk/examples/java/ToDo/ToDo.java
index 8b1f874..99af704 100644
--- a/odk/examples/java/ToDo/ToDo.java
+++ b/odk/examples/java/ToDo/ToDo.java
@@ -929,22 +929,5 @@ public class ToDo {
return xFactory;
}
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// return Factory.writeRegistryServiceInfo(ToDoImpl.class.getName(),
-// ToDoImpl.getServiceNames(), regKey);
-// }
}
commit 66c34ff3e7cb940536b7257033c097491862d04f
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 4 13:49:16 2014 +0200
java: remove workarounds for missing functionality pre java 1.5
Since we now require java 1.5
Change-Id: I9e195f77c81bd9447f8e29c1862c68a57846c8a3
diff --git a/bean/com/sun/star/beans/LocalOfficeConnection.java b/bean/com/sun/star/beans/LocalOfficeConnection.java
index 8dbf00c..7056bb9 100644
--- a/bean/com/sun/star/beans/LocalOfficeConnection.java
+++ b/bean/com/sun/star/beans/LocalOfficeConnection.java
@@ -530,32 +530,14 @@ public class LocalOfficeConnection
mPipe = pipe;
}
- /* replaces each substring aSearch in aString by aReplace.
-
- StringBuffer.replaceAll() is not available in Java 1.3.x.
- */
- private static String replaceAll(String aString, String aSearch, String aReplace )
- {
- StringBuffer aBuffer = new StringBuffer(aString);
-
- int nPos = aString.length();
- int nOfs = aSearch.length();
-
- while ( ( nPos = aString.lastIndexOf( aSearch, nPos - 1 ) ) > -1 )
- aBuffer.replace( nPos, nPos+nOfs, aReplace );
-
- return aBuffer.toString();
- }
-
-
/** creates a unique pipe name.
*/
static String getPipeName()
{
// turn user name into a URL and file system safe name (% chars will not work)
String aPipeName = System.getProperty("user.name") + OFFICE_ID_SUFFIX;
- aPipeName = replaceAll( aPipeName, "_", "%B7" );
- return replaceAll( replaceAll( java.net.URLEncoder.encode(aPipeName), "\\+", "%20" ), "%", "_" );
+ aPipeName = aPipeName.replace( "_", "%B7" );
+ return java.net.URLEncoder.encode(aPipeName).replace( "\\+", "%20" ).replace( "%", "_" );
}
/**
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
index 49fb32b..6f87f0d 100644
--- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
+++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
@@ -635,32 +635,14 @@ public class LocalOfficeConnection
mPipe = pipe;
}
- /* replaces each substring aSearch in aString by aReplace.
-
- StringBuffer.replaceAll() is not available in Java 1.3.x.
- */
- private static String replaceAll(String aString, String aSearch, String aReplace )
- {
- StringBuffer aBuffer = new StringBuffer(aString);
-
- int nPos = aString.length();
- int nOfs = aSearch.length();
-
- while ( ( nPos = aString.lastIndexOf( aSearch, nPos - 1 ) ) > -1 )
- aBuffer.replace( nPos, nPos+nOfs, aReplace );
-
- return aBuffer.toString();
- }
-
-
/** creates a unique pipe name.
*/
static String getPipeName()
{
// turn user name into a URL and file system safe name (% chars will not work)
String aPipeName = System.getProperty("user.name") + OFFICE_ID_SUFFIX;
- aPipeName = replaceAll( aPipeName, "_", "%B7" );
- return replaceAll( replaceAll( java.net.URLEncoder.encode(aPipeName), "+", "%20" ), "%", "_" );
+ aPipeName = aPipeName.replace( "_", "%B7" );
+ return java.net.URLEncoder.encode(aPipeName).replace( "+", "%20" ).replace( "%", "_" );
}
/**
diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java
index 4f76c5c..e997fa4 100644
--- a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java
+++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java
@@ -502,25 +502,6 @@ public class java_remote_bridge
if (Thread.currentThread() != _messageDispatcher
&& _messageDispatcher.isAlive())
{
- // This is a workaround for a Linux Sun JDK1.3 problem: The
- // message dispatcher stays in the socket read method, even if
- // the socket has been closed. Suspending and resuming the
- // message dispatcher lets it notice the closed socket. Only
- // use this workaround for Linux JRE 1.3.0 and 1.3.1 from Sun
- // and Blackdown. This workaround is dangerouse and may
- // hardlock the VM.
- if (System.getProperty("os.name", "").toLowerCase().equals(
- "linux")
- && System.getProperty("java.version", "").startsWith("1.3.")
- && (System.getProperty("java.vendor", "").toLowerCase().
- indexOf("sun") != -1
- || System.getProperty("java.vendor", "").toLowerCase().
- indexOf("blackdown") != -1))
- {
- _messageDispatcher.suspend();
- _messageDispatcher.resume();
- }
-
_messageDispatcher.join(1000);
if (_messageDispatcher.isAlive()) {
_messageDispatcher.interrupt();
diff --git a/qadevOOo/runner/convwatch/FilenameHelper.java b/qadevOOo/runner/convwatch/FilenameHelper.java
index 30fe193..c9d47af 100644
--- a/qadevOOo/runner/convwatch/FilenameHelper.java
+++ b/qadevOOo/runner/convwatch/FilenameHelper.java
@@ -78,7 +78,7 @@ abstract class FilenameHelper_impl implements Filenamer
{
_sFilename = FileHelper.getSystemPathFromFileURL(_sFilename);
}
- _sFilename = utils.replaceAll13(_sFilename, "\\\\", "/");
+ _sFilename = _sFilename.replace("\\\\", "/");
String sPath = checkPath(FileHelper.getPath(_sFilename));
String sFilenameWithSuffix = checkFilename(FileHelper.getBasename(_sFilename));
@@ -95,7 +95,7 @@ abstract class FilenameHelper_impl implements Filenamer
public FilenameHelper_impl(String _sPath, String _sName, String _sSuffix)
{
initMember();
- _sPath = utils.replaceAll13(_sPath, "\\\\", "/");
+ _sPath = _sPath.replace("\\\\", "/");
String sPath = checkPath(_sPath);
String sFilename = checkFilename(_sName);
@@ -123,7 +123,7 @@ abstract class FilenameHelper_impl implements Filenamer
public String getAbsoluteSystemFilename()
{
String sSystemFilename = createAbsoluteFilename();
- sSystemFilename = utils.replaceAll13(sSystemFilename, "/", fs);
+ sSystemFilename = sSystemFilename.replace("/", fs);
return sSystemFilename;
}
@@ -168,7 +168,7 @@ abstract class FilenameHelper_impl implements Filenamer
public String getSystemPath()
{
String sSystemPath = m_sPath;
- sSystemPath = utils.replaceAll13(sSystemPath, "/", fs);
+ sSystemPath = sSystemPath.replace("/", fs);
return sSystemPath;
}
/**
diff --git a/qadevOOo/runner/convwatch/PRNCompare.java b/qadevOOo/runner/convwatch/PRNCompare.java
index 58f5de5..ebf18a7 100644
--- a/qadevOOo/runner/convwatch/PRNCompare.java
+++ b/qadevOOo/runner/convwatch/PRNCompare.java
@@ -257,7 +257,7 @@ public class PRNCompare
ArrayList<String> m_aFileList = new ArrayList<String>();
for (int i=1;i<9999;i++)
{
- String sNewJPEGFilename = utils.replaceAll13(sJPGFilename, sGS_PageOutput, StringHelper.createValueString(i, 4));
+ String sNewJPEGFilename = sJPGFilename.replace(sGS_PageOutput, StringHelper.createValueString(i, 4));
if (FileHelper.exists(sNewJPEGFilename))
{
m_aFileList.add(sNewJPEGFilename); // as long as the files exist, fill the array
diff --git a/qadevOOo/runner/graphical/JPEGComparator.java b/qadevOOo/runner/graphical/JPEGComparator.java
index d7a2bc3..a3a8869 100644
--- a/qadevOOo/runner/graphical/JPEGComparator.java
+++ b/qadevOOo/runner/graphical/JPEGComparator.java
@@ -344,7 +344,7 @@ public class JPEGComparator extends EnhancedComplexTestCase
}
else
{
- String sResultFilenamePDF = util.utils.replaceAll13(sResultFilename, ".ps_", ".pdf_");
+ String sResultFilenamePDF = sResultFilename.replace(".ps_", ".pdf_");
File aResultPDFFile = new File(sResultFilenamePDF);
if (aResultPDFFile.exists())
{
diff --git a/qadevOOo/runner/graphical/JPEGCreator.java b/qadevOOo/runner/graphical/JPEGCreator.java
index cb3ee7f..6a53bca 100644
--- a/qadevOOo/runner/graphical/JPEGCreator.java
+++ b/qadevOOo/runner/graphical/JPEGCreator.java
@@ -131,7 +131,7 @@ public static void convertToNearSameFileWithWidth340(String _sJPEGFilename)
}
String sJPEGFilename = _sJPEGFilename.replaceAll("\\\\", "/");
String sNewJPEGFilename;
- sNewJPEGFilename = util.utils.replaceAll13(sJPEGFilename, ".jpg", "_w340.jpg");
+ sNewJPEGFilename = sJPEGFilename.replace(".jpg", "_w340.jpg");
convertToWidth340(sJPEGFilename, sNewJPEGFilename);
}
@@ -333,7 +333,7 @@ private static void convertToWidth340(String _sFrom, String _To)
{
return "";
}
- final String sFilename = util.utils.replaceAll13(_sJPEGSchema, m_sGS_PageOutput, StringHelper.createValueString(_nPage, 4));
+ final String sFilename = _sJPEGSchema.replace(m_sGS_PageOutput, StringHelper.createValueString(_nPage, 4));
return sFilename;
}
diff --git a/qadevOOo/runner/helper/ClParser.java b/qadevOOo/runner/helper/ClParser.java
index 4ac7e87..0d3c7e6 100644
--- a/qadevOOo/runner/helper/ClParser.java
+++ b/qadevOOo/runner/helper/ClParser.java
@@ -76,7 +76,7 @@ public class ClParser
pValue = pValue + " " + args[i].trim();
}
- pValue = utils.replaceAll13(pValue, "'", "");
+ pValue = pValue.replace("'", "");
i++;
}
else
diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java
index e04f1da..3f45e02 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -667,7 +667,7 @@ public class OfficeProvider implements AppProvider
sysDir = dir.substring("file://".length());
}
- sysDir = utils.replaceAll13(sysDir, "%20", " ");
+ sysDir = sysDir.replace("%20", " ");
// append '/' if not there (e.g. linux)
if (sysDir.charAt(sysDir.length() - 1) != '/')
diff --git a/qadevOOo/runner/util/UITools.java b/qadevOOo/runner/util/UITools.java
index 49a29e4..84d7238 100644
--- a/qadevOOo/runner/util/UITools.java
+++ b/qadevOOo/runner/util/UITools.java
@@ -500,9 +500,9 @@ public class UITools {
currencyVal = currencyVal.substring(0, currencyVal.length()-3) +
"#" + currencyVal.substring(currencyVal.length()-2);
- currencyVal = utils.replaceAll13(currencyVal, ",", "");
- currencyVal = utils.replaceAll13(currencyVal, "\\.", "");
- currencyVal = utils.replaceAll13(currencyVal, "#", ".");
+ currencyVal = currencyVal.replace(",", "");
+ currencyVal = currencyVal.replace("\\.", "");
+ currencyVal = currencyVal.replace("#", ".");
return currencyVal;
} catch (Exception e) {
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 75b808d..bfc8afe 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -629,15 +629,6 @@ public class utils {
}
/**
- *
- * This method replaces a substring with another
- *
- */
- public static String replacePart(String all, String toReplace, String replacement) {
- return replaceAll13(all, toReplace, replacement);
- }
-
- /**
* Scan localhost for the next free port-number from a starting port
* on. If the starting port is smaller than 1024, port number starts with
* 10000 as default, because numbers < 1024 are never free on unix machines.
@@ -767,8 +758,8 @@ public class utils {
*/
public static String validateAppExecutionCommand(String appExecCommand, String os) {
String errorMessage = "OK";
- appExecCommand = replaceAll13(appExecCommand, "\"", "");
- appExecCommand = replaceAll13(appExecCommand, "'", "");
+ appExecCommand = appExecCommand.replace("\"", "");
+ appExecCommand = appExecCommand.replace("'", "");
StringTokenizer commandTokens = new StringTokenizer(appExecCommand, " \t");
String officeExecutable = "";
String officeExecCommand = "soffice";
@@ -862,27 +853,6 @@ public class utils {
}
/**
- * String.replaceAll() is available since Java 1.4 but the runner must be buldabale with Java 1.3
- * @param originalString
- * @param searchString
- * @param replaceString
- * @return modified string
- */
- public static String replaceAll13(String originalString, String searchString, String replaceString) {
-
- StringBuffer changeStringBuffer = new StringBuffer(originalString);
- int searchLength = searchString.length();
- int replaceLength = replaceString.length();
- int index = originalString.indexOf(searchString);
- while (index != -1) {
- changeStringBuffer = changeStringBuffer.replace(index, index + searchLength, replaceString);
- originalString = changeStringBuffer.toString();
- index = originalString.indexOf(searchString, index + replaceLength);
- }
- return originalString;
- }
-
- /**
* expand macrofied strings like <CODE>${$ORIGIN/bootstrap.ini:UserInstallation}</CODE> or
* <CODE>$_OS</CODE>
* @param xMSF the MultiServiceFactory
commit d352735a7f2f74d3524adaa2f4d8cff61f60c5c6
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 4 13:35:47 2014 +0200
java: remove some unused fields in the ODK examples
Change-Id: Ic6b4f18aefba6603af51d17d061e3f821e95261f
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java
index e0953d1..f6e063f 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java
@@ -67,7 +67,6 @@ public class BasicBound {
public static BasicBound getBound(double[] data) {
BasicBound bound = new BasicBound();
if(data!=null) {
- double minV, maxV;
if(data.length>0) {
bound.minValue = data[0];
bound.maxValue = data[0];
@@ -91,4 +90,4 @@ public class BasicBound {
public double getRandomValue(){
return RandomGenerator.doubleRangeRandom(minValue, maxValue);
}
-}
\ No newline at end of file
+}
More information about the Libreoffice-commits
mailing list