diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-08 10:15:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-08 18:32:26 +0100 |
commit | 70c4e1f88d1df5331a1d11c0d82a3e65186a2ac1 (patch) | |
tree | 5674b0911935e54997fcd352affc3b88b4a98d93 /include/svx/svdpntv.hxx | |
parent | b2fe01ef6154aab63c33706be2739ce2540212c2 (diff) |
Related: cool#7951 only invalidate Window if the setting really changed
cut down on some of these invalidations when the setting didn't change
and we don't need the expensive invalidation
Change-Id: Id84a79636fcd7f21c7a8dbe86218b75d32b26487
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161784
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'include/svx/svdpntv.hxx')
-rw-r--r-- | include/svx/svdpntv.hxx | 72 |
1 files changed, 64 insertions, 8 deletions
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index bce1bd8bb881..8665262f0508 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -399,14 +399,70 @@ public: bool IsHlplFront() const { return mbHlplFront ; } const Color& GetGridColor() const { return maGridColor;} - void SetPageVisible(bool bOn = true) { mbPageVisible=bOn; InvalidateAllWin(); } - void SetPageShadowVisible(bool bOn) { mbPageShadowVisible=bOn; InvalidateAllWin(); } - void SetPageBorderVisible(bool bOn = true) { mbPageBorderVisible=bOn; InvalidateAllWin(); } - void SetBordVisible(bool bOn = true) { mbBordVisible=bOn; InvalidateAllWin(); } - void SetGridVisible(bool bOn) { mbGridVisible=bOn; InvalidateAllWin(); } - void SetGridFront(bool bOn) { mbGridFront =bOn; InvalidateAllWin(); } - void SetHlplVisible(bool bOn = true) { mbHlplVisible=bOn; InvalidateAllWin(); } - void SetHlplFront(bool bOn) { mbHlplFront =bOn; InvalidateAllWin(); } + void SetPageVisible(bool bOn = true) + { + if (mbPageVisible != bOn) + { + mbPageVisible = bOn; + InvalidateAllWin(); + } + } + void SetPageShadowVisible(bool bOn) + { + if (mbPageShadowVisible != bOn) + { + mbPageShadowVisible = bOn; + InvalidateAllWin(); + } + } + void SetPageBorderVisible(bool bOn = true) + { + if (mbPageBorderVisible != bOn) + { + mbPageBorderVisible = bOn; + InvalidateAllWin(); + } + } + void SetBordVisible(bool bOn = true) + { + if (mbBordVisible != bOn) + { + mbBordVisible = bOn; + InvalidateAllWin(); + } + } + void SetGridVisible(bool bOn) + { + if (mbGridVisible != bOn) + { + mbGridVisible = bOn; + InvalidateAllWin(); + } + } + void SetGridFront(bool bOn) + { + if (mbGridFront != bOn) + { + mbGridFront = bOn; + InvalidateAllWin(); + } + } + void SetHlplVisible(bool bOn = true) + { + if (mbHlplVisible != bOn) + { + mbHlplVisible = bOn; + InvalidateAllWin(); + } + } + void SetHlplFront(bool bOn) + { + if (mbHlplFront != bOn) + { + mbHlplFront = bOn; + InvalidateAllWin(); + } + } void SetGlueVisible(bool bOn = true) { if (mbGlueVisible!=bOn) { mbGlueVisible=bOn; if (!mbGlueVisible2 && !mbGlueVisible3 && !mbGlueVisible4) GlueInvalidate(); } } bool IsPreviewRenderer() const { return mbPreviewRenderer; } |