diff options
Diffstat (limited to 'svx/source/tbxctrls/tbunosearchcontrollers.cxx')
-rw-r--r-- | svx/source/tbxctrls/tbunosearchcontrollers.cxx | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index acbb95e26b30..3ea241ddf0ba 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -81,24 +81,16 @@ FindTextFieldControl::FindTextFieldControl( Window* pParent, WinBits nStyle, css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager) : ComboBox( pParent, nStyle ), m_xFrame(xFrame), - m_xServiceManager(xServiceManager), - m_bToClearTextField(sal_True) + m_xServiceManager(xServiceManager) { - InitControls_Impl(); + SetPlaceholderText(SVX_RESSTR(RID_SVXSTR_FINDBAR_FIND)); + EnableAutocomplete(sal_True, sal_True); } FindTextFieldControl::~FindTextFieldControl() { } -void FindTextFieldControl::InitControls_Impl() -{ - SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_FIND ) ); - SetControlForeground(GetSettings().GetStyleSettings().GetDisableColor()); - - EnableAutocomplete(sal_True, sal_True); -} - void FindTextFieldControl::Remember_Impl(const String& rStr) { sal_uInt16 nCount = GetEntryCount(); @@ -137,17 +129,9 @@ void FindTextFieldControl::SetTextToSelected_Impl() if ( aString.getLength() != 0 ) { SetText( aString ); - m_bToClearTextField = sal_False; } } -void FindTextFieldControl::Modify() -{ - ComboBox::Modify(); - - SetControlForeground( GetSettings().GetStyleSettings().GetWindowTextColor() ); -} - long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) { long nRet= ComboBox::PreNotify( rNEvt ); @@ -208,22 +192,8 @@ long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) } case EVENT_GETFOCUS: - if ( m_bToClearTextField ) - { - SetText( OUString() ); - m_bToClearTextField = sal_False; - } SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); break; - - case EVENT_LOSEFOCUS: - if ( GetText().Len() == 0 ) - { - SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_FIND ) ); - SetControlForeground(GetSettings().GetStyleSettings().GetDisableColor()); - m_bToClearTextField = sal_True; - } - break; } return nRet; |