Kaydet (Commit) 11637831 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

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
üst 40af04ce
...@@ -1731,6 +1731,32 @@ void ScFiltersTest::testRichTextContentODS() ...@@ -1731,6 +1731,32 @@ void ScFiltersTest::testRichTextContentODS()
} }
CPPUNIT_ASSERT_MESSAGE("Second line should be underlined.", bHasUnderline); 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(); xDocSh->DoClose();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment