diff options
author | Eike Rathke <erack@redhat.com> | 2014-05-16 22:00:15 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-05-16 22:10:19 +0200 |
commit | 0ab5802eb0e530e930bed6d5dbed1a0317ae323b (patch) | |
tree | e68f4a7ee90792b63b41d2db3c7c4ff91bb2ecc5 /svx/source/dialog | |
parent | 5b2f1b46b129c41890c54513c6d386407db6718a (diff) |
more SvxLanguageBoxBase interfacing
Change-Id: Ife9317d40756099ae4d8ecb84cccea91bd75a14c
Diffstat (limited to 'svx/source/dialog')
-rw-r--r-- | svx/source/dialog/langbox.cxx | 101 |
1 files changed, 97 insertions, 4 deletions
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 41ae5bfe11f7..8d934175c39c 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -459,6 +459,42 @@ sal_Int32 SvxLanguageBoxBase::ImplTypeToPos( LanguageType eType ) const } +void SvxLanguageBoxBase::SetNoSelectionLBB() +{ + ImplSetNoSelection(); +} + +void SvxLanguageBoxBase::HideLBB() +{ + ImplHide(); +} + +void SvxLanguageBoxBase::DisableLBB() +{ + ImplDisable(); +} + +void SvxLanguageBoxBase::SaveValueLBB() +{ + ImplSaveValue(); +} + +sal_Int32 SvxLanguageBoxBase::GetSelectEntryPosLBB( sal_Int32 nSelIndex ) const +{ + return ImplGetSelectEntryPos( nSelIndex); +} + +void* SvxLanguageBoxBase::GetEntryDataLBB( sal_Int32 nPos ) const +{ + return ImplGetEntryData( nPos); +} + +sal_Int32 SvxLanguageBoxBase::GetSavedValueLBB() const +{ + return ImplGetSavedValue(); +} + + SvxLanguageBox::SvxLanguageBox( Window* pParent, WinBits nBits, bool bCheck ) : ListBox( pParent, nBits ) , SvxLanguageBoxBase( bCheck ) @@ -477,6 +513,7 @@ SvxLanguageBox::~SvxLanguageBox() SvxLanguageComboBox::SvxLanguageComboBox( Window* pParent, WinBits nBits, bool bCheck ) : ComboBox( pParent, nBits ) , SvxLanguageBoxBase( bCheck ) + , mnSavedValuePos( COMBOBOX_ENTRY_NOTFOUND ) { // display entries sorted SetStyle( GetStyle() | WB_SORT ); @@ -546,14 +583,14 @@ void SvxLanguageComboBox::ImplSetEntryData( sal_Int32 nPos, void* pData ) } -sal_Int32 SvxLanguageBox::ImplGetSelectEntryPos() const +sal_Int32 SvxLanguageBox::ImplGetSelectEntryPos( sal_Int32 nSelIndex ) const { - return GetSelectEntryPos(); + return GetSelectEntryPos( nSelIndex); } -sal_Int32 SvxLanguageComboBox::ImplGetSelectEntryPos() const +sal_Int32 SvxLanguageComboBox::ImplGetSelectEntryPos( sal_Int32 nSelIndex ) const { - return GetSelectEntryPos(); + return GetSelectEntryPos( nSelIndex); } @@ -601,4 +638,60 @@ sal_Int32 SvxLanguageComboBox::ImplGetEntryCount() const } +void SvxLanguageBox::ImplSetNoSelection() +{ + SetNoSelection(); +} + +void SvxLanguageComboBox::ImplSetNoSelection() +{ + SetNoSelection(); +} + + +void SvxLanguageBox::ImplHide() +{ + Hide(); +} + +void SvxLanguageComboBox::ImplHide() +{ + Hide(); +} + + +void SvxLanguageBox::ImplDisable() +{ + Disable(); +} + +void SvxLanguageComboBox::ImplDisable() +{ + Disable(); +} + + +void SvxLanguageBox::ImplSaveValue() +{ + SaveValue(); +} + +void SvxLanguageComboBox::ImplSaveValue() +{ + // Emulate the ListBox behavior. + mnSavedValuePos = GetSelectEntryPos(); +} + + +sal_Int32 SvxLanguageBox::ImplGetSavedValue() const +{ + return GetSavedValue(); +} + +sal_Int32 SvxLanguageComboBox::ImplGetSavedValue() const +{ + return mnSavedValuePos; +} + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |