From 5688b51bcb23b12b335dadf4430b7b7c4407cbfb Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 4 Apr 2012 21:30:30 +0100 Subject: UniString::CreateFromInt32 -> rtl::OUString::valueOf --- starmath/source/cfgitem.cxx | 20 +++++++------------- starmath/source/cfgitem.hxx | 2 +- 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'starmath') diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 15e71c537ffe..4870c61ead56 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -395,27 +395,21 @@ const String SmFontFormatList::GetFontFormatId( size_t nPos ) const } -const String SmFontFormatList::GetNewFontFormatId() const +const rtl::OUString SmFontFormatList::GetNewFontFormatId() const { // returns first unused FormatId - String aRes; - - String aPrefix( RTL_CONSTASCII_USTRINGPARAM( "Id" ) ); + rtl::OUString aPrefix("Id"); sal_Int32 nCnt = GetCount(); for (sal_Int32 i = 1; i <= nCnt + 1; ++i) { - String aTmpId( aPrefix ); - aTmpId += String::CreateFromInt32( i ); - if (!GetFontFormat( aTmpId )) - { - aRes = aTmpId; - break; - } + rtl::OUString aTmpId = aPrefix + rtl::OUString::valueOf(i); + if (!GetFontFormat(aTmpId)) + return aTmpId; } - OSL_ENSURE( 0 != aRes.Len(), "failed to create new FontFormatId" ); + OSL_ENSURE( !this, "failed to create new FontFormatId" ); - return aRes; + return rtl::OUString(); } ///////////////////////////////////////////////////////////////// diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx index e3fb818d4c4c..2fc98b41755c 100644 --- a/starmath/source/cfgitem.hxx +++ b/starmath/source/cfgitem.hxx @@ -104,7 +104,7 @@ public: const String GetFontFormatId( const SmFontFormat &rFntFmt ) const; const String GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd ); const String GetFontFormatId( size_t nPos ) const; - const String GetNewFontFormatId() const; + const rtl::OUString GetNewFontFormatId() const; size_t GetCount() const { return aEntries.size(); } bool IsModified() const { return bModified; } -- cgit v1.2.3