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@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
This commit is contained in:
Aleksas Pantechovskis
2016-03-07 16:09:06 +02:00
committed by jan iversen
parent 4331b137fd
commit 080f355f11
2 changed files with 24 additions and 0 deletions

View File

@@ -431,6 +431,8 @@ void SdExportTest::testTransparentBackground()
const SdrTextObj *pObj2 = dynamic_cast<SdrTextObj *>( pPage->GetObj( 1 ) ); const SdrTextObj *pObj2 = dynamic_cast<SdrTextObj *>( pPage->GetObj( 1 ) );
checkFontAttributes<Color, SvxBackgroundColorItem>( pObj2, Color(COL_YELLOW)); checkFontAttributes<Color, SvxBackgroundColorItem>( pObj2, Color(COL_YELLOW));
xDocShRef->DoClose();
} }
void SdExportTest::testMediaEmbedding() void SdExportTest::testMediaEmbedding()
@@ -474,6 +476,8 @@ void SdExportTest::testFdo84043()
const SdrPage *pPage = GetPage( 1, xDocShRef ); const SdrPage *pPage = GetPage( 1, xDocShRef );
SdrObject const* pShape = pPage->GetObj(1); SdrObject const* pShape = pPage->GetObj(1);
CPPUNIT_ASSERT_MESSAGE("no shape", pShape != nullptr); CPPUNIT_ASSERT_MESSAGE("no shape", pShape != nullptr);
xDocShRef->DoClose();
} }
void SdExportTest::testFdo71961() void SdExportTest::testFdo71961()
@@ -743,6 +747,8 @@ void SdExportTest::testTdf80020()
uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("graphics"), uno::UNO_QUERY); uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("graphics"), uno::UNO_QUERY);
uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName("Test Style"), uno::UNO_QUERY); uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName("Test Style"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("text"), xStyle->getParentStyle()); CPPUNIT_ASSERT_EQUAL(OUString("text"), xStyle->getParentStyle());
xDocShRef->DoClose();
} }
void SdExportTest::testLinkedGraphicRT() void SdExportTest::testLinkedGraphicRT()
@@ -1009,6 +1015,8 @@ void SdExportTest::testBulletColor()
const SvxNumBulletItem *pNumFmt = dynamic_cast<const SvxNumBulletItem *>(aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET)); const SvxNumBulletItem *pNumFmt = dynamic_cast<const SvxNumBulletItem *>(aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET));
CPPUNIT_ASSERT(pNumFmt); CPPUNIT_ASSERT(pNumFmt);
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's color is wrong!", sal_uInt32(0xff0000),pNumFmt->GetNumRule()->GetLevel(0).GetBulletColor().GetColor()); CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's color is wrong!", sal_uInt32(0xff0000),pNumFmt->GetNumRule()->GetLevel(0).GetBulletColor().GetColor());
xDocShRef->DoClose();
} }
void SdExportTest::testTdf62176() void SdExportTest::testTdf62176()
@@ -1052,6 +1060,8 @@ void SdExportTest::testTdf62176()
//Checking the *Text* in TextBox //Checking the *Text* in TextBox
uno::Reference<text::XTextRange> xParagraph2( getParagraphFromShape( 0, xShape2 ) ); uno::Reference<text::XTextRange> xParagraph2( getParagraphFromShape( 0, xShape2 ) );
CPPUNIT_ASSERT_EQUAL(OUString("Hello World"), xParagraph2->getString()); CPPUNIT_ASSERT_EQUAL(OUString("Hello World"), xParagraph2->getString());
xDocShRef->DoClose();
} }
void SdExportTest::testBulletCharAndFont() 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 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())); CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's indentation is wrong!", sal_Int32(-998),sal_Int32(pNumFmt->GetNumRule()->GetLevel(0). GetFirstLineOffset()));
xDocShRef->DoClose();
} }
void SdExportTest::testParaMarginAndindentation() void SdExportTest::testParaMarginAndindentation()
@@ -1464,6 +1476,8 @@ void SdExportTest::testExportTransitionsPPTX()
// NEWSFLASH // NEWSFLASH
CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 74, TransitionType::ZOOM, TransitionSubType::ROTATEIN)); CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 74, TransitionType::ZOOM, TransitionSubType::ROTATEIN));
xDocShRef->DoClose();
} }
void SdExportTest::testTdf92527() void SdExportTest::testTdf92527()

View File

@@ -478,6 +478,8 @@ void SdImportTest::testGradientAngle()
CPPUNIT_ASSERT(xTranspGradients->getByName("Transparency 4") >>= gradient); CPPUNIT_ASSERT(xTranspGradients->getByName("Transparency 4") >>= gradient);
CPPUNIT_ASSERT_EQUAL(sal_Int16(1800), gradient.Angle); // 1000grad CPPUNIT_ASSERT_EQUAL(sal_Int16(1800), gradient.Angle); // 1000grad
xDocShRef->DoClose();
} }
void SdImportTest::testN778859() void SdImportTest::testN778859()
@@ -597,6 +599,8 @@ void SdImportTest::testTdf97808()
CPPUNIT_ASSERT_EQUAL(xStyle, xParent); CPPUNIT_ASSERT_EQUAL(xStyle, xParent);
CPPUNIT_ASSERT(xLine->getPropertyValue("LineEndName") >>= lineend); CPPUNIT_ASSERT(xLine->getPropertyValue("LineEndName") >>= lineend);
CPPUNIT_ASSERT_EQUAL(OUString(), lineend); CPPUNIT_ASSERT_EQUAL(OUString(), lineend);
xDocShRef->DoClose();
} }
void SdImportTest::testFdo64512() void SdImportTest::testFdo64512()
@@ -1124,6 +1128,8 @@ void SdImportTest::testBnc910045()
xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW); xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
xCell->getPropertyValue("FillColor") >>= nColor; xCell->getPropertyValue("FillColor") >>= nColor;
CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor); CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor);
xDocShRef->DoClose();
} }
void SdImportTest::testRowHeight() void SdImportTest::testRowHeight()
@@ -1141,6 +1147,8 @@ void SdImportTest::testRowHeight()
uno::Reference< beans::XPropertySet > xRefRow( xRows->getByIndex(0), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xRefRow( xRows->getByIndex(0), uno::UNO_QUERY_THROW );
xRefRow->getPropertyValue( sHeight ) >>= nHeight; xRefRow->getPropertyValue( sHeight ) >>= nHeight;
CPPUNIT_ASSERT_EQUAL( sal_Int32(507), nHeight); CPPUNIT_ASSERT_EQUAL( sal_Int32(507), nHeight);
xDocShRef->DoClose();
} }
void SdImportTest::testTdf93830() void SdImportTest::testTdf93830()
{ {
@@ -1192,6 +1200,8 @@ void SdImportTest::testTdf62255()
aAny >>= aFillStyle; aAny >>= aFillStyle;
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, aFillStyle); CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, aFillStyle);
} }
xDocShRef->DoClose();
} }
void SdImportTest::testTdf89927() void SdImportTest::testTdf89927()