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

2023-08-29 Thread Andrea Gelmini (via logerrit)
 qadevOOo/runner/helper/URLHelper.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ec6bc744020f22bea1a7db165b39287725db7637
Author: Andrea Gelmini 
AuthorDate: Tue Aug 29 21:23:06 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed Aug 30 07:11:58 2023 +0200

Fix typo

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

diff --git a/qadevOOo/runner/helper/URLHelper.java 
b/qadevOOo/runner/helper/URLHelper.java
index 395be4cd08ba..6a46c3acdd6b 100644
--- a/qadevOOo/runner/helper/URLHelper.java
+++ b/qadevOOo/runner/helper/URLHelper.java
@@ -30,7 +30,7 @@ import java.util.Iterator;
 /**
  * It collects some static helper functions to handle URLs.
  * Sometimes it's necessary to convert URL from/to system paths.
- * Or from string to strutural notations (e.g. com.sun.star.util.URL).
+ * Or from string to structural notations (e.g. com.sun.star.util.URL).
  * And sometimes java had another notation then the office it has.
  *
  */


[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

2021-03-22 Thread Caolán McNamara (via logerrit)
 qadevOOo/runner/helper/CfgParser.java |   15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

New commits:
commit d9a9f7f35e663896995625a44dc80d6c6c37cf9a
Author: Caolán McNamara 
AuthorDate: Mon Mar 22 10:39:04 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Mar 22 14:43:52 2021 +0100

cid#1474333 Resource leak on an exceptional path

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

diff --git a/qadevOOo/runner/helper/CfgParser.java 
b/qadevOOo/runner/helper/CfgParser.java
index b65697e9b6c8..a93e725fd99b 100644
--- a/qadevOOo/runner/helper/CfgParser.java
+++ b/qadevOOo/runner/helper/CfgParser.java
@@ -91,9 +91,12 @@ public class CfgParser
 try
 {
 FileInputStream propFile = new FileInputStream(name);
-prop.load(propFile);
-System.out.println("Parsing properties from " + name);
-propFile.close();
+try {
+prop.load(propFile);
+System.out.println("Parsing properties from " + name);
+} finally {
+propFile.close();
+}
 }
 catch (Exception e)
 {
@@ -105,7 +108,11 @@ public class CfgParser
 System.out.println("Parsing properties from " + name);
 java.net.URLConnection connection = url.openConnection();
 java.io.InputStream in = connection.getInputStream();
-prop.load(in);
+try {
+prop.load(in);
+} finally {
+in.close();
+}
 }
 }
 catch (Exception ex)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-25 Thread Noel Grandin (via logerrit)
 qadevOOo/runner/helper/ProcessHandler.java |   68 -
 1 file changed, 68 deletions(-)

New commits:
commit cc0ce67a081b72ad401434e9b1a656f480974d4a
Author: Noel Grandin 
AuthorDate: Fri Sep 25 12:04:51 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 25 17:57:37 2020 +0200

remove unused code

Change-Id: I131958be81d56730fee2f4939cf3b70489f7f6e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103385
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/qadevOOo/runner/helper/ProcessHandler.java 
b/qadevOOo/runner/helper/ProcessHandler.java
index 49aba431a50e..84dbd77967d7 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -115,16 +115,12 @@ public class ProcessHandler
 private File workDir = null;
 private PrintWriter log;
 private int exitValue = -1;
-private boolean isFinished = false;
 private boolean isStarted = false;
 private PrintStream stdIn = null;
 private Process m_aProcess = null;
 private boolean debug = false;
 private boolean bUseOutput = true;
 
-private int m_nProcessTimeout = 0;
-private ProcessWatcher m_aWatcher;
-
 /**
  * Creates instance with specified external command and
  * log stream where debug info and output
@@ -307,18 +303,6 @@ public class ProcessHandler
 return isStarted;
 }
 
-/**
- * Returns the information about the final state of command
- * execution.
- *
- * @return true if the command correctly starts,
- * exits and was not interrupted due to timeout.
- */
-private boolean isFinished()
-{
-return isFinished;
-}
-
 /**
  * Returns exit code of the external command.
  *
@@ -345,56 +329,4 @@ public class ProcessHandler
 log.println(utils.getDateTime() + "PH." + message);
 }
 }
-
-private static class ProcessWatcher extends Thread
-{
-
-private int m_nTimeoutInSec;
-private final boolean m_bInterrupt;
-
-private ProcessWatcher(int _nTimeOut)
-{
-m_nTimeoutInSec = _nTimeOut;
-m_bInterrupt = false;
-}
-
-/**
- * returns true, if the thread should hold on
- */
-public synchronized boolean isInHoldOn()
-{
-return m_bInterrupt;
-}
-@Override
-public void run()
-{
-while (m_nTimeoutInSec > 0)
-{
-m_nTimeoutInSec--;
-util.utils.pause(1000);
-if (isInHoldOn())
-{
-break;
-}
-}
-}
-
-}
-
-/**
- *  If the timeout only given by setProcessTimeout(int seconds) function 
is != 0,
- *  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.
- */
-private void initializeProcessKiller()
-{
-if (m_nProcessTimeout != 0)
-{
-m_aWatcher = new ProcessWatcher(m_nProcessTimeout);
-m_aWatcher.start();
-}
-}
-
-
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-15 Thread Andrea Gelmini (via logerrit)
 qadevOOo/runner/helper/OfficeProvider.java |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 86b11de49202ff4724dfda9ee6fc799abed5a08c
Author: Andrea Gelmini 
AuthorDate: Sat Aug 15 17:42:18 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Aug 16 07:31:08 2020 +0200

Fix typo "damke" and reworked sentence

Removed duplicated part and fixed present continuous

Change-Id: I52dd2e141115c130f9a753b1e1aeba2cc2711ede
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100776
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/qadevOOo/runner/helper/OfficeProvider.java 
b/qadevOOo/runner/helper/OfficeProvider.java
index 01599cd3ff15..48c0910f6e24 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -173,10 +173,9 @@ public class OfficeProvider implements AppProvider
 XMultiServiceFactory msf = connectOffice(cncstr);
 
 // if the office is running and the office crashes while testing it 
could
-// be useful to restart the office if possible and continuing the 
tests.
+// be useful to restart the office if possible and continue the tests.
 // Example: the UNO-API-Tests in the projects will be executed by 
calling
-// 'damke'. This connects to an existing office. If the office crashes
-// it is useful to restart the office and continuing the tests.
+// 'dmake'.
 if ((param.getBool(util.PropertyName.AUTO_RESTART)) && (msf != null))
 {
 makeAppExecCommand(msf, param);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-03-10 Thread Andrea Gelmini (via logerrit)
 qadevOOo/runner/util/DesktopTools.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d527d9cd1452540b37e55f3b7d23dd08363ded5a
Author: Andrea Gelmini 
AuthorDate: Tue Mar 10 17:08:48 2020 +0100
Commit: Julien Nabet 
CommitDate: Tue Mar 10 20:42:53 2020 +0100

Fix typo

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

diff --git a/qadevOOo/runner/util/DesktopTools.java 
b/qadevOOo/runner/util/DesktopTools.java
index 88ea2c897503..1c1b04402838 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -424,7 +424,7 @@ public class DesktopTools
 }
 
 /**
- * zoom to have a view over the hole page
+ * zoom to have a view over the whole page
  * @param xDoc the document to zoom
  */
 public static void zoomToEntirePage(XMultiServiceFactory xMSF, XInterface 
xDoc)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-10-18 Thread Caolán McNamara (via logerrit)
 qadevOOo/runner/util/DesktopTools.java |   17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit effba035c0c04cce6dff3817d546f5c163a1a4f0
Author: Caolán McNamara 
AuthorDate: Fri Oct 18 09:14:53 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 18 12:31:40 2019 +0200

cid#1448528 Resource leak on an exceptional path

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

diff --git a/qadevOOo/runner/util/DesktopTools.java 
b/qadevOOo/runner/util/DesktopTools.java
index 1bac437a491a..88ea2c897503 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -271,14 +271,17 @@ public class DesktopTools
 try {
 final InputStream inputFile = new BufferedInputStream(
 new FileInputStream(filePath));
-final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
-final byte[] byteBuffer = new byte[4096];
-int byteBufferLength = 0;
-while ((byteBufferLength = inputFile.read(byteBuffer)) > 0)
-bytes.write(byteBuffer, 0, byteBufferLength);
-inputFile.close();
-inputStream = new ByteArrayToXInputStreamAdapter(
+try {
+final ByteArrayOutputStream bytes = new 
ByteArrayOutputStream();
+final byte[] byteBuffer = new byte[4096];
+int byteBufferLength = 0;
+while ((byteBufferLength = inputFile.read(byteBuffer)) > 0)
+bytes.write(byteBuffer, 0, byteBufferLength);
+inputStream = new ByteArrayToXInputStreamAdapter(
 bytes.toByteArray());
+} finally {
+inputFile.close();
+}
 } catch (java.io.IOException e) {
 e.printStackTrace();
 }
___
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

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

2019-07-26 Thread Caolán McNamara (via logerrit)
 qadevOOo/runner/base/java_fat.java |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 51d95cb212cf94097267f84f82901ef757bc148d
Author: Caolán McNamara 
AuthorDate: Fri Jul 26 09:00:26 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 26 20:57:58 2019 +0200

cid#1448386 RV: Bad use of return value

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

diff --git a/qadevOOo/runner/base/java_fat.java 
b/qadevOOo/runner/base/java_fat.java
index c85103508cbe..bd21b0861752 100644
--- a/qadevOOo/runner/base/java_fat.java
+++ b/qadevOOo/runner/base/java_fat.java
@@ -142,8 +142,6 @@ public class java_fat implements TestBase {
 continue;
 }
 
-tCase.getObjectName();
-
 for (int j = 0; j < entry.SubEntryCount; j++) {
 DescEntry aSubEntry = entry.SubEntries[j];
 final boolean bIsToTest = aSubEntry.isToTest;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-26 Thread Caolán McNamara (via logerrit)
 qadevOOo/runner/lib/MultiMethodTest.java |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 986e4f94b802f9f603c5e744f69f2dc14b4d91f3
Author: Caolán McNamara 
AuthorDate: Fri Jul 26 09:03:04 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 26 16:38:31 2019 +0200

cid#1448350 RV: Bad use of return value

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

diff --git a/qadevOOo/runner/lib/MultiMethodTest.java 
b/qadevOOo/runner/lib/MultiMethodTest.java
index 45ef58eb3054..81a87f3f47de 100644
--- a/qadevOOo/runner/lib/MultiMethodTest.java
+++ b/qadevOOo/runner/lib/MultiMethodTest.java
@@ -138,7 +138,6 @@ public class MultiMethodTest
 this.tRes = new TestResult();
 Class testedClass;
 
-getInterfaceName();
 System.out.print("checking: [" + entry.longName + "]");
 
 // defining a name of the class corresponding to the tested interface
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-23 Thread Caolán McNamara (via logerrit)
 qadevOOo/runner/lib/MultiPropertyTest.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7d7ec597da0d6511303c633222c577f6b0b4fee1
Author: Caolán McNamara 
AuthorDate: Mon Jul 22 12:26:26 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 23 09:34:21 2019 +0200

cid#1448466 RV: Bad use of return value

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

diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java 
b/qadevOOo/runner/lib/MultiPropertyTest.java
index 75834fba631c..4c63b4c45f67 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -170,7 +170,7 @@ public class MultiPropertyTest extends MultiMethodTest
 catch (java.lang.IllegalArgumentException e)
 {
 // skipping test since new value is not available
-Status.failed("Cannot create new value for '" + propName + 
" : " + e.getMessage());
+log.println("Cannot create new value for '" + propName + " 
: " + e.getMessage());
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-19 Thread Caolán McNamara (via logerrit)
 qadevOOo/runner/util/ValueComparer.java |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 14161f5e32441870a87031367218c24408e8cdc5
Author: Caolán McNamara 
AuthorDate: Thu Jul 18 11:31:13 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 19 09:41:38 2019 +0200

cid#1448399 Useless call

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

diff --git a/qadevOOo/runner/util/ValueComparer.java 
b/qadevOOo/runner/util/ValueComparer.java
index fce61bcd1d4a..a581ad3cbb01 100644
--- a/qadevOOo/runner/util/ValueComparer.java
+++ b/qadevOOo/runner/util/ValueComparer.java
@@ -98,8 +98,6 @@ public class ValueComparer {
 if((op1.getClass().getComponentType() == 
op2.getClass().getComponentType())
&& (Array.getLength(op1) == Array.getLength(op2)))
 {
-op1.getClass().getComponentType();
-
 for(int i = 0; i < Array.getLength(op1); ++ i)
 result = result & compareObjects(Array.get(op1, i), 
Array.get(op2, i));
 } else {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-13 Thread Libreoffice Gerrit user
 qadevOOo/runner/util/DesktopTools.java   |   48 +++
 sfx2/qa/complex/sfx2/DocumentMetadataAccess.java |   15 +++
 sfx2/qa/complex/sfx2/tools/TestDocument.java |3 +
 3 files changed, 66 insertions(+)

New commits:
commit e9ce7acaf5cc87a4fb40f12ea0aac8cb9df3562f
Author: Samuel Mehrbrodt 
AuthorDate: Wed Mar 13 12:48:07 2019 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Wed Mar 13 15:46:56 2019 +0100

tdf#123293 Add test

Test for commit 0a5ca5768f56db481dd3b947b3dddaab7ed96450

Change-Id: I53b72c385d9ef4d51cefa687f07a75c9520d3e71
Reviewed-on: https://gerrit.libreoffice.org/69165
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/qadevOOo/runner/util/DesktopTools.java 
b/qadevOOo/runner/util/DesktopTools.java
index 1650a04fdb71..5b82a2dc3726 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -19,6 +19,10 @@ package util;
 
 import helper.ConfigHelper;
 
+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.InputStream;
 import java.util.ArrayList;
 
 import lib.StatusException;
@@ -35,9 +39,11 @@ import com.sun.star.frame.XComponentLoader;
 import com.sun.star.frame.XDesktop;
 import com.sun.star.frame.XFrame;
 import com.sun.star.frame.XModel;
+import com.sun.star.io.XInputStream;
 import com.sun.star.lang.XComponent;
 import com.sun.star.lang.XMultiServiceFactory;
 import com.sun.star.lang.XServiceInfo;
+import com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.uno.XInterface;
 import com.sun.star.util.XCloseable;
@@ -253,6 +259,48 @@ public class DesktopTools
 }
 
 /**
+ * loads a document of from a given path using an input stream
+ *
+ * @param xMSF the MultiServiceFactory
+ * @param filePath the path of the document to load.
+ * @return the XComponent Interface of the document
+ */
+public static XComponent loadDocUsingStream(XMultiServiceFactory xMSF, 
String filePath)
+{
+XInputStream inputStream = null;
+try {
+final InputStream inputFile = new BufferedInputStream(
+new FileInputStream(filePath));
+final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+final byte[] byteBuffer = new byte[4096];
+int byteBufferLength = 0;
+while ((byteBufferLength = inputFile.read(byteBuffer)) > 0)
+bytes.write(byteBuffer, 0, byteBufferLength);
+inputFile.close();
+inputStream = new ByteArrayToXInputStreamAdapter(
+bytes.toByteArray());
+} catch (java.io.IOException e) {
+e.printStackTrace();
+}
+
+PropertyValue[] loadProps = new PropertyValue[1];
+loadProps[0] = new PropertyValue();
+loadProps[0].Name = "InputStream";
+loadProps[0].Value = inputStream;
+
+XComponent oDoc = null;
+try
+{
+oDoc = getCLoader(xMSF).loadComponentFromURL("private:stream", 
"_blank", 0, loadProps);
+}
+catch (com.sun.star.uno.Exception e)
+{
+throw new IllegalArgumentException("Document could not be loaded", 
e);
+}
+return oDoc;
+}
+
+/**
  * closes a given document
  * @param DocumentToClose the document to close
  */
diff --git a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java 
b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
index 9a0e7b8170a7..5697bba07e20 100644
--- a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
+++ b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
@@ -615,6 +615,21 @@ public class DocumentMetadataAccess
 }
 }
 
+@Test
+public void checkTdf123293() throws Exception
+{
+XComponent xComp = null;
+try {
+xComp = util.DesktopTools.loadDocUsingStream(xMSF, 
TestDocument.getPath("TESTRDFA.odt"));
+
+// Metadata was discarded when loading from stream, make sure it's 
there now
+XRepositorySupplier xRepoSupplier = 
UnoRuntime.queryInterface(XRepositorySupplier.class, xComp);
+assertNotNull("No metadata loaded", xRepoSupplier);
+} finally {
+close(xComp);
+}
+}
+
 private void storeRDFa(XComponent xComp, String file) throws 
com.sun.star.io.IOException
 {
 System.out.println("Storing test document...");
diff --git a/sfx2/qa/complex/sfx2/tools/TestDocument.java 
b/sfx2/qa/complex/sfx2/tools/TestDocument.java
index d10a4b0cb5d6..462c97fb99b7 100644
--- a/sfx2/qa/complex/sfx2/tools/TestDocument.java
+++ b/sfx2/qa/complex/sfx2/tools/TestDocument.java
@@ -26,6 +26,9 @@ public final class TestDocument {
 public static String getUrl(String name) {
 return OfficeFileUrl.getAbsolute(new File(Argument.get("tdoc"), name));
 }
+public 

[Libreoffice-commits] core.git: qadevOOo/runner sd/source svgio/source xmlhelp/source

2018-07-31 Thread Libreoffice Gerrit user
 qadevOOo/runner/base/java_complex.java   |2 +-
 sd/source/ui/view/drviews2.cxx   |2 +-
 svgio/source/svgreader/svgstylenode.cxx  |2 +-
 xmlhelp/source/cxxhelp/provider/urlparameter.cxx |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7a3e7ee1c7323e6db279d006ff218e6543228f3f
Author: Andrea Gelmini 
AuthorDate: Mon Jul 30 23:02:55 2018 +0200
Commit: Julien Nabet 
CommitDate: Tue Jul 31 09:56:01 2018 +0200

Fix typos

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

diff --git a/qadevOOo/runner/base/java_complex.java 
b/qadevOOo/runner/base/java_complex.java
index 9e61c5c5f9ae..e0f6b796732a 100644
--- a/qadevOOo/runner/base/java_complex.java
+++ b/qadevOOo/runner/base/java_complex.java
@@ -40,7 +40,7 @@ public class java_complex implements TestBase
 
 /**
  * This function executes the complex tests given as parameter "-o" or 
"TestJob". It queries for the correspond class
- * and crates the JobDescription.
+ * and creates the JobDescription.
  * @return true of all tests run successfully, else false
  */
 public boolean executeTest(TestParameters param)
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 349958309385..40ade045b23e 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -359,7 +359,7 @@ public:
 class ClassificationInserter : public ClassificationCommon
 {
 private:
-/// Delete the previous existing classification object(s) - if they exists
+/// Delete the previous existing classification object(s) - if they exist
 void deleteExistingObjects()
 {
 OUString sKey = m_aKeyCreator.makeCategoryNameKey();
diff --git a/svgio/source/svgreader/svgstylenode.cxx 
b/svgio/source/svgreader/svgstylenode.cxx
index c909586724f5..281bab937bb2 100644
--- a/svgio/source/svgreader/svgstylenode.cxx
+++ b/svgio/source/svgreader/svgstylenode.cxx
@@ -127,7 +127,7 @@ namespace svgio
 // which is just the space-char cleaned, concatenated 
Selectors. The part to 'match'
 // these is in 
fillCssStyleVectorUsingHierarchyAndSelectors. There, the same string is
 // built up using the priorities of local CssStyle, Id, 
Class and other info combined
-// with the existing hierarchy. This creates a 
specificity- and priority-sorted local
+// with the existing hierarchy. This creates a specificity 
and priority-sorted local
 // list for each node which is then chained using 
get/setCssStyleParent.
 // The current solution is capable of solving 
space-separated selectors which can be
 // mixed between Id, Class and type specifiers.
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx 
b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 8ed8f80a1c69..8707e3a478b2 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -515,7 +515,7 @@ bool URLParameter::query()
 else if( parameter == "Active" )
 m_aActive = value;
 else if( parameter == "Version" )
-; // ignored (but accepted) in the build-in help, useful only for 
the online help
+; // ignored (but accepted) in the built-in help, useful only for 
the online help
 else
 ret = false;
 }
___
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

2017-06-08 Thread Stephan Bergmann
 qadevOOo/runner/base/java_fat.java |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit c1a276e8e7e88f29f50ca0557fe1c0d9aa0f276a
Author: Stephan Bergmann 
Date:   Thu Jun 8 11:27:42 2017 +0200

Improve error reporting

Change-Id: I28459b157411b4ab5b10a25e017a0a7208e09aed

diff --git a/qadevOOo/runner/base/java_fat.java 
b/qadevOOo/runner/base/java_fat.java
index 2fa1d05c9722..4ed28f2c3652 100644
--- a/qadevOOo/runner/base/java_fat.java
+++ b/qadevOOo/runner/base/java_fat.java
@@ -186,15 +186,13 @@ public class java_fat implements TestBase {
 res = executeInterfaceTest(aSubEntry, tEnv, m_aParams);
 } catch (IllegalArgumentException iae) {
 System.out.println("Couldn't load class "
-+ aSubEntry.entryName);
-System.out
-.println(" " + iae.getMessage() + " ");
++ aSubEntry.entryName + ":");
+iae.printStackTrace(System.out);
 Summarizer.summarizeDown(aSubEntry, iae.getMessage());
 } catch (java.lang.NoClassDefFoundError iae) {
 System.out.println("Couldn't load class "
-+ aSubEntry.entryName);
-System.out
-.println(" " + iae.getMessage() + " ");
++ aSubEntry.entryName + ":");
+iae.printStackTrace(System.out);
 Summarizer.summarizeDown(aSubEntry, iae.getMessage());
 } catch (java.lang.RuntimeException e) {
 closeExistingOffice();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-28 Thread Caolán McNamara
 qadevOOo/runner/helper/ProcessHandler.java |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit ec79f3453471ee9b6ae32e71ff16ea99d9b7751c
Author: Caolán McNamara 
Date:   Sun May 28 21:07:52 2017 +0100

do we really need a OutputStreamWriter

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

diff --git a/qadevOOo/runner/helper/ProcessHandler.java 
b/qadevOOo/runner/helper/ProcessHandler.java
index 14409d9b62a5..2b2e94efed38 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -23,7 +23,6 @@ import java.io.PrintWriter;
 import java.io.PrintStream;
 import java.io.LineNumberReader;
 import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
 import lib.TestParameters;
 import util.PropertyName;
 import util.utils;
@@ -166,7 +165,7 @@ public class ProcessHandler
 this.envVars = envVars;
 if (log == null)
 {
-this.log = new PrintWriter(new OutputStreamWriter(System.out));
+this.log = new PrintWriter(System.out);
 }
 else
 {
___
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

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

2017-01-21 Thread Caolán McNamara
 qadevOOo/runner/helper/ProcessHandler.java |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 56af72b6fa52df8722a6f5b369ec1c2bb39285dd
Author: Caolán McNamara 
Date:   Sat Jan 21 17:42:51 2017 +

coverity#1399443 UrF: Unread field

fix like...

commit b9d63d49be66ed1bfc4a76924f1c52ec3630adc8
Date:   Tue Jan 12 15:27:41 2016 +0200

remove some unused Java code

found by UCDetector

Change-Id: Ic0295a24b26e206eb53eda2da540755477df86df

Change-Id: I5ce651905edbba3f23ebb421ebc0acadd54f39cf
Reviewed-on: https://gerrit.libreoffice.org/33379
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/qadevOOo/runner/helper/ProcessHandler.java 
b/qadevOOo/runner/helper/ProcessHandler.java
index aed7a12..14409d9 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -116,7 +116,6 @@ public class ProcessHandler
 private int exitValue = -1;
 private boolean isFinished = false;
 private boolean isStarted = false;
-private Pump stdout = null;
 private PrintStream stdIn = null;
 private Process m_aProcess = null;
 private boolean debug = false;
@@ -273,7 +272,7 @@ public class ProcessHandler
 return;
 }
 dbg("execute: pump io-streams");
-stdout = new Pump(m_aProcess.getInputStream(), log, "out > ", 
bUseOutput);
+new Pump(m_aProcess.getInputStream(), log, "out > ", bUseOutput);
 new Pump(m_aProcess.getErrorStream(), log, "err > ", bUseOutput);
 stdIn = new PrintStream(m_aProcess.getOutputStream());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-01-21 Thread Caolán McNamara
 qadevOOo/runner/helper/ProcessHandler.java |   97 -
 1 file changed, 1 insertion(+), 96 deletions(-)

New commits:
commit 5d7d2beba7c8ab635fb0657075fa81810053324a
Author: Caolán McNamara 
Date:   Sat Jan 21 17:40:25 2017 +

coverity#1399442 UPM: Private method is never called

since

commit 10cb59eb914ba722c203242272de244d795a51e8
Date:   Mon Jan 16 16:41:53 2017 +0200

remove some unused Java code

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

diff --git a/qadevOOo/runner/helper/ProcessHandler.java 
b/qadevOOo/runner/helper/ProcessHandler.java
index 1e136d9..aed7a12 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -177,8 +177,7 @@ public class ProcessHandler
 
 /**
  * Executes the command immediately returns. The process
- * remains in running state. Control of its state should
- * be made by waitFor methods.
+ * remains in running state.
  *
  * @return true if process was successfully
  * started.
@@ -283,100 +282,6 @@ public class ProcessHandler
 flushInput();
 }
 
-
-
-/**
- * This method is useful when the process was executed
- * asynchronously. Waits during specified time for process
- * to exit and return its status.
- *
- * @param timeout  > 0
- *  Waits specified time in miliSeconds for
- *  process to exit and return its status.
- *
- *  = 0
- *  Waits for the process to end regulary
- *
- *  < 0
- *  Kills the process immediately
- *
- * @return true if process correctly exited
- * (exit code doesn't affect to this result).
- */
-private boolean waitFor(long timeout)
-{
-return waitFor(timeout, true);
-}
-
-private boolean waitFor(long timeout, boolean bKillProcessAfterTimeout)
-{
-if (isFinished())
-{
-return true;
-}
-if (!isStarted())
-{
-return false;
-}
-
-if (timeout == 0)
-{
-try
-{
-m_aProcess.waitFor();
-}
-catch (InterruptedException e)
-{
-log.println("The process was interrupted: " + e);
-}
-isFinished = true;
-try
-{
-exitValue = m_aProcess.exitValue();
-}
-catch (IllegalThreadStateException e)
-{
-}
-}
-else
-{
-try
-{
-while (!isFinished && timeout > 0)
-{
-isFinished = true;
-Thread.sleep(1000);
-timeout -= 1000;
-try
-{
-exitValue = m_aProcess.exitValue(); // throws 
exception if not finished
-}
-catch (IllegalThreadStateException e)
-{
-isFinished = false;
-}
-}
-if (timeout < 0)
-{
-log.println("The process has timed out!");
-}
-}
-catch (InterruptedException ex)
-{
-log.println("The process was interrupted: " + ex);
-}
-}
-
-if (bKillProcessAfterTimeout && !isFinished)
-{
-log.println("Going to destroy the process!!");
-m_aProcess.destroy();
-log.println("Process has been destroyed!");
-}
-
-return isFinished();
-}
-
 private void flushInput()
 {
 if (stdIn == null)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-01-21 Thread Caolán McNamara
 qadevOOo/runner/helper/ProcessHandler.java |   42 ++---
 1 file changed, 9 insertions(+), 33 deletions(-)

New commits:
commit 711f203d1eeaeb0c2c75569c8606e98c394fd301
Author: Caolán McNamara 
Date:   Sat Jan 21 17:37:42 2017 +

coverity#1399444 UwF: Unwritten field

and

coverity#1399441 NP: Null pointer dereference

since

commit 10cb59eb914ba722c203242272de244d795a51e8
Date:   Mon Jan 16 16:41:53 2017 +0200

remove some unused Java code

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

diff --git a/qadevOOo/runner/helper/ProcessHandler.java 
b/qadevOOo/runner/helper/ProcessHandler.java
index 7ec20a5..1e136d9 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -109,9 +109,7 @@ class Pump extends Thread
  */
 public class ProcessHandler
 {
-
 private String cmdLine;
-private String[] cmdLineArray;
 private String[] envVars = null;
 private File workDir = null;
 private PrintWriter log;
@@ -254,47 +252,25 @@ public class ProcessHandler
 final Runtime runtime = Runtime.getRuntime();
 try
 {
-if (cmdLine == null)
+if (workDir != null)
 {
-log.println(utils.getDateTime() + "execute: Starting command 
from array: ");
-for (int i = 0; i < cmdLineArray.length; i++)
-{
-log.println(cmdLineArray[i]);
-}
+log.println(utils.getDateTime() + "execute: Starting command: 
");
+log.println(cmdLine + " path=" + workDir.getAbsolutePath());
 showEnvVars();
-log.println("");
-initializeProcessKiller();
-m_aProcess = runtime.exec(cmdLineArray, envVars);
+m_aProcess = runtime.exec(cmdLine, envVars, workDir);
 }
 else
 {
-if (workDir != null)
-{
-log.println(utils.getDateTime() + "execute: Starting 
command: ");
-log.println(cmdLine + " path=" + 
workDir.getAbsolutePath());
-showEnvVars();
-m_aProcess = runtime.exec(cmdLine, envVars, workDir);
-}
-else
-{
-log.println(utils.getDateTime() + "execute: Starting 
command: ");
-log.println(cmdLine);
-showEnvVars();
-m_aProcess = runtime.exec(cmdLine, envVars);
-}
+log.println(utils.getDateTime() + "execute: Starting command: 
");
+log.println(cmdLine);
+showEnvVars();
+m_aProcess = runtime.exec(cmdLine, envVars);
 }
 isStarted = true;
 }
 catch (java.io.IOException e)
 {
-if (cmdLine == null)
-{
-log.println(utils.getDateTime() + "execute: The command array 
can't be started: " + e);
-}
-else
-{
-log.println(utils.getDateTime() + "execute: The command " + 
cmdLine + " can't be started: " + e);
-}
+log.println(utils.getDateTime() + "execute: The command " + 
cmdLine + " can't be started: " + e);
 return;
 }
 dbg("execute: pump io-streams");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-01-21 Thread Caolán McNamara
 qadevOOo/runner/helper/ProcessHandler.java |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 0a09da40dd3178a38ad0234a9eae20b67a22
Author: Caolán McNamara 
Date:   Sat Jan 21 17:35:24 2017 +

this.cmdLine assigned twice

Change-Id: Icbc2393ac623d76c3ca5ae74525705f784b99c1c

diff --git a/qadevOOo/runner/helper/ProcessHandler.java 
b/qadevOOo/runner/helper/ProcessHandler.java
index 4ba1b5d..7ec20a5 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -166,7 +166,6 @@ public class ProcessHandler
 this.cmdLine = cmdLine;
 this.workDir = workDir;
 this.log = log;
-this.cmdLine = cmdLine;
 this.envVars = envVars;
 if (log == null)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-01-17 Thread Stephan Bergmann
 qadevOOo/runner/helper/CfgParser.java |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit fb4b59f9370167696d1a67beb16b593ba86971a8
Author: Stephan Bergmann 
Date:   Tue Jan 17 12:29:15 2017 +0100

cid#1398822: java.util.Properties.getProperty already returns String

Change-Id: I056bffbdd0e3280bfbcfbb82aff73fb5bab8a0b7

diff --git a/qadevOOo/runner/helper/CfgParser.java 
b/qadevOOo/runner/helper/CfgParser.java
index 59f0d27..ea9e7b5 100644
--- a/qadevOOo/runner/helper/CfgParser.java
+++ b/qadevOOo/runner/helper/CfgParser.java
@@ -55,11 +55,11 @@ public class CfgParser
 while (cfgEnum.hasMoreElements())
 {
 String pName = (String) cfgEnum.nextElement();
-Object pValue = cfg.getProperty(pName);
+String pValue = cfg.getProperty(pName);
 
-if (pValue instanceof String)
+if (pValue != null)
 {
-pValue = ((String) pValue).trim();
+pValue = pValue.trim();
 }
 
 param.put(pName.trim(), pValue);
___
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

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

2017-01-16 Thread Caolán McNamara
 qadevOOo/runner/helper/CfgParser.java   |   23 ---
 qadevOOo/runner/helper/UnoProvider.java |   10 +-
 qadevOOo/runner/lib/TestParameters.java |   27 +--
 qadevOOo/runner/util/PropertyName.java  |   26 ++
 4 files changed, 8 insertions(+), 78 deletions(-)

New commits:
commit f8ec51cc28ce8e3902ac53c6a1720a5a0ac82261
Author: Caolán McNamara 
Date:   Sun Jan 15 21:12:13 2017 +

boil down the use of OPERATING_SYSTEM to its unorc/uno.ini use

Change-Id: I9f0f98c989cb7ecf6227154e1d81d49abade66c2

diff --git a/qadevOOo/runner/helper/CfgParser.java 
b/qadevOOo/runner/helper/CfgParser.java
index 7c7e17a..59f0d27 100644
--- a/qadevOOo/runner/helper/CfgParser.java
+++ b/qadevOOo/runner/helper/CfgParser.java
@@ -81,29 +81,6 @@ public class CfgParser
 }
 
 debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE);
-
-//check for platform dependent parameters
-//this would have a $OperatingSystem as prefix
-String os = (String) param.get(PropertyName.OPERATING_SYSTEM);
-if (os != null && os.length() > 1)
-{
-
-Map aux = new HashMap();
-for (Iterator> it = 
param.entrySet().iterator(); it.hasNext();)
-{
-Map.Entry entry = it.next();
-String key = entry.getKey();
-if (key.startsWith(os))
-{
-Object oldValue = entry.getValue();
-String newKey = key.substring(os.length() + 1);
-it.remove();
-aux.put(newKey, oldValue);
-}
-}
-param.putAll(aux);
-
-}
 }
 
 private Properties getProperties(String name)
diff --git a/qadevOOo/runner/helper/UnoProvider.java 
b/qadevOOo/runner/helper/UnoProvider.java
index d5d18c3..017c222 100644
--- a/qadevOOo/runner/helper/UnoProvider.java
+++ b/qadevOOo/runner/helper/UnoProvider.java
@@ -109,15 +109,7 @@ public class UnoProvider implements AppProvider {
 if (unorcName == null) {
 String office = (String)param.get("AppExecutionCommand");
 // determine unorc name: unorc or uno.ini on windows
-String opSystem = (String)param.get(PropertyName.OPERATING_SYSTEM);
-if ( opSystem != null && 
opSystem.equalsIgnoreCase(PropertyName.WNTMSCI)) {
-unorcName = "uno.ini";
-}
-else {
-unorcName = "unorc";
-}
-if (office == null)
-return null;
+unorcName = (String)param.get(PropertyName.UNORC_NAME);
 // use '/', because this will be a URL in any case.
 unorcName = office.substring(0, office.indexOf("program")+7) +
 "/" + unorcName;
diff --git a/qadevOOo/runner/lib/TestParameters.java 
b/qadevOOo/runner/lib/TestParameters.java
index d5fdf5f..b5d033b 100644
--- a/qadevOOo/runner/lib/TestParameters.java
+++ b/qadevOOo/runner/lib/TestParameters.java
@@ -159,7 +159,7 @@ public class TestParameters extends HashMap {
 put(PropertyName.AUTO_RESTART, Boolean.FALSE);
 
 // get the operating system
-put(PropertyName.OPERATING_SYSTEM, getSOCompatibleOSName());
+put(PropertyName.UNORC_NAME, getUnoRcName());
 
 //For compatibility Reasons
 System.setProperty("DOCPTH", DefaultTestDocumentPath);
@@ -193,31 +193,14 @@ public class TestParameters extends 
HashMap {
 }
 
 /**
- * Convert the system dependent operating system name to a name according
- * to OOo rules.
- * @return A valid OS name, or "" if the name is not known.
+ * @return The uno rc file name uno.ini for windows and unorc for 
everything else
  */
-private String getSOCompatibleOSName() {
+private String getUnoRcName() {
 String osname = System.getProperty ("os.name").toLowerCase ();
-String osarch = System.getProperty ("os.arch");
-String operatingSystem = "";
 if (osname.indexOf ("windows")>-1) {
-operatingSystem = PropertyName.WNTMSCI;
-} else if (osname.indexOf ("linux")>-1 || osname.indexOf 
("kfreebsd")>-1) {
-operatingSystem = PropertyName.UNXLNGI;
-} else if (osname.indexOf ("sunos")>-1) {
-if (osarch.equals ("x86")) {
-operatingSystem = PropertyName.UNXSOLI;
-} else {
-operatingSystem = PropertyName.UNXSOLS;
-}
-} else if (osname.indexOf ("mac")>-1) {
-operatingSystem = PropertyName.UNXMACXI;
-} else {
-System.out.println("ERROR: not supported platform: " + osname);
-System.exit(1);
+return "uno.ini";
 }
-return operatingSystem;
+return 

[Libreoffice-commits] core.git: qadevOOo/runner scripting/examples scripting/java scripting/source sc/source sd/source svtools/source svx/source sw/inc

2016-10-01 Thread Andrea Gelmini
 qadevOOo/runner/lib/StatusException.java   |   
 2 -
 sc/source/ui/vba/vbarange.cxx  |   
 2 -
 scripting/examples/beanshell/Capitalise/capitalise.bsh |   
 2 -
 scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java |   
 2 -
 scripting/source/basprov/basscript.hxx |   
 2 -
 scripting/source/provider/ActiveMSPList.cxx|   
 2 -
 scripting/source/provider/MasterScriptProvider.cxx |   
 2 -
 sd/source/core/CustomAnimationEffect.cxx   |   
 4 +-
 sd/source/core/EffectMigration.cxx |   
 2 -
 sd/source/core/PageListWatcher.cxx |   
 2 -
 sd/source/filter/html/htmlex.cxx   |   
 2 -
 svtools/source/misc/filechangedchecker.cxx |   
 2 -
 svtools/source/svrtf/rtfout.cxx|   
 2 -
 svx/source/customshapes/EnhancedCustomShape2d.cxx  |   
 2 -
 svx/source/form/filtnav.cxx|   
 4 +-
 svx/source/svdraw/svdoashp.cxx |   
 2 -
 svx/source/table/tablecontroller.cxx   |   
12 +++---
 svx/source/xoutdev/xattr.cxx   |   
18 +-
 sw/inc/anchoredobject.hxx  |   
 2 -
 19 files changed, 34 insertions(+), 34 deletions(-)

New commits:
commit 0d4996862b5df79fd601eff6193d5718f8f84047
Author: Andrea Gelmini 
Date:   Sat Oct 1 15:45:53 2016 +0200

Fix typos

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

diff --git a/qadevOOo/runner/lib/StatusException.java 
b/qadevOOo/runner/lib/StatusException.java
index 328fc4f..98ca686 100644
--- a/qadevOOo/runner/lib/StatusException.java
+++ b/qadevOOo/runner/lib/StatusException.java
@@ -20,7 +20,7 @@ package lib;
 
 /**
  * StatusException is used to pass a Status object from a test code which is
- * terminated abnormaly. In many cases this is because of an exception thrown,
+ * terminated abnormally. In many cases this is because of an exception thrown,
  * but that can also be any other event that hinders the test execution.
  */
 public class StatusException extends RuntimeException {
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 70f0f9b..a49e5a2 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -3083,7 +3083,7 @@ ScVbaRange::Replace( const OUString& What, const 
OUString& Replacement, const un
 }
 
 ScGlobal::SetSearchItem( newOptions );
-// ignore MatchByte for the moment, its not supported in
+// ignore MatchByte for the moment, it's not supported in
 // OOo.org afaik
 
 uno::Reference< util::XSearchDescriptor > xSearch( xDescriptor, 
uno::UNO_QUERY );
diff --git a/scripting/examples/beanshell/Capitalise/capitalise.bsh 
b/scripting/examples/beanshell/Capitalise/capitalise.bsh
index 206a849..6b68e01 100644
--- a/scripting/examples/beanshell/Capitalise/capitalise.bsh
+++ b/scripting/examples/beanshell/Capitalise/capitalise.bsh
@@ -63,7 +63,7 @@ void capitalise() {
 UnoRuntime.queryInterface(XText.class, 
xTextRange.getText());
 xWordCursor = (XWordCursor)
 UnoRuntime.queryInterface(XWordCursor.class, 
xText.createTextCursorByRange(xTextRange));
-// move the Word cursor to the start of the word if its not
+// move the Word cursor to the start of the word if it's not
 // already there
 if(!xWordCursor.isStartOfWord()) {
 xWordCursor.gotoStartOfWord(false);
diff --git 
a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java 
b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
index 004fe2b..6341b51 100644
--- a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
+++ b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
@@ -137,7 +137,7 @@ public class ScriptMetaData extends ScriptEntry {
 }
 } else if (pathToParcel.contains(UNO_SHARED_PACKAGES1) ||
pathToParcel.contains(UNO_SHARED_PACKAGES2)) {
-//its a package
+//it's a package
 placeHolder = "share:uno_packages";
 String unoPkg = parent.parent.getName();
 
diff --git a/scripting/source/basprov/basscript.hxx 

[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

2016-09-23 Thread Samuel Mehrbrodt
 qadevOOo/runner/util/DesktopTools.java |5 -
 1 file changed, 5 deletions(-)

New commits:
commit eb00cb1ba8bbee3c65b7bc0eff9a16e8debbf2d2
Author: Samuel Mehrbrodt 
Date:   Fri Sep 23 09:36:06 2016 +0200

Remove duplicate comment

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

diff --git a/qadevOOo/runner/util/DesktopTools.java 
b/qadevOOo/runner/util/DesktopTools.java
index 0c32d27..3bc95dc 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -120,11 +120,6 @@ public class DesktopTools
  * @param xMSF the MultiServiceFactory
  * @return returns an Array of document kinds like ["swriter"]
  */
-/**
- * returns an array of all open documents
- * @param xMSF the XMultiSerivceFactory
- * @return returns an array of all open documents
- */
 public static Object[] getAllOpenDocuments(XMultiServiceFactory xMSF)
 {
 ArrayList components = new ArrayList();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-23 Thread Samuel Mehrbrodt
 qadevOOo/runner/util/DesktopTools.java |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6de79e3a10eb2ad72e70c79ebacf6f14cb64cf7f
Author: Samuel Mehrbrodt 
Date:   Fri Sep 23 09:07:33 2016 +0200

Remove nonsense comments

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

diff --git a/qadevOOo/runner/util/DesktopTools.java 
b/qadevOOo/runner/util/DesktopTools.java
index 9765d75..0c32d27 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -65,7 +65,7 @@ public class DesktopTools
 XComponentLoader.class, oDesktop);
 
 return oCLoader;
-} // finish getCLoader
+}
 
 /**
  * Creates an Instance of the Desktop service
@@ -87,7 +87,7 @@ public class DesktopTools
 }
 
 return oInterface;
-} //finish createDesktop
+}
 
 /**
  * returns a XEnumeration containing all components containing on the 
desktop
@@ -234,7 +234,7 @@ public class DesktopTools
 }
 
 return oDoc;
-} //finish openNewDoc
+}
 
 /**
  * loads a document of from a given url
@@ -263,7 +263,7 @@ public class DesktopTools
 
 bringWindowToFront(oDoc);
 return oDoc;
-} //finish openNewDoc
+}
 
 /**
  * closes a given document
___
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 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

2016-03-15 Thread Noel Grandin
 qadevOOo/runner/helper/OfficeProvider.java |   10 --
 qadevOOo/runner/lib/TestParameters.java|1 -
 qadevOOo/runner/util/PropertyName.java |6 --
 3 files changed, 17 deletions(-)

New commits:
commit fd91c0ac507ac2d565d5112b7dbd87014b142cf6
Author: Noel Grandin 
Date:   Tue Mar 15 08:48:49 2016 +0200

remove the office close timeout in subsequentcheck

and lets see if anyone complains

Change-Id: I0ec236006476064e67cda9869ab45c1860ed351b

diff --git a/qadevOOo/runner/helper/OfficeProvider.java 
b/qadevOOo/runner/helper/OfficeProvider.java
index 584c4ca..8805658 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -476,16 +476,6 @@ public class OfficeProvider implements AppProvider
 
 desk.terminate();
 dbg("Desktop terminated");
-
-try
-{
-final int closeTime = 
param.getInt(util.PropertyName.OFFICE_CLOSE_TIME_OUT);
-dbg("the Office has " + closeTime / 1000 + " seconds 
for closing...");
-Thread.sleep(closeTime);
-}
-catch (InterruptedException e)
-{
-}
 }
 }
 catch (com.sun.star.uno.Exception ue)
diff --git a/qadevOOo/runner/lib/TestParameters.java 
b/qadevOOo/runner/lib/TestParameters.java
index 33fbd30..d5fdf5f 100644
--- a/qadevOOo/runner/lib/TestParameters.java
+++ b/qadevOOo/runner/lib/TestParameters.java
@@ -157,7 +157,6 @@ public class TestParameters extends HashMap {
 put(PropertyName.TIME_OUT, Integer.valueOf(300));
 put(PropertyName.THREAD_TIME_OUT, Integer.valueOf(300));
 put(PropertyName.AUTO_RESTART, Boolean.FALSE);
-put(PropertyName.OFFICE_CLOSE_TIME_OUT, Integer.valueOf(15000));
 
 // get the operating system
 put(PropertyName.OPERATING_SYSTEM, getSOCompatibleOSName());
diff --git a/qadevOOo/runner/util/PropertyName.java 
b/qadevOOo/runner/util/PropertyName.java
index 83a0b7f..b15fc88 100644
--- a/qadevOOo/runner/util/PropertyName.java
+++ b/qadevOOo/runner/util/PropertyName.java
@@ -93,12 +93,6 @@ public interface PropertyName {
  */
 String THREAD_TIME_OUT = "ThreadTimeOut";
 /**
- * parameter name: "OfficeCloseTimeOut"
- * This parameter contains the time which the office could use to close for
- * itself before it is destroyed. Default is 15000 ms
- */
-String OFFICE_CLOSE_TIME_OUT = "OfficeCloseTimeOut";
-/**
  * parameter name: "OperatingSystem"
  */
 String OPERATING_SYSTEM = "OperatingSystem";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-06 Thread Caolán McNamara
 qadevOOo/runner/lib/MultiPropertyTest.java |   29 +
 1 file changed, 1 insertion(+), 28 deletions(-)

New commits:
commit f12e8d66189651540ba60664328828ab2e8756c6
Author: Caolán McNamara 
Date:   Sun Mar 6 20:50:06 2016 +

coverity#1326576 Useless call

Change-Id: I1d51b96042f229de42ed26d90ecc2a070eb5b3a6

diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java 
b/qadevOOo/runner/lib/MultiPropertyTest.java
index 8f34585..673fdb3 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -69,33 +69,6 @@ public class MultiPropertyTest extends MultiMethodTest
  * in MultiMethodTest code.
  */
 public XPropertySet oObj;
-protected boolean optionalService = false;
-
-/**
- * Overrides super.before() to check the service is supported by the 
object.
- */
-@Override
-protected void before()
-{
-XServiceInfo xInfo = UnoRuntime.queryInterface(
-XServiceInfo.class, oObj);
-
-optionalService = entry.isOptional;
-
-String theService = getTestedClassName();
-if (xInfo != null && !xInfo.supportsService(theService))
-{
-log.println("Service " + theService + " not available");
-if (optionalService)
-{
-log.println("This is OK since it is optional");
-}
-else
-{
-Status.failed(theService + " is not supported");
-}
-}
-}
 
 /**
  * Overrides MultiMethodTest.invokeTestMethod(). If the test for the
@@ -154,7 +127,7 @@ public class MultiPropertyTest extends MultiMethodTest
 final boolean bHasProperty = info.hasPropertyByName(propName);
 if (!bHasProperty)
 {
-if (isOptional(propName) || optionalService)
+if (isOptional(propName) || entry.isOptional)
 {
 // skipping optional property test
 log.println("Property '" + propName + "' is optional 
and not supported");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-04 Thread Stephan Bergmann
 qadevOOo/runner/helper/OfficeProvider.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9dcd54014c315586e8c1aae08c6079dac7acb0b6
Author: Stephan Bergmann 
Date:   Fri Mar 4 14:21:22 2016 +0100

cid#1327083 SWL: Sleep with lock held

It's unclear to me why the disposeOffice method was marked "synchronized" 
in the
first place with fbd72be142ed23b3b526c8d0c3e002f15ca7ec74 "INTEGRATION: CWS
qadev16: #114831#."  Maybe just some cluelessness?  Lets see whether we 
ever run
into any problems after removing it.

Change-Id: I1f262b6b4b4f4e8911754a6b3fa3d61f5df0aeae

diff --git a/qadevOOo/runner/helper/OfficeProvider.java 
b/qadevOOo/runner/helper/OfficeProvider.java
index 26d0528..584c4ca 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -434,7 +434,7 @@ public class OfficeProvider implements AppProvider
 return msf;
 }
 
-private synchronized boolean disposeOffice(XMultiServiceFactory msf,
+private boolean disposeOffice(XMultiServiceFactory msf,
 TestParameters param)
 {
 XDesktop desk = null;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-02-05 Thread Caolán McNamara
 qadevOOo/runner/helper/APIDescGetter.java |   18 ++
 1 file changed, 18 insertions(+)

New commits:
commit 0ccf596a703d66bc120d1b4699c06b0d902d10ac
Author: Caolán McNamara 
Date:   Fri Feb 5 20:44:11 2016 +

coverity#1351880 Resource leak

and

coverity#1351881 Resource leak

Change-Id: Ifdbff9d164f3b8b2ce5f59b6e18e6744202d0184

diff --git a/qadevOOo/runner/helper/APIDescGetter.java 
b/qadevOOo/runner/helper/APIDescGetter.java
index d7a6728..0de81db 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -631,6 +631,15 @@ public class APIDescGetter extends DescGetter
 theEntry.SubEntryCount = subEntries != null ? subEntries.length : 0;
 theEntry.SubEntries = subEntries;
 
+try
+{
+csvFile.close();
+}
+catch (java.io.IOException ioe)
+{
+System.out.println("Exception while closing csvFile");
+}
+
 return theEntry;
 }
 
@@ -715,6 +724,15 @@ public class APIDescGetter extends DescGetter
 
 DescEntry[] subEntries = getSubEntries(csvFile, aEntry);
 
+try
+{
+csvFile.close();
+}
+catch (java.io.IOException ioe)
+{
+System.out.println("Exception while closing csvFile");
+}
+
 aEntry.SubEntryCount = subEntries != null ? subEntries.length : 0;
 aEntry.SubEntries = subEntries;
 
___
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 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

2016-01-20 Thread Caolán McNamara
 qadevOOo/runner/base/java_complex.java |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 5ccca93c1c4b4ba0b835e4bbf59a1306bb97c716
Author: Caolán McNamara 
Date:   Wed Jan 20 10:03:25 2016 +

coverity#1326467 Dereference null return value

Change-Id: If2491fb126f7392ed641087322a863736e7f4342

diff --git a/qadevOOo/runner/base/java_complex.java 
b/qadevOOo/runner/base/java_complex.java
index 7e63902..212c933 100644
--- a/qadevOOo/runner/base/java_complex.java
+++ b/qadevOOo/runner/base/java_complex.java
@@ -44,15 +44,20 @@ public class java_complex implements TestBase
  */
 public boolean executeTest(TestParameters param)
 {
-
 // get the test job
 String testJob = ((String) param.get("TestJob"));
 
 DescGetter descGetter = new ComplexDescGetter();
 // get the test jobs
 DescEntry[] entries = descGetter.getDescriptionFor(testJob, null, 
true);
-return executeTest(param, entries);
 
+if (entries == null) {
+System.out.println("Couldn't get Description for Job: " + testJob);
+
+return false;
+}
+
+return executeTest(param, entries);
 }
 
 /**
___
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

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

2015-12-08 Thread Stephan Bergmann
 qadevOOo/runner/util/ValueComparer.java |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 01d2fccec17091d000906c41ef5fbc4fd31aeec8
Author: Stephan Bergmann 
Date:   Tue Dec 8 14:24:25 2015 +0100

These compare* calls shall most likely update result

...instead of being removed, a9824e8e05bddbf8ec417c7e5447914dd22cb8e5
"cid#1326591, cid#1326590 useless call"

Change-Id: Ia71abff8fb821cb4904794e1f9cbeb320e17c629

diff --git a/qadevOOo/runner/util/ValueComparer.java 
b/qadevOOo/runner/util/ValueComparer.java
index 4d54d14..bf783f4 100644
--- a/qadevOOo/runner/util/ValueComparer.java
+++ b/qadevOOo/runner/util/ValueComparer.java
@@ -239,13 +239,10 @@ public class ValueComparer {
 result = true;
 
 else if(XInterface.class.isAssignableFrom(op1.getClass()) && 
XInterface.class.isAssignableFrom(op2.getClass()))
-{
-// ignore
-}
+result = compareInterfaces((XInterface)op1, (XInterface)op2);
+
 else if(Enum.class.isAssignableFrom(op1.getClass()) && 
Enum.class.isAssignableFrom(op2.getClass()))
-{
-// ignore
-}
+result = compareEnums((Enum)op1, (Enum)op2);
 
 else if(op1.getClass() == String.class && op2.getClass() == 
String.class) // is it a String ?
 result = ((String)op1).equals(op2);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-12-08 Thread Stephan Bergmann
 qadevOOo/runner/util/ValueComparer.java |   66 ++--
 1 file changed, 21 insertions(+), 45 deletions(-)

New commits:
commit eac3c35c9f4a7b81bde4bbcc8efd6844f7659967
Author: Stephan Bergmann 
Date:   Tue Dec 8 15:23:49 2015 +0100

Clean up compareObjects

Change-Id: I3889453be48aaffc8015fbbb5672d34e904c3770

diff --git a/qadevOOo/runner/util/ValueComparer.java 
b/qadevOOo/runner/util/ValueComparer.java
index bf783f4..fce61bc 100644
--- a/qadevOOo/runner/util/ValueComparer.java
+++ b/qadevOOo/runner/util/ValueComparer.java
@@ -187,70 +187,46 @@ public class ValueComparer {
 }
 
 private static boolean compareObjects(Object op1, Object op2) throws 
Exception {
-boolean result = false;
-
 if(op1 == op2)
-result = true;
-
-if ( (op1==null) || (op2 == null) ) {
-result = (op1 == op2);
-}
-
+return true;
+else if(op1==null || op2 == null)
+return op1 == op2;
 else if(op1.getClass().isPrimitive() && op2.getClass().isPrimitive())
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(op1.getClass() == Byte.class && op2.getClass() == Byte.class)
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(op1.getClass() == Type.class && op2.getClass() == Type.class)
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(op1.getClass() == Boolean.class && op2.getClass() == 
Boolean.class)
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(op1.getClass() == Short.class && op2.getClass() == Short.class)
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(Throwable.class.isAssignableFrom(op1.getClass()) && 
Throwable.class.isAssignableFrom(op2.getClass()))
-result = compareThrowable((Throwable)op1, (Throwable)op2);
-
+return compareThrowable((Throwable)op1, (Throwable)op2);
 else if(op1.getClass() == Integer.class && op2.getClass() == 
Integer.class)
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(op1.getClass() == Character.class && op2.getClass() == 
Character.class)
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(op1.getClass() == Long.class && op2.getClass() == Long.class)
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(op1.getClass() == Void.class && op2.getClass() == Void.class)
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(op1.getClass() == Float.class && op2.getClass() == Float.class)
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(op1.getClass() == Double.class && op2.getClass() == 
Double.class)
-result = op1.equals(op2);
-
+return op1.equals(op2);
 else if(op1.getClass().isArray() && op2.getClass().isArray())
-result = compareArrays(op1, op2);
-
+return compareArrays(op1, op2);
 else if(op1.getClass() == Void.class || op2.getClass() == void.class) 
// write nothing ?
-result = true;
-
+return true;
 else if(XInterface.class.isAssignableFrom(op1.getClass()) && 
XInterface.class.isAssignableFrom(op2.getClass()))
-result = compareInterfaces((XInterface)op1, (XInterface)op2);
-
+return compareInterfaces((XInterface)op1, (XInterface)op2);
 else if(Enum.class.isAssignableFrom(op1.getClass()) && 
Enum.class.isAssignableFrom(op2.getClass()))
-result = compareEnums((Enum)op1, (Enum)op2);
-
+return compareEnums((Enum)op1, (Enum)op2);
 else if(op1.getClass() == String.class && op2.getClass() == 
String.class) // is it a String ?
-result = ((String)op1).equals(op2);
-
+return ((String)op1).equals(op2);
 else // otherwise it must be a struct
-result = compareStructs(op1, op2);
-
-return result;
+return compareStructs(op1, op2);
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-12-07 Thread jan iversen
 qadevOOo/runner/util/ValueComparer.java |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit a9824e8e05bddbf8ec417c7e5447914dd22cb8e5
Author: jan iversen 
Date:   Fri Dec 4 12:45:43 2015 +0100

cid#1326591, cid#1326590 useless call

The call does not do anything, removed.

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

diff --git a/qadevOOo/runner/util/ValueComparer.java 
b/qadevOOo/runner/util/ValueComparer.java
index dfc0768..4d54d14 100644
--- a/qadevOOo/runner/util/ValueComparer.java
+++ b/qadevOOo/runner/util/ValueComparer.java
@@ -239,10 +239,13 @@ public class ValueComparer {
 result = true;
 
 else if(XInterface.class.isAssignableFrom(op1.getClass()) && 
XInterface.class.isAssignableFrom(op2.getClass()))
-compareInterfaces((XInterface)op1, (XInterface)op2);
-
+{
+// ignore
+}
 else if(Enum.class.isAssignableFrom(op1.getClass()) && 
Enum.class.isAssignableFrom(op2.getClass()))
-compareEnums((Enum)op1, (Enum)op2);
+{
+// ignore
+}
 
 else if(op1.getClass() == String.class && op2.getClass() == 
String.class) // is it a String ?
 result = ((String)op1).equals(op2);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-22 Thread Stephan Bergmann
 qadevOOo/runner/lib/MultiPropertyTest.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit daa6fe4173ba9215a7044887dc28cc8ee4408985
Author: Stephan Bergmann 
Date:   Thu Oct 22 10:56:41 2015 +0200

Why check that resValue != oldValue

...if all we want to verify is that resValue == newValue (and it is the test
code's responsibility to come up with a newValue != oldValue, but which 
might
sometimes not be possible)?

Change-Id: Ibfce322b50bb0074ca76c33ad0c83541a8d4dc41

diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java 
b/qadevOOo/runner/lib/MultiPropertyTest.java
index 9946710..cbf8f5d 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -386,7 +386,7 @@ public class MultiPropertyTest extends MultiMethodTest
 {
 // if no exception thrown
 // check that the new value is set
-if ((!compare(resValue, newValue)) || (compare(resValue, 
oldValue)))
+if (!compare(resValue, newValue))
 {
 log.println("Value for '" + propName + "' hasn't 
changed as expected");
 try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-22 Thread Stephan Bergmann
 qadevOOo/runner/lib/MultiPropertyTest.java |   13 +++--
 1 file changed, 3 insertions(+), 10 deletions(-)

New commits:
commit d622b72e1d90670e4c8df8a512c8d161e85c2e3f
Author: Stephan Bergmann 
Date:   Thu Oct 22 13:52:01 2015 +0200

No need to check for non-null here

...as null values are handled just fine by compare()

Change-Id: Ifd17b96187ad3d13be99b107d3c3fa47e51b586e

diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java 
b/qadevOOo/runner/lib/MultiPropertyTest.java
index 38bf2cc..53cbf09 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -406,17 +406,10 @@ public class MultiPropertyTest extends MultiMethodTest
 log.println("\t The type seems to be an Any with 
value of NULL.");
 log.println("\t Maybe the property should get its 
own test method.");
 }
-if (resValue != null)
+if (!compare(resValue, oldValue))
 {
-if (!compare(resValue, oldValue))
-{
-log.println("But it has changed.");
-tRes.tested(propName, true);
-}
-else
-{
-tRes.tested(propName, false);
-}
+log.println("But it has changed.");
+tRes.tested(propName, true);
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-22 Thread Stephan Bergmann
 qadevOOo/runner/lib/MultiPropertyTest.java |   43 ++---
 1 file changed, 3 insertions(+), 40 deletions(-)

New commits:
commit ab489869e23d2e4fdf5aa11c304a3ac585bbb36f
Author: Stephan Bergmann 
Date:   Thu Oct 22 15:03:18 2015 +0200

These places apparently want to unbox a value boxed as an Any

...same as 8fb3808f555ad5b5c66cb894f9402647ca9ba341

Change-Id: If21d6bbf5f88b8ca5ed5387d98b2dd9c74f0e32c

diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java 
b/qadevOOo/runner/lib/MultiPropertyTest.java
index 53cbf09..c4521f3 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -358,21 +358,7 @@ public class MultiPropertyTest extends MultiMethodTest
 if (!compare(resValue, oldValue))
 {
 log.println("Read only property '" + propName + "' has 
changed");
-try
-{
-if (!util.utils.isVoid(oldValue) && oldValue 
instanceof Any)
-{
-oldValue = AnyConverter.toObject(new 
Type(oldValue.getClass()), oldValue);
-}
-log.println("result = " + toString(resValue));
-}
-catch (com.sun.star.lang.IllegalArgumentException iae)
-{
-log.println("NOTIFY: this property needs further 
investigations.");
-log.println("\t The type seems to be an Any with 
value of NULL.");
-log.println("\t Maybe the property should get its 
own test method.");
-}
-
+log.println("result = " + toString(resValue));
 tRes.tested(propName, false);
 }
 else
@@ -392,20 +378,7 @@ public class MultiPropertyTest extends MultiMethodTest
 if (!compare(resValue, newValue))
 {
 log.println("Value for '" + propName + "' hasn't 
changed as expected");
-try
-{
-if (!util.utils.isVoid(oldValue) && oldValue 
instanceof Any)
-{
-oldValue = AnyConverter.toObject(new 
Type(oldValue.getClass()), oldValue);
-}
-log.println("result = " + toString(resValue));
-}
-catch (com.sun.star.lang.IllegalArgumentException iae)
-{
-log.println("NOTIFY: this property needs further 
investigations.");
-log.println("\t The type seems to be an Any with 
value of NULL.");
-log.println("\t Maybe the property should get its 
own test method.");
-}
+log.println("result = " + toString(resValue));
 if (!compare(resValue, oldValue))
 {
 log.println("But it has changed.");
@@ -419,17 +392,7 @@ public class MultiPropertyTest extends MultiMethodTest
 else
 {
 log.println("Property '" + propName + "' OK");
-try
-{
-if (!util.utils.isVoid(oldValue) && oldValue 
instanceof Any)
-{
-oldValue = AnyConverter.toObject(new 
Type(oldValue.getClass()), oldValue);
-}
-log.println("result = " + toString(resValue));
-}
-catch (com.sun.star.lang.IllegalArgumentException iae)
-{
-}
+log.println("result = " + toString(resValue));
 tRes.tested(propName, true);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-21 Thread Stephan Bergmann
 qadevOOo/runner/util/ValueChanger.java |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 7180887981f9f417d4b9e75e196ee2cf500c1aac
Author: Stephan Bergmann 
Date:   Wed Oct 21 09:01:03 2015 +0200

Make ValueChanger work for UNO structs

...that always have a static UNOTYPEINFO field

Change-Id: Ie70632c47e03897e79c3ddf7087e51c1e67cf086

diff --git a/qadevOOo/runner/util/ValueChanger.java 
b/qadevOOo/runner/util/ValueChanger.java
index 4afac0a..fc747ad 100644
--- a/qadevOOo/runner/util/ValueChanger.java
+++ b/qadevOOo/runner/util/ValueChanger.java
@@ -960,7 +960,7 @@ public class ValueChanger {
 newValue = clazz.newInstance();
 Field[] fields = clazz.getFields();
 for (int i = 0; i < fields.length; i++) {
-if ((fields[i].getModifiers() & Modifier.PUBLIC) != 0) {
+if ((fields[i].getModifiers() & Modifier.STATIC) == 0) {
 Class fType = fields[i].getType();
 Field field = fields[i];
 if (!fType.isPrimitive()) {
@@ -1036,6 +1036,11 @@ public class ValueChanger {
 Field[] fields = clazz.getDeclaredFields();
 for (int i = 0; i < fields.length; i++) {
 int mod = fields[i].getModifiers();
+if (mod == (Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL)
+&& fields[i].getName().equals("UNOTYPEINFO"))
+{
+continue;
+}
 // If the field is PUBLIC it must not be STATIC or FINAL
 result &= ((mod & Modifier.PUBLIC) == 0)
 || (((mod & Modifier.STATIC) == 0) && ((mod & 
Modifier.FINAL) == 0));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-21 Thread Stephan Bergmann
 qadevOOo/runner/util/ValueChanger.java |   52 +++--
 1 file changed, 44 insertions(+), 8 deletions(-)

New commits:
commit 1b5766f7c29f28349d8970e6437c8ab1ba994825
Author: Stephan Bergmann 
Date:   Wed Oct 21 13:55:50 2015 +0200

In ValueChanger, don't accidentally modify oldValue

...so test code can later reliably check that a newly obtained value is
different from oldValue.  (Use copyStruct instead of new, in case the type 
of
oldValue is derived from the type determined with instanceof.)

Change-Id: I3bcf406e0ca06a710f5d43bd75c0e96ff68dbde4

diff --git a/qadevOOo/runner/util/ValueChanger.java 
b/qadevOOo/runner/util/ValueChanger.java
index fc747ad..14e10f9 100644
--- a/qadevOOo/runner/util/ValueChanger.java
+++ b/qadevOOo/runner/util/ValueChanger.java
@@ -330,7 +330,8 @@ public class ValueChanger {
 if (oldValue.equals(FS5))
 newValue = FS1;
 } else if (oldValue instanceof com.sun.star.awt.Gradient) {
-com.sun.star.awt.Gradient _newValue = (com.sun.star.awt.Gradient) 
oldValue;
+com.sun.star.awt.Gradient _newValue = copyStruct(
+(com.sun.star.awt.Gradient) oldValue);
 _newValue.Angle += 10;
 _newValue.Border += 1;
 _newValue.EndColor += 1000;
@@ -343,7 +344,8 @@ public class ValueChanger {
 _newValue.YOffset += 10;
 newValue = _newValue;
 } else if (oldValue instanceof com.sun.star.text.GraphicCrop) {
-com.sun.star.text.GraphicCrop _newValue = 
(com.sun.star.text.GraphicCrop) oldValue;
+com.sun.star.text.GraphicCrop _newValue = copyStruct(
+(com.sun.star.text.GraphicCrop) oldValue);
 _newValue.Bottom += 10;
 _newValue.Left += 10;
 _newValue.Right += 10;
@@ -445,7 +447,8 @@ public class ValueChanger {
 if (oldValue.equals(LJ5))
 newValue = LJ1;
 } else if (oldValue instanceof com.sun.star.drawing.LineDash) {
-com.sun.star.drawing.LineDash _newValue = 
(com.sun.star.drawing.LineDash) oldValue;
+com.sun.star.drawing.LineDash _newValue = copyStruct(
+(com.sun.star.drawing.LineDash) oldValue);
 _newValue.Dashes += 1;
 _newValue.DashLen += 10;
 _newValue.Distance += 20;
@@ -454,7 +457,8 @@ public class ValueChanger {
 _newValue.Style = com.sun.star.drawing.DashStyle.RECT;
 newValue = _newValue;
 } else if (oldValue instanceof com.sun.star.drawing.Hatch) {
-com.sun.star.drawing.Hatch _newValue = 
(com.sun.star.drawing.Hatch) oldValue;
+com.sun.star.drawing.Hatch _newValue = copyStruct(
+(com.sun.star.drawing.Hatch) oldValue);
 _newValue.Angle += 10;
 _newValue.Color += 1000;
 _newValue.Distance += 10;
@@ -549,7 +553,8 @@ public class ValueChanger {
 if (oldValue.equals(RS2))
 newValue = RS1;
 } else if (oldValue instanceof com.sun.star.awt.FontDescriptor) {
-com.sun.star.awt.FontDescriptor _newValue = 
(com.sun.star.awt.FontDescriptor) oldValue;
+com.sun.star.awt.FontDescriptor _newValue = copyStruct(
+(com.sun.star.awt.FontDescriptor) oldValue);
 _newValue.CharacterWidth += 5;
 _newValue.CharSet = com.sun.star.awt.CharSet.ANSI;
 _newValue.Family = com.sun.star.awt.FontFamily.DECORATIVE;
@@ -601,7 +606,8 @@ public class ValueChanger {
 _newValue.FileURL = 
util.utils.getFullTestURL("SwXTextSection.sdw");
 newValue = _newValue;
 } else if (oldValue instanceof com.sun.star.table.BorderLine) {
-com.sun.star.table.BorderLine _newValue = 
(com.sun.star.table.BorderLine) oldValue;
+com.sun.star.table.BorderLine _newValue = copyStruct(
+(com.sun.star.table.BorderLine) oldValue);
 _newValue.Color += 2;
 _newValue.InnerLineWidth += 2;
 _newValue.LineDistance += 2;
@@ -703,7 +709,8 @@ public class ValueChanger {
 if (oldValue.equals(GF13))
 newValue = GF1;
 } else if (oldValue instanceof com.sun.star.table.CellAddress) {
-com.sun.star.table.CellAddress _newValue = 
(com.sun.star.table.CellAddress) oldValue;
+com.sun.star.table.CellAddress _newValue = copyStruct(
+(com.sun.star.table.CellAddress) oldValue);
 _newValue.Column += 1;
 _newValue.Row += 1;
 newValue = _newValue;
@@ -829,7 +836,13 @@ public class ValueChanger {
 newValue = oldValue;
 
 } else if (oldValue instanceof com.sun.star.style.TabStop[]) {
-com.sun.star.style.TabStop[] _newValue = 
(com.sun.star.style.TabStop[]) oldValue;
+com.sun.star.style.TabStop[] old = 

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

2015-10-16 Thread Noel Grandin
 qadevOOo/runner/complexlib/ComplexTestCase.java |2 +-
 qadevOOo/runner/lib/SimpleStatus.java   |2 +-
 qadevOOo/runner/lib/Status.java |6 +++---
 qadevOOo/runner/stats/Summarizer.java   |   12 ++--
 toolkit/qa/complex/toolkit/UnitConversion.java  |2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit db8c70324091f9608a9e71e0df7bbdf9a371bf3b
Author: Noel Grandin 
Date:   Fri Oct 16 10:58:08 2015 +0200

convert PASSED to COMPLETED in 'make check' test messages

Change-Id: I5501f4f40024d3a47bb7007896e07c6252151cf6

diff --git a/qadevOOo/runner/complexlib/ComplexTestCase.java 
b/qadevOOo/runner/complexlib/ComplexTestCase.java
index dd8afc6..56bc0b9 100644
--- a/qadevOOo/runner/complexlib/ComplexTestCase.java
+++ b/qadevOOo/runner/complexlib/ComplexTestCase.java
@@ -200,7 +200,7 @@ public abstract class ComplexTestCase extends Assurance 
implements ComplexTest
 subEntry.ErrorMsg = (msg == null ? "" : msg);
 continue;
 }
-subEntry.State = (bSuccessful ? "PASSED.OK" : message);
+subEntry.State = (bSuccessful ? "COMPLETED.OK" : message);
 subEntry.hasErrorMsg = !bSuccessful;
 subEntry.ErrorMsg = message;
 }
diff --git a/qadevOOo/runner/lib/SimpleStatus.java 
b/qadevOOo/runner/lib/SimpleStatus.java
index b404dcb..177bfb3 100644
--- a/qadevOOo/runner/lib/SimpleStatus.java
+++ b/qadevOOo/runner/lib/SimpleStatus.java
@@ -36,7 +36,7 @@ class SimpleStatus {
 private final RunState runState;
 
 /**
- * This is the run state: either SKIPPED, PASSED, etc.
+ * This is the run state: either SKIPPED, COMPLETED, etc.
  * or user defined. Deriving classes can overwrite it for own run states.
  */
 protected String runStateString;
diff --git a/qadevOOo/runner/lib/Status.java b/qadevOOo/runner/lib/Status.java
index e96e4ef..ae7f97e 100644
--- a/qadevOOo/runner/lib/Status.java
+++ b/qadevOOo/runner/lib/Status.java
@@ -23,7 +23,7 @@ package lib;
  * described in two ways: state and runtime state. The state describes if the
  * activity was successful (OK state) or not (FAILED state). The runtime state
  * describes what happened during the activity: the test can be:
- *   - PASSED - the activity completed normally (although it can complete with
+ *   - COMPLETED - the activity completed normally (although it can complete 
with
  * FAILED state)
  *   - SKIPPED - the activity was not performed because of a reason (it also 
can
  * has OK or FAILED state)
@@ -38,7 +38,7 @@ public class Status extends SimpleStatus {
 
 /**
  * Construct a status: use runState and state
- * @param runState either PASSED, SKIPPED, etc.
+ * @param runState either COMPLETED, SKIPPED, etc.
  * @param bSuccessful OK or FAILED.
  */
 public Status(RunState runState, boolean bSuccessful ) {
@@ -102,7 +102,7 @@ public class Status extends SimpleStatus {
  * The method returns a human-readable description of the status.
  * The Status implementation of the method returns the status state
  * description and appends to it the reason, for example:
- * "FAILED.The getLabel works wrong", "PASSED.OK".
+ * "FAILED.The getLabel works wrong", "COMPLETED.OK".
  */
 @Override
 public String toString() {
diff --git a/qadevOOo/runner/stats/Summarizer.java 
b/qadevOOo/runner/stats/Summarizer.java
index 48478df..ced7e3c 100644
--- a/qadevOOo/runner/stats/Summarizer.java
+++ b/qadevOOo/runner/stats/Summarizer.java
@@ -47,11 +47,11 @@ public class Summarizer
 {
 if (entry.SubEntries[i].State == null)
 {
-entry.SubEntries[i].State = "PASSED.FAILED";
+entry.SubEntries[i].State = "COMPLETED.FAILED";
 }
 if (entry.SubEntries[i].State.equals("known issue"))
 {
-entry.SubEntries[i].State = "PASSED.OK";
+entry.SubEntries[i].State = "COMPLETED.OK";
 knownIssues++;
 }
 if (!entry.SubEntries[i].State.endsWith("OK"))
@@ -64,12 +64,12 @@ public class Summarizer
 if (failures.size() > 0)
 {
 String errMsg = "";
-String state = "PASSED.FAILED";
+String state = "COMPLETED.FAILED";
 for (int j = 0; j < failures.size(); j++)
 {
 if (states.get(j).equals("not part of the job"))
 {
-state = "PASSED(some interfaces/services not tested).OK";
+state = "COMPLETED(some interfaces/services not 
tested).OK";
 }
 else
 {
@@ -83,11 +83,11 @@ public class Summarizer
 }
 else if (entry.EntryType.equals("component") && knownIssues > 0)
 {
-entry.State = "PASSED(with known issues).OK";
+entry.State 

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

2015-10-16 Thread Noel Grandin
 qadevOOo/runner/lib/MultiMethodTest.java |2 +-
 qadevOOo/runner/lib/RunState.java|4 ++--
 qadevOOo/runner/lib/SimpleStatus.java|4 ++--
 qadevOOo/runner/lib/Status.java  |8 
 4 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit c429df73d5d7f6091b830c4ad2a9bdafdfb96ad7
Author: Noel Grandin 
Date:   Fri Oct 16 09:19:51 2015 +0200

rename test state 'PASSED' to 'COMPLETED'

which is more accurate since 'PASSED' normally means 'successful',
which is not the case here

Change-Id: I8e9368a810e7be823655f69646fd15feb9f8f502

diff --git a/qadevOOo/runner/lib/MultiMethodTest.java 
b/qadevOOo/runner/lib/MultiMethodTest.java
index c93f3ad..fd27c42 100644
--- a/qadevOOo/runner/lib/MultiMethodTest.java
+++ b/qadevOOo/runner/lib/MultiMethodTest.java
@@ -339,7 +339,7 @@ public class MultiMethodTest
 executeMethod(method);
 Status mtStatus = tRes.getStatusFor(method);
 
-if (mtStatus != null && (!mtStatus.isPassed() || mtStatus.isFailed()))
+if (mtStatus != null && (!mtStatus.isCompleted() || 
mtStatus.isFailed()))
 {
 log.println("! Required method " + method + " failed");
 throw new StatusException(mtStatus);
diff --git a/qadevOOo/runner/lib/RunState.java 
b/qadevOOo/runner/lib/RunState.java
index 2d8..4b1eaa5 100644
--- a/qadevOOo/runner/lib/RunState.java
+++ b/qadevOOo/runner/lib/RunState.java
@@ -21,9 +21,9 @@ package lib;
 public enum RunState {
 
 /**
- * The constant represents PASSED runtime state.
+ * The constant represents COMPLETED runtime state.
  */
-PASSED,
+COMPLETED,
 
 /**
  * The constant represents EXCEPTION runtime state.
diff --git a/qadevOOo/runner/lib/SimpleStatus.java 
b/qadevOOo/runner/lib/SimpleStatus.java
index e65666d..b404dcb 100644
--- a/qadevOOo/runner/lib/SimpleStatus.java
+++ b/qadevOOo/runner/lib/SimpleStatus.java
@@ -47,8 +47,8 @@ class SimpleStatus {
 protected SimpleStatus( RunState runState, boolean bSuccessful ) {
 this.bSuccessful = bSuccessful;
 this.runState = runState;
-if ( runState == RunState.PASSED ) {
-runStateString = "PASSED";
+if ( runState == RunState.COMPLETED ) {
+runStateString = "COMPLETED";
 } else if ( runState == RunState.SKIPPED ) {
 runStateString = "SKIPPED";
 } else if ( runState == RunState.EXCEPTION ) {
diff --git a/qadevOOo/runner/lib/Status.java b/qadevOOo/runner/lib/Status.java
index ba28a4c..e96e4ef 100644
--- a/qadevOOo/runner/lib/Status.java
+++ b/qadevOOo/runner/lib/Status.java
@@ -62,7 +62,7 @@ public class Status extends SimpleStatus {
  * otherwise).
  */
 public static Status passed( boolean bSuccessful ) {
-return new Status(RunState.PASSED, bSuccessful );
+return new Status(RunState.COMPLETED, bSuccessful );
 }
 
 /**
@@ -112,10 +112,10 @@ public class Status extends SimpleStatus {
 }
 
 /**
- * Checks whether the status runstate is passed.
+ * Checks whether the status runstate is completed.
  */
-public boolean isPassed() {
-return getRunState() == RunState.PASSED;
+public boolean isCompleted() {
+return getRunState() == RunState.COMPLETED;
 }
 
 /**
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-16 Thread Noel Grandin
 qadevOOo/runner/util/db/DataSource.java |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit fa2a7665194c7fff311d14932ee7930f80e6c7e2
Author: Noel Grandin 
Date:   Fri Oct 16 13:14:41 2015 +0200

cid#1326341 Unguarded read

Change-Id: Id49af9bc1c767126a365d85589fb4f2a99e5bcdd

diff --git a/qadevOOo/runner/util/db/DataSource.java 
b/qadevOOo/runner/util/db/DataSource.java
index 9b1ac80..e2fdcb9 100644
--- a/qadevOOo/runner/util/db/DataSource.java
+++ b/qadevOOo/runner/util/db/DataSource.java
@@ -64,13 +64,10 @@ public class DataSource
 /**
  * retrieves the css.sdb.OfficeDatabaseDocument associated with the data 
source
  */
-public DatabaseDocument getDatabaseDocument()
+public synchronized DatabaseDocument getDatabaseDocument()
 {
-synchronized ( this )
-{
-if ( m_document == null )
-m_document = new DatabaseDocument( this );
-}
+if ( m_document == null )
+m_document = new DatabaseDocument( this );
 return m_document;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-14 Thread Noel Grandin
 qadevOOo/runner/lib/MultiPropertyTest.java |6 +++---
 sc/qa/complex/sc/CalcRTL.java  |7 ++-
 2 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 8e3f72141625898c01e39e94d3fdaefd66c885ff
Author: Noel Grandin 
Date:   Wed Oct 14 10:37:15 2015 +0200

casting before calling getClass() is a waste of time

Change-Id: Id88aa9e43b736e6fdeaf098a952dae5421468f83

diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java 
b/qadevOOo/runner/lib/MultiPropertyTest.java
index 918d5e6..9946710 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -359,7 +359,7 @@ public class MultiPropertyTest extends MultiMethodTest
 {
 if (!util.utils.isVoid(oldValue) && oldValue 
instanceof Any)
 {
-oldValue = AnyConverter.toObject(new 
Type(((Any) oldValue).getClass()), oldValue);
+oldValue = AnyConverter.toObject(new 
Type(oldValue.getClass()), oldValue);
 }
 log.println("result = " + toString(resValue));
 }
@@ -393,7 +393,7 @@ public class MultiPropertyTest extends MultiMethodTest
 {
 if (!util.utils.isVoid(oldValue) && oldValue 
instanceof Any)
 {
-oldValue = AnyConverter.toObject(new 
Type(((Any) oldValue).getClass()), oldValue);
+oldValue = AnyConverter.toObject(new 
Type(oldValue.getClass()), oldValue);
 }
 log.println("result = " + toString(resValue));
 }
@@ -427,7 +427,7 @@ public class MultiPropertyTest extends MultiMethodTest
 {
 if (!util.utils.isVoid(oldValue) && oldValue 
instanceof Any)
 {
-oldValue = AnyConverter.toObject(new 
Type(((Any) oldValue).getClass()), oldValue);
+oldValue = AnyConverter.toObject(new 
Type(oldValue.getClass()), oldValue);
 }
 log.println("result = " + toString(resValue));
 }
diff --git a/sc/qa/complex/sc/CalcRTL.java b/sc/qa/complex/sc/CalcRTL.java
index 3c3fdd4..9f946a5 100644
--- a/sc/qa/complex/sc/CalcRTL.java
+++ b/sc/qa/complex/sc/CalcRTL.java
@@ -403,11 +403,8 @@ public class CalcRTL
 "' has changed");
 
 try {
-if (!util.utils.isVoid(oldValue) &&
-oldValue instanceof Any) {
-oldValue = AnyConverter.toObject(
-   new Type(((Any) 
oldValue).getClass()),
-   oldValue);
+if (!util.utils.isVoid(oldValue) && oldValue 
instanceof Any) {
+oldValue = AnyConverter.toObject( new 
Type(oldValue.getClass()), oldValue);
 }
 
 System.out.println("old = " + toString(oldValue));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-14 Thread Caolán McNamara
 qadevOOo/runner/util/BookmarkDsc.java |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 6df1e4dd3d9ddd43b1537f80dcd68516fd3252a7
Author: Caolán McNamara 
Date:   Wed Oct 14 11:43:33 2015 +0100

coverity#1327196 UwF: Unwritten field

Change-Id: I1847457bccaa7bd074127395367b080f0b376b12

diff --git a/qadevOOo/runner/util/BookmarkDsc.java 
b/qadevOOo/runner/util/BookmarkDsc.java
index 95d6a57..02736c9 100644
--- a/qadevOOo/runner/util/BookmarkDsc.java
+++ b/qadevOOo/runner/util/BookmarkDsc.java
@@ -29,7 +29,6 @@ public class BookmarkDsc extends InstDescr {
 
 private static final String service = "com.sun.star.text.Bookmark";
 private static final String ifcName = "com.sun.star.text.XTextContent";
-private String name = null;
 
 
 public BookmarkDsc() {
@@ -38,7 +37,7 @@ public class BookmarkDsc extends InstDescr {
 
 @Override
 public String getName() {
-return name;
+return null;
 }
 
 @Override
@@ -71,4 +70,4 @@ public class BookmarkDsc extends InstDescr {

 ServiceObj );
 return BM;
 }
-}
\ 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

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

2015-06-26 Thread Noel Grandin
 qadevOOo/runner/helper/ProcessHandler.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 14d988583a2f2d2b300e4804faa426f8a694b2e2
Author: Noel Grandin n...@peralex.com
Date:   Thu Jun 25 10:18:09 2015 +0200

fix spelling correcly - correctly

Change-Id: I76f9b791c10fb5c5736dd025abc125ae4a50ec7a

diff --git a/qadevOOo/runner/helper/ProcessHandler.java 
b/qadevOOo/runner/helper/ProcessHandler.java
index 313a160..212b2c98 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -286,7 +286,7 @@ public class ProcessHandler
  * exits.
  *
  * @return codetrue/code if process was successfully
- * started and correcly exits (exit code doesn't affect
+ * started and correctly exits (exit code doesn't affect
  * to this result).
  */
 public boolean executeSynchronously()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-14 Thread Stephan Bergmann
 qadevOOo/runner/lib/MultiPropertyTest.java |2 +-
 qadevOOo/runner/util/ValueChanger.java |   10 --
 sc/source/ui/unoobj/appluno.cxx|   15 ++-
 sc/source/ui/unoobj/confuno.cxx|   15 ++-
 4 files changed, 37 insertions(+), 5 deletions(-)

New commits:
commit 9ab76447cd7e1c61bc284c810734227438aa13c7
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Jan 14 12:06:28 2015 +0100

LinkUpdateMode property values must be in the range 0--2 or 0--3

...avoid setting bad values from generic qadevOOo property set tests, and 
throw
an IllegalArgumentException if bad values do get set.  Found via
-fsanitize=enum.  The TODO about ScLkUpdMode vs. LinkUpdateModes mismatch 
looks
worrying.

Change-Id: Ibc01845e7e3179dc693fe8c59c1f1ffad5282420

diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java 
b/qadevOOo/runner/lib/MultiPropertyTest.java
index b314ccf..918d5e6 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -454,7 +454,7 @@ public class MultiPropertyTest extends MultiMethodTest
 protected Object getNewValue(String propName, Object oldValue)
 throws java.lang.IllegalArgumentException
 {
-return ValueChanger.changePValue(oldValue);
+return ValueChanger.changePValue(oldValue, propName);
 }
 
 /**
diff --git a/qadevOOo/runner/util/ValueChanger.java 
b/qadevOOo/runner/util/ValueChanger.java
index 197de43..05b5232 100644
--- a/qadevOOo/runner/util/ValueChanger.java
+++ b/qadevOOo/runner/util/ValueChanger.java
@@ -58,9 +58,15 @@ public class ValueChanger {
 newValue = Long.valueOf(oldlong + 15);
 } else if (oldValue instanceof Short) {
 short n = ((Short) oldValue).shortValue();
-// css.form.component.{CheckBox,RadioButton} DefaultState 
properties
-// must have values in the range 0--2:
 if (DefaultState.equals(name)  n == 2) {
+// css.form.component.{CheckBox,RadioButton} DefaultState
+// properties must have values in the range 0--2:
+--n;
+} else if (LinkUpdateMode.equals(name)  n = 2) {
+// css.document.Settings LinkUpdateMode property must have
+// values in the css.document.LinkUpdateModes range (0--3),
+// while css.sheet.XGlobalSheetSettings LinkUpdateMode property
+// must have values in the range 0--2:
 --n;
 } else {
 ++n;
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index fd7edfd..d814831 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -36,6 +36,7 @@
 #include sc.hrc
 #include unonames.hxx
 #include funcdesc.hxx
+#include com/sun/star/document/LinkUpdateModes.hpp
 #include com/sun/star/sheet/FunctionArgument.hpp
 #include ScPanelFactory.hxx
 #include boost/scoped_array.hpp
@@ -395,7 +396,19 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
 }
 else if (aString == SC_UNONAME_LINKUPD)
 {
-aAppOpt.SetLinkMode( (ScLkUpdMode) 
ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
+sal_Int16 n;
+if (!(aValue = n) || n  css::document::LinkUpdateModes::NEVER
+|| n  css::document::LinkUpdateModes::GLOBAL_SETTING)
+{
+throw css::lang::IllegalArgumentException(
+(LinkUpdateMode property value must be a SHORT with a value 
in
+  the range of the css.document.LinkUpdateModes constants),
+css::uno::Referencecss::uno::XInterface(), -1);
+}
+//TODO: ScLkUpdMode (LM_ALWAYS=0, LM_NEVER=1, LM_ON_DEMAND=2,
+// LM_UNKNOWN=3) does not match css.document.LinkUpdateModes (NEVER=0,
+// MANUAL=1, AUTO=2, GLOBAL_SETTINGS=3):
+aAppOpt.SetLinkMode( static_castScLkUpdMode(n) );
 bSaveApp = true;
 }
 else if (aString == SC_UNONAME_MARKHDR)
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index ed59eeb..6cd3204 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -156,7 +156,20 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
 else if ( aPropertyName == SC_UNO_SHOWPAGEBR )
 aViewOpt.SetOption(VOPT_PAGEBREAKS, 
ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
 else if ( aPropertyName == SC_UNONAME_LINKUPD )
-rDoc.SetLinkMode( static_castScLkUpdMode ( 
ScUnoHelpFunctions::GetInt16FromAny( aValue ) ) );
+{
+sal_Int16 n;
+//TODO: css.sheet.XGlobalSheetSettings LinkUpdateMode property is
+// documented to take values in the range 0--2 (always, never, on
+// demaned), but appears to be routinely set to 3 here,
+// corresponding to ScLkUpdMode LM_UNKNOWN:
+

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

2014-10-30 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/helper/APIDescGetter.java |   22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

New commits:
commit 1e7382cb45759908cd3d639c839dcd5633dbadd1
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Wed Oct 29 16:48:00 2014 +0100

runner: Dereference of the result of readLine() without nullcheck

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

diff --git a/qadevOOo/runner/helper/APIDescGetter.java 
b/qadevOOo/runner/helper/APIDescGetter.java
index 4171dc2..71c8981 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -595,16 +595,20 @@ public class APIDescGetter extends DescGetter
 {
 String entry = buf.readLine();
 
-if (entry.endsWith(sEndsWithCSVName))
+if (entry != null)
 {
-System.out.println(FOUND  );
-InputStream input = 
this.getClass().getResourceAsStream(/objdsc/ +
-module +
-/ +
-entry);
-csvFile = new BufferedReader(
-new InputStreamReader(input));
-found = true;
+if (entry.endsWith(sEndsWithCSVName))
+{
+System.out.println(FOUND  );
+InputStream input =
+this.getClass().getResourceAsStream(/objdsc/ 
+
+module +
+/ +
+entry);
+csvFile =
+new BufferedReader(new 
InputStreamReader(input));
+found = true;
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-30 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/util/XMLTools.java |   
 3 ++-
 wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java |   
 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 9eabc1fc3b2efa3303860d33013f39582861
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Wed Oct 29 17:11:50 2014 +0100

java: Questionable use of non-short-circuit logic

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

diff --git a/qadevOOo/runner/util/XMLTools.java 
b/qadevOOo/runner/util/XMLTools.java
index 7dea190..64330a1 100644
--- a/qadevOOo/runner/util/XMLTools.java
+++ b/qadevOOo/runner/util/XMLTools.java
@@ -424,7 +424,8 @@ public class XMLTools {
 * all necessary tags and character data was found.
 */
 public boolean checkTags() {
-allOK = isWellFormed() ;
+if (!isWellFormed())
+allOK = false ;
 
 IteratorString badTags = tags.keySet().iterator() ;
 IteratorString badChars = chars.keySet().iterator() ;
diff --git 
a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java 
b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java
index 00319ce..fb1687a 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java
@@ -118,7 +118,7 @@ public class InBlocksLabelsAbove extends ColumnarTwoColumns
 aRectFields = insertFormattedField(xSection, sFieldName, 
aRectFields, nFieldWidth, aSOTextField);
 nLastHeight = Math.max(nLastHeight, aRectFields.Height);
 int nNextX = aRectFields.X + nFieldWidth;
-if (nNextX  (getPageWidth() - getRightPageIndent())  nCount  1)
+if ((nNextX  (getPageWidth() - getRightPageIndent()))  nCount  
1)
 {
 int nHeight = (aSOLabel.getHeight(LayoutConstants.LabelHeight) 
+ Math.max(aSOTextField.getHeight(LayoutConstants.FormattedFieldHeight), 
nLastHeight));
 nLastHeight = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-30 Thread Noel Grandin
 qadevOOo/runner/helper/APIDescGetter.java |   29 -
 1 file changed, 12 insertions(+), 17 deletions(-)

New commits:
commit 226285b7ccc0c6880ae1005c9f0d9f47aa41fc29
Author: Noel Grandin n...@peralex.com
Date:   Thu Oct 30 10:47:32 2014 +0200

java: calling ready() on a BufferedReader is a dodgy way..

..to detect end-of-file

Change-Id: I3b1d5eca3a7424d72b5e3ab741f7407ad7e65193

diff --git a/qadevOOo/runner/helper/APIDescGetter.java 
b/qadevOOo/runner/helper/APIDescGetter.java
index 71c8981..2df8cea 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -589,26 +589,21 @@ public class APIDescGetter extends DescGetter
 {
 InputStream in = con.getInputStream();
 java.io.BufferedReader buf = new java.io.BufferedReader(new 
InputStreamReader(in));
-boolean found = false;
-
-while (buf.ready()  !found)
+while (true)
 {
 String entry = buf.readLine();
-
-if (entry != null)
+if (entry == null)
+break;
+if (entry.endsWith(sEndsWithCSVName))
 {
-if (entry.endsWith(sEndsWithCSVName))
-{
-System.out.println(FOUND  );
-InputStream input =
-this.getClass().getResourceAsStream(/objdsc/ 
+
-module +
-/ +
-entry);
-csvFile =
-new BufferedReader(new 
InputStreamReader(input));
-found = true;
-}
+System.out.println(FOUND  );
+InputStream input =
+this.getClass().getResourceAsStream(/objdsc/ +
+module +
+/ +
+entry);
+csvFile = new BufferedReader(new 
InputStreamReader(input));
+break;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-24 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/helper/OfficeProvider.java |4 
 1 file changed, 4 deletions(-)

New commits:
commit ab06f67ee26e730f209a3ff8c4717901f70765fe
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Sun Oct 12 11:38:58 2014 +0200

runner: code will never be executed

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

diff --git a/qadevOOo/runner/helper/OfficeProvider.java 
b/qadevOOo/runner/helper/OfficeProvider.java
index 58fdd01..cfb2e232 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -297,10 +297,6 @@ public class OfficeProvider implements AppProvider
 {
 System.out.println(Could not connect an Office and cannot 
start one.\n.concat(please start an office with following parameter:\n).
 concat(\nsoffice --accept=).concat((String) 
param.get(ConnectionString)).concat(;urp;\n));
-if (bAppExecutionHasWarning)
-{
-System.out.println(errorMessage);
-}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-19 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/helper/CfgParser.java  |   19 +++
 qadevOOo/runner/org/openoffice/Runner.java |   10 +-
 qadevOOo/runner/stats/SQLExecution.java|   10 +-
 3 files changed, 21 insertions(+), 18 deletions(-)

New commits:
commit a8e723ed3eed44a85714abf1cb04b74178d2424f
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Sat Oct 11 17:08:23 2014 +0200

runner: Iterate over each Entry in a Map

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

diff --git a/qadevOOo/runner/helper/CfgParser.java 
b/qadevOOo/runner/helper/CfgParser.java
index 6c77461..d6cf0e6 100644
--- a/qadevOOo/runner/helper/CfgParser.java
+++ b/qadevOOo/runner/helper/CfgParser.java
@@ -18,8 +18,11 @@
 package helper;
 
 import java.io.FileInputStream;
+
 import java.util.Enumeration;
+import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Properties;
 
 import lib.TestParameters;
@@ -102,20 +105,20 @@ public class CfgParser
 if (os != null  os.length()  1)
 {
 
-//found something that could be a prefix
-//check all parameters for this
-IteratorString keys = param.keySet().iterator();
-while (keys.hasNext())
+MapString, Object aux = new HashMapString, Object();
+for (IteratorMap.EntryString, Object it = 
param.entrySet().iterator(); it.hasNext();)
 {
-String key = keys.next();
+Map.EntryString, Object entry = it.next();
+String key = entry.getKey();
 if (key.startsWith(os))
 {
-Object oldValue = param.get(key);
+Object oldValue = entry.getValue();
 String newKey = key.substring(os.length() + 1);
-param.remove(key);
-param.put(newKey, oldValue);
+it.remove();
+aux.put(newKey, oldValue);
 }
 }
+param.putAll(aux);
 
 }
 }
diff --git a/qadevOOo/runner/org/openoffice/Runner.java 
b/qadevOOo/runner/org/openoffice/Runner.java
index d833a4f..ff1bff4 100644
--- a/qadevOOo/runner/org/openoffice/Runner.java
+++ b/qadevOOo/runner/org/openoffice/Runner.java
@@ -22,6 +22,7 @@ import helper.ClParser;
 
 import java.util.Enumeration;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Properties;
 import java.util.StringTokenizer;
 
@@ -116,13 +117,12 @@ public class Runner
 bEmergencyStop |= checkPathVariable(sun.boot.class.path, sDelim);
 
 // - check all TestParameters -
-IteratorString aIter = _aParams.keySet().iterator();
-while (aIter.hasNext())
+for (Map.EntryString, Object entry : _aParams.entrySet())
 {
-String sKey = aIter.next();
-if (_aParams.get(sKey) instanceof String)
+String sKey = entry.getKey();
+if (entry.getValue() instanceof String)
 {
-String sValue = (String) _aParams.get(sKey);
+String sValue = (String) entry.getValue();
 
 if (checkVariableForCygwin(sValue))
 {
diff --git a/qadevOOo/runner/stats/SQLExecution.java 
b/qadevOOo/runner/stats/SQLExecution.java
index bb50dce..34f8949 100644
--- a/qadevOOo/runner/stats/SQLExecution.java
+++ b/qadevOOo/runner/stats/SQLExecution.java
@@ -22,9 +22,10 @@ import java.sql.DriverManager;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.Statement;
+
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Iterator;
+import java.util.Map;
 import java.util.StringTokenizer;
 
 /**
@@ -229,10 +230,9 @@ public class SQLExecution {
 execute(sqlCommand.get(i), sqlOutput, update);
 // merge output with input
 if (!update  mergeOutputIntoInput) {
-IteratorString keys = sqlOutput.keySet().iterator();
-while(keys.hasNext()) {
-String key = keys.next();
-String[]val = sqlOutput.get(key);
+for (Map.EntryString, String[] entry : sqlOutput.entrySet()) 
{
+String key = entry.getKey();
+String[] val = entry.getValue();
 if (val != null  val.length != 0) {
 if (val.length == 1)
 sqlInput.put(key, val[0]);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-18 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/convwatch/BorderRemover.java  |2 +-
 reportbuilder/java/org/libreoffice/report/SOImageService.java |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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

java: loss of precission

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

diff --git a/qadevOOo/runner/convwatch/BorderRemover.java 
b/qadevOOo/runner/convwatch/BorderRemover.java
index 09cc785..87ba90a 100644
--- a/qadevOOo/runner/convwatch/BorderRemover.java
+++ b/qadevOOo/runner/convwatch/BorderRemover.java
@@ -77,7 +77,7 @@ class BorderRemover
 }
 
 // calculate tolerance halve
-double nTolerable = (_nTolerance * 256 / 100);
+int nTolerable = (int) (_nTolerance * 256.0 / 100.0);
 if (nTolerable  0)
 {
 nTolerable = 0;
diff --git a/reportbuilder/java/org/libreoffice/report/SOImageService.java 
b/reportbuilder/java/org/libreoffice/report/SOImageService.java
index 1979c4f..7070038 100644
--- a/reportbuilder/java/org/libreoffice/report/SOImageService.java
+++ b/reportbuilder/java/org/libreoffice/report/SOImageService.java
@@ -103,7 +103,7 @@ public class SOImageService implements ImageService
 {
 final Size imageSize = (Size) 
xImage.getPropertyValue(SizePixel);
 final int dpi = 
java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
-final double fac = 2540 / dpi;
+final double fac = 2540.0 / dpi;
 dim.Width = (int) (imageSize.Width * fac);
 dim.Height = (int) (imageSize.Height * fac);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-16 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/convwatch/GraphicalTestArguments.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3a6987beaf85876e1061d553cdc134d40c54597e
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Wed Oct 15 18:34:53 2014 +0200

runner: if .. else if .. else

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

diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java 
b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
index 5fc4bed..e4dd7c0 100644
--- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java
+++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
@@ -218,7 +218,7 @@ public class GraphicalTestArguments
 // m_tWithBorderMove = TriState.UNSET;
 m_tWithBorderMove = TriState.FALSE;
 }
-if (sWithBorderMove.equalsIgnoreCase(yes) ||
+else if (sWithBorderMove.equalsIgnoreCase(yes) ||
 sWithBorderMove.equalsIgnoreCase(true))
 {
 m_tWithBorderMove = TriState.TRUE;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-14 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/convwatch/DB.java|   78 -
 qadevOOo/runner/convwatch/DBHelper.java  |   18 
 qadevOOo/runner/convwatch/FileHelper.java|   30 
 qadevOOo/runner/convwatch/MSOfficePrint.java |  710 +++
 qadevOOo/runner/convwatch/OfficePrint.java   |   66 -
 qadevOOo/runner/graphical/MSOfficePostscriptCreator.java |  476 +-
 qadevOOo/runner/helper/FileTools.java|   28 
 qadevOOo/runner/stats/FileLogWriter.java |   13 
 qadevOOo/runner/stats/SQLExecution.java  |   86 -
 qadevOOo/runner/stats/SimpleFileOutProducer.java |   64 -
 qadevOOo/runner/util/DBTools.java|   32 
 11 files changed, 873 insertions(+), 728 deletions(-)

New commits:
commit a2c481457cd2d03263054a5fefe80da316e09a44
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Mon Oct 13 13:20:47 2014 +0200

runner: finally block to ensure that a resource is closed (Prior to Java SE 
7)


http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html

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

diff --git a/qadevOOo/runner/convwatch/DB.java 
b/qadevOOo/runner/convwatch/DB.java
index 70a2559..8b4c4ff 100644
--- a/qadevOOo/runner/convwatch/DB.java
+++ b/qadevOOo/runner/convwatch/DB.java
@@ -215,49 +215,65 @@ public class DB extends DBHelper
 ArrayListString aResultList = new ArrayListString();
 try
 {
-oStmt = _aCon.createStatement();
-
-java.sql.ResultSet aResultSet = oStmt.executeQuery(_sSQL);
-java.sql.ResultSetMetaData aResultSetMetaData = 
aResultSet.getMetaData();
-
-int nColumnCount = aResultSetMetaData.getColumnCount();
 // java sql starts with '1'
-
-while( aResultSet.next() )
+try
 {
-StringBuffer aResult = new StringBuffer();
+oStmt = _aCon.createStatement();
+java.sql.ResultSet aResultSet = null;
 try
 {
-aResult.append(sqlresult: );
-for (int i=1;i=nColumnCount;i++)
+aResultSet = oStmt.executeQuery(_sSQL);
+java.sql.ResultSetMetaData aResultSetMetaData = 
aResultSet.getMetaData();
+
+int nColumnCount = 
aResultSetMetaData.getColumnCount(); // java sql starts with '1'
+
+while( aResultSet.next() )
 {
-String sColumnName = 
aResultSetMetaData.getColumnName(i);
-aResult.append(sColumnName).append(=);
-String sValue;
-int nSQLType = aResultSetMetaData.getColumnType(i);
-switch(nSQLType)
+StringBuffer aResult = new StringBuffer();
+try
 {
-case java.sql.Types.VARCHAR:
-sValue = ' + aResultSet.getString(i)  +  ';
-break;
-case java.sql.Types.INTEGER:
-{
-int nValue = aResultSet.getInt(i);
-sValue = String.valueOf(nValue);
-break;
+aResult.append(sqlresult: );
+for (int i=1;i=nColumnCount;i++)
+{
+String sColumnName = 
aResultSetMetaData.getColumnName(i);
+aResult.append(sColumnName).append(=);
+String sValue;
+int nSQLType = 
aResultSetMetaData.getColumnType(i);
+switch(nSQLType)
+{
+case java.sql.Types.VARCHAR:
+sValue = ' + aResultSet.getString(i) 
 +  ';
+break;
+case java.sql.Types.INTEGER:
+{
+int nValue = aResultSet.getInt(i);
+sValue = String.valueOf(nValue);
+break;
+}
+
+default:
+sValue = UNSUPPORTED TYPE;
+

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

2014-10-14 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/util/AccessibilityTools.java |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 23e4eb6aeb77c74f5ff8a6a70f7adbe52e1c34e7
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Sat Oct 11 20:27:09 2014 +0200

runner: Null pointer dereference

Change-Id: Id38a9e0bddbf3c9038abbc5de7137ee5d3f39db6
Reviewed-on: https://gerrit.libreoffice.org/11924
Reviewed-by: Matthew Francis mjay.fran...@gmail.com
Tested-by: Matthew Francis mjay.fran...@gmail.com

diff --git a/qadevOOo/runner/util/AccessibilityTools.java 
b/qadevOOo/runner/util/AccessibilityTools.java
index 76136e6..a0f1612 100644
--- a/qadevOOo/runner/util/AccessibilityTools.java
+++ b/qadevOOo/runner/util/AccessibilityTools.java
@@ -65,13 +65,13 @@ public class AccessibilityTools {
 
 if (xFrame == null) {
 System.out.println(can't get frame from controller);
+} else {
+if (containerWindow)
+xWindow = xFrame.getContainerWindow();
+else
+xWindow = xFrame.getComponentWindow();
 }
 
-if (containerWindow)
-xWindow = xFrame.getContainerWindow();
-else
-xWindow = xFrame.getComponentWindow();
-
 if (xWindow == null) {
 System.out.println(can't get window from frame);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-14 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/util/XMLTools.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b11968e8bfcc1c4560427a9ca1d9e20a1075eb1b
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Tue Oct 14 15:23:57 2014 +0200

runner: replace '.size() == 0' with '.isEmpty()' (collections)


http://docs.oracle.com/javase/1.5.0/docs/api/java/util/ArrayList.html#isEmpty()

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

diff --git a/qadevOOo/runner/util/XMLTools.java 
b/qadevOOo/runner/util/XMLTools.java
index ce15982..7dea190 100644
--- a/qadevOOo/runner/util/XMLTools.java
+++ b/qadevOOo/runner/util/XMLTools.java
@@ -718,7 +718,7 @@ public class XMLTools {
 if (!isWellFormed())
 log.println(!!! Some errors were found in XML structure) ;
 
-boolean result = tags.isEmpty()  chars.size() == 0  
isWellFormed();
+boolean result = tags.isEmpty()  chars.isEmpty()  
isWellFormed();
 reset();
 return result;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-13 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/convwatch/OfficePrint.java |2 +-
 qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5233d9b8e57aebbfda22a2edcf67e87282ebc66d
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Sat Oct 11 19:44:58 2014 +0200

runner: Object comparison

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

diff --git a/qadevOOo/runner/convwatch/OfficePrint.java 
b/qadevOOo/runner/convwatch/OfficePrint.java
index 75f117e..24eb0b0 100644
--- a/qadevOOo/runner/convwatch/OfficePrint.java
+++ b/qadevOOo/runner/convwatch/OfficePrint.java
@@ -570,7 +570,7 @@ public class OfficePrint {
 {
 nPropIndex++;
 }
-isBusy = (aPrinterProps[nPropIndex].Value == 
Boolean.TRUE);
+isBusy = 
aPrinterProps[nPropIndex].Value.equals(Boolean.TRUE);
 TimeHelper.waitInSeconds(1, is print ready?);
 nPrintCount++;
 if (nPrintCount  3600)
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java 
b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index 2ab3910..0e827b3 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
@@ -528,7 +528,7 @@ public class OpenOfficePostscriptCreator implements IOffice
 {
 nPropIndex++;
 }
-isBusy = (aPrinterProps[nPropIndex].Value == 
Boolean.TRUE);
+isBusy = 
aPrinterProps[nPropIndex].Value.equals(Boolean.TRUE);
 TimeHelper.waitInSeconds(1, is print ready?);
 nPrintCount++;
 if (nPrintCount  3600)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-13 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/graphical/IniFile.java  |7 +++
 qadevOOo/runner/share/DescGetter.java   |7 +++
 toolkit/test/accessibility/AccTreeNode.java |6 ++
 3 files changed, 8 insertions(+), 12 deletions(-)

New commits:
commit d0be30e8eec9d982501e8727df05962572c7acc6
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Mon Oct 13 16:05:18 2014 +0200

java: Collections.addAll for adding an array of elements to a Collection

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

diff --git a/qadevOOo/runner/graphical/IniFile.java 
b/qadevOOo/runner/graphical/IniFile.java
index f6b371f..fe2df6e 100644
--- a/qadevOOo/runner/graphical/IniFile.java
+++ b/qadevOOo/runner/graphical/IniFile.java
@@ -19,7 +19,9 @@ package graphical;
 
 import java.io.File;
 import java.io.RandomAccessFile;
+
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Enumeration;
 
 /**
@@ -55,10 +57,7 @@ public class IniFile implements EnumerationString
 if (m_aList.isEmpty())
 {
 // can only insert if there is nothing else already in the ini 
file
-for (int i = 0; i  _aList.length; i++)
-{
-m_aList.add(_aList[i]);
-}
+m_aList.addAll(Arrays.asList(_aList));
 }
 }
 
diff --git a/qadevOOo/runner/share/DescGetter.java 
b/qadevOOo/runner/share/DescGetter.java
index 53e0f93..892a33d 100644
--- a/qadevOOo/runner/share/DescGetter.java
+++ b/qadevOOo/runner/share/DescGetter.java
@@ -19,7 +19,9 @@ package share;
 
 import java.io.BufferedReader;
 import java.io.FileReader;
+
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.StringTokenizer;
 
 /**
@@ -108,10 +110,7 @@ public abstract class DescGetter
 line.length()).trim(), descPath,
 debug);
 
-for (int i = 0; i  subs.length; i++)
-{
-entryList.add(subs[i]);
-}
+entryList.addAll(Arrays.asList(subs));
 }
 else if (line.startsWith(-p))
 {
diff --git a/toolkit/test/accessibility/AccTreeNode.java 
b/toolkit/test/accessibility/AccTreeNode.java
index 136f872..73fa129 100644
--- a/toolkit/test/accessibility/AccTreeNode.java
+++ b/toolkit/test/accessibility/AccTreeNode.java
@@ -17,6 +17,7 @@
  */
 
 import java.util.ArrayList;
+import java.util.Arrays;
 
 import com.sun.star.accessibility.XAccessible;
 import com.sun.star.accessibility.XAccessibleComponent;
@@ -299,10 +300,7 @@ class AccTreeNode
 HandlerDescriptor aDescriptor = getHandlerDescriptor (i);
 NodeHandler aHandler = aDescriptor.maHandler;
 String[] aHandlerActions = aHandler.getActions (this);
-for(int j = 0; j  aHandlerActions.length; j++ )
-{
-aActions.add( aHandlerActions[j] );
-}
+aActions.addAll(Arrays.asList(aHandlerActions));
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-12 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/util/BookmarkDsc.java  |4 ++--
 qadevOOo/runner/util/ControlDsc.java   |2 +-
 qadevOOo/runner/util/FootnoteDsc.java  |4 ++--
 qadevOOo/runner/util/FrameDsc.java |4 ++--
 qadevOOo/runner/util/ParagraphDsc.java |4 ++--
 qadevOOo/runner/util/ReferenceMarkDsc.java |4 ++--
 qadevOOo/runner/util/ShapeDsc.java |2 +-
 qadevOOo/runner/util/StyleFamilyDsc.java   |6 +++---
 qadevOOo/runner/util/TableDsc.java |4 ++--
 qadevOOo/runner/util/TextSectionDsc.java   |4 ++--
 10 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 268f4d179c50bc0c1fb09cdb3ce048da1f575dbc
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Sun Oct 12 13:25:05 2014 +0200

runner: 'static final' to declare constants when it isn't an interface

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

diff --git a/qadevOOo/runner/util/BookmarkDsc.java 
b/qadevOOo/runner/util/BookmarkDsc.java
index 6772f1c..3f4b894 100644
--- a/qadevOOo/runner/util/BookmarkDsc.java
+++ b/qadevOOo/runner/util/BookmarkDsc.java
@@ -27,8 +27,8 @@ import com.sun.star.text.XTextContent;
  */
 public class BookmarkDsc extends InstDescr {
 
-private final String service = com.sun.star.text.Bookmark;
-private String ifcName = com.sun.star.text.XTextContent;
+private static final String service = com.sun.star.text.Bookmark;
+private static final String ifcName = com.sun.star.text.XTextContent;
 private String name = null;
 
 
diff --git a/qadevOOo/runner/util/ControlDsc.java 
b/qadevOOo/runner/util/ControlDsc.java
index 8a99b70..e5eb0d2 100644
--- a/qadevOOo/runner/util/ControlDsc.java
+++ b/qadevOOo/runner/util/ControlDsc.java
@@ -29,7 +29,7 @@ import com.sun.star.uno.UnoRuntime;
 public class ControlDsc extends InstDescr {
 
 private String name = null;
-final String ifcName = com.sun.star.form.XFormComponent;
+static final String ifcName = com.sun.star.form.XFormComponent;
 String service = com.sun.star.form.component.CommandButton;
 
 public ControlDsc( String kind ) {
diff --git a/qadevOOo/runner/util/FootnoteDsc.java 
b/qadevOOo/runner/util/FootnoteDsc.java
index 7ff9f6b..dc05741 100644
--- a/qadevOOo/runner/util/FootnoteDsc.java
+++ b/qadevOOo/runner/util/FootnoteDsc.java
@@ -27,8 +27,8 @@ import com.sun.star.text.XTextContent;
  */
 public class FootnoteDsc extends InstDescr {
 
-private final String service = com.sun.star.text.Footnote;
-private String ifcName = com.sun.star.text.XTextContent;
+private static final String service = com.sun.star.text.Footnote;
+private static final String ifcName = com.sun.star.text.XTextContent;
 private String name = null;
 
 
diff --git a/qadevOOo/runner/util/FrameDsc.java 
b/qadevOOo/runner/util/FrameDsc.java
index c65738e..348cc8d 100644
--- a/qadevOOo/runner/util/FrameDsc.java
+++ b/qadevOOo/runner/util/FrameDsc.java
@@ -34,8 +34,8 @@ public class FrameDsc extends InstDescr {
 private int height = 2000;
 private int width = 2000;
 private String name = null;
-private final String ifcName = com.sun.star.text.XTextFrame;
-private final String service = com.sun.star.text.TextFrame;
+private static final String ifcName = com.sun.star.text.XTextFrame;
+private static final String service = com.sun.star.text.TextFrame;
 
 public FrameDsc() {
 initFrame();
diff --git a/qadevOOo/runner/util/ParagraphDsc.java 
b/qadevOOo/runner/util/ParagraphDsc.java
index 1650883..318ada2 100644
--- a/qadevOOo/runner/util/ParagraphDsc.java
+++ b/qadevOOo/runner/util/ParagraphDsc.java
@@ -28,8 +28,8 @@ import com.sun.star.text.XTextContent;
  */
 public class ParagraphDsc extends InstDescr {
 
-private final String service = com.sun.star.text.Paragraph;
-private String ifcName = com.sun.star.text.XTextContent;
+private static final String service = com.sun.star.text.Paragraph;
+private static final String ifcName = com.sun.star.text.XTextContent;
 private String name = null;
 
 
diff --git a/qadevOOo/runner/util/ReferenceMarkDsc.java 
b/qadevOOo/runner/util/ReferenceMarkDsc.java
index 8185bd9..82f8c3f 100644
--- a/qadevOOo/runner/util/ReferenceMarkDsc.java
+++ b/qadevOOo/runner/util/ReferenceMarkDsc.java
@@ -27,8 +27,8 @@ import com.sun.star.text.XTextContent;
  */
 public class ReferenceMarkDsc extends InstDescr {
 
-private final String service = com.sun.star.text.ReferenceMark;
-private String ifcName = com.sun.star.text.XTextContent;
+private static final String service = com.sun.star.text.ReferenceMark;
+private static final String ifcName = com.sun.star.text.XTextContent;
 private String name = null;
 
 
diff --git a/qadevOOo/runner/util/ShapeDsc.java 
b/qadevOOo/runner/util/ShapeDsc.java
index c8f970e..9610c3d 100644
--- 

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

2014-10-12 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/util/UITools.java |   27 ---
 1 file changed, 4 insertions(+), 23 deletions(-)

New commits:
commit 881c030fc1e69cffc99b2360c986f516e61f01ab
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Sun Oct 12 12:08:44 2014 +0200

runner: Concatenating null strings in Java (JDK 1.5+)

JLS, Section 15.18.1.1:
If the reference is null, it is converted to the string null.

http://docs.oracle.com/javase/specs/jls/se5.0/html/expressions.html#15.18.1.1

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

diff --git a/qadevOOo/runner/util/UITools.java 
b/qadevOOo/runner/util/UITools.java
index 3f4701b..dfff835 100644
--- a/qadevOOo/runner/util/UITools.java
+++ b/qadevOOo/runner/util/UITools.java
@@ -28,14 +28,15 @@ import com.sun.star.accessibility.XAccessibleContext;
 import com.sun.star.accessibility.XAccessibleEditableText;
 import com.sun.star.accessibility.XAccessibleText;
 import com.sun.star.accessibility.XAccessibleValue;
+
 import com.sun.star.awt.XWindow;
 import com.sun.star.frame.XModel;
 import com.sun.star.lang.XMultiServiceFactory;
 import com.sun.star.text.XTextDocument;
+
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.uno.XInterface;
 
-
 /**
  * This class supports some functions to handle easily accessible objects
  */
@@ -69,7 +70,6 @@ public class UITools {
 return AccessibilityTools.getAccessibleObject(xWindow);
 }
 
-
 private static String getString(XInterface xInt)
 {
 XAccessibleText oText = 
UnoRuntime.queryInterface(XAccessibleText.class, xInt);
@@ -128,7 +128,6 @@ public class UITools {
  * @param buttonName is name name of the button to click
  * @throws java.lang.Exception if something fail
  */
-
  public void clickButton(String buttonName) throws java.lang.Exception
  {
 
@@ -148,15 +147,12 @@ public class UITools {
 }
  }
 
-
-
 /**
   * Helper method: returns the entry manes of a List-Box
   * @param ListBoxName the name of the listbox
   * @return the listbox entry names
   * @throws java.lang.Exception if something fail
   */
-
  public String[] getListBoxItems(String ListBoxName)
 throws java.lang.Exception
  {
@@ -209,7 +205,6 @@ public class UITools {
 return Items.toArray(ret);
  }
 
-
  /**
   * set a value to a named check box
   * @param CheckBoxName the name of the check box
@@ -236,8 +231,6 @@ public class UITools {
 }
  }
 
-
-
   /**
* returns the message of a Basic-MessageBox
* @return the message of a Basic-MessageBox
@@ -246,30 +239,18 @@ public class UITools {
  public String getMsgBoxText()
 throws java.lang.Exception
  {
-String cMessage = null;
 try{
 XAccessibleContext xMessage 
=AccessibilityTools.getAccessibleObjectForRole(mXRoot,
  AccessibleRole.LABEL);
 
 XInterface xMessageInterface = 
UnoRuntime.queryInterface(XInterface.class, xMessage);
-cMessage += (getString(xMessageInterface));
 
-
-return cMessage;
+return getString(xMessageInterface);
  } catch (Exception e) {
 throw new Exception(Could not get message from 
Basic-MessageBox:, e);
 }
  }
 
-
-
-
-
-
-
-
-
-
 /**
  * Prints the accessible tree to the CODElogWriter/CODE only if 
CODEdebugIsActive/CODE
  * is set to CODEtrue/CODE
@@ -280,4 +261,4 @@ public class UITools {
 AccessibilityTools.printAccessibleTree(log, mXRoot, debugIsActive);
 }
 
-}
+}
\ 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 wizards/com

2014-10-11 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/convwatch/DBHelper.java |4 ++--
 wizards/com/sun/star/wizards/common/FileAccess.java |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d860ea91d75568e2e63b0b2c84e50523d562be24
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Sat Oct 11 19:15:44 2014 +0200

It is more efficient to use the integer implementations of String.indexOf()

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

diff --git a/qadevOOo/runner/convwatch/DBHelper.java 
b/qadevOOo/runner/convwatch/DBHelper.java
index 26be888..aaf6497 100644
--- a/qadevOOo/runner/convwatch/DBHelper.java
+++ b/qadevOOo/runner/convwatch/DBHelper.java
@@ -187,8 +187,8 @@ public class DBHelper
 
 public String Quote(String _sToQuote)
 {
-String ts = ';
-String ds = \;
+char ts = '\'';
+char ds = '';
 int nQuote = _sToQuote.indexOf(ts);
 if (nQuote = 0)
 {
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java 
b/wizards/com/sun/star/wizards/common/FileAccess.java
index a44c786..3424860 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.java
+++ b/wizards/com/sun/star/wizards/common/FileAccess.java
@@ -1063,7 +1063,7 @@ public class FileAccess
 {
 if (path.startsWith(/))
 { // unix
-int nextSlash = path.indexOf(/, 1) + 1;
+int nextSlash = path.indexOf('/', 1) + 1;
 firstPart = Math.min(nextSlash, (maxLength - 3) / 2);
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-10 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/convwatch/EnhancedComplexTestCase.java   |8 --
 qadevOOo/runner/convwatch/FileHelper.java|6 -
 qadevOOo/runner/convwatch/FilenameHelper.java|6 -
 qadevOOo/runner/convwatch/GraphicalTestArguments.java|   46 +++
 qadevOOo/runner/convwatch/IniFile.java   |   10 ---
 qadevOOo/runner/convwatch/MSOfficePrint.java |   16 +
 qadevOOo/runner/graphical/IniFile.java   |   31 +-
 qadevOOo/runner/graphical/MSOfficePostscriptCreator.java |   22 +--
 qadevOOo/runner/graphical/ParameterHelper.java   |   15 
 qadevOOo/runner/helper/OSHelper.java |   45 +++---
 qadevOOo/runner/org/openoffice/Runner.java   |6 -
 qadevOOo/runner/org/openoffice/RunnerService.java|4 -
 12 files changed, 48 insertions(+), 167 deletions(-)

New commits:
commit 110ae4e498a55bd50ca0afe558126e9e029f68cd
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Thu Oct 9 21:51:37 2014 +0200

runner: The if statement is redundant

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

diff --git a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java 
b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
index 47e23fc..52587c6 100644
--- a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
@@ -79,12 +79,8 @@ public abstract class EnhancedComplexTestCase extends 
ComplexTestCase
 {
 sNEEDCHECK = false;
 }
-if (sNEEDCHECK.equalsIgnoreCase(yes) ||
-sNEEDCHECK.equalsIgnoreCase(true))
-{
-return true;
-}
-return false;
+return sNEEDCHECK.equalsIgnoreCase(yes) ||
+sNEEDCHECK.equalsIgnoreCase(true);
 }
 
 
diff --git a/qadevOOo/runner/convwatch/FileHelper.java 
b/qadevOOo/runner/convwatch/FileHelper.java
index e9f97ef..ba4e4c3 100644
--- a/qadevOOo/runner/convwatch/FileHelper.java
+++ b/qadevOOo/runner/convwatch/FileHelper.java
@@ -44,11 +44,7 @@ public class FileHelper
 if (_sFile == null) return false;
 
 File aFile = new File(_sFile);
-if (aFile.exists())
-{
-return true;
-}
-return false;
+return aFile.exists();
 }
 
 public static boolean isDir(String _sDir)
diff --git a/qadevOOo/runner/convwatch/FilenameHelper.java 
b/qadevOOo/runner/convwatch/FilenameHelper.java
index 19b9eea..56a3b5dd 100644
--- a/qadevOOo/runner/convwatch/FilenameHelper.java
+++ b/qadevOOo/runner/convwatch/FilenameHelper.java
@@ -246,11 +246,7 @@ abstract class FilenameHelper_impl implements Filenamer
 {
 String sPath = createAbsoluteFilename();
 String sPathOther = _aOtherFN.createAbsoluteFilename();
-if (sPath.equals(sPathOther))
-{
-return true;
-}
-return false;
+return sPath.equals(sPathOther);
 }
 
 }
diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java 
b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
index 49fb1e0..5fc4bed 100644
--- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java
+++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
@@ -196,15 +196,9 @@ public class GraphicalTestArguments
 {
 sREUSE_OFFICE = false;
 }
-if (sREUSE_OFFICE.equalsIgnoreCase(yes) ||
-sREUSE_OFFICE.equalsIgnoreCase(true))
-{
-m_bResuseOffice = true;
-}
-else
-{
-m_bResuseOffice = false;
-}
+m_bResuseOffice =
+sREUSE_OFFICE.equalsIgnoreCase(yes) ||
+sREUSE_OFFICE.equalsIgnoreCase(true);
 
 
 String sHTMLOutputPrefix = (String)param.get( 
PropertyName.DOC_COMPARATOR_HTML_OUTPUT_PREFIX);
@@ -276,15 +270,9 @@ public class GraphicalTestArguments
 String sCreateDefault = 
(String)param.get(PropertyName.CREATE_DEFAULT);
 if (sCreateDefault != null)
 {
-if (sCreateDefault.equalsIgnoreCase(yes) ||
-sCreateDefault.equalsIgnoreCase(true))
-{
-m_bCreateDefaultReference = true;
-}
-else
-{
-m_bCreateDefaultReference = false;
-}
+m_bCreateDefaultReference =
+sCreateDefault.equalsIgnoreCase(yes) ||
+sCreateDefault.equalsIgnoreCase(true);
 }
 
 }
@@ -293,17 +281,12 @@ public class 

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

2014-10-01 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/base/java_fat_service.java |   35 +++--
 1 file changed, 14 insertions(+), 21 deletions(-)

New commits:
commit 58d07a1e9574c1ecdd09e924357caaebc82cac62
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Wed Oct 1 21:12:34 2014 +0200

runner: Avoid a possible NullPointerException with tCase Object

Change-Id: Ie1202b7fa89306ea2a99031b9347b657039b839e
Reviewed-on: https://gerrit.libreoffice.org/11750
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/qadevOOo/runner/base/java_fat_service.java 
b/qadevOOo/runner/base/java_fat_service.java
index f9eefaa..27ae90a 100644
--- a/qadevOOo/runner/base/java_fat_service.java
+++ b/qadevOOo/runner/base/java_fat_service.java
@@ -217,32 +217,25 @@ public class java_fat_service implements TestBase {
 log = (LogWriter)dcl.getInstance((String)param.get(LogWriter));
 param.getMSF();
 
-TestCase tCase = null;
+TestEnvironment tEnv = null;
 
-try
-{
-tCase = (TestCase) dcl.getInstance(mod._+entry.entryName);
-}
-catch (java.lang.IllegalArgumentException ie)
-{
+try {
+TestCase tCase = (TestCase) 
dcl.getInstance(mod._+entry.entryName);
+log.println(Creating:  + tCase.getObjectName());
+log.initialize(entry, true);
+entry.UserDefinedParams = param;
+tCase.setLogWriter((PrintWriter) log);
+try {
+tCase.initializeTestCase(param);
+tEnv = tCase.getTestEnvironment(param);
+} catch (com.sun.star.lang.DisposedException de) {
+log.println(Office disposed);
+}
+} catch (java.lang.IllegalArgumentException ie) {
 entry.ErrorMsg=ie.getMessage();
 entry.hasErrorMsg=true;
 }
 
-log.println(Creating: +tCase.getObjectName());
-log.initialize(entry,true);
-entry.UserDefinedParams = param;
-tCase.setLogWriter((PrintWriter) log);
-TestEnvironment tEnv = null;
-try
-{
-tCase.initializeTestCase(param);
-tEnv = tCase.getTestEnvironment(param);
-}
-catch (com.sun.star.lang.DisposedException de)
-{
-log.println(Office disposed);
-}
 return tEnv;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-01 Thread Robert Antoni Buj i Gelonch
 qadevOOo/runner/helper/APIDescGetter.java |   17 ++---
 qadevOOo/runner/helper/ComplexDescGetter.java |3 +--
 qadevOOo/runner/helper/PropertyHelper.java|2 +-
 3 files changed, 4 insertions(+), 18 deletions(-)

New commits:
commit 30e2cb020b3492b879404072748960bc46d6e221
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Thu Oct 2 01:56:04 2014 +0200

runner: Converting ArrayList to Array

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

diff --git a/qadevOOo/runner/helper/APIDescGetter.java 
b/qadevOOo/runner/helper/APIDescGetter.java
index 7d83ef3..978af46 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -820,16 +820,9 @@ public class APIDescGetter extends DescGetter
 }
 }
 
-String[] scenario = new String[componentList.size()];
 Collections.sort(componentList);
-
-for (int i = 0; i  componentList.size(); i++)
-{
-scenario[i] = componentList.get(i);
-}
-
+String[] scenario = componentList.toArray(new 
String[componentList.size()]);
 return scenario;
-
 }
 
 private String[] getScenarioFromClassPath(String job)
@@ -892,14 +885,8 @@ public class APIDescGetter extends DescGetter
 e.printStackTrace();
 }
 
-String[] scenario = new String[scenarioList.size()];
 Collections.sort(scenarioList);
-
-for (int i = 0; i  scenarioList.size(); i++)
-{
-scenario[i] = scenarioList.get(i);
-}
-
+String[] scenario = scenarioList.toArray(new 
String[scenarioList.size()]);
 return scenario;
 }
 
diff --git a/qadevOOo/runner/helper/ComplexDescGetter.java 
b/qadevOOo/runner/helper/ComplexDescGetter.java
index af288a5..1c2099c 100644
--- a/qadevOOo/runner/helper/ComplexDescGetter.java
+++ b/qadevOOo/runner/helper/ComplexDescGetter.java
@@ -103,8 +103,7 @@ public class ComplexDescGetter extends DescGetter
 methods.add(meth);
 }
 
-methodNames = new String[methods.size()];
-methodNames = methods.toArray(methodNames);
+methodNames = methods.toArray(new String[methods.size()]);
 }
 
 // create an instance
diff --git a/qadevOOo/runner/helper/PropertyHelper.java 
b/qadevOOo/runner/helper/PropertyHelper.java
index 7472024..b5391cd 100644
--- a/qadevOOo/runner/helper/PropertyHelper.java
+++ b/qadevOOo/runner/helper/PropertyHelper.java
@@ -30,7 +30,7 @@ public class PropertyHelper
 public static PropertyValue[] 
createPropertyValueArrayFormArrayList(ArrayListPropertyValue _aPropertyList)
 {
 // copy the whole PropertyValue List to an PropertyValue Array
-PropertyValue[] aSaveProperties = null;
+PropertyValue[] aSaveProperties;
 
 if (_aPropertyList == null)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-24 Thread Tobias Madl
 qadevOOo/runner/convwatch/EnhancedComplexTestCase.java |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 8f661c6b2b870452bf45c9fd1b7c56a8978c2482
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Sep 23 12:09:07 2014 +

fdo#39625 Make existing CppUnittests work

Just removed some useless comment.

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

diff --git a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java 
b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
index 16a743e..7146680 100644
--- a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
@@ -29,7 +29,6 @@ public abstract class EnhancedComplexTestCase extends 
ComplexTestCase
 {
 private void checkExistance(String _sScriptFile, String _sName)
 {
-// Process testshl = Runtime.getRuntime().exec(scriptFile);
 ProcessHandler aHandler = new ProcessHandler(_sScriptFile);
 aHandler.executeSynchronously();
 TimeHelper.waitInSeconds(1, wait after 
ProcessHandler.executeSynchronously());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-11 Thread rbuj
 qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java |2 +-
 qadevOOo/runner/helper/CfgParser.java   |2 +-
 qadevOOo/runner/helper/OfficeProvider.java  |2 +-
 qadevOOo/runner/util/XMLTools.java  |4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f1b8d8832d38621ae9fbe08bf9bde414230fc5c3
Author: rbuj robert@gmail.com
Date:   Wed Sep 10 00:02:15 2014 +0200

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

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

diff --git a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java 
b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
index 1e69718..2d59022 100644
--- a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
+++ b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
@@ -320,7 +320,7 @@ public class GraphicalDifferenceCheck
 
 private static String ensureEndingFileSep(String s)
 {
-if(s != null  !s.equals()  !s.endsWith(File.separator))
+if(s != null  s.length() != 0  !s.endsWith(File.separator))
 {
 s = s.trim() + File.separator;
 }
diff --git a/qadevOOo/runner/helper/CfgParser.java 
b/qadevOOo/runner/helper/CfgParser.java
index 263655f3..6c77461 100644
--- a/qadevOOo/runner/helper/CfgParser.java
+++ b/qadevOOo/runner/helper/CfgParser.java
@@ -48,7 +48,7 @@ public class CfgParser
 {
 debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE);
 Properties cfg = null;
-if (iniFile.equals())
+if (iniFile.length() == 0)
 {
 //no iniFile given, search one in the users home directory
 cfg = getProperties(getDefaultFileName(true));
diff --git a/qadevOOo/runner/helper/OfficeProvider.java 
b/qadevOOo/runner/helper/OfficeProvider.java
index 6b21841..d5ac4ba 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -183,7 +183,7 @@ public class OfficeProvider implements AppProvider
 Exception exConnectFailed = null;
 boolean isExecutable = false;
 boolean isAppKnown = ((cncstr.indexOf(host=localhost)  0) || 
(cncstr.indexOf(pipe,name=)  0));
-isAppKnown = !((String) 
param.get(AppExecutionCommand)).equals();
+isAppKnown = ((String) param.get(AppExecutionCommand)).length() 
!= 0;
 
 if (isAppKnown)
 {
diff --git a/qadevOOo/runner/util/XMLTools.java 
b/qadevOOo/runner/util/XMLTools.java
index a59f523..5f43f06 100644
--- a/qadevOOo/runner/util/XMLTools.java
+++ b/qadevOOo/runner/util/XMLTools.java
@@ -377,7 +377,7 @@ public class XMLTools {
 super.startElement(name, attrs) ;
 if (tags.containsKey(name)) {
 String outerTag = tags.get(name);
-if (!outerTag.equals()) {
+if (outerTag.length() != 0) {
 boolean isInTag = false ;
 for (int i = 0; i  tagStack.size(); i++) {
 if (outerTag.equals(tagStack.get(i))) {
@@ -401,7 +401,7 @@ public class XMLTools {
 
 if (chars.containsKey(ch)) {
 String outerTag = chars.get(ch);
-if (!outerTag.equals()) {
+if (outerTag.length() != 0) {
 boolean isInTag = false ;
 for (int i = 0; i  tagStack.size(); i++) {
 if (outerTag.equals(tagStack.get(i))) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-10 Thread rbuj
 qadevOOo/runner/lib/Parameters.java |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit c6a2868a75a90005f9d711d6f1419ba704670781
Author: rbuj robert@gmail.com
Date:   Tue Sep 9 15:42:53 2014 +0200

qadevOOo: use System.arraycopy

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

diff --git a/qadevOOo/runner/lib/Parameters.java 
b/qadevOOo/runner/lib/Parameters.java
index e66ea50..8c05d77 100644
--- a/qadevOOo/runner/lib/Parameters.java
+++ b/qadevOOo/runner/lib/Parameters.java
@@ -91,10 +91,7 @@ public class Parameters implements XPropertySet {
 parameters.put(name, value);
 int size = props.length;
 Property[] addProps = new Property[size+1];
-for (int i=0; isize; i++)
-{
-addProps[i] = props[i];
-}
+System.arraycopy(props, 0, addProps, 0, size);
 addProps[size] = new Property(name, size, new Type(value.getClass()), 
(short)0);
 props = addProps;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-10 Thread rbuj
 qadevOOo/runner/complexlib/ComplexTestCase.java  |4 ++--
 qadevOOo/runner/convwatch/BuildID.java   |4 ++--
 qadevOOo/runner/convwatch/DB.java|4 ++--
 qadevOOo/runner/convwatch/FileHelper.java|4 ++--
 qadevOOo/runner/convwatch/IniFile.java   |4 ++--
 qadevOOo/runner/convwatch/PRNCompare.java|2 +-
 qadevOOo/runner/graphical/BuildID.java   |4 ++--
 qadevOOo/runner/graphical/FileHelper.java|   12 ++--
 qadevOOo/runner/graphical/IniFile.java   |6 +++---
 qadevOOo/runner/graphical/JPEGComparator.java|4 ++--
 qadevOOo/runner/helper/APIDescGetter.java|   22 +++---
 qadevOOo/runner/share/DescGetter.java|6 +++---
 qadevOOo/runner/stats/OutProducerFactory.java|2 +-
 qadevOOo/runner/stats/SimpleFileOutProducer.java |2 +-
 qadevOOo/runner/util/RegistryTools.java  |2 +-
 qadevOOo/runner/util/utils.java  |6 +++---
 16 files changed, 44 insertions(+), 44 deletions(-)

New commits:
commit e8ac22f3aa98e16ae7e2b26ad9a99311ba42af4b
Author: rbuj robert@gmail.com
Date:   Tue Sep 9 23:48:11 2014 +0200

qadevOOo: use a character literal

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

diff --git a/qadevOOo/runner/complexlib/ComplexTestCase.java 
b/qadevOOo/runner/complexlib/ComplexTestCase.java
index 8d39b7c..ff8b4fd 100644
--- a/qadevOOo/runner/complexlib/ComplexTestCase.java
+++ b/qadevOOo/runner/complexlib/ComplexTestCase.java
@@ -119,10 +119,10 @@ public abstract class ComplexTestCase extends Assurance 
implements ComplexTest
 String entryName = subEntry.entryName;
 Object[] parameter = null;
 
-int posLeftParenthesis = entryName.indexOf(();
+int posLeftParenthesis = entryName.indexOf('(');
 if (posLeftParenthesis != -1)
 {
-String sParameter = 
(entryName.substring(posLeftParenthesis + 1, entryName.indexOf(;
+String sParameter = 
(entryName.substring(posLeftParenthesis + 1, entryName.indexOf(')')));
 mTestMethodName = entryName;
 parameter = new String[] { sParameter };
 entryName = entryName.substring(0, posLeftParenthesis);
diff --git a/qadevOOo/runner/convwatch/BuildID.java 
b/qadevOOo/runner/convwatch/BuildID.java
index 7f903af..6fb1687 100644
--- a/qadevOOo/runner/convwatch/BuildID.java
+++ b/qadevOOo/runner/convwatch/BuildID.java
@@ -28,7 +28,7 @@ public class BuildID
 String sOfficePath = ;
 if (_sApp.startsWith(\))
 {
-int nIdx = _sApp.indexOf(\, 1);
+int nIdx = _sApp.indexOf('', 1);
 if (nIdx == -1)
 {
 }
@@ -41,7 +41,7 @@ public class BuildID
 else
 {
 // check if a space exist, so we get all until space
-int nIdx = _sApp.indexOf( , 1);
+int nIdx = _sApp.indexOf(' ', 1);
 if (nIdx == -1)
 {
 sOfficePath = _sApp;
diff --git a/qadevOOo/runner/convwatch/DB.java 
b/qadevOOo/runner/convwatch/DB.java
index a743f8a..808c8ce 100644
--- a/qadevOOo/runner/convwatch/DB.java
+++ b/qadevOOo/runner/convwatch/DB.java
@@ -353,8 +353,8 @@ public class DB extends DBHelper
 {
 String sToken = aTokenizer.nextToken();
 int nIndex = sToken.indexOf(uuid()=);
-int nIndexTuettel = sToken.indexOf(', nIndex);
-int nIndexTuettel2 = sToken.lastIndexOf(');
+int nIndexTuettel = sToken.indexOf('\'', nIndex);
+int nIndexTuettel2 = sToken.lastIndexOf('\'');
 String sUuid = sToken.substring(nIndexTuettel + 1, 
nIndexTuettel2);
 return sUuid;
 }
diff --git a/qadevOOo/runner/convwatch/FileHelper.java 
b/qadevOOo/runner/convwatch/FileHelper.java
index 7668405..e9f97ef 100644
--- a/qadevOOo/runner/convwatch/FileHelper.java
+++ b/qadevOOo/runner/convwatch/FileHelper.java
@@ -86,7 +86,7 @@ public class FileHelper
 public static String getNameNoSuffix(String _sFilename)
 {
 if (_sFilename == null) return ;
-int nIdx = _sFilename.lastIndexOf(.);
+int nIdx = _sFilename.lastIndexOf('.');
 if (nIdx  0)
 {
 return _sFilename.substring(0, nIdx);
@@ -97,7 +97,7 @@ public class FileHelper
 public static String getSuffix(String _sFilename)
 {
 if (_sFilename == null) return ;
-int nIdx = _sFilename.lastIndexOf(.);
+int nIdx = 

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

2014-09-10 Thread rbuj
 qadevOOo/runner/convwatch/PRNCompare.java |4 ++--
 qadevOOo/runner/graphical/IniFile.java|2 +-
 qadevOOo/runner/graphical/JPEGComparator.java |6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit dcd5aa95f75b5bd110e88d41c2589067ba8c3882
Author: rbuj robert@gmail.com
Date:   Wed Sep 10 00:10:54 2014 +0200

qadevOOo: Number Parsing

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

diff --git a/qadevOOo/runner/convwatch/PRNCompare.java 
b/qadevOOo/runner/convwatch/PRNCompare.java
index 551cffb..049c7e2 100644
--- a/qadevOOo/runner/convwatch/PRNCompare.java
+++ b/qadevOOo/runner/convwatch/PRNCompare.java
@@ -59,7 +59,7 @@ public class PRNCompare
 int nValue = 0;
 try
 {
-nValue = Integer.valueOf(sValue).intValue();
+nValue = Integer.parseInt(sValue);
 }
 catch(java.lang.NumberFormatException e)
 {
@@ -397,7 +397,7 @@ public class PRNCompare
 sBack = sBack.substring(0, nIdx);
 }
 
-nResult = Integer.valueOf(sBack).intValue();
+nResult = Integer.parseInt(sBack);
 }
 catch(java.lang.NumberFormatException e)
 {
diff --git a/qadevOOo/runner/graphical/IniFile.java 
b/qadevOOo/runner/graphical/IniFile.java
index 08cae29..8c3e6f3 100644
--- a/qadevOOo/runner/graphical/IniFile.java
+++ b/qadevOOo/runner/graphical/IniFile.java
@@ -336,7 +336,7 @@ public class IniFile implements EnumerationString
 {
 try
 {
-nValue = Integer.valueOf(sValue).intValue();
+nValue = Integer.parseInt(sValue);
 }
 catch (java.lang.NumberFormatException e)
 {
diff --git a/qadevOOo/runner/graphical/JPEGComparator.java 
b/qadevOOo/runner/graphical/JPEGComparator.java
index a0d2891..67267c9 100644
--- a/qadevOOo/runner/graphical/JPEGComparator.java
+++ b/qadevOOo/runner/graphical/JPEGComparator.java
@@ -59,7 +59,7 @@ class NameDPIPage
 String sDPI = sNameNoSuffix.substring(nDPIStart + 1, 
sNameNoSuffix.length() - 8);
 try
 {
-nDPI = Integer.valueOf(sDPI).intValue();
+nDPI = Integer.parseInt(sDPI);
 }
 catch (java.lang.NumberFormatException e)
 {
@@ -68,7 +68,7 @@ class NameDPIPage
 String sPage = sNameNoSuffix.substring(sNameNoSuffix.length() 
- 4);
 try
 {
-nPage = Integer.valueOf(sPage).intValue();
+nPage = Integer.parseInt(sPage);
 }
 catch (java.lang.NumberFormatException e)
 {
@@ -641,7 +641,7 @@ public class JPEGComparator extends EnhancedComplexTestCase
 sBack = sBack.substring(0, nIdx);
 }
 
-nResult = Integer.valueOf(sBack).intValue();
+nResult = Integer.parseInt(sBack);
 }
 catch (java.lang.NumberFormatException e)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-10 Thread rbuj
 qadevOOo/runner/util/SOfficeFactory.java |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bd9cd1a37488f7cf9f8af64e07ab6f29728665f4
Author: rbuj robert@gmail.com
Date:   Wed Sep 10 00:20:32 2014 +0200

qadevOOo: Convert a primitive type into a string

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

diff --git a/qadevOOo/runner/util/SOfficeFactory.java 
b/qadevOOo/runner/util/SOfficeFactory.java
index 54f119b..f672733 100644
--- a/qadevOOo/runner/util/SOfficeFactory.java
+++ b/qadevOOo/runner/util/SOfficeFactory.java
@@ -64,11 +64,11 @@ public class SOfficeFactory {
 
 public static SOfficeFactory getFactory(XMultiServiceFactory xMSF) {
 
-SOfficeFactory soFactory = 
lookup.get(Integer.valueOf(xMSF.hashCode()).toString());
+SOfficeFactory soFactory = 
lookup.get(Integer.toString(xMSF.hashCode()));
 
 if (soFactory == null) {
 soFactory = new SOfficeFactory(xMSF);
-lookup.put(Integer.valueOf(xMSF.hashCode()).toString(), soFactory);
+lookup.put(Integer.toString(xMSF.hashCode()), soFactory);
 }
 
 return soFactory;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-08 Thread rbuj
 qadevOOo/runner/convwatch/DBHelper.java |1 -
 qadevOOo/runner/convwatch/PerformanceContainer.java |2 --
 2 files changed, 3 deletions(-)

New commits:
commit b75c3bd0faf00112b26ee3e3e1ac572011d0c6e3
Author: rbuj robert@gmail.com
Date:   Sun Sep 7 18:23:48 2014 +0200

qadevOOo: All classes in the java.lang package are imported by default

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

diff --git a/qadevOOo/runner/convwatch/DBHelper.java 
b/qadevOOo/runner/convwatch/DBHelper.java
index 1a13fd0..26be888 100644
--- a/qadevOOo/runner/convwatch/DBHelper.java
+++ b/qadevOOo/runner/convwatch/DBHelper.java
@@ -23,7 +23,6 @@ import java.sql.DriverManager;
 import java.sql.Statement;
 import java.sql.SQLException;
 
-import java.lang.Thread;
 import java.util.StringTokenizer;
 
 class ShareConnection
diff --git a/qadevOOo/runner/convwatch/PerformanceContainer.java 
b/qadevOOo/runner/convwatch/PerformanceContainer.java
index 3199673..9db65e0 100644
--- a/qadevOOo/runner/convwatch/PerformanceContainer.java
+++ b/qadevOOo/runner/convwatch/PerformanceContainer.java
@@ -21,8 +21,6 @@ package convwatch;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.RandomAccessFile;
-import java.lang.Double;
-
 
 public class PerformanceContainer /* extends *//* implements */ {
 /*
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-08 Thread rbuj
 qadevOOo/runner/convwatch/BorderRemover.java|1 -
 qadevOOo/runner/convwatch/BuildID.java  |1 -
 qadevOOo/runner/convwatch/ConvWatch.java|6 --
 qadevOOo/runner/convwatch/ConvWatchCancelException.java |2 --
 qadevOOo/runner/convwatch/ConvWatchStarter.java |6 --
 qadevOOo/runner/convwatch/DocumentConverter.java|4 
 qadevOOo/runner/convwatch/EnhancedComplexTestCase.java  |1 -
 qadevOOo/runner/convwatch/FilenameHelper.java   |1 -
 qadevOOo/runner/convwatch/GfxCompare.java   |4 
 qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java |4 
 qadevOOo/runner/convwatch/MSOfficePrint.java|2 --
 qadevOOo/runner/convwatch/PRNCompare.java   |2 --
 qadevOOo/runner/convwatch/PixelCounter.java |3 ---
 qadevOOo/runner/convwatch/ReferenceBuilder.java |5 -
 14 files changed, 42 deletions(-)

New commits:
commit c9dbe53a4a3ccd4ad85354322e63c9e92c1c0dda
Author: rbuj robert@gmail.com
Date:   Sun Sep 7 18:13:28 2014 +0200

qadevOOo: remove import from the same package

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

diff --git a/qadevOOo/runner/convwatch/BorderRemover.java 
b/qadevOOo/runner/convwatch/BorderRemover.java
index 650412b..09cc785 100644
--- a/qadevOOo/runner/convwatch/BorderRemover.java
+++ b/qadevOOo/runner/convwatch/BorderRemover.java
@@ -18,7 +18,6 @@
 
 package convwatch;
 
-import convwatch.ImageHelper;
 import java.io.File;
 import java.awt.image.RenderedImage;
 import java.awt.image.BufferedImage;
diff --git a/qadevOOo/runner/convwatch/BuildID.java 
b/qadevOOo/runner/convwatch/BuildID.java
index 97bdf66..7f903af 100644
--- a/qadevOOo/runner/convwatch/BuildID.java
+++ b/qadevOOo/runner/convwatch/BuildID.java
@@ -20,7 +20,6 @@ package convwatch;
 
 import java.io.File;
 import helper.OSHelper;
-import convwatch.IniFile;
 
 public class BuildID
 {
diff --git a/qadevOOo/runner/convwatch/ConvWatch.java 
b/qadevOOo/runner/convwatch/ConvWatch.java
index 588814e..4d23bae 100644
--- a/qadevOOo/runner/convwatch/ConvWatch.java
+++ b/qadevOOo/runner/convwatch/ConvWatch.java
@@ -18,12 +18,6 @@
 
 package convwatch;
 
-import convwatch.ConvWatchException;
-import convwatch.ConvWatchCancelException;
-import convwatch.FileHelper;
-import convwatch.OfficePrint;
-import convwatch.PRNCompare;
-import convwatch.StatusHelper;
 import helper.URLHelper;
 import java.io.File;
 
diff --git a/qadevOOo/runner/convwatch/ConvWatchCancelException.java 
b/qadevOOo/runner/convwatch/ConvWatchCancelException.java
index 093a589..ad37c2d 100644
--- a/qadevOOo/runner/convwatch/ConvWatchCancelException.java
+++ b/qadevOOo/runner/convwatch/ConvWatchCancelException.java
@@ -18,8 +18,6 @@
 
 package convwatch;
 
-import convwatch.ConvWatchException;
-
 public class ConvWatchCancelException extends ConvWatchException
 {
 public ConvWatchCancelException(String _aMessage)
diff --git a/qadevOOo/runner/convwatch/ConvWatchStarter.java 
b/qadevOOo/runner/convwatch/ConvWatchStarter.java
index a695315..9c06162 100644
--- a/qadevOOo/runner/convwatch/ConvWatchStarter.java
+++ b/qadevOOo/runner/convwatch/ConvWatchStarter.java
@@ -23,17 +23,11 @@ import java.util.ArrayList;
 import java.io.File;
 import java.io.FileFilter;
 
-import convwatch.EnhancedComplexTestCase;
 import com.sun.star.lang.XMultiServiceFactory;
 
-import convwatch.ConvWatchException;
-import convwatch.DirectoryHelper;
-import convwatch.GraphicalTestArguments;
-import convwatch.HTMLOutputter;
 import helper.OfficeProvider;
 import helper.OfficeWatcher;
 import helper.OSHelper;
-import convwatch.PerformanceContainer;
 
 /**
  * The following Complex Test will test
diff --git a/qadevOOo/runner/convwatch/DocumentConverter.java 
b/qadevOOo/runner/convwatch/DocumentConverter.java
index 5a6f024..6325215 100644
--- a/qadevOOo/runner/convwatch/DocumentConverter.java
+++ b/qadevOOo/runner/convwatch/DocumentConverter.java
@@ -25,10 +25,6 @@ import java.util.ArrayList;
 
 import com.sun.star.lang.XMultiServiceFactory;
 
-import convwatch.DirectoryHelper;
-import convwatch.OfficePrint;
-import convwatch.EnhancedComplexTestCase;
-import convwatch.PropertyName;
 import helper.OfficeProvider;
 
 /**
diff --git a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java 
b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
index 9792d6f..16a743e 100644
--- a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
@@ -20,7 +20,6 @@ package convwatch;
 
 import complexlib.ComplexTestCase;
 import helper.ProcessHandler;
-import convwatch.GraphicalTestArguments;
 
 /**
  * Some Helperfunctions which are nice in ReferenceBuilder and ConvWatchTest
diff --git 

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

2014-09-08 Thread rbuj
 qadevOOo/runner/complexlib/ComplexTestCase.java |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 34a68f0aa92de05123c1e951899c08eed5a55543
Author: rbuj robert@gmail.com
Date:   Sun Sep 7 17:43:22 2014 +0200

qadevOOo: reuse the value of entryName.indexOf(Left Parenthesis)

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

diff --git a/qadevOOo/runner/complexlib/ComplexTestCase.java 
b/qadevOOo/runner/complexlib/ComplexTestCase.java
index 7eacef2..8d39b7c 100644
--- a/qadevOOo/runner/complexlib/ComplexTestCase.java
+++ b/qadevOOo/runner/complexlib/ComplexTestCase.java
@@ -119,12 +119,13 @@ public abstract class ComplexTestCase extends Assurance 
implements ComplexTest
 String entryName = subEntry.entryName;
 Object[] parameter = null;
 
-if (entryName.indexOf(() != -1)
+int posLeftParenthesis = entryName.indexOf(();
+if (posLeftParenthesis != -1)
 {
-String sParameter = 
(entryName.substring(entryName.indexOf(() + 1, entryName.indexOf(;
+String sParameter = 
(entryName.substring(posLeftParenthesis + 1, entryName.indexOf(;
 mTestMethodName = entryName;
 parameter = new String[] { sParameter };
-entryName = entryName.substring(0, entryName.indexOf(());
+entryName = entryName.substring(0, posLeftParenthesis);
 testMethod = this.getClass().getMethod(entryName, new 
Class[] { String.class });
 }
 else
___
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

2013-08-16 Thread Rene Engelhard
 qadevOOo/runner/lib/TestParameters.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b118c88a83da383a3f7fb1a1de2a3cb9a89d4452
Author: Rene Engelhard r...@debian.org
Date:   Fri Aug 16 13:32:17 2013 +0200

qadevOOo: handle kfreebsd as UNXLNGI

Change-Id: Ib3be1e407a9a3716fe171eb0586f03174015d844

diff --git a/qadevOOo/runner/lib/TestParameters.java 
b/qadevOOo/runner/lib/TestParameters.java
index 9b05147..66050ee 100644
--- a/qadevOOo/runner/lib/TestParameters.java
+++ b/qadevOOo/runner/lib/TestParameters.java
@@ -314,7 +314,7 @@ public class TestParameters extends HashMapString,Object {
 String operatingSystem = ;
 if (osname.indexOf (windows)-1) {
 operatingSystem = PropertyName.WNTMSCI;
-} else if (osname.indexOf (linux)-1) {
+} else if (osname.indexOf (linux)-1 || osname.indexOf 
(kfreebsd)-1) {
 operatingSystem = PropertyName.UNXLNGI;
 } else if (osname.indexOf (sunos)-1) {
 if (osarch.equals (x86)) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-06-08 Thread Julien Nabet
 qadevOOo/runner/lib/Status.java |2 +-
 sfx2/source/appl/workwin.cxx|6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit ee3cea14c84442da93380941b1ec3a46e8003bca
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sat Jun 8 13:42:44 2013 +0200

Typos: alwas - always

Change-Id: Ibb064dd68dbee46e02b512a2a1a8dee34b0fd444

diff --git a/qadevOOo/runner/lib/Status.java b/qadevOOo/runner/lib/Status.java
index 0dc6f9e..e19f8bb 100644
--- a/qadevOOo/runner/lib/Status.java
+++ b/qadevOOo/runner/lib/Status.java
@@ -88,7 +88,7 @@ public class Status extends SimpleStatus {
 
 /**
  * This is a factory method for creating a Status representing that the
- * result of the activity was excluded. It alwas has FAILED state.
+ * result of the activity was excluded. It always has FAILED state.
  */
 public static Status excluded() {
 return new Status( EXCLUDED, false );
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index c1c9fdf..ee5422b 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1972,7 +1972,7 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( 
sal_uInt32 lId, sal_Bool bEnable
 SfxChildWin_Impl *pCW=NULL;
 SfxWorkWindow *pWork = pParent;
 
-// Get the top parent, child windows are alwas registered at the
+// Get the top parent, child windows are always registered at the
 // task of the WorkWindow for example the frame or on AppWorkWindow
 while ( pWork  pWork-pParent )
 pWork = pWork-pParent;
@@ -2162,7 +2162,7 @@ sal_Bool SfxWorkWindow::IsFloating( sal_uInt16 nId )
 SfxChildWin_Impl *pCW=NULL;
 SfxWorkWindow *pWork = pParent;
 
-// Get the top parent, child windows are alwas registered at the
+// Get the top parent, child windows are always registered at the
 // task of the WorkWindow for example the frame or on AppWorkWindow
 while ( pWork  pWork-pParent )
 pWork = pWork-pParent;
@@ -2246,7 +2246,7 @@ void SfxWorkWindow::SetChildWindow_Impl(sal_uInt16 nId, 
sal_Bool bOn, sal_Bool b
 SfxChildWin_Impl *pCW=NULL;
 SfxWorkWindow *pWork = pParent;
 
-// Get the top parent, child windows are alwas registered at the
+// Get the top parent, child windows are always registered at the
 // task of the WorkWindow for example the frame or on AppWorkWindow
 while ( pWork  pWork-pParent )
 pWork = pWork-pParent;
___
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