summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfexport
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-08-21 21:30:41 +0200
committerZolnai Tamás <zolnaitamas2000@gmail.com>2013-08-23 21:01:37 +0200
commitf8b6c3949e2c1f23549a2ef879e728cdb7149235 (patch)
tree256fc0266b2f32d3cc2c868f26c954c8ecc21a04 /sw/qa/extras/odfexport
parent9509a46683e40fc2feea6631b701b766797b7882 (diff)
CharBrd 7: Border shadow
1, New character attribute - Add the three shadow members to font (width, color, location) 2, Painting - Extract the shadow painting to a local function and use that for character shadow (paintfrm.cxx) - Reduce the painting rectangle of background (shadow doesn't inherites the background of content) 3, Border merge - Use text portion join members to skip shadow when neccessary. 4, Vertical text - Get shadow space dependant from oritentation and border merge. 5, UNO API and ODF filter Paragraph: ParaShadowFormat -> Character: CharShadowFormat Change-Id: Ief4669990d238016c3ffc18a2609a3df7d9dddbf
Diffstat (limited to 'sw/qa/extras/odfexport')
-rw-r--r--sw/qa/extras/odfexport/data/charborder.odtbin8841 -> 8607 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx22
2 files changed, 22 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/charborder.odt b/sw/qa/extras/odfexport/data/charborder.odt
index 9f37d58b76c1..8395625baf88 100644
--- a/sw/qa/extras/odfexport/data/charborder.odt
+++ b/sw/qa/extras/odfexport/data/charborder.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 3a248b29575d..b838312df93f 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -10,6 +10,7 @@
#include <swmodeltestbase.hxx>
#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/table/ShadowFormat.hpp>
class Test : public SwModelTestBase
{
@@ -200,6 +201,13 @@ void Test::testCharacterBorder()
aFirstParTopBorder, aFirstParTopPadding,
getProperty<table::BorderLine2>(xSet,"RightBorder"),
getProperty<sal_Int32>(xSet,"RightBorderDistance"));
+
+ // Shadow
+ const table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xSet,"ParaShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(aShadow.Color, 0L);
+ CPPUNIT_ASSERT_EQUAL((bool)aShadow.IsTransparent, false);
+ CPPUNIT_ASSERT_EQUAL((int)aShadow.Location, 0);
+ CPPUNIT_ASSERT_EQUAL((int)aShadow.ShadowWidth, 0);
}
// Character border for first paragraph
@@ -232,6 +240,13 @@ void Test::testCharacterBorder()
getProperty<table::BorderLine2>(xSet,"CharRightBorder"),
getProperty<sal_Int32>(xSet,"CharRightBorderDistance"));
+ // Shadow
+ const table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xSet,"CharShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(aShadow.Color, 16724787L);
+ CPPUNIT_ASSERT_EQUAL((bool)aShadow.IsTransparent, false);
+ CPPUNIT_ASSERT_EQUAL((int)aShadow.Location, 2);
+ CPPUNIT_ASSERT_EQUAL((int)aShadow.ShadowWidth, 280);
+
// Check autostyle
{
uno::Reference< style::XAutoStyleFamily > xAutoStyleFamily(getAutoStyles("ParagraphStyles"));
@@ -308,6 +323,13 @@ void Test::testCharacterBorder()
getProperty<table::BorderLine2>(xSet,"CharRightBorder"),
getProperty<sal_Int32>(xSet,"CharRightBorderDistance"));
+ // Shadow
+ const table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xSet,"CharShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(aShadow.Color, 0L);
+ CPPUNIT_ASSERT_EQUAL((bool)aShadow.IsTransparent, false);
+ CPPUNIT_ASSERT_EQUAL((int)aShadow.Location, 3);
+ CPPUNIT_ASSERT_EQUAL((int)aShadow.ShadowWidth, 79);
+
// Check character style
{
uno::Reference< container::XNameAccess > xStyleFamily(getStyles("CharacterStyles"), uno::UNO_QUERY);