Kaydet (Commit) 4ad994c9 authored tarafından Michael Meeks's avatar Michael Meeks

Fix thinko in sw unit test.

Change-Id: I6c72ce5d416151e7864e87e3b9d801a218525a16
üst 6804b001
...@@ -403,7 +403,7 @@ void SwTiledRenderingTest::testGetTextSelection() ...@@ -403,7 +403,7 @@ void SwTiledRenderingTest::testGetTextSelection()
SwXTextDocument* pXTextDocument = createDoc("shape-with-text.fodt"); SwXTextDocument* pXTextDocument = createDoc("shape-with-text.fodt");
// No crash, just empty output for unexpected mime type. // No crash, just empty output for unexpected mime type.
CPPUNIT_ASSERT_EQUAL(OString(), apitest::helper::transferable::getTextSelection(pXTextDocument->getTextSelection(), "foo/bar")); CPPUNIT_ASSERT_EQUAL(OString(), apitest::helper::transferable::getTextSelection(pXTextDocument->getSelection(), "foo/bar"));
SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
// Move the cursor into the first word. // Move the cursor into the first word.
...@@ -412,10 +412,10 @@ void SwTiledRenderingTest::testGetTextSelection() ...@@ -412,10 +412,10 @@ void SwTiledRenderingTest::testGetTextSelection()
pWrtShell->SelWrd(); pWrtShell->SelWrd();
// Make sure that we selected text from the body text. // Make sure that we selected text from the body text.
CPPUNIT_ASSERT_EQUAL(OString("Hello"), apitest::helper::transferable::getTextSelection(pXTextDocument->getTextSelection(), "text/plain;charset=utf-8")); CPPUNIT_ASSERT_EQUAL(OString("Hello"), apitest::helper::transferable::getTextSelection(pXTextDocument->getSelection(), "text/plain;charset=utf-8"));
// Make sure we produce something for HTML. // Make sure we produce something for HTML.
CPPUNIT_ASSERT(!apitest::helper::transferable::getTextSelection(pXTextDocument->getTextSelection(), "text/html").isEmpty()); CPPUNIT_ASSERT(!apitest::helper::transferable::getTextSelection(pXTextDocument->getSelection(), "text/html").isEmpty());
// Now select some shape text and check again. // Now select some shape text and check again.
SdrPage* pPage = pWrtShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0); SdrPage* pPage = pWrtShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
...@@ -426,7 +426,7 @@ void SwTiledRenderingTest::testGetTextSelection() ...@@ -426,7 +426,7 @@ void SwTiledRenderingTest::testGetTextSelection()
EditView& rEditView = pView->GetTextEditOutlinerView()->GetEditView(); EditView& rEditView = pView->GetTextEditOutlinerView()->GetEditView();
ESelection aWordSelection(0, 0, 0, 5); ESelection aWordSelection(0, 0, 0, 5);
rEditView.SetSelection(aWordSelection); rEditView.SetSelection(aWordSelection);
CPPUNIT_ASSERT_EQUAL(OString("Shape"), apitest::helper::transferable::getTextSelection(pXTextDocument->getTextSelection(), "text/plain;charset=utf-8")); CPPUNIT_ASSERT_EQUAL(OString("Shape"), apitest::helper::transferable::getTextSelection(pXTextDocument->getSelection(), "text/plain;charset=utf-8"));
} }
void SwTiledRenderingTest::testSetGraphicSelection() void SwTiledRenderingTest::testSetGraphicSelection()
......
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