summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-05-21 17:53:53 +0200
committerEike Rathke <erack@redhat.com>2014-05-21 18:02:09 +0200
commitcf53a5d4938f6f64bd6d3fe70dd9b555c9d30d0f (patch)
treeae56da4bf8cc3af0c8a11c02200f629672ac4343 /svx/source
parent34f0e4f42594adb97bdb64e5f2e8f00801b48e2e (diff)
we have GetEntryPos(), use it
Change-Id: Iebb19951efa81817793a155164862076d1198e6e
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/langbox.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 8d934175c39c..92f5cb6b0b8d 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -448,14 +448,7 @@ bool SvxLanguageBoxBase::IsLanguageSelected( const LanguageType eLangType ) cons
sal_Int32 SvxLanguageBoxBase::ImplTypeToPos( LanguageType eType ) const
{
- sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
- sal_Int32 nCount = ImplGetEntryCount();
-
- for ( sal_Int32 i=0; nPos == LISTBOX_ENTRY_NOTFOUND && i<nCount; i++ )
- if ( eType == LanguageType((sal_uIntPtr)ImplGetEntryData(i)) )
- nPos = i;
-
- return nPos;
+ return ImplGetEntryPos( (void*)(sal_uIntPtr)eType);
}
@@ -627,6 +620,17 @@ bool SvxLanguageComboBox::ImplIsEntryPosSelected( sal_Int32 nPos ) const
}
+sal_Int32 SvxLanguageBox::ImplGetEntryPos( const void* pData ) const
+{
+ return GetEntryPos( pData);
+}
+
+sal_Int32 SvxLanguageComboBox::ImplGetEntryPos( const void* pData ) const
+{
+ return GetEntryPos( pData);
+}
+
+
sal_Int32 SvxLanguageBox::ImplGetEntryCount() const
{
return GetEntryCount();