summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2020-05-15 10:30:51 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2020-05-18 12:23:25 +0200
commit1bf0118e6cf4b8b4546a7ce494ff2973724bae1b (patch)
tree45c656c0f07b425553b82f5d7c3aea53463ef186 /sw/source
parent337a9a454c1bc95214111578d3f9c0622c55c509 (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>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/crsr/FormFieldButton.cxx6
-rw-r--r--sw/source/core/crsr/bookmrk.cxx8
2 files changed, 5 insertions, 9 deletions
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");
}
}