diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-08-21 15:07:31 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-08-21 15:10:35 +0200 |
commit | 64b993e046f23baaacaff1572b7d2a816588b5ef (patch) | |
tree | 237dce36a1d4787d168a0520839f6aab22500487 /cui/source | |
parent | warn when rewriter should modify something involving a macro (diff) | |
download | core-64b993e046f23baaacaff1572b7d2a816588b5ef.tar.gz core-64b993e046f23baaacaff1572b7d2a816588b5ef.zip |
finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.
Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/customize/cfg.cxx | 12 | ||||
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 2 | ||||
-rw-r--r-- | cui/source/customize/selector.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optaboutconfig.cxx | 6 | ||||
-rw-r--r-- | cui/source/options/webconninfo.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/page.cxx | 2 |
10 files changed, 21 insertions, 21 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 7e1d9a36defb..6277eaf82fba 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -231,8 +231,8 @@ OUString replaceSixteen( const OUString& str, sal_Int32 nReplacement ) { OUString result( str ); - OUString sixteen = OUString::valueOf( (sal_Int32)16 ); - OUString expected = OUString::valueOf( nReplacement ); + OUString sixteen = OUString::number( 16 ); + OUString expected = OUString::number( nReplacement ); sal_Int32 len = sixteen.getLength(); sal_Int32 index = result.indexOf( sixteen ); @@ -261,12 +261,12 @@ generateCustomName( if ( pos != -1 ) { name = prefix.replaceAt( - pos, placeholder.getLength(), OUString::valueOf( suffix ) ); + pos, placeholder.getLength(), OUString::number( suffix ) ); } else { // no placeholder found so just append the suffix - name = prefix + OUString::valueOf( suffix ); + name = prefix + OUString::number( suffix ); } // now check is there is an already existing entry with this name @@ -307,7 +307,7 @@ generateCustomURL( url += OUString(CUSTOM_TOOLBAR_STR ); // use a random number to minimize possible clash with existing custom toolbars - url += OUString::valueOf( sal_Int64( generateRandomValue() ), 16 ); + url += OUString::number( generateRandomValue(), 16 ); // now check is there is an already existing entry with this url SvxEntries::const_iterator iter = entries->begin(); @@ -339,7 +339,7 @@ generateCustomMenuURL( sal_Int32 suffix = 1 ) { OUString url(CUSTOM_MENU_STR ); - url += OUString::valueOf( suffix ); + url += OUString::number( suffix ); // now check is there is an already existing entry with this url SvxEntries::const_iterator iter = entries->begin(); diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index d5249ddb2e88..28b3ee4ae9a9 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -451,7 +451,7 @@ void SfxConfigGroupListBox_Impl::InitModule() for (i1=0; i1<c1; ++i1) { sal_Int16& rGroupID = lGroups[i1]; - OUString sGroupID = OUString::valueOf((sal_Int32)rGroupID); + OUString sGroupID = OUString::number(rGroupID); OUString sGroupName ; try diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 98e8a38e8582..0d9a5327253b 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -459,7 +459,7 @@ void SvxConfigGroupListBox::Init(bool bShowSlots, const Reference< frame::XFrame } sal_Int32 gid = gids[i]; - OUString idx = OUString::valueOf( gid ); + OUString idx = OUString::number( gid ); OUString group = idx; try { diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index b0a73ef88736..f6b26ff5bc3f 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -1329,7 +1329,7 @@ OUString GetErrorMessage( } if ( eScriptError.lineNum != -1 ) { - line = OUString::valueOf( eScriptError.lineNum ); + line = OUString::number( eScriptError.lineNum ); unformatted = CUI_RES( RID_SVXSTR_ERROR_AT_LINE ); } else @@ -1369,7 +1369,7 @@ OUString GetErrorMessage( if ( eScriptException.lineNum != -1 ) { - line = OUString::valueOf( eScriptException.lineNum ); + line = OUString::number( eScriptException.lineNum ); unformatted = CUI_RES( RID_SVXSTR_EXCEPTION_AT_LINE ); } else diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 2e9c67069e82..9084b8dc03bb 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -202,7 +202,7 @@ void CuiAboutConfigTabPage::FillItems( Reference< XNameAccess >xNameAccess, OUSt sal_Int32 nVal = 0; if(aProp >>= nVal) { - OUString aNumber( OUString::valueOf( nVal ) ); + OUString aNumber( OUString::number( nVal ) ); sValue = aNumber; } } @@ -213,7 +213,7 @@ void CuiAboutConfigTabPage::FillItems( Reference< XNameAccess >xNameAccess, OUSt sal_Bool bVal = sal_False; if(aProp >>= bVal ) { - OUString sBoolean( OUString::valueOf( bVal ) ); + OUString sBoolean( OUString::boolean( bVal ) ); sValue = sBoolean; } } @@ -242,7 +242,7 @@ void CuiAboutConfigTabPage::FillItems( Reference< XNameAccess >xNameAccess, OUSt { for(sal_Int16 nInd=0; nInd < seqLong.getLength(); ++nInd) { - OUString sNumber( OUString::valueOf(seqLong[nInd]) ); + OUString sNumber( OUString::number(seqLong[nInd]) ); sValue += sNumber; sValue += OUString(","); } diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index 7ba03b9d3f14..189ead276ab0 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -173,7 +173,7 @@ void WebConnectionInfoDialog::FillPasswordList() for ( sal_Int32 nUserInd = 0; nUserInd < aURLEntries[nURLInd].UserList.getLength(); nUserInd++ ) { OUString aUIEntry( aURLEntries[nURLInd].Url ); - aUIEntry += OUString::valueOf( (sal_Unicode)'\t' ); + aUIEntry += OUString( (sal_Unicode)'\t' ); aUIEntry += aURLEntries[nURLInd].UserList[nUserInd].UserName; SvTreeListEntry* pEntry = m_pPasswordsLB->InsertEntry( aUIEntry ); pEntry->SetUserData( (void*)(sal_IntPtr)(nCount++) ); @@ -189,7 +189,7 @@ void WebConnectionInfoDialog::FillPasswordList() for ( sal_Int32 nURLIdx = 0; nURLIdx < aUrls.getLength(); nURLIdx++ ) { OUString aUIEntry( aUrls[ nURLIdx ] ); - aUIEntry += OUString::valueOf( (sal_Unicode)'\t' ); + aUIEntry += OUString( (sal_Unicode)'\t' ); aUIEntry += OUString( "*" ); SvTreeListEntry* pEntry = m_pPasswordsLB->InsertEntry( aUIEntry ); pEntry->SetUserData( (void*)(sal_IntPtr)(nCount++) ); diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index fdf5e77393c2..0f635d64b02c 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -677,10 +677,10 @@ void SvxGrfCropPage::GraphicHasChanged( sal_Bool bFound ) ((float)aOrigSize.Height()/TWIP_TO_INCH)+0.5)); sTemp += " "; sTemp += CUI_RESSTR( STR_PPI ); - OUString sPPI = OUString::valueOf(ax); + OUString sPPI = OUString::number(ax); if (abs(ax - ay) > 1) { sPPI += OUString( sal_Unicode (0x00D7) ); - sPPI += OUString::valueOf(ay); + sPPI += OUString::number(ay); } sTemp = sTemp.replaceAll("%1", sPPI); } diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index a952c896474c..f0893481d80b 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -144,7 +144,7 @@ void SvxNumberPreview::Paint( const Rectangle& ) if ( mnPos != STRING_NOTFOUND ) { - long nCharWidth = GetTextWidth( OUString::valueOf( mnChar ) ); + long nCharWidth = GetTextWidth( OUString( mnChar ) ); int nNumCharsToInsert = 0; if (nCharWidth > 0) nNumCharsToInsert = nLeadSpace / nCharWidth; diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 24dfe30cd7dd..54126259163a 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1244,7 +1244,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) if(pSaveNum->GetLevelCount() > 1) { OUString sEntry( "1 - " ); - sEntry += OUString::valueOf( static_cast<sal_Int32>(pSaveNum->GetLevelCount()) ); + sEntry += OUString::number( pSaveNum->GetLevelCount() ); m_pLevelLB->InsertEntry(sEntry); m_pLevelLB->SelectEntry(sEntry); } @@ -2996,7 +2996,7 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) if(pSaveNum->GetLevelCount() > 1) { OUString sEntry( "1 - " ); - sEntry += OUString::valueOf( static_cast<sal_Int32>(pSaveNum->GetLevelCount()) ); + sEntry += OUString::number( pSaveNum->GetLevelCount() ); m_pLevelLB->InsertEntry(sEntry); m_pLevelLB->SelectEntry(sEntry); } diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 2ca7a95ea493..e1a387dcbe66 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -935,7 +935,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl) { aName = aPaperBin; aName.Append( sal_Unicode(' ') ); - aName.Append( OUString::valueOf( static_cast<sal_Int32>(i+1) ) ); + aName.Append( OUString::number( i+1 ) ); } nEntryPos = m_pPaperTrayBox->InsertEntry( aName ); m_pPaperTrayBox->SetEntryData( nEntryPos, (void*)(sal_uLong)i ); |