sw/source/core/crsr/FormFieldButton.cxx | 6 +++++- sw/source/core/crsr/bookmrk.cxx | 8 -------- 2 files changed, 5 insertions(+), 9 deletions(-)
New commits: commit cf46c7fc883ab6aecc5809a6c5fd823f736956f3 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Fri May 15 10:30:51 2020 +0200 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Thu May 21 22:35:12 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 <tamas.zol...@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94628 diff --git a/sw/source/core/crsr/FormFieldButton.cxx b/sw/source/core/crsr/FormFieldButton.cxx index b69fab1d86d1..f64a80a228d8 100644 --- a/sw/source/core/crsr/FormFieldButton.cxx +++ b/sw/source/core/crsr/FormFieldButton.cxx @@ -57,7 +57,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 5f8ba1b51b9d..9aa65b9bb2a5 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -556,19 +556,11 @@ namespace sw { namespace 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 libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits