[Libreoffice-commits] core.git: 17 commits - qadevOOo/runner qadevOOo/tests smoketest/org wizards/com xmerge/source
Caolán McNamara
caolanm at redhat.com
Thu Oct 15 03:39:34 PDT 2015
qadevOOo/runner/helper/BuildEnvTools.java | 2
qadevOOo/runner/helper/OfficeProvider.java | 28 ++--------
qadevOOo/tests/java/ifc/awt/_XTopWindow.java | 10 +--
qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java | 7 ++
qadevOOo/tests/java/ifc/i18n/_XExtendedCalendar.java | 14 +----
qadevOOo/tests/java/ifc/lang/_XTypeProvider.java | 4 -
qadevOOo/tests/java/ifc/ucb/_XCachedDynamicResultSetStubFactory.java | 18 +-----
qadevOOo/tests/java/ifc/view/_XPrintable.java | 28 +++-------
qadevOOo/tests/java/mod/_fwk/ControlMenuController.java | 21 -------
qadevOOo/tests/java/mod/_sc/ScChartObj.java | 10 ---
qadevOOo/tests/java/mod/_sc/ScChartsObj.java | 11 +--
qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java | 11 +--
qadevOOo/tests/java/mod/_sch/ChXDiagram.java | 10 +--
smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java | 10 ---
wizards/com/sun/star/wizards/document/Control.java | 3 -
xmerge/source/bridge/java/XMergeBridge.java | 7 --
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java | 8 --
17 files changed, 58 insertions(+), 144 deletions(-)
New commits:
commit ae0bfef96ae4857d57268fcb00285cad4802b05b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:50:51 2015 +0100
coverity#1326728 USELESS_STRING: Useless/non-informative string generated
Change-Id: I264d7d89f0f8a420d04081541bf0a8a4708c9b58
diff --git a/qadevOOo/tests/java/ifc/lang/_XTypeProvider.java b/qadevOOo/tests/java/ifc/lang/_XTypeProvider.java
index 6618621..1d13d9f 100644
--- a/qadevOOo/tests/java/ifc/lang/_XTypeProvider.java
+++ b/qadevOOo/tests/java/ifc/lang/_XTypeProvider.java
@@ -43,11 +43,9 @@ public class _XTypeProvider extends MultiMethodTest {
* Has <b>OK</b> status if no runtime exceptions occurred.
*/
public void _getImplementationId() {
- boolean result = true;
log.println("testing getImplementationId() ... ");
- log.println("The ImplementationId is "+oObj.getImplementationId());
- result = true;
+ boolean result = oObj.getImplementationId().length > 0;
tRes.tested("getImplementationId()", result);
commit a97b102ea0687eab9d2c1d49f90b197ebae7273f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:39:18 2015 +0100
coverity#1326201 Explicit null dereferenced
Change-Id: Idda78e546db90e939a87ac5ef27363809ce41697
diff --git a/qadevOOo/tests/java/ifc/awt/_XTopWindow.java b/qadevOOo/tests/java/ifc/awt/_XTopWindow.java
index c33f4cc..15d3a10 100644
--- a/qadevOOo/tests/java/ifc/awt/_XTopWindow.java
+++ b/qadevOOo/tests/java/ifc/awt/_XTopWindow.java
@@ -166,16 +166,16 @@ public class _XTopWindow extends MultiMethodTest {
menu = UnoRuntime.queryInterface(XMenuBar.class,
tParam.getMSF().
createInstance("com.sun.star.awt.MenuBar")) ;
+
+ menu.insertItem((short)1, "MenuItem",
+ com.sun.star.awt.MenuItemStyle.CHECKABLE, (short)1) ;
+
+ oObj.setMenuBar(menu) ;
} catch (com.sun.star.uno.Exception e) {
log.println("Can't instanciate MenuBar service") ;
result = false ;
}
- menu.insertItem((short)1, "MenuItem",
- com.sun.star.awt.MenuItemStyle.CHECKABLE, (short)1) ;
-
- oObj.setMenuBar(menu) ;
-
tRes.tested("setMenuBar()", result) ;
}
commit 71d5fe742eaa10b0fab39cc1a9614fa004a2dfa0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:36:27 2015 +0100
coverity#1326133 Logically dead code
Change-Id: Idc10cfed44636213693fb0e7c859c5b1ffccd4e1
diff --git a/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java b/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java
index f5ddd77..8d6fdb2 100644
--- a/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java
+++ b/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java
@@ -75,7 +75,6 @@ class InteractionImpl implements com.sun.star.task.XInteractionHandler
public void handle( com.sun.star.task.XInteractionRequest xRequest )
{
boolean approve = true;
- boolean abort = false;
com.sun.star.task.XInteractionContinuation[] conts = xRequest.getContinuations();
for (int i = 0; i < conts.length; i++)
@@ -89,15 +88,6 @@ class InteractionImpl implements com.sun.star.task.XInteractionHandler
//don't query again for ongoing extensions
approve = false;
}
- else if (abort)
- {
- com.sun.star.task.XInteractionAbort xAbort =
- UnoRuntime.queryInterface(com.sun.star.task.XInteractionAbort.class, conts[i]);
- if (xAbort != null)
- xAbort.select();
- //don't query again for ongoing extensions
- abort = false;
- }
}
}
}
commit f0f747015a3c94a607d82848e9b2ce9338a32bcd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:30:48 2015 +0100
coverity#1326289 Explicit null dereferenced
Change-Id: Ib634ce5ef43748f039e2bd9610398267b19c919a
diff --git a/qadevOOo/tests/java/ifc/view/_XPrintable.java b/qadevOOo/tests/java/ifc/view/_XPrintable.java
index 52b0357..6a55688 100644
--- a/qadevOOo/tests/java/ifc/view/_XPrintable.java
+++ b/qadevOOo/tests/java/ifc/view/_XPrintable.java
@@ -117,29 +117,23 @@ public class _XPrintable extends MultiMethodTest {
* <code>com.sun.star.ucb.SimpleFileAccess</code> cann't be
* created.
*/
- public void _print(){
+ public void _print() throws Exception {
boolean result = true ;
final String file = "XPrintable.prt" ;
final String fileName = utils.getOfficeTempDirSys(tParam.getMSF())+file ;
final String fileURL = utils.getOfficeTemp(tParam.getMSF()) + file ;
- XSimpleFileAccess fAcc = null ;
- try {
- Object oFAcc =
- tParam.getMSF().createInstance
- ("com.sun.star.ucb.SimpleFileAccess") ;
- fAcc = UnoRuntime.queryInterface
- (XSimpleFileAccess.class, oFAcc) ;
- if (fAcc == null) throw new StatusException
- (Status.failed("Can't create SimpleFileAccess service")) ;
- if (fAcc.exists(fileURL)) {
- log.println("Old file exists and will be deleted");
- fAcc.kill(fileURL);
- }
- } catch (com.sun.star.uno.Exception e) {
- log.println("Error accessing file '" + fileURL + "'");
- e.printStackTrace(log);
+ Object oFAcc =
+ tParam.getMSF().createInstance
+ ("com.sun.star.ucb.SimpleFileAccess") ;
+ XSimpleFileAccess fAcc = UnoRuntime.queryInterface
+ (XSimpleFileAccess.class, oFAcc) ;
+ if (fAcc == null) throw new StatusException
+ (Status.failed("Can't create SimpleFileAccess service")) ;
+ if (fAcc.exists(fileURL)) {
+ log.println("Old file exists and will be deleted");
+ fAcc.kill(fileURL);
}
try {
commit eea7e0cb552ff0cd28e53c1efa7caa839a988718
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:28:11 2015 +0100
coverity#1326288 Explicit null dereferenced
Change-Id: Id4426ece2407f298dea157ff1034c6d15dcd9139
diff --git a/qadevOOo/tests/java/ifc/ucb/_XCachedDynamicResultSetStubFactory.java b/qadevOOo/tests/java/ifc/ucb/_XCachedDynamicResultSetStubFactory.java
index 41e8ff1..a4ae2ba 100644
--- a/qadevOOo/tests/java/ifc/ucb/_XCachedDynamicResultSetStubFactory.java
+++ b/qadevOOo/tests/java/ifc/ucb/_XCachedDynamicResultSetStubFactory.java
@@ -119,22 +119,14 @@ public class _XCachedDynamicResultSetStubFactory extends MultiMethodTest {
* Has <b>OK</b> status if row numbers are equal and they are
* greater then 0 (because JAR file contains at least one entry).
*/
- public void _connectToCache() {
+ public void _connectToCache() throws Exception {
boolean result = true ;
- XCachedDynamicResultSetFactory setFac = null ;
+ Object fac = tParam.getMSF().createInstance
+ ("com.sun.star.ucb.CachedDynamicResultSetFactory") ;
- try {
- Object fac = tParam.getMSF().createInstance
- ("com.sun.star.ucb.CachedDynamicResultSetFactory") ;
-
- setFac = UnoRuntime.queryInterface
- (XCachedDynamicResultSetFactory.class, fac) ;
- } catch (com.sun.star.uno.Exception e) {
- log.println("Can't instantiate a service") ;
- e.printStackTrace(log) ;
- result = false ;
- }
+ XCachedDynamicResultSetFactory setFac = UnoRuntime.queryInterface
+ (XCachedDynamicResultSetFactory.class, fac) ;
XDynamicResultSet rmtSet = setFac.createCachedDynamicResultSet(null, null) ;
commit 4f4667da482e5b8b4552bab55db66c81bdc17015
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:23:35 2015 +0100
coverity#1326287 Explicit null dereferenced
Change-Id: I6b2f8beb25cb5743db9d5f0b92dfce723c6d89e5
diff --git a/qadevOOo/tests/java/ifc/i18n/_XExtendedCalendar.java b/qadevOOo/tests/java/ifc/i18n/_XExtendedCalendar.java
index 99d26e7..bd19024 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XExtendedCalendar.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XExtendedCalendar.java
@@ -39,17 +39,13 @@ public class _XExtendedCalendar extends MultiMethodTest {
* Load a calendar
*/
@Override
- public void before() {
+ public void before() throws Exception {
Locale[] installed_locales = null;
- XLocaleData locData = null;
- try {
- locData = UnoRuntime.queryInterface(
- XLocaleData.class,
- tParam.getMSF().createInstance(
- "com.sun.star.i18n.LocaleData"));
- } catch (com.sun.star.uno.Exception e) {
+ XLocaleData locData = UnoRuntime.queryInterface(
+ XLocaleData.class,
+ tParam.getMSF().createInstance(
+ "com.sun.star.i18n.LocaleData"));
- }
installed_locales = locData.getAllInstalledLocaleNames();
// use first Locale as fallback, if US-English is not found
Locale lo = installed_locales[0];
commit abe51680360ad0d7fc67862b80f406d484bcf0a4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:13:37 2015 +0100
coverity#1326285 Dereference after null check
Change-Id: I20c0cf4ad14252fdbf9a73c7675a0704e8a03823
diff --git a/xmerge/source/bridge/java/XMergeBridge.java b/xmerge/source/bridge/java/XMergeBridge.java
index fbdea40..6cf8497 100644
--- a/xmerge/source/bridge/java/XMergeBridge.java
+++ b/xmerge/source/bridge/java/XMergeBridge.java
@@ -193,17 +193,14 @@ public class XMergeBridge {
XParser xParser = UnoRuntime.queryInterface(
XParser.class , xSaxParserObj );
- if (xParser==null){
- System.out.println("\nParser creation Failed");
- }
xOutStream.closeOutput();
InputSource aInput = new InputSource();
if (sFileName==null){
sFileName="";
- }
+ }
aInput.sSystemId = sFileName;
aInput.aInputStream =xInStream;
- xParser.setDocumentHandler ( xDocHandler );
+ xParser.setDocumentHandler ( xDocHandler );
xParser.parseStream ( aInput );
xOutStream.closeOutput();
commit 5513e1cff5953865aee4111c9adab8765ab18cdb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:12:28 2015 +0100
coverity#1326282 Explicit null dereferenced
Change-Id: I1845d3e5c898e2e4bb929d723171e1cc79d57c4e
diff --git a/qadevOOo/tests/java/mod/_sch/ChXDiagram.java b/qadevOOo/tests/java/mod/_sch/ChXDiagram.java
index 310e8a3..50ad0af 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXDiagram.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXDiagram.java
@@ -348,15 +348,11 @@ public class ChXDiagram extends TestCase {
* a double-value in the cell else it inserts a formula in the cell
*/
public static void insertIntoCell(
- int CellX, int CellY, String theValue, XSpreadsheet TT1, String flag) {
+ int CellX, int CellY, String theValue, XSpreadsheet TT1, String flag)
+ throws com.sun.star.lang.IndexOutOfBoundsException {
- XCell oCell = null;
+ XCell oCell = TT1.getCellByPosition(CellX, CellY);
- try {
- oCell = TT1.getCellByPosition(CellX, CellY);
- } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
- System.out.println("Could not get Cell");
- }
if (flag.equals("V")) {
oCell.setValue(Float.parseFloat(theValue));
}
commit a5560a555016870a8331e9d39a9dce5927c80c93
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:10:44 2015 +0100
coverity#1326281 Dereference after null check
Change-Id: Iafb8c9fc0238d99c446aa2d0d0e03bda133b3554
diff --git a/qadevOOo/runner/helper/BuildEnvTools.java b/qadevOOo/runner/helper/BuildEnvTools.java
index 9222757..2c10aa7 100644
--- a/qadevOOo/runner/helper/BuildEnvTools.java
+++ b/qadevOOo/runner/helper/BuildEnvTools.java
@@ -64,7 +64,7 @@ public class BuildEnvTools {
msg += PropertyName.OPERATING_SYSTEM + "\nFill this parameter with an operating system like unxsols," +
" unxsoli, unxlngi, unxmacxi or wntmsci. \n\n";
}
- if(
+ if (mPlatform != null &&
(!mPlatform.equalsIgnoreCase(PropertyName.UNXSOLS)) &&
(!mPlatform.equalsIgnoreCase(PropertyName.UNXSOLI)) &&
(!mPlatform.equalsIgnoreCase(PropertyName.UNXLNGI)) &&
commit 0db3357d63ca9696329cd0ef1f62f52dc99ef894
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:08:42 2015 +0100
coverity#1326277 Explicit null dereferenced
Change-Id: I6acf72b623eb2211edc6e5a5c1f84acb6964620b
diff --git a/qadevOOo/tests/java/mod/_sc/ScChartsObj.java b/qadevOOo/tests/java/mod/_sc/ScChartsObj.java
index c355768..ce7167e 100644
--- a/qadevOOo/tests/java/mod/_sc/ScChartsObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScChartsObj.java
@@ -218,15 +218,10 @@ public class ScChartsObj extends TestCase {
* a double-value in the cell else it inserts a formula in the cell
*/
public static void insertIntoCell(
- int CellX, int CellY, String theValue, XSpreadsheet TT1, String flag) {
+ int CellX, int CellY, String theValue, XSpreadsheet TT1, String flag)
+ throws com.sun.star.lang.IndexOutOfBoundsException {
- XCell oCell = null;
-
- try {
- oCell = TT1.getCellByPosition(CellX, CellY);
- } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
- System.out.println("Could not get Cell");
- }
+ XCell oCell = TT1.getCellByPosition(CellX, CellY);
if (flag.equals("V")) {
oCell.setValue(Float.parseFloat(theValue));
commit 80362fc247c26c07c8e0194d45ea5b79df73882b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:06:50 2015 +0100
coverity#1326278 Explicit null dereferenced
Change-Id: Idc7f4d852a10e4943beca1f1986dc8e7cf2354d5
diff --git a/qadevOOo/tests/java/mod/_sc/ScChartObj.java b/qadevOOo/tests/java/mod/_sc/ScChartObj.java
index 6b1515b..31cdba5 100644
--- a/qadevOOo/tests/java/mod/_sc/ScChartObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScChartObj.java
@@ -221,14 +221,8 @@ public class ScChartObj extends TestCase {
*/
public static void insertIntoCell(
int CellX, int CellY, String theValue, XSpreadsheet TT1, String flag)
- {
- XCell oCell = null;
-
- try {
- oCell = TT1.getCellByPosition(CellX, CellY);
- } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
- System.out.println("Could not get Cell");
- }
+ throws com.sun.star.lang.IndexOutOfBoundsException {
+ XCell oCell = TT1.getCellByPosition(CellX, CellY);
if (flag.equals("V")) {
oCell.setValue(Float.parseFloat(theValue));
commit d25837925d6d35073d71a59acb91182afce3e8df
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:04:53 2015 +0100
coverity#1326279 Explicit null dereferenced
Change-Id: I93ee4300bb642ca2fe032a1763c0cb36ae51bd3e
diff --git a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java
index dd58474..a29836e 100644
--- a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java
+++ b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java
@@ -176,15 +176,10 @@ public class ScIndexEnumeration_TableChartsEnumeration extends TestCase {
* a double-value in the cell else it inserts a formula in the cell
*/
public static void insertIntoCell(
- int CellX, int CellY, String theValue, XSpreadsheet TT1, String flag) {
+ int CellX, int CellY, String theValue, XSpreadsheet TT1, String flag)
+ throws com.sun.star.lang.IndexOutOfBoundsException {
- XCell oCell = null;
-
- try {
- oCell = TT1.getCellByPosition(CellX, CellY);
- } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
- System.out.println("Could not get Cell");
- }
+ XCell oCell = TT1.getCellByPosition(CellX, CellY);
if (flag.equals("V")) {
oCell.setValue(Float.parseFloat(theValue));
commit 097393dcbfaa68f819144f53ed7edb4fe783d216
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 10:01:12 2015 +0100
coverity#1326269 Dereference after null check
Change-Id: I928883cae95fbeba54913dfa2acc429ad15f336d
diff --git a/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java b/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java
index 600be12..80b9639 100644
--- a/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java
+++ b/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java
@@ -95,7 +95,12 @@ public class _XMultiPropertyStates extends MultiMethodTest {
try {
states = oObj.getPropertyStates(names);
result = (states != null) && (states.length == names.length);
- log.println("Number of states: " + states.length);
+ if (states != null) {
+ log.println("Number of states: " + states.length);
+ }
+ else {
+ log.println("Number of states: <null>");
+ }
} catch (com.sun.star.beans.UnknownPropertyException e) {
log.println("some properties seem to be unknown: " + e.toString());
}
commit 16998c6ab4a7644333a04e614884fc823fb503bc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 15 09:56:59 2015 +0100
coverity#1327172 UrF: Unread field
Change-Id: Iad3c349b3f66a5bba281b33de9ca689dd5015a83
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java
index c590f4e..8b7d0fe 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java
@@ -78,17 +78,13 @@ public abstract class SxcDocumentSerializer implements OfficeConstants,
*/
protected SpreadsheetEncoder encoder = null;
- /** {@code SxcDocument} object that this converter processes. */
- protected SxcDocument sxcDoc = null;
-
/**
* Constructor.
*
* @param document Input {@code SxcDocument} {@code Document}.
*/
- public SxcDocumentSerializer(Document document) {
+ public SxcDocumentSerializer() {
fmt = new Format();
- sxcDoc = (SxcDocument) document;
}
/**
@@ -890,4 +886,4 @@ public abstract class SxcDocumentSerializer implements OfficeConstants,
return decimals;
}
-}
\ No newline at end of file
+}
commit 940c9ef2c00485b46eaf6a7d0d0f4d18457c4fc3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 17:20:39 2015 +0100
coverity#1326405 Dereference null return value
Change-Id: I278c7c2516fde01355abe3030733a5798e1c96c2
diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java
index 3f37c57..6d03e5d 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -88,6 +88,11 @@ public class OfficeProvider implements AppProvider
{
System.out.println("User Variable '$(user)' not defined.");
}
+ catch (com.sun.star.uno.Exception e)
+ {
+ System.out.println("Couldn't backup user layer");
+ e.printStackTrace();
+ }
catch (java.io.IOException e)
{
System.out.println("Couldn't backup user layer");
@@ -578,28 +583,11 @@ public class OfficeProvider implements AppProvider
return res;
}
- private static XStringSubstitution createStringSubstitution(XMultiServiceFactory xMSF)
+ private static XStringSubstitution createStringSubstitution(XMultiServiceFactory xMSF) throws com.sun.star.uno.Exception
{
- Object xPathSubst = null;
-
- try
- {
- xPathSubst = xMSF.createInstance(
+ Object xPathSubst = xMSF.createInstance(
"com.sun.star.util.PathSubstitution");
- }
- catch (com.sun.star.uno.Exception e)
- {
- e.printStackTrace();
- }
-
- if (xPathSubst != null)
- {
- return UnoRuntime.queryInterface(XStringSubstitution.class, xPathSubst);
- }
- else
- {
- return null;
- }
+ return UnoRuntime.queryInterface(XStringSubstitution.class, xPathSubst);
}
/**
commit 9c819f14ceef683c6921f24945a506f1a09c86ce
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 11:52:30 2015 +0100
coverity#1327174 UuF: Unused field
Change-Id: I49d864b0449a78bb0ba187015debb8cc584407e0
diff --git a/qadevOOo/tests/java/mod/_fwk/ControlMenuController.java b/qadevOOo/tests/java/mod/_fwk/ControlMenuController.java
index f421f88..27bf1f9 100644
--- a/qadevOOo/tests/java/mod/_fwk/ControlMenuController.java
+++ b/qadevOOo/tests/java/mod/_fwk/ControlMenuController.java
@@ -32,27 +32,6 @@ import util.utils;
*/
public class ControlMenuController extends TestCase {
XInterface oObj = null;
- XTextDocument xTextDoc;
-
- /**
- * Cleanup: close the created document
- * @param tParam The test parameters.
- * @param log The log writer.
- * @return The test environment.
- *
- protected void cleanup(TestParameters tParam, PrintWriter log) {
- log.println(" disposing xTextDoc ");
-
- try {
- XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
- XCloseable.class, xTextDoc);
- closer.close(true);
- } catch (com.sun.star.util.CloseVetoException e) {
- log.println("couldn't close document");
- } catch (com.sun.star.lang.DisposedException e) {
- log.println("couldn't close document");
- }
- }
/**
* Create test environment.
commit 8eafe90dd5adc1cf509c3461faea5781e00aee50
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 17:09:46 2015 +0100
coverity#1326409 Dereference null return value
Change-Id: I960c4ad4ffe4f0e86f3d1f0fb364296f31bf9d92
diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java
index 448b84f..1b60755 100644
--- a/wizards/com/sun/star/wizards/document/Control.java
+++ b/wizards/com/sun/star/wizards/document/Control.java
@@ -230,13 +230,12 @@ public class Control extends Shape
{
throw new IllegalArgumentException();
}
- return getPeer().getPreferredSize();
}
catch (Exception e)
{
e.printStackTrace(System.err);
- return null;
}
+ return getPeer().getPreferredSize();
}
public void setPropertyValue(String _sPropertyName, Object _aPropertyValue) throws Exception
More information about the Libreoffice-commits
mailing list