[Libreoffice-commits] .: sw/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Sep 30 06:29:16 PDT 2012


 sw/qa/extras/rtfimport/rtfimport.cxx |   17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 6ce7a5bd5709206f0f60f68d11c6040ad425b947
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Sun Sep 30 15:28:47 2012 +0200

    sw: clean up one more test
    
    Change-Id: Icfcdbedaf6b123fc726e2298ac47698940b36091

diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 35a3e58..30e03ce 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -605,19 +605,12 @@ void Test::testFdo49501()
 
     uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Default"), uno::UNO_QUERY);
 
-    sal_Bool bIsLandscape = sal_False;
-    xStyle->getPropertyValue("IsLandscape") >>= bIsLandscape;
-    CPPUNIT_ASSERT_EQUAL(sal_True, bIsLandscape);
+    CPPUNIT_ASSERT_EQUAL(sal_True, getProperty<sal_Bool>(xStyle, "IsLandscape"));
     sal_Int32 nExpected(TWIP_TO_MM100(567));
-    sal_Int32 nValue = 0;
-    xStyle->getPropertyValue("LeftMargin") >>= nValue;
-    CPPUNIT_ASSERT_EQUAL(nExpected, nValue);
-    xStyle->getPropertyValue("RightMargin") >>= nValue;
-    CPPUNIT_ASSERT_EQUAL(nExpected, nValue);
-    xStyle->getPropertyValue("TopMargin") >>= nValue;
-    CPPUNIT_ASSERT_EQUAL(nExpected, nValue);
-    xStyle->getPropertyValue("BottomMargin") >>= nValue;
-    CPPUNIT_ASSERT_EQUAL(nExpected, nValue);
+    CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int32>(xStyle, "LeftMargin"));
+    CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int32>(xStyle, "RightMargin"));
+    CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int32>(xStyle, "TopMargin"));
+    CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int32>(xStyle, "BottomMargin"));
 }
 
 void Test::testFdo49271()


More information about the Libreoffice-commits mailing list