diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-08 17:24:35 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-08 19:25:37 -0400 |
commit | 11637831312a7a92af9c0148aa6b1e30db4b55b2 (patch) | |
tree | 05a4bd86bf9022ee94ab9c8488cc7dae1d249a13 /sc | |
parent | 40af04cea332e5311edab8d9c395299c15b7d4ec (diff) |
fdo#62116: Unit test for the fix.
For now, we'll only check whether or not those field items with formats
get imported at all. We should add additional checks for their formats
later.
Change-Id: I5a8f01a6e2594b8c97183a43fc4f3417df6fb561
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/ods/rich-text-cells.ods | bin | 17748 -> 17572 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 26 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/rich-text-cells.ods b/sc/qa/unit/data/ods/rich-text-cells.ods Binary files differindex 0f24cfd0af67..a869b0be873a 100644 --- a/sc/qa/unit/data/ods/rich-text-cells.ods +++ b/sc/qa/unit/data/ods/rich-text-cells.ods diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index a00b518591c0..ff09d2759fe1 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -1731,6 +1731,32 @@ void ScFiltersTest::testRichTextContentODS() } CPPUNIT_ASSERT_MESSAGE("Second line should be underlined.", bHasUnderline); + // URL with formats applied. For now, we'll check whether or not the + // field objects gets imported. Later we should add checks for the + // formats. + aPos.IncRow(); + pEditText = pDoc->GetEditText(aPos); + CPPUNIT_ASSERT_MESSAGE("Failed to retrieve edit text object.", pEditText); + CPPUNIT_ASSERT_MESSAGE("URL field item not found.", pEditText->HasField(text::textfield::Type::URL)); + + // Sheet name with formats applied. + aPos.IncRow(); + pEditText = pDoc->GetEditText(aPos); + CPPUNIT_ASSERT_MESSAGE("Failed to retrieve edit text object.", pEditText); + CPPUNIT_ASSERT_MESSAGE("Sheet name field item not found.", pEditText->HasField(text::textfield::Type::TABLE)); + + // Date with formats applied. + aPos.IncRow(); + pEditText = pDoc->GetEditText(aPos); + CPPUNIT_ASSERT_MESSAGE("Failed to retrieve edit text object.", pEditText); + CPPUNIT_ASSERT_MESSAGE("Date field item not found.", pEditText->HasField(text::textfield::Type::DATE)); + + // Document title with formats applied. + aPos.IncRow(); + pEditText = pDoc->GetEditText(aPos); + CPPUNIT_ASSERT_MESSAGE("Failed to retrieve edit text object.", pEditText); + CPPUNIT_ASSERT_MESSAGE("Date field item not found.", pEditText->HasField(text::textfield::Type::DOCINFO_TITLE)); + xDocSh->DoClose(); } |