diff options
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 73d4de576965..b37a6c4d0e42 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -707,22 +707,26 @@ void SwUiWriterTest::testFdo74981() SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFieldType(0, RES_INPUTFLD)), OUString("foo"), OUString("bar"), 0, 0); pWrtShell->Insert(aField); - // expect hints - SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1); - SwTextNode* pTextNode = aIdx.GetNode().GetTextNode(); - CPPUNIT_ASSERT(pTextNode->HasHints()); + { + // expect hints + SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1); + SwTextNode* pTextNode = aIdx.GetNode().GetTextNode(); + CPPUNIT_ASSERT(pTextNode->HasHints()); + } // go to the begin of the paragraph and split this node pWrtShell->Left(CRSR_SKIP_CHARS, false, 100, false); pWrtShell->SplitNode(); - // expect only the second paragraph to have hints - aIdx = SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1); - pTextNode = aIdx.GetNode().GetTextNode(); - CPPUNIT_ASSERT(pTextNode->HasHints()); - --aIdx; - pTextNode = aIdx.GetNode().GetTextNode(); - CPPUNIT_ASSERT(!pTextNode->HasHints()); + { + // expect only the second paragraph to have hints + SwNodeIndex aIdx(SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1)); + SwTextNode* pTextNode = aIdx.GetNode().GetTextNode(); + CPPUNIT_ASSERT(pTextNode->HasHints()); + --aIdx; + pTextNode = aIdx.GetNode().GetTextNode(); + CPPUNIT_ASSERT(!pTextNode->HasHints()); + } } void SwUiWriterTest::testTdf98512() |