diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index 52aa72e60928..1184c8522afd 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -127,7 +127,7 @@ protected: virtual bool CompareItem(const void *pFirstItem, const void *pSecondItem) const = 0; - virtual String GetStringItem(void *pItem) = 0; + virtual OUString GetStringItem(void *pItem) = 0; void *GetPtr(sal_uInt16 nPos) const { return SfxPtrArr::GetObject(nPos); } void *&GetPtr(sal_uInt16 nPos) { return SfxPtrArr::GetObject(nPos); } @@ -172,7 +172,7 @@ protected: virtual bool CompareItem(const void *pFirstItem, const void *pSecondItem) const; - virtual String GetStringItem(void *pItem); + virtual OUString GetStringItem(void *pItem); public: SmFontPickList() diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 7cef6dec786e..cde1b35a4769 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -156,28 +155,23 @@ bool SmFontPickList::CompareItem(const void *pFirstItem, const void *pSecondItem return false; } -String SmFontPickList::GetStringItem(void *pItem) +OUString SmFontPickList::GetStringItem(void *pItem) { - Font *pFont; - String aString; - const sal_Char *pDelim = ", "; - - pFont = (Font *)pItem; - - aString = pFont->GetName(); + Font *pFont = (Font *)pItem; + OUStringBuffer aString(pFont->GetName()); if (IsItalic( *pFont )) { - aString.AppendAscii( pDelim ); - aString += String(SmResId(RID_FONTITALIC)); + aString.append(", "); + aString.append(SM_RESSTR(RID_FONTITALIC)); } if (IsBold( *pFont )) { - aString.AppendAscii( pDelim ); - aString += String(SmResId(RID_FONTBOLD)); + aString.append(", "); + aString.append(SM_RESSTR(RID_FONTBOLD)); } - return (aString); + return aString.makeStringAndClear(); } void SmFontPickList::Insert(const Font &rFont) @@ -213,7 +207,7 @@ void SmFontPickList::WriteTo(SmFontDialog& rDialog) const IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ ) { sal_uInt16 nPos; - String aString; + OUString aString; nPos = GetSelectEntryPos();