summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr/FormFieldButton.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-12-03 11:13:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-12-03 14:23:58 +0100
commita16d2f95783839d54b3c0b2d4c88f96ad3afa404 (patch)
treeb8ab79f82ca7bf592a1b89aed1cb318abfbb9c96 /sw/source/core/crsr/FormFieldButton.cxx
parentf85d860ccbebd99bc128218148e2992c9415f221 (diff)
inherit FormFieldButton from Control
instead of MenuButton, it overrides the parts of MenuButton that make it a MenuButton Change-Id: Id2317ec09dd0f8084efe341b1091787c36d51f12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107157 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core/crsr/FormFieldButton.cxx')
-rw-r--r--sw/source/core/crsr/FormFieldButton.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/core/crsr/FormFieldButton.cxx b/sw/source/core/crsr/FormFieldButton.cxx
index 65412b3f558b..8ae84826a3f9 100644
--- a/sw/source/core/crsr/FormFieldButton.cxx
+++ b/sw/source/core/crsr/FormFieldButton.cxx
@@ -15,11 +15,16 @@
#include <vcl/event.hxx>
FormFieldButton::FormFieldButton(SwEditWin* pEditWin, sw::mark::Fieldmark& rFieldmark)
- : MenuButton(pEditWin, WB_DIALOGCONTROL)
+ : Control(pEditWin, WB_DIALOGCONTROL)
, m_rFieldmark(rFieldmark)
{
assert(GetParent());
assert(dynamic_cast<SwEditWin*>(GetParent()));
+
+ SetBackground();
+ EnableChildTransparentMode();
+ SetParentClipMode(ParentClipMode::NoClip);
+ SetPaintTransparent(true);
}
FormFieldButton::~FormFieldButton() { disposeOnce(); }
@@ -27,7 +32,7 @@ FormFieldButton::~FormFieldButton() { disposeOnce(); }
void FormFieldButton::dispose()
{
m_pFieldPopup.disposeAndClear();
- MenuButton::dispose();
+ Control::dispose();
}
void FormFieldButton::CalcPosAndSize(const SwRect& rPortionPaintArea)
@@ -137,7 +142,7 @@ void FormFieldButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rec
WindowHitTest FormFieldButton::ImplHitTest(const Point& rFramePos)
{
// We need to check whether the position hits the button (the frame should be mouse transparent)
- WindowHitTest aResult = MenuButton::ImplHitTest(rFramePos);
+ WindowHitTest aResult = Control::ImplHitTest(rFramePos);
if (aResult != WindowHitTest::Inside)
return aResult;
else