summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorDaniel Bankston <daniel.e.bankston@gmail.com>2012-06-12 03:20:42 -0500
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-20 11:01:24 +0200
commit366b9a2296c53781854de066a66fba289a32f9b7 (patch)
treea0f6e8786e49387c26c814d2873302d8b4a8c79a /sc/qa
parent2bbebea59de3e2e22817ed4fbe0ce7b7df7c0342 (diff)
Add test case for i53253 to formats unit test
-Added test case for i53253 where a cell has text with different styles and space between the text. Change-Id: I69afa689dcb28d15b22ebed2d97e4b60178d6101
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/data/ods/formats.odsbin10521 -> 10298 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx10
2 files changed, 9 insertions, 1 deletions
diff --git a/sc/qa/unit/data/ods/formats.ods b/sc/qa/unit/data/ods/formats.ods
index 2fa9c134a3f3..c4c9ba831f21 100644
--- a/sc/qa/unit/data/ods/formats.ods
+++ b/sc/qa/unit/data/ods/formats.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index ac3be48a93a2..848c21162238 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -441,7 +441,7 @@ void testFormats_Impl(ScFiltersTest* pFiltersTest, ScDocument* pDoc, sal_Int32 n
pPattern = pDoc->GetPattern(1,1,1);
pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
CPPUNIT_ASSERT_MESSAGE("font should be striked out with a single line", aFont.GetStrikeout() == STRIKEOUT_SINGLE );
- //test double strikeout only for ods
+ //some tests on sheet2 only for ods
if (nFormat == ODS)
{
pPattern = pDoc->GetPattern(1,2,1);
@@ -450,6 +450,14 @@ void testFormats_Impl(ScFiltersTest* pFiltersTest, ScDocument* pDoc, sal_Int32 n
pPattern = pDoc->GetPattern(1,3,1);
pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
CPPUNIT_ASSERT_MESSAGE("font should be underlined with a dotted line", aFont.GetUnderline() == UNDERLINE_DOTTED);
+ //test case for i53253 where a cell has text with different styles and space between the text.
+ rtl::OUString aTestOUStr;
+ pDoc->GetString(3,0,1, aTestOUStr);
+ rtl::OUString aKnownGoodOUStr("text14 space");
+ rtl::OString aTestOStr(rtl::OUStringToOString(aTestOUStr, RTL_TEXTENCODING_UTF8));
+ rtl::OString aKnownGoodOStr(rtl::OUStringToOString(aKnownGoodOUStr, RTL_TEXTENCODING_UTF8));
+ rtl::OString aMsg("Expected: \"" + aKnownGoodOStr + "\"; Actual: \"" + aTestOStr + "\"");
+ CPPUNIT_ASSERT_MESSAGE( aMsg.pData->buffer, aKnownGoodOUStr.equals(aTestOUStr) );
}
pPattern = pDoc->GetPattern(1,4,1);
Color aColor = static_cast<const SvxBrushItem&>(pPattern->GetItem(ATTR_BACKGROUND)).GetColor();