diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-07-20 20:41:43 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-07-20 22:43:53 +0200 |
commit | 0a91e08a46118b495f80f7901b2132b194d6d409 (patch) | |
tree | 28937f2a441d3deb438ef21b81d0a557269e752a | |
parent | cd74d49de55e87a4e801e8a245d198ea51d0ec34 (diff) |
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
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unoflatpara.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index bbf8c2ccd4f1..08158cca6454 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -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()); diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index 7922c37e8b9f..4af396abe703 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -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: |