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 /framework | |
parent | 75f41baab6ce75786a91fe461835ee16a23ec18e (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 'framework')
15 files changed, 46 insertions, 46 deletions
diff --git a/framework/source/accelerators/keymapping.cxx b/framework/source/accelerators/keymapping.cxx index 9e50ff352eae..27d9042c6500 100644 --- a/framework/source/accelerators/keymapping.cxx +++ b/framework/source/accelerators/keymapping.cxx @@ -189,7 +189,7 @@ OUString KeyMapping::mapCodeToIdentifier(sal_uInt16 nCode) return pIt->second; // If we have no well known identifier - use the pure code value! - return OUString::valueOf((sal_Int32)nCode); + return OUString::number(nCode); } //----------------------------------------------- diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index b1095a2fe181..6818e6a2e6df 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -166,7 +166,7 @@ MenuManager::MenuManager( // Set item command for popup menu to enable it for GetImageFromURL const static OUString aSlotString( "slot:" ); aItemCommand = aSlotString; - aItemCommand += OUString::valueOf( (sal_Int32)ITEMID_ADDONLIST ); + aItemCommand += OUString::number( ITEMID_ADDONLIST ); pPopupMenu->SetItemCommand( ITEMID_ADDONLIST, aItemCommand ); AddMenu(pSubMenu,OUString(),nItemId,sal_True,sal_False); @@ -570,7 +570,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu ) } else { - aMenuShortCut = OUString::valueOf((sal_Int32)( i + 1 )); + aMenuShortCut = OUString::number(( i + 1 )); aMenuShortCut += ": "; } @@ -796,7 +796,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu ) { const static OUString aSlotString( "slot:" ); aItemCommand = aSlotString; - aItemCommand += OUString::valueOf( (sal_Int32)pMenuItemHandler->nItemId ); + aItemCommand += OUString::number( pMenuItemHandler->nItemId ); pMenu->SetItemCommand( pMenuItemHandler->nItemId, aItemCommand ); } @@ -946,7 +946,7 @@ sal_uInt16 MenuManager::FillItemCommand(OUString& _rItemCommand, Menu* _pMenu,sa { const static OUString aSlotString( "slot:" ); _rItemCommand = aSlotString; - _rItemCommand += OUString::valueOf( (sal_Int32)nItemId ); + _rItemCommand += OUString::number( nItemId ); _pMenu->SetItemCommand( nItemId, _rItemCommand ); } return nItemId; diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 7141a72ae59a..2a503b03eed8 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -969,7 +969,7 @@ OUString AddonsOptions_Impl::GeneratePrefixURL() OUString aPopupMenuURL; OUStringBuffer aBuf( m_aRootAddonPopupMenuURLPrexfix.getLength() + 3 ); aBuf.append( m_aRootAddonPopupMenuURLPrexfix ); - aBuf.append( OUString::valueOf( ++m_nRootAddonPopupMenuId )); + aBuf.append( OUString::number( ++m_nRootAddonPopupMenuId )); aPopupMenuURL = aBuf.makeStringAndClear(); return aPopupMenuURL; } diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx index 782eb2447f4a..36f0cf679187 100644 --- a/framework/source/fwe/helper/actiontriggerhelper.cxx +++ b/framework/source/fwe/helper/actiontriggerhelper.cxx @@ -267,7 +267,7 @@ Reference< XPropertySet > CreateActionTrigger( sal_uInt16 nItemId, const Menu* p if ( aCommandURL.isEmpty() ) { aCommandURL = OUString( "slot:" ); - aCommandURL += OUString::valueOf( (sal_Int32)nItemId ); + aCommandURL += OUString::number( nItemId ); } a <<= aCommandURL; diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx index a1e4cbb45363..378c7c6fbb57 100644 --- a/framework/source/fwe/xml/statusbardocumenthandler.cxx +++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx @@ -650,7 +650,7 @@ throw ( SAXException, RuntimeException ) { pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_WIDTH ), m_aAttributeType, - OUString::valueOf( (sal_Int32)nWidth ) ); + OUString::number( nWidth ) ); } // offset (default STATUSBAR_OFFSET) @@ -658,7 +658,7 @@ throw ( SAXException, RuntimeException ) { pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_OFFSET ), m_aAttributeType, - OUString::valueOf( (sal_Int32)nOffset ) ); + OUString::number( nOffset ) ); } m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index 8ffd7a20587b..c43538068f30 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -838,7 +838,7 @@ throw ( SAXException, RuntimeException ) { pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_WIDTH ), m_aAttributeType, - OUString::valueOf( sal_Int32( nWidth )) ); + OUString::number( nWidth) ); } m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index e6d54103cf56..4faaa15ed385 100644 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -312,7 +312,7 @@ void impl_setDockingWindowVisibility( const css::uno::Reference< css::uno::XComp OUString aDockWinCommand( ".uno:" ); OUString aDockWinArgName( aDockWinPrefixCommand ); - aDockWinArgName += OUString::valueOf( nIndex ); + aDockWinArgName += OUString::number( nIndex ); css::uno::Sequence< css::beans::PropertyValue > aArgs(1); aArgs[0].Name = aDockWinArgName; diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index 420ad32a14b5..8409d4cebc92 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -317,7 +317,7 @@ void SAL_CALL DispatchRecorder::implts_recordMacro( const OUString& aURL, OUString sArrayName; // this value is used to name the arrays of aArgumentBuffer sArrayName = OUString("args"); - sArrayName += OUString::valueOf((sal_Int32)m_nRecordingID); + sArrayName += OUString::number(m_nRecordingID); aScriptBuffer.appendAscii("rem ----------------------------------------------------------------------\n"); diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index f1c4add2fd0a..f3950e1b6a43 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -1176,7 +1176,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable aPreDefPathVariables.m_FixedVar[ PREDEFVAR_VLANG ] = aLocaleStr; // Set $(langid) - aPreDefPathVariables.m_FixedVar[ PREDEFVAR_LANGID ] = OUString::valueOf( (sal_Int32)aPreDefPathVariables.m_eLanguageType ); + aPreDefPathVariables.m_FixedVar[ PREDEFVAR_LANGID ] = OUString::number( aPreDefPathVariables.m_eLanguageType ); // Set the other pre defined path variables // Set $(work) diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index 3053fbbee5ed..3f7ec4bd938c 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -1212,14 +1212,14 @@ void ConfigurationAccess_WindowState::impl_putPropertiesFromStruct( const Window { OUString aPosStr; if ( i == PROPERTY_POS ) - aPosStr = OUString::valueOf( rWinStateInfo.aPos.X ); + aPosStr = OUString::number( rWinStateInfo.aPos.X ); else - aPosStr = OUString::valueOf( rWinStateInfo.aDockPos.X ); + aPosStr = OUString::number( rWinStateInfo.aDockPos.X ); aPosStr += aDelim; if ( i == PROPERTY_POS ) - aPosStr += OUString::valueOf( rWinStateInfo.aPos.Y ); + aPosStr += OUString::number( rWinStateInfo.aPos.Y ); else - aPosStr += OUString::valueOf( rWinStateInfo.aDockPos.Y ); + aPosStr += OUString::number( rWinStateInfo.aDockPos.Y ); xPropSet->setPropertyValue( m_aPropArray[i], makeAny( aPosStr ) ); break; } @@ -1228,14 +1228,14 @@ void ConfigurationAccess_WindowState::impl_putPropertiesFromStruct( const Window { OUString aSizeStr; if ( i == PROPERTY_SIZE ) - aSizeStr = ( OUString::valueOf( rWinStateInfo.aSize.Width )); + aSizeStr = ( OUString::number( rWinStateInfo.aSize.Width )); else - aSizeStr = ( OUString::valueOf( rWinStateInfo.aDockSize.Width )); + aSizeStr = ( OUString::number( rWinStateInfo.aDockSize.Width )); aSizeStr += aDelim; if ( i == PROPERTY_SIZE ) - aSizeStr += OUString::valueOf( rWinStateInfo.aSize.Height ); + aSizeStr += OUString::number( rWinStateInfo.aSize.Height ); else - aSizeStr += OUString::valueOf( rWinStateInfo.aDockSize.Height ); + aSizeStr += OUString::number( rWinStateInfo.aDockSize.Height ); xPropSet->setPropertyValue( m_aPropArray[i], makeAny( aSizeStr ) ); break; } diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index c39d87a75dd1..cbf868e92e38 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -190,7 +190,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r fPoint = float( m_pHeightArray[nPos-1] ) / 10; // Create dispatchable .uno command and set it - aCommand = aFontHeightCommand + OUString::valueOf( fPoint ); + aCommand = aFontHeightCommand + OUString::number( fPoint ); pVCLPopupMenu->SetItemCommand( nPos, aCommand ); } } @@ -209,7 +209,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r fPoint = float( m_pHeightArray[nPos-1] ) / 10; // Create dispatchable .uno command and set it - aCommand = aFontHeightCommand + OUString::valueOf( fPoint ); + aCommand = aFontHeightCommand + OUString::number( fPoint ); pVCLPopupMenu->SetItemCommand( nPos, aCommand ); } pTempAry++; @@ -228,7 +228,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r fPoint = float( m_pHeightArray[nPos-1] ) / 10; // Create dispatchable .uno command and set it - aCommand = aFontHeightCommand + OUString::valueOf( fPoint ); + aCommand = aFontHeightCommand + OUString::number( fPoint ); pVCLPopupMenu->SetItemCommand( nPos, aCommand ); pTempAry++; diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index ad667efa7e01..ff46fb4e44ac 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -908,7 +908,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) if ( aItemCommand.isEmpty() ) { aItemCommand = OUString( "slot:" ); - aItemCommand += OUString::valueOf( (sal_Int32)pMenuItemHandler->nItemId ); + aItemCommand += OUString::number( pMenuItemHandler->nItemId ); pMenu->SetItemCommand( pMenuItemHandler->nItemId, aItemCommand ); } @@ -1343,7 +1343,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF // Set item command for popup menu to enable it for GetImageFromURL const OUString aSlotString( "slot:" ); OUString aNewItemCommand( aSlotString ); - aNewItemCommand += OUString::valueOf( (sal_Int32)ITEMID_ADDONLIST ); + aNewItemCommand += OUString::number( ITEMID_ADDONLIST ); pPopup->SetItemCommand( ITEMID_ADDONLIST, aNewItemCommand ); } else @@ -1960,7 +1960,7 @@ sal_uInt16 MenuBarManager::FillItemCommand(OUString& _rItemCommand, Menu* _pMenu { const static OUString aSlotString( "slot:" ); _rItemCommand = aSlotString; - _rItemCommand += OUString::valueOf( (sal_Int32)nItemId ); + _rItemCommand += OUString::number( nItemId ); _pMenu->SetItemCommand( nItemId, _rItemCommand ); } return nItemId; diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index d5447d641f10..68c71fd362eb 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -90,7 +90,7 @@ void ObjectMenuController::fillPopupMenu( const Sequence< com::sun::star::embed: // use VCL popup menu pointer to set vital information that are not part of the awt implementation OUString aCommand( aVerbCommand ); - aCommand += OUString::valueOf( rVerb.VerbID ); + aCommand += OUString::number( rVerb.VerbID ); pVCLPopupMenu->SetItemCommand( i+1, aCommand ); // Store verb command } } diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index ea55937d94c0..39c0cef03baf 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -356,8 +356,8 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: double fValue; bool bFloat( false ); if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat )) - aStep = bFloat ? OUString::valueOf( fValue ) : - OUString::valueOf( nValue ); + aStep = bFloat ? OUString::number( fValue ) : + OUString::number( nValue ); break; } } @@ -374,7 +374,7 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat )) { - aValue = bFloat ? OUString::valueOf( fValue ) : OUString::valueOf( nValue ); + aValue = bFloat ? OUString::number( fValue ) : OUString::number( nValue ); bFloatValue = bFloat; } break; @@ -394,18 +394,18 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: { if ( aName.equalsAsciiL( "Value", 5 )) { - aValue = bFloat ? OUString::valueOf( fValue ) : OUString::valueOf( nValue ); + aValue = bFloat ? OUString::number( fValue ) : OUString::number( nValue ); bFloatValue = bFloat; } else if ( aName.equalsAsciiL( "Step", 4 )) - aStep = bFloat ? OUString::valueOf( fValue ) : - OUString::valueOf( nValue ); + aStep = bFloat ? OUString::number( fValue ) : + OUString::number( nValue ); else if ( aName.equalsAsciiL( "LowerLimit", 10 )) - aMin = bFloat ? OUString::valueOf( fValue ) : - OUString::valueOf( nValue ); + aMin = bFloat ? OUString::number( fValue ) : + OUString::number( nValue ); else if ( aName.equalsAsciiL( "UpperLimit", 10 )) - aMax = bFloat ? OUString::valueOf( fValue ) : - OUString::valueOf( nValue ); + aMax = bFloat ? OUString::number( fValue ) : + OUString::number( nValue ); } else if ( aName.equalsAsciiL( "OutputFormat", 12 )) rControlCommand.Arguments[i].Value >>= m_aOutFormat; @@ -421,8 +421,8 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: double fValue; bool bFloat( false ); if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat )) - aMin = bFloat ? OUString::valueOf( fValue ) : - OUString::valueOf( nValue ); + aMin = bFloat ? OUString::number( fValue ) : + OUString::number( nValue ); break; } } @@ -437,8 +437,8 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: double fValue; bool bFloat( false ); if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat )) - aMax = bFloat ? OUString::valueOf( fValue ) : - OUString::valueOf( nValue ); + aMax = bFloat ? OUString::number( fValue ) : + OUString::number( nValue ); break; } } @@ -507,9 +507,9 @@ OUString SpinfieldToolbarController::impl_formatOutputString( double fValue ) if ( m_aOutFormat.isEmpty() ) { if ( m_bFloat ) - return OUString::valueOf( fValue ); + return OUString::number( fValue ); else - return OUString::valueOf( sal_Int32( fValue )); + return OUString::number( sal_Int32( fValue )); } else { diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index 253944b39bae..b34be307cbb0 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -717,7 +717,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor* sal_Int64 nValue = pImageList->aMaskColor.GetRGBColor(); aColorStrBuffer.appendAscii( "#" ); - aColorStrBuffer.append( OUString::valueOf( nValue, 16 )); + aColorStrBuffer.append( OUString::number( nValue, 16 )); pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_MASKCOLOR ), m_aAttributeType, @@ -757,7 +757,7 @@ void OWriteImagesDocumentHandler::WriteImage( const ImageItemDescriptor* pImage pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_BITMAPINDEX ), m_aAttributeType, - OUString::valueOf( (sal_Int32)pImage->nIndex ) ); + OUString::number( pImage->nIndex ) ); pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_COMMAND ), m_aAttributeType, |