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

Aleksas Pantechovskis alex.pantec at gmail.com
Thu Mar 17 16:02:35 UTC 2016


 sd/qa/unit/export-tests.cxx |   14 ++++++++++++++
 sd/qa/unit/import-tests.cxx |   10 ++++++++++
 2 files changed, 24 insertions(+)

New commits:
commit 080f355f11ee3422e9512815efd9f8d7eb896d32
Author: Aleksas Pantechovskis <alex.pantec at gmail.com>
Date:   Mon Mar 7 16:09:06 2016 +0200

    tdf#65219 Fix temp files clean up in sd unit tests
    
    Change-Id: I99037b01c1d644b1803b315cc5e3d8fa5a19bcfb
    Reviewed-on: https://gerrit.libreoffice.org/22986
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: jan iversen <jani at documentfoundation.org>

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 222c7f0..a81d32f 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -431,6 +431,8 @@ void SdExportTest::testTransparentBackground()
 
     const SdrTextObj *pObj2 = dynamic_cast<SdrTextObj *>( pPage->GetObj( 1 ) );
     checkFontAttributes<Color, SvxBackgroundColorItem>( pObj2, Color(COL_YELLOW));
+
+    xDocShRef->DoClose();
 }
 
 void SdExportTest::testMediaEmbedding()
@@ -474,6 +476,8 @@ void SdExportTest::testFdo84043()
     const SdrPage *pPage = GetPage( 1, xDocShRef );
     SdrObject const* pShape = pPage->GetObj(1);
     CPPUNIT_ASSERT_MESSAGE("no shape", pShape != nullptr);
+
+    xDocShRef->DoClose();
 }
 
 void SdExportTest::testFdo71961()
@@ -743,6 +747,8 @@ void SdExportTest::testTdf80020()
     uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("graphics"), uno::UNO_QUERY);
     uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName("Test Style"), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(OUString("text"), xStyle->getParentStyle());
+
+    xDocShRef->DoClose();
 }
 
 void SdExportTest::testLinkedGraphicRT()
@@ -1009,6 +1015,8 @@ void SdExportTest::testBulletColor()
     const SvxNumBulletItem *pNumFmt = dynamic_cast<const SvxNumBulletItem *>(aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET));
     CPPUNIT_ASSERT(pNumFmt);
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's color is wrong!", sal_uInt32(0xff0000),pNumFmt->GetNumRule()->GetLevel(0).GetBulletColor().GetColor());
+
+    xDocShRef->DoClose();
 }
 
 void SdExportTest::testTdf62176()
@@ -1052,6 +1060,8 @@ void SdExportTest::testTdf62176()
     //Checking the *Text* in TextBox
     uno::Reference<text::XTextRange> xParagraph2( getParagraphFromShape( 0, xShape2 ) );
     CPPUNIT_ASSERT_EQUAL(OUString("Hello World"), xParagraph2->getString());
+
+    xDocShRef->DoClose();
 }
 
 void SdExportTest::testBulletCharAndFont()
@@ -1262,6 +1272,8 @@ void SdExportTest::testBulletMarginAndIndentation()
 
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's left margin is wrong!", sal_uInt32(1000),sal_uInt32(pNumFmt->GetNumRule()->GetLevel(0).GetAbsLSpace()) ); // left margin is 0.79 cm
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's indentation is wrong!", sal_Int32(-998),sal_Int32(pNumFmt->GetNumRule()->GetLevel(0). GetFirstLineOffset()));
+
+    xDocShRef->DoClose();
 }
 
 void SdExportTest::testParaMarginAndindentation()
@@ -1464,6 +1476,8 @@ void SdExportTest::testExportTransitionsPPTX()
 
     // NEWSFLASH
     CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 74, TransitionType::ZOOM, TransitionSubType::ROTATEIN));
+
+    xDocShRef->DoClose();
 }
 
 void SdExportTest::testTdf92527()
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 89b47ab..b102396 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -478,6 +478,8 @@ void SdImportTest::testGradientAngle()
 
     CPPUNIT_ASSERT(xTranspGradients->getByName("Transparency 4") >>= gradient);
     CPPUNIT_ASSERT_EQUAL(sal_Int16(1800), gradient.Angle); // 1000grad
+
+    xDocShRef->DoClose();
 }
 
 void SdImportTest::testN778859()
@@ -597,6 +599,8 @@ void SdImportTest::testTdf97808()
     CPPUNIT_ASSERT_EQUAL(xStyle, xParent);
     CPPUNIT_ASSERT(xLine->getPropertyValue("LineEndName") >>= lineend);
     CPPUNIT_ASSERT_EQUAL(OUString(), lineend);
+
+    xDocShRef->DoClose();
 }
 
 void SdImportTest::testFdo64512()
@@ -1124,6 +1128,8 @@ void SdImportTest::testBnc910045()
     xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
     xCell->getPropertyValue("FillColor") >>= nColor;
     CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor);
+
+    xDocShRef->DoClose();
 }
 
 void SdImportTest::testRowHeight()
@@ -1141,6 +1147,8 @@ void SdImportTest::testRowHeight()
     uno::Reference< beans::XPropertySet > xRefRow( xRows->getByIndex(0), uno::UNO_QUERY_THROW );
     xRefRow->getPropertyValue( sHeight ) >>= nHeight;
     CPPUNIT_ASSERT_EQUAL( sal_Int32(507), nHeight);
+
+    xDocShRef->DoClose();
 }
 void SdImportTest::testTdf93830()
 {
@@ -1192,6 +1200,8 @@ void SdImportTest::testTdf62255()
         aAny >>= aFillStyle;
         CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, aFillStyle);
     }
+
+    xDocShRef->DoClose();
 }
 
 void SdImportTest::testTdf89927()


More information about the Libreoffice-commits mailing list