summaryrefslogtreecommitdiff
path: root/sc/CppunitTest_sc_anchor_test.mk
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-01-06 10:31:50 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-01-06 11:23:57 +0100
commite7e01efc56f7061d0a2e5142b4bae84dd403cc50 (patch)
tree33672dbc2fd10ee291ea8736dd93ef46ab7b64b2 /sc/CppunitTest_sc_anchor_test.mk
parent364cdd314fb4d6168990a469bfb10fc935dfc649 (diff)
tdf#129552 sc: avoid infinite invalidation loop when the print range is empty
Commit caeb7b141280a65e60525f11a7e6514b76e12e11 (tdf#124983 In calc make printable page borders also initially visible, 2019-07-10) added the ability to paint page breaks right after opening a document. The implementation calls ScPrintFunc::UpdatePages() whenever there are no calculated page breaks. The problem is that this is not only true when they are not calculated, but also happens when the print range is empty. This means that ScGridWindow::Paint() resulted in a vcl::Window::Invalidate() for the same window, and this happened again and again as the idle handler was invoked, resulting in flickering form controls. Fix the problem by only calculating page breaks when ScPrintFunc::HasPrintRange() confirms something will be calculated. This works because HasPrintRange() return false when ScTable::aPrintRanges is empty, and UpdatePages() also does nothing in that case. Change-Id: I14d8a728f4672e647e9009a3dc3e0dd5fb40c023 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86258 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sc/CppunitTest_sc_anchor_test.mk')
-rw-r--r--sc/CppunitTest_sc_anchor_test.mk4
1 files changed, 1 insertions, 3 deletions
diff --git a/sc/CppunitTest_sc_anchor_test.mk b/sc/CppunitTest_sc_anchor_test.mk
index d8ae6e69fb8d..da3807004573 100644
--- a/sc/CppunitTest_sc_anchor_test.mk
+++ b/sc/CppunitTest_sc_anchor_test.mk
@@ -70,9 +70,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_anchor_test,\
$(eval $(call gb_CppunitTest_use_ure,sc_anchor_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_anchor_test))
-$(eval $(call gb_CppunitTest_use_components,sc_anchor_test,\
- $(sc_unoapi_common_components) \
-))
+$(eval $(call gb_CppunitTest_use_rdb,sc_anchor_test,services))
$(eval $(call gb_CppunitTest_use_configuration,sc_anchor_test))