diff options
author | Jaskaran Singh <jvsg1303@gmail.com> | 2016-08-06 00:03:50 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-18 00:15:21 +0200 |
commit | da891402371535f39613dc8be9e5d022e1e533a8 (patch) | |
tree | 920357dab0baad4a467f593084e23a34bc24750b /sc/qa/unit/subsequent_filters-test.cxx | |
parent | cf03533f572a7aa542587bbc837dc124ffde66d3 (diff) |
Add test for strikeout in orcus interface
Change-Id: I72e917934919ddf5cc2cdd188a692c3fba94433e
Diffstat (limited to 'sc/qa/unit/subsequent_filters-test.cxx')
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 24fdfa36b113..dc11d9baec49 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -2834,6 +2834,35 @@ void ScFiltersTest::testOrcusODSStyleInterface() CPPUNIT_ASSERT_MESSAGE("Style Name6 :Error with Font Underline Style", pUnderlineItem->GetLineStyle() == LINESTYLE_SINGLE); CPPUNIT_ASSERT_MESSAGE("Style Name6 :Error with Font Underline Color", pUnderlineItem->GetColor() == Color(128, 128, 128)); + /* Test for Style Name "7" + * Has strikethrough single + */ + pStyleSheet = pStyleSheetPool->FindCaseIns("Name7", SfxStyleFamily::Para); + CPPUNIT_ASSERT_MESSAGE("Style Name7 : Doesn't have Attribute Strikeout, but it should have.", + pStyleSheet->GetItemSet().HasItem(ATTR_FONT_CROSSEDOUT, &pItem)); + + const SvxCrossedOutItem* pCrossedOutItem = static_cast<const SvxCrossedOutItem*>(pItem); + CPPUNIT_ASSERT_MESSAGE("Style Name7 :Error with Strikeout", pCrossedOutItem->GetStrikeout() == STRIKEOUT_SINGLE); + + /* Test for Style Name "8" + * Has strikethrough bold + */ + pStyleSheet = pStyleSheetPool->FindCaseIns("Name8", SfxStyleFamily::Para); + CPPUNIT_ASSERT_MESSAGE("Style Name8 : Doesn't have Attribute Strikeout, but it should have.", + pStyleSheet->GetItemSet().HasItem(ATTR_FONT_CROSSEDOUT, &pItem)); + + pCrossedOutItem = static_cast<const SvxCrossedOutItem*>(pItem); + CPPUNIT_ASSERT_MESSAGE("Style Name7 :Error with Strikeout", pCrossedOutItem->GetStrikeout() == STRIKEOUT_BOLD); + + /* Test for Style Name "9" + * Has strikethrough slash + */ + pStyleSheet = pStyleSheetPool->FindCaseIns("Name9", SfxStyleFamily::Para); + CPPUNIT_ASSERT_MESSAGE("Style Name9 : Doesn't have Attribute Strikeout, but it should have.", + pStyleSheet->GetItemSet().HasItem(ATTR_FONT_CROSSEDOUT, &pItem)); + + pCrossedOutItem = static_cast<const SvxCrossedOutItem*>(pItem); + CPPUNIT_ASSERT_MESSAGE("Style Name9 :Error with Strikeout", pCrossedOutItem->GetStrikeout() == STRIKEOUT_SLASH); } #endif |