diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2020-05-15 10:30:51 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2020-05-21 22:35:12 +0200 |
commit | cf46c7fc883ab6aecc5809a6c5fd823f736956f3 (patch) | |
tree | 937e70793a3510c4d92c486bc9e33b001278cf6f /sw/source | |
parent | 0211195b016543961ea6e1da860dadaa3a15aca4 (diff) |
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.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94628
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/crsr/FormFieldButton.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/crsr/bookmrk.cxx | 8 |
2 files changed, 5 insertions, 9 deletions
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"); } } |