Kaydet (Commit) 7b515a57 authored tarafından Miklos Vajna's avatar Miklos Vajna

test RTF_BKMKSTART and RTF_BKMKEND

Change-Id: I00b258ef3ed89db3b9b8c97bea5ad6673b006398
üst fc9a9166
{\rtf1
{\*\bkmkstart firstword}
Hello
{\*\bkmkend firstword}
world!
\par
}
......@@ -75,6 +75,7 @@ public:
void testPlaceholder();
void testMnor();
void testI120928();
void testBookmark();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
......@@ -124,6 +125,7 @@ void Test::run()
{"placeholder.odt", &Test::testPlaceholder},
{"mnor.rtf", &Test::testMnor},
{"i120928.rtf", &Test::testI120928},
{"bookmark.rtf", &Test::testBookmark},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
......@@ -539,6 +541,13 @@ void Test::testI120928()
CPPUNIT_ASSERT_EQUAL(true, bIsGraphic);
}
void Test::testBookmark()
{
uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextContent> xBookmark(xBookmarksSupplier->getBookmarks()->getByName("firstword"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("Hello"), xBookmark->getAnchor()->getString());
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
......
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