sw/qa/extras/htmlexport/htmlexport.cxx | 14 +++++++------- sw/qa/extras/odfexport/odfexport.cxx | 12 ++++++------ sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 6 +++--- sw/qa/extras/rtfexport/rtfexport.cxx | 6 +++--- sw/qa/extras/ww8export/ww8export.cxx | 5 +++-- sw/source/filter/ww8/attributeoutputbase.hxx | 4 ++-- sw/source/filter/ww8/docxattributeoutput.cxx | 2 ++ sw/source/filter/ww8/docxattributeoutput.hxx | 2 +- sw/source/filter/ww8/rtfattributeoutput.cxx | 2 ++ sw/source/filter/ww8/rtfattributeoutput.hxx | 2 +- sw/source/filter/ww8/ww8attributeoutput.hxx | 2 +- 11 files changed, 31 insertions(+), 26 deletions(-)
New commits: commit 3b6ad403dd332221ebde82ae5f699ba77b60f181 Author: Zolnai Tamás <zolnaitamas2...@gmail.com> Date: Mon Sep 9 13:07:03 2013 +0200 Use hex color code in character border filter tests Change-Id: I19bd1cbedd42101186fd4afbcd7af9afb630f857 diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index 3b02f2b..b2dfcf0 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 300594b..35d51fe 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 a2f7a55..3befcd5 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 2cd5cfa..779037f 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 bde2f6c..3e23f0a 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")); commit 81d2a8e8ae9df80948c44e6b6980ca46918719ee Author: Zolnai Tamás <zolnaitamas2...@gmail.com> Date: Mon Sep 9 10:51:25 2013 +0200 Avoid using in header Change-Id: I1365cf183a768f17dd2d16f695a27d9710eb4daf diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 057fd39..ac08d74 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -118,7 +118,7 @@ class SwLineNumberInfo; class SwNumRule; class wwFont; -using ::editeng::SvxBorderLine; +namespace editeng { class SvxBorderLine; } class String; namespace rtl { class OUString; } @@ -442,7 +442,7 @@ protected: /// Sfx item RES_CHRATR_BOX void FormatCharBorder( const SvxBoxItem& rBox ); - virtual void CharBorder( const SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ) = 0; + virtual void CharBorder( const ::editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ) = 0; /// Sfx item RES_TXTATR_INETFMT virtual void TextINetFormat( const SwFmtINetFmt& ) = 0; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index c5b78ff..55504b8 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -112,6 +112,8 @@ #include <stdio.h> #endif +using ::editeng::SvxBorderLine; + using namespace oox; using namespace docx; using namespace sax_fastparser; diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 8333517..fa46300 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -473,7 +473,7 @@ protected: virtual void CharHidden( const SvxCharHiddenItem& rHidden ); /// Sfx item RES_CHRATR_BOX - virtual void CharBorder( const SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ); + virtual void CharBorder( const ::editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ); /// Sfx item RES_TXTATR_INETFMT virtual void TextINetFormat( const SwFmtINetFmt& ); diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index c4d3b29..5151261 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -101,6 +101,8 @@ #include <com/sun/star/i18n/ScriptType.hpp> +using ::editeng::SvxBorderLine; + using namespace nsSwDocInfoSubType; using namespace nsFieldFlags; using namespace sw::util; diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index 51fdcef..de1ae97 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -313,7 +313,7 @@ protected: virtual void CharHidden( const SvxCharHiddenItem& rHidden ); /// Sfx item RES_CHRATR_BOX - virtual void CharBorder( const SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ); + virtual void CharBorder( const ::editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ); /// Sfx item RES_TXTATR_INETFMT virtual void TextINetFormat( const SwFmtINetFmt& ); diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx index c1e0c27..3c37de5 100644 --- a/sw/source/filter/ww8/ww8attributeoutput.hxx +++ b/sw/source/filter/ww8/ww8attributeoutput.hxx @@ -294,7 +294,7 @@ protected: virtual void CharHidden( const SvxCharHiddenItem& ); /// Sfx item RES_CHRATR_BOX - virtual void CharBorder( const SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ); + virtual void CharBorder( const ::editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ); /// Sfx item RES_TXTATR_INETFMT virtual void TextINetFormat( const SwFmtINetFmt& );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits