diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-01-30 19:09:35 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-01-31 12:04:02 +0000 |
commit | 1ef9f3988ee4dcbc77e1fdefa20442e044a67d4d (patch) | |
tree | 686b5f3247d28e19ba949b81fd5596dbe3a27401 | |
parent | 890ebf1cc6bb58ff21da19d7fd4b9b67eaa32a9c (diff) |
unnecessary use of OUString constructor
Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1
Reviewed-on: https://gerrit.libreoffice.org/21945
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
51 files changed, 146 insertions, 151 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index c4aa170a5551..0103102704e8 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1570,7 +1570,7 @@ namespace OUString sMacro; if(nLast >= 0) { - sMacro = OUString(sParse.getStr() + nLast, sParse.getLength() - nLast ); + sMacro = sParse.copy(nLast); } else { @@ -2013,7 +2013,7 @@ uno::Sequence< OUString > DialogContainer_Impl::getElementNames() SbxVariable* pVar = mpLib->GetObjects()->Get( nObj ); if ( nullptr != dynamic_cast<const SbxObject*>( pVar) && ( static_cast<SbxObject*>(pVar)->GetSbxId() == SBXID_DIALOG ) ) { - pRetSeq[ nDialogCounter ] = OUString( pVar->GetName() ); + pRetSeq[ nDialogCounter ] = pVar->GetName(); nDialogCounter++; } } @@ -2180,7 +2180,7 @@ uno::Sequence< OUString > LibraryContainer_Impl::getElementNames() OUString* pRetSeq = aRetSeq.getArray(); for( sal_uInt16 i = 0 ; i < nLibs ; i++ ) { - pRetSeq[i] = OUString( mpMgr->GetLibName( i ) ); + pRetSeq[i] = mpMgr->GetLibName( i ); } return aRetSeq; } diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 1039115143e6..65db15671668 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -102,8 +102,7 @@ OUString lcl_GetSelectedRole( const SvTabListBox & rRoleListBox, bool bUITransla OUString aResult; SvTreeListEntry * pEntry = rRoleListBox.FirstSelected(); if( pEntry ) - aResult = OUString( SvTabListBox::GetEntryText( pEntry, - bUITranslated ? 1 : 0 )); + aResult = SvTabListBox::GetEntryText( pEntry, bUITranslated ? 1 : 0 ); return aResult; } @@ -112,7 +111,7 @@ OUString lcl_GetSelectedRolesRange( const SvTabListBox & rRoleListBox ) OUString aResult; SvTreeListEntry * pEntry = rRoleListBox.FirstSelected(); if( pEntry ) - aResult = OUString( SvTabListBox::GetEntryText( pEntry, 2 )); + aResult = SvTabListBox::GetEntryText( pEntry, 2 ); return aResult; } @@ -219,7 +218,7 @@ DataSourceTabPage::DataSourceTabPage( m_pFT_CAPTION->Show(!bHideDescription); - m_aFixedTextRange = OUString( m_pFT_RANGE->GetText() ); + m_aFixedTextRange = m_pFT_RANGE->GetText(); this->SetText( SCH_RESSTR( STR_OBJECT_DATASERIES_PLURAL ) ); // set handlers @@ -425,9 +424,9 @@ void DataSourceTabPage::fillSeriesListBox() const OUString aReplacementStr( "%NUMBER" ); sal_Int32 nIndex = aResString.indexOf( aReplacementStr ); if( nIndex != -1 ) - aLabel = OUString( aResString.replaceAt( + aLabel = aResString.replaceAt( nIndex, aReplacementStr.getLength(), - OUString::number(nUnnamedSeriesIndex))); + OUString::number(nUnnamedSeriesIndex)); } if( aLabel.isEmpty() ) aLabel = ::chart::SchResId( STR_DATA_UNNAMED_SERIES ).toString(); diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx index 18487e884eb3..25a1c8b40661 100644 --- a/chart2/source/model/template/DataInterpreter.cxx +++ b/chart2/source/model/template/DataInterpreter.cxx @@ -447,7 +447,7 @@ void lcl_ShowDataSource( const Reference< data::XDataSource > & xSource ) aSourceRepr = "<none>"; if( aSequences[k]->getLabel().is()) - aSourceRepr = OUString( aSequences[k]->getLabel()->getSourceRangeRepresentation()); + aSourceRepr = aSequences[k]->getLabel()->getSourceRangeRepresentation(); xProp.set( aSequences[k]->getLabel(), uno::UNO_QUERY ); if( xProp.is() && ( xProp->getPropertyValue( "Role") >>= aId )) diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index ddbe39a3d8f7..748bcc7f548a 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -1151,7 +1151,7 @@ void GL3DBarChart::updateRenderFPS() osl_getSystemTime(&maFPSRenderStartTime); } osl_getSystemTime(&maFPSRenderEndTime); - OUString aFPS = OUString("Render FPS: "); + OUString aFPS = "Render FPS: "; addScreenTextShape(aFPS, glm::vec2(-0.77f, 0.99f), 0.07f, false, glm::vec4(0.0f, 1.0f, 1.0f, 0.0f)); addScreenTextShape(maFPS, glm::vec2(-0.77f, 0.99f), 0.07f, true, glm::vec4(1.0f, 0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f)); @@ -1199,7 +1199,7 @@ void GL3DBarChart::updateDataUpdateFPS() osl_getSystemTime(&maDataUpdateStartTime); } osl_getSystemTime(&maDataUpdateEndTime); - OUString aDataUpdateFPS = OUString("Data Update Rate: "); + OUString aDataUpdateFPS = "Data Update Rate: "; addScreenTextShape(aDataUpdateFPS, glm::vec2(-0.77, 0.92f), 0.07f, false, glm::vec4(0.0f, 1.0f, 1.0f, 0.0f)); addScreenTextShape(maDataUpdateFPS, glm::vec2(-0.77f, 0.92f), 0.07f, true, glm::vec4(1.0f, 0.0f, 0.0f, 0.0f)); } diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 08ae96d87982..6600515984d3 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -423,7 +423,7 @@ void OFlatTable::construct() INetURLObject aURL; aURL.SetURL(getEntry()); - if(aURL.getExtension() != OUString(m_pConnection->getExtension())) + if(aURL.getExtension() != m_pConnection->getExtension()) aURL.setExtension(m_pConnection->getExtension()); OUString aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE); diff --git a/cppuhelper/test/testlib/defbootstrap_lib.cxx b/cppuhelper/test/testlib/defbootstrap_lib.cxx index 693d897593d3..be14184d2011 100644 --- a/cppuhelper/test/testlib/defbootstrap_lib.cxx +++ b/cppuhelper/test/testlib/defbootstrap_lib.cxx @@ -41,7 +41,7 @@ static sal_Bool tryService(const char * serviceName) ::osl::Module::getUrlFromAddress((void *)tryService, libraryFileUrl); OUString iniName = libraryFileUrl.copy(0, libraryFileUrl.lastIndexOf((sal_Unicode)'.')); // cut the library extension - iniName += OUString(SAL_CONFIGFILE("")); // add the rc file extension + iniName += SAL_CONFIGFILE(""); // add the rc file extension #if OSL_DEBUG_LEVEL > 1 OString sIniName = OUStringToOString(iniName, RTL_TEXTENCODING_ASCII_US); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index e3d1f4dca980..4c767bf9c7ca 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -303,7 +303,7 @@ OUString generateCustomURL( SvxEntries* entries ) { - OUString url = OUString(ITEM_TOOLBAR_URL ); + OUString url = ITEM_TOOLBAR_URL; url += CUSTOM_TOOLBAR_STR; // use a random number to minimize possible clash with existing custom toolbars diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 1a888ac4ef63..17d6da871044 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -424,7 +424,7 @@ IMPL_LINK_TYPED(FmSearchDialog, OnFieldSelected, ListBox&, rBox, void) sal_Int32 nCurrentContext = m_plbForm->GetSelectEntryPos(); if (nCurrentContext != LISTBOX_ENTRY_NOTFOUND) - m_arrContextFields[nCurrentContext] = OUString(m_plbField->GetSelectEntry()); + m_arrContextFields[nCurrentContext] = m_plbField->GetSelectEntry(); } IMPL_LINK_TYPED(FmSearchDialog, OnCheckBoxToggled, CheckBox&, rBox, void) diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 80f9ae290581..556de064cd19 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -366,7 +366,7 @@ void SvxThesaurusDialog::LookUp_Impl() { OUString aText( m_pWordCB->GetText() ); - aLookUpText = OUString( aText ); + aLookUpText = aText; if (!aLookUpText.isEmpty() && (aLookUpHistory.empty() || aLookUpText != aLookUpHistory.top())) aLookUpHistory.push( aLookUpText ); @@ -476,7 +476,7 @@ SvxThesaurusDialog::SvxThesaurusDialog( m_pAlternativesCT->SetDoubleClickHdl( LINK( this, SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl )); xThesaurus = xThes; - aLookUpText = OUString( rWord ); + aLookUpText = rWord; nLookUpLanguage = nLanguage; if (!rWord.isEmpty()) aLookUpHistory.push( rWord ); diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 3de28be898d4..ed326286fb10 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -928,7 +928,7 @@ Sequence< OUString > SvxJavaParameterDlg::GetParameters() const Sequence< OUString > aParamList( nCount ); OUString* pArray = aParamList.getArray(); for ( sal_Int32 i = 0; i < nCount; ++i ) - pArray[i] = OUString( m_pAssignedList->GetEntry(i) ); + pArray[i] = m_pAssignedList->GetEntry(i); return aParamList; } diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx index 77a01ecef72e..5342adf78978 100644 --- a/dtrans/source/cnttype/wbench/testcnttype.cxx +++ b/dtrans/source/cnttype/wbench/testcnttype.cxx @@ -144,8 +144,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) // get the global service-manager - OUString rdbName = OUString( RDB_SYSPATH ); - Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); + Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( RDB_SYSPATH ) ); // Print a message if an error occurred. if ( !g_xFactory.is( ) ) diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/dtrans/source/win32/workbench/test_wincb.cxx index c40bc19ddfd3..f3ae51c6feeb 100644 --- a/dtrans/source/win32/workbench/test_wincb.cxx +++ b/dtrans/source/win32/workbench/test_wincb.cxx @@ -217,8 +217,7 @@ int SAL_CALL main( int nArgc, char* Argv[] ) // get the global service-manager - OUString rdbName = OUString( RDB_SYSPATH ); - Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); + Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( RDB_SYSPATH ) ); // Print a message if an error occurred. if ( !g_xFactory.is( ) ) diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index 5396aba786ee..88deb22ce12b 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -790,7 +790,7 @@ SvxAlternativeSpelling SvxGetAltSpelling( && pWord[ nIdx-- ] == pAltWord[ nAltIdx-- ]) ++nR; - aRes.aReplacement = OUString( aAltWord.copy( nL, nAltLen - nL - nR ) ); + aRes.aReplacement = aAltWord.copy( nL, nAltLen - nL - nR ); aRes.nChangedPos = (sal_Int16) nL; aRes.nChangedLength = nLen - nL - nR; aRes.bIsAltSpelling = true; diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx index 6def520caba3..dba797d49699 100644 --- a/extensions/test/ole/cpnt/cpnt.cxx +++ b/extensions/test/ole/cpnt/cpnt.cxx @@ -1490,7 +1490,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac if( any.getValueTypeClass() == TypeClass_STRUCT) { SimpleStruct* pStruct= ( SimpleStruct*) any.getValue(); - pStruct->message= OUString("This struct was created in OleTest"); + pStruct->message= "This struct was created in OleTest"; SimpleStruct aStruct; any >>= aStruct; @@ -1638,7 +1638,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac if( any.getValueTypeClass() == TypeClass_STRUCT) { SimpleStruct* pStruct= ( SimpleStruct*) any.getValue(); - pStruct->message= OUString("This struct was created in OleTest"); + pStruct->message= "This struct was created in OleTest"; any >>= aStruct; } } @@ -1794,7 +1794,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac if( any.getValueTypeClass() == TypeClass_STRUCT) { SimpleStruct* pStruct= ( SimpleStruct*) any.getValue(); - pStruct->message= OUString("This struct was created in OleTest"); + pStruct->message = "This struct was created in OleTest"; any >>= aStruct; } } diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index 07acb6457313..a9f0abf905e8 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -293,11 +293,11 @@ OUStringList FilterFactory::impl_queryMatchByDocumentService(const QueryTokenize pIt = lTokens.find(QUERY_PARAM_IFLAGS); if (pIt != lTokens.end()) - nIFlags = OUString(pIt->second).toInt32(); + nIFlags = pIt->second.toInt32(); pIt = lTokens.find(QUERY_PARAM_EFLAGS); if (pIt != lTokens.end()) - nEFlags = OUString(pIt->second).toInt32(); + nEFlags = pIt->second.toInt32(); // SAFE -> ---------------------- ::osl::ResettableMutexGuard aLock(m_aLock); @@ -429,10 +429,10 @@ OUStringList FilterFactory::impl_getSortedFilterList(const QueryTokenizer& lToke sModule = pIt1->second; pIt1 = lTokens.find(QUERY_PARAM_IFLAGS); if (pIt1 != lTokens.end()) - nIFlags = OUString(pIt1->second).toInt32(); + nIFlags = pIt1->second.toInt32(); pIt1 = lTokens.find(QUERY_PARAM_EFLAGS); if (pIt1 != lTokens.end()) - nEFlags = OUString(pIt1->second).toInt32(); + nEFlags = pIt1->second.toInt32(); // simple search for filters of one specific module. OUStringList lFilterList; diff --git a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx index a33f7ccad3ca..5c51f5a2c14c 100644 --- a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx +++ b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx @@ -203,11 +203,11 @@ void SAL_CALL FilePickerListener::controlStateChanged( const css::ui::dialogs::F aValue <<= lbString; rFPCtrlAccess->setValue( LISTBOX_VERSION, ADD_ITEM, aValue ); - lbString = OUString( L"Ein Eintrag 2" ); + lbString = L"Ein Eintrag 2"; aValue <<= lbString; rFPCtrlAccess->setValue( LISTBOX_VERSION, ADD_ITEM, aValue ); - lbString = OUString( L"Ein Eintrag 3" ); + lbString = L"Ein Eintrag 3"; aValue <<= lbString; rFPCtrlAccess->setValue( LISTBOX_VERSION, ADD_ITEM, aValue ); @@ -243,8 +243,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] ) // Get global factory for uno services. - OUString rdbName = OUString( RDB_SYSPATH ); - Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); + Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( RDB_SYSPATH ) ); // Print a message if an error occurred. if ( g_xFactory.is() == sal_False ) diff --git a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx index ae561b4487d4..a635a467415f 100644 --- a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx +++ b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx @@ -75,8 +75,7 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ ) // Get global factory for uno services. - OUString rdbName = OUString( RDB_SYSPATH ); - Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); + Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( RDB_SYSPATH ) ); // Print a message if an error occurred. if ( g_xFactory.is() == sal_False ) diff --git a/framework/source/fwe/xml/saxnamespacefilter.cxx b/framework/source/fwe/xml/saxnamespacefilter.cxx index 07b1f6c15bcf..4e4b1bf122b7 100644 --- a/framework/source/fwe/xml/saxnamespacefilter.cxx +++ b/framework/source/fwe/xml/saxnamespacefilter.cxx @@ -99,7 +99,7 @@ void SAL_CALL SaxNamespaceFilter::startElement( } catch ( SAXException& e ) { - e.Message = OUString( getErrorLineString() + e.Message ); + e.Message = getErrorLineString() + e.Message; throw; } @@ -111,7 +111,7 @@ void SAL_CALL SaxNamespaceFilter::startElement( } catch ( SAXException& e ) { - e.Message = OUString( getErrorLineString() + e.Message ); + e.Message = getErrorLineString() + e.Message; throw; } @@ -130,7 +130,7 @@ void SAL_CALL SaxNamespaceFilter::endElement(const OUString& aName) } catch ( SAXException& e ) { - e.Message = OUString( getErrorLineString() + e.Message ); + e.Message = getErrorLineString() + e.Message; throw; } diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx index 9eac17cecdae..5f7abf6a228b 100644 --- a/framework/source/uielement/subtoolbarcontroller.cxx +++ b/framework/source/uielement/subtoolbarcontroller.cxx @@ -147,7 +147,7 @@ void SubToolBarController::statusChanged( const css::frame::FeatureStateEvent& E { // Enum command, such as the current custom shape, // toggle checked state. - if ( m_aLastCommand == OUString( m_aCommandURL + "." + aStrValue ) ) + if ( m_aLastCommand == ( m_aCommandURL + "." + aStrValue ) ) { eTri = TRISTATE_TRUE; nItemBits |= ToolBoxItemBits::CHECKABLE; diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx index b2f87d1af76c..57a995ee421f 100644 --- a/i18npool/source/search/textsearch.cxx +++ b/i18npool/source/search/textsearch.cxx @@ -329,7 +329,7 @@ SearchResult TextSearch::searchForward( const OUString& searchStr, sal_Int32 sta { SearchResult sres2; - in_str = OUString(searchStr); + in_str = searchStr; css::uno::Sequence <sal_Int32> offset( in_str.getLength()); in_str = xTranslit2->transliterate( searchStr, 0, in_str.getLength(), offset ); @@ -436,7 +436,7 @@ SearchResult TextSearch::searchBackward( const OUString& searchStr, sal_Int32 st { SearchResult sres2; - in_str = OUString(searchStr); + in_str = searchStr; css::uno::Sequence <sal_Int32> offset( in_str.getLength()); in_str = xTranslit2->transliterate(searchStr, 0, in_str.getLength(), offset); diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 14b370336959..8b028a3c1ea3 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -69,7 +69,7 @@ OUString GetConvDicMainURL( const OUString &rDicName, const OUString &rDirectory { // build URL to use for new (persistent) dictionaries - OUString aFullDicName = OUString(rDicName) + CONV_DIC_DOT_EXT; + OUString aFullDicName = rDicName + CONV_DIC_DOT_EXT; INetURLObject aURLObj; aURLObj.SetSmartProtocol( INetProtocol::File ); diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 9d12b5035205..128b2a2bd86a 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1418,7 +1418,7 @@ void Shape::putPropertyToGrabBag( const PropertyValue& pProperty ) { Reference< XPropertySet > xSet( mxShape, UNO_QUERY ); Reference< XPropertySetInfo > xSetInfo( xSet->getPropertySetInfo() ); - const OUString& aGrabBagPropName = OUString( UNO_NAME_MISC_OBJ_INTEROPGRABBAG ); + const OUString aGrabBagPropName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; if( mxShape.is() && xSet.is() && xSetInfo.is() && xSetInfo->hasPropertyByName( aGrabBagPropName ) ) { Sequence< PropertyValue > aGrabBag; @@ -1436,7 +1436,7 @@ void Shape::putPropertiesToGrabBag( const Sequence< PropertyValue >& aProperties { Reference< XPropertySet > xSet( mxShape, UNO_QUERY ); Reference< XPropertySetInfo > xSetInfo( xSet->getPropertySetInfo() ); - const OUString& aGrabBagPropName = OUString( UNO_NAME_MISC_OBJ_INTEROPGRABBAG ); + const OUString aGrabBagPropName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; if( mxShape.is() && xSet.is() && xSetInfo.is() && xSetInfo->hasPropertyByName( aGrabBagPropName ) ) { // get existing grab bag diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 8858905b430d..425e93859287 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -1407,7 +1407,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa break; DataPilotTableHeaderData aHeaderData; - aHeaderData.MemberName = OUString(pArray[nItem].Name); + aHeaderData.MemberName = pArray[nItem].Name; aHeaderData.Flags = pArray[nItem].Flags; aHeaderData.Dimension = static_cast<sal_Int32>(pColFields[nField].nDim); aHeaderData.Hierarchy = static_cast<sal_Int32>(pColFields[nField].nHier); @@ -1436,7 +1436,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa break; DataPilotTableHeaderData aHeaderData; - aHeaderData.MemberName = OUString(pArray[nItem].Name); + aHeaderData.MemberName = pArray[nItem].Name; aHeaderData.Flags = pArray[nItem].Flags; aHeaderData.Dimension = static_cast<sal_Int32>(pRowFields[nField].nDim); aHeaderData.Hierarchy = static_cast<sal_Int32>(pRowFields[nField].nHier); diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx index 8259b8602068..d60979cbfccd 100644 --- a/sc/source/core/data/stlsheet.cxx +++ b/sc/source/core/data/stlsheet.cxx @@ -314,7 +314,7 @@ const OUString& ScStyleSheet::GetFollow() const bool ScStyleSheet::SetName(const OUString& rNew, bool bReindexNow) { - OUString aFileStdName = OUString(STRING_STANDARD); + OUString aFileStdName = STRING_STANDARD; if ( rNew == aFileStdName && aFileStdName != ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ) return false; else diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 6c30a395ee56..9464c9084034 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -63,7 +63,7 @@ ScEditUtil::ScEditUtil( ScDocument* pDocument, SCCOL nX, SCROW nY, SCTAB nZ, OUString ScEditUtil::ModifyDelimiters( const OUString& rOld ) { // underscore is used in function argument names - OUString aRet = OUString( comphelper::string::remove(rOld, '_') ) + + OUString aRet = comphelper::string::remove(rOld, '_') + "=()+-*/^&<>" + ScCompiler::GetNativeSymbol(ocSep); // argument separator is localized. return aRet; diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index 6de187cfe378..d7ce3490cad5 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -153,7 +153,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) theQueryData.nRow2, nSrcTab ) ); ScDBCollection* pDBColl = pDoc->GetDBCollection(); - OUString theDbName = OUString(STR_DB_LOCAL_NONAME); + OUString theDbName = STR_DB_LOCAL_NONAME; // Check if the passed range is a database range diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 522bc0eec4d2..fba0f873a2ae 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -584,7 +584,7 @@ void ScTabPageSortOptions::Init() { ScDBCollection* pDBColl = pDoc->GetDBCollection(); const SCTAB nCurTab = pViewData->GetTabNo(); - OUString theDbName = OUString(STR_DB_LOCAL_NONAME); + OUString theDbName = STR_DB_LOCAL_NONAME; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); m_pLbOutPos->Clear(); diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx index 12b41b92cbb0..1e90822bd0df 100644 --- a/sc/source/ui/unoobj/addruno.cxx +++ b/sc/source/ui/unoobj/addruno.cxx @@ -200,7 +200,7 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const OUString& aPropert if ( bIsRange ) { // range: also strip a "." after the last colon - sal_Int32 nColon = OUString(aUIString).lastIndexOf( (sal_Unicode) ':' ); + sal_Int32 nColon = aUIString.lastIndexOf( (sal_Unicode) ':' ); if ( nColon >= 0 && nColon < aUIString.getLength() - 1 && aUIString[nColon+1] == '.' ) aUIString = aUIString.replaceAt( nColon+1, 1, "" ); diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index e9a385f2823d..f029710f9379 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -2122,7 +2122,7 @@ void ScTabViewObj::RangeSelDone( const OUString& rText ) { sheet::RangeSelectionEvent aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - aEvent.RangeDescriptor = OUString( rText ); + aEvent.RangeDescriptor = rText; // copy on the stack because listener could remove itself XRangeSelectionListenerVector const listeners(aRangeSelListeners); @@ -2135,7 +2135,7 @@ void ScTabViewObj::RangeSelAborted( const OUString& rText ) { sheet::RangeSelectionEvent aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - aEvent.RangeDescriptor = OUString( rText ); + aEvent.RangeDescriptor = rText; // copy on the stack because listener could remove itself XRangeSelectionListenerVector const listeners(aRangeSelListeners); @@ -2148,7 +2148,7 @@ void ScTabViewObj::RangeSelChanged( const OUString& rText ) { sheet::RangeSelectionEvent aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - aEvent.RangeDescriptor = OUString( rText ); + aEvent.RangeDescriptor = rText; // copy on the stack because listener could remove itself XRangeSelectionChangeListenerVector const listener(aRangeChgListeners); diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 240248fdc6e8..f5be22545c7d 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -868,9 +868,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) sal_uInt32 nNumIndex = 0; double nVal; if (pDoc->GetFormatTable()->IsNumberFormat(aTemp1, nNumIndex, nVal)) - aExpr1 = OUString( ::rtl::math::doubleToUString( nVal, + aExpr1 = ::rtl::math::doubleToUString( nVal, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, - ScGlobal::pLocaleData->getNumDecimalSep()[0], true)); + ScGlobal::pLocaleData->getNumDecimalSep()[0], true); else aExpr1 = aTemp1; } @@ -885,9 +885,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) sal_uInt32 nNumIndex = 0; double nVal; if (pDoc->GetFormatTable()->IsNumberFormat(aTemp2, nNumIndex, nVal)) - aExpr2 = OUString( ::rtl::math::doubleToUString( nVal, + aExpr2 = ::rtl::math::doubleToUString( nVal, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, - ScGlobal::pLocaleData->getNumDecimalSep()[0], true)); + ScGlobal::pLocaleData->getNumDecimalSep()[0], true); else aExpr2 = aTemp2; if ( eMode == SC_VALID_TIME ) { diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index b1f6d5f4ad86..866660b63f0a 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1252,7 +1252,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, else nPageNo += ((long)nRowPos)*nColBreaks+nColPos; - OUString aThisPageStr = OUString(aPageStr).replaceFirst("%1", OUString::number(nPageNo)); + OUString aThisPageStr = aPageStr.replaceFirst("%1", OUString::number(nPageNo)); if ( pEditEng ) { diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index e6711fb9cc9d..ecf57a63f34b 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -59,7 +59,7 @@ SfxStyleDialog::SfxStyleDialog SetCurPageId(m_nOrganizerId); else { - OUString sTxt = OUString(GetText()) + ": " + rStyle.GetName(); + OUString sTxt = GetText() + ": " + rStyle.GetName(); SetText( sTxt ); } delete pExampleSet; // in SfxTabDialog::Ctor() already created diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index 45bd62203e09..4d8b48607ca3 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -192,7 +192,7 @@ throw( uno::RuntimeException, std::exception ) mxFrame->setCreator( xFramesSupplier ); util::URL aTargetURL; - aTargetURL.Complete = OUString( maFrmDescr.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ); + aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::NO_DECODE ); uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) ); xTrans->parseStrict( aTargetURL ); diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index 0c8a015c1712..6324169b0917 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -230,7 +230,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e { sal_Int32 columnId = _nPosition % ColCount() +1; - aRetText = OUString( GetColumnDescription( sal_Int16( columnId ) ) ); + aRetText = GetColumnDescription( sal_Int16( columnId ) ); sal_Int32 rowId = _nPosition / GetRowCount() + 1; aRetText += OUString::number(rowId); } @@ -258,7 +258,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e #endif break; case ::svt::BBTYPE_COLUMNHEADERCELL: - aRetText = OUString( GetColumnDescription( sal_Int16( _nPosition ) ) ); + aRetText = GetColumnDescription( sal_Int16( _nPosition ) ); #if OSL_DEBUG_LEVEL > 1 aRetText += " ["; aRetText += OUString::number(sal_Int32(GetCurRow())); diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index b062b934e375..ee96ad132153 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -137,7 +137,7 @@ OUString PlaceEditDialog::GetServerUrl() if (m_xCurrentDetails.get()) { INetURLObject aUrl = m_xCurrentDetails->getUrl(); - OUString sUsername = OUString( m_pEDUsername->GetText( ) ).trim( ); + OUString sUsername = m_pEDUsername->GetText( ).trim( ); if ( !sUsername.isEmpty( ) ) aUrl.SetUser( sUsername ); if ( !aUrl.HasError( ) ) @@ -288,7 +288,7 @@ IMPL_LINK_NOARG_TYPED( PlaceEditDialog, EditHdl, DetailsContainer*, void ) UpdateLabel( ); OUString sUrl = GetServerUrl( ); - OUString sName = OUString( m_pEDServerName->GetText() ).trim( ); + OUString sName = m_pEDServerName->GetText().trim( ); m_pBTOk->Enable( !sName.isEmpty( ) && !sUrl.isEmpty( ) ); } diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index ebe0e7863ecd..9815951692df 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -225,7 +225,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) { case USCRIPT_GREEK: { - const sal_Unicode aGrek[] = { + static const sal_Unicode aGrek[] = { 0x0391, 0x03BB, 0x03C6, 0x03AC, 0x03B2, 0x03B7, 0x03C4, 0x03BF }; sSampleText = OUString(aGrek, SAL_N_ELEMENTS(aGrek)); @@ -233,7 +233,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_HEBREW: { - const sal_Unicode aHebr[] = { + static const sal_Unicode aHebr[] = { 0x05D0, 0x05B8, 0x05DC, 0x05B6, 0x05E3, 0x05BE, 0x05D1, 0x05B5, 0x05BC, 0x05D9, 0x05EA, 0x0020, 0x05E2, 0x05B4, 0x05D1, 0x05B0, 0x05E8, 0x05B4, 0x05D9 @@ -243,7 +243,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_ARABIC: { - const sal_Unicode aArab[] = { + static const sal_Unicode aArab[] = { 0x0623, 0x0628, 0x062C, 0x062F, 0x064A, 0x0629, 0x0020, 0x0639, 0x0631, 0x0628, 0x064A, 0x0629 }; @@ -252,7 +252,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_ARMENIAN: { - const sal_Unicode aArmenian[] = { + static const sal_Unicode aArmenian[] = { 0x0561, 0x0575, 0x0562, 0x0578, 0x0582, 0x0562, 0x0565, 0x0576 }; @@ -261,7 +261,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_DEVANAGARI: { - const sal_Unicode aDeva[] = { + static const sal_Unicode aDeva[] = { 0x0926, 0x0947, 0x0935, 0x0928, 0x093E, 0x0917, 0x0930, 0x0940 }; sSampleText = OUString(aDeva, SAL_N_ELEMENTS(aDeva)); @@ -269,7 +269,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_BENGALI: { - const sal_Unicode aBeng[] = { + static const sal_Unicode aBeng[] = { 0x09AC, 0x09BE, 0x0982, 0x09B2, 0x09BE, 0x0020, 0x09B2, 0x09BF, 0x09AA, 0x09BF }; @@ -278,7 +278,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_GURMUKHI: { - const sal_Unicode aGuru[] = { + static const sal_Unicode aGuru[] = { 0x0A17, 0x0A41, 0x0A30, 0x0A2E, 0x0A41, 0x0A16, 0x0A40 }; sSampleText = OUString(aGuru, SAL_N_ELEMENTS(aGuru)); @@ -286,7 +286,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_GUJARATI: { - const sal_Unicode aGujr[] = { + static const sal_Unicode aGujr[] = { 0x0A97, 0x0AC1, 0x0A9C, 0x0AB0, 0x0ABE, 0x0AA4, 0x0aC0, 0x0020, 0x0AB2, 0x0ABF, 0x0AAA, 0x0ABF }; @@ -295,7 +295,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_ORIYA: { - const sal_Unicode aOrya[] = { + static const sal_Unicode aOrya[] = { 0x0B09, 0x0B24, 0x0B4D, 0x0B15, 0x0B33, 0x0020, 0x0B32, 0x0B3F, 0x0B2A, 0x0B3F }; @@ -304,7 +304,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_TAMIL: { - const sal_Unicode aTaml[] = { + static const sal_Unicode aTaml[] = { 0x0B85, 0x0BB0, 0x0BBF, 0x0B9A, 0x0BCD, 0x0B9A, 0x0BC1, 0x0BB5, 0x0B9F, 0x0BBF }; @@ -313,7 +313,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_TELUGU: { - const sal_Unicode aTelu[] = { + static const sal_Unicode aTelu[] = { 0x0C24, 0x0C46, 0x0C32, 0x0C41, 0x0C17, 0x0C41 }; sSampleText = OUString(aTelu, SAL_N_ELEMENTS(aTelu)); @@ -321,7 +321,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_KANNADA: { - const sal_Unicode aKnda[] = { + static const sal_Unicode aKnda[] = { 0x0C95, 0x0CA8, 0x0CCD, 0x0CA8, 0x0CA1, 0x0020, 0x0CB2, 0x0CBF, 0x0CAA, 0x0CBF }; @@ -330,7 +330,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_MALAYALAM: { - const sal_Unicode aMlym[] = { + static const sal_Unicode aMlym[] = { 0x0D2E, 0x0D32, 0x0D2F, 0x0D3E, 0x0D33, 0x0D32, 0x0D3F, 0x0D2A, 0x0D3F }; @@ -339,7 +339,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_THAI: { - const sal_Unicode aThai[] = { + static const sal_Unicode aThai[] = { 0x0E2D, 0x0E31, 0x0E01, 0x0E29, 0x0E23, 0x0E44, 0x0E17, 0x0E22 }; sSampleText = OUString(aThai, SAL_N_ELEMENTS(aThai)); @@ -347,7 +347,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_LAO: { - const sal_Unicode aLao[] = { + static const sal_Unicode aLao[] = { 0x0EAD, 0x0EB1, 0x0E81, 0x0EAA, 0x0EAD, 0x0E99, 0x0EA5, 0x0EB2, 0x0EA7 }; @@ -356,7 +356,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_GEORGIAN: { - const sal_Unicode aGeorgian[] = { + static const sal_Unicode aGeorgian[] = { 0x10D3, 0x10D0, 0x10DB, 0x10EC, 0x10D4, 0x10E0, 0x10DA, 0x10DD, 0x10D1, 0x10D0 }; @@ -366,7 +366,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) case USCRIPT_HANGUL: case USCRIPT_KOREAN: { - const sal_Unicode aHang[] = { + static const sal_Unicode aHang[] = { 0xD55C, 0xAE00 }; sSampleText = OUString(aHang, SAL_N_ELEMENTS(aHang)); @@ -374,7 +374,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_TIBETAN: { - const sal_Unicode aTibt[] = { + static const sal_Unicode aTibt[] = { 0x0F51, 0x0F56, 0x0F74, 0x0F0B, 0x0F45, 0x0F53, 0x0F0B }; sSampleText = OUString(aTibt, SAL_N_ELEMENTS(aTibt)); @@ -382,7 +382,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_SYRIAC: { - const sal_Unicode aSyri[] = { + static const sal_Unicode aSyri[] = { 0x0723, 0x071B, 0x072A, 0x0722, 0x0713, 0x0720, 0x0710 }; sSampleText = OUString(aSyri, SAL_N_ELEMENTS(aSyri)); @@ -390,7 +390,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_THAANA: { - const sal_Unicode aThaa[] = { + static const sal_Unicode aThaa[] = { 0x078C, 0x07A7, 0x0782, 0x07A6 }; sSampleText = OUString(aThaa, SAL_N_ELEMENTS(aThaa)); @@ -398,7 +398,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_SINHALA: { - const sal_Unicode aSinh[] = { + static const sal_Unicode aSinh[] = { 0x0DC1, 0x0DD4, 0x0DAF, 0x0DCA, 0x0DB0, 0x0020, 0x0DC3, 0x0DD2, 0x0D82, 0x0DC4, 0x0DBD }; @@ -407,7 +407,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_MYANMAR: { - const sal_Unicode aMymr[] = { + static const sal_Unicode aMymr[] = { 0x1019, 0x103C, 0x1014, 0x103A, 0x1019, 0x102C, 0x1021, 0x1000, 0x1039, 0x1001, 0x101B, 0x102C }; @@ -416,7 +416,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_ETHIOPIC: { - const sal_Unicode aEthi[] = { + static const sal_Unicode aEthi[] = { 0x130D, 0x12D5, 0x12DD }; sSampleText = OUString(aEthi, SAL_N_ELEMENTS(aEthi)); @@ -424,7 +424,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_CHEROKEE: { - const sal_Unicode aCher[] = { + static const sal_Unicode aCher[] = { 0x13D7, 0x13AA, 0x13EA, 0x13B6, 0x13D9, 0x13D7 }; sSampleText = OUString(aCher, SAL_N_ELEMENTS(aCher)); @@ -432,7 +432,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_KHMER: { - const sal_Unicode aKhmr[] = { + static const sal_Unicode aKhmr[] = { 0x17A2, 0x1780, 0x17D2, 0x1781, 0x179A, 0x1780, 0x17D2, 0x179A, 0x1798, 0x1781, 0x17C1, 0x1798, 0x179A, 0x1797, 0x17B6, 0x179F, 0x17B6 @@ -442,7 +442,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_MONGOLIAN: { - const sal_Unicode aMongolian[] = { + static const sal_Unicode aMongolian[] = { 0x182A, 0x1822, 0x1834, 0x1822, 0x182D, 0x180C }; sSampleText = OUString(aMongolian, SAL_N_ELEMENTS(aMongolian)); @@ -450,7 +450,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_TAGALOG: { - const sal_Unicode aTagalog[] = { + static const sal_Unicode aTagalog[] = { 0x170A, 0x170A, 0x170C, 0x1712 }; sSampleText = OUString(aTagalog, SAL_N_ELEMENTS(aTagalog)); @@ -458,7 +458,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_NEW_TAI_LUE: { - const sal_Unicode aTalu[] = { + static const sal_Unicode aTalu[] = { 0x1991, 0x19BA, 0x199F, 0x19B9, 0x19C9 }; sSampleText = OUString(aTalu, SAL_N_ELEMENTS(aTalu)); @@ -466,7 +466,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_TRADITIONAL_HAN: { - const sal_Unicode aHant[] = { + static const sal_Unicode aHant[] = { 0x7E41 }; sSampleText = OUString(aHant, SAL_N_ELEMENTS(aHant)); @@ -474,7 +474,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_SIMPLIFIED_HAN: { - const sal_Unicode aHans[] = { + static const sal_Unicode aHans[] = { 0x7B80 }; sSampleText = OUString(aHans, SAL_N_ELEMENTS(aHans)); @@ -482,7 +482,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_HAN: { - const sal_Unicode aSimplifiedAndTraditionalChinese[] = { + static const sal_Unicode aSimplifiedAndTraditionalChinese[] = { 0x7B80, 0x7E41 }; sSampleText = OUString(aSimplifiedAndTraditionalChinese, @@ -491,7 +491,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_JAPANESE: { - const sal_Unicode aJpan[] = { + static const sal_Unicode aJpan[] = { 0x65E5, 0x672C, 0x8A9E }; sSampleText = OUString(aJpan, SAL_N_ELEMENTS(aJpan)); @@ -499,7 +499,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_YI: { - const sal_Unicode aYiii[] = { + static const sal_Unicode aYiii[] = { 0xA188, 0xA320, 0xA071, 0xA0B7 }; sSampleText = OUString(aYiii, SAL_N_ELEMENTS(aYiii)); @@ -507,7 +507,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_PHAGS_PA: { - const sal_Unicode aPhag[] = { + static const sal_Unicode aPhag[] = { 0xA84F, 0xA861, 0xA843, 0x0020, 0xA863, 0xA861, 0xA859, 0x0020, 0xA850, 0xA85C, 0xA85E }; @@ -516,7 +516,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) } case USCRIPT_TAI_LE: { - const sal_Unicode aTale[] = { + static const sal_Unicode aTale[] = { 0x1956, 0x196D, 0x1970, 0x1956, 0x196C, 0x1973, 0x1951, 0x1968, 0x1952, 0x1970 }; @@ -542,7 +542,7 @@ OUString makeRepresentativeTextForScript(UScriptCode eScript) case USCRIPT_HAN: { //Three Character Classic - const sal_Unicode aZh[] = { + static const sal_Unicode aZh[] = { 0x4EBA, 0x4E4B, 0x521D, 0x0020, 0x6027, 0x672C, 0x5584 }; sSampleText = OUString(aZh, SAL_N_ELEMENTS(aZh)); @@ -551,7 +551,7 @@ OUString makeRepresentativeTextForScript(UScriptCode eScript) case USCRIPT_JAPANESE: { //'Beautiful Japanese' - const sal_Unicode aJa[] = { + static const sal_Unicode aJa[] = { 0x7F8E, 0x3057, 0x3044, 0x65E5, 0x672C, 0x8A9E }; sSampleText = OUString(aJa, SAL_N_ELEMENTS(aJa)); @@ -561,7 +561,7 @@ OUString makeRepresentativeTextForScript(UScriptCode eScript) case USCRIPT_HANGUL: { //The essential condition for... - const sal_Unicode aKo[] = { + static const sal_Unicode aKo[] = { 0xD0A4, 0xC2A4, 0xC758, 0x0020, 0xACE0, 0xC720, 0xC870, 0xAC74, 0xC740 }; @@ -584,7 +584,7 @@ OUString makeShortMinimalTextForScript(UScriptCode eScript) { case USCRIPT_GREEK: { - const sal_Unicode aGrek[] = { + static const sal_Unicode aGrek[] = { 0x0391, 0x0392 }; sSampleText = OUString(aGrek, SAL_N_ELEMENTS(aGrek)); @@ -592,7 +592,7 @@ OUString makeShortMinimalTextForScript(UScriptCode eScript) } case USCRIPT_HEBREW: { - const sal_Unicode aHebr[] = { + static const sal_Unicode aHebr[] = { 0x05D0, 0x05D1 }; sSampleText = OUString(aHebr, SAL_N_ELEMENTS(aHebr)); @@ -643,7 +643,7 @@ OUString makeRepresentativeTextForLanguage(LanguageType eLang) break; case LANGUAGE_ASSAMESE & LANGUAGE_MASK_PRIMARY: { - const sal_Unicode aAs[] = { + static const sal_Unicode aAs[] = { 0x0985, 0x09B8, 0x09AE, 0x09C0, 0x09AF, 0x09BC, 0x09BE, 0x0020, 0x0986, 0x0996, 0x09F0 }; @@ -727,7 +727,7 @@ OUString makeRepresentativeTextForLanguage(LanguageType eLang) break; case LANGUAGE_GAELIC_IRELAND & LANGUAGE_MASK_PRIMARY: { - const sal_Unicode aGa[] = { + static const sal_Unicode aGa[] = { 'T', 0x00E9, 'a', 'c', 's', ' ', 'S', 'a', 'm', 'p', 'l', 'a', 'c', 'h' }; sRet = OUString(aGa, SAL_N_ELEMENTS(aGa)); @@ -1234,22 +1234,22 @@ namespace bool bKore = false, bJpan = false, bHant = false, bHans = false; - const sal_Unicode aKorean[] = { 0x3131 }; + static const sal_Unicode aKorean[] = { 0x3131 }; OUString sKorean(aKorean, SAL_N_ELEMENTS(aKorean)); if (-1 == rDevice.HasGlyphs(rFont, sKorean)) bKore = true; - const sal_Unicode aJapanese[] = { 0x3007, 0x9F9D }; + static const sal_Unicode aJapanese[] = { 0x3007, 0x9F9D }; OUString sJapanese(aJapanese, SAL_N_ELEMENTS(aJapanese)); if (-1 == rDevice.HasGlyphs(rFont, sJapanese)) bJpan = true; - const sal_Unicode aTraditionalChinese[] = { 0x570B }; + static const sal_Unicode aTraditionalChinese[] = { 0x570B }; OUString sTraditionalChinese(aTraditionalChinese, SAL_N_ELEMENTS(aTraditionalChinese)); if (-1 == rDevice.HasGlyphs(rFont, sTraditionalChinese)) bHant = true; - const sal_Unicode aSimplifiedChinese[] = { 0x56FD }; + static const sal_Unicode aSimplifiedChinese[] = { 0x56FD }; OUString sSimplifiedChinese(aSimplifiedChinese, SAL_N_ELEMENTS(aSimplifiedChinese)); if (-1 == rDevice.HasGlyphs(rFont, sSimplifiedChinese)) bHans = true; diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index 3f65607b0157..7ef909e51f85 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -245,7 +245,7 @@ double CompressGraphicsDialog::GetViewHeightInch() BmpScaleFlag CompressGraphicsDialog::GetSelectedInterpolationType() { - OUString aSelectionText = OUString( m_pInterpolationCombo->GetSelectEntry() ); + OUString aSelectionText = m_pInterpolationCombo->GetSelectEntry(); if( aSelectionText == "Lanczos" ) { return BmpScaleFlag::Lanczos; diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 2df979a56caa..0d8125e0ee04 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -646,10 +646,10 @@ IMPL_LINK_TYPED( SvxIMapDlg, InfoHdl, IMapWindow&, rWnd, void ) m_pStbStatus->SetItemText( 1, rInfo.aMarkURL ); - if ( m_pURLBox->GetText() != OUString(rInfo.aMarkURL) ) + if ( m_pURLBox->GetText() != rInfo.aMarkURL ) m_pURLBox->SetText( rInfo.aMarkURL ); - if ( m_pEdtText->GetText() != OUString(rInfo.aMarkAltText) ) + if ( m_pEdtText->GetText() != rInfo.aMarkAltText ) m_pEdtText->SetText( rInfo.aMarkAltText ); if ( rInfo.aMarkTarget.isEmpty() ) diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 591a811af21f..6bcb4a32f4e4 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -373,7 +373,7 @@ void SvxStyleBox_Impl::ReleaseFocus() IMPL_LINK_TYPED( SvxStyleBox_Impl, MenuSelectHdl, Menu*, pMenu, bool) { - OUString sEntry = OUString( GetSelectEntry() ); + OUString sEntry = GetSelectEntry(); ReleaseFocus(); // It must be after getting entry pos! Sequence< PropertyValue > aArgs( 2 ); aArgs[0].Name = "Param"; diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index b1db568aef9d..e9bc94fe4867 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -648,9 +648,9 @@ bool ChineseDictionaryDialog::isEditFieldsContentEqualsSelectedListContent() con DictionaryEntry* pE = getActiveDictionary().getFirstSelectedEntry(); if( pE ) { - if( pE->m_aTerm != OUString( m_pED_Term->GetText() ) ) + if( pE->m_aTerm != m_pED_Term->GetText() ) return false; - if( pE->m_aMapping != OUString( m_pED_Mapping->GetText() ) ) + if( pE->m_aMapping != m_pED_Mapping->GetText() ) return false; if( pE->m_nConversionPropertyType != m_pLB_Property->GetSelectEntryPos()+1 ) return false; diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 0f71a4f861a1..3d0283d7638b 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1483,21 +1483,21 @@ OUString SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex) { const SwGetRefField* pRefField = dynamic_cast<const SwGetRefField*>(pField); if ( pRefField && pRefField->IsRefToHeadingCrossRefBookmark() ) - sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Headings")); + sEntry = "Headings"; else if ( pRefField && pRefField->IsRefToNumItemCrossRefBookmark() ) - sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Numbered Paragraphs")); + sEntry = "Numbered Paragraphs"; else - sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Bookmarks")); + sEntry = "Bookmarks"; } break; case REF_FOOTNOTE: - sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Footnotes")); + sEntry = "Footnotes"; break; case REF_ENDNOTE: - sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Endnotes")); + sEntry = "Endnotes"; break; case REF_SETREFATTR: - sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Insert Reference")); + sEntry = "Insert Reference"; break; case REF_SEQUENCEFLD: sEntry = static_cast<const SwGetRefField*>(pField)->GetSetRefName(); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 59e4c3debaca..35f27d39e2c6 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2449,7 +2449,7 @@ bool WW8FormulaListBox::Import(const uno::Reference < sal_uInt32 nLen = maListEntries.size(); uno::Sequence< OUString > aListSource(nLen); for (sal_uInt32 nI = 0; nI < nLen; ++nI) - aListSource[nI] = OUString(maListEntries[nI]); + aListSource[nI] = maListEntries[nI]; aTmp <<= aListSource; xPropSet->setPropertyValue("StringItemList", aTmp ); diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 6270ab0eb4d3..17318f982956 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -197,7 +197,7 @@ void SwSpellPopup::fillLangPopupMenu( for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { OUString aEntryText( *it ); - if (aEntryText != OUString( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE ) )&& + if (aEntryText != SvtLanguageTable::GetLanguageString( LANGUAGE_NONE ) && aEntryText != "*" && // multiple languages in current selection !aEntryText.isEmpty()) // 'no language found' from language guessing { diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index f72e370256cc..5bba5c453a09 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -848,7 +848,7 @@ SwFieldDialog::SwFieldDialog( SwEditWin* parent, IFieldmark *fieldBM ) : { const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters(); - OUString sListKey = OUString( ODF_FORMDROPDOWN_LISTENTRY ); + OUString sListKey = ODF_FORMDROPDOWN_LISTENTRY; IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find( sListKey ); if(pListEntries != pParameters->end()) { @@ -863,7 +863,7 @@ SwFieldDialog::SwFieldDialog( SwEditWin* parent, IFieldmark *fieldBM ) : } // Select the current one - OUString sResultKey = OUString( ODF_FORMDROPDOWN_RESULT ); + OUString sResultKey = ODF_FORMDROPDOWN_RESULT; IFieldmark::parameter_map_t::const_iterator pResult = pParameters->find( sResultKey ); if ( pResult != pParameters->end() ) { @@ -901,7 +901,7 @@ IMPL_LINK_TYPED( SwFieldDialog, MyListBoxHandler, ListBox&, rBox, void ) sal_Int32 selection = rBox.GetSelectEntryPos(); if ( selection >= 0 ) { - OUString sKey = OUString( ODF_FORMDROPDOWN_RESULT ); + OUString sKey = ODF_FORMDROPDOWN_RESULT; (*pFieldmark->GetParameters())[ sKey ] = makeAny(selection); pFieldmark->Invalidate(); SwView& rView = static_cast<SwEditWin*>( GetParent() )->GetView(); diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index e9d2fe53dc86..8ee1ad987c56 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -368,7 +368,7 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const bool bNoAttr = !pxCursor && !pxRange; if(bNoAttr) { - sOnlyText = OUString(xTextRange->getString()); + sOnlyText = xTextRange->getString(); pOnlyText = &sOnlyText; } diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index a00ad35b6027..4e97492b1d35 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx @@ -28,31 +28,31 @@ using namespace ::com::sun::star; // static const OUString UCBDeadPropertyValue::aTypeString - = OUString( "string" ); + = "string"; const OUString UCBDeadPropertyValue::aTypeLong - = OUString( "long" ); + = "long"; const OUString UCBDeadPropertyValue::aTypeShort - = OUString( "short" ); + = "short"; const OUString UCBDeadPropertyValue::aTypeBoolean - = OUString( "boolean" ); + = "boolean"; const OUString UCBDeadPropertyValue::aTypeChar - = OUString( "char" ); + = "char"; const OUString UCBDeadPropertyValue::aTypeByte - = OUString( "byte" ); + = "byte"; const OUString UCBDeadPropertyValue::aTypeHyper - = OUString( "hyper" ); + = "hyper"; const OUString UCBDeadPropertyValue::aTypeFloat - = OUString( "float" ); + = "float); const OUString UCBDeadPropertyValue::aTypeDouble - = OUString( "double" ); + = "double"; // static const OUString UCBDeadPropertyValue::aXMLPre - = OUString( "<ucbprop><type>" ); + = "<ucbprop><type>"; const OUString UCBDeadPropertyValue::aXMLMid - = OUString( "</type><value>" ); + = "</type><value>"; const OUString UCBDeadPropertyValue::aXMLEnd - = OUString( "</value></ucbprop>" ); + = "</value></ucbprop>"; /* diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx index f99b1386bacc..da75f1e0dcdd 100644 --- a/unotools/source/config/optionsdlg.cxx +++ b/unotools/source/config/optionsdlg.cxx @@ -136,9 +136,9 @@ void SvtOptionsDlgOptions_Impl::ReadNode( const OUString& _rNode, NodeType _eTyp } Sequence< OUString > lResult( nLen ); - lResult[0] = OUString( sNode + "Hide" ); + lResult[0] = sNode + "Hide"; if ( _eType != NT_Option ) - lResult[1] = OUString( sNode + sSet ); + lResult[1] = sNode + sSet; Sequence< Any > aValues; aValues = GetProperties( lResult ); diff --git a/vcl/unx/generic/print/prtsetup.cxx b/vcl/unx/generic/print/prtsetup.cxx index a89ded554bc9..0bea78b66c8f 100644 --- a/vcl/unx/generic/print/prtsetup.cxx +++ b/vcl/unx/generic/print/prtsetup.cxx @@ -495,7 +495,7 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey ) if (pValue->m_bCustomOption) aEntry = VclResId(SV_PRINT_CUSTOM_TXT); else - aEntry = OUString(m_pParent->m_aJobData.m_pParser->translateOption( pKey->getKey(), pValue->m_aOption)); + aEntry = m_pParent->m_aJobData.m_pParser->translateOption( pKey->getKey(), pValue->m_aOption); sal_uInt16 nPos = m_pPPDValueBox->InsertEntry( aEntry ); m_pPPDValueBox->SetEntryData( nPos, const_cast<PPDValue *>(pValue) ); } diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index 3f64864c3be4..82c2fa84fff6 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -145,7 +145,7 @@ void Imp_PutDoubleChar(OUString& rStr, double fValue) { OUStringBuffer sStringBuffer; ::sax::Converter::convertDouble(sStringBuffer, fValue); - rStr += OUString(sStringBuffer.makeStringAndClear()); + rStr += sStringBuffer.makeStringAndClear(); } void Imp_PutDoubleChar(OUString& rStr, const SvXMLUnitConverter& rConv, double fValue, @@ -160,7 +160,7 @@ void Imp_PutDoubleChar(OUString& rStr, const SvXMLUnitConverter& rConv, double f ::sax::Converter::convertDouble(sStringBuffer, fValue); } - rStr += OUString(sStringBuffer.makeStringAndClear()); + rStr += sStringBuffer.makeStringAndClear(); } // base class of all 2D transform objects diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 8200fd0dcbfb..5d71222e0c96 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -2156,7 +2156,7 @@ void SvXMLNumFormatContext::AddColor( sal_uInt32 const nColor ) for ( sal_uInt16 i=0; i<XML_NUMF_COLORCOUNT; i++ ) if (nColor == aNumFmtStdColors[i]) { - aColName = OUString( pFormatter->GetKeyword( nFormatLang, sal::static_int_cast< sal_uInt16 >(NF_KEY_FIRSTCOLOR + i) ) ); + aColName = pFormatter->GetKeyword( nFormatLang, sal::static_int_cast< sal_uInt16 >(NF_KEY_FIRSTCOLOR + i) ); break; } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 895c0f08802a..708334b999d6 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -1027,9 +1027,9 @@ void XMLTextParagraphExport::exportListChange( eLName = ( rNextInfo.IsNumbered() || nListLevelsToBeOpened > 1 ) ? XML_LIST_ITEM : XML_LIST_HEADER; - aElem = OUString( GetExport().GetNamespaceMap().GetQNameByKey( + aElem = GetExport().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TEXT, - GetXMLToken(eLName) ) ); + GetXMLToken(eLName) ); GetExport().IgnorableWhitespace(); GetExport().StartElement(aElem, false); pListElements->push_back(aElem); |