[Libreoffice-commits] core.git: sw/qa

Stephan Bergmann sbergman at redhat.com
Wed Oct 1 02:32:20 PDT 2014


 sw/qa/extras/mailmerge/mailmerge.cxx |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit a5824fa97c7300faca3b09fe0922c9f319b3c49b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Oct 1 11:31:35 2014 +0200

    loplugin:implicitboolconversion
    
    Change-Id: Ia63460949a3ba58f0394f5b94e0d906ca7849710

diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index 7c51b3f..79ab78d 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -6,6 +6,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <sal/config.h>
+
+#include <set>
+
 #include <swmodeltestbase.hxx>
 
 #if !defined(MACOSX) && !defined(WNT)
@@ -49,8 +53,7 @@ DECLARE_DFLT_MAILMERGE_TEST(testMultiPageAnchoredDraws, "multiple-page-anchored-
     uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(sal_Int32(8), xDraws->getCount());
 
-    // bitset of all page numbers
-    char nPageSum = 0xFF;
+    std::set<sal_uInt16> pages;
     uno::Reference<beans::XPropertySet> xPropertySet;
 
     for (sal_Int32 i = 0; i < xDraws->getCount(); i++)
@@ -63,11 +66,9 @@ DECLARE_DFLT_MAILMERGE_TEST(testMultiPageAnchoredDraws, "multiple-page-anchored-
         CPPUNIT_ASSERT_EQUAL( text::TextContentAnchorType_AT_PAGE, nAnchorType );
 
         xPropertySet->getPropertyValue( UNO_NAME_ANCHOR_PAGE_NO ) >>= nAnchorPageNo;
-        nPageSum &= !nAnchorPageNo;
+        // are all shapes are on different page numbers?
+        CPPUNIT_ASSERT(pages.insert(nAnchorPageNo).second);
     }
-
-    // are all shapes are on different page numbers?
-    CPPUNIT_ASSERT_EQUAL(char(0), nPageSum);
 }
 
 #endif


More information about the Libreoffice-commits mailing list