loplugin:mergeclasses
Change-Id: I01810a8db024e207783fc09b88bd932bca8ed103
This commit is contained in:
@@ -163,7 +163,6 @@ merge dbp::OModuleResourceClient with dbp::OUnoAutoPilot
|
||||
merge dbtools::ISQLStatementHelper with connectivity::mysql::OTables
|
||||
merge formula::ExternalReferenceHelper with ScExternalRefManager
|
||||
merge formula::IStructHelper with formula::StructPage
|
||||
merge framework::IComboBoxListener with framework::ComboboxToolbarController
|
||||
merge framework::IEditListener with framework::EditToolbarController
|
||||
merge framework::ILayoutNotifications with framework::LayoutManager
|
||||
merge framework::IListBoxListener with framework::DropdownToolbarController
|
||||
|
@@ -33,23 +33,7 @@ namespace framework
|
||||
|
||||
class ComboBoxControl;
|
||||
|
||||
class IComboBoxListener
|
||||
{
|
||||
public:
|
||||
virtual void Select() = 0;
|
||||
virtual void DoubleClick() = 0;
|
||||
virtual void Modify() = 0;
|
||||
virtual void KeyInput( const KeyEvent& rKEvt ) = 0;
|
||||
virtual void GetFocus() = 0;
|
||||
virtual void LoseFocus() = 0;
|
||||
virtual bool PreNotify( NotifyEvent& rNEvt ) = 0;
|
||||
|
||||
protected:
|
||||
~IComboBoxListener() {}
|
||||
};
|
||||
|
||||
class ComboboxToolbarController : public IComboBoxListener,
|
||||
public ComplexToolbarController
|
||||
class ComboboxToolbarController : public ComplexToolbarController
|
||||
|
||||
{
|
||||
public:
|
||||
@@ -64,14 +48,14 @@ class ComboboxToolbarController : public IComboBoxListener,
|
||||
// XComponent
|
||||
virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
||||
|
||||
// IComboBoxListener
|
||||
virtual void Select() SAL_OVERRIDE;
|
||||
virtual void DoubleClick() SAL_OVERRIDE;
|
||||
virtual void Modify() SAL_OVERRIDE;
|
||||
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
|
||||
virtual void GetFocus() SAL_OVERRIDE;
|
||||
virtual void LoseFocus() SAL_OVERRIDE;
|
||||
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
|
||||
// called from ComboBoxControl
|
||||
void Select();
|
||||
void DoubleClick();
|
||||
void Modify();
|
||||
void KeyInput( const KeyEvent& rKEvt );
|
||||
void GetFocus();
|
||||
void LoseFocus();
|
||||
bool PreNotify( NotifyEvent& rNEvt );
|
||||
|
||||
protected:
|
||||
virtual void executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand ) SAL_OVERRIDE;
|
||||
|
@@ -63,7 +63,7 @@ class DropdownToolbarController : public IListBoxListener,
|
||||
// XComponent
|
||||
virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
||||
|
||||
// IComboBoxListener
|
||||
// IListBoxListener
|
||||
virtual void Select() SAL_OVERRIDE;
|
||||
virtual void DoubleClick() SAL_OVERRIDE;
|
||||
virtual void GetFocus() SAL_OVERRIDE;
|
||||
|
@@ -47,13 +47,13 @@ namespace framework
|
||||
{
|
||||
|
||||
// Wrapper class to notify controller about events from combobox.
|
||||
// Unfortunaltly the events are notifed through virtual methods instead
|
||||
// Unfortunately the events are notified through virtual methods instead
|
||||
// of Listeners.
|
||||
|
||||
class ComboBoxControl : public ComboBox
|
||||
{
|
||||
public:
|
||||
ComboBoxControl( vcl::Window* pParent, WinBits nStyle, IComboBoxListener* pComboBoxListener );
|
||||
ComboBoxControl( vcl::Window* pParent, WinBits nStyle, ComboboxToolbarController* pComboboxToolbarController );
|
||||
virtual ~ComboBoxControl();
|
||||
virtual void dispose() SAL_OVERRIDE;
|
||||
|
||||
@@ -66,12 +66,12 @@ class ComboBoxControl : public ComboBox
|
||||
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
|
||||
|
||||
private:
|
||||
IComboBoxListener* m_pComboBoxListener;
|
||||
ComboboxToolbarController* m_pComboboxToolbarController;
|
||||
};
|
||||
|
||||
ComboBoxControl::ComboBoxControl( vcl::Window* pParent, WinBits nStyle, IComboBoxListener* pComboBoxListener ) :
|
||||
ComboBoxControl::ComboBoxControl( vcl::Window* pParent, WinBits nStyle, ComboboxToolbarController* pComboboxToolbarController ) :
|
||||
ComboBox( pParent, nStyle )
|
||||
, m_pComboBoxListener( pComboBoxListener )
|
||||
, m_pComboboxToolbarController( pComboboxToolbarController )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -82,57 +82,57 @@ ComboBoxControl::~ComboBoxControl()
|
||||
|
||||
void ComboBoxControl::dispose()
|
||||
{
|
||||
m_pComboBoxListener = 0;
|
||||
m_pComboboxToolbarController = 0;
|
||||
ComboBox::dispose();
|
||||
}
|
||||
|
||||
void ComboBoxControl::Select()
|
||||
{
|
||||
ComboBox::Select();
|
||||
if ( m_pComboBoxListener )
|
||||
m_pComboBoxListener->Select();
|
||||
if ( m_pComboboxToolbarController )
|
||||
m_pComboboxToolbarController->Select();
|
||||
}
|
||||
|
||||
void ComboBoxControl::DoubleClick()
|
||||
{
|
||||
ComboBox::DoubleClick();
|
||||
if ( m_pComboBoxListener )
|
||||
m_pComboBoxListener->DoubleClick();
|
||||
if ( m_pComboboxToolbarController )
|
||||
m_pComboboxToolbarController->DoubleClick();
|
||||
}
|
||||
|
||||
void ComboBoxControl::Modify()
|
||||
{
|
||||
ComboBox::Modify();
|
||||
if ( m_pComboBoxListener )
|
||||
m_pComboBoxListener->Modify();
|
||||
if ( m_pComboboxToolbarController )
|
||||
m_pComboboxToolbarController->Modify();
|
||||
}
|
||||
|
||||
void ComboBoxControl::KeyInput( const ::KeyEvent& rKEvt )
|
||||
{
|
||||
ComboBox::KeyInput( rKEvt );
|
||||
if ( m_pComboBoxListener )
|
||||
m_pComboBoxListener->KeyInput( rKEvt );
|
||||
if ( m_pComboboxToolbarController )
|
||||
m_pComboboxToolbarController->KeyInput( rKEvt );
|
||||
}
|
||||
|
||||
void ComboBoxControl::GetFocus()
|
||||
{
|
||||
ComboBox::GetFocus();
|
||||
if ( m_pComboBoxListener )
|
||||
m_pComboBoxListener->GetFocus();
|
||||
if ( m_pComboboxToolbarController )
|
||||
m_pComboboxToolbarController->GetFocus();
|
||||
}
|
||||
|
||||
void ComboBoxControl::LoseFocus()
|
||||
{
|
||||
ComboBox::LoseFocus();
|
||||
if ( m_pComboBoxListener )
|
||||
m_pComboBoxListener->LoseFocus();
|
||||
if ( m_pComboboxToolbarController )
|
||||
m_pComboboxToolbarController->LoseFocus();
|
||||
}
|
||||
|
||||
bool ComboBoxControl::PreNotify( NotifyEvent& rNEvt )
|
||||
{
|
||||
bool bRet = false;
|
||||
if ( m_pComboBoxListener )
|
||||
bRet = m_pComboBoxListener->PreNotify( rNEvt );
|
||||
if ( m_pComboboxToolbarController )
|
||||
bRet = m_pComboboxToolbarController->PreNotify( rNEvt );
|
||||
if ( !bRet )
|
||||
bRet = ComboBox::PreNotify( rNEvt );
|
||||
|
||||
|
Reference in New Issue
Block a user