Kaydet (Commit) 0a91e08a authored tarafından Michael Stahl's avatar Michael Stahl

sw: SwXFlatParagraph::isChecked() return value is inverted

It was checked if the flag says it's not dirty.
Thanks to Varun Dhall for pointing to this problem.

Change-Id: I4aa1fef8b2251f0f3e579930b39d6d5a256c1895
üst cd74d49d
......@@ -1074,9 +1074,9 @@ void SwUiWriterTest::testXFlatParagraph()
//checking modified status
CPPUNIT_ASSERT(!xFlatPara->isModified());
//checking "checked" staus, modifying it and asserting the changes
CPPUNIT_ASSERT(xFlatPara->isChecked(sal_Int32(text::TextMarkupType::SPELLCHECK)));
xFlatPara->setChecked((sal_Int32(text::TextMarkupType::SPELLCHECK)), true);
CPPUNIT_ASSERT(!xFlatPara->isChecked(sal_Int32(text::TextMarkupType::SPELLCHECK)));
xFlatPara->setChecked((sal_Int32(text::TextMarkupType::SPELLCHECK)), true);
CPPUNIT_ASSERT(xFlatPara->isChecked(sal_Int32(text::TextMarkupType::SPELLCHECK)));
//getting other XFlatParagraphs and asserting their contents
uno::Reference<text::XFlatParagraph> xFlatPara2(xFPIterator->getParaAfter(xFlatPara));
CPPUNIT_ASSERT_EQUAL(OUString("This is another sample text"), xFlatPara2->getText());
......
......@@ -218,14 +218,14 @@ sal_Bool SAL_CALL SwXFlatParagraph::isChecked( ::sal_Int32 nType ) throw (uno::R
if (GetTextNode())
{
if ( text::TextMarkupType::SPELLCHECK == nType )
return GetTextNode()->IsWrongDirty();
return !GetTextNode()->IsWrongDirty();
else if ( text::TextMarkupType::PROOFREADING == nType )
return GetTextNode()->IsGrammarCheckDirty();
return !GetTextNode()->IsGrammarCheckDirty();
else if ( text::TextMarkupType::SMARTTAG == nType )
return GetTextNode()->IsSmartTagDirty();
return !GetTextNode()->IsSmartTagDirty();
}
return sal_False;
return sal_True;
}
// text::XFlatParagraph:
......
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