summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-19 15:37:08 +0000
committerAndras Timar <andras.timar@collabora.com>2024-01-17 11:55:09 +0100
commite19a919c69cb2ebf5f0e00ae13872bdc45c20f49 (patch)
tree1b90cc245e13239df5f817cdef344a63b8d70388 /sc
parent62b0edad81aefaafa16cc1bbb2c4cab0dcd5460a (diff)
split ScGridWindow::UpdateFormulas into two parts
a) figures out what might need to redraw b) triggers redraws on that Change-Id: Ib6e1d8d0785cc629fd2cfb0cfdc4ad43897fd4f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161012 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx6
2 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index b86331d6f96e..f7a64cafb86b 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -321,6 +321,8 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::DocWindow, public DropTarget
void SetupInitialPageBreaks(const ScDocument& rDoc, SCTAB nTab);
DECL_DLLPRIVATE_LINK(InitiatePageBreaksTimer, Timer*, void);
+ void UpdateFormulaRange(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2);
+
protected:
virtual void PrePaint(vcl::RenderContext& rRenderContext) override;
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index cdba90d8d436..5b8e03bcf467 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5090,6 +5090,7 @@ void ScGridWindow::UpdateFormulas(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2)
if ( comphelper::LibreOfficeKit::isActive() )
{
ScTabViewShell* pViewShell = mrViewData.GetViewShell();
+
if (nX1 < 0)
nX1 = pViewShell->GetLOKStartHeaderCol() + 1;
if (nY1 < 0)
@@ -5109,6 +5110,11 @@ void ScGridWindow::UpdateFormulas(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2)
nY2 = nY1 + mrViewData.VisibleCellsY( eVWhich );
}
+ UpdateFormulaRange(nX1, nY1, nX2, nY2);
+}
+
+void ScGridWindow::UpdateFormulaRange(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2)
+{
if (nX2 < nX1) nX2 = nX1;
if (nY2 < nY1) nY2 = nY1;