[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2022-08-26 Thread Caolán McNamara (via logerrit)
 qadevOOo/runner/util/DesktopTools.java |4 
 qadevOOo/tests/java/ifc/i18n/_XTransliteration.java|   14 ++
 qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java   |2 --
 qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java |4 +---
 4 files changed, 3 insertions(+), 21 deletions(-)

New commits:
commit f3ee5a0d2ee88bcde84cdb43e9b22bbc6c0be1af
Author: Caolán McNamara 
AuthorDate: Fri Aug 26 08:40:14 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 26 12:32:21 2022 +0200

cid#1509239 DCN: Don't Catch NullPointer Exception

and

cid#1509234 DCN: Don't Catch NullPointer Exception
cid#1509229 DCN: Don't Catch NullPointer Exception
cid#1509219 DCN: Don't Catch NullPointer Exception
cid#1509216 DCN: Don't Catch NullPointer Exception

Change-Id: Iab1512b4e5ecd632104a58b1fc09ef150825f498
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138859
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/qadevOOo/runner/util/DesktopTools.java 
b/qadevOOo/runner/util/DesktopTools.java
index 1c1b04402838..c78e450ae721 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -339,10 +339,6 @@ public class DesktopTools
 {
 System.out.println("Couldn't close document");
 }
-catch (NullPointerException e)
-{
-System.out.println("Couldn't close document");
-}
 catch (com.sun.star.beans.PropertyVetoException e)
 {
 System.out.println("Couldn't close document");
diff --git a/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java 
b/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java
index d041d425dbbe..eff58351f20e 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java
@@ -338,12 +338,7 @@ public class _XTransliteration extends MultiMethodTest {
 log.println("('" + str1 + "', " + p1 + ", " + len1 + ", '" +
 str2 + "', " + p2 + ", " + len2 + ")");
 
-res = -666 ;
-try {
-res = oObj.compareSubstring(str2, p2, len2, str1, p1, len1);
-} catch (NullPointerException e) {
-log.println("Exception while method calling occurs :" + e);
-}
+res = oObj.compareSubstring(str2, p2, len2, str1, p1, len1);
 
 if (res != -expRes) {
 log.print("Comparing FAILED; return: " + res + ", expected: " +
@@ -424,12 +419,7 @@ public class _XTransliteration extends MultiMethodTest {
 
 if (!testReverse) return ret ;
 
-res = -666 ;
-try {
-res = oObj.compareString(str2, str1);
-} catch (NullPointerException e) {
-log.println("Exception while method calling occurs :" + e);
-}
+res = oObj.compareString(str2, str1);
 
 if (res == -expRes) {
 log.println("Comparing of '" + str2 + "' and '" + str1 + "' OK" );
diff --git a/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java 
b/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java
index 436901258d98..e0591afc2566 100644
--- a/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java
@@ -149,8 +149,6 @@ public class ScTableSheetObj extends TestCase {
 log.println("Couldn't close document");
 } catch (com.sun.star.lang.DisposedException e) {
 log.println("Document already disposed");
-} catch (NullPointerException e) {
-log.println("Couldn't get XCloseable");
 }
 
 util.utils.pause(500);
diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java 
b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java
index 8e694058b9a3..64de47ec088a 100644
--- a/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java
+++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTabBar.java
@@ -125,8 +125,6 @@ public class AccessibleTabBar extends TestCase {
 closer.close(true);
 } catch (com.sun.star.util.CloseVetoException e) {
 log.println("Couldn't close document " + e.getMessage());
-} catch (NullPointerException e) {
-log.println("Couldn't close document " + e.getMessage());
 }
 }
-}
\ No newline at end of file
+}


[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2022-08-18 Thread Caolán McNamara (via logerrit)
 qadevOOo/runner/util/DBTools.java  |5 -
 qadevOOo/tests/java/mod/_dbaccess/ORowSet.java |1 -
 2 files changed, 6 deletions(-)

New commits:
commit 1528f6935e5f63103c6a4e901394fca46c243627
Author: Caolán McNamara 
AuthorDate: Thu Aug 18 10:19:13 2022 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 18 16:37:31 2022 +0200

cid#1327197 UwF: Unwritten field

Change-Id: Ib132101078a67803d21393c875e55f7a7bf8d225
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138471
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/qadevOOo/runner/util/DBTools.java 
b/qadevOOo/runner/util/DBTools.java
index 387ba57e8b57..1803395793ea 100644
--- a/qadevOOo/runner/util/DBTools.java
+++ b/qadevOOo/runner/util/DBTools.java
@@ -89,10 +89,6 @@ public class DBTools {
 * @see com.sun.star.sdb.DataSource
 */
 public class DataSourceInfo {
-/**
-* Representation of 'Name' property.
-*/
-public String Name = null ;
 /**
 * Representation of 'URL' property.
 */
@@ -127,7 +123,6 @@ public class DBTools {
 XPropertySet props = UnoRuntime.queryInterface
 (XPropertySet.class, src) ;
 
-if (Name != null) props.setPropertyValue("Name", Name) ;
 if (URL != null) props.setPropertyValue("URL", URL) ;
 if (Info != null) props.setPropertyValue("Info", Info) ;
 if (User != null) props.setPropertyValue("User", User) ;
diff --git a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java 
b/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
index 6e0a758e00d4..7ed3f7001311 100644
--- a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
+++ b/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
@@ -253,7 +253,6 @@ public class ORowSet extends TestCase {
 if (isMySQLDB)
 {
 DBTools.DataSourceInfo legacyDescriptor = 
dbTools.newDataSourceInfo();
-legacyDescriptor.Name = null;
 legacyDescriptor.User = srcInf.User;
 legacyDescriptor.Password = srcInf.Password;
 legacyDescriptor.Info = srcInf.Info;


[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests reportbuilder/java

2022-08-12 Thread Andrea Gelmini (via logerrit)
 qadevOOo/runner/helper/ConfigHelper.java   
  |2 +-
 qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java   
  |2 +-
 
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/TableCellLayoutController.java
 |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 59a51e0a83f8e88a501fd4264ecac812cce09e6f
Author: Andrea Gelmini 
AuthorDate: Fri Aug 12 11:24:41 2022 +0200
Commit: Julien Nabet 
CommitDate: Fri Aug 12 13:24:49 2022 +0200

Fix typos

Change-Id: I67e6e34265342b56bb922d2d9fc3a3385c8990d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138182
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/qadevOOo/runner/helper/ConfigHelper.java 
b/qadevOOo/runner/helper/ConfigHelper.java
index 73953c1c7d80..3bdd0a981ac5 100644
--- a/qadevOOo/runner/helper/ConfigHelper.java
+++ b/qadevOOo/runner/helper/ConfigHelper.java
@@ -153,7 +153,7 @@ public class ConfigHelper
  * to create a new group. This group is specific to its set and
  * creates defined entries.
  * @return The [inserted] group of the set
- * @param groupName The name of the goup which should be returned
+ * @param groupName The name of the group which should be returned
  * @param setName The name of the set
  * @throws com.sun.star.uno.Exception throws
  * com.sun.star.uno.Exception on any error.
diff --git a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java 
b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java
index 39aabf688faa..5557924edde1 100644
--- a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java
+++ b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java
@@ -167,7 +167,7 @@ public class _XSingleSelectQueryAnalyzer extends 
MultiMethodTest {
 }
 
 /**
-* Object relation xComposer set a goup. This group
+* Object relation xComposer set a group. This group
 * must returned while calling getGroup
 */
 public void _getGroup() {
diff --git 
a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/TableCellLayoutController.java
 
b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/TableCellLayoutController.java
index b61c640bf5e5..10113dfe82bd 100644
--- 
a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/TableCellLayoutController.java
+++ 
b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/TableCellLayoutController.java
@@ -43,7 +43,7 @@ import 
org.pentaho.reporting.libraries.base.util.ObjectUtilities;
 
 /**
  * Before writing the table cell, we have to evaluate the children of the 
cell. The cell itself can either be empty or it
- * has one ore more paragraphs inside. The paragraph contains a single report 
element, but may contain additional
+ * has one or more paragraphs inside. The paragraph contains a single report 
element, but may contain additional
  * other content.
  *
  * @since 05.03.2007


[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2019-08-12 Thread Andrea Gelmini (via logerrit)
 qadevOOo/runner/helper/ProcessHandler.java  |4 ++--
 qadevOOo/runner/lib/MultiPropertyTest.java  |2 +-
 qadevOOo/runner/util/PropertyName.java  |2 +-
 qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java|4 ++--
 qadevOOo/tests/java/ifc/awt/tree/_XTreeNode.java|2 +-
 qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java   |2 +-
 qadevOOo/tests/java/ifc/datatransfer/clipboard/_XClipboard.java |2 +-
 qadevOOo/tests/java/ifc/document/_XDocumentInsertable.java  |2 +-
 qadevOOo/tests/java/ifc/form/_XGrid.java|2 +-
 qadevOOo/tests/java/ifc/form/_XReset.java   |6 +++---
 10 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit b03ce74f899bcc2094d50c174a5b94b123cfbf25
Author: Andrea Gelmini 
AuthorDate: Sun Aug 11 19:36:48 2019 +0200
Commit: Julien Nabet 
CommitDate: Mon Aug 12 11:49:02 2019 +0200

Fix typos

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

diff --git a/qadevOOo/runner/helper/ProcessHandler.java 
b/qadevOOo/runner/helper/ProcessHandler.java
index cb61de76ee2b..49aba431a50e 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -156,7 +156,7 @@ public class ProcessHandler
  *  process to exit and return its status.
  *
  *  timeOut = 0
- *  Waits for the process to end regulary
+ *  Waits for the process to end regularly
  *
  */
 private ProcessHandler(String cmdLine, PrintWriter log, File workDir, 
String[] envVars) throws UnsupportedEncodingException
@@ -383,7 +383,7 @@ public class ProcessHandler
 
 /**
  *  If the timeout only given by setProcessTimeout(int seconds) function 
is != 0,
- *  a extra thread is created and after time has run out, the 
ProcessKiller string
+ *  an extra thread is created and after time has run out, the 
ProcessKiller string
  *  given by function setProcessKiller(string) will execute.
  *  So it is possible to kill a running office after a given time of 
seconds.
  */
diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java 
b/qadevOOo/runner/lib/MultiPropertyTest.java
index 4c63b4c45f67..54e7122c4baa 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -231,7 +231,7 @@ public class MultiPropertyTest extends MultiMethodTest
  * XPropertySet.setPropertyValue, else indicates
  * normal method completion.
  *
- * If the property is READ_ONLY, than either PropertyVetoException
+ * If the property is READ_ONLY, then either PropertyVetoException
  * should be thrown or the value of property should not have changed
  * (resValue is compared with oldValue with compare method).
  *
diff --git a/qadevOOo/runner/util/PropertyName.java 
b/qadevOOo/runner/util/PropertyName.java
index 17f04a905156..4812bd7f6f2c 100644
--- a/qadevOOo/runner/util/PropertyName.java
+++ b/qadevOOo/runner/util/PropertyName.java
@@ -81,7 +81,7 @@ public interface PropertyName {
 String LOG_WRITER = "LogWriter";
 /**
  * parameter name: "TimeOut"
- * time out given in milli seconds
+ * time out given in milliseconds
  * This parameter contains the timeout used
  * by the watcher
  */
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java 
b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java
index a11b868615c2..d9ab32613249 100644
--- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java
+++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java
@@ -172,7 +172,7 @@ public class _XAccessibleValue extends MultiMethodTest {
 log.println("If one sets the maximum value of a scroll bar 
with XScrollBar::setMaximum(),"+
 "then XScrollBar::getValue() returns the maximum value minus 
the visible size of"+
 "the thumb");
-//using abitrary Value, since we can't determine the resulting 
value
+//using arbitrary Value, since we can't determine the 
resulting value
 partResult = resVal > 10;
 }
 
@@ -196,7 +196,7 @@ public class _XAccessibleValue extends MultiMethodTest {
 log.println("If one sets the maximum value of a scroll bar 
with XScrollBar::setMaximum(),"+
 "then XScrollBar::getValue() returns the maximum value minus 
the visible size of"+
 "the thumb");
-//using abitrary Value, since we can't determine the resulting 
value
+//using arbitrary Value, since we can't determine 

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests testtools/source

2019-07-30 Thread Andrea Gelmini (via logerrit)
 qadevOOo/runner/helper/APIDescGetter.java   |2 +-
 qadevOOo/tests/java/mod/_connector/uno/package.html |2 +-
 qadevOOo/tests/java/mod/_connectr/package.html  |2 +-
 testtools/source/performance/ubtest.cxx |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7166b64c9ac101a0dc1363c31f892095a2097cbe
Author: Andrea Gelmini 
AuthorDate: Tue Jul 30 07:43:51 2019 +0200
Commit: Julien Nabet 
CommitDate: Tue Jul 30 23:04:38 2019 +0200

Fix typo in code

"connectr"

Please look at:
https://gerrit.libreoffice.org/#/c/76543/1

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

diff --git a/qadevOOo/runner/helper/APIDescGetter.java 
b/qadevOOo/runner/helper/APIDescGetter.java
index 25a2db220357..65f8da05c99d 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -942,7 +942,7 @@ public class APIDescGetter extends DescGetter
 ArrayList removed = new ArrayList();
 removed.add("acceptor");
 removed.add("brdgfctr");
-removed.add("connectr");
+removed.add("connector");
 removed.add("corefl");
 removed.add("cpld");
 removed.add("defreg");
diff --git a/qadevOOo/tests/java/mod/_connector/uno/package.html 
b/qadevOOo/tests/java/mod/_connector/uno/package.html
index e4d67d4bdd8c..c9ff7b2b5596 100644
--- a/qadevOOo/tests/java/mod/_connector/uno/package.html
+++ b/qadevOOo/tests/java/mod/_connector/uno/package.html
@@ -18,6 +18,6 @@
 -->
 
 
-Contains all test cases for the module 'connectr'.
+Contains all test cases for the module 'connector'.
 
 
diff --git a/qadevOOo/tests/java/mod/_connectr/package.html 
b/qadevOOo/tests/java/mod/_connectr/package.html
index e4d67d4bdd8c..c9ff7b2b5596 100644
--- a/qadevOOo/tests/java/mod/_connectr/package.html
+++ b/qadevOOo/tests/java/mod/_connectr/package.html
@@ -18,6 +18,6 @@
 -->
 
 
-Contains all test cases for the module 'connectr'.
+Contains all test cases for the module 'connector'.
 
 
diff --git a/testtools/source/performance/ubtest.cxx 
b/testtools/source/performance/ubtest.cxx
index cc17f097d1b8..283e73d699c9 100644
--- a/testtools/source/performance/ubtest.cxx
+++ b/testtools/source/performance/ubtest.cxx
@@ -342,7 +342,7 @@ static void createInstance( Reference< T > & rxOut,
 xMgr, Reference< XRegistryKey >() ) ) );
 // connector
 xSet->insert( makeAny( loadLibComponentFactory(
-OUString("connectr"),
+OUString("connector"),
 OUString("com.sun.star.comp.stoc.Connector"),
 xMgr, Reference< XRegistryKey >() ) ) );
 // iiop bridge
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests stoc/source sw/qa sw/source

2018-01-18 Thread Andrea Gelmini
 qadevOOo/runner/util/DBTools.java   |2 +-
 qadevOOo/tests/java/ifc/awt/_XDialog.java   |2 +-
 stoc/source/javaloader/javaloader.cxx   |2 +-
 sw/qa/extras/ooxmlexport/ooxmlw14export.cxx |2 +-
 sw/source/core/draw/dflyobj.cxx |2 +-
 sw/source/core/inc/rowfrm.hxx   |2 +-
 sw/source/core/text/txtfrm.cxx  |2 +-
 sw/source/filter/ww8/wrtw8sty.cxx   |2 +-
 sw/source/filter/xml/xmltbli.cxx|2 +-
 sw/source/ui/vba/vbaparagraphformat.cxx |2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 66d0e154dcf1fc1fe7b80dd4ac56fa90aa6cbe38
Author: Andrea Gelmini 
Date:   Thu Jan 18 09:43:12 2018 +0100

Fix typos

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

diff --git a/qadevOOo/runner/util/DBTools.java 
b/qadevOOo/runner/util/DBTools.java
index 52fb344b1bf2..387ba57e8b57 100644
--- a/qadevOOo/runner/util/DBTools.java
+++ b/qadevOOo/runner/util/DBTools.java
@@ -225,7 +225,7 @@ public class DBTools {
 * Convert system pathname to SOffice URL string
 * (for example 'C:\Temp\DBDir\' -> 'file:///C|/Temp/DBDir/').
 * (for example '\\server\Temp\DBDir\' -> 'file://server/Temp/DBDir/').
-* Already converted string retured unchanged.
+* Already converted string returned unchanged.
 */
 public static String dirToUrl(String dir) {
 String retVal = null;
diff --git a/qadevOOo/tests/java/ifc/awt/_XDialog.java 
b/qadevOOo/tests/java/ifc/awt/_XDialog.java
index 8b9f6aa527b7..65b4f47ae234 100644
--- a/qadevOOo/tests/java/ifc/awt/_XDialog.java
+++ b/qadevOOo/tests/java/ifc/awt/_XDialog.java
@@ -109,7 +109,7 @@ public class _XDialog extends MultiMethodTest {
 * finished. If execute method didn't return
 * and still running then thread interrupted. 
 * Has OK status if execute method
-* call successfully retured.
+* call successfully returned.
 * The following method tests are to be completed successfully before :
 * 
 *execute  
diff --git a/stoc/source/javaloader/javaloader.cxx 
b/stoc/source/javaloader/javaloader.cxx
index 0636e97c2236..cc2b74aae0c7 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -88,7 +88,7 @@ class JavaComponentLoader : public 
WeakImplHelpergetFrameArea().TopRight() : 
GetFlyFrame()->getFrameArea().Pos());
 
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index 1444630b0778..9ff22cc0a125 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -113,7 +113,7 @@ public:
 // should not consider the setting when the split is performed
 // (we should be able to keep on first page as little as required).
 // When IsInSplit is true, lcl_CalcMinRowHeight will ignore the
-// mininum height setting. It is set 

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2017-03-25 Thread Andrea Gelmini
 qadevOOo/runner/helper/APIDescGetter.java   |2 +-
 qadevOOo/runner/helper/ConfigHelper.java|2 +-
 qadevOOo/runner/lib/TestParameters.java |2 +-
 qadevOOo/runner/share/LogWriter.java|2 +-
 qadevOOo/runner/util/PropertyName.java  |2 +-
 qadevOOo/runner/util/utils.java |4 ++--
 qadevOOo/tests/java/ifc/accessibility/_XAccessibleEditableText.java |2 +-
 qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java|2 +-
 qadevOOo/tests/java/ifc/container/_XNameAccess.java |2 +-
 qadevOOo/tests/java/ifc/drawing/_XShapeCombiner.java|2 +-
 qadevOOo/tests/java/ifc/form/_XReset.java   |2 +-
 qadevOOo/tests/java/ifc/form/_XSubmit.java  |2 +-
 qadevOOo/tests/java/ifc/frame/_XController.java |2 +-
 qadevOOo/tests/java/ifc/frame/_XFrame.java  |2 +-
 qadevOOo/tests/java/ifc/frame/_XModuleManager.java  |2 +-
 qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java  |2 +-
 qadevOOo/tests/java/ifc/io/_XActiveDataControl.java |2 +-
 qadevOOo/tests/java/ifc/io/_XDataInputStream.java   |2 +-
 qadevOOo/tests/java/ifc/sdb/_XRowSetApproveBroadcaster.java |2 +-
 qadevOOo/tests/java/ifc/style/_ParagraphProperties.java |2 +-
 qadevOOo/tests/java/ifc/style/_XStyle.java  |2 +-
 qadevOOo/tests/java/ifc/text/_TextGraphicObject.java|2 +-
 qadevOOo/tests/java/ifc/text/_XTextTableCursor.java |2 +-
 qadevOOo/tests/java/ifc/util/_XURLTransformer.java  |2 +-
 qadevOOo/tests/java/mod/_forms/GenericModelTest.java|2 +-
 qadevOOo/tests/java/mod/_forms/ODatabaseForm.java   |2 +-
 qadevOOo/tests/java/mod/_sc/ScTabViewObj.java   |2 +-
 qadevOOo/tests/java/mod/_sw/SwXMailMerge.java   |2 +-
 qadevOOo/tests/java/mod/_sw/SwXNumberingRules.java  |2 +-
 qadevOOo/tests/java/mod/_toolkit/AccessibleComboBox.java|4 ++--
 30 files changed, 32 insertions(+), 32 deletions(-)

New commits:
commit 7f56e58148602f75b7b5f1860dc65c4620d0
Author: Andrea Gelmini 
Date:   Fri Mar 24 11:47:56 2017 +0100

Fix typos

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

diff --git a/qadevOOo/runner/helper/APIDescGetter.java 
b/qadevOOo/runner/helper/APIDescGetter.java
index 0de81db1779b..67520b9822fd 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -166,7 +166,7 @@ public class APIDescGetter extends DescGetter
 }
 else
 {
-//look the scenarion like this? :
+//look the scenario like this? :
 // sw.SwXBodyText,sw.SwXTextCursor
 ArrayList subs = getSubObjects(job);
 DescEntry[] entries = new DescEntry[subs.size()];
diff --git a/qadevOOo/runner/helper/ConfigHelper.java 
b/qadevOOo/runner/helper/ConfigHelper.java
index 2adadaf2e146..07772eb8f4f5 100644
--- a/qadevOOo/runner/helper/ConfigHelper.java
+++ b/qadevOOo/runner/helper/ConfigHelper.java
@@ -263,7 +263,7 @@ public class ConfigHelper
 XNameContainer.class,xGroup);
 } catch(com.sun.star.container.NoSuchElementException ex) {
  throw new com.sun.star.uno.Exception(ex,
-"could not get extensilbe group '"+extGroup+
+"could not get extensible group '"+extGroup+
 "' from group '"+ group +
 "' from set '"+ setName +"'");
 }
diff --git a/qadevOOo/runner/lib/TestParameters.java 
b/qadevOOo/runner/lib/TestParameters.java
index b5d033b6ad48..04467a9c85a9 100644
--- a/qadevOOo/runner/lib/TestParameters.java
+++ b/qadevOOo/runner/lib/TestParameters.java
@@ -203,4 +203,4 @@ public class TestParameters extends HashMap {
 return "unorc";
 }
 
-}// finish class TestParamenters
+}// finish class TestParameters
diff --git a/qadevOOo/runner/share/LogWriter.java 
b/qadevOOo/runner/share/LogWriter.java
index 0da81654eae8..44d4a2b7dc36 100644
--- a/qadevOOo/runner/share/LogWriter.java
+++ b/qadevOOo/runner/share/LogWriter.java
@@ -43,7 +43,7 @@ public interface LogWriter {
 /**
  * Set a Watcher to the LogWriter
  * This is useful if a test starts a new office instance by itself. In 
this cases
- * the LogWritter could retrigger the Watcher
+ * the 

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2017-01-16 Thread Michael Stahl
 qadevOOo/runner/util/FormTools.java  |  180 ++-
 qadevOOo/tests/java/ifc/drawing/_XControlShape.java  |4 
 qadevOOo/tests/java/ifc/view/_XControlAccess.java|4 
 qadevOOo/tests/java/mod/_forms/OFormsCollection.java |4 
 qadevOOo/tests/java/mod/_forms/OScrollBarModel.java  |4 
 qadevOOo/tests/java/mod/_forms/OSpinButtonModel.java |5 
 qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java |4 
 qadevOOo/tests/java/mod/_sw/SwXTextView.java |4 
 qadevOOo/tests/java/mod/_toolkit/TabController.java  |6 
 9 files changed, 99 insertions(+), 116 deletions(-)

New commits:
commit e5a502392431a49fe8c60eccf75fc150178f6c07
Author: Michael Stahl 
Date:   Mon Jan 16 15:24:56 2017 +0100

qadevOOo: remove silly exception catching from util.FormTools

What's the point of catching an exception and then continuing onwards in
a unit test?

Change-Id: I100dfcaa9a4fdd5398cf4ac38426ec4397451b8e

diff --git a/qadevOOo/runner/util/FormTools.java 
b/qadevOOo/runner/util/FormTools.java
index dd68221..2189612 100644
--- a/qadevOOo/runner/util/FormTools.java
+++ b/qadevOOo/runner/util/FormTools.java
@@ -57,33 +57,29 @@ public class FormTools {
  * @return the created XControlShape
 */
 public static XControlShape createControlShape( XComponent oDoc, int 
height,
-int width, int x, int y, String kind ) 
{
+int width, int x, int y, String kind )
+throws com.sun.star.uno.Exception
+{
 
  Size size = new Size();
 Point position = new Point();
 XControlShape oCShape = null;
 XControlModel aControl = null;
 
-//get MSF
 XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface( 
XMultiServiceFactory.class, oDoc );
 
-try{
-Object oInt = 
oDocMSF.createInstance("com.sun.star.drawing.ControlShape");
-Object aCon = 
oDocMSF.createInstance("com.sun.star.form.component."+kind);
-XPropertySet model_props = 
UnoRuntime.queryInterface(XPropertySet.class,aCon);
-
model_props.setPropertyValue("DefaultControl","com.sun.star.form.control."+kind);
-aControl = UnoRuntime.queryInterface( XControlModel.class, aCon );
-oCShape = UnoRuntime.queryInterface( XControlShape.class, oInt );
-size.Height = height;
-size.Width = width;
-position.X = x;
-position.Y = y;
-oCShape.setSize(size);
-oCShape.setPosition(position);
-} catch ( com.sun.star.uno.Exception e ) {
-// Some exception occurs.FAILED
-System.out.println( "Couldn't create instance "+ e );
-}
+Object oInt = 
oDocMSF.createInstance("com.sun.star.drawing.ControlShape");
+Object aCon = 
oDocMSF.createInstance("com.sun.star.form.component."+kind);
+XPropertySet model_props = 
UnoRuntime.queryInterface(XPropertySet.class,aCon);
+
model_props.setPropertyValue("DefaultControl","com.sun.star.form.control."+kind);
+aControl = UnoRuntime.queryInterface( XControlModel.class, aCon );
+oCShape = UnoRuntime.queryInterface( XControlShape.class, oInt );
+size.Height = height;
+size.Width = width;
+position.X = x;
+position.Y = y;
+oCShape.setSize(size);
+oCShape.setPosition(position);
 
 oCShape.setControl(aControl);
 
@@ -91,35 +87,29 @@ public class FormTools {
 } // finish createControlShape
 
 public static XControlShape createUnoControlShape( XComponent oDoc, int 
height,
-int width, int x, int y, String kind, 
String defControl ) {
+int width, int x, int y, String kind, 
String defControl )
+throws com.sun.star.uno.Exception
+{
 
  Size size = new Size();
 Point position = new Point();
 XControlShape oCShape = null;
 XControlModel aControl = null;
 
-//get MSF
-   XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface( 
XMultiServiceFactory.class, oDoc );
-
-   try{
- Object oInt = 
oDocMSF.createInstance("com.sun.star.drawing.ControlShape");
- Object aCon = 
oDocMSF.createInstance("com.sun.star.form.component."+kind);
- XPropertySet model_props = 
UnoRuntime.queryInterface(XPropertySet.class,aCon);
- 
model_props.setPropertyValue("DefaultControl","com.sun.star.awt."+defControl);
- aControl = UnoRuntime.queryInterface( XControlModel.class, aCon );
- oCShape = UnoRuntime.queryInterface( XControlShape.class, oInt );
- size.Height = height;
- size.Width = width;
- position.X = x;
- position.Y = y;
- oCShape.setSize(size);
- oCShape.setPosition(position);
-
-
-   } catch ( 

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2016-09-23 Thread Samuel Mehrbrodt
 qadevOOo/runner/util/DesktopTools.java  |   26 
+++---
 qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java   |8 +--
 qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java |3 -
 qadevOOo/tests/java/mod/_pcr/ObjectInspector.java   |   11 ++--
 qadevOOo/tests/java/mod/_pcr/ObjectInspectorModel.java  |9 +--
 qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java|3 -
 qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java |8 +--
 qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java   |8 +--
 qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java |8 +--
 qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java|8 +--
 qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java  |8 +--
 qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java   |8 +--
 qadevOOo/tests/java/mod/_sd/SdUnoPresView.java  |8 +--
 qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java |8 +--
 qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java   |7 +-
 qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java  |8 +--
 qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java  |7 +-
 qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java  |6 --
 qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java |5 -
 qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java |7 +-
 qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java|8 +--
 qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java   |9 ---
 qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java |   11 
 qadevOOo/tests/java/mod/_toolkit/AccessibleScrollBar.java   |   10 ---
 qadevOOo/tests/java/mod/_toolkit/AccessibleStatusBarItem.java   |   10 ---
 qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java  |   10 ---
 qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java |   10 ---
 qadevOOo/tests/java/mod/_toolkit/AccessibleToolBox.java |   10 ---
 qadevOOo/tests/java/mod/_toolkit/AccessibleToolBoxItem.java |   10 ---
 qadevOOo/tests/java/mod/_toolkit/AccessibleWindow.java  |   10 ---
 30 files changed, 68 insertions(+), 194 deletions(-)

New commits:
commit 065ef005e9c93db43efdb7733bf7371673fcbd17
Author: Samuel Mehrbrodt 
Date:   Fri Sep 23 09:34:17 2016 +0200

Make createDesktop return XDesktop, not Object

and adjust/cleanup calling instances

Change-Id: I6b7be34fe6fce0a6fdbf2227f3e565b2f434c88c
Reviewed-on: https://gerrit.libreoffice.org/29221
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/qadevOOo/runner/util/DesktopTools.java 
b/qadevOOo/runner/util/DesktopTools.java
index 3bc95dc..1650a04 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -58,11 +58,8 @@ public class DesktopTools
  */
 private static XComponentLoader getCLoader(XMultiServiceFactory xMSF)
 {
-XDesktop oDesktop = UnoRuntime.queryInterface(
-XDesktop.class, createDesktop(xMSF));
-
 XComponentLoader oCLoader = UnoRuntime.queryInterface(
-XComponentLoader.class, oDesktop);
+XComponentLoader.class, createDesktop(xMSF));
 
 return oCLoader;
 }
@@ -71,22 +68,23 @@ public class DesktopTools
  * Creates an Instance of the Desktop service
  *
  * @param xMSF the MultiServiceFactory
- * @return the gained Object
+ * @return the gained XDesktop object
  */
-public static Object createDesktop(XMultiServiceFactory xMSF)
+public static XDesktop createDesktop(XMultiServiceFactory xMSF)
 {
-Object oInterface;
+XDesktop xDesktop;
 
 try
 {
-oInterface = 
xMSF.createInstance("com.sun.star.comp.framework.Desktop");
+xDesktop = UnoRuntime.queryInterface(
+XDesktop.class, 
xMSF.createInstance("com.sun.star.comp.framework.Desktop"));
 }
 catch (com.sun.star.uno.Exception e)
 {
 throw new IllegalArgumentException("Desktop Service not 
available", e);
 }
 
-return oInterface;
+return xDesktop;
 }
 
 /**
@@ -96,9 +94,7 @@ public class DesktopTools
  */
 public static XEnumeration getAllComponents(XMultiServiceFactory xMSF)
 {
-XDesktop xDesktop = UnoRuntime.queryInterface(
-XDesktop.class, createDesktop(xMSF));
-return xDesktop.getComponents().createEnumeration();
+return createDesktop(xMSF).getComponents().createEnumeration();
 }
 
 
@@ -110,9 +106,7 @@ public class DesktopTools
  */
   

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests sw/qa

2016-05-27 Thread Noel Grandin
 qadevOOo/runner/util/utils.java|   77 
+++---
 qadevOOo/tests/java/ifc/configuration/backend/_XMultiLayerStratum.java |5 
 qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader.java   |2 
 sw/qa/complex/writer/CheckBookmarks.java   |2 
 4 files changed, 29 insertions(+), 57 deletions(-)

New commits:
commit fd964e3b9f60bf2043fdc39ab8161a586049b481
Author: Noel Grandin 
Date:   Thu May 26 13:13:31 2016 +0200

improve exception throwing in java class util.utils

so that we get nice stack traces in our test error logs instead of just
the title of the exception

Change-Id: I47f30d80b9efbc7dbeff7f4456755e416e577b5a
Reviewed-on: https://gerrit.libreoffice.org/25510
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 4788e3e..c535f62 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -230,9 +230,8 @@ public class utils {
 XPropertySet pthSettings = (XPropertySet) AnyConverter.toObject(
 new Type(XPropertySet.class), settings);
 return (String) pthSettings.getPropertyValue(setting);
-} catch (com.sun.star.uno.Exception e) {
-e.printStackTrace();
-throw new RuntimeException(e);
+} catch (com.sun.star.uno.Exception ex) {
+throw new RuntimeException(ex);
 }
 }
 
@@ -368,23 +367,11 @@ public class utils {
  * @param fileURL the file which existence should be checked
  * @return true if the file exists, else false
  */
-public static boolean fileExists(XMultiServiceFactory msf, String fileURL) 
{
-boolean exists = false;
-try {
-
-Object fileacc = 
msf.createInstance("com.sun.star.comp.ucb.SimpleFileAccess");
-XSimpleFileAccess simpleAccess = 
UnoRuntime.queryInterface(XSimpleFileAccess.class,
+public static boolean fileExists(XMultiServiceFactory msf, String fileURL) 
throws com.sun.star.uno.Exception {
+Object fileacc = 
msf.createInstance("com.sun.star.comp.ucb.SimpleFileAccess");
+XSimpleFileAccess simpleAccess = 
UnoRuntime.queryInterface(XSimpleFileAccess.class,
 fileacc);
-if (simpleAccess.exists(fileURL)) {
-exists = true;
-}
-
-} catch (Exception e) {
-System.out.println("Couldn't access file '" + fileURL + "'");
-e.printStackTrace();
-exists = false;
-}
-return exists;
+return simpleAccess.exists(fileURL);
 }
 
 /**
@@ -417,22 +404,22 @@ public class utils {
  * This method copies via office a given file to a new one
  * @param xMsf the multi service factory
  * @param source the source file
- * @param destinaion the destination file
+ * @param destination the destination file
  * @return true at success
  */
-public static boolean copyFile(XMultiServiceFactory xMsf, String source, 
String destinaion) {
+public static boolean copyFile(XMultiServiceFactory xMsf, String source, 
String destination) {
 boolean res = false;
 try {
 Object fileacc = 
xMsf.createInstance("com.sun.star.comp.ucb.SimpleFileAccess");
 XSimpleFileAccess simpleAccess = 
UnoRuntime.queryInterface(XSimpleFileAccess.class,
 fileacc);
-if (!simpleAccess.exists(destinaion)) {
-simpleAccess.copy(source, destinaion);
+if (!simpleAccess.exists(destination)) {
+simpleAccess.copy(source, destination);
 }
 
 res = true;
 } catch (Exception e) {
-System.out.println("Couldn't copy file '" + source + "' -> '" + 
destinaion + "'");
+System.out.println("Couldn't copy file '" + source + "' -> '" + 
destination + "'");
 e.printStackTrace();
 res = false;
 }
@@ -454,10 +441,8 @@ public class utils {
 simpleAccess.copy(oldF, newF);
 } catch (InteractiveAugmentedIOException e) {
 throw e;
-} catch (com.sun.star.uno.Exception e) {
-System.out.println("Couldn't copy " + oldF + " to " + newF + ":");
-e.printStackTrace();
-throw new RuntimeException(e);
+} catch (com.sun.star.uno.Exception ex) {
+throw new RuntimeException("Could not copy " + oldF + " to " + 
newF, ex);
 }
 }
 
@@ -500,15 +485,8 @@ public class utils {
  *
  */
 public static String getImplName(Object aObject) {
-String res = "Error getting Implementation name";
-try {
-XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class, 
aObject);
-res = xSI.getImplementationName();
-} catch 

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests xmerge/source

2016-01-29 Thread jan iversen
 qadevOOo/runner/graphical/FileHelper.java  
  |2 +
 qadevOOo/tests/java/ifc/i18n/_XCalendar.java   
  |   11 +-
 
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
 |4 +--
 3 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 3c28a0e3864edc2812a02dec2f80f09d6cf2bc73
Author: jan iversen 
Date:   Mon Jan 25 11:28:50 2016 +0100

cid#1326280, 1326295, 1326303

null pointer dereference, made test

Change-Id: I2bd820a2eb04499ab3b518d5b5e5f3ffe531
Reviewed-on: https://gerrit.libreoffice.org/21771
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/qadevOOo/runner/graphical/FileHelper.java 
b/qadevOOo/runner/graphical/FileHelper.java
index 88d4042..05acb5e 100644
--- a/qadevOOo/runner/graphical/FileHelper.java
+++ b/qadevOOo/runner/graphical/FileHelper.java
@@ -44,6 +44,8 @@ public class FileHelper
 String fs = System.getProperty("file.separator");
 if (! fs.equals("/"))
 {
+if (sSystemFile == null)
+   throw new IllegalStateException("sSystemFile is unexpected 
null");
 sSystemFile = sSystemFile.replace ('/', fs.toCharArray ()[0]);
 }
 // FEATURE FOR UNC NEED!!!
diff --git a/qadevOOo/tests/java/ifc/i18n/_XCalendar.java 
b/qadevOOo/tests/java/ifc/i18n/_XCalendar.java
index e04595a..129339b 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XCalendar.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XCalendar.java
@@ -76,15 +76,16 @@ public class _XCalendar extends MultiMethodTest {
 XLocaleData.class,
 tParam.getMSF().createInstance(
 "com.sun.star.i18n.LocaleData"));
+
+installed_locales = locData.getAllInstalledLocaleNames();
+calendars = new String[installed_locales.length][];
+count = new int[installed_locales.length];
+oObj.loadDefaultCalendar(installed_locales[0]);
 } catch (com.sun.star.uno.Exception e) {
 
 }
-installed_locales = locData.getAllInstalledLocaleNames();
-calendars = new String[installed_locales.length][];
-count = new int[installed_locales.length];
-oObj.loadDefaultCalendar(installed_locales[0]);
-aOriginalDTime = oObj.getDateTime();
 
+aOriginalDTime = oObj.getDateTime();
 debug = tParam.getBool("DebugIsActive");
 }
 
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
index ed7012d..a7b5463 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
@@ -88,8 +88,8 @@ public final class DocumentDeserializerImpl
 while (enumerate.hasNext()) {
 docOut = (DOMDocument) enumerate.next();
 }
-domDoc = docOut.getContentDOM();
 try {
+domDoc = docOut.getContentDOM();
 baos = transform(domDoc);
 sxwDoc.initContentDOM();
 DocumentBuilderFactory dFactory = 
DocumentBuilderFactory.newInstance();
@@ -184,4 +184,4 @@ public final class DocumentDeserializerImpl
 
 Debug.log(Debug.TRACE, str);
 }
-}
\ No newline at end of file
+}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests swext/mediawiki

2016-01-23 Thread jan iversen
 qadevOOo/runner/util/utils.java |3 
 qadevOOo/tests/java/ifc/awt/tree/_XTreeNode.java|   14 +-
 qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java   |3 
 swext/mediawiki/src/com/sun/star/wiki/MainThreadDialogExecutor.java |   54 
+-
 4 files changed, 41 insertions(+), 33 deletions(-)

New commits:
commit 77031644f16b63c794c1eef0ec4456d37e34fe23
Author: jan iversen 
Date:   Fri Jan 22 15:04:25 2016 +0100

cid#1326434, 1326446, 1326248, 1326254

null pointer dereferencing, added null check

Change-Id: I78f3ee1eb5d5bd4ebe7b3a6775db4884859dbcf6
Reviewed-on: https://gerrit.libreoffice.org/21712
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index c3f3458..8582f5f 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -587,7 +587,8 @@ public class utils {
 } catch (com.sun.star.uno.Exception e) {
 }
 
-xTrans.parseStrict(rUrl);
+if (xTrans != null)
+xTrans.parseStrict(rUrl);
 
 return rUrl[0];
 }
diff --git a/qadevOOo/tests/java/ifc/awt/tree/_XTreeNode.java 
b/qadevOOo/tests/java/ifc/awt/tree/_XTreeNode.java
index 971dab8..d766c96 100644
--- a/qadevOOo/tests/java/ifc/awt/tree/_XTreeNode.java
+++ b/qadevOOo/tests/java/ifc/awt/tree/_XTreeNode.java
@@ -137,12 +137,18 @@ public class _XTreeNode extends MultiMethodTest {
 }
 
 log.println("try to get parrent of children");
-XTreeNode xParrent = xNode.getParent();
+if (xNode == null) {
+log.println("missing xNode");
+tRes.tested("getParent()", false);
+}
+else {
+XTreeNode xParrent = xNode.getParent();
 
 
-bOK = oObj.equals(xParrent);
-log.println("original object and parrent should be the same: " + bOK);
-tRes.tested("getParent()", bOK);
+bOK = oObj.equals(xParrent);
+log.println("original object and parrent should be the same: " + 
bOK);
+tRes.tested("getParent()", bOK);
+}
 }
 
 
diff --git a/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java 
b/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java
index 082babb..597e44c 100644
--- a/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java
+++ b/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java
@@ -164,7 +164,8 @@ public class _DrawingDocumentDrawView extends 
MultiPropertyTest {
 }
 log.println("oldZoomValue: "+oldValue);
 log.println("newZoomValue: "+newValue);
-tRes.tested("ZoomType",(!oldValue.equals(newValue)));
+if (oldValue != null)
+tRes.tested("ZoomType",(!oldValue.equals(newValue)));
 }
 
 }
diff --git 
a/swext/mediawiki/src/com/sun/star/wiki/MainThreadDialogExecutor.java 
b/swext/mediawiki/src/com/sun/star/wiki/MainThreadDialogExecutor.java
index 784bc77..a6ee07f 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/MainThreadDialogExecutor.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/MainThreadDialogExecutor.java
@@ -60,40 +60,40 @@ public class MainThreadDialogExecutor implements XCallback
 
 private static boolean GetCallback( XComponentContext xContext, 
MainThreadDialogExecutor aExecutor )
 {
+if (aExecutor == null)
+  return false;
+
 try
 {
-if ( aExecutor != null )
-{
-String aThreadName = null;
-Thread aCurThread = Thread.currentThread();
-if ( aCurThread != null )
-aThreadName = aCurThread.getName();
+String aThreadName = null;
+Thread aCurThread = Thread.currentThread();
+if ( aCurThread != null )
+aThreadName = aCurThread.getName();
 
-if ( aThreadName != null && aThreadName.equals( 
"com.sun.star.thread.WikiEditorSendingThread" ) )
+if ( aThreadName != null && aThreadName.equals( 
"com.sun.star.thread.WikiEditorSendingThread" ) )
+{
+// the main thread should be accessed asynchronously
+XMultiComponentFactory xFactory = xContext.getServiceManager();
+if ( xFactory == null )
+throw new com.sun.star.uno.RuntimeException();
+
+XRequestCallback xRequest = UnoRuntime.queryInterface(
+XRequestCallback.class,
+xFactory.createInstanceWithContext( 
"com.sun.star.awt.AsyncCallback", xContext ) );
+if ( xRequest != null )
 {
-// the main thread should be accessed asynchronously
-XMultiComponentFactory xFactory = 
xContext.getServiceManager();
-if ( xFactory == null 

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2015-12-19 Thread Caolán McNamara
 qadevOOo/runner/helper/OfficeProvider.java |   30 +++--
 qadevOOo/runner/util/db/DataSource.java|8 ++-
 qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java|8 ++-
 qadevOOo/tests/java/mod/_dbaccess/ORowSet.java |5 +-
 qadevOOo/tests/java/mod/_defreg/NestedRegistry.java|   13 -
 qadevOOo/tests/java/mod/_nestedreg/uno/NestedRegistry.java |   13 -
 qadevOOo/tests/java/mod/_sc/ScModelObj.java|5 +-
 qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java|5 +-
 qadevOOo/tests/java/mod/_simplereg/uno/SimpleRegistry.java |   14 +-
 qadevOOo/tests/java/mod/_simreg/SimpleRegistry.java|   16 +-
 10 files changed, 88 insertions(+), 29 deletions(-)

New commits:
commit 69fd971e684779bd7e500333a7c7d3814fffd111
Author: Caolán McNamara 
Date:   Sat Dec 19 15:24:48 2015 +

coverity#1326953 RV: Bad use of return value

and

coverity#1326954 RV: Bad use of return value
coverity#1326955 RV: Bad use of return value
coverity#1326956 RV: Bad use of return value
coverity#1326957 RV: Bad use of return value
coverity#1326958 RV: Bad use of return value
coverity#1326959 RV: Bad use of return value
coverity#1326960 RV: Bad use of return value
coverity#1326961 RV: Bad use of return value
coverity#1326962 RV: Bad use of return value

Change-Id: I02c2f7a5214e348f06a12b78a9400d8501b00e57

diff --git a/qadevOOo/runner/helper/OfficeProvider.java 
b/qadevOOo/runner/helper/OfficeProvider.java
index 6d03e5d..62ac34f 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -738,21 +738,27 @@ public class OfficeProvider implements AppProvider
 }
 }
 
-private void deleteFilesAndDirector(File file)
+private void deleteFilesAndDirector(File file)
+{
+File f = file;
+if(f.isDirectory())
 {
-File f = file;
-if(f.isDirectory())
+File files[] = f.listFiles();
+for(int i = 0; i < files.length; i++)
 {
-File files[] = f.listFiles();
-for(int i = 0; i < files.length; i++)
-{
-deleteFilesAndDirector(files[i]);
-}
-f.delete();
+deleteFilesAndDirector(files[i]);
 }
-else if (f.isFile())
-{
-f.delete();
+boolean bDeleteOk = f.delete();
+if (!bDeleteOk) {
+System.out.println("delete failed");
 }
 }
+else if (f.isFile())
+{
+boolean bDeleteOk = f.delete();
+if (!bDeleteOk) {
+System.out.println("delete failed");
+}
+}
+}
 }
diff --git a/qadevOOo/runner/util/db/DataSource.java 
b/qadevOOo/runner/util/db/DataSource.java
index e2fdcb9..b9f41c3 100644
--- a/qadevOOo/runner/util/db/DataSource.java
+++ b/qadevOOo/runner/util/db/DataSource.java
@@ -113,11 +113,15 @@ public class DataSource
 if ( docURL.length() == 0 )
 {
 final java.io.File tempFile = java.io.File.createTempFile( 
_registrationName + "_", ".odb" );
-if ( tempFile.exists() )
+if ( tempFile.exists() ) {
 // we did not really want to create that file, we just 
wanted its local name, but
 // createTempFile actually creates it => throw it away
 // (This is necessary since some JVM/platform combinations 
seem to actually lock the file)
-tempFile.delete();
+boolean bDeleteOk = tempFile.delete();
+if (!bDeleteOk) {
+ System.out.println("delete failed");
+}
+}
 String localPart = tempFile.toURI().toURL().toString();
 localPart = localPart.substring( localPart.lastIndexOf( '/' ) 
+ 1 );
 docURL = util.utils.getOfficeTemp( m_orb ) + localPart;
diff --git a/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java 
b/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java
index 8a5d12c..99d30f9 100644
--- a/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/view/_XPrintJobBroadcaster.java
@@ -120,8 +120,12 @@ public class _XPrintJobBroadcaster extends MultiMethodTest 
{
 
 public void reset() {
 File f = new File(printFileName);
-if (f.exists())
-f.delete();
+if (f.exists()) {
+boolean bDeleteOk = f.delete();
+if (!bDeleteOk) {
+System.out.println("delete failed");
+}
+}
 eventCalled = false;
 }
 
diff --git a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java 

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2015-12-10 Thread Caolán McNamara
 qadevOOo/runner/util/DBTools.java|4 ++-
 qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java  |4 ++-
 qadevOOo/tests/java/ifc/sheet/_XGoalSeek.java|4 ++-
 qadevOOo/tests/java/mod/_defreg/NestedRegistry.java  |4 ++-
 qadevOOo/tests/java/mod/_nestedreg/uno/NestedRegistry.java   |4 ++-
 qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java  |8 
--
 qadevOOo/tests/java/mod/_svx/AccessibleControlShape.java |4 ++-
 qadevOOo/tests/java/mod/_svx/AccessibleEditableTextPara.java |   12 
+-
 qadevOOo/tests/java/mod/_svx/AccessibleGraphicShape.java |4 ++-
 qadevOOo/tests/java/mod/_svx/AccessibleOLEShape.java |4 ++-
 qadevOOo/tests/java/mod/_svx/AccessiblePresentationGraphicShape.java |4 ++-
 qadevOOo/tests/java/mod/_svx/AccessiblePresentationOLEShape.java |4 ++-
 qadevOOo/tests/java/mod/_svx/AccessiblePresentationShape.java|4 ++-
 qadevOOo/tests/java/mod/_svx/AccessibleShape.java|4 ++-
 qadevOOo/tests/java/mod/_svx/SvxShapeControl.java|8 
+-
 qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java   |8 
+-
 qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygon.java|8 
+-
 qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygonBezier.java  |8 
+-
 18 files changed, 72 insertions(+), 28 deletions(-)

New commits:
commit b1c472fd873c6396890135a3804a5b93e8581457
Author: Caolán McNamara 
Date:   Thu Dec 10 10:55:21 2015 +

coverity#1326610 DE: Dropped or ignored exception

and

coverity#1326611 DE: Dropped or ignored exception
coverity#1326612 DE: Dropped or ignored exception
coverity#1326613 DE: Dropped or ignored exception
coverity#1326614 DE: Dropped or ignored exception
coverity#1326615 DE: Dropped or ignored exception
coverity#1326617 DE: Dropped or ignored exception
coverity#1326618 DE: Dropped or ignored exception
coverity#1326619 DE: Dropped or ignored exception
coverity#1326620 DE: Dropped or ignored exception
coverity#1326621 DE: Dropped or ignored exception
coverity#1326622 DE: Dropped or ignored exception
coverity#1326623 DE: Dropped or ignored exception
coverity#1326624 DE: Dropped or ignored exception
coverity#1326625 DE: Dropped or ignored exception
coverity#1326626 DE: Dropped or ignored exception
coverity#1326627 DE: Dropped or ignored exception

Change-Id: I921a5434a6a116db5033cb2c90a59008c13f1bb2

diff --git a/qadevOOo/runner/util/DBTools.java 
b/qadevOOo/runner/util/DBTools.java
index 685ce2c..4fd764a 100644
--- a/qadevOOo/runner/util/DBTools.java
+++ b/qadevOOo/runner/util/DBTools.java
@@ -161,7 +161,9 @@ public class DBTools {
 dbContext = UnoRuntime.queryInterface
 (XNamingService.class, cont) ;
 
-} catch (com.sun.star.uno.Exception e) {}
+} catch (com.sun.star.uno.Exception e) {
+System.out.println("caught exception: " + e);
+}
 }
 
 /**
diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java 
b/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java
index 742aa7e..3538eb6 100644
--- a/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java
+++ b/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java
@@ -174,7 +174,9 @@ public class _UnoControlFormattedFieldModel extends 
MultiPropertyTest {
 try {
 newValue = tParam.getMSF().createInstance(
 "com.sun.star.util.NumberFormatsSupplier");
-} catch (com.sun.star.uno.Exception e) {}
+} catch (com.sun.star.uno.Exception e) {
+System.out.println("caught exception: " + e);
+}
 return newValue;
 }
 }) ;
diff --git a/qadevOOo/tests/java/ifc/sheet/_XGoalSeek.java 
b/qadevOOo/tests/java/ifc/sheet/_XGoalSeek.java
index e18a834..88b7683 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XGoalSeek.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XGoalSeek.java
@@ -92,7 +92,9 @@ public class _XGoalSeek extends MultiMethodTest {
 xSheet.getCellByPosition(3, 4).setValue(0.8);
 xSheet.getCellByPosition(3, 5).setFormula("= (D5 ^ 2 - 1) / (D5 - 
1)");
 }
-catch(Exception e) {}
+catch(Exception e) {
+System.out.println("caught exception: " + e);
+}
 goal = oObj.seekGoal(aFormula, aValue, "2");
 log.println("Goal Result: " + goal.Result + "   Divergence: " + 
goal.Divergence);
 result &= goal.Divergence < divergence;
diff --git a/qadevOOo/tests/java/mod/_defreg/NestedRegistry.java 
b/qadevOOo/tests/java/mod/_defreg/NestedRegistry.java
index c6bc3e8..efd3b33 100644

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2015-07-08 Thread Andras Timar
 qadevOOo/runner/helper/OfficeProvider.java |2 +-
 qadevOOo/tests/java/ifc/text/_XText.java   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1302fbe6a1872e3234dee3902079970d8672db92
Author: Andras Timar andras.ti...@collabora.com
Date:   Wed Jul 8 10:34:12 2015 +0200

typo: contest - content

Change-Id: If7fa4672ef76082526f4dd3e6090a19d7f9687b3

diff --git a/qadevOOo/runner/helper/OfficeProvider.java 
b/qadevOOo/runner/helper/OfficeProvider.java
index 7318144..ed99b7d 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -655,7 +655,7 @@ public class OfficeProvider implements AppProvider
 /**
  * If the office is connected but the CODEAppExecutionCommand/CODE is 
not set,
  * this function asks the office for its location and fill the
- * CODEAppExecutionCommand/CODE with valid contest.
+ * CODEAppExecutionCommand/CODE with valid content.
  * This function was only called if parameter CODEAutoRestart/CODE is 
set.
  * @param msf the CODEMultiServiceFactory/CODE
  * @param param the CODETestParameters/CODE
diff --git a/qadevOOo/tests/java/ifc/text/_XText.java 
b/qadevOOo/tests/java/ifc/text/_XText.java
index eb1df0c..234dd5f 100644
--- a/qadevOOo/tests/java/ifc/text/_XText.java
+++ b/qadevOOo/tests/java/ifc/text/_XText.java
@@ -124,7 +124,7 @@ public class _XText extends MultiMethodTest {
 
 
 /**
- * Removes the text contest added before. p
+ * Removes the text content added before. p
  * Has b OK /b status if the method successfully returns
  * and no exceptions were thrown. p
  * The following method tests are to be completed successfully before :
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2013-12-11 Thread Stephan Bergmann
 qadevOOo/runner/lib/MultiMethodTest.java |   46 +--
 qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java |2 
 2 files changed, 15 insertions(+), 33 deletions(-)

New commits:
commit cff72ec4bf87c6484be97d954966309ba7a5eb8a
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Dec 12 07:46:53 2013 +0100

Minor qadevOOo improvement

Change-Id: Ibeefc8e9aad57c28722b62610231d14ebc8a7403

diff --git a/qadevOOo/runner/lib/MultiMethodTest.java 
b/qadevOOo/runner/lib/MultiMethodTest.java
index dd467af..b28194b 100644
--- a/qadevOOo/runner/lib/MultiMethodTest.java
+++ b/qadevOOo/runner/lib/MultiMethodTest.java
@@ -180,7 +180,6 @@ public class MultiMethodTest
 }
 System.out.println( is iface: [ + testedClassName + ] testcode: 
[ + entry.entryName + ]);
 
-tEnv.getTestObject();
 Object oObj = UnoRuntime.queryInterface(testedClass, 
tEnv.getTestObject());
 
 if (oObj == null)
@@ -200,7 +199,16 @@ public class MultiMethodTest
 }
 
 //setting the field oObj
-setField(oObj, oObj);
+try
+{
+setField(oObj, oObj);
+}
+catch (Exception e)
+{
+e.printStackTrace();
+setSubStates(e.toString());
+return tRes;
+}
 }
 
 // to perform some stuff before all method tests
@@ -464,37 +472,9 @@ public class MultiMethodTest
 return clName.substring(clName.lastIndexOf('.') + 1);
 }
 
-/**
- * Initializes codefieldName/code of the subclass with
- * codevalue/code.
- *
- * @return Status describing the result of the operation.
- */
-protected Status setField(String fieldName, Object value)
+private void setField(String fieldName, Object value)
+throws NoSuchFieldException, IllegalAccessException
 {
-Field objField;
-
-try
-{
-objField = this.getClass().getField(fieldName);
-}
-catch (NoSuchFieldException nsfE)
-{
-return Status.exception(nsfE);
-}
-
-try
-{
-objField.set(this, value);
-return Status.passed(true);
-}
-catch (IllegalArgumentException iaE)
-{
-return Status.exception(iaE);
-}
-catch (IllegalAccessException iaE)
-{
-return Status.exception(iaE);
-}
+this.getClass().getField(fieldName).set(this, value);
 }
 }
diff --git a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java 
b/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java
index d7c513c..ff8296a 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java
@@ -62,6 +62,8 @@ public class _XDataPilotTable2 extends MultiMethodTest
 private ArrayListInteger mDataFieldDims = null;
 private ArrayListCellAddress mResultCells = null;
 
+public XDataPilotTable2 oObj;
+
 /**
  * exception to be thrown when obtaining a result data for a cell fails
  * (probably because the cell is not a result cell).
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2013-05-21 Thread Stephan Bergmann
 qadevOOo/runner/util/AccessibilityTools.java|  100 
+-
 qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_PreviewCell.java |4 
 qadevOOo/tests/java/mod/_toolkit/AccessibleListBox.java |4 
 3 files changed, 18 insertions(+), 90 deletions(-)

New commits:
commit 89fbed7e29104bf189dc3d75dc11a8aadd362322
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue May 21 16:40:03 2013 +0200

Revert Java cleanup, AccessibilityTools..

This reverts commit d702dd4396161f8e2e7396f5c24554088b752fcb, which 
reproducibly
broke JunitTest_sc_unoapi:

java.lang.NullPointerException
 at 
util.AccessibilityTools.getAccessibleObjectForRole_(AccessibilityTools.java:177)
 at 
util.AccessibilityTools.getAccessibleObjectForRole(AccessibilityTools.java:95)
 at 
mod._sc.AccessibleEditableTextPara_PreviewCell.createTestEnvironment(AccessibleEditableTextPara_PreviewCell.java:149)
 at lib.TestCase.getTestEnvironment(TestCase.java:121)
 at base.java_fat.getTestEnvironment(java_fat.java:319)
 at base.java_fat.executeTest(java_fat.java:167)
 at org.openoffice.Runner.run(Runner.java:234)
 at org.openoffice.test.UnoApiTest.test(UnoApiTest.java:38)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:601)
 at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
 at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
 at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
 at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
 at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
 at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
 at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
 at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
 at org.junit.runners.Suite.runChild(Suite.java:128)
 at org.junit.runners.Suite.runChild(Suite.java:24)
 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
 at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
 at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
 at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
 at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
 at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
 at org.junit.runner.JUnitCore.main(JUnitCore.java:45)

Change-Id: I3601fe24db21bd63f7dc6cdf0a1eb69f447d962a

diff --git a/qadevOOo/runner/util/AccessibilityTools.java 
b/qadevOOo/runner/util/AccessibilityTools.java
index c7cb483..85cd442 100644
--- a/qadevOOo/runner/util/AccessibilityTools.java
+++ b/qadevOOo/runner/util/AccessibilityTools.java
@@ -17,7 +17,6 @@
  */
 package util;
 
-import com.sun.star.accessibility.AccessibleStateType;
 import com.sun.star.accessibility.XAccessible;
 import com.sun.star.accessibility.XAccessibleComponent;
 import com.sun.star.accessibility.XAccessibleContext;
@@ -33,7 +32,7 @@ import java.io.PrintWriter;
 
 
 public class AccessibilityTools {
-private XAccessible SearchedAccessible = null;
+public static XAccessible SearchedAccessible = null;
 private static boolean debug = false;
 
 public AccessibilityTools() {
@@ -92,12 +91,15 @@ public class AccessibilityTools {
 
 public static XAccessibleContext getAccessibleObjectForRole(XAccessible 
xacc,
 short role) {
+SearchedAccessible = null;
 return getAccessibleObjectForRole_(xacc, role);
 }
 
 public static XAccessibleContext getAccessibleObjectForRole(XAccessible 
xacc,
 short role,
 boolean ignoreShowing) {
+SearchedAccessible = null;
+
 if (ignoreShowing) {
   

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2013-05-20 Thread Noel Grandin
 qadevOOo/runner/util/AccessibilityTools.java|  100 
--
 qadevOOo/tests/java/mod/_sc/AccessibleEditableTextPara_PreviewCell.java |4 
 qadevOOo/tests/java/mod/_toolkit/AccessibleListBox.java |4 
 3 files changed, 90 insertions(+), 18 deletions(-)

New commits:
commit d702dd4396161f8e2e7396f5c24554088b752fcb
Author: Noel Grandin n...@peralex.com
Date:   Thu May 16 11:39:40 2013 +0200

Java cleanup, AccessibilityTools..

was using a global variable. Yuck.
Fix it to use a local variable. Not perfect, but better.

Change-Id: I272ddc89402da53be7f19d2cd963b03b1a83

diff --git a/qadevOOo/runner/util/AccessibilityTools.java 
b/qadevOOo/runner/util/AccessibilityTools.java
index 85cd442..c7cb483 100644
--- a/qadevOOo/runner/util/AccessibilityTools.java
+++ b/qadevOOo/runner/util/AccessibilityTools.java
@@ -17,6 +17,7 @@
  */
 package util;
 
+import com.sun.star.accessibility.AccessibleStateType;
 import com.sun.star.accessibility.XAccessible;
 import com.sun.star.accessibility.XAccessibleComponent;
 import com.sun.star.accessibility.XAccessibleContext;
@@ -32,7 +33,7 @@ import java.io.PrintWriter;
 
 
 public class AccessibilityTools {
-public static XAccessible SearchedAccessible = null;
+private XAccessible SearchedAccessible = null;
 private static boolean debug = false;
 
 public AccessibilityTools() {
@@ -91,15 +92,12 @@ public class AccessibilityTools {
 
 public static XAccessibleContext getAccessibleObjectForRole(XAccessible 
xacc,
 short role) {
-SearchedAccessible = null;
 return getAccessibleObjectForRole_(xacc, role);
 }
 
 public static XAccessibleContext getAccessibleObjectForRole(XAccessible 
xacc,
 short role,
 boolean ignoreShowing) {
-SearchedAccessible = null;
-
 if (ignoreShowing) {
 return getAccessibleObjectForRoleIgnoreShowing_(xacc, role);
 } else {
@@ -107,12 +105,49 @@ public class AccessibilityTools {
 }
 }
 
+public XAccessible getSearchedAccessibleObjectForRole(XAccessible xacc,
+short role,
+boolean ignoreShowing) {
+SearchedAccessible = null;
+getSearchedAccessibleObjectForRole_(xacc, role, ignoreShowing);
+return SearchedAccessible;
+}
+
+private XAccessibleContext getSearchedAccessibleObjectForRole_(XAccessible 
xacc,
+short role, boolean ignoreShowing) {
+XAccessibleContext ac = xacc.getAccessibleContext();
+boolean isShowing = isShowing(ac);
+
+if ((ac.getAccessibleRole() == role)  (!ignoreShowing || isShowing)) 
{
+SearchedAccessible = xacc;
+return ac;
+} else {
+int k = ac.getAccessibleChildCount();
+
+if (ac.getAccessibleChildCount()  100) {
+k = 50;
+}
+
+for (int i = 0; i  k; i++) {
+try {
+XAccessibleContext ac2 = 
getSearchedAccessibleObjectForRole_(ac.getAccessibleChild(i), role, 
ignoreShowing);
+
+if (ac2 != null) {
+return ac2;
+}
+} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
+System.out.println(Couldn't get Child);
+}
+}
+return null;
+}
+}
+
 public static XAccessibleContext 
getAccessibleObjectForRoleIgnoreShowing_(XAccessible xacc,
 short role) {
 XAccessibleContext ac = xacc.getAccessibleContext();
 
 if (ac.getAccessibleRole() == role) {
-SearchedAccessible = xacc;
 return ac;
 } else {
 int k = ac.getAccessibleChildCount();
@@ -140,11 +175,9 @@ public class AccessibilityTools {
 public static XAccessibleContext getAccessibleObjectForRole_(XAccessible 
xacc,
 short role) {
 XAccessibleContext ac = xacc.getAccessibleContext();
-boolean isShowing = ac.getAccessibleStateSet()
-.contains(com.sun.star.accessibility.AccessibleStateType.SHOWING);
+boolean isShowing = isShowing(ac);
 
 if ((ac.getAccessibleRole() == role)  isShowing) {
-SearchedAccessible = xacc;
 return ac;
 } else {
 int k = ac.getAccessibleChildCount();
@@ -194,7 +227,6 @@ public class AccessibilityTools {
 if ((ac.getAccessibleRole() == role) 
 (ac.getAccessibleName().indexOf(name)  -1) 
 (utils.getImplName(ac).indexOf(implName)  -1)) {
-SearchedAccessible = xacc;
 
 //System.out.println(FOUND the desired component -- + 
ac.getAccessibleName() +isShowing);
 return ac;
@@ -228,8 +260,7 @@ public class AccessibilityTools {
 String name,
 String implName) {
 XAccessibleContext ac = xacc.getAccessibleContext();
-boolean isShowing = ac.getAccessibleStateSet()
- 

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests sw/qa

2013-04-23 Thread Noel Grandin
 qadevOOo/runner/util/AccessibilityTools.java|   40 
--
 qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java |4 -
 qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewCell.java|4 -
 qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java   |4 -
 qadevOOo/tests/java/mod/_sc/ScAccessibleSpreadsheet.java|4 -
 qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java|7 -
 qadevOOo/tests/java/mod/_sd/AccessibleDrawDocumentView.java |4 -
 qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java  |4 -
 qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java|4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java   |4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java   |4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java|4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java |4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java   |4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java |4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java  |4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java  |   10 +-
 qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java  |4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java |4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java  |4 -
 qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java  |4 -
 sw/qa/complex/accessibility/AccessibleRelationSet.java  |8 +-
 22 files changed, 46 insertions(+), 91 deletions(-)

New commits:
commit ada02981672ae74bbdf6c4e5606d78c9211b2317
Author: Noel Grandin n...@peralex.com
Date:   Tue Apr 23 09:08:33 2013 +0200

Java cleanup - reduce use of global fields

This field does not need to be global, it is returned from the relevant
methods

Change-Id: Ic53eec4a699d6acc4410e71dde385e6a49ded745
Reviewed-on: https://gerrit.libreoffice.org/3567
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/qadevOOo/runner/util/AccessibilityTools.java 
b/qadevOOo/runner/util/AccessibilityTools.java
index e6f345b..85cd442 100644
--- a/qadevOOo/runner/util/AccessibilityTools.java
+++ b/qadevOOo/runner/util/AccessibilityTools.java
@@ -32,13 +32,11 @@ import java.io.PrintWriter;
 
 
 public class AccessibilityTools {
-public static XAccessibleContext SearchedContext = null;
 public static XAccessible SearchedAccessible = null;
 private static boolean debug = false;
 
 public AccessibilityTools() {
 //done = false;
-SearchedContext = null;
 }
 
 public static XAccessible getAccessibleObject(XInterface xObject) {
@@ -93,35 +91,29 @@ public class AccessibilityTools {
 
 public static XAccessibleContext getAccessibleObjectForRole(XAccessible 
xacc,
 short role) {
-SearchedContext = null;
 SearchedAccessible = null;
-getAccessibleObjectForRole_(xacc, role);
-
-return SearchedContext;
+return getAccessibleObjectForRole_(xacc, role);
 }
 
 public static XAccessibleContext getAccessibleObjectForRole(XAccessible 
xacc,
 short role,
 boolean ignoreShowing) {
-SearchedContext = null;
 SearchedAccessible = null;
 
 if (ignoreShowing) {
-getAccessibleObjectForRoleIgnoreShowing_(xacc, role);
+return getAccessibleObjectForRoleIgnoreShowing_(xacc, role);
 } else {
-getAccessibleObjectForRole_(xacc, role);
+return getAccessibleObjectForRole_(xacc, role);
 }
-
-return SearchedContext;
 }
 
-public static void getAccessibleObjectForRoleIgnoreShowing_(XAccessible 
xacc,
+public static XAccessibleContext 
getAccessibleObjectForRoleIgnoreShowing_(XAccessible xacc,
 short role) {
 XAccessibleContext ac = xacc.getAccessibleContext();
 
 if (ac.getAccessibleRole() == role) {
-SearchedContext = ac;
 SearchedAccessible = xacc;
+return ac;
 } else {
 int k = ac.getAccessibleChildCount();
 
@@ -131,28 +123,29 @@ public class AccessibilityTools {
 
 for (int i = 0; i  k; i++) {
 try {
-getAccessibleObjectForRoleIgnoreShowing_(
+XAccessibleContext ac2 = 
getAccessibleObjectForRoleIgnoreShowing_(
 ac.getAccessibleChild(i), role);
 
-if (SearchedContext != null) {
-return;
+if (ac2 != null) {
+return ac2;
 }
 } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
 System.out.println(Couldn't get Child);
 }
  

[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests

2013-04-22 Thread Noel Grandin
 qadevOOo/runner/lib/TestCase.java|   10 +--
 qadevOOo/runner/lib/TestEnvironment.java |   12 
 qadevOOo/tests/java/mod/_forms/GenericModelTest.java |   57 +--
 3 files changed, 31 insertions(+), 48 deletions(-)

New commits:
commit 37eee65fbf1ee7ef5c86731594e33b056b6612d2
Author: Noel Grandin n...@peralex.com
Date:   Wed Apr 17 15:31:23 2013 +0200

Java cleanup - static fields that should not be static

Somebody appears to have been confused about the purpose of static
in Java.
These are instance fields and should therefore not be static.

Also reduce the visibility of some methods and fields.

Change-Id: I0b5875b6cbd91ee89823e2058b87c1087dc5c92e
Reviewed-on: https://gerrit.libreoffice.org/3555
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/qadevOOo/runner/lib/TestCase.java 
b/qadevOOo/runner/lib/TestCase.java
index 0477ebe..a4895f1 100644
--- a/qadevOOo/runner/lib/TestCase.java
+++ b/qadevOOo/runner/lib/TestCase.java
@@ -19,8 +19,8 @@
 package lib;
 
 import java.io.PrintWriter;
-
 import lib.TestParameters;
+
 /**
  * codeTestCase/code represent a factory for codeTestEnvironment/codes
  * creation and disposing for a given implementation object. The
@@ -49,9 +49,7 @@ public abstract class TestCase {
 /**
  * Specifies the PrintWriter to log information.
  */
-public PrintWriter log;
-
-//public static TestCase tCase;
+protected PrintWriter log;
 
 /**
  * Sets the log to write information during testing.
@@ -66,7 +64,7 @@ public abstract class TestCase {
  *
  * @param tParam test parameters.
  */
-public void initializeTestCase( TestParameters tParam ) {
+public final void initializeTestCase( TestParameters tParam ) {
 initialize( tParam, log );
 }
 
@@ -89,7 +87,7 @@ public abstract class TestCase {
  *
  * @param tParam test parameters
  */
-public void cleanupTestCase( TestParameters tParam ) {
+public final void cleanupTestCase( TestParameters tParam ) {
 cleanup( tParam, log );
 }
 
diff --git a/qadevOOo/runner/lib/TestEnvironment.java 
b/qadevOOo/runner/lib/TestEnvironment.java
index 7c9b3d7..ba00770 100644
--- a/qadevOOo/runner/lib/TestEnvironment.java
+++ b/qadevOOo/runner/lib/TestEnvironment.java
@@ -98,18 +98,6 @@ public final class TestEnvironment {
 }
 
 /**
- * Checks if an auxiliary object has been registered with name
- *
- * @param name a name referencing an auxiliarx object
- *
- * @return tttrue/tt if the object has been associated, ttfalse/tt
- * otherwise.
- */
-public boolean hasObjRelation(String name) {
-return (relations.get(name) != null) ;
-}
-
-/**
  * Sets the codeTestCase/code that created the environment.
  */
 public void setTestCase( TestCase tCase) {
diff --git a/qadevOOo/tests/java/mod/_forms/GenericModelTest.java 
b/qadevOOo/tests/java/mod/_forms/GenericModelTest.java
index 2bf33f6..92bdf1d 100644
--- a/qadevOOo/tests/java/mod/_forms/GenericModelTest.java
+++ b/qadevOOo/tests/java/mod/_forms/GenericModelTest.java
@@ -124,26 +124,26 @@ import util.utils;
 * @see ifc.container._XChild
 */
 public class GenericModelTest extends TestCase {
-private static XTextDocument m_xTextDoc;
-private static Object m_dbSrc = null;
-private static DBTools.DataSourceInfo m_srcInf = null;
+private XTextDocument m_xTextDoc;
+private Object m_dbSrc = null;
+private DBTools.DataSourceInfo m_srcInf = null;
 /**
  * This is the name of the Data Base which the test uses: APITestDatabase
  */
-protected final static String m_dbSourceName = APITestDatabase;
-protected final static String m_TestDB = TestDB;
+private final static String m_dbSourceName = APITestDatabase;
+private final static String m_TestDB = TestDB;
 private DBTools m_dbTools = null;
 
-private static boolean m_ConnectionColsed = false;
+private boolean m_ConnectionColsed = false;
 
 /**
- * descibes the kind of the shape which should be created.
+ * describes the kind of the shape which should be created.
  * Example: m_kindOfshape=DateFiled
  */
-public static String m_kindOfControl = null;
+protected String m_kindOfControl = null;
 
 /**
- * If your object needs some special propery values you can specify them 
with this
+ * If your object needs some special property values you can specify them 
with this
  * CODEArrayList/CODE. You have to add a CODENamedValue/CODE to 
this list.
  * Example:
  * NamedValue myProp = new NamedValue();
@@ -151,7 +151,7 @@ public class GenericModelTest extends TestCase {
  * myProp.Value = My special Value;
  * m_propertiesToSet.add(myProp);
  */
-public static ArrayListNamedValue m_propertiesToSet = new