diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-01-06 10:31:50 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-01-06 11:23:57 +0100 |
commit | e7e01efc56f7061d0a2e5142b4bae84dd403cc50 (patch) | |
tree | 33672dbc2fd10ee291ea8736dd93ef46ab7b64b2 /ridljar/Jar_unoloader.mk | |
parent | 364cdd314fb4d6168990a469bfb10fc935dfc649 (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 'ridljar/Jar_unoloader.mk')
0 files changed, 0 insertions, 0 deletions