diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index b2dfcf012dd4..6ebaad50d3d7 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -57,18 +57,10 @@ void Test::testCharacterBorder()
uno::Reference xRun(getRun(getParagraph(1),1), uno::UNO_QUERY);
// Different Border
{
- CPPUNIT_ASSERT_EQUAL_BORDER(
- table::BorderLine2(0x6666FF,12,12,12,3,37),
- getProperty(xRun,"CharTopBorder"));
- CPPUNIT_ASSERT_EQUAL_BORDER(
- table::BorderLine2(0xFF9900,0,99,0,2,99),
- getProperty(xRun,"CharLeftBorder"));
- CPPUNIT_ASSERT_EQUAL_BORDER(
- table::BorderLine2(0xFF0000,0,169,0,1,169),
- getProperty(xRun,"CharBottomBorder"));
- CPPUNIT_ASSERT_EQUAL_BORDER(
- table::BorderLine2(0x0000FF,0,169,0,0,169),
- getProperty(xRun,"CharRightBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(table::BorderLine2(0x6666FF,12,12,12,3,37), getProperty(xRun,"CharTopBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(table::BorderLine2(0xFF9900,0,99,0,2,99), getProperty(xRun,"CharLeftBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(table::BorderLine2(0xFF0000,0,169,0,1,169), getProperty(xRun,"CharBottomBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(table::BorderLine2(0x0000FF,0,169,0,0,169), getProperty(xRun,"CharRightBorder"));
}
// Different Padding
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 254aabef60ca..353cd63e254f 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -37,13 +37,6 @@
using namespace com::sun::star;
#define DEFAULT_STYLE "Default Style"
-#define CPPUNIT_ASSERT_EQUAL_BORDER(aExpected, aActual) \
- CPPUNIT_ASSERT_EQUAL(aExpected.Color, aActual.Color); \
- CPPUNIT_ASSERT_EQUAL(aExpected.InnerLineWidth, aActual.InnerLineWidth); \
- CPPUNIT_ASSERT_EQUAL(aExpected.LineDistance, aActual.LineDistance); \
- CPPUNIT_ASSERT_EQUAL(aExpected.LineStyle, aActual.LineStyle); \
- CPPUNIT_ASSERT_EQUAL(aExpected.LineWidth, aActual.LineWidth); \
- CPPUNIT_ASSERT_EQUAL(aExpected.OuterLineWidth, aActual.OuterLineWidth);
/// Base class for filter tests loading or roundtriping a document, then asserting the document model.
class SwModelTestBase : public test::BootstrapFixture, public unotest::MacrosTest
@@ -366,4 +359,19 @@ protected:
sal_uInt32 m_nStartTime;
};
+inline void assertBorderEqual(
+ const table::BorderLine2& rExpected, const table::BorderLine2& rActual,
+ const CppUnit::SourceLine& rSourceLine )
+{
+ CPPUNIT_NS::assertEquals( rExpected.Color, rActual.Color, rSourceLine, "different Color" );
+ CPPUNIT_NS::assertEquals( rExpected.InnerLineWidth, rActual.InnerLineWidth, rSourceLine, "different InnerLineWidth" );
+ CPPUNIT_NS::assertEquals( rExpected.OuterLineWidth, rActual.OuterLineWidth, rSourceLine, "different OuterLineWidth" );
+ CPPUNIT_NS::assertEquals( rExpected.LineDistance, rActual.LineDistance, rSourceLine, "different LineDistance" );
+ CPPUNIT_NS::assertEquals( rExpected.LineStyle, rActual.LineStyle, rSourceLine, "different LineStyle" );
+ CPPUNIT_NS::assertEquals( rExpected.LineWidth, rActual.LineWidth, rSourceLine, "different LineWidth" );
+}
+
+#define CPPUNIT_ASSERT_BORDER_EQUAL(aExpected, aActual) \
+ assertBorderEqual( aExpected, aActual, CPPUNIT_SOURCELINE() ) \
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 35d51fe616c2..437d2c253a0e 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -181,19 +181,19 @@ void Test::testCharacterBorder()
uno::Reference xSet(getParagraph(1), uno::UNO_QUERY);
// Top border
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParTopBorder, getProperty(xSet,"TopBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty(xSet,"TopBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty(xSet,"TopBorderDistance"));
// Bottom border (same as top border)
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParTopBorder, getProperty(xSet,"BottomBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty(xSet,"BottomBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty(xSet,"BottomBorderDistance"));
// Left border (same as top border)
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParTopBorder, getProperty(xSet,"LeftBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty(xSet,"LeftBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty(xSet,"LeftBorderDistance"));
// Right border (same as top border)
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParTopBorder, getProperty(xSet,"RightBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty(xSet,"RightBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty(xSet,"RightBorderDistance"));
// Shadow
@@ -211,19 +211,19 @@ void Test::testCharacterBorder()
uno::Reference xSet(getParagraph(1), uno::UNO_QUERY);
// Top border
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParCharTopBorder, getProperty(xSet,"CharTopBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharTopBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharTopBorderDistance"));
// Bottom border (same as top border)
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParCharTopBorder, getProperty(xSet,"CharBottomBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharBottomBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharBottomBorderDistance"));
// Left border (same as top border)
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParCharTopBorder, getProperty(xSet,"CharLeftBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharLeftBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharLeftBorderDistance"));
// Right border (same as top border)
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParCharTopBorder, getProperty(xSet,"CharRightBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharRightBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharRightBorderDistance"));
// Shadow
@@ -243,19 +243,19 @@ void Test::testCharacterBorder()
uno::Reference < beans::XPropertySet > xPSet( xAutoStylesEnum->nextElement(), uno::UNO_QUERY );
// Top border
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParCharTopBorder, getProperty(xSet,"CharTopBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharTopBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharTopBorderDistance"));
// Bottom border
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParCharTopBorder, getProperty(xSet,"CharBottomBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharBottomBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharBottomBorderDistance"));
// Left border
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParCharTopBorder, getProperty(xSet,"CharLeftBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharLeftBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharLeftBorderDistance"));
// Right border
- CPPUNIT_ASSERT_EQUAL_BORDER(aFirstParCharTopBorder, getProperty(xSet,"CharRightBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharRightBorder"));
CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharRightBorderDistance"));
}
}
@@ -278,19 +278,19 @@ void Test::testCharacterBorder()
uno::Reference < beans::XPropertySet > xSet( getRun(getParagraph(2),2), uno::UNO_QUERY );
// Top border
- CPPUNIT_ASSERT_EQUAL_BORDER(aBorderArray[0], getProperty(xSet,"CharTopBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[0], getProperty(xSet,"CharTopBorder"));
CPPUNIT_ASSERT_EQUAL(aDistances[0], getProperty(xSet,"CharTopBorderDistance"));
// Bottom border
- CPPUNIT_ASSERT_EQUAL_BORDER(aBorderArray[1], getProperty(xSet,"CharBottomBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[1], getProperty(xSet,"CharBottomBorder"));
CPPUNIT_ASSERT_EQUAL(aDistances[1], getProperty(xSet,"CharBottomBorderDistance"));
// Left border
- CPPUNIT_ASSERT_EQUAL_BORDER(aBorderArray[2], getProperty(xSet,"CharLeftBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[2], getProperty(xSet,"CharLeftBorder"));
CPPUNIT_ASSERT_EQUAL(aDistances[2], getProperty(xSet,"CharLeftBorderDistance"));
// Right border
- CPPUNIT_ASSERT_EQUAL_BORDER(aBorderArray[3], getProperty(xSet,"CharRightBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[3], getProperty(xSet,"CharRightBorder"));
CPPUNIT_ASSERT_EQUAL(aDistances[3], getProperty(xSet,"CharRightBorderDistance"));
// Shadow
@@ -306,19 +306,19 @@ void Test::testCharacterBorder()
uno::Reference < beans::XPropertySet > xStyleSet(xStyleFamily->getByName("CharDiffBor"), uno::UNO_QUERY);
// Top border
- CPPUNIT_ASSERT_EQUAL_BORDER(aBorderArray[0], getProperty(xSet,"CharTopBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[0], getProperty(xSet,"CharTopBorder"));
CPPUNIT_ASSERT_EQUAL(aDistances[0], getProperty(xSet,"CharTopBorderDistance"));
// Bottom border
- CPPUNIT_ASSERT_EQUAL_BORDER(aBorderArray[1], getProperty(xSet,"CharBottomBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[1], getProperty(xSet,"CharBottomBorder"));
CPPUNIT_ASSERT_EQUAL(aDistances[1], getProperty(xSet,"CharBottomBorderDistance"));
// Left border
- CPPUNIT_ASSERT_EQUAL_BORDER(aBorderArray[2], getProperty(xSet,"CharLeftBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[2], getProperty(xSet,"CharLeftBorder"));
CPPUNIT_ASSERT_EQUAL(aDistances[2], getProperty(xSet,"CharLeftBorderDistance"));
// Right border
- CPPUNIT_ASSERT_EQUAL_BORDER(aBorderArray[3], getProperty(xSet,"CharRightBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[3], getProperty(xSet,"CharRightBorder"));
CPPUNIT_ASSERT_EQUAL(aDistances[3], getProperty(xSet,"CharRightBorderDistance"));
}
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 3befcd5896a0..298c10e0e1bb 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1283,10 +1283,10 @@ void Test::testCharacterBorder()
// Border
{
const table::BorderLine2 aTopBorder = getProperty(xRun,"CharTopBorder");
- CPPUNIT_ASSERT_EQUAL_BORDER(table::BorderLine2(0xFF6600,0,318,0,0,318), aTopBorder);
- CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty(xRun,"CharLeftBorder"));
- CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty(xRun,"CharBottomBorder"));
- CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty(xRun,"CharRightBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(table::BorderLine2(0xFF6600,0,318,0,0,318), aTopBorder);
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty(xRun,"CharLeftBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty(xRun,"CharBottomBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty(xRun,"CharRightBorder"));
}
// Padding (w:space)
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 779037f9488d..64eb1beb3122 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -643,10 +643,10 @@ void Test::testCharacterBorder()
// Border
{
const table::BorderLine2 aTopBorder = getProperty(xRun,"CharTopBorder");
- CPPUNIT_ASSERT_EQUAL_BORDER(table::BorderLine2(0xFF6600,0,318,0,0,318), aTopBorder);
- CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty(xRun,"CharLeftBorder"));
- CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty(xRun,"CharBottomBorder"));
- CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty(xRun,"CharRightBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(table::BorderLine2(0xFF6600,0,318,0,0,318), aTopBorder);
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty(xRun,"CharLeftBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty(xRun,"CharBottomBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty(xRun,"CharRightBorder"));
}
// Padding (brsp)
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 3e23f0a3cf3e..a9e41181365a 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -156,10 +156,10 @@ void Test::testCharacterBorder()
{
const table::BorderLine2 aTopBorder = getProperty(xRun,"CharTopBorder");
// In the original ODT file the border color is 0xFF3333
- CPPUNIT_ASSERT_EQUAL_BORDER(table::BorderLine2(0xFF0000,0,318,0,0,318), aTopBorder);
- CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty(xRun,"CharLeftBorder"));
- CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty(xRun,"CharBottomBorder"));
- CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty(xRun,"CharRightBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(table::BorderLine2(0xFF0000,0,318,0,0,318), aTopBorder);
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty(xRun,"CharLeftBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty(xRun,"CharBottomBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty(xRun,"CharRightBorder"));
}
// Padding (dptSpace) it is constant 0