summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/tbunosearchcontrollers.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/tbxctrls/tbunosearchcontrollers.cxx')
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx20
1 files changed, 4 insertions, 16 deletions
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index b786b03fc2da..1c620ef7da3e 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -80,23 +80,15 @@ static const sal_Int32 REMEMBER_SIZE = 10;
class CheckButtonItemWindow final : public InterimItemWindow
{
public:
- CheckButtonItemWindow(vcl::Window* pParent)
+ CheckButtonItemWindow(vcl::Window* pParent, const OUString& rLabel)
: InterimItemWindow(pParent, "svx/ui/checkbuttonbox.ui", "CheckButtonBox")
, m_xWidget(m_xBuilder->weld_check_button("checkbutton"))
{
m_xWidget->connect_key_press(LINK(this, CheckButtonItemWindow, KeyInputHdl));
- }
-
- void SetOptimalSize()
- {
+ m_xWidget->set_label(rLabel);
SetSizePixel(m_xWidget->get_preferred_size());
}
- void set_label(const OUString& rText)
- {
- m_xWidget->set_label(rText);
- }
-
bool get_active() const
{
return m_xWidget->get_active();
@@ -926,9 +918,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL MatchCaseToolboxController::cr
if ( pParent )
{
ToolBox* pToolbar = static_cast<ToolBox*>(pParent.get());
- m_xMatchCaseControl = VclPtr<CheckButtonItemWindow>::Create(pToolbar);
- m_xMatchCaseControl->set_label(SvxResId(RID_SVXSTR_FINDBAR_MATCHCASE));
- m_xMatchCaseControl->SetOptimalSize();
+ m_xMatchCaseControl = VclPtr<CheckButtonItemWindow>::Create(pToolbar, SvxResId(RID_SVXSTR_FINDBAR_MATCHCASE));
}
xItemWindow = VCLUnoHelper::GetInterface(m_xMatchCaseControl);
@@ -1044,9 +1034,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL SearchFormattedToolboxControll
if ( pParent )
{
ToolBox* pToolbar = static_cast<ToolBox*>(pParent.get());
- m_xSearchFormattedControl = VclPtr<CheckButtonItemWindow>::Create(pToolbar);
- m_xSearchFormattedControl->set_label(SvxResId(RID_SVXSTR_FINDBAR_SEARCHFORMATTED));
- m_xSearchFormattedControl->SetOptimalSize();
+ m_xSearchFormattedControl = VclPtr<CheckButtonItemWindow>::Create(pToolbar, SvxResId(RID_SVXSTR_FINDBAR_SEARCHFORMATTED));
}
xItemWindow = VCLUnoHelper::GetInterface(m_xSearchFormattedControl);