sd: fix loplugin:cppunitassertequals warnings
Change-Id: Id2dc5762668b7c3f78f0a0a1ede97d4ac63fab5d
This commit is contained in:
parent
807151aa13
commit
ddb4600cd0
@ -259,16 +259,16 @@ void SdOOXMLExportTest1::testN828390_4()
|
||||
{
|
||||
const SvxFontHeightItem * pFontHeight = dynamic_cast<const SvxFontHeightItem *>((*it).pAttr);
|
||||
if( pFontHeight )
|
||||
CPPUNIT_ASSERT_MESSAGE( "Font height is wrong", pFontHeight->GetHeight() == 1129 );
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font height is wrong", static_cast<sal_uInt32>(1129), pFontHeight->GetHeight() );
|
||||
const SvxFontItem *pFont = dynamic_cast<const SvxFontItem *>((*it).pAttr);
|
||||
if( pFont )
|
||||
{
|
||||
CPPUNIT_ASSERT_MESSAGE( "Font is wrong", pFont->GetFamilyName() == "Arial");
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font is wrong", OUString("Arial"), pFont->GetFamilyName() );
|
||||
bPassed = true;
|
||||
}
|
||||
const SvxWeightItem *pWeight = dynamic_cast<const SvxWeightItem *>((*it).pAttr);
|
||||
if( pWeight )
|
||||
CPPUNIT_ASSERT_MESSAGE( "Font Weight is wrong", pWeight->GetWeight() == WEIGHT_BOLD);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font Weight is wrong", WEIGHT_BOLD, pWeight->GetWeight() );
|
||||
}
|
||||
}
|
||||
CPPUNIT_ASSERT(bPassed);
|
||||
|
@ -144,7 +144,7 @@ void SdExportTest::testN821567()
|
||||
xDocShRef = saveAndReload( xDocShRef.get(), ODP );
|
||||
uno::Reference< drawing::XDrawPagesSupplier > xDoc(
|
||||
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
|
||||
CPPUNIT_ASSERT_MESSAGE( "not exactly one page", xDoc->getDrawPages()->getCount() == 1 );
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "not exactly one page", static_cast<sal_Int32>(1), xDoc->getDrawPages()->getCount() );
|
||||
uno::Reference< drawing::XDrawPage > xPage( getPage( 0, xDocShRef ) );
|
||||
|
||||
uno::Reference< beans::XPropertySet > xPropSet( xPage, uno::UNO_QUERY );
|
||||
@ -281,7 +281,7 @@ void SdExportTest::testSwappedOutImageExport()
|
||||
|
||||
// Check whether graphic exported well after it was swapped out
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), xDrawPagesSupplier->getDrawPages()->getCount() == 2 );
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), static_cast<sal_Int32>(2), xDrawPagesSupplier->getDrawPages()->getCount());
|
||||
uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Reference<drawing::XShape> xImage(xDrawPage->getByIndex(2), uno::UNO_QUERY);
|
||||
@ -449,7 +449,7 @@ void SdExportTest::testImageWithSpecialID()
|
||||
|
||||
// Check whether graphic was exported well
|
||||
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), xDrawPagesSupplier->getDrawPages()->getCount() == 2 );
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), static_cast<sal_Int32>(2), xDrawPagesSupplier->getDrawPages()->getCount() );
|
||||
uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Reference<drawing::XShape> xImage(xDrawPage->getByIndex(2), uno::UNO_QUERY);
|
||||
|
@ -1389,7 +1389,7 @@ void SdImportTest::testTdf99729()
|
||||
// If text alignment is wrong, the rectangle will be white.
|
||||
CPPUNIT_ASSERT_MESSAGE("Tdf99729: vertical alignment of text is incorrect!", nonwhitecounts[0]>100); // it is 134 with cleartype disabled
|
||||
// The numbers 1-9 should be below the Text Box -> rectangle 154,16 - 170,112 should be white.
|
||||
CPPUNIT_ASSERT_MESSAGE("Tdf99729: legacy vertical alignment of text is incorrect!", nonwhitecounts[1] == 0);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Tdf99729: legacy vertical alignment of text is incorrect!", 0, nonwhitecounts[1]);
|
||||
}
|
||||
|
||||
void SdImportTest::testTdf89927()
|
||||
|
@ -648,7 +648,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
|
||||
};
|
||||
|
||||
// the document has 1 slide
|
||||
CPPUNIT_ASSERT(pDoc->GetSdPageCount(PageKind::Standard) == 1);
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), pDoc->GetSdPageCount(PageKind::Standard));
|
||||
|
||||
uno::Sequence<beans::PropertyValue> aArgs;
|
||||
|
||||
@ -719,7 +719,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
|
||||
}
|
||||
|
||||
// the document has 1 slide
|
||||
CPPUNIT_ASSERT(pDoc->GetSdPageCount(PageKind::Standard) == 1);
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), pDoc->GetSdPageCount(PageKind::Standard));
|
||||
|
||||
comphelper::LibreOfficeKit::setActive(false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user