summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-04 21:30:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-05 13:59:05 +0100
commit5688b51bcb23b12b335dadf4430b7b7c4407cbfb (patch)
treeb2c358d422775d0d9d312cca653c9e4e7b989ed2 /starmath
parentdd20a8c6e2ebeceff90567597d712e4c03c2ac7d (diff)
UniString::CreateFromInt32 -> rtl::OUString::valueOf
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/cfgitem.cxx20
-rw-r--r--starmath/source/cfgitem.hxx2
2 files changed, 8 insertions, 14 deletions
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; }