summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-13 17:02:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-14 09:58:34 +0100
commit3688235a8d059285ce8dcf6d2fb6c522b0b6501a (patch)
treef99b4c7ea6a4a31e7a510692364787d630ee4db1 /svx
parent13b15ca63a476ff8c8da0761395d49d6c8127371 (diff)
weld SearchFormattedControl Item Window
Change-Id: Ifda9e514ae0329a756ec365a40ec1ccfcfea14ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88621 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/pch/precompiled_svxcore.hxx3
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx22
2 files changed, 12 insertions, 13 deletions
diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx
index 78a9fee9c8c6..8efd27097cac 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-02-13 15:10:47 using:
+ Generated on 2020-02-13 17:01:33 using:
./bin/update_pch svx svxcore --cutoff=7 --exclude:system --include:module --exclude:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -62,6 +62,7 @@
#include <osl/getglobalmutex.hxx>
#include <osl/interlck.h>
#include <osl/mutex.hxx>
+#include <osl/thread.h>
#include <osl/time.h>
#include <rtl/alloc.h>
#include <rtl/character.hxx>
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 8d753e347f29..b786b03fc2da 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -58,7 +58,6 @@
#include <rtl/ref.hxx>
#include <rtl/instance.hxx>
#include <svx/srchdlg.hxx>
-#include <vcl/button.hxx>
#include <vcl/event.hxx>
#include <vcl/fixed.hxx>
#include <vcl/window.hxx>
@@ -158,14 +157,14 @@ void impl_executeSearch( const css::uno::Reference< css::uno::XComponentContext
sFindText = pItemWin->get_active_text();
} else if ( sItemCommand == COMMAND_MATCHCASE )
{
- CheckButtonItemWindow* pItemWin = static_cast<CheckButtonItemWindow*>( pToolBox->GetItemWindow(id) );
+ CheckButtonItemWindow* pItemWin = static_cast<CheckButtonItemWindow*>(pToolBox->GetItemWindow(id));
if (pItemWin)
aMatchCase = pItemWin->get_active();
} else if ( sItemCommand == COMMAND_SEARCHFORMATTED )
{
- CheckBox* pItemWin = static_cast<CheckBox*>( pToolBox->GetItemWindow(id) );
+ CheckButtonItemWindow* pItemWin = static_cast<CheckButtonItemWindow*>(pToolBox->GetItemWindow(id));
if (pItemWin)
- bSearchFormatted = pItemWin->IsChecked();
+ bSearchFormatted = pItemWin->get_active();
}
}
}
@@ -970,14 +969,14 @@ public:
virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
private:
- VclPtr<CheckBox> m_pSearchFormattedControl;
+ VclPtr<CheckButtonItemWindow> m_xSearchFormattedControl;
};
SearchFormattedToolboxController::SearchFormattedToolboxController( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
: svt::ToolboxController( rxContext,
css::uno::Reference< css::frame::XFrame >(),
COMMAND_SEARCHFORMATTED )
- , m_pSearchFormattedControl(nullptr)
+ , m_xSearchFormattedControl(nullptr)
{
}
@@ -1026,7 +1025,7 @@ void SAL_CALL SearchFormattedToolboxController::dispose()
svt::ToolboxController::dispose();
- m_pSearchFormattedControl.disposeAndClear();
+ m_xSearchFormattedControl.disposeAndClear();
}
// XInitialization
@@ -1045,12 +1044,11 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL SearchFormattedToolboxControll
if ( pParent )
{
ToolBox* pToolbar = static_cast<ToolBox*>(pParent.get());
- m_pSearchFormattedControl = VclPtr<CheckBox>::Create( pToolbar, 0 );
- m_pSearchFormattedControl->SetText( SvxResId( RID_SVXSTR_FINDBAR_SEARCHFORMATTED ) );
- Size aSize( m_pSearchFormattedControl->GetOptimalSize() );
- m_pSearchFormattedControl->SetSizePixel( aSize );
+ m_xSearchFormattedControl = VclPtr<CheckButtonItemWindow>::Create(pToolbar);
+ m_xSearchFormattedControl->set_label(SvxResId(RID_SVXSTR_FINDBAR_SEARCHFORMATTED));
+ m_xSearchFormattedControl->SetOptimalSize();
}
- xItemWindow = VCLUnoHelper::GetInterface( m_pSearchFormattedControl );
+ xItemWindow = VCLUnoHelper::GetInterface(m_xSearchFormattedControl);
return xItemWindow;
}