[Libreoffice-commits] core.git: javaunohelper/com

2020-03-10 Thread Andrea Gelmini (via logerrit)
 javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d3bd47f3d07d168cf3983745bc5ff2535cf96d6c
Author: Andrea Gelmini 
AuthorDate: Tue Mar 10 17:08:47 2020 +0100
Commit: Julien Nabet 
CommitDate: Tue Mar 10 20:43:18 2020 +0100

Fix typo

Change-Id: I81f5b545641e21a602f3858815c5a3b9ca0c8e8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90287
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java 
b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
index de7343643c54..67a4f0c98062 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
@@ -953,7 +953,7 @@ XMultiPropertySet
 while (it.hasNext())
 {
 XPropertiesChangeListener listener = 
(XPropertiesChangeListener) it.next();
-// fire the hole event sequence to the 
XPropertiesChangeListener's
+// fire the whole event sequence to the 
XPropertiesChangeListener's
 listener.propertiesChange( arEvts );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2019-07-03 Thread Julien Nabet (via logerrit)
 javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java |   
 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 4ded63a1aaf3a8ca7916e822a8e7eb342d21929d
Author: Julien Nabet 
AuthorDate: Wed Jul 3 22:13:59 2019 +0200
Commit: Julien Nabet 
CommitDate: Wed Jul 3 23:18:05 2019 +0200

cid#1448341: perf inefficient map iterator

Change-Id: I5b5ba2b6ed370765e38b51a23175c73dc0e2c8f8
Reviewed-on: https://gerrit.libreoffice.org/75061
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git 
a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java 
b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java
index 803c02e8340c..9b061f81c217 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java
@@ -80,10 +80,9 @@ public class MultiTypeInterfaceContainer
 synchronized public InterfaceContainer getContainer(Object key)
 {
 InterfaceContainer retVal= null;
-Iterator it= map.keySet().iterator();
-while (it.hasNext())
+for (Map.Entry entry : map.entrySet())
 {
-Object obj= it.next();
+Object obj= entry.getKey();
 if (obj == null && key == null)
 {
 retVal= map.get(null);
@@ -91,7 +90,7 @@ public class MultiTypeInterfaceContainer
 }
 else if( obj != null && obj.equals(key))
 {
-retVal= map.get(obj);
+retVal= entry.getValue();
 break;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: javaunohelper/com

2019-07-03 Thread Julien Nabet (via logerrit)
 javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java |   
 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 880b0b534cf5780dfe236def0847ded88da84019
Author: Julien Nabet 
AuthorDate: Wed Jul 3 22:09:29 2019 +0200
Commit: Julien Nabet 
CommitDate: Wed Jul 3 23:08:14 2019 +0200

cid#1448214: perf inefficient map iterator

Change-Id: Ia145b46400acf2b7a35bedf689fc7fe74758a2f3
Reviewed-on: https://gerrit.libreoffice.org/75060
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git 
a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java 
b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java
index a255721046e5..803c02e8340c 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java
@@ -41,15 +41,14 @@ public class MultiTypeInterfaceContainer
 if ( (size=map.size()) > 0)
 {
 Type [] arTypes= new Type[size];
-Iterator it= map.keySet().iterator();
 
 int countTypes= 0;
-while (it.hasNext())
+for (Map.Entry entry : map.entrySet())
 {
-Object key= it.next();
-InterfaceContainer cont= map.get(key);
+InterfaceContainer cont= entry.getValue();
 if (cont != null && cont.size() > 0)
 {
+Object key = entry.getKey();
 if (key == null)
 arTypes[countTypes++]= new Type();
 else if (key instanceof Type)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: javaunohelper/com

2018-10-10 Thread Libreoffice Gerrit user
 javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java |   48 
+-
 1 file changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 07721a4dea1aab898a993662a24c5ab68ecc1edf
Author: Stephan Bergmann 
AuthorDate: Wed Oct 10 14:19:53 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Oct 10 17:26:26 2018 +0200

HTML tt -> code in JavaDoc comments

...to avoid "error: tag not supported in the generated HTML version: tt" 
with
JDK 11

Change-Id: I761c987257f42d01f24c88440495698cac6226d2
Reviewed-on: https://gerrit.libreoffice.org/61614
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java 
b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
index cd751c5af7ef..b0419771870e 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
@@ -127,9 +127,9 @@ public class InterfaceContainer implements Cloneable
 }
 
 /**
- * Trims the capacity of this ArrayList instance to be the
+ * Trims the capacity of this ArrayList instance to be the
  * list's current size.  An application can use this operation to minimize
- * the storage of an ArrayList instance.
+ * the storage of an ArrayList instance.
  */
 synchronized public void trimToSize()
 {
@@ -143,7 +143,7 @@ public class InterfaceContainer implements Cloneable
 }
 
 /**
- * Increases the capacity of this ArrayList instance, if
+ * Increases the capacity of this ArrayList instance, if
  * necessary, to ensure  that it can hold at least the number of elements
  * specified by the minimum capacity argument.
  *
@@ -167,7 +167,7 @@ public class InterfaceContainer implements Cloneable
  * Appends the specified element to the end of this list.
  *
  * @param o element to be appended to this list.
- * @return true (as per the general contract of Collection.add).
+ * @return true (as per the general contract of 
Collection.add).
  */
 synchronized public boolean add(Object o)
 {
@@ -189,7 +189,7 @@ public class InterfaceContainer implements Cloneable
  * @param index index at which the specified element is to be inserted.
  * @param element element to be inserted.
  * @throwsIndexOutOfBoundsException if index is out of range
- *(index  0 || index  size()).
+ *(index  0 || index  size()).
  */
 synchronized public void add(int index, Object element)
 {
@@ -218,8 +218,8 @@ public class InterfaceContainer implements Cloneable
  * list is nonempty.)
  *
  * @param c the elements to be inserted into this list.
- * @throwsIndexOutOfBoundsException if index out of range (index
- * 0 || index  size()).
+ * @throwsIndexOutOfBoundsException if index out of range (index
+ * 0 || index  size()).
  * @return true if an element was inserted.
  */
 synchronized public boolean addAll(Collection c)
@@ -247,8 +247,8 @@ public class InterfaceContainer implements Cloneable
  * @param index index at which to insert first element
  *  from the specified collection.
  * @param c elements to be inserted into this list.
- * @throwsIndexOutOfBoundsException if index out of range (index
- * 0 || index  size()).
+ * @throwsIndexOutOfBoundsException if index out of range (index
+ * 0 || index  size()).
  * @return true if an element was inserted.
  */
 synchronized public boolean addAll(int index, Collection c)
@@ -304,10 +304,10 @@ public class InterfaceContainer implements Cloneable
 }
 }
 /**
- * Returns true if this list contains the specified element.
+ * Returns true if this list contains the specified element.
  *
  * @param elem element whose presence in this List is to be tested.
- * @return true if this list contains the specified element.
+ * @return true if this list contains the specified element.
  */
 synchronized public boolean contains(Object elem)
 {
@@ -337,8 +337,8 @@ public class InterfaceContainer implements Cloneable
  *
  * @param  index index of element to return.
  * @return the element at the specified position in this list.
- * @throwsIndexOutOfBoundsException if index is out of range (index
- * 0 || index = size()).
+ * @throwsIndexOutOfBoundsException if index is out of range 
(index
+ * 0 || index = size()).
  */
 synchronized public Object get(int index)
 {
@@ -352,11 +352,11 @@ public class InterfaceContainer implements Cloneable
 
 /**
  * Searches for the first occurrence of the given argument, testing
- * for equality using the equals method.
+ * for equality using the equals method.
  *
  * 

[Libreoffice-commits] core.git: javaunohelper/com sysui/desktop

2018-08-26 Thread Libreoffice Gerrit user
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java |2 +-
 sysui/desktop/share/create_tree.sh|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e9fa088735bfbd34bc81f1925438691f746db070
Author: Caolán McNamara 
AuthorDate: Sun Aug 26 17:29:24 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Aug 26 20:52:43 2018 +0200

boostrap->bootstrap

Change-Id: I3082130a39a55609fa38fbf9a667fb95fe6d60ea
Reviewed-on: https://gerrit.libreoffice.org/59612
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java 
b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index a2d43bcfdaa1..edf21d7d2adf 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -175,7 +175,7 @@ public class Bootstrap {
  * See also UNOIDL com.sun.star.lang.ServiceManager.
  *
  * @throws Exception if things go awry.
- * @return a freshly boostrapped service manager
+ * @return a freshly bootstrapped service manager
  */
 public static XMultiServiceFactory createSimpleServiceManager() throws 
Exception
 {
diff --git a/sysui/desktop/share/create_tree.sh 
b/sysui/desktop/share/create_tree.sh
index 6812d97d9de0..9fc2b998c86f 100755
--- a/sysui/desktop/share/create_tree.sh
+++ b/sysui/desktop/share/create_tree.sh
@@ -57,7 +57,7 @@ mkdir -p "${DESTDIR}/${BINDIR}"
 test -n "${OFFICE_PREFIX}" && office_prefix="${OFFICE_PREFIX}" || 
office_prefix=/opt
 office_root=${office_prefix}/${PREFIX}
 
-#this symlink is needed to have the API boostrap functions running right
+#this symlink is needed to have the API bootstrap functions running right
 ln -sf "${office_root}/program/soffice" "${DESTDIR}/${BINDIR}/${PREFIX}"
 
 if test "${PREFIX}" != libreoffice${PRODUCTVERSION} -a "${PREFIX}" != 
libreofficedev${PRODUCTVERSION}  ; then
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2017-09-13 Thread Damjan Jovanovic
 javaunohelper/com/sun/star/lib/uno/helper/ComponentBase.java |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 1963dc64554a8b64c229ddd72bc615f3e736731a
Author: Damjan Jovanovic 
Date:   Fri Sep 8 02:17:19 2017 +

Fix a locking bug in our Java ComponentBase class, where after the 
transition

to disposed, the relevant variables (bDisposed and bInDispose) are written 
to
outside a synchronized block.

The equivalent C++ implementation in main/cppuhelper/source/implbase.cxx,
method WeakComponentImplHelperBase::dispose(), already does this.

Patch by: me

(cherry picked from commit 2d382cef5450cf1593322184649257d3666cbbd8)

Change-Id: I6c3e2ef78bc3c945245fe9fb7b6b713eb83710be
Reviewed-on: https://gerrit.libreoffice.org/42189
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/ComponentBase.java 
b/javaunohelper/com/sun/star/lib/uno/helper/ComponentBase.java
index 783c1d0cfcc2..d886ef7020d5 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/ComponentBase.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/ComponentBase.java
@@ -87,8 +87,11 @@ public class ComponentBase extends WeakBase implements 
XComponent
 {
 // finally makes sure that the  flags are set even if a 
RuntimeException is thrown.
 // That ensures that this function is only called once.
-bDisposed= true;
-bInDispose= false;
+synchronized (this)
+{
+bDisposed= true;
+bInDispose= false;
+}
 }
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com jurt/com l10ntools/source sw/source

2017-06-23 Thread Andrea Gelmini
 javaunohelper/com/sun/star/comp/helper/ComponentContext.java |2 +-
 jurt/com/sun/star/comp/loader/JavaLoader.java|2 +-
 jurt/com/sun/star/comp/servicemanager/ServiceManager.java|   10 +-
 l10ntools/source/gL10nMem.cxx|2 +-
 sw/source/core/layout/tabfrm.cxx |2 +-
 sw/source/filter/ww8/ww8par3.cxx |2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit a3a40ba2a6d7c8b32234b223831a0269b06a240c
Author: Andrea Gelmini 
Date:   Fri Jun 23 11:03:20 2017 +0200

Fix typos: uniform registered

We have in the same files "registered" and "registred".

Change-Id: I604a8fdb7d5c40fe208fc11e9120333b3eaef3da
Reviewed-on: https://gerrit.libreoffice.org/39097
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java 
b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
index b280f80cbeaf..34649d563395 100644
--- a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
+++ b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
@@ -291,7 +291,7 @@ public class ComponentContext implements XComponentContext, 
XComponent
 if (xListener == null)
 throw new com.sun.star.uno.RuntimeException( "Listener must not be 
null" );
   if (m_eventListener.contains( xListener ))
-  throw new com.sun.star.uno.RuntimeException( "Listener already 
registred." );
+  throw new com.sun.star.uno.RuntimeException( "Listener already 
registered." );
 
m_eventListener.add( xListener );
 }
diff --git a/jurt/com/sun/star/comp/loader/JavaLoader.java 
b/jurt/com/sun/star/comp/loader/JavaLoader.java
index 6c5b4cc97023..8bc0ae228593 100644
--- a/jurt/com/sun/star/comp/loader/JavaLoader.java
+++ b/jurt/com/sun/star/comp/loader/JavaLoader.java
@@ -356,7 +356,7 @@ public class JavaLoader implements XImplementationLoader,
  * the call is delegated to that method. Otherwise a default registration
  * will be accomplished.
  *
- * @param   regKey  the root key under that the 
component should be registred.
+ * @param   regKey  the root key under that the 
component should be registered.
  * @param   implementationLoaderUrl specifies the loader, the 
component is loaded by.
  * @param   locationUrl points to an archive (JAR file) 
which contains a component.
  * @return  true if registration is successfully - otherwise false.
diff --git a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java 
b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
index 3d06da79b62b..a8b6ab31b64a 100644
--- a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
+++ b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
@@ -309,7 +309,7 @@ public class ServiceManager implements XMultiServiceFactory,
  * The listener is notified when a service is added (removed) to (from)
  * the ServiceManager.
  *
- * If the listener is already registred a
+ * If the listener is already registered a
  * com.sun.star.uno.RuntimeException will be thrown.
  *
  * @param   xListener   the new listener which should been added.
@@ -322,7 +322,7 @@ public class ServiceManager implements XMultiServiceFactory,
 throw new com.sun.star.uno.RuntimeException("Listener must not be 
null");
 
   if ( eventListener.contains(xListener) )
-  throw new com.sun.star.uno.RuntimeException("Listener already 
registred.");
+  throw new com.sun.star.uno.RuntimeException("Listener already 
registered.");
 
eventListener.add(xListener);
 }
@@ -355,7 +355,7 @@ public class ServiceManager implements XMultiServiceFactory,
  * interface.
  *
  * @param   object object which provides a XServiceInfo 
interface.
- * @return  true if the component is registred otherwise false.
+ * @return  true if the component is registered otherwise false.
  *
  * @see com.sun.star.container.XSet
  * @see com.sun.star.lang.XServiceInfo
@@ -395,7 +395,7 @@ public class ServiceManager implements XMultiServiceFactory,
 
 if ( factoriesByImplNames.containsKey( 
xServiceInfo.getImplementationName() ) ) {
 throw new com.sun.star.container.ElementExistException(
-xServiceInfo.getImplementationName() + " already registred"
+xServiceInfo.getImplementationName() + " already registered"
 );
 }
 
@@ -508,7 +508,7 @@ public class ServiceManager implements XMultiServiceFactory,
 /**
  * Checks if the any components are registered.
  *
- * @return  true - if the list of the registred components is not empty - 
otherwise 

[Libreoffice-commits] core.git: javaunohelper/com odk/examples offapi/com qadevOOo/tests

2017-06-12 Thread Johnny_M
 javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java  |2 +-
 odk/examples/DevelopersGuide/GUI/UnoDialogSample.java  |3 +--
 offapi/com/sun/star/chart2/DataSeries.idl  |2 +-
 qadevOOo/tests/java/ifc/lang/_XServiceInfo.java|2 +-
 qadevOOo/tests/java/ifc/sheet/_SheetCellRange.java |2 +-
 qadevOOo/tests/java/ifc/sheet/_XSpreadsheet.java   |2 +-
 qadevOOo/tests/java/ifc/style/_CharacterProperties.java|2 +-
 qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java |2 +-
 8 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 5312da481ea8e25f06a7a0b725001b40069af081
Author: Johnny_M 
Date:   Fri Jun 9 21:12:37 2017 +0200

Translate German comments and debug strings (leftovers in dirs j... to q...)

Translates all (leftovers) found using a custom regex, in directories not
shown by /bin/find-german-comments and beginning with "j" to "q".

Additionally:
- A few spelling fixes

Change-Id: I5abf71dde3efc0dbaad162c705c6dc17af50f6c1
Reviewed-on: https://gerrit.libreoffice.org/38613
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java 
b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
index dcc58d2669b6..cd751c5af7ef 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
@@ -703,7 +703,7 @@ public class InterfaceContainer implements Cloneable
 synchronized (this)
 {
 aIt= iterator();
-// Container freigeben, falls im disposing neue Eintraege kommen
+// Release containers if new entries occur in disposing;
 // set the member to null, the iterator delete the values
 clear();
 elementData= null;
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java 
b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
index b50e874b88d9..f8363ab54576 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
@@ -95,8 +95,7 @@ import com.sun.star.util.Time;
 import com.sun.star.util.thePathSettings;
 
 
-// Anregung von DV:
-// Position und Weite als Parameter uebergeben
+// hand the position and width over as parameters
 
 public class UnoDialogSample implements XTextListener, XSpinListener, 
XActionListener, XFocusListener, XMouseListener, XItemListener, 
XAdjustmentListener, XKeyListener {
 protected XComponentContext m_xContext = null;
diff --git a/offapi/com/sun/star/chart2/DataSeries.idl 
b/offapi/com/sun/star/chart2/DataSeries.idl
index 922ba446b027..0d43ee6adf56 100644
--- a/offapi/com/sun/star/chart2/DataSeries.idl
+++ b/offapi/com/sun/star/chart2/DataSeries.idl
@@ -40,7 +40,7 @@ module chart2
 
 // NOTES
 
-// kombinierbarkeit - data series combiner (andere Komponente?)
+// ability to be combined - data series combiner (another component?)
 // coordinatesystem-supplier
 // chart-type ? property string rendererServiceName
 
diff --git a/qadevOOo/tests/java/ifc/lang/_XServiceInfo.java 
b/qadevOOo/tests/java/ifc/lang/_XServiceInfo.java
index 220475c3166f..d08ff31a6dc3 100644
--- a/qadevOOo/tests/java/ifc/lang/_XServiceInfo.java
+++ b/qadevOOo/tests/java/ifc/lang/_XServiceInfo.java
@@ -45,7 +45,7 @@ public class _XServiceInfo extends MultiMethodTest {
 boolean result = true;
 log.println("testing getImplementationName() ... ");
 
-log.println("The ImplementationName ist 
"+oObj.getImplementationName());
+log.println("The ImplementationName is "+oObj.getImplementationName());
 result=true;
 
 tRes.tested("getImplementationName()", result);
diff --git a/qadevOOo/tests/java/ifc/sheet/_SheetCellRange.java 
b/qadevOOo/tests/java/ifc/sheet/_SheetCellRange.java
index bd6111dc2bff..84f4b9d44664 100644
--- a/qadevOOo/tests/java/ifc/sheet/_SheetCellRange.java
+++ b/qadevOOo/tests/java/ifc/sheet/_SheetCellRange.java
@@ -31,5 +31,5 @@ import lib.MultiPropertyTest;
 * @see com.sun.star.sheet.SheetCellRange
 */
 public class _SheetCellRange extends MultiPropertyTest {
-} // finisch class _SheetCellRange
+} // finish class _SheetCellRange
 
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSpreadsheet.java 
b/qadevOOo/tests/java/ifc/sheet/_XSpreadsheet.java
index 1ee921879062..bbee1ec6432a 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XSpreadsheet.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XSpreadsheet.java
@@ -75,6 +75,6 @@ public class _XSpreadsheet extends MultiMethodTest {
 tRes.tested("createCursorByRange()", oCursor != null);
 }
 
-} // finisch class _XSpreadsheet
+} // finish class _XSpreadsheet
 
 
diff --git 

[Libreoffice-commits] core.git: javaunohelper/com javaunohelper/test jurt/com l10ntools/inc l10ntools/source libreofficekit/README libreofficekit/source lingucomponent/source linguistic/source linguis

2017-03-25 Thread Andrea Gelmini
 javaunohelper/com/sun/star/comp/helper/ComponentContext.java|  
  2 +-
 javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java |  
  4 ++--
 jurt/com/sun/star/comp/loader/JavaLoader.java   |  
  4 ++--
 l10ntools/inc/common.hxx|  
  2 +-
 l10ntools/source/export.cxx |  
  2 +-
 l10ntools/source/xmlparse.cxx   |  
  2 +-
 libreofficekit/README   |  
  2 +-
 libreofficekit/source/gtk/tilebuffer.hxx|  
  2 +-
 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx   |  
  2 +-
 linguistic/source/lngsvcmgr.cxx |  
  2 +-
 linguistic/workben/sspellimp.cxx|  
  2 +-
 lotuswordpro/source/filter/lwpfribmark.cxx  |  
  2 +-
 lotuswordpro/source/filter/lwpoleobject.cxx |  
  2 +-
 lotuswordpro/source/filter/lwpsilverbullet.cxx  |  
  2 +-
 lotuswordpro/source/filter/lwptoc.cxx   |  
  2 +-
 lotuswordpro/source/filter/xfilter/xfbgimage.hxx|  
  2 +-
 lotuswordpro/source/filter/xfilter/xffont.hxx   |  
  2 +-
 lotuswordpro/source/filter/xfilter/xfpoint.hxx  |  
  2 +-
 mysqlc/README   |  
  2 +-
 19 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 98ef3edb8a5d1a13963101d41abb2a8dd8a806dd
Author: Andrea Gelmini 
Date:   Fri Mar 24 11:45:16 2017 +0100

Fix typos

Change-Id: Id5811d092917c872715559f4508d01e4173d090c
Reviewed-on: https://gerrit.libreoffice.org/35636
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java 
b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
index 67579f95bae8..b280f80cbeaf 100644
--- a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
+++ b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
@@ -236,7 +236,7 @@ public class ComponentContext implements XComponentContext, 
XComponent
 m_eventListener.clear();
 
 XComponent tdmgr = null;
-// dispose values, then service manager, then typdescription manager
+// dispose values, then service manager, then typedescription manager
 for (Map.Entry entry : m_table.entrySet())
 {
 String name = entry.getKey();
diff --git 
a/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java 
b/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java
index d9488114d420..a406b84d457e 100644
--- 
a/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java
+++ 
b/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java
@@ -461,7 +461,7 @@ public class InterfaceContainer_Test
 
 @Test public void ListIterator_next() throws Exception
 {
-logger.log(Level.INFO, "Testing InterfaceContainer.listIerator, 
ListIterator.next()");
+logger.log(Level.INFO, "Testing InterfaceContainer.listIterator, 
ListIterator.next()");
 InterfaceContainer cont= new InterfaceContainer();
 
 cont.addAll(list1);
@@ -658,4 +658,4 @@ public class InterfaceContainer_Test
 assertEquals(obj2.nDisposingCalled, 1);
 assertEquals(obj3.nDisposingCalled, 1);
 }
-}
\ No newline at end of file
+}
diff --git a/jurt/com/sun/star/comp/loader/JavaLoader.java 
b/jurt/com/sun/star/comp/loader/JavaLoader.java
index 6ab67b960ddd..6c5b4cc97023 100644
--- a/jurt/com/sun/star/comp/loader/JavaLoader.java
+++ b/jurt/com/sun/star/comp/loader/JavaLoader.java
@@ -160,7 +160,7 @@ public class JavaLoader implements XImplementationLoader,
  * new com.sun.star.lang.XMultiServiceFactory should be set at
  * the loader.
  *
- * @param   args - the first parameter (args[0]) specifices the 
ServiceManager.
+ * @param   args - the first parameter (args[0]) specifies the 
ServiceManager.
  * @see com.sun.star.lang.XInitialization
  * @see com.sun.star.comp.servicemanager.ServiceManager
  */
@@ -415,7 +415,7 @@ public class JavaLoader implements XImplementationLoader,
  * Registers the JavaLoader at the registry.
  *
  * @param  regKey   root key under which the JavaLoader 
should be registered.
- * @return true if registration succseeded - otherwise false.
+ * @return true if registration succeeded - otherwise false.
  */
 public static boolean 

[Libreoffice-commits] core.git: javaunohelper/com

2016-02-08 Thread Stephan Bergmann
 javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java |   23 
+-
 1 file changed, 13 insertions(+), 10 deletions(-)

New commits:
commit 2d5f3dcf8dca6f0eb73e7435f333fba148bf9d49
Author: Stephan Bergmann 
Date:   Mon Feb 8 14:36:20 2016 +0100

cid#1326918 FB.NP_CLONE_COULD_RETURN_NULL

Change-Id: I875cc2fc868fb4f1f45e90320e1fdaf70fe871d8

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java 
b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
index e0fa145..6da92d6 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
@@ -121,6 +121,11 @@ public class InterfaceContainer implements Cloneable
 this.elementData = new Object[initialCapacity];
 }
 
+private InterfaceContainer(Object[] data) {
+elementData = data;
+size = elementData == null ? 0 : elementData.length;
+}
+
 /**
  * Trims the capacity of this ArrayList instance to be the
  * list's current size.  An application can use this operation to minimize
@@ -448,16 +453,14 @@ public class InterfaceContainer implements Cloneable
 @Override
 synchronized public Object clone()
 {
-Object ret= null;
-if (elementData != null)
-{
-InterfaceContainer cont= new InterfaceContainer();
-cont.elementData = new Object[size];
-cont.size= size;
-System.arraycopy(elementData, 0, cont.elementData, 0, size);
-ret= cont;
-}
-return ret;
+Object[] data;
+if (elementData == null) {
+data = null;
+} else {
+data = new Object[size];
+System.arraycopy(elementData, 0, data, 0, size);
+}
+return new InterfaceContainer(data);
 }
 synchronized public ListIterator listIterator()
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2015-12-21 Thread Stephan Bergmann
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e0fd10bc42f335d6303b035c50a56cac336b907a
Author: Stephan Bergmann 
Date:   Mon Dec 21 17:52:32 2015 +0100

cid#1343654 FindBugs: Bad practice (FB.DMI_RANDOM_USED_ONLY_ONCE)

Change-Id: Ifbc362835bc62578851a029e9c5ce8c20184846a

diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java 
b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index d571114..263398f 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -314,7 +314,7 @@ public class Bootstrap {
 
 // create random pipe name
 String sPipeName = "uno" +
-Long.toString( (new Random()).nextLong() & 0x7fffL 
);
+Long.toString(randomPipeName.nextLong() & 0x7fffL);
 
 // create call with arguments
 String[] cmdArray = new String[ argArray.length + 2 ];
@@ -372,6 +372,8 @@ public class Bootstrap {
 return xContext;
 }
 
+private static final Random randomPipeName = new Random();
+
 private static void pipe(
 final InputStream in, final PrintStream out, final String prefix ) {
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2015-12-21 Thread Thorsten Behrens
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 77a202cbbf3735a6007ceb09f96f5e9258ef6df2
Author: Thorsten Behrens 
Date:   Mon Dec 21 18:26:14 2015 +0100

related tdf#86784: new API got backported to 5.1

Change-Id: Id195e487a029424e490008915f0df513a32b22b0

diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java 
b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 263398f..2f9b0d4 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -106,7 +106,7 @@ public class Bootstrap {
  *
  * @return an array of default commandline options
  * @see #bootstrap( String[] )
- * @since LibreOffice 5.2
+ * @since LibreOffice 5.1
  */
 public static final String[] getDefaultOptions()
 {
@@ -289,7 +289,7 @@ public class Bootstrap {
  * @see #getDefaultOptions()
  * @return a bootstrapped component context.
  *
- * @since LibreOffice 5.2
+ * @since LibreOffice 5.1
  */
 public static final XComponentContext bootstrap( String[] argArray )
 throws BootstrapException {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2015-12-20 Thread Stephan Bergmann
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0c2bd5d42fec17767f3e1ab6fb485e6e64aeea98
Author: Stephan Bergmann 
Date:   Sun Dec 20 11:04:42 2015 +0100

Fix @since tags

Change-Id: I0ef45caae00ba056fd5feffb1b393b024775db5e

diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java 
b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 0b99cce..d571114 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -106,7 +106,7 @@ public class Bootstrap {
  *
  * @return an array of default commandline options
  * @see #bootstrap( String[] )
- * @since UDK 5.2.0
+ * @since LibreOffice 5.2
  */
 public static final String[] getDefaultOptions()
 {
@@ -289,7 +289,7 @@ public class Bootstrap {
  * @see #getDefaultOptions()
  * @return a bootstrapped component context.
  *
- * @since UDK 5.2.0
+ * @since LibreOffice 5.2
  */
 public static final XComponentContext bootstrap( String[] argArray )
 throws BootstrapException {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2015-12-18 Thread Katarina Behrens
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java |   58 +++---
 1 file changed, 51 insertions(+), 7 deletions(-)

New commits:
commit 02002f83f156117cf178532d48abaa9319ee8cb4
Author: Katarina Behrens 
Date:   Tue Dec 15 14:44:44 2015 +0100

tdf#86784: Pass custom options to Java bootstrap

Change-Id: I9e9c78387627e173dea8062e4a3f16bc396e8115
Reviewed-on: https://gerrit.libreoffice.org/20720
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java 
b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index a36f16c..0b99cce 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -92,6 +92,34 @@ public class Bootstrap {
 }
 
 /**
+ * Returns an array of default commandline options to start bootstrapped
+ * instance of soffice with. You may use it in connection with bootstrap
+ * method for example like this:
+ * 
+ * List list = Arrays.asList( Bootstrap.getDefaultOptions() );
+ * list.remove("--nologo");
+ * list.remove("--nodefault");
+ * list.add("--invisible");
+ *
+ * Bootstrap.bootstrap( list.toArray( new String[list.size()] );
+ * 
+ *
+ * @return an array of default commandline options
+ * @see #bootstrap( String[] )
+ * @since UDK 5.2.0
+ */
+public static final String[] getDefaultOptions()
+{
+return new String[]
+{
+"--nologo",
+"--nodefault",
+"--norestore",
+"--nolockcheck"
+};
+}
+
+/**
  * backwards compatibility stub.
  */
 public static XComponentContext createInitialComponentContext( 
Hashtable context_entries )
@@ -248,6 +276,24 @@ public class Bootstrap {
 public static final XComponentContext bootstrap()
 throws BootstrapException {
 
+String[] defaultArgArray = getDefaultOptions();
+return bootstrap( defaultArgArray );
+}
+
+/**
+ * Bootstraps the component context from a UNO installation.
+ *
+ * @param argArray
+ *an array of strings - commandline options to start instance of
+ *soffice with
+ * @see #getDefaultOptions()
+ * @return a bootstrapped component context.
+ *
+ * @since UDK 5.2.0
+ */
+public static final XComponentContext bootstrap( String[] argArray )
+throws BootstrapException {
+
 XComponentContext xContext = null;
 
 try {
@@ -271,13 +317,11 @@ public class Bootstrap {
 Long.toString( (new Random()).nextLong() & 0x7fffL 
);
 
 // create call with arguments
-String[] cmdArray = new String[] {
-fOffice.getPath(),
-"--nologo",
-"--nodefault",
-"--norestore",
-"--nolockcheck",
-"--accept=pipe,name=" + sPipeName + ";urp;" };
+String[] cmdArray = new String[ argArray.length + 2 ];
+cmdArray[0] = fOffice.getPath();
+cmdArray[1] = ( "--accept=pipe,name=" + sPipeName + ";urp;" );
+
+System.arraycopy( argArray, 0, cmdArray, 2, argArray.length );
 
 // start office process
 Process p = Runtime.getRuntime().exec( cmdArray );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2015-10-15 Thread Noel Grandin
 
javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
 |   15 +-
 1 file changed, 2 insertions(+), 13 deletions(-)

New commits:
commit bc492df7132d25d221fb44a24409a393ae6aa6ff
Author: Noel Grandin 
Date:   Thu Oct 15 09:25:48 2015 +0200

cid#1326115 Unchecked return value

and drop some truly bizarre and unnecessary code

Change-Id: I105ba8784b6c4179a3cd7ad5bf9a250fd680d64a

diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
index 0053c4d..3d60e5a 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
@@ -127,9 +127,6 @@ public final class InputStreamToXInputStreamAdapter 
implements XInputStream {
 public void skipBytes(int n) throws
 com.sun.star.io.IOException
 {
-int tmpLongVal = n;
-int  tmpIntVal;
-
 try {
 iIn.available();
 } catch (IOException e) {
@@ -137,20 +134,12 @@ public final class InputStreamToXInputStreamAdapter 
implements XInputStream {
 }
 
 do {
-if (tmpLongVal >= Integer.MAX_VALUE) {
-   tmpIntVal = Integer.MAX_VALUE;
-} else {
-   // Casting is safe here.
-   tmpIntVal = tmpLongVal;
-}
-tmpLongVal -= tmpIntVal;
-
 try {
-iIn.skip(tmpIntVal);
+n -= iIn.skip(n);
 } catch (IOException e) {
 throw new com.sun.star.io.IOException(e);
 }
-} while (tmpLongVal > 0);
+} while (n > 0);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-12-14 Thread Noel Grandin
 javaunohelper/com/sun/star/lib/uno/helper/Factory.java |   50 +
 1 file changed, 41 insertions(+), 9 deletions(-)

New commits:
commit 86c8e81178bae50b2de7591fc1cf53cd4d821363
Author: Noel Grandin n...@peralex.com
Date:   Fri Dec 12 10:58:38 2014 +0200

stronger checks when creating Java UNO components

check the visibility of construction method at load time for Java UNO
components. This means that we get more informative errors at startup,
instead of failures much later on when we actually create the component.

Change-Id: I08cd16875cf53cfeeef7e8954ecd0d3177d70eb5
Reviewed-on: https://gerrit.libreoffice.org/13446
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java 
b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
index 89cf42e..056d954 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
@@ -119,48 +119,80 @@ public class Factory
 private final String m_impl_name;
 private final String [] m_supported_services;
 private final Class? m_impl_class;
-private java.lang.reflect.Method m_method;
-private java.lang.reflect.Constructor m_ctor;
+private final java.lang.reflect.Method m_method;
+private final java.lang.reflect.Constructor m_ctor;
 
 private Factory(
 Class impl_class, String impl_name, String supported_services [] )
+throws com.sun.star.uno.DeploymentException
 {
 m_impl_name = impl_name;
 m_supported_services = supported_services;
 m_impl_class = impl_class;
-m_method = null;
-m_ctor = null;
 
 Class params [] = new Class [] { XComponentContext.class };
 
+if (!java.lang.reflect.Modifier.isPublic( impl_class.getModifiers() ))
+{
+throw new com.sun.star.uno.DeploymentException(class  + 
impl_class +  is not public);
+}
+
+java.lang.reflect.Method tmpMethod = null;
 try
 {
 // seeking for public static Object __create( XComponentContext )
-m_method = m_impl_class.getMethod( __create, params );
-int mod = m_method.getModifiers();
-if (!m_method.getReturnType().equals( Object.class ) ||
+tmpMethod = m_impl_class.getMethod( __create, params );
+int mod = tmpMethod.getModifiers();
+if (!tmpMethod.getReturnType().equals( Object.class ) ||
 !java.lang.reflect.Modifier.isStatic( mod ) ||
 !java.lang.reflect.Modifier.isPublic( mod ))
 {
-m_method = null;
+tmpMethod = null;
 }
 }
 catch (Exception exc)
 {
 }
+m_method = tmpMethod;
 
+
+java.lang.reflect.Constructor tmpCtor = null;
 if (null == m_method)
 {
 try
 {
 // ctor with context
-m_ctor = m_impl_class.getConstructor( params );
+tmpCtor = m_impl_class.getConstructor( params );
 }
 catch (Exception exc)
 {
+}
+if (tmpCtor != null)
+{
+if (!java.lang.reflect.Modifier.isPublic( 
tmpCtor.getModifiers() ))
+{
+throw new 
com.sun.star.uno.DeploymentException(constructor with XComponentContext param 
for class   + impl_class +  is not public);
+}
+}
+else
+{
 // else take default ctor
+java.lang.reflect.Constructor defaultCtor;
+try
+{
+defaultCtor = m_impl_class.getConstructor(new Class[0]);
+}
+catch (Exception exc2)
+{
+throw new com.sun.star.uno.DeploymentException(exc2, 
class  + impl_class +  has no means of creating it, cannot find a __create 
method or a useful constructor.);
+}
+if (!java.lang.reflect.Modifier.isPublic( 
defaultCtor.getModifiers() ))
+{
+throw new com.sun.star.uno.DeploymentException(default 
constructor for class   + impl_class +  is not public);
+}
 }
 }
+m_ctor = tmpCtor;
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com jurt/com nlpsolver/ThirdParty odk/examples qadevOOo/tests scripting/java swext/mediawiki toolkit/test xmerge/source

2014-11-12 Thread Noel Grandin
 javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
|  185 +-
 jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java  
|   25 -
 jurt/com/sun/star/uno/WeakReference.java   
|   25 -
 
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java
|  114 +++---
 
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
 |   48 +-
 qadevOOo/tests/java/ifc/chart/_XChartDataArray.java
|   29 -
 
scripting/java/com/sun/star/script/framework/container/DeployedUnoPackagesDB.java
  |   29 -
 swext/mediawiki/src/com/sun/star/wiki/Helper.java  
|   66 +--
 swext/mediawiki/src/com/sun/star/wiki/WikiDialog.java  
|   16 
 swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java   
|   90 ++--
 toolkit/test/accessibility/TextUpdateListener.java 
|   36 -
 
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java 
   |   47 +-
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java   
|   31 -
 
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java 
   |   31 -
 14 files changed, 389 insertions(+), 383 deletions(-)

New commits:
commit 36ff1527c9cb20542d3097d123d221c40a356795
Author: Noel Grandin n...@peralex.com
Date:   Tue Nov 11 15:32:10 2014 +0200

java: reduce excessive code indentation levels

by using early return in some methods

Change-Id: I3611c8c89b3a94ef7e1772d178acf065fd7fcdc7
Reviewed-on: https://gerrit.libreoffice.org/12374
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java 
b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
index f3d9a8e..7e2af48 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
@@ -563,106 +563,107 @@ public final class PropertySetMixin {
 {
 XInterfaceTypeDescription2 ifc = UnoRuntime.queryInterface(
 XInterfaceTypeDescription2.class, resolveTypedefs(type));
-if (seen.add(ifc.getName())) {
-XTypeDescription[] bases = ifc.getBaseTypes();
-for (int i = 0; i  bases.length; ++i) {
-initProperties(bases[i], map, handleNames, seen);
-}
-XInterfaceMemberTypeDescription[] members = ifc.getMembers();
-for (int i = 0; i  members.length; ++i) {
-if (members[i].getTypeClass() == TypeClass.INTERFACE_ATTRIBUTE)
-{
-XInterfaceAttributeTypeDescription2 attr =
-UnoRuntime.queryInterface(
-XInterfaceAttributeTypeDescription2.class,
-members[i]);
-short attrAttribs = 0;
-if (attr.isBound()) {
-attrAttribs |= PropertyAttribute.BOUND;
+if (!seen.add(ifc.getName())) {
+return;
+}
+XTypeDescription[] bases = ifc.getBaseTypes();
+for (int i = 0; i  bases.length; ++i) {
+initProperties(bases[i], map, handleNames, seen);
+}
+XInterfaceMemberTypeDescription[] members = ifc.getMembers();
+for (int i = 0; i  members.length; ++i) {
+if (members[i].getTypeClass() == TypeClass.INTERFACE_ATTRIBUTE)
+{
+XInterfaceAttributeTypeDescription2 attr =
+UnoRuntime.queryInterface(
+XInterfaceAttributeTypeDescription2.class,
+members[i]);
+short attrAttribs = 0;
+if (attr.isBound()) {
+attrAttribs |= PropertyAttribute.BOUND;
+}
+boolean setUnknown = false;
+if (attr.isReadOnly()) {
+attrAttribs |= PropertyAttribute.READONLY;
+setUnknown = true;
+}
+XCompoundTypeDescription[] excs = attr.getGetExceptions();
+boolean getUnknown = false;
+//XXX  Special interpretation of getter/setter exceptions
+// only works if the specified exceptions are of the exact
+// type, not of a supertype:
+for (int j = 0; j  excs.length; ++j) {
+if (excs[j].getName().equals(
+com.sun.star.beans.UnknownPropertyException))
+  

[Libreoffice-commits] core.git: javaunohelper/com

2014-10-18 Thread Robert Antoni Buj i Gelonch
 javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit eb6c538424b2d44f24cbd029c17afbdf19eaf11d
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Thu Oct 16 12:41:50 2014 +0200

javaunohelper: remove unused import

Change-Id: Ibee790a50e35219a8427b7037331943b778292a2
Reviewed-on: https://gerrit.libreoffice.org/11997
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java 
b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
index c51475e..a61edc0 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
@@ -17,10 +17,11 @@
  */
 
 package com.sun.star.lib.uno.helper;
+
 import java.util.Iterator;
 import java.util.ListIterator;
-import java.util.NoSuchElementException;
 import java.util.Collection;
+
 import com.sun.star.lang.EventObject;
 import com.sun.star.lang.XEventListener;
 import com.sun.star.uno.UnoRuntime;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-09-29 Thread Noel Grandin
 
javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
   |   62 +-
 
javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToOutputStreamAdapter.java
 |   22 ++-
 2 files changed, 53 insertions(+), 31 deletions(-)

New commits:
commit 255e30026b668f0effed62fbed36f0463539f93c
Author: Noel Grandin n...@peralex.com
Date:   Mon Sep 29 11:47:53 2014 +0200

fix more Java1.5 incompatibility

Change-Id: I9c4d62e4d3703e4e1015efe2b2917d54f82bc83f

diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
index 8352a0b..432cfdc 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
@@ -55,7 +55,9 @@ public final class XInputStreamToInputStreamAdapter extends 
InputStream {
 try {
 bytesAvail = xin.available();
 } catch (Exception e) {
-throw new IOException(e);
+IOException newEx = new IOException(e.getMessage());
+newEx.initCause(e);
+throw newEx;
 }
 
 return(bytesAvail);
@@ -66,7 +68,9 @@ public final class XInputStreamToInputStreamAdapter extends 
InputStream {
 try {
 xin.closeInput();
 } catch (Exception e) {
-throw new IOException(e);
+IOException newEx = new IOException(e.getMessage());
+newEx.initCause(e);
+throw newEx;
 }
 }
 
@@ -79,15 +83,17 @@ public final class XInputStreamToInputStreamAdapter extends 
InputStream {
 if (bytesRead = 0) {
return (-1);
 } else {
-int tmpInt = tmp[0][0];
-if (tmpInt 0 ){
-tmpInt = 256 +tmpInt;
-}
+int tmpInt = tmp[0][0];
+if (tmpInt 0 ){
+tmpInt = 256 +tmpInt;
+}
 return(tmpInt);
 }
 
 } catch (Exception e) {
-throw new IOException(e);
+IOException newEx = new IOException(e.getMessage());
+newEx.initCause(e);
+throw newEx;
 }
 }
 
@@ -107,7 +113,9 @@ public final class XInputStreamToInputStreamAdapter extends 
InputStream {
 System.arraycopy(tmp[0], 0, b, 0, b.length);
 }
 } catch (Exception e) {
-throw new IOException(e);
+IOException newEx = new IOException(e.getMessage());
+newEx.initCause(e);
+throw newEx;
 }
 
 return (bytesRead);
@@ -117,31 +125,31 @@ public final class XInputStreamToInputStreamAdapter 
extends InputStream {
 public int read(byte[] b, int off, int len) throws IOException {
 byte [][] tmp = new byte [1][b.length];
 try {
-long bytesRead;
+long bytesRead;
 int av = xin.available();
-if ( av != 0  len  av) {
-  bytesRead = xin.readBytes(tmp, av);
-}
-else{
-bytesRead = xin.readBytes(tmp,len);
-}
+if ( av != 0  len  av) {
+bytesRead = xin.readBytes(tmp, av);
+}
+else{
+bytesRead = xin.readBytes(tmp,len);
+}
 // Casting bytesRead to an int is okay, since the user can
 // only pass in an integer length to read, so the bytesRead
 // must = len.
 
 if (bytesRead = 0) {
 return(-1);
-} else if (bytesRead  len) {
-System.arraycopy(tmp[0], 0, b, off, (int)bytesRead);
-} else {
+} else if (bytesRead  len) {
+System.arraycopy(tmp[0], 0, b, off, (int)bytesRead);
+} else {
 System.arraycopy(tmp[0], 0, b, off, len);
-}
-
-return ((int)bytesRead);
-
+}
 
+return ((int)bytesRead);
 } catch (Exception e) {
-throw new IOException(e);
+IOException newEx = new IOException(e.getMessage());
+newEx.initCause(e);
+throw newEx;
 }
 }
 
@@ -155,7 +163,9 @@ public final class XInputStreamToInputStreamAdapter extends 
InputStream {
 try {
 avail = xin.available();
 } catch (Exception e) {
-throw new IOException(e);
+IOException newEx = new IOException(e.getMessage());
+newEx.initCause(e);
+throw newEx;
 }
 
 do {
@@ -170,7 +180,9 @@ public final class XInputStreamToInputStreamAdapter extends 
InputStream {
 try {
 xin.skipBytes(tmpIntVal);
 } catch (Exception e) {
-throw new IOException(e);
+IOException newEx = new IOException(e.getMessage());
+newEx.initCause(e);
+ 

[Libreoffice-commits] core.git: javaunohelper/com

2014-09-23 Thread Robert Antoni Buj i Gelonch
 javaunohelper/com/sun/star/comp/helper/ComponentContext.java   
|1 -
 
javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
   |2 +-
 
javaunohelper/com/sun/star/lib/uno/adapter/OutputStreamToXOutputStreamAdapter.java
 |2 +-
 
javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
   |2 +-
 
javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java 
   |2 +-
 
javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToOutputStreamAdapter.java
 |2 +-
 6 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 6ee1a5438061712d05e5a8a6b9820e27c3ab21f6
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Mon Sep 22 11:14:39 2014 +0200

javaunohelper: Using final modifier whenever applicable in java

All classes that belongs to the com.sun.star.lib.uno.adapter package are 
not part of the stable URE interface.
(cf. http://api.libreoffice.org/docs/java/ref/index.html), for that 
reason those classes may be final.

Remove unused import in com.sun.star.comp.helper.ComponentContext class.

Change-Id: I68be8da4324f5163505e65365bf49a6a9cd00672
Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java 
b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
index 563c0a9..0326ffa 100644
--- a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
+++ b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
@@ -29,7 +29,6 @@ import com.sun.star.lang.XEventListener;
 import com.sun.star.lang.EventObject;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
 
diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
index 4999463..b802520 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
@@ -27,7 +27,7 @@ import java.io.InputStream;
 This allows users to access an codeInputStream/code
 as if it were an codeXInputStream/code.
  */
-public class InputStreamToXInputStreamAdapter implements XInputStream {
+public final class InputStreamToXInputStreamAdapter implements XInputStream {
 
 /**
  *  Internal store to the InputStream
diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/OutputStreamToXOutputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/OutputStreamToXOutputStreamAdapter.java
index 4991e86..954888c 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/OutputStreamToXOutputStreamAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/OutputStreamToXOutputStreamAdapter.java
@@ -27,7 +27,7 @@ import java.io.OutputStream;
object in a Java.  This allows users to access an codeOutputStream/code
as if it were an codeXOutputStream/code.
  */
-public class OutputStreamToXOutputStreamAdapter implements XOutputStream {
+public final class OutputStreamToXOutputStreamAdapter implements XOutputStream 
{
 
 /**
  *  Internal handle to the OutputStream
diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
index 1a96828..2d9652e 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
@@ -28,7 +28,7 @@ import java.io.InputStream;
  * an codeXInputStream/code as if it were an
  * codeInputStream/code.
  */
-public class XInputStreamToInputStreamAdapter extends InputStream {
+public final class XInputStreamToInputStreamAdapter extends InputStream {
 
 /**
  *  Internal handle to the XInputStream
diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
index ad60793..9ebcb06 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
@@ -27,7 +27,7 @@ package com.sun.star.lib.uno.adapter;
 import com.sun.star.io.*;
 import  com.sun.star.lib.uno.helper.ComponentBase;
 
-public class XOutputStreamToByteArrayAdapter
+public final class XOutputStreamToByteArrayAdapter
 extends ComponentBase
 implements XOutputStream
 {
diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToOutputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToOutputStreamAdapter.java
index ecfee86..478dfc4 100644
--- 

[Libreoffice-commits] core.git: javaunohelper/com

2014-09-22 Thread Robert Antoni Buj i Gelonch
 javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java 
|2 +-
 javaunohelper/com/sun/star/lib/uno/helper/Factory.java 
|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b9f187055394713fbc58d149c6ea98fe13dbadd5
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Fri Sep 19 11:39:54 2014 +0200

javaunohelper: Using final modifier whenever applicable in java

* com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter class may be 
final. There is a overridable method call in the constructor.

* Private methods can't be overridden. The private method instantiate is 
declared final in the com.sun.star.lib.uno.helper.Factory class.

Change-Id: I7dba78a3d1857bbc328f6a581d8e9a5ae130739d
Reviewed-on: https://gerrit.libreoffice.org/11546
Reviewed-by: Stephan Bergmann sberg...@redhat.com
Tested-by: Stephan Bergmann sberg...@redhat.com

diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java
index fd6553a..ecb1df6 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java
@@ -28,7 +28,7 @@ import com.sun.star.io.XInputStream;
 import com.sun.star.io.XSeekable;
 import  com.sun.star.lib.uno.helper.ComponentBase;
 
-public class ByteArrayToXInputStreamAdapter
+public final class ByteArrayToXInputStreamAdapter
 extends ComponentBase
 implements XInputStream, XSeekable
 {
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java 
b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
index f136561..19f6fc0 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
@@ -165,7 +165,7 @@ public class Factory
 }
 
 
-private final Object instantiate( XComponentContext xContext )
+private Object instantiate( XComponentContext xContext )
 throws com.sun.star.uno.Exception
 {
 try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com javaunohelper/test

2014-09-19 Thread Robert Antoni Buj i Gelonch
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java   |   20 
+-
 javaunohelper/com/sun/star/comp/helper/ComponentContext.java|   12 +++---
 javaunohelper/test/com/sun/star/comp/helper/Bootstrap_Test.java |3 +
 3 files changed, 20 insertions(+), 15 deletions(-)

New commits:
commit 19206458555de6c1043aef8ead96067c3d8bca4d
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Fri Sep 19 12:22:32 2014 +0200

javaunohelper: use HashMap instead of Hashtable Collection

Change-Id: I04e3245342a83df762fbec35a1523021a021f896
Reviewed-on: https://gerrit.libreoffice.org/11547
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java 
b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 7b466b0..80daf4b 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -38,7 +38,9 @@ import java.io.File;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.PrintStream;
+import java.util.HashMap;
 import java.util.Hashtable;
+import java.util.Map;
 import java.util.Random;
 
 /** Bootstrap offers functionality to obtain a context or simply
@@ -94,7 +96,7 @@ public class Bootstrap {
 static public XComponentContext createInitialComponentContext( 
HashtableString, Object context_entries )
 throws Exception
 {
-return 
createInitialComponentContext((java.util.MapString,Object)context_entries);
+return createInitialComponentContext((MapString, Object) 
context_entries);
 }
 /** Bootstraps an initial component context with service manager and basic
 jurt components inserted.
@@ -102,7 +104,7 @@ public class Bootstrap {
 context entries (type class ComponentContextEntry).
 @return a new context.
 */
-static public XComponentContext createInitialComponentContext( 
java.util.MapString, Object context_entries )
+static public XComponentContext createInitialComponentContext( MapString, 
Object context_entries )
 throws Exception
 {
 ServiceManager xSMgr = new ServiceManager();
@@ -116,7 +118,7 @@ public class Bootstrap {
 
 // initial component context
 if (context_entries == null)
-context_entries = new HashtableString,Object( 1 );
+context_entries = new HashMapString,Object( 1 );
 // add smgr
 context_entries.put(
 /singletons/com.sun.star.lang.theServiceManager,
@@ -143,7 +145,7 @@ public class Bootstrap {
 static public XMultiServiceFactory createSimpleServiceManager() throws 
Exception
 {
 return UnoRuntime.queryInterface(
-XMultiServiceFactory.class, createInitialComponentContext( null 
).getServiceManager() );
+XMultiServiceFactory.class, createInitialComponentContext( 
(MapString, Object) null ).getServiceManager() );
 }
 
 
@@ -155,7 +157,7 @@ public class Bootstrap {
 static public final XComponentContext 
defaultBootstrap_InitialComponentContext()
 throws Exception
 {
-return defaultBootstrap_InitialComponentContext( null, null );
+return defaultBootstrap_InitialComponentContext( (String) null, 
(MapString,String) null );
 }
 /**
  * Backwards compatibility stub.
@@ -164,7 +166,7 @@ public class Bootstrap {
 String ini_file, HashtableString,String bootstrap_parameters )
 throws Exception
 {
-return defaultBootstrap_InitialComponentContext(ini_file, 
(java.util.MapString,String)bootstrap_parameters);
+return defaultBootstrap_InitialComponentContext(ini_file, 
(MapString,String) bootstrap_parameters);
 
 }
 /** Bootstraps the initial component context from a native UNO 
installation.
@@ -178,7 +180,7 @@ public class Bootstrap {
bootstrap parameters (maybe null)
 */
 static public final XComponentContext 
defaultBootstrap_InitialComponentContext(
-String ini_file, java.util.MapString,String bootstrap_parameters )
+String ini_file, MapString,String bootstrap_parameters )
 throws Exception
 {
 // jni convenience: easier to iterate over array than calling Hashtable
@@ -187,7 +189,7 @@ public class Bootstrap {
 {
 pairs = new String [ 2 * bootstrap_parameters.size() ];
 int n = 0;
-for (java.util.Map.EntryString, String bootstrap_parameter : 
bootstrap_parameters.entrySet()) {
+for (Map.EntryString, String bootstrap_parameter : 
bootstrap_parameters.entrySet()) {
 pairs[ n++ ] = bootstrap_parameter.getKey();
 pairs[ n++ ] = bootstrap_parameter.getValue();
 }
@@ -250,7 +252,7 @@ public class Bootstrap {
 try {
 // create default local component context
 XComponentContext 

[Libreoffice-commits] core.git: javaunohelper/com

2014-09-15 Thread rbuj
 javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 352b580e30476dce135a40a21daac7f974ecc430
Author: rbuj robert@gmail.com
Date:   Sun Sep 14 14:04:50 2014 +0200

javaunohelper: warning: unchecked cast

Change-Id: I7c47e3a8657ec2368543088743879085878d78fb
Reviewed-on: https://gerrit.libreoffice.org/11444
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java 
b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
index 344ab1f..b00519a 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
@@ -212,22 +212,22 @@ public final class PropertySetMixin {
 if ((p.Attributes  PropertyAttribute.CONSTRAINED) != 0) {
 ArrayListXVetoableChangeListener o = 
vetoListeners.get(propertyName);
 if (o != null) {
-specificVeto = (ArrayListXVetoableChangeListener) 
o.clone();
+specificVeto = new ArrayListXVetoableChangeListener(o);
 }
 o = vetoListeners.get();
 if (o != null) {
-unspecificVeto = (ArrayListXVetoableChangeListener) 
o.clone();
+unspecificVeto = new ArrayListXVetoableChangeListener(o);
 }
 }
 if ((p.Attributes  PropertyAttribute.BOUND) != 0) {
 // assert bound != null;
 ArrayListXPropertyChangeListener o = 
boundListeners.get(propertyName);
 if (o != null) {
-bound.specificListeners = 
(ArrayListXPropertyChangeListener) o.clone();
+bound.specificListeners = new 
ArrayListXPropertyChangeListener(o);
 }
 o = boundListeners.get();
 if (o != null) {
-bound.unspecificListeners = 
(ArrayListXPropertyChangeListener) o.clone();
+bound.unspecificListeners = new 
ArrayListXPropertyChangeListener(o);
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-09-13 Thread rbuj
 javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java  |2 +-
 javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ebeeebbceacd61f47c350cc17918fb7284defbad
Author: rbuj robert@gmail.com
Date:   Sat Sep 13 10:52:23 2014 +0200

javaunohelper: use String.length()==0 instead of String.equals(empty string)

Change-Id: Ic738dbbee4ce972ebf7efcfda33ccbb3f3ac48ff
Reviewed-on: https://gerrit.libreoffice.org/11432
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java 
b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
index c9bece6..aaf7691 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
@@ -264,7 +264,7 @@ XMultiPropertySet
  */
 protected void assignPropertyId(Property prop, Object id)
 {
-   if (id instanceof String  !((String) id).equals())
+   if (id instanceof String  ((String) id).length() != 0)
 _propertyToIdMap.put(prop, id);
 }
 
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java 
b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
index 067033a..344ab1f 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
@@ -986,7 +986,7 @@ public final class PropertySetMixin {
 private void checkUnknown(String propertyName)
 throws UnknownPropertyException
 {
-if (!propertyName.equals()) {
+if (propertyName.length() != 0) {
 get(this, propertyName);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-09-13 Thread rbuj
 javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1e04460c9a6e7b2bec3a60fe6ffcf0509a870087
Author: rbuj robert@gmail.com
Date:   Sat Sep 13 10:55:02 2014 +0200

javaunohelper: use a character literal

Change-Id: Ib0a69ac4714cd694ccd6a9bea87e32c1aadb0428
Reviewed-on: https://gerrit.libreoffice.org/11433
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java 
b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
index 18700de..5766792 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
@@ -297,7 +297,7 @@ public class UnoUrl {
 throws com.sun.star.lang.IllegalArgumentException {
 String partName;
 String theParamPart;
-int index = thePart.indexOf(,);
+int index = thePart.indexOf(',');
 if (index != -1) {
 partName = thePart.substring(0, index).trim();
 theParamPart = thePart.substring(index + 1).trim();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-09-09 Thread rbuj
 javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java |2 
 javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java |4 -
 javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java|   22 
+-
 javaunohelper/com/sun/star/lib/uno/helper/WeakAdapter.java|4 -
 javaunohelper/com/sun/star/lib/uno/helper/WeakBase.java   |2 
 5 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 0d0920b13e23763ba2cc72eb48729ad2fad9d23d
Author: rbuj robert@gmail.com
Date:   Tue Sep 9 18:45:15 2014 +0200

javaunohelper: fix some misspellings

Change-Id: Ibfa6e6ed2a4b4d3fa4b5e5cf624e42442653d358
Reviewed-on: https://gerrit.libreoffice.org/11363
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java 
b/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java
index 67272bc..aa402d2 100644
--- a/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java
+++ b/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java
@@ -44,7 +44,7 @@ public class ComponentContextEntry
 @param lateInit
object factory or service string
 @param value
-   pass null (dummy separating from second ctor signature)
+   pass null (dummy separating from second constructor signature)
 */
 public ComponentContextEntry( Object lateInit, Object value )
 {
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java 
b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
index 650be99..b49b28f 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
@@ -39,7 +39,7 @@ import com.sun.star.uno.UnoRuntime;
  * All methods are thread-safe. The same holds true for
  * iterators, issued by this class. Several iterators can exist at the same 
time and can also
  * be modified (java.util.ListIterator.add, java.util.ListIterator.remove 
etc.). To make this work,
- * the InterfaceContainer provides the iterators with copys of the list's data.
+ * the InterfaceContainer provides the iterators with copies of the list's 
data.
  * The add and remove calls on the iterator modify the data in the iterator's 
list as well as
  * in InterfaceContainer. Modification on InterfaceContainer, however, are not
  * synchronized with existing iterators. For example
@@ -460,7 +460,7 @@ public class InterfaceContainer implements Cloneable
 }
 
 /** The iterator keeps a copy of the list. Changes to InterfaceContainer 
do not
- *  affect the data of the iterator. Conversly, changes to the iterator 
are effect
+ *  affect the data of the iterator. Conversely, changes to the iterator 
are effect
  *  InterfaceContainer.
  */
 synchronized public ListIterator listIterator(int index)
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java 
b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
index 227dcde..c9bece6 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
@@ -99,7 +99,7 @@ XMultiPropertySet
  *  These methods expect emid/em to be a String which represents the 
name of a member variable
  *  which holds the property value.
  *  Only properties which are registered can be accessed. Registration has 
to occur during
- *  initialization of the inheriting class (i.e. within the contructor).
+ *  initialization of the inheriting class (i.e. within the constructor).
  *  @param prop The property to be registered.
  *  @param id Identifies the properties storage.
  *  @see #getPropertyId
@@ -114,7 +114,7 @@ XMultiPropertySet
  *  It does the same as {@link #registerProperty(Property, Object)}. The 
first four
  *  arguments are used to construct a Property object.
  *  Registration has to occur during
- *  initialization of the inheriting class (i.e. within the contructor)
+ *  initialization of the inheriting class (i.e. within the constructor)
  *  @param name The property's name (Property.Name).
  *  @param handle The property's handle (Property.Handle).
  *  @param type The property's type (Property.Type).
@@ -133,7 +133,7 @@ XMultiPropertySet
  *  is generated and does not have to be specified here. Use this method 
for registering
  *  a property if you do not care about the Property's handles.
  *  Registration has to occur during
- *  initialization of the inheriting class (i.e. within the contructor).
+ *  initialization of the inheriting class (i.e. within the constructor).
  *  @param name The property's name (Property.Name).
  *  @param type The property's type (Property.Type).
  *  @param attributes The property's 

[Libreoffice-commits] core.git: javaunohelper/com

2014-09-07 Thread rbuj
 javaunohelper/com/sun/star/lib/uno/helper/Factory.java |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 72510082086d66647cd68c76afcc47255bc5da4c
Author: rbuj robert@gmail.com
Date:   Sat Sep 6 15:45:18 2014 +0200

javaunohelper: fix javadoc error: unknown tag: attention (Doxygen)

Change-Id: Idd1d92699cab0ccb26b95e9d5392c6fc7a8a2aa6
Reviewed-on: https://gerrit.libreoffice.org/11308
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java 
b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
index a8b50a2..f136561 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java
@@ -29,8 +29,9 @@ import com.sun.star.uno.UnoRuntime;
 /** Factory helper class supporting com.sun.star.lang.XServiceInfo and
 com.sun.star.lang.XSingleComponentFactory.
 
-@attention
-This factory implementation does not support lang.XSingleServiceFactory.
+p
+Note: This factory implementation does not support 
lang.XSingleServiceFactory.
+/p
 */
 public class Factory
 extends ComponentBase
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-09-02 Thread rbuj
 
javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 68e7bb88fd1416e24bda09f7c19e3a8aeb4ee80f
Author: rbuj robert@gmail.com
Date:   Mon Sep 1 20:06:43 2014 +0200

javaunohelper: fix javadoc error: unknown tag: returns

Change-Id: I2cd47bd928da322be6c392d65d2a04152553fbef
Reviewed-on: https://gerrit.libreoffice.org/11246
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
index 56c84dc..1a96828 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
@@ -184,7 +184,7 @@ public class XInputStreamToInputStreamAdapter extends 
InputStream {
 *  The markSupported method of
 *  codeXInputStreamToInputStreamAdapter/code returns false.
 *
-*  @returns  false
+*  @return  false
 */
 @Override
 public boolean markSupported() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-08-16 Thread rbuj
 javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit b418ba93f48e361766f1aaa490292d3049501178
Author: rbuj robert@gmail.com
Date:   Sat Aug 16 00:14:26 2014 +0200

javaunohelper: The assigned value is sometimes used

Change-Id: I292921ef5b98ffbae9a0d5b631498a2d6efefbfd
Reviewed-on: https://gerrit.libreoffice.org/10941
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java 
b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
index ac5f05e..18700de 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
@@ -295,12 +295,15 @@ public class UnoUrl {
 
 private static UnoUrlPart parseUnoUrlPart(String thePart)
 throws com.sun.star.lang.IllegalArgumentException {
-String partName = thePart;
-String theParamPart = ;
+String partName;
+String theParamPart;
 int index = thePart.indexOf(,);
 if (index != -1) {
 partName = thePart.substring(0, index).trim();
 theParamPart = thePart.substring(index + 1).trim();
+} else {
+partName = thePart;
+theParamPart = ;
 }
 
 if (!isAlphaNumeric(partName)) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-08-11 Thread rbuj
 javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java |   66 +-
 1 file changed, 35 insertions(+), 31 deletions(-)

New commits:
commit 608f330e22e25772eb888fa33d64f9b79c0ffcc8
Author: rbuj robert@gmail.com
Date:   Sun Aug 10 19:34:40 2014 +0200

javaunohelper: Number parsing

Change-Id: Ie6856ea4c196479aef1ce00a7cf2709fea8b3e42
Reviewed-on: https://gerrit.libreoffice.org/10860
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java 
b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
index baeee60..0bae9d0 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
@@ -203,44 +203,48 @@ public class UnoUrl {
 return connection.getUninterpretedString();
 }
 
-private static int hexToInt(int ch)
-throws com.sun.star.lang.IllegalArgumentException {
-int c = Character.toLowerCase((char) ch);
-boolean isDigit = ('0' = c  c = '9');
-boolean isValidChar = ('a' = c  c = 'f') || isDigit;
-
-if (!isValidChar)
-throw new com.sun.star.lang.IllegalArgumentException(
-Invalid UTF-8 hex byte ' + c + '.);
-
-return isDigit ? ch - '0' : 10 + ((char) c - 'a')  0xF;
-}
-
 private static String decodeUTF8(String s)
 throws com.sun.star.lang.IllegalArgumentException {
-ArrayListInteger v = new ArrayListInteger();
 
-for (int i = 0; i  s.length(); i++) {
-int ch = s.charAt(i);
+try {
+if (s.contains(%)) {
+ArrayListInteger v = new ArrayListInteger();
+int length = s.length();
+for (int i = 0; i  length; i++) {
+int ch = s.charAt(i);
+
+if (ch == '%') {
+if (i+3  length)
+throw new 
com.sun.star.lang.IllegalArgumentException(
+Incomplete trailing escape (%) pattern);
+try {
+ch = Integer.parseInt(s.substring(i+1,i+3),16);
+} catch (NumberFormatException e) {
+throw new 
com.sun.star.lang.IllegalArgumentException(e.toString());
+}
+if (ch  0)
+throw new 
com.sun.star.lang.IllegalArgumentException(
+Illegal hex characters in escape (%) pattern 
- negative value);
+i+=2;
+}
+
+v.add(new Integer(ch));
+}
 
-if (ch == '%') {
-int hb = hexToInt(s.charAt(++i));
-int lb = hexToInt(s.charAt(++i));
-ch = (hb  4) | lb;
-}
+int size = v.size();
+byte[] bytes = new byte[size];
+for (int i = 0; i  size; i++) {
+Integer anInt = v.get(i);
+bytes[i] = (byte) (anInt.intValue()  0xFF);
+}
 
-v.add(new Integer(ch));
-}
+return new String(bytes, UTF-8);
 
-int size = v.size();
-byte[] bytes = new byte[size];
-for (int i = 0; i  size; i++) {
-Integer anInt = v.get(i);
-bytes[i] = (byte) (anInt.intValue()  0xFF);
-}
+} else {
 
-try {
-return new String(bytes, UTF-8);
+return new String(s.getBytes(), UTF-8);
+
+}
 } catch (UnsupportedEncodingException e) {
 throw new com.sun.star.lang.IllegalArgumentException(
 Couldn't convert parameter string to UTF-8 string: + 
e.getMessage());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-08-11 Thread rbuj
 javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java |   15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

New commits:
commit 8d10b7373a1c77748f2119b64a3dd99f453137fe
Author: rbuj robert@gmail.com
Date:   Mon Aug 11 03:15:20 2014 +0200

javaunohelper: enhancements in decodeUTF8

Change-Id: I452dbd54251eea683d307c346dc4949a42eedc30
Reviewed-on: https://gerrit.libreoffice.org/10862
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java 
b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
index 0bae9d0..ac5f05e 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java
@@ -18,8 +18,8 @@
 
 package com.sun.star.lib.uno.helper;
 import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
 import java.util.HashMap;
-import java.util.ArrayList;
 
 /**
  * Object representation and parsing of Uno Urls,
@@ -208,8 +208,8 @@ public class UnoUrl {
 
 try {
 if (s.contains(%)) {
-ArrayListInteger v = new ArrayListInteger();
 int length = s.length();
+ByteBuffer bb = ByteBuffer.allocate(length);
 for (int i = 0; i  length; i++) {
 int ch = s.charAt(i);
 
@@ -228,16 +228,11 @@ public class UnoUrl {
 i+=2;
 }
 
-v.add(new Integer(ch));
-}
-
-int size = v.size();
-byte[] bytes = new byte[size];
-for (int i = 0; i  size; i++) {
-Integer anInt = v.get(i);
-bytes[i] = (byte) (anInt.intValue()  0xFF);
+bb.put((byte) (ch  0xFF));
 }
 
+byte[] bytes = new byte[bb.position()];
+System.arraycopy(bb.array(), 0, bytes, 0, bytes.length);
 return new String(bytes, UTF-8);
 
 } else {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-08-10 Thread rbuj
 javaunohelper/com/sun/star/comp/helper/ComponentContext.java |   12 +++
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit c77e929c4bfa6e9aee3d6103ef3629a9bcf583ae
Author: rbuj robert@gmail.com
Date:   Sat Aug 9 21:15:11 2014 +0200

javaunohelper: Iterate over each Entry in a Map  Enhanced for-loops

Change-Id: I7abd62e0717bfc9c9b36a431092ddd92ef72684a
Reviewed-on: https://gerrit.libreoffice.org/10852
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java 
b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
index 30ff8ea..6f2d46a 100644
--- a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
+++ b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
@@ -29,7 +29,6 @@ import com.sun.star.lang.XEventListener;
 import com.sun.star.lang.EventObject;
 
 import java.util.Hashtable;
-import java.util.Iterator;
 import java.util.ArrayList;
 
 
@@ -230,23 +229,20 @@ public class ComponentContext implements 
XComponentContext, XComponent
 
 // fire events
 EventObject evt = new EventObject( this );
-IteratorXEventListener eventListener = m_eventListener.iterator();
-while (eventListener.hasNext())
+for (XEventListener listener : m_eventListener)
 {
-XEventListener listener = eventListener.next();
 listener.disposing( evt );
 }
 m_eventListener.clear();
 
 XComponent tdmgr = null;
 // dispose values, then service manager, then typdescription manager
-IteratorString keys = m_table.keySet().iterator();
-while (keys.hasNext())
+for (java.util.Map.EntryString, Object entry : m_table.entrySet())
 {
-String name = keys.next();
+String name = entry.getKey();
 if (! name.equals( SMGR_NAME ))
 {
-Object o = m_table.get( name );
+Object o = entry.getValue();
 if (o instanceof ComponentContextEntry)
 {
 o = ((ComponentContextEntry)o).m_value;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-08-09 Thread rbuj
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java |   10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit c6de012a66deebbaefa01cffdc6ed7961b3ed57e
Author: rbuj robert@gmail.com
Date:   Sat Aug 9 15:51:20 2014 +0200

javaunohelper: Iterate over each Entry in a Map

Change-Id: I12a3348c297cfd2902c1cbb04bd0ce35b15e
Reviewed-on: https://gerrit.libreoffice.org/10846
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java 
b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 3bc5bde..c11a415 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -38,7 +38,6 @@ import java.io.File;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.PrintStream;
-import java.util.Iterator;
 import java.util.Hashtable;
 import java.util.Random;
 
@@ -187,13 +186,10 @@ public class Bootstrap {
 if (null != bootstrap_parameters)
 {
 pairs = new String [ 2 * bootstrap_parameters.size() ];
-IteratorString keys = bootstrap_parameters.keySet().iterator();
 int n = 0;
-while (keys.hasNext())
-{
-String name = keys.next();
-pairs[ n++ ] = name;
-pairs[ n++ ] = bootstrap_parameters.get( name );
+for (java.util.Map.EntryString, String bootstrap_parameter : 
bootstrap_parameters.entrySet()) {
+pairs[ n++ ] = bootstrap_parameter.getKey();
+pairs[ n++ ] = bootstrap_parameter.getValue();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-07-30 Thread rbuj
 javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 192265720a0f83ceab58fe81a159df5f43a59bb5
Author: rbuj robert@gmail.com
Date:   Tue Jul 29 21:34:00 2014 +0200

javaunohelper: String comparison

Change-Id: I52a7e456bef73824f64213c982052c61e54f7c76
Reviewed-on: https://gerrit.libreoffice.org/10621
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java 
b/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java
index 32610a3..e8a4fad 100644
--- a/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java
+++ b/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java
@@ -46,7 +46,7 @@ public class SharedLibraryLoader {
 public static final String DEFAULT_IMPLEMENTATION = 
com.sun.star.comp.stoc.DLLComponentLoader;
 
 static {
-if (System.getProperty(java.vendor) == The Android Project) {
+if (The Android Project.equals(System.getProperty(java.vendor))) {
 // See corresponding code in
 // javaunohelper/com/sun/star/comp/helper/Bootstrap.java for more
 // comments.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-07-30 Thread rbuj
 
javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
 |4 ++--
 
javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
 |2 +-
 
javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java 
 |3 +--
 javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java 
  |6 +++---
 4 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 3e9bddfe6879580353b712d61308852e637f2e3d
Author: rbuj robert@gmail.com
Date:   Tue Jul 29 21:38:00 2014 +0200

javaunohelper: The assigned value is never used

Change-Id: Ia190a6784fceaf9607ba39f2ef9d5ea4151cfc16
Reviewed-on: https://gerrit.libreoffice.org/10624
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
index c598896..f4cda93 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
@@ -75,7 +75,7 @@ public class InputStreamToXInputStreamAdapter implements 
XInputStream {
 {
 int count = 0;
 try {
-long bytesRead=0;
+long bytesRead;
 if (len iIn.available()) {
 bytesRead = iIn.read(b[0], 0, iIn.available());
 }
@@ -102,7 +102,7 @@ public class InputStreamToXInputStreamAdapter implements 
XInputStream {
 {
 int count = 0;
 try {
-long bytesRead=0;
+long bytesRead;
 if (len iIn.available()) {
 bytesRead = iIn.read(b[0], 0, iIn.available());
 }
diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
index a556bb0..7f4a623 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
@@ -111,7 +111,7 @@ public class XInputStreamToInputStreamAdapter extends 
InputStream {
 int count = 0;
 byte [][] tmp = new byte [1][b.length];
 try {
-long bytesRead=0;
+long bytesRead;
 int av = xin.available();
 if ( av != 0  len  av) {
   bytesRead = xin.readBytes(tmp, av);
diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
index c2860db..8488e22 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
@@ -90,11 +90,10 @@ public class XOutputStreamToByteArrayAdapter
 {
 if ( externalBuffer )
 throw new BufferSizeExceededException(out of buffer space, 
cannot grow external buffer);
-byte[] newBuffer = null;
 while ( values.length  size-position )
 size *= 2;
 // System.err.println(new buffer size is +size+ bytes.);
-newBuffer = new byte[size];
+byte[] newBuffer = new byte[size];
 System.arraycopy(buffer, 0, newBuffer, 0, position);
 buffer = newBuffer;
 }
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java 
b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
index 8163963..c62b005 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
@@ -494,7 +494,7 @@ XMultiPropertySet
 if ((prop.Attributes  PropertyAttribute.READONLY) == 
PropertyAttribute.READONLY)
 throw new com.sun.star.beans.PropertyVetoException();
 // The value may be null only if MAYBEVOID attribute is set
-boolean bVoidValue= false;
+boolean bVoidValue;
 if (value instanceof Any)
 bVoidValue= ((Any) value).getObject() == null;
 else
@@ -505,7 +505,7 @@ XMultiPropertySet
 throw new DisposedException(Component is already disposed);
 
 //Check if the argument is allowed
-boolean bValueOk= false;
+boolean bValueOk;
 if (value instanceof Any)
 bValueOk= checkType(((Any) value).getObject());
 else
@@ -898,7 +898,7 @@ XMultiPropertySet
 for (int i= 0; i  nAffectedProps; i++)
 {
 // get the listener container for the property name
-InterfaceContainer lc= null;
+InterfaceContainer lc;
 if (bVetoable)
 lc= aVetoableLC.getContainer(arEvts[i].PropertyName);
 else

[Libreoffice-commits] core.git: javaunohelper/com

2014-07-30 Thread rbuj
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c7c535351cec9089e232cc5cb3e59454cef27e17
Author: rbuj robert@gmail.com
Date:   Wed Jul 30 10:57:19 2014 +0200

javaunohelper: String comparison

Change-Id: Ic0291e655525639b2f3cd33760d8f5f343b208f1
Reviewed-on: https://gerrit.libreoffice.org/10638
Reviewed-by: Samuel Mehrbrodt s.mehrbr...@gmail.com
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java 
b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 6c40f7c..3bc5bde 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -199,7 +199,7 @@ public class Bootstrap {
 
 if (! m_loaded_juh)
 {
-if (System.getProperty(java.vendor) == The Android Project)
+if (The Android 
Project.equals(System.getProperty(java.vendor)))
 {
 // Find out if we are configured with DISABLE_DYNLOADING or
 // not. Try to load the lo-bootstrap shared library which
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com

2014-07-30 Thread rbuj
 javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java |   20 +
 1 file changed, 9 insertions(+), 11 deletions(-)

New commits:
commit 84dbcaf91f34873d2ae02556c8a02f27401f8a5d
Author: rbuj robert@gmail.com
Date:   Wed Jul 30 11:24:09 2014 +0200

javaunohelper: If statement is redundant

Change-Id: I204e3755cf07c7bb9634d02913e893179d6e81e8
Reviewed-on: https://gerrit.libreoffice.org/10640
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java 
b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
index c62b005..3f84fb3 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
@@ -704,17 +704,15 @@ XMultiPropertySet
 
 private boolean checkType(Object obj)
 {
-if (obj == null
-|| obj instanceof Boolean
-|| obj instanceof Character
-|| obj instanceof Number
-|| obj instanceof String
-|| obj instanceof XInterface
-|| obj instanceof Type
-|| obj instanceof com.sun.star.uno.Enum
-|| obj.getClass().isArray())
-return true;
-return false;
+return obj == null
+|| obj instanceof Boolean
+|| obj instanceof Character
+|| obj instanceof Number
+|| obj instanceof String
+|| obj instanceof XInterface
+|| obj instanceof Type
+|| obj instanceof com.sun.star.uno.Enum
+|| obj.getClass().isArray();
 }
 
 // Param object can be an Any or other object. If obj is null then the 
return value is null
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com javaunohelper/source javaunohelper/test

2014-02-26 Thread Alexander Wilms
 javaunohelper/com/sun/star/comp/helper/ComponentContext.java   
|   16 +++
 
javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
   |4 -
 
javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
   |2 
 
javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToOutputStreamAdapter.java
 |2 
 javaunohelper/com/sun/star/lib/uno/helper/Factory.java 
|   14 +++---
 javaunohelper/source/bootstrap.cxx 
|2 
 javaunohelper/source/preload.cxx   
|6 +-
 javaunohelper/test/com/sun/star/lib/uno/helper/Factory_Test.java   
|   22 +-
 javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java   
|4 -
 9 files changed, 36 insertions(+), 36 deletions(-)

New commits:
commit 92c2a468a79dd1a4025d44c208dcfeed98a6eb68
Author: Alexander Wilms f.alexander.wi...@gmail.com
Date:   Tue Feb 25 19:09:34 2014 +0100

Remove visual noise from javaunohelper

Change-Id: Ib359d536070456c1ef403642eba7913a834d365d
Reviewed-on: https://gerrit.libreoffice.org/8275
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java 
b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
index 0b3b194..30ff8ea 100644
--- a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
+++ b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
@@ -33,17 +33,17 @@ import java.util.Iterator;
 import java.util.ArrayList;
 
 
-//==
+
 class Disposer implements XEventListener
 {
 private XComponent m_xComp;
 
-
//--
+
 Disposer( XComponent xComp )
 {
 m_xComp = xComp;
 }
-
//__
+
 public void disposing( EventObject Source )
 {
 m_xComp.dispose();
@@ -117,7 +117,7 @@ public class ComponentContext implements XComponentContext, 
XComponent
 }
 
 // XComponentContext impl
-
//__
+
 public Object getValueByName( String rName )
 {
 Object o = m_table.get( rName );
@@ -210,7 +210,7 @@ public class ComponentContext implements XComponentContext, 
XComponent
 return Any.VOID;
 }
 }
-
//__
+
 public XMultiComponentFactory getServiceManager()
 {
 if (m_xSMgr == null)
@@ -222,7 +222,7 @@ public class ComponentContext implements XComponentContext, 
XComponent
 }
 
 // XComponent impl
-
//__
+
 public void dispose()
 {
 if (DEBUG)
@@ -289,7 +289,7 @@ public class ComponentContext implements XComponentContext, 
XComponent
 if (DEBUG)
 System.err.println( ... finished );
 }
-
//__
+
 public void addEventListener( XEventListener xListener )
 {
 if (xListener == null)
@@ -299,7 +299,7 @@ public class ComponentContext implements XComponentContext, 
XComponent
 
m_eventListener.add( xListener );
 }
-
//__
+
 public void removeEventListener( XEventListener xListener )
 {
 if (xListener == null)
diff --git 
a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
 
b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
index 7c7a3f4..c598896 100644
--- 
a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
+++ 
b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
@@ -85,7 +85,7 @@ public class InputStreamToXInputStreamAdapter implements 
XInputStream {
 // Casting bytesRead to an int is okay, since the user can
 // only pass in an integer length to read, so the bytesRead
 // must = len.
-//
+
 if (bytesRead = 0) {
 return(0);
 }
@@ -112,7 +112,7 @@ public class InputStreamToXInputStreamAdapter implements 
XInputStream {
 // Casting bytesRead to an int is okay, since the user can
 // only pass in an integer length to read, so the bytesRead
 // must = len.
-//
+
 if 

[Libreoffice-commits] core.git: javaunohelper/com ridljar/com

2014-01-31 Thread Stephan Bergmann
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java |   13 ++-
 javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java |2 
 javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java   |   34 
+-
 javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java|   15 ++--
 javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java   |2 
 ridljar/com/sun/star/uno/IEnvironment.java|2 
 ridljar/com/sun/star/uno/IMethodDescription.java  |4 -
 ridljar/com/sun/star/uno/ITypeDescription.java|   22 +++---
 ridljar/com/sun/star/uno/Type.java|4 -
 9 files changed, 55 insertions(+), 43 deletions(-)

New commits:
commit 3a05aabe4190fc948ebdc94a14a15872f977ba0c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Jan 31 11:00:17 2014 +0100

Silence javadoc 8 errors

Change-Id: Ib0b2286669d797708b30bf0fffdbe14c14d1e30d

diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java 
b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 85bc483..6c40f7c 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -136,9 +136,10 @@ public class Bootstrap {
 
 /**
  * Bootstraps a servicemanager with the jurt base components registered.
- * p
+ *
+ * See also UNOIDL codecom.sun.star.lang.ServiceManager/code.
+ *
  * @return a freshly boostrapped service manager
- * @seecom.sun.star.lang.ServiceManager
  */
 static public XMultiServiceFactory createSimpleServiceManager() throws 
Exception
 {
@@ -149,7 +150,8 @@ public class Bootstrap {
 
 /** Bootstraps the initial component context from a native UNO 
installation.
 
-@see cppuhelper/defaultBootstrap_InitialComponentContext()
+See also
+codecppuhelper/defaultBootstrap_InitialComponentContext()/code.
 */
 static public final XComponentContext 
defaultBootstrap_InitialComponentContext()
 throws Exception
@@ -168,12 +170,13 @@ public class Bootstrap {
 }
 /** Bootstraps the initial component context from a native UNO 
installation.
 
+See also
+codecppuhelper/defaultBootstrap_InitialComponentContext()/code.
+
 @param ini_file
ini_file (may be null: uno.rc besides cppuhelper lib)
 @param bootstrap_parameters
bootstrap parameters (maybe null)
-
-@see cppuhelper/defaultBootstrap_InitialComponentContext()
 */
 static public final XComponentContext 
defaultBootstrap_InitialComponentContext(
 String ini_file, java.util.MapString,String bootstrap_parameters )
diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java 
b/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java
index ea1c57e..bb3bd7a 100644
--- a/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java
+++ b/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java
@@ -24,7 +24,7 @@ package com.sun.star.comp.helper;
 The first one is commonly used for singleton objects of the component
 context, that are raised on first-time retrieval of the key.
 You have to pass a com.sun.star.lang.XSingleComponentFactory
-or string (= service name) object for this.
+or string (=gt; service name) object for this.
 /p
 */
 public class ComponentContextEntry
diff --git a/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java 
b/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java
index c7e3ded..32610a3 100644
--- a/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java
+++ b/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java
@@ -29,10 +29,10 @@ import com.sun.star.registry.XRegistryKey;
  *
  * The codeSharedLibraryLoader/code class provides the functionality of 
the codecom.sun.star.loader.SharedLibrary/code
  * service.
- * p
+ *
+ * See also UNOIDL codecom.sun.star.lang.ServiceManager/code.
+ *
  * @see com.sun.star.loader.SharedLibrary
- * @see com.sun.star.comp.servicemanager.ServiceManager
- * @see com.sun.star.lang.ServiceManager
  */
 public class SharedLibraryLoader {
 /**
@@ -77,13 +77,14 @@ public class SharedLibraryLoader {
  * The defaults are shlibloader.uno
  * for the library and com.sun.star.comp.stoc.DLLComponentLoader
  * for the component name.
- * p
+ *
+ * See also UNOIDL codecom.sun.star.lang.ServiceManager/code and
+ * codecom.sun.star.registry.RegistryKey/code.
+ *
  * @return  the factory for the 
com.sun.star.comp.stoc.DLLComponentLoader component.
  * @param   smgrthe ServiceManager
  * @param   regKey  the root registry key
  * @see com.sun.star.loader.SharedLibrary
- * @see com.sun.star.lang.ServiceManager
- * @see com.sun.star.registry.RegistryKey
  

[Libreoffice-commits] core.git: javaunohelper/com javaunohelper/Jar_juh.mk odk/Package_javadoc.mk odk/source

2013-08-29 Thread Stephan Bergmann
 javaunohelper/Jar_juh.mk|1 
 javaunohelper/com/sun/star/comp/helper/UnoInfo.java |  107 
 odk/Package_javadoc.mk  |2 
 odk/source/com/sun/star/lib/loader/Loader.java  |   50 -
 4 files changed, 1 insertion(+), 159 deletions(-)

New commits:
commit 617c5e44e13eb12dd58559289bc83def9f2b77e9
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Aug 29 11:40:11 2013 +0200

[API CHANGE] Remove obsolete com.sun.star.comp.helper.UnoInfo

It had originally been used in the SDK's Simple Bootstrap for Java,
com.sun.star.lib.loader.Loader class, but only left in there for backwards
compatibility with pre--three-layer OOo versions (i.e.,  OOo 3) when that
Loader was switched to use the unoinfo executable with the fix for #i88687#
C++/Java Simple Bootstrap broken in 
e2b7ea631a5e7297346ec826527a019e2baca020
INTEGRATION: CWS sb87 (1.5.10); FILE MERGED: 2008/05/07 11:34:25 sb
1.5.10.1: #i88687# let Loader call new unoinfo instead of old juh.jar
UnoInfo.getJars.

Recent work in AOO to undo three-layer caused AOO to now accidentally use 
the
backwards-compatibility code, so AOO ran into a problem that they solved 
with a
change to com.sun.star.comp.helper.UnoInfo that LO erroneously merged in as
95ada2d65f6d20f2a04599ac132fa632d66d Related: #i122483# set correct
classpath, include unoil.jar.

The better approach is to get rid of that backwards-compatibility code and
remove the obsolete UnoInfo class.  While this is nominally incompatible, in
practice no other client code but the SDK's com.sun.star.lib.loader.Loader
should ever have used it (it should have been designed as a private 
interface
for just that one client from the start, anyway).  Java applications using
Simple Bootstrap and built against old versions of the SDK (post the fix
for #i88687# and its introduction of the unoinfo exectuable in OOo 3) will
continue to work against new LO versions (as the backwards-compatibility 
code
that would call the removed UnoInfo class will not be triggered anyway; and 
even
if it were, all resulting exceptions would be caught and the new code path 
using
the unoinfo executable be chosen then).  Likewise, Java applications using
Simple Bootstrap and built against the new SDK will continue to work 
against
old OOo/LO/AOO vesions as far back as the fix for #i88687# and its 
introduction
of the unoinfo exectuable in OOo 3.

Change-Id: I64824ed002c3ccdf6912eab67499beb0c423081e

diff --git a/javaunohelper/Jar_juh.mk b/javaunohelper/Jar_juh.mk
index a4f1f4c..32f7449 100644
--- a/javaunohelper/Jar_juh.mk
+++ b/javaunohelper/Jar_juh.mk
@@ -26,7 +26,6 @@ $(eval $(call gb_Jar_add_sourcefiles,juh,\
 javaunohelper/com/sun/star/comp/helper/ComponentContext \
 javaunohelper/com/sun/star/comp/helper/ComponentContextEntry \
 javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader \
-javaunohelper/com/sun/star/comp/helper/UnoInfo \
 javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter \
 
javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter \
 
javaunohelper/com/sun/star/lib/uno/adapter/OutputStreamToXOutputStreamAdapter \
diff --git a/javaunohelper/com/sun/star/comp/helper/UnoInfo.java 
b/javaunohelper/com/sun/star/comp/helper/UnoInfo.java
deleted file mode 100644
index 67a3594..000
--- a/javaunohelper/com/sun/star/comp/helper/UnoInfo.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the License); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package com.sun.star.comp.helper;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-/**
- * UnoInfo offers functionality to obtain the UNO jar files.
- */
-public final class UnoInfo {
-
-/**
- * do not instantiate
- */
-private UnoInfo() {}
-
-/**
- * Gets the URL base.
- *
- * @return the URL base
- */
-private static String getBase() {
-
-final String JUHJAR = /juh.jar;
-
-String base = null;
-
-URLClassLoader cl = (URLClassLoader) 

[Libreoffice-commits] core.git: javaunohelper/com

2013-06-11 Thread Jürgen Schmidt
 javaunohelper/com/sun/star/comp/helper/UnoInfo.java |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 95ada2d65f6d20f2a04599ac132fa632d66d
Author: Jürgen Schmidt j...@apache.org
Date:   Tue Jun 11 14:59:25 2013 +

Related: #i122483# set correct classpath, include unoil.jar

(cherry picked from commit d8a724835732e8111a8798484d63202fc90f93f9)

Change-Id: Iaf4d90a111c5adf15817c7c1360e4bfad0ee9148

diff --git a/javaunohelper/com/sun/star/comp/helper/UnoInfo.java 
b/javaunohelper/com/sun/star/comp/helper/UnoInfo.java
index c26dda1..67a3594 100644
--- a/javaunohelper/com/sun/star/comp/helper/UnoInfo.java
+++ b/javaunohelper/com/sun/star/comp/helper/UnoInfo.java
@@ -90,7 +90,8 @@ public final class UnoInfo {
 String[] jarFileNames = new String[] {
 jurt.jar,
 ridl.jar,
-juh.jar };
+juh.jar,
+unoil.jar };
 
 return getURLs( jarFileNames );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: javaunohelper/com javaunohelper/Jar_juh.mk javaunohelper/util postprocess/Rdb_services.mk Repository.mk scp2/source smoketest/data smoketest/Jar_smoketest.mk smoketest/

2013-05-07 Thread Stephan Bergmann
 Repository.mk|
1 
 javaunohelper/Jar_juh.mk |
5 
 javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java   |   
52 ---
 javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java |  
142 -
 javaunohelper/util/juh.component |   
25 -
 javaunohelper/util/manifest  |
1 
 postprocess/Rdb_services.mk  |
1 
 scp2/source/ooo/file_ooo.scp |
1 
 scp2/source/ooo/module_hidden_ooo.scp|
1 
 smoketest/Jar_smoketest.mk   |   
29 ++
 smoketest/Module_smoketest.mk|
1 
 smoketest/data/Basic/Standard/Test_Ext.xml   |
2 
 smoketest/org/libreoffice/smoketest/Services.java|   
51 +++
 smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java |  
143 ++
 smoketest/org/libreoffice/smoketest/manifest |
3 
 smoketest/org/libreoffice/smoketest/smoketest.component  |   
25 +
 ure/Rdb_ure.mk   |
1 
 17 files changed, 257 insertions(+), 227 deletions(-)

New commits:
commit ff9fbfd9c9e9a1caa72601df951a7fd85eb8fcc1
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue May 7 16:46:46 2013 +0200

Extract SmoketestCommandEnvironment.java from juh.jar

...into a new smoketest.jar, so that URE juh.jar no longer depends on 
non-URE
unoil.jar.

Change-Id: I8937c78d8af6e2f82ada5dd80c322f8bca5ec2f5

diff --git a/Repository.mk b/Repository.mk
index e04e7ec..0160fe7 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -758,6 +758,7 @@ $(eval $(call gb_Helper_register_jars,OOO, \
reportbuilder \
reportbuilderwizard \
sdbc_hsqldb \
+   smoketest \
table \
unoil \
web \
diff --git a/javaunohelper/Jar_juh.mk b/javaunohelper/Jar_juh.mk
index 1df8c67..a4f1f4c 100644
--- a/javaunohelper/Jar_juh.mk
+++ b/javaunohelper/Jar_juh.mk
@@ -12,7 +12,6 @@ $(eval $(call gb_Jar_Jar,juh))
 $(eval $(call gb_Jar_use_jars,juh,\
 jurt \
 ridl \
-unoil \
 ))
 
 $(eval $(call gb_Jar_set_packageroot,juh,com))
@@ -21,17 +20,13 @@ $(eval $(call gb_Jar_add_manifest_classpath,juh,ridl.jar 
jurt.jar ../../lib/ ../
 
 $(eval $(call gb_Jar_set_manifest,juh,$(SRCDIR)/javaunohelper/util/manifest))
 
-$(eval $(call gb_Jar_set_componentfile,juh,javaunohelper/util/juh,URE))
-
 $(eval $(call gb_Jar_add_sourcefiles,juh,\
-javaunohelper/com/sun/star/comp/JavaUNOHelperServices \
 javaunohelper/com/sun/star/comp/helper/Bootstrap \
 javaunohelper/com/sun/star/comp/helper/BootstrapException \
 javaunohelper/com/sun/star/comp/helper/ComponentContext \
 javaunohelper/com/sun/star/comp/helper/ComponentContextEntry \
 javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader \
 javaunohelper/com/sun/star/comp/helper/UnoInfo \
-javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment \
 javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter \
 
javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter \
 
javaunohelper/com/sun/star/lib/uno/adapter/OutputStreamToXOutputStreamAdapter \
diff --git a/javaunohelper/util/manifest b/javaunohelper/util/manifest
index 2620d33..f89dc54 100644
--- a/javaunohelper/util/manifest
+++ b/javaunohelper/util/manifest
@@ -1,3 +1,2 @@
 Sealed: true
-RegistrationClassName: com.sun.star.comp.JavaUNOHelperServices
 UNO-Type-Path: 
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index be86ff7..2035446 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -232,6 +232,7 @@ $(eval $(call gb_Rdb_add_components,services,\
xmerge/source/bridge/XMergeBridge \
scripting/java/ScriptFramework \
scripting/java/ScriptProviderForJava \
+   smoketest/org/libreoffice/smoketest/smoketest \
wizards/com/sun/star/wizards/form/form \
connectivity/source/drivers/hsqldb/hsqldb \
connectivity/source/drivers/jdbc/jdbc \
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index a52f78b..0579cff 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -311,6 +311,7 @@ End
 
 #ifdef SOLAR_JAVA
 STD_JAR_FILE( gid_File_Jar_Report, report )
+STD_JAR_FILE( gid_File_Jar_Smoketest, smoketest )
 STD_JAR_FILE( gid_File_Jar_Table, table )
 STD_JAR_FILE( gid_File_Jar_Form, form )
 STD_JAR_FILE( gid_File_Jar_Query, query )
diff --git a/scp2/source/ooo/module_hidden_ooo.scp 

[Libreoffice-commits] core.git: javaunohelper/com jurt/com

2013-04-25 Thread Stephan Bergmann
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java |   25 -
 jurt/com/sun/star/comp/servicemanager/ServiceManager.java |  272 --
 2 files changed, 8 insertions(+), 289 deletions(-)

New commits:
commit 57a14ea0bed679c4b120c0371ab5316faf7c883f
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Apr 25 13:58:29 2013 +0200

Clean up Java ServiceManager bootstrapping

...and remove the unused feature of initializing it with an obsolete
XSimpleRegistry.

Change-Id: I333dae51f67c16da3e6822ba81e4b8ca125188a5

diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java 
b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 2087aec..989e283 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -23,11 +23,11 @@ package com.sun.star.comp.helper;
 import com.sun.star.bridge.UnoUrlResolver;
 import com.sun.star.bridge.XUnoUrlResolver;
 import com.sun.star.comp.loader.JavaLoader;
+import com.sun.star.comp.servicemanager.ServiceManager;
 import com.sun.star.container.XSet;
 import com.sun.star.lang.XInitialization;
 import com.sun.star.lang.XMultiServiceFactory;
 import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XSingleComponentFactory;
 import com.sun.star.lib.util.NativeLibraryLoader;
 import com.sun.star.loader.XImplementationLoader;
 import com.sun.star.uno.UnoRuntime;
@@ -98,19 +98,10 @@ public class Bootstrap {
 static public XComponentContext createInitialComponentContext( 
HashtableString, Object context_entries )
 throws Exception
 {
+ServiceManager xSMgr = new ServiceManager();
+
 XImplementationLoader xImpLoader = UnoRuntime.queryInterface(
 XImplementationLoader.class, new JavaLoader() );
-
-// Get the factory of the ServiceManager
-XSingleComponentFactory smgr_fac = UnoRuntime.queryInterface(
-XSingleComponentFactory.class, xImpLoader.activate(
-com.sun.star.comp.servicemanager.ServiceManager, null, null, 
null ) );
-
-// Create an instance of the ServiceManager
-XMultiComponentFactory xSMgr = UnoRuntime.queryInterface(
-XMultiComponentFactory.class, smgr_fac.createInstanceWithContext( 
null ) );
-
-// post init loader
 XInitialization xInit = UnoRuntime.queryInterface(
 XInitialization.class, xImpLoader );
 Object[] args = new Object [] { xSMgr };
@@ -126,16 +117,10 @@ public class Bootstrap {
 // ... xxx todo: add standard entries
 XComponentContext xContext = new ComponentContext( context_entries, 
null );
 
-// post init smgr
-xInit = UnoRuntime.queryInterface(
-XInitialization.class, xSMgr );
-args = new Object [] { null, xContext }; // no registry, default 
context
-xInit.initialize( args );
+xSMgr.setDefaultContext(xContext);
 
 XSet xSet = UnoRuntime.queryInterface( XSet.class, xSMgr );
-// insert the service manager
-xSet.insert( smgr_fac );
-// and basic jurt factories
+// insert basic jurt factories
 insertBasicFactories( xSet, xImpLoader );
 
 return xContext;
diff --git a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java 
b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
index a76120a..dd595e7 100644
--- a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
+++ b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
@@ -18,7 +18,6 @@
 
 package com.sun.star.comp.servicemanager;
 
-import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.Collections;
 
@@ -27,15 +26,11 @@ import com.sun.star.container.XEnumeration;
 import com.sun.star.container.XSet;
 import com.sun.star.lang.XComponent;
 import com.sun.star.lang.XEventListener;
-import com.sun.star.lang.XInitialization;
 import com.sun.star.lang.XMultiComponentFactory;
 import com.sun.star.lang.XMultiServiceFactory;
 import com.sun.star.lang.XServiceInfo;
 import com.sun.star.lang.XSingleComponentFactory;
 import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.loader.XImplementationLoader;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.registry.XSimpleRegistry;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.uno.XComponentContext;
 
@@ -52,7 +47,6 @@ import com.sun.star.uno.XComponentContext;
  * @see com.sun.star.container.XContentEnumerationAccess
  * @see com.sun.star.lang.XComponent
  * @see com.sun.star.lang.XServiceInfo
- * @see com.sun.star.lang.XInitialization
  * @since   UDK1.0
  */
 public class ServiceManager implements XMultiServiceFactory,
@@ -60,8 +54,7 @@ public class ServiceManager implements XMultiServiceFactory,
XSet,
XContentEnumerationAccess,