[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/qa
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Sat Sep 28 01:31:05 UTC 2019
sc/qa/unit/tiledrendering/tiledrendering.cxx | 39 ++++++++++++++-------------
1 file changed, 21 insertions(+), 18 deletions(-)
New commits:
commit 086fb1fe8cf8cccf57c135e59b6e1393d6247bc3
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Sep 27 19:13:44 2019 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sat Sep 28 03:30:32 2019 +0200
sc lok tests: Store all invalidation rectangles.
Reviewed-on: https://gerrit.libreoffice.org/79490
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit 630d5915819c664aaee5f17066c61939f7ceaefe)
Reviewed-on: https://gerrit.libreoffice.org/79616
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Change-Id: I214a98d1901af0d0c25897ebfbdb644e92714f5c
Reviewed-on: https://gerrit.libreoffice.org/79759
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 3276ce901dcc..12ac20e380bd 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -441,7 +441,7 @@ public:
bool m_bGraphicViewSelection;
bool m_bFullInvalidateTiles;
bool m_bInvalidateTiles;
- tools::Rectangle m_aInvalidation;
+ std::vector<tools::Rectangle> m_aInvalidations;
bool m_bViewLock;
OString m_sCellFormula;
boost::property_tree::ptree m_aCommentCallbackResult;
@@ -509,15 +509,14 @@ public:
}
else
{
- if (m_aInvalidation.IsEmpty())
- {
- uno::Sequence<OUString> aSeq = comphelper::string::convertCommaSeparated(OUString::createFromAscii(pPayload));
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4), aSeq.getLength());
- m_aInvalidation.setX(aSeq[0].toInt32());
- m_aInvalidation.setY(aSeq[1].toInt32());
- m_aInvalidation.setWidth(aSeq[2].toInt32());
- m_aInvalidation.setHeight(aSeq[3].toInt32());
- }
+ uno::Sequence<OUString> aSeq = comphelper::string::convertCommaSeparated(OUString::createFromAscii(pPayload));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4), aSeq.getLength());
+ tools::Rectangle aInvalidationRect;
+ aInvalidationRect.setX(aSeq[0].toInt32());
+ aInvalidationRect.setY(aSeq[1].toInt32());
+ aInvalidationRect.setWidth(aSeq[2].toInt32());
+ aInvalidationRect.setHeight(aSeq[3].toInt32());
+ m_aInvalidations.push_back(aInvalidationRect);
m_bInvalidateTiles = true;
}
}
@@ -1039,11 +1038,12 @@ void ScTiledRenderingTest::testInvalidateOnInserRowCol()
// insert row
aView.m_bInvalidateTiles = false;
- aView.m_aInvalidation = tools::Rectangle();
+ aView.m_aInvalidations.clear();
comphelper::dispatchCommand(".uno:InsertRows", aArgs);
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
- CPPUNIT_ASSERT_EQUAL(tools::Rectangle(-75, 50985, 32212230, 63990), aView.m_aInvalidation);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), aView.m_aInvalidations.size());
+ CPPUNIT_ASSERT_EQUAL(tools::Rectangle(-75, 50985, 32212230, 63990), aView.m_aInvalidations[0]);
// move on the right
for (int i = 0; i < 200; ++i)
@@ -1055,11 +1055,12 @@ void ScTiledRenderingTest::testInvalidateOnInserRowCol()
// insert column
aView.m_bInvalidateTiles = false;
- aView.m_aInvalidation = tools::Rectangle();
+ aView.m_aInvalidations.clear();
comphelper::dispatchCommand(".uno:InsertColumns", aArgs);
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
- CPPUNIT_ASSERT_EQUAL(tools::Rectangle(253650, -15, 32212230, 63990), aView.m_aInvalidation);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), aView.m_aInvalidations.size());
+ CPPUNIT_ASSERT_EQUAL(tools::Rectangle(253650, -15, 32212230, 63990), aView.m_aInvalidations[0]);
}
void ScTiledRenderingTest::testCommentCallback()
@@ -1698,12 +1699,13 @@ void ScTiledRenderingTest::testPageDownInvalidation()
SfxLokHelper::setView(nView1);
aView1.m_bInvalidateTiles = false;
- aView1.m_aInvalidation = tools::Rectangle();
+ aView1.m_aInvalidations.clear();
pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, awt::Key::PAGEDOWN, 0);
pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, awt::Key::PAGEDOWN, 0);
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView1.m_bInvalidateTiles);
- CPPUNIT_ASSERT_EQUAL(tools::Rectangle(15, 15, 1230, 225), aView1.m_aInvalidation);
+ CPPUNIT_ASSERT_EQUAL(size_t(3), aView1.m_aInvalidations.size());
+ CPPUNIT_ASSERT_EQUAL(tools::Rectangle(15, 15, 1230, 225), aView1.m_aInvalidations[0]);
}
void ScTiledRenderingTest::testSheetChangeInvalidation()
@@ -1721,12 +1723,13 @@ void ScTiledRenderingTest::testSheetChangeInvalidation()
SfxLokHelper::setView(nView1);
aView1.m_bInvalidateTiles = false;
- aView1.m_aInvalidation = tools::Rectangle();
+ aView1.m_aInvalidations.clear();
pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::PAGEDOWN | KEY_MOD1);
pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::PAGEDOWN | KEY_MOD1);
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView1.m_bInvalidateTiles);
- CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 1310720, 268435456), aView1.m_aInvalidation);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), aView1.m_aInvalidations.size());
+ CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 1310720, 268435456), aView1.m_aInvalidations[0]);
}
}
More information about the Libreoffice-commits
mailing list