office-gobmx/sc/CppunitTest_sc_anchor_test.mk
Miklos Vajna e7e01efc56 tdf#129552 sc: avoid infinite invalidation loop when the print range is empty
Commit caeb7b1412 (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
2020-01-06 11:23:57 +01:00

77 lines
1.6 KiB
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#*************************************************************************
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
#*************************************************************************
$(eval $(call gb_CppunitTest_CppunitTest,sc_anchor_test))
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sc_anchor_test))
$(eval $(call gb_CppunitTest_add_exception_objects,sc_anchor_test, \
sc/qa/extras/anchor \
))
$(eval $(call gb_CppunitTest_use_external,sc_anchor_test,boost_headers))
$(eval $(call gb_CppunitTest_use_libraries,sc_anchor_test, \
basegfx \
comphelper \
cppu \
cppuhelper \
drawinglayer \
editeng \
for \
forui \
i18nlangtag \
msfilter \
oox \
sal \
salhelper \
sax \
sb \
sc \
scqahelper \
sfx \
sot \
subsequenttest \
svl \
svt \
svx \
svxcore \
test \
tk \
tl \
ucbhelper \
unotest \
utl \
vbahelper \
vcl \
xo \
))
$(eval $(call gb_CppunitTest_set_include,sc_anchor_test,\
-I$(SRCDIR)/sc/source/ui/inc \
-I$(SRCDIR)/sc/inc \
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_api,sc_anchor_test,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_anchor_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_anchor_test))
$(eval $(call gb_CppunitTest_use_rdb,sc_anchor_test,services))
$(eval $(call gb_CppunitTest_use_configuration,sc_anchor_test))
# vim: set noet sw=4 ts=4: