sc/qa/unit/tiledrendering/tiledrendering.cxx | 4 ++-- sc/source/core/data/attarray.cxx | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit 265bfa9fc0b732a8df9d75ad2c34b68440539665 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Fri Feb 25 21:44:23 2022 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Sun Feb 27 10:43:29 2022 +0100 fix inverted condition Logic says that 'contains' should be '!empty()'. And checking history shows that 94d76cef1f71056fab106caf4cc8e65504475615 inverted the condition presumably by mistake. Change-Id: I6c0ddc6486a5fb89eb39b93e32ee52d478c05927 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130543 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index b0990b41f150..9db6cd3a3ae3 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -1196,7 +1196,7 @@ void ScTiledRenderingTest::testInvalidateOnInserRowCol() Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT(aView.m_bInvalidateTiles); CPPUNIT_ASSERT_EQUAL(size_t(2), aView.m_aInvalidations.size()); - CPPUNIT_ASSERT_EQUAL(tools::Rectangle(-75, 50985, 32212230, 63990), aView.m_aInvalidations[0]); + CPPUNIT_ASSERT_EQUAL(tools::Rectangle(-75, 51240, 32212230, 63990), aView.m_aInvalidations[0]); // move on the right for (int i = 0; i < 200; ++i) @@ -1213,7 +1213,7 @@ void ScTiledRenderingTest::testInvalidateOnInserRowCol() Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT(aView.m_bInvalidateTiles); CPPUNIT_ASSERT_EQUAL(size_t(2), aView.m_aInvalidations.size()); - CPPUNIT_ASSERT_EQUAL(tools::Rectangle(253650, -15, 32212230, 63990), aView.m_aInvalidations[0]); + CPPUNIT_ASSERT_EQUAL(tools::Rectangle(254925, -15, 32212230, 63990), aView.m_aInvalidations[0]); } void ScTiledRenderingTest::testCommentCallback() diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index 5116001576ad..1f48990aa05d 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -1304,8 +1304,7 @@ bool ScAttrArray::HasAttrib_Impl(const ScPatternAttr* pPattern, HasAttrFlags nMa } if ( nMask & HasAttrFlags::Conditional ) { - bool bContainsCondFormat = pPattern->GetItem( ATTR_CONDITIONAL ).GetCondFormatData().empty(); - if ( bContainsCondFormat ) + if ( !pPattern->GetItem( ATTR_CONDITIONAL ).GetCondFormatData().empty()) bFound = true; } if ( nMask & HasAttrFlags::Protected )