summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-08-21 15:07:31 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-08-21 15:10:35 +0200
commit64b993e046f23baaacaff1572b7d2a816588b5ef (patch)
tree237dce36a1d4787d168a0520839f6aab22500487 /unotools
parent75f41baab6ce75786a91fe461835ee16a23ec18e (diff)
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 'unotools')
-rw-r--r--unotools/source/config/configitem.cxx2
-rw-r--r--unotools/source/config/dynamicmenuoptions.cxx2
-rw-r--r--unotools/source/config/historyoptions.cxx24
-rw-r--r--unotools/source/config/xmlaccelcfg.cxx4
-rw-r--r--unotools/source/misc/fontcvt.cxx4
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx2
6 files changed, 19 insertions, 19 deletions
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index 3403140c7bbb..d82af6781f57 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -1111,7 +1111,7 @@ sal_Bool ConfigItem::getUniqueSetElementName( const OUString& _rSetNode, OUStrin
for (; 1 != nFieldElement; nFieldElement = (nFieldElement * nEngendering) % nPrime)
{
OUString sThisRoundTrial = _rName;
- sThisRoundTrial += OUString::valueOf((sal_Int32)nFieldElement);
+ sThisRoundTrial += OUString::number(nFieldElement);
if (!xSetNode->hasByName(sThisRoundTrial))
{
diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx
index acd93acaf800..8677c39cf257 100644
--- a/unotools/source/config/dynamicmenuoptions.cxx
+++ b/unotools/source/config/dynamicmenuoptions.cxx
@@ -120,7 +120,7 @@ class SvtDynMenu
)
{
rEntry.sName = PATHPREFIX_USER;
- rEntry.sName += OUString::valueOf( (sal_Int32)impl_getNextUserEntryNr() );
+ rEntry.sName += OUString::number( impl_getNextUserEntryNr() );
lUserEntries.push_back( rEntry );
}
}
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index 5fc3b2a49ddc..e552d8118407 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -241,7 +241,7 @@ void SvtHistoryOptions_Impl::impl_truncateList ( EHistoryType eHistory, sal_uInt
for (sal_uInt32 i=nLength-1; i>=nSize; --i)
{
OUString sTmp;
- const OUString sRemove = OUString::valueOf((sal_Int32)i);
+ const OUString sRemove = OUString::number(i);
xOrderList->getByName(sRemove) >>= xSet;
xSet->getPropertyValue(OUString(s_sHistoryItemRef)) >>= sTmp;
xItemList->removeByName(sTmp);
@@ -379,7 +379,7 @@ Sequence< Sequence< PropertyValue > > SvtHistoryOptions_Impl::GetList( EHistoryT
try
{
OUString sUrl;
- xOrderList->getByName(OUString::valueOf(nItem)) >>= xSet;
+ xOrderList->getByName(OUString::number(nItem)) >>= xSet;
xSet->getPropertyValue(OUString(s_sHistoryItemRef)) >>= sUrl;
xItemList->getByName(sUrl) >>= xSet;
@@ -473,26 +473,26 @@ void SvtHistoryOptions_Impl::AppendItem( EHistoryType eHistory ,
for (sal_Int32 i=0; i<nLength; ++i)
{
OUString sTmp;
- xOrderList->getByName(OUString::valueOf(i)) >>= xSet;
+ xOrderList->getByName(OUString::number(i)) >>= xSet;
xSet->getPropertyValue(sHistoryItemRef) >>= sTmp;
if(sURL == sTmp)
{
OUString sFind;
- xOrderList->getByName( OUString::valueOf(i) ) >>= xSet;
+ xOrderList->getByName( OUString::number(i) ) >>= xSet;
xSet->getPropertyValue(sHistoryItemRef) >>= sFind;
for (sal_Int32 j=i-1; j>=0; --j)
{
css::uno::Reference< css::beans::XPropertySet > xPrevSet;
css::uno::Reference< css::beans::XPropertySet > xNextSet;
- xOrderList->getByName( OUString::valueOf(j+1) ) >>= xPrevSet;
- xOrderList->getByName( OUString::valueOf(j) ) >>= xNextSet;
+ xOrderList->getByName( OUString::number(j+1) ) >>= xPrevSet;
+ xOrderList->getByName( OUString::number(j) ) >>= xNextSet;
OUString sTemp;
xNextSet->getPropertyValue(sHistoryItemRef) >>= sTemp;
xPrevSet->setPropertyValue(sHistoryItemRef, css::uno::makeAny(sTemp));
}
- xOrderList->getByName( OUString::valueOf((sal_Int32)0) ) >>= xSet;
+ xOrderList->getByName( OUString::number(0) ) >>= xSet;
xSet->setPropertyValue(sHistoryItemRef, css::uno::makeAny(sFind));
::comphelper::ConfigurationHelper::flush(m_xCfg);
@@ -513,7 +513,7 @@ void SvtHistoryOptions_Impl::AppendItem( EHistoryType eHistory ,
if ( nLength == nMaxSize )
{
OUString sRemove;
- xOrderList->getByName(OUString::valueOf(nLength-1)) >>= xSet;
+ xOrderList->getByName(OUString::number(nLength-1)) >>= xSet;
xSet->getPropertyValue(sHistoryItemRef) >>= sRemove;
try
{
@@ -537,18 +537,18 @@ void SvtHistoryOptions_Impl::AppendItem( EHistoryType eHistory ,
{
xFac = css::uno::Reference< css::lang::XSingleServiceFactory >(xOrderList, css::uno::UNO_QUERY);
xInst = xFac->createInstance();
- OUString sPush = OUString::valueOf(nLength++);
+ OUString sPush = OUString::number(nLength++);
xOrderList->insertByName(sPush, css::uno::makeAny(xInst));
}
for (sal_Int32 j=nLength-1; j>0; --j)
{
- xOrderList->getByName( OUString::valueOf(j) ) >>= xPrevSet;
- xOrderList->getByName( OUString::valueOf(j-1) ) >>= xNextSet;
+ xOrderList->getByName( OUString::number(j) ) >>= xPrevSet;
+ xOrderList->getByName( OUString::number(j-1) ) >>= xNextSet;
OUString sTemp;
xNextSet->getPropertyValue(sHistoryItemRef) >>= sTemp;
xPrevSet->setPropertyValue(sHistoryItemRef, css::uno::makeAny(sTemp));
}
- xOrderList->getByName( OUString::valueOf((sal_Int32)0) ) >>= xSet;
+ xOrderList->getByName( OUString::number(0) ) >>= xSet;
xSet->setPropertyValue(sHistoryItemRef, css::uno::makeAny(sURL));
// Append the item to ItemList.
diff --git a/unotools/source/config/xmlaccelcfg.cxx b/unotools/source/config/xmlaccelcfg.cxx
index 4c5fd9422098..c0143d4f0a24 100644
--- a/unotools/source/config/xmlaccelcfg.cxx
+++ b/unotools/source/config/xmlaccelcfg.cxx
@@ -375,12 +375,12 @@ void OWriteAccelatorDocumentHandler::WriteAcceleratorItem(
pAcceleratorAttributes->addAttribute(
OUString( ATTRIBUTE_KEYCODE ),
m_aAttributeType,
- OUString::valueOf( aAcceleratorItem.nCode ));
+ OUString( aAcceleratorItem.nCode ));
pAcceleratorAttributes->addAttribute(
OUString( ATTRIBUTE_MODIFIER ),
m_aAttributeType,
- OUString::valueOf( aAcceleratorItem.nModifier ));
+ OUString( aAcceleratorItem.nModifier ));
pAcceleratorAttributes->addAttribute(
OUString( ATTRIBUTE_URL ),
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index f1156cbe16e2..516a05a48baa 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1362,8 +1362,8 @@ sal_Unicode ConvertChar::RecodeChar( sal_Unicode cChar ) const
{
cRetVal = 0xE12C;
SAL_WARN( "unotools.misc", "Forcing a bullet substition from 0x" <<
- OString::valueOf((sal_Int32)cChar, 16) << " to 0x" <<
- OString::valueOf((sal_Int32)cRetVal, 16));
+ OString::number(cChar, 16) << " to 0x" <<
+ OString::number(cRetVal, 16));
}
}
}
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index bbfe67f9254d..13128b6880bd 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -193,7 +193,7 @@ void CreateTempName_Impl( OUString& rName, bool bKeep, bool bDir = true )
{
u %= nMax;
OUString aTmp( aName );
- aTmp += OUString::valueOf(static_cast<sal_Int64>(u), nRadix);
+ aTmp += OUString::number(u, nRadix);
aTmp += ".tmp" ;
if ( bDir )