summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2023-08-30 16:22:02 +0200
committerLászló Németh <nemeth@numbertext.org>2023-08-31 18:01:33 +0200
commitd1411afab98f7b41e9e700ef26b43dc77242d917 (patch)
tree6e5e2270fce212418b47e527569684b0a5ab566a /sc/qa
parent5f89cf39c8c6228e3580aa94db4978825ea1fba2 (diff)
tdf#150815 sc: fix repainting sparkline
On Windows, if the input range of the sparkline is not in the same row as the output range, the sparkline wasn't repainted after changing the data within its range. Force the update to avoid of showing obsolete data. Change-Id: Id56209b20387ee68144507a0102d3a0d093ff1ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156304 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/data/ods/tdf150815.odsbin0 -> 10947 bytes
-rw-r--r--sc/qa/unit/subsequent_filters_test3.cxx22
2 files changed, 21 insertions, 1 deletions
diff --git a/sc/qa/unit/data/ods/tdf150815.ods b/sc/qa/unit/data/ods/tdf150815.ods
new file mode 100644
index 000000000000..2dd407b6cea5
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf150815.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters_test3.cxx b/sc/qa/unit/subsequent_filters_test3.cxx
index d277e0858905..ff19d3d55c3c 100644
--- a/sc/qa/unit/subsequent_filters_test3.cxx
+++ b/sc/qa/unit/subsequent_filters_test3.cxx
@@ -393,7 +393,8 @@ struct PaintListener : public SfxListener
{
if ((pPaintHint->GetStartCol() <= 0 && pPaintHint->GetEndCol() >= 0)
&& ((pPaintHint->GetStartRow() <= 9 && pPaintHint->GetEndRow() >= 9)
- || (pPaintHint->GetStartRow() == 2 && pPaintHint->GetEndRow() == 3)))
+ || (pPaintHint->GetStartRow() == 2 && pPaintHint->GetEndRow() == 3)
+ || (pPaintHint->GetStartRow() == 1 && pPaintHint->GetEndRow() == 1)))
{
mbCalled = true;
}
@@ -441,6 +442,25 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf131471)
CPPUNIT_ASSERT(aListener.mbCalled);
}
+CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf150815_RepaintSparkline)
+{
+ createScDoc("ods/tdf150815.ods");
+
+ ScDocument* pDoc = getScDoc();
+ ScDocShell* pDocSh = getScDocShell();
+
+ PaintListener aListener;
+ aListener.StartListening(*pDocSh);
+
+ auto pSparkline = pDoc->GetSparkline(ScAddress(0, 1, 0));
+ CPPUNIT_ASSERT(pSparkline);
+
+ ScTabViewShell* pViewShell = getViewShell();
+ pViewShell->EnterData(0, 0, 0, "10");
+
+ CPPUNIT_ASSERT(aListener.mbCalled);
+}
+
CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf137091)
{
// Set the system locale to Turkish