diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-12 15:42:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-12 16:47:59 +0100 |
commit | 8ad3d846a46a2780e1759f58334b04ce2286ff00 (patch) | |
tree | 9bb7f29eb49ad96521fa9bc85d8c1acef6860839 /include/svtools/ctrlbox.hxx | |
parent | 46846b7c48c0d408d66ffecea1dbd9ba8e77ff9e (diff) |
XubString->OUString
Change-Id: I07f4db038114174a65ed453096d566d699e8fce8
Diffstat (limited to 'include/svtools/ctrlbox.hxx')
-rw-r--r-- | include/svtools/ctrlbox.hxx | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index c83a94eb6425..bbef331ad6cd 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -199,10 +199,19 @@ public: XubString GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const { return ListBox::GetSelectEntry( nSelIndex ); } Color GetSelectEntryColor( sal_uInt16 nSelIndex = 0 ) const; - sal_Bool IsEntrySelected( const XubString& rStr ) const - { return ListBox::IsEntrySelected( rStr ); } - - sal_Bool IsEntrySelected( const Color& rColor ) const; + bool IsEntrySelected(const OUString& rStr ) const + { + return ListBox::IsEntrySelected(rStr); + } + + bool IsEntrySelected(const Color& rColor) const + { + sal_uInt16 nPos = GetEntryPos( rColor ); + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + return IsEntryPosSelected( nPos ); + else + return sal_False; + } private: // declared as private because some compilers would generate the default functions @@ -220,15 +229,6 @@ inline void ColorListBox::SelectEntry( const Color& rColor, sal_Bool bSelect ) ListBox::SelectEntryPos( nPos, bSelect ); } -inline sal_Bool ColorListBox::IsEntrySelected( const Color& rColor ) const -{ - sal_uInt16 nPos = GetEntryPos( rColor ); - if ( nPos != LISTBOX_ENTRY_NOTFOUND ) - return IsEntryPosSelected( nPos ); - else - return sal_False; -} - inline Color ColorListBox::GetSelectEntryColor( sal_uInt16 nSelIndex ) const { sal_uInt16 nPos = GetSelectEntryPos( nSelIndex ); @@ -348,8 +348,18 @@ public: void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); } void SelectEntry( sal_uInt16 nStyle = STYLE_SOLID, sal_Bool bSelect = sal_True ); sal_uInt16 GetSelectEntryStyle( sal_uInt16 nSelIndex = 0 ) const; - inline sal_Bool IsEntrySelected( const XubString& rStr ) const { return ListBox::IsEntrySelected( rStr ); } - sal_Bool IsEntrySelected( sal_uInt16 nStyle1 = STYLE_SOLID ) const; + bool IsEntrySelected(const OUString& rStr) const + { + return ListBox::IsEntrySelected(rStr); + } + bool IsEntrySelected(sal_uInt16 nStyle = STYLE_SOLID) const + { + sal_uInt16 nPos = GetEntryPos( nStyle ); + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + return IsEntryPosSelected( nPos ); + else + return sal_False; + } inline void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; } inline FieldUnit GetUnit() const { return eUnit; } @@ -374,15 +384,6 @@ private: void* GetEntryData( sal_uInt16 nPos ) const; }; -inline sal_Bool LineListBox::IsEntrySelected( sal_uInt16 nStyle ) const -{ - sal_uInt16 nPos = GetEntryPos( nStyle ); - if ( nPos != LISTBOX_ENTRY_NOTFOUND ) - return IsEntryPosSelected( nPos ); - else - return sal_False; -} - inline void LineListBox::SetColor( const Color& rColor ) { aColor = rColor; |