sw/source/core/crsr/FormFieldButton.cxx | 6 +++++- sw/source/core/crsr/bookmrk.cxx | 8 -------- 2 files changed, 5 insertions(+), 9 deletions(-)
New commits: commit 1bf0118e6cf4b8b4546a7ce494ff2973724bae1b Author: Tamás Zolnai <[email protected]> AuthorDate: Fri May 15 10:30:51 2020 +0200 Commit: Tamás Zolnai <[email protected]> CommitDate: Mon May 18 12:23:25 2020 +0200 MSForms: fix rendering of form field button. It's not enough to check the paint area. because it's in logic units, which does not change by zooming. Change-Id: I9ee51c03e7edc2c70d91d6ef6dbaaae8c2c7beff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94400 Tested-by: Tamás Zolnai <[email protected]> Reviewed-by: Tamás Zolnai <[email protected]> diff --git a/sw/source/core/crsr/FormFieldButton.cxx b/sw/source/core/crsr/FormFieldButton.cxx index 162d03f43224..43d8ff6e07e9 100644 --- a/sw/source/core/crsr/FormFieldButton.cxx +++ b/sw/source/core/crsr/FormFieldButton.cxx @@ -49,7 +49,11 @@ void FormFieldButton::CalcPosAndSize(const SwRect& rPortionPaintArea) // Then extend the size with the button area aBoxSize.AdjustWidth(GetParent()->LogicToPixel(rPortionPaintArea.SSize()).Height()); - SetPosSizePixel(aBoxPos, aBoxSize); + if (aBoxPos != GetPosPixel() || aBoxSize != GetSizePixel()) + { + SetPosSizePixel(aBoxPos, aBoxSize); + Invalidate(); + } } void FormFieldButton::MouseButtonUp(const MouseEvent&) diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 583ddaff4a12..bd7e5d48fd12 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -700,19 +700,11 @@ namespace sw::mark void DropDownFieldmark::SetPortionPaintArea(const SwRect& rPortionPaintArea) { - if(m_aPortionPaintArea == rPortionPaintArea && - m_pButton && m_pButton->IsVisible()) - { - SendLOKMessage("show"); - return; - } - m_aPortionPaintArea = rPortionPaintArea; if(m_pButton) { m_pButton->Show(); m_pButton->CalcPosAndSize(m_aPortionPaintArea); - m_pButton->Invalidate(); SendLOKMessage("show"); } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
