Kaydet (Commit) b1c472fd authored tarafından Caolán McNamara's avatar Caolán McNamara

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
üst 4a1edf62
...@@ -161,7 +161,9 @@ public class DBTools { ...@@ -161,7 +161,9 @@ public class DBTools {
dbContext = UnoRuntime.queryInterface dbContext = UnoRuntime.queryInterface
(XNamingService.class, cont) ; (XNamingService.class, cont) ;
} catch (com.sun.star.uno.Exception e) {} } catch (com.sun.star.uno.Exception e) {
System.out.println("caught exception: " + e);
}
} }
/** /**
......
...@@ -174,7 +174,9 @@ public class _UnoControlFormattedFieldModel extends MultiPropertyTest { ...@@ -174,7 +174,9 @@ public class _UnoControlFormattedFieldModel extends MultiPropertyTest {
try { try {
newValue = tParam.getMSF().createInstance( newValue = tParam.getMSF().createInstance(
"com.sun.star.util.NumberFormatsSupplier"); "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; return newValue;
} }
}) ; }) ;
......
...@@ -92,7 +92,9 @@ public class _XGoalSeek extends MultiMethodTest { ...@@ -92,7 +92,9 @@ public class _XGoalSeek extends MultiMethodTest {
xSheet.getCellByPosition(3, 4).setValue(0.8); xSheet.getCellByPosition(3, 4).setValue(0.8);
xSheet.getCellByPosition(3, 5).setFormula("= (D5 ^ 2 - 1) / (D5 - 1)"); 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"); goal = oObj.seekGoal(aFormula, aValue, "2");
log.println("Goal Result: " + goal.Result + " Divergence: " + goal.Divergence); log.println("Goal Result: " + goal.Result + " Divergence: " + goal.Divergence);
result &= goal.Divergence < divergence; result &= goal.Divergence < divergence;
......
...@@ -71,7 +71,9 @@ public class NestedRegistry extends TestCase { ...@@ -71,7 +71,9 @@ public class NestedRegistry extends TestCase {
reg1.destroy(); reg1.destroy();
reg2.destroy(); reg2.destroy();
} }
catch (com.sun.star.registry.InvalidRegistryException e) {} catch (com.sun.star.registry.InvalidRegistryException e) {
System.out.println("caught exception: " + e);
}
} }
/** /**
......
...@@ -69,7 +69,9 @@ public class NestedRegistry extends TestCase { ...@@ -69,7 +69,9 @@ public class NestedRegistry extends TestCase {
reg1.destroy(); reg1.destroy();
reg2.destroy(); reg2.destroy();
} }
catch (com.sun.star.registry.InvalidRegistryException e) {} catch (com.sun.star.registry.InvalidRegistryException e) {
System.out.println("caught exception: " + e);
}
} }
/** /**
......
...@@ -150,9 +150,11 @@ public class ScAccessiblePageHeaderArea extends TestCase { ...@@ -150,9 +150,11 @@ public class ScAccessiblePageHeaderArea extends TestCase {
tEnv.addObjRelation("EventProducer", tEnv.addObjRelation("EventProducer",
new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() { new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
public void fireEvent() { public void fireEvent() {
try { try {
pressZoom.doAccessibleAction(0); pressZoom.doAccessibleAction(0);
} catch (com.sun.star.lang.IndexOutOfBoundsException ibe) {} } catch (com.sun.star.lang.IndexOutOfBoundsException ibe) {
System.out.println("caught exception: " + ibe);
}
} }
}); });
......
...@@ -91,7 +91,9 @@ public class AccessibleControlShape extends TestCase { ...@@ -91,7 +91,9 @@ public class AccessibleControlShape extends TestCase {
Size size = oShape.getSize(); Size size = oShape.getSize();
size.Width += 100; size.Width += 100;
oShape.setSize(size); oShape.setSize(size);
} catch(com.sun.star.beans.PropertyVetoException e) {} } catch(com.sun.star.beans.PropertyVetoException e) {
System.out.println("caught exception: " + e);
}
} }
}); });
......
...@@ -85,11 +85,13 @@ public class AccessibleEditableTextPara extends TestCase { ...@@ -85,11 +85,13 @@ public class AccessibleEditableTextPara extends TestCase {
new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() { new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
public void fireEvent() { public void fireEvent() {
try { try {
int l = "AccessibleEditablePara".length(); int l = "AccessibleEditablePara".length();
edText.deleteText(0, l); edText.deleteText(0, l);
edText.setText("Event"); edText.setText("Event");
edText.setText("AccessibleEditablePara"); edText.setText("AccessibleEditablePara");
}catch(com.sun.star.lang.IndexOutOfBoundsException e) {} } catch(com.sun.star.lang.IndexOutOfBoundsException e) {
System.out.println("caught exception: " + e);
}
} }
}); });
......
...@@ -93,7 +93,9 @@ public class AccessibleGraphicShape extends TestCase { ...@@ -93,7 +93,9 @@ public class AccessibleGraphicShape extends TestCase {
Size size = oShape.getSize(); Size size = oShape.getSize();
size.Width += 100; size.Width += 100;
oShape.setSize(size); oShape.setSize(size);
} catch(com.sun.star.beans.PropertyVetoException e) {} } catch(com.sun.star.beans.PropertyVetoException e) {
System.out.println("caught exception: " + e);
}
} }
}); });
......
...@@ -103,7 +103,9 @@ public class AccessibleOLEShape extends TestCase { ...@@ -103,7 +103,9 @@ public class AccessibleOLEShape extends TestCase {
Size size = oShape.getSize(); Size size = oShape.getSize();
size.Width += 100; size.Width += 100;
oShape.setSize(size); oShape.setSize(size);
} catch(com.sun.star.beans.PropertyVetoException e) {} } catch(com.sun.star.beans.PropertyVetoException e) {
System.out.println("caught exception: " + e);
}
} }
}); });
......
...@@ -107,7 +107,9 @@ public class AccessiblePresentationGraphicShape extends TestCase { ...@@ -107,7 +107,9 @@ public class AccessiblePresentationGraphicShape extends TestCase {
Size size = fShape.getSize(); Size size = fShape.getSize();
size.Width += 100; size.Width += 100;
fShape.setSize(size); fShape.setSize(size);
} catch(com.sun.star.beans.PropertyVetoException e) {} } catch(com.sun.star.beans.PropertyVetoException e) {
System.out.println("caught exception: " + e);
}
} }
}); });
......
...@@ -116,7 +116,9 @@ public class AccessiblePresentationOLEShape extends TestCase { ...@@ -116,7 +116,9 @@ public class AccessiblePresentationOLEShape extends TestCase {
Size size = fShape.getSize(); Size size = fShape.getSize();
size.Width += 100; size.Width += 100;
fShape.setSize(size); fShape.setSize(size);
} catch(com.sun.star.beans.PropertyVetoException e) {} } catch(com.sun.star.beans.PropertyVetoException e) {
System.out.println("caught exception: " + e);
}
} }
}); });
......
...@@ -107,7 +107,9 @@ public class AccessiblePresentationShape extends TestCase { ...@@ -107,7 +107,9 @@ public class AccessiblePresentationShape extends TestCase {
Size size = fShape.getSize(); Size size = fShape.getSize();
size.Width += 100; size.Width += 100;
fShape.setSize(size); fShape.setSize(size);
} catch(com.sun.star.beans.PropertyVetoException e) {} } catch(com.sun.star.beans.PropertyVetoException e) {
System.out.println("caught exception: " + e);
}
} }
}); });
......
...@@ -95,7 +95,9 @@ public class AccessibleShape extends TestCase { ...@@ -95,7 +95,9 @@ public class AccessibleShape extends TestCase {
Size size = oShape.getSize(); Size size = oShape.getSize();
size.Width += 100; size.Width += 100;
oShape.setSize(size); oShape.setSize(size);
} catch(com.sun.star.beans.PropertyVetoException e) {} } catch(com.sun.star.beans.PropertyVetoException e) {
System.out.println("caught exception: " + e);
}
} }
}); });
......
...@@ -122,13 +122,17 @@ public class SvxShapeControl extends TestCase { ...@@ -122,13 +122,17 @@ public class SvxShapeControl extends TestCase {
try { try {
aStyle = (XStyle) AnyConverter.toObject( aStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style")); new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {} } catch (Exception e) {
System.out.println("caught exception: " + e);
}
tEnv.addObjRelation("Style1",aStyle); tEnv.addObjRelation("Style1",aStyle);
oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oShape); oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oShape);
try { try {
aStyle = (XStyle) AnyConverter.toObject( aStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style")); new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {} } catch (Exception e) {
System.out.println("caught exception: " + e);
}
tEnv.addObjRelation("Style2",aStyle); tEnv.addObjRelation("Style2",aStyle);
log.println( "adding document relation for XControlShape" ); log.println( "adding document relation for XControlShape" );
......
...@@ -130,13 +130,17 @@ public class SvxShapeDimensioning extends TestCase { ...@@ -130,13 +130,17 @@ public class SvxShapeDimensioning extends TestCase {
try { try {
aStyle = (XStyle) AnyConverter.toObject( aStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style")); new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {} } catch (Exception e) {
System.out.println("caught exception: " + e);
}
tEnv.addObjRelation("Style1",aStyle); tEnv.addObjRelation("Style1",aStyle);
oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oShape); oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oShape);
try { try {
aStyle = (XStyle) AnyConverter.toObject( aStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style")); new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {} } catch (Exception e) {
System.out.println("caught exception: " + e);
}
tEnv.addObjRelation("Style2",aStyle); tEnv.addObjRelation("Style2",aStyle);
DefaultDsc tDsc = new DefaultDsc("com.sun.star.text.XTextContent", DefaultDsc tDsc = new DefaultDsc("com.sun.star.text.XTextContent",
......
...@@ -224,13 +224,17 @@ public class SvxShapePolyPolygon extends TestCase { ...@@ -224,13 +224,17 @@ public class SvxShapePolyPolygon extends TestCase {
try { try {
aStyle = (XStyle) AnyConverter.toObject( aStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style")); new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {} } catch (Exception e) {
System.out.println("caught exception: " + e);
}
tEnv.addObjRelation("Style1",aStyle); tEnv.addObjRelation("Style1",aStyle);
oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oShape); oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oShape);
try { try {
aStyle = (XStyle) AnyConverter.toObject( aStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style")); new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {} } catch (Exception e) {
System.out.println("caught exception: " + e);
}
tEnv.addObjRelation("Style2",aStyle); tEnv.addObjRelation("Style2",aStyle);
// adding relation for XText // adding relation for XText
......
...@@ -238,13 +238,17 @@ public class SvxShapePolyPolygonBezier extends TestCase { ...@@ -238,13 +238,17 @@ public class SvxShapePolyPolygonBezier extends TestCase {
try { try {
aStyle = (XStyle) AnyConverter.toObject( aStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style")); new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {} } catch (Exception e) {
System.out.println("caught exception: " + e);
}
tEnv.addObjRelation("Style1",aStyle); tEnv.addObjRelation("Style1",aStyle);
oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oShape); oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oShape);
try { try {
aStyle = (XStyle) AnyConverter.toObject( aStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style")); new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {} } catch (Exception e) {
System.out.println("caught exception: " + e);
}
tEnv.addObjRelation("Style2",aStyle); tEnv.addObjRelation("Style2",aStyle);
// adding relation for XText // adding relation for XText
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment