diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-02-25 21:44:23 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-02-27 10:43:29 +0100 |
commit | 265bfa9fc0b732a8df9d75ad2c34b68440539665 (patch) | |
tree | 7a6954fa0ee3134c62f5130e56d994eaa919133c /sc | |
parent | 7b8671d7b58a2a70c641f8315dc506542e8266cc (diff) |
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.lunak@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/tiledrendering/tiledrendering.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/attarray.cxx | 3 |
2 files changed, 3 insertions, 4 deletions
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 ) |