[Libreoffice-commits] core.git: 7 commits - lotuswordpro/source qadevOOo/tests

Caolán McNamara caolanm at redhat.com
Mon Dec 14 02:15:54 PST 2015


 lotuswordpro/source/filter/lwpobjfactory.cxx              |    9 ++
 qadevOOo/tests/java/ifc/awt/_XButton.java                 |    2 
 qadevOOo/tests/java/ifc/awt/_XCheckBox.java               |    2 
 qadevOOo/tests/java/ifc/container/_XEnumeration.java      |   10 ---
 qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java  |   11 ---
 qadevOOo/tests/java/ifc/form/submission/_XSubmission.java |    1 
 qadevOOo/tests/java/ifc/frame/_XDispatch.java             |    4 -
 qadevOOo/tests/java/ifc/sheet/_XUsedAreaCursor.java       |    1 
 qadevOOo/tests/java/ifc/style/_ParagraphProperties.java   |   43 --------------
 9 files changed, 8 insertions(+), 75 deletions(-)

New commits:
commit 480fb6ca369f5a347489414e9d314c802b1ee7aa
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 14 10:15:06 2015 +0000

    clear objects from duplicate ids early
    
    Change-Id: I0caab9e329a465e10bf3ed321c55c287371bd437

diff --git a/lotuswordpro/source/filter/lwpobjfactory.cxx b/lotuswordpro/source/filter/lwpobjfactory.cxx
index 127770b..b1f94a1 100644
--- a/lotuswordpro/source/filter/lwpobjfactory.cxx
+++ b/lotuswordpro/source/filter/lwpobjfactory.cxx
@@ -665,10 +665,15 @@ rtl::Reference<LwpObject> LwpObjectFactory::CreateObject(sal_uInt32 type, LwpObj
             break;
         }
     }
-    if(newObj.is())
+    if (newObj.is())
     {
         newObj->QuickRead();
-        m_IdToObjList.insert(LwpIdToObjMap::value_type(objHdr.GetID(), newObj));
+        auto result = m_IdToObjList.insert(LwpIdToObjMap::value_type(objHdr.GetID(), newObj));
+        if (!result.second)
+        {
+            SAL_WARN("lwp", "clearing duplicate object");
+            newObj.clear();
+        }
     }
 
     return newObj;
commit d25035bc1c65998fc9e7d6271d5f7a16cf9cecc5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 13 21:08:19 2015 +0000

    coverity#1327144 UrF: Unread field
    
    since
    
    commit 7650a60b577f0f4f439d94cd73779e5f5915a2cf
    Author: Stephan Wunderlich <sw at openoffice.org>
    Date:   Mon Feb 3 15:42:43 2003 +0000
    
        CHG: removed obsolete lines
    
    Change-Id: Ic03a2619a974005bbd2a60326a3dddb8cc394f83

diff --git a/qadevOOo/tests/java/ifc/container/_XEnumeration.java b/qadevOOo/tests/java/ifc/container/_XEnumeration.java
index 86dd4cb..e6df237 100644
--- a/qadevOOo/tests/java/ifc/container/_XEnumeration.java
+++ b/qadevOOo/tests/java/ifc/container/_XEnumeration.java
@@ -31,21 +31,13 @@ import com.sun.star.lang.WrappedTargetException;
 * <ul>
 *  <li><code> hasMoreElements()</code></li>
 *  <li><code> nextElement()</code></li>
-* </ul> <p>
-* This test needs the following object relations :
-* <ul>
-*  <li> <code>'ENUM'</code> (of type <code>XEnumerationAccess</code>):
-*   This test creates its own oObj because the method nextElement()
-*   will be modified this Object directly so other threads may be failed.
-*  </li>
-* <ul> <p>
+* </ul>
 * Test is multithread compliant. <p>
 * @see com.sun.star.container.XEnumeration
 */
 public class _XEnumeration extends MultiMethodTest {
 
     public XEnumeration oObj = null;
-    public XEnumerationAccess Enum = null;
 
     /**
     * Retrieves relation and sets oObj to a separate enumeration
commit 17d5c40e7d322e7241be3201ffdbe4b80f60798f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 13 21:03:24 2015 +0000

    coverity#1327146 UrF: Unread field
    
    Change-Id: Ie840cc41ed2c57da3793bdf370ed828242febceb

diff --git a/qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java b/qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java
index 400f6c9..f31a07d 100644
--- a/qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java
+++ b/qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java
@@ -82,17 +82,6 @@ public class _GraphicObjectShape extends MultiPropertyTest {
     } ;
 
     /**
-     * Property tester which returns new <code>XIndexAccess</code> object.
-     */
-    protected PropertyTester ImapTester = new PropertyTester() {
-        @Override
-        protected Object getNewValue(String propName, Object oldValue) {
-            return null;
-        }
-    } ;
-
-
-    /**
      * This property must have URL format
      */
     public void _GraphicURL() {
commit a80b72ac683d9b012624feb7f2f4259b4db4cb46
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 13 21:01:42 2015 +0000

    coverity#1327150 UrF: Unread field
    
    Change-Id: I70e241933b899b00bc4a3a959c900f284e6ec1ac

diff --git a/qadevOOo/tests/java/ifc/form/submission/_XSubmission.java b/qadevOOo/tests/java/ifc/form/submission/_XSubmission.java
index 14e8a1f..ce70afb 100644
--- a/qadevOOo/tests/java/ifc/form/submission/_XSubmission.java
+++ b/qadevOOo/tests/java/ifc/form/submission/_XSubmission.java
@@ -25,7 +25,6 @@ import lib.MultiMethodTest;
 
 public class _XSubmission extends MultiMethodTest {
     public XSubmission oObj = null;
-    public boolean HandlerWasCalled = false;
 
     public void _addSubmissionVetoListener() {
         log.println(
commit 476924d473e054e4f279a8bd0594d6923f77434c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 13 21:00:31 2015 +0000

    coverity#1327151 UrF: Unread field
    
    Change-Id: Iea1398d6c261659843d060fb0128f7a404beafb7

diff --git a/qadevOOo/tests/java/ifc/awt/_XButton.java b/qadevOOo/tests/java/ifc/awt/_XButton.java
index fa5a830..4cd4364 100644
--- a/qadevOOo/tests/java/ifc/awt/_XButton.java
+++ b/qadevOOo/tests/java/ifc/awt/_XButton.java
@@ -43,10 +43,8 @@ public class _XButton extends MultiMethodTest {
     * Listener implementation which sets flags on appropriate method calls
     */
     protected static class TestActionListener implements com.sun.star.awt.XActionListener {
-        public boolean disposingCalled = false ;
 
         public void disposing(com.sun.star.lang.EventObject e) {
-            disposingCalled = true ;
         }
 
         public void actionPerformed(com.sun.star.awt.ActionEvent e) {}
diff --git a/qadevOOo/tests/java/ifc/awt/_XCheckBox.java b/qadevOOo/tests/java/ifc/awt/_XCheckBox.java
index 2262cc2..0607368 100644
--- a/qadevOOo/tests/java/ifc/awt/_XCheckBox.java
+++ b/qadevOOo/tests/java/ifc/awt/_XCheckBox.java
@@ -45,10 +45,8 @@ public class _XCheckBox extends MultiMethodTest {
     * Listener implementation which sets flags on appropriate method calls
     */
     protected static class TestItemListener implements com.sun.star.awt.XItemListener {
-        public boolean disposingCalled = false ;
 
         public void disposing(com.sun.star.lang.EventObject e) {
-            disposingCalled = true ;
         }
 
         public void itemStateChanged(com.sun.star.awt.ItemEvent e) {}
diff --git a/qadevOOo/tests/java/ifc/frame/_XDispatch.java b/qadevOOo/tests/java/ifc/frame/_XDispatch.java
index e059e34..3cc536f 100644
--- a/qadevOOo/tests/java/ifc/frame/_XDispatch.java
+++ b/qadevOOo/tests/java/ifc/frame/_XDispatch.java
@@ -57,7 +57,6 @@ public class _XDispatch extends MultiMethodTest {
     */
     protected static class TestStatusListener implements
             com.sun.star.frame.XStatusListener {
-        public boolean disposingCalled = false ;
         public boolean statusChangedCalled = false ;
         private final java.io.PrintWriter log;
 
@@ -66,7 +65,6 @@ public class _XDispatch extends MultiMethodTest {
         }
 
         public void disposing(com.sun.star.lang.EventObject e) {
-            disposingCalled = true ;
             log.println(" disposing was called.") ;
         }
 
@@ -87,7 +85,6 @@ public class _XDispatch extends MultiMethodTest {
     */
     protected static class TestNotificationListener implements
             com.sun.star.frame.XDispatchResultListener {
-        public boolean disposingCalled = false ;
         public boolean finishedDispatch = false ;
         private final java.io.PrintWriter log;
 
@@ -96,7 +93,6 @@ public class _XDispatch extends MultiMethodTest {
         }
 
         public void disposing(com.sun.star.lang.EventObject e) {
-            disposingCalled = true ;
             log.println("   disposing was called.") ;
         }
 
commit 8293e4a3e8dd9034b10091dee5e7839d5cd54c6a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 13 20:53:35 2015 +0000

    coverity#1327160 UrF: Unread field
    
    Change-Id: Ieef22ee987d486a8d7f994900a1f5fd61b0d8cce

diff --git a/qadevOOo/tests/java/ifc/sheet/_XUsedAreaCursor.java b/qadevOOo/tests/java/ifc/sheet/_XUsedAreaCursor.java
index 3ff1630..d7e6223 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XUsedAreaCursor.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XUsedAreaCursor.java
@@ -43,7 +43,6 @@ import com.sun.star.uno.UnoRuntime;
 public class _XUsedAreaCursor extends MultiMethodTest {
 
     public XUsedAreaCursor oObj = null;
-    public XSheetCellCursor oC = null;
     CellRangeAddress sAddr = null;
 
     /**
commit 1d27eaf08334b2de15323b8a8a38bd4b6620a60e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 13 20:52:26 2015 +0000

    coverity#1327161 UrF: Unread field
    
    since
    
    commit 6eda3212ab539c2b5b37accf3a96ab100a79156a
    Author: Vladimir Glazounov <vg at openoffice.org>
    Date:   Tue Nov 21 13:12:59 2006 +0000
    
        INTEGRATION: CWS qadev27 (1.5.20); FILE MERGED
        2006/06/26 07:05:08 cn 1.5.20.1: #i66737# enhancements on property 'NumberingRuels'. Now the test checks also of correct XIndexReplace values
    
    Change-Id: I7e4a59e9b6d7cce044269af37f47fe75b65c56f7

diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java
index 178f6e2..d70e916 100644
--- a/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java
+++ b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java
@@ -211,49 +211,6 @@ public class _ParagraphProperties extends MultiPropertyTest {
         }
     };
 
-    protected PropertyTester rules = null;
-
-    /**
-     * Creates tester for 'NumberingRules' depending on relation.
-     */
-    @Override
-    public void before() {
-        final Object nRules = tEnv.getObjRelation("NRULES");
-
-        if (nRules != null) {
-            rules = new PropertyTester() {
-                @Override
-                protected Object getNewValue(String propName, Object oldValue) {
-                    return nRules;
-                }
-            };
-
-        } else {
-            Object rules1 = null;
-            Object rules2 = null;
-
-            try {
-                oObj.setPropertyValue("NumberingStyleName", "Numbering 1");
-                rules1 = oObj.getPropertyValue("NumberingRules");
-                oObj.setPropertyValue("NumberingStyleName", "Numbering 2");
-                rules2 = oObj.getPropertyValue("NumberingRules");
-            } catch (com.sun.star.lang.WrappedTargetException e) {
-                log.println("WARNING !!! Exception getting numbering rules :");
-                e.printStackTrace(log);
-            } catch (com.sun.star.lang.IllegalArgumentException e) {
-                log.println("WARNING !!! Exception getting numbering rules :");
-                e.printStackTrace(log);
-            } catch (com.sun.star.beans.PropertyVetoException e) {
-                log.println("WARNING !!! Exception getting numbering rules :");
-                e.printStackTrace(log);
-            } catch (com.sun.star.beans.UnknownPropertyException e) {
-                log.println("Property 'NumberingStyleName' is not supported.");
-            }
-
-            rules = new PropertyValueSwitcher(rules1, rules2);
-        }
-    }
-
     /**
      * Tested with custom property tester.
      */


More information about the Libreoffice-commits mailing list