diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-09-09 13:07:03 +0200 |
---|---|---|
committer | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-09-09 13:07:52 +0200 |
commit | 3b6ad403dd332221ebde82ae5f699ba77b60f181 (patch) | |
tree | 4bb9a34d27821826c4c110e9cd654a42eb9a46a7 /sw | |
parent | 81d2a8e8ae9df80948c44e6b6980ca46918719ee (diff) |
Use hex color code in character border filter tests
Change-Id: I19bd1cbedd42101186fd4afbcd7af9afb630f857
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/htmlexport/htmlexport.cxx | 14 | ||||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 12 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 6 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 6 | ||||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export.cxx | 5 |
5 files changed, 22 insertions, 21 deletions
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index 3b02f2b21f70..b2dfcf012dd4 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -15,7 +15,7 @@ class Test : public SwModelTestBase { public: void testFdo62336(); - void testCharBorder(); + void testCharacterBorder(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -31,7 +31,7 @@ void Test::run() { MethodEntry<Test> aMethods[] = { {"fdo62336.docx", &Test::testFdo62336}, - {"charborder.odt", &Test::testCharBorder}, + {"charborder.odt", &Test::testCharacterBorder}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -51,23 +51,23 @@ void Test::testFdo62336() // The problem was essentially a crash during table export as docx/rtf/html } -void Test::testCharBorder() +void Test::testCharacterBorder() { uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1),1), uno::UNO_QUERY); // Different Border { CPPUNIT_ASSERT_EQUAL_BORDER( - table::BorderLine2(6711039,12,12,12,3,37), + table::BorderLine2(0x6666FF,12,12,12,3,37), getProperty<table::BorderLine2>(xRun,"CharTopBorder")); CPPUNIT_ASSERT_EQUAL_BORDER( - table::BorderLine2(16750848,0,99,0,2,99), + table::BorderLine2(0xFF9900,0,99,0,2,99), getProperty<table::BorderLine2>(xRun,"CharLeftBorder")); CPPUNIT_ASSERT_EQUAL_BORDER( - table::BorderLine2(16711680,0,169,0,1,169), + table::BorderLine2(0xFF0000,0,169,0,1,169), getProperty<table::BorderLine2>(xRun,"CharBottomBorder")); CPPUNIT_ASSERT_EQUAL_BORDER( - table::BorderLine2(255,0,169,0,0,169), + table::BorderLine2(0x0000FF,0,169,0,0,169), getProperty<table::BorderLine2>(xRun,"CharRightBorder")); } diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 300594b1d0ac..35d51fe616c2 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -176,7 +176,7 @@ void Test::testCharacterBorder() // Paragraph border of first paragraph { - const table::BorderLine2 aFirstParTopBorder(6711039,0,26,26,7,53); + const table::BorderLine2 aFirstParTopBorder(0x6666FF,0,26,26,7,53); const sal_Int32 aFirstParTopPadding(150); uno::Reference<beans::XPropertySet> xSet(getParagraph(1), uno::UNO_QUERY); @@ -206,7 +206,7 @@ void Test::testCharacterBorder() // Character border for first paragraph { - const table::BorderLine2 aFirstParCharTopBorder(16724787,0,37,0,2,37); + const table::BorderLine2 aFirstParCharTopBorder(0xFF3333,0,37,0,2,37); const sal_Int32 aFirstParCharTopPadding(450); uno::Reference<beans::XPropertySet> xSet(getParagraph(1), uno::UNO_QUERY); @@ -228,7 +228,7 @@ void Test::testCharacterBorder() // Shadow const table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xSet,"CharShadowFormat"); - CPPUNIT_ASSERT_EQUAL(sal_Int32(16724787), aShadow.Color); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xFF3333), aShadow.Color); CPPUNIT_ASSERT_EQUAL(false, (bool)aShadow.IsTransparent); CPPUNIT_ASSERT_EQUAL(table::ShadowLocation(2), aShadow.Location); CPPUNIT_ASSERT_EQUAL(sal_Int16(280), aShadow.ShadowWidth); @@ -266,9 +266,9 @@ void Test::testCharacterBorder() table::BorderLine2 aBorderArray[4] = { - table::BorderLine2(16724787,0,37,0,14,37), // Top (fine dashed line) - table::BorderLine2(10092390,26,26,53,11,106), // Bottom - table::BorderLine2(6711039,9,26,9,12,71), // Left + table::BorderLine2(0xFF3333,0,37,0,14,37), // Top (fine dashed line) + table::BorderLine2(0x99FF66,26,26,53,11,106), // Bottom + table::BorderLine2(0x6666FF,9,26,9,12,71), // Left table::BorderLine2(0,0,0,0,0,0) // Right }; diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index a2f7a55581b8..3befcd5896a0 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -1278,12 +1278,12 @@ void Test::testFdo68787() void Test::testCharacterBorder() { uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1),1), uno::UNO_QUERY); - // OOXML has just one border attribute(<w:bdr>) for text border so all side has + // OOXML has just one border attribute (<w:bdr>) for text border so all side has // the same border with the same padding // Border { const table::BorderLine2 aTopBorder = getProperty<table::BorderLine2>(xRun,"CharTopBorder"); - CPPUNIT_ASSERT_EQUAL_BORDER(table::BorderLine2(16737792,0,318,0,0,318), aTopBorder); + CPPUNIT_ASSERT_EQUAL_BORDER(table::BorderLine2(0xFF6600,0,318,0,0,318), aTopBorder); CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharLeftBorder")); CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharBottomBorder")); CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharRightBorder")); @@ -1292,7 +1292,7 @@ void Test::testCharacterBorder() // Padding (w:space) { const sal_Int32 nTopPadding = getProperty<sal_Int32>(xRun,"CharTopBorderDistance"); - // In the original odt file it is 150, but the unit conversion round it down. + // In the original ODT the padding is 150, but the unit conversion round it down. CPPUNIT_ASSERT_EQUAL(sal_Int32(141), nTopPadding); CPPUNIT_ASSERT_EQUAL(nTopPadding, getProperty<sal_Int32>(xRun,"CharLeftBorderDistance")); CPPUNIT_ASSERT_EQUAL(nTopPadding, getProperty<sal_Int32>(xRun,"CharBottomBorderDistance")); diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 2cd5cfa4dbf5..779037f9488d 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -638,12 +638,12 @@ void Test::testParaShadow() void Test::testCharacterBorder() { uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1),1), uno::UNO_QUERY); - // RTF has just one border attribute(chbrdr) for text border so all side has + // RTF has just one border attribute (chbrdr) for text border so all side has // the same border with the same padding // Border { const table::BorderLine2 aTopBorder = getProperty<table::BorderLine2>(xRun,"CharTopBorder"); - CPPUNIT_ASSERT_EQUAL_BORDER(table::BorderLine2(16737792,0,318,0,0,318), aTopBorder); + CPPUNIT_ASSERT_EQUAL_BORDER(table::BorderLine2(0xFF6600,0,318,0,0,318), aTopBorder); CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharLeftBorder")); CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharBottomBorder")); CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharRightBorder")); @@ -652,7 +652,7 @@ void Test::testCharacterBorder() // Padding (brsp) { const sal_Int32 nTopPadding = getProperty<sal_Int32>(xRun,"CharTopBorderDistance"); - // In the original odt file it is 150, but the unit conversion round it down. + // In the original ODT file the padding is 150, but the unit conversion round it down. CPPUNIT_ASSERT_EQUAL(sal_Int32(141), nTopPadding); CPPUNIT_ASSERT_EQUAL(nTopPadding, getProperty<sal_Int32>(xRun,"CharLeftBorderDistance")); CPPUNIT_ASSERT_EQUAL(nTopPadding, getProperty<sal_Int32>(xRun,"CharBottomBorderDistance")); diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx index bde2f6cded7c..3e23f0a3cf3e 100644 --- a/sw/qa/extras/ww8export/ww8export.cxx +++ b/sw/qa/extras/ww8export/ww8export.cxx @@ -150,12 +150,13 @@ void Test::testFdo42144() void Test::testCharacterBorder() { uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1),1), uno::UNO_QUERY); - // WW8 has just one border attribute sprmCBrc for text border so all side has + // WW8 has just one border attribute (sprmCBrc) for text border so all side has // the same border // Border { const table::BorderLine2 aTopBorder = getProperty<table::BorderLine2>(xRun,"CharTopBorder"); - CPPUNIT_ASSERT_EQUAL_BORDER(table::BorderLine2(16711680,0,318,0,0,318), aTopBorder); + // 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<table::BorderLine2>(xRun,"CharLeftBorder")); CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharBottomBorder")); CPPUNIT_ASSERT_EQUAL_BORDER(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharRightBorder")); |