From 63bcb139b941a2eff1b5ad367046bca067e7d1f8 Mon Sep 17 00:00:00 2001 From: Jean-Noël Rouvignac Date: Sun, 20 Jan 2013 13:55:09 +0100 Subject: Replaced O[U]String::valueOf( static_cast<> ) with O[U]String::number() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2f11f2f15a652a9edc3c7e5b67c854debeed20de Reviewed-on: https://gerrit.libreoffice.org/1784 Reviewed-by: Luboš Luňák Tested-by: Luboš Luňák --- cui/source/tabpages/chardlg.cxx | 15 ++++++--------- cui/source/tabpages/numfmt.cxx | 8 ++++---- cui/source/tabpages/numpages.cxx | 4 ++-- cui/source/tabpages/tpcolor.cxx | 2 +- 4 files changed, 13 insertions(+), 16 deletions(-) (limited to 'cui') diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 123079ba5cde..9d444d45a3a2 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -3256,15 +3256,12 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) void SvxCharPositionPage::FillUserData() { - const sal_Unicode cTok = ';'; - - OUString sUser( OUString::valueOf( static_cast(m_nSuperEsc)) ); - sUser += OUString( cTok ); - sUser += OUString::valueOf( static_cast(m_nSubEsc) ); - sUser += OUString (cTok ); - sUser += OUString::valueOf( static_cast(m_nSuperProp) ); - sUser += OUString ( cTok ); - sUser += OUString::valueOf( static_cast(m_nSubProp) ); + const OUString cTok( ";" ); + + OUString sUser = OUString::number( m_nSuperEsc ) + cTok + + OUString::number( m_nSubEsc ) + cTok + + OUString::number( m_nSuperProp ) + cTok + + OUString::number( m_nSubProp ); SetUserData( sUser ); } diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 03dcc8d298e4..4dad881a70d3 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -972,8 +972,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sa m_pEdLeadZeroes->Enable(); m_pBtnNegRed->Enable(); m_pBtnThousand->Enable(); - m_pEdDecimals->SetText( OUString::valueOf( static_cast(nDecimals) ) ); - m_pEdLeadZeroes->SetText( OUString::valueOf( static_cast(nZeroes) ) ); + m_pEdDecimals->SetText( OUString::number( nDecimals ) ); + m_pEdLeadZeroes->SetText( OUString::number( nZeroes ) ); m_pBtnNegRed->Check( bNegRed ); m_pBtnThousand->Check( bThousand ); break; @@ -994,8 +994,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sa m_pEdLeadZeroes->Disable(); m_pBtnNegRed->Disable(); m_pBtnThousand->Disable(); - m_pEdDecimals->SetText( OUString::valueOf( static_cast(0) ) ); - m_pEdLeadZeroes->SetText( OUString::valueOf( static_cast(0) ) ); + m_pEdDecimals->SetText( OUString::number( 0 ) ); + m_pEdLeadZeroes->SetText( OUString::number( 0 ) ); m_pBtnNegRed->Check( sal_False ); m_pBtnThousand->Check( sal_False ); } diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index b7bd0723d7ab..8e9fc4a6400b 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1266,7 +1266,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) if(!m_pLevelLB->GetEntryCount()) { for(sal_uInt16 i = 1; i <= pSaveNum->GetLevelCount(); i++) - m_pLevelLB->InsertEntry( OUString::valueOf(static_cast(i))); + m_pLevelLB->InsertEntry( OUString::number(i)); if(pSaveNum->GetLevelCount() > 1) { OUString sEntry( "1 - " ); @@ -3018,7 +3018,7 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) if(!m_pLevelLB->GetEntryCount()) { for(sal_uInt16 i = 1; i <= pSaveNum->GetLevelCount(); i++) - m_pLevelLB->InsertEntry( OUString::valueOf(static_cast(i)) ); + m_pLevelLB->InsertEntry( OUString::number(i) ); if(pSaveNum->GetLevelCount() > 1) { OUString sEntry( "1 - " ); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 9f4f98d37885..896899728b9b 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -1223,7 +1223,7 @@ sal_uInt16 SvxColorTabPage::PercentToColor_Impl( sal_uInt16 nPercent ) void SvxColorTabPage::FillUserData() { // the color model is saved in the Ini-file - SetUserData( OUString::valueOf( static_cast(eCM) ) ); + SetUserData( OUString::number( eCM ) ); } //------------------------------------------------------------------------ -- cgit v1.2.3