diff options
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/complex/writer/CheckIndexedPropertyValues.java | 11 | ||||
-rw-r--r-- | sw/qa/complex/writer/CheckNamedPropertyValues.java | 9 | ||||
-rw-r--r-- | sw/qa/complex/writer/TextPortionEnumerationTest.java | 6 |
3 files changed, 11 insertions, 15 deletions
diff --git a/sw/qa/complex/writer/CheckIndexedPropertyValues.java b/sw/qa/complex/writer/CheckIndexedPropertyValues.java index 338f7065e02c..83d58c46cb0c 100644 --- a/sw/qa/complex/writer/CheckIndexedPropertyValues.java +++ b/sw/qa/complex/writer/CheckIndexedPropertyValues.java @@ -35,12 +35,11 @@ public class CheckIndexedPropertyValues { @Test public void checkIndexedPropertyValues() throws com.sun.star.uno.Exception { - XIndexContainer xCont = UnoRuntime.queryInterface( - XIndexContainer.class, - (connection.getComponentContext().getServiceManager(). - createInstanceWithContext( - "com.sun.star.document.IndexedPropertyValues", - connection.getComponentContext()))); + Object instance = connection.getComponentContext().getServiceManager(). + createInstanceWithContext( + "com.sun.star.document.IndexedPropertyValues", + connection.getComponentContext()); + XIndexContainer xCont = UnoRuntime.queryInterface(XIndexContainer.class, instance); assertNotNull("XIndexContainer was queried but returned null.", xCont); PropertyValue[] prop1 = new PropertyValue[1]; diff --git a/sw/qa/complex/writer/CheckNamedPropertyValues.java b/sw/qa/complex/writer/CheckNamedPropertyValues.java index 602cab199482..d09ebb6b2f92 100644 --- a/sw/qa/complex/writer/CheckNamedPropertyValues.java +++ b/sw/qa/complex/writer/CheckNamedPropertyValues.java @@ -35,12 +35,9 @@ public class CheckNamedPropertyValues { @Test public void checkNamedPropertyValues() throws com.sun.star.uno.Exception { - XNameContainer xCont = UnoRuntime.queryInterface( - XNameContainer.class, - (connection.getComponentContext().getServiceManager(). - createInstanceWithContext( - "com.sun.star.document.NamedPropertyValues", - connection.getComponentContext()))); + Object instance = connection.getComponentContext().getServiceManager(). + createInstanceWithContext( "com.sun.star.document.NamedPropertyValues", connection.getComponentContext()); + XNameContainer xCont = UnoRuntime.queryInterface(XNameContainer.class, instance); assertNotNull("XNameContainer was queried but returned null.", xCont); PropertyValue[] prop1 = new PropertyValue[1]; diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java index f534dd263819..694d2f3f064f 100644 --- a/sw/qa/complex/writer/TextPortionEnumerationTest.java +++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java @@ -253,7 +253,7 @@ abstract class ContentNode extends TreeNode return super.toString() + "\tcontent: " + m_Content; } boolean equals(ContentNode other) { - return (other.m_Content.equals(m_Content)); + return other.m_Content.equals(m_Content); } } @@ -4145,8 +4145,8 @@ public class TextPortionEnumerationTest static boolean eq(StringPair i_Left, StringPair i_Right) { - return ((i_Left.First).equals(i_Right.First)) && - ((i_Left.Second).equals(i_Right.Second)); + return (i_Left.First.equals(i_Right.First)) && + (i_Left.Second.equals(i_Right.Second)); } @BeforeClass public static void setUpConnection() throws Exception { |