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

Michael Stahl mstahl at redhat.com
Thu Feb 9 12:57:51 UTC 2017


 sd/qa/unit/import-tests.cxx          |    8 ++++----
 sw/qa/extras/odfexport/odfexport.cxx |   29 +++++++++++++++--------------
 2 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit 31a04e09cdf6078b3cef578fd15929617a391fe1
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Feb 9 13:53:28 2017 +0100

    sw: fix even more integer madness
    
    Change-Id: Id785992300de7f8ae714b7fdcf822b42d11353b1

diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index e27b2da..44729d8 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -121,16 +121,16 @@ DECLARE_ODFEXPORT_TEST(testTdf103567, "tdf103567.odt")
     // for some reason this property exists with 199 points if it wasn't
     // imported, that would be a fail
     CPPUNIT_ASSERT_EQUAL(5, pointss[0].getLength());
-    CPPUNIT_ASSERT_EQUAL(   0, pointss[0][0].X);
-    CPPUNIT_ASSERT_EQUAL(2672, pointss[0][0].Y);
-    CPPUNIT_ASSERT_EQUAL(   0, pointss[0][1].X);
-    CPPUNIT_ASSERT_EQUAL(1111, pointss[0][1].Y);
-    CPPUNIT_ASSERT_EQUAL(2672, pointss[0][2].X);
-    CPPUNIT_ASSERT_EQUAL(1111, pointss[0][2].Y);
-    CPPUNIT_ASSERT_EQUAL(2672, pointss[0][3].X);
-    CPPUNIT_ASSERT_EQUAL(2672, pointss[0][3].Y);
-    CPPUNIT_ASSERT_EQUAL(   0, pointss[0][4].X);
-    CPPUNIT_ASSERT_EQUAL(2672, pointss[0][4].Y);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(   0), pointss[0][0].X);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][0].Y);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(   0), pointss[0][1].X);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(1111), pointss[0][1].Y);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][2].X);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(1111), pointss[0][2].Y);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][3].X);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][3].Y);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(   0), pointss[0][4].X);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][4].Y);
 
     // image map, one rectangle
     uno::Reference<container::XIndexContainer> const xImageMap(
@@ -139,12 +139,13 @@ DECLARE_ODFEXPORT_TEST(testTdf103567, "tdf103567.odt")
     uno::Reference<beans::XPropertySet> const xEntry(xImageMap->getByIndex(0), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(OUString("http://example.com/"), getProperty<OUString>(xEntry, "URL"));
     awt::Rectangle const rect(getProperty<awt::Rectangle>(xEntry, "Boundary"));
-    CPPUNIT_ASSERT_EQUAL( 726, rect.X);
-    CPPUNIT_ASSERT_EQUAL(1718, rect.Y);
-    CPPUNIT_ASSERT_EQUAL(1347, rect.Width);
-    CPPUNIT_ASSERT_EQUAL( 408, rect.Height);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32( 726), rect.X);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(1718), rect.Y);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(1347), rect.Width);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32( 408), rect.Height);
 }
 
+
 DECLARE_ODFEXPORT_TEST(testFramebackgrounds, "framebackgrounds.odt")
 {
    //Counting the Number of Frames and checking with the expected count
commit 816a61c93564fa8eb33079f400f1e4bda40454a3
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Feb 9 13:49:18 2017 +0100

    sd: argh fix the C++ integer madness again
    
    Change-Id: I47bf134a7ef0ebcd45ec3cc2c7cf805387ecadb9

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 3ef78f2..502f9f2 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1556,13 +1556,13 @@ void SdImportTest::testAoo124143()
     // interesting ones are custom 4, 5
     drawing::GluePoint2 glue4;
     xGluePoints->getByIdentifier(4) >>= glue4;
-    CPPUNIT_ASSERT_EQUAL( 2470, glue4.Position.X);
-    CPPUNIT_ASSERT_EQUAL(-1810, glue4.Position.Y);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32( 2470), glue4.Position.X);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(-1810), glue4.Position.Y);
 
     drawing::GluePoint2 glue5;
     xGluePoints->getByIdentifier(5) >>= glue5;
-    CPPUNIT_ASSERT_EQUAL(-2975, glue5.Position.X);
-    CPPUNIT_ASSERT_EQUAL(-2165, glue5.Position.Y);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(-2975), glue5.Position.X);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(-2165), glue5.Position.Y);
 
     // now check connectors
     uno::Reference<beans::XPropertySet> const xEllipse(getShapeFromPage(1, 0, xDocShRef));


More information about the Libreoffice-commits mailing list