diff options
73 files changed, 139 insertions, 174 deletions
diff --git a/avmedia/source/quicktime/quicktimeuno.mm b/avmedia/source/quicktime/quicktimeuno.mm index befff1c9ec4b..eb48c10e6613 100644 --- a/avmedia/source/quicktime/quicktimeuno.mm +++ b/avmedia/source/quicktime/quicktimeuno.mm @@ -38,7 +38,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaQuickTime_component_getFac if( rtl_str_compare( pImplName, AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ) == 0 ) { - const ::rtl::OUString aServiceName( ::rtl::OUString(AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ) ); + const ::rtl::OUString aServiceName( AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ); xFactory.set( ::cppu::createSingleFactory( static_cast< lang::XMultiServiceFactory* >( pServiceManager ), diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 65a97b3d554f..0f4ed3da7901 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -61,7 +61,7 @@ OUString lcl_GetRoleLBEntry( aEntry.append( OUString( ::chart::DialogModel::ConvertRoleFromInternalToUI( rRole )) ); aEntry.append( "\t" ); - aEntry.append(OUString( rRange )); + aEntry.append( rRange ); OUString sFoo = aEntry.makeStringAndClear(); return sFoo; diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index ca663f9996ed..fe127421ac19 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -307,7 +307,7 @@ short SvInsertOleDlg::Execute() // create MediaDescriptor for file to create object from uno::Sequence < beans::PropertyValue > aMedium( 2 ); aMedium[0].Name = "URL"; - aMedium[0].Value <<= OUString( aFileName ); + aMedium[0].Value <<= aFileName; uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); uno::Reference< task::XInteractionHandler2 > xInteraction( diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 3d44a8593994..299176c7e131 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -330,7 +330,7 @@ bool SvxThesaurusDialog::UpdateAlternativesBox_Impl() void SvxThesaurusDialog::LookUp( const OUString &rText ) { - if (OUString(rText) != m_pWordCB->GetText()) // avoid moving of the cursor if the text is the same + if (rText != m_pWordCB->GetText()) // avoid moving of the cursor if the text is the same m_pWordCB->SetText( rText ); LookUp_Impl(); } diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index a192a99daf06..744e5afb3269 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -310,8 +310,8 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal if (!sPassword.isEmpty()) aReturn.push_back( - PropertyValue( "password", 0, - makeAny(OUString(sPassword)), PropertyState_DIRECT_VALUE)); + PropertyValue( "password", 0, + makeAny(sPassword), PropertyState_DIRECT_VALUE)); } if ( !aReturn.empty() ) diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 0b65295bc8c3..1ced37e208db 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -193,7 +193,7 @@ namespace dbaui m_pOutput->SetText(OUString()); if (xStatement.is()) { - if (OUString(_rStatement).toAsciiUpperCase().startsWith("SELECT") && m_pShowOutput->IsChecked()) + if (_rStatement.toAsciiUpperCase().startsWith("SELECT") && m_pShowOutput->IsChecked()) { // execute it as a query xResultSet = xStatement->executeQuery(_rStatement); @@ -220,7 +220,7 @@ namespace dbaui { } // report the output - addOutputText(OUString(out)); + addOutputText(out); } } else { // execute it diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index 1ab5b914c9b7..680766a3006a 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -158,7 +158,7 @@ void lcl_fillComboList( ComboBox& _rList, const Reference< XConnection >& _rxCon _rList.InsertEntry( sValue ); } - sal_Int32 nPos = _rList.GetEntryPos( OUString( _rCurrent ) ); + sal_Int32 nPos = _rList.GetEntryPos( _rCurrent ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) _rList.SelectEntryPos( nPos ); else @@ -217,12 +217,12 @@ OSaveAsDlg::OSaveAsDlg( vcl::Window * pParent, sTable, ::dbtools::EComposeRule::InDataManipulation); - sal_Int32 nPos = m_pImpl->m_pCatalog->GetEntryPos(OUString(sCatalog)); + sal_Int32 nPos = m_pImpl->m_pCatalog->GetEntryPos(sCatalog); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) m_pImpl->m_pCatalog->SelectEntryPos(nPos); if ( !sSchema.isEmpty() ) { - nPos = m_pImpl->m_pSchema->GetEntryPos(OUString(sSchema)); + nPos = m_pImpl->m_pSchema->GetEntryPos(sSchema); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) m_pImpl->m_pSchema->SelectEntryPos(nPos); } diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index acfc9376d32a..a2f7c04fdd24 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -367,7 +367,7 @@ bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rComp,co if ( _rFilter.Handle == SQLFilterOperator::LIKE || _rFilter.Handle == SQLFilterOperator::NOT_LIKE ) ::Replace_OS_PlaceHolder( sPredicateValue ); - _rFilter.Value <<= OUString(sPredicateValue); + _rFilter.Value <<= sPredicateValue; } return bHaving; } diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx index 460bebf4fa4b..127d6ffee4ef 100644 --- a/dbaccess/source/ui/misc/WColumnSelect.cxx +++ b/dbaccess/source/ui/misc/WColumnSelect.cxx @@ -329,7 +329,7 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight, if(_pRight == m_pNewColumnNames) { // we copy the column into the new format for the dest - OFieldDescription* pSrcField = static_cast<OFieldDescription*>(_pLeft->GetEntryData(_pLeft->GetEntryPos(OUString(_sColumnName)))); + OFieldDescription* pSrcField = static_cast<OFieldDescription*>(_pLeft->GetEntryData(_pLeft->GetEntryPos(_sColumnName))); createNewColumn(_pRight,pSrcField,_rRightColumns,_sColumnName,_sExtraChars,_nMaxNameLen,_aCase); } else diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 615b0d453e06..83bace868f04 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -242,7 +242,7 @@ void Desktop::CreateTemporaryDirectory() DesktopResId aResId( STR_BOOTSTRAP_ERR_NO_PATHSET_SERVICE ); aResId.SetRT( RSC_STRING ); if ( aResId.GetResMgr()->IsAvailable( aResId )) - aMsg = OUString( aResId ); + aMsg = aResId; else aMsg = "The path manager is not available.\n"; e.Message = aMsg + e.Message; diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx index 8e607ac8b594..3b0ebe9b9024 100644 --- a/desktop/source/migration/services/wordbookmigration.cxx +++ b/desktop/source/migration/services/wordbookmigration.cxx @@ -109,7 +109,7 @@ namespace migration bool IsUserWordbook( const OUString& rFile ) { bool bRet = false; - SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( OUString(rFile), StreamMode::STD_READ ); + SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( rFile, StreamMode::STD_READ ); if ( pStream && !pStream->GetError() ) { static const sal_Char* const pVerOOo7 = "OOoUserDict1"; diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 6f9386e81efb..d935d0a98b0c 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -190,9 +190,9 @@ namespace dbp { // build the statement to set as list source OUString sStatement = "SELECT DISTINCT " + - OUString( getSettings().sListContentField ) + - " FROM " + OUString( getSettings().sListContentTable ); - getContext().xObjectModel->setPropertyValue( "ListSource", makeAny(OUString(sStatement))); + getSettings().sListContentField + + " FROM " + getSettings().sListContentTable; + getContext().xObjectModel->setPropertyValue( "ListSource", makeAny(sStatement)); } // the bound field diff --git a/filter/source/msfilter/rtfutil.cxx b/filter/source/msfilter/rtfutil.cxx index 6b1dd95ed9f6..ad1e9d13fbfa 100644 --- a/filter/source/msfilter/rtfutil.cxx +++ b/filter/source/msfilter/rtfutil.cxx @@ -134,7 +134,7 @@ OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, bool* pS OString OutString(const OUString& rStr, rtl_TextEncoding eDestEnc, bool bUnicode) { - SAL_INFO("filter.ms", OSL_THIS_FUNC << ", rStr = '" << OUString(rStr) << "'"); + SAL_INFO("filter.ms", OSL_THIS_FUNC << ", rStr = '" << rStr << "'"); OStringBuffer aBuf; int nUCMode = 1; for (sal_Int32 n = 0; n < rStr.getLength(); ++n) diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index 82d39d1c9348..f45ceb20895d 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -1000,8 +1000,8 @@ OUString SAL_CALL SvtFilePicker::getCurrentFilter() checkAlive(); SolarMutexGuard aGuard; - OUString aFilter = getDialog() ? OUString( getDialog()->GetCurFilter() ) : - OUString( m_aCurrentFilter ); + OUString aFilter = getDialog() ? getDialog()->GetCurFilter() : + m_aCurrentFilter; return aFilter; } diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx index 8e37eb086867..40e0373edbeb 100644 --- a/reportdesign/source/filter/xml/xmlStyleImport.cxx +++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx @@ -150,10 +150,10 @@ OReportStylesContext::OReportStylesContext( ORptFilter& rImport, const Reference< XAttributeList > & xAttrList, const bool bTempAutoStyles ) : SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList ), - m_sTableStyleFamilyName( OUString( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME )), - m_sColumnStyleFamilyName( OUString( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME )), - m_sRowStyleFamilyName( OUString( XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME )), - m_sCellStyleFamilyName( OUString( XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME )), + m_sTableStyleFamilyName( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME ), + m_sColumnStyleFamilyName( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME ), + m_sRowStyleFamilyName( XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME ), + m_sCellStyleFamilyName( XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME ), m_rImport(rImport), m_nNumberFormatIndex(-1), bAutoStyles(bTempAutoStyles) diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index d237e539507a..49da87c08706 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -585,8 +585,7 @@ bool ScDocument::LinkExternalTab( SCTAB& rTab, const OUString& aDocTab, ScTableLink* pLink = new ScTableLink( pShell, aFileName, aFilterName, aOptions, nRefreshDelay ); pLink->SetInCreate( true ); OUString aFilName = aFilterName; - GetLinkManager()->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, OUString(aFileName), - &aFilName ); + GetLinkManager()->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aFilName ); pLink->Update(); pLink->SetInCreate( false ); SfxBindings* pBindings = GetViewBindings(); diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx index 526209c62138..c55024be774a 100644 --- a/sc/source/core/data/tabprotection.cxx +++ b/sc/source/core/data/tabprotection.cxx @@ -300,7 +300,7 @@ bool ScTableProtectionImpl::verifyPassword(const OUString& aPassText) const { #if DEBUG_TAB_PROTECTION fprintf(stdout, "ScTableProtectionImpl::verifyPassword: input = '%s'\n", - OUStringToOString(OUString(aPassText), RTL_TEXTENCODING_UTF8).getStr()); + OUStringToOString(aPassText, RTL_TEXTENCODING_UTF8).getStr()); #endif if (mbEmptyPass) diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 832698f3bd00..636af760bb18 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -2051,7 +2051,7 @@ void XclImpTbxObjBase::ConvertLabel( ScfPropertySet& rPropSet ) const Reference< css::beans::XPropertySet > xPropset( mxShape, UNO_QUERY ); try{ if(xPropset.is()) - xPropset->setPropertyValue( "Description", makeAny(::rtl::OUString(aLabel)) ); + xPropset->setPropertyValue( "Description", makeAny(aLabel) ); }catch( ... ) { SAL_WARN("sc.filter", "Can't set a default text for TBX Control "); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 0b0397072fe9..625564e7d13a 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3629,7 +3629,7 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape > SvXMLElementExport aDateElem( *this, XML_NAMESPACE_META, XML_DATE_STRING, true, false ); - Characters(OUString(aDate)); + Characters(aDate); } } else @@ -3637,7 +3637,7 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape > SvXMLElementExport aDateElem( *this, XML_NAMESPACE_META, XML_DATE_STRING, true, false ); - Characters(OUString(aDate)); + Characters(aDate); } } } diff --git a/sc/source/filter/xml/xmlsceni.cxx b/sc/source/filter/xml/xmlsceni.cxx index 1918b3116f05..246317b3fe0b 100644 --- a/sc/source/filter/xml/xmlsceni.cxx +++ b/sc/source/filter/xml/xmlsceni.cxx @@ -144,7 +144,7 @@ void ScXMLTableScenarioContext::EndElement() nFlags |= ScScenarioFlags::Value; if( bProtected ) nFlags |= ScScenarioFlags::Protected; - pDoc->SetScenarioData( nCurrTable, OUString( sComment ), aBorderColor, nFlags ); + pDoc->SetScenarioData( nCurrTable, sComment, aBorderColor, nFlags ); for( size_t i = 0; i < aScenarioRanges.size(); ++i ) { ScRange* pRange(aScenarioRanges[ i ]); diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index a90af8136fb0..dfc50ffe40dc 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -186,8 +186,8 @@ static void save_Separators( bool bDetectSpecialNum, bool bFixedWidth, sal_Int32 nFromRow, sal_Int32 nCharSet, sal_Int32 nLanguage, ScImportAsciiCall eCall ) { - OUString sFieldSeparators = OUString( maSeparators ); - OUString sTextSeparators = OUString( maTxtSep ); + OUString sFieldSeparators = maSeparators; + OUString sTextSeparators = maTxtSep; Sequence<Any> aValues; Any *pProperties; Sequence<OUString> aNames( eCall == SC_TEXTTOCOLUMNS ? 4 : 9 ); diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 6349b16f081e..ca1b9f43a116 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -329,7 +329,7 @@ css::uno::Reference< css::accessibility::XAccessible > ScEditWindow::CreateAcces break; } pAcc = new ScAccessibleEditObject(GetAccessibleParentWindow()->GetAccessible(), pEdView, this, - OUString(sName), OUString(sDescription), ScAccessibleEditObject::EditControl); + sName, sDescription, ScAccessibleEditObject::EditControl); css::uno::Reference< css::accessibility::XAccessible > xAccessible = pAcc; xAcc = xAccessible; return pAcc; diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index e0da8f95128e..9323e066978f 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -1036,8 +1036,8 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const OUString& rDocName } else { - OSL_ENSURE(OUString(aFltName) == rDoc.GetLinkFlt(i) && - OUString(aOptions) == rDoc.GetLinkOpt(i), + OSL_ENSURE(aFltName == rDoc.GetLinkFlt(i) && + aOptions == rDoc.GetLinkOpt(i), "different Filter for a Document?"); } pTabs[nCount] = i; diff --git a/sc/source/ui/unoobj/TablePivotCharts.cxx b/sc/source/ui/unoobj/TablePivotCharts.cxx index 62fb682398e9..e07be4068e59 100644 --- a/sc/source/ui/unoobj/TablePivotCharts.cxx +++ b/sc/source/ui/unoobj/TablePivotCharts.cxx @@ -146,7 +146,7 @@ void SAL_CALL TablePivotCharts::addNewByName(OUString const & rName, xReceiver->attachNumberFormatsSupplier(xNumberFormatsSupplier); uno::Sequence<beans::PropertyValue> aArgs(3); - aArgs[0] = beans::PropertyValue("CellRangeRepresentation", -1, uno::makeAny(OUString(rDataPilotName)), beans::PropertyState_DIRECT_VALUE); + aArgs[0] = beans::PropertyValue("CellRangeRepresentation", -1, uno::makeAny(rDataPilotName), beans::PropertyState_DIRECT_VALUE); aArgs[1] = beans::PropertyValue("HasCategories", -1, uno::makeAny(true), beans::PropertyState_DIRECT_VALUE); aArgs[2] = beans::PropertyValue("DataRowSource", -1, uno::makeAny(chart::ChartDataRowSource_COLUMNS), beans::PropertyState_DIRECT_VALUE); xReceiver->setArguments(aArgs); diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx index 04f760605948..1e7f5c62dd1b 100644 --- a/sc/source/ui/unoobj/addruno.cxx +++ b/sc/source/ui/unoobj/addruno.cxx @@ -267,7 +267,7 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const OUString& aPro OUString aSecond(aRange.aEnd.Format(nFlags, &rDoc, eConv)); aFormatStr += aSecond ; } - aRet <<= OUString( aFormatStr ); + aRet <<= aFormatStr; } else throw beans::UnknownPropertyException(); diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 2975450d8fb0..54ef310917e9 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -8416,7 +8416,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn OUString aCodeName; if ( pDocSh ) pDocSh->GetDocument().GetCodeName( GetTab_Impl(), aCodeName ); - rAny <<= OUString( aCodeName ); + rAny <<= aCodeName; } else if (pEntry->nWID == SC_WID_UNO_CONDFORMAT) { diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index 63bc43a72400..c9da280e6955 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -228,7 +228,7 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName, uno::Sequence< beans::PropertyValue > aArgs( 4 ); aArgs[0] = beans::PropertyValue( "CellRangeRepresentation", -1, - uno::makeAny( OUString( sRangeStr )), beans::PropertyState_DIRECT_VALUE ); + uno::makeAny( sRangeStr ), beans::PropertyState_DIRECT_VALUE ); aArgs[1] = beans::PropertyValue( "HasCategories", -1, uno::makeAny( bRowHeaders ), beans::PropertyState_DIRECT_VALUE ); diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index a5dff8e25d20..042200424777 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -2053,7 +2053,7 @@ uno::Any SAL_CALL ScDatabaseRangeObj::getPropertyValue( const OUString& aPropert // ScLinkTargetTypeObj::SetLinkTargetBitmap( aRet, SC_LINKTARGETTYPE_DBAREA ); } else if ( aPropertyName == SC_UNO_LINKDISPNAME ) - aRet <<= OUString( aName ); + aRet <<= aName; else if (aPropertyName == SC_UNONAME_AUTOFLT ) { bool bAutoFilter(GetDBData_Impl()->HasAutoFilter()); diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index 9035d1326d3d..5f7c71160f03 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -909,10 +909,10 @@ uno::Any SAL_CALL ScTableValidationObj::getPropertyValue( const OUString& aPrope else if ( aPropertyName == SC_UNONAME_SHOWERR ) aRet <<= bShowError; else if ( aPropertyName == SC_UNONAME_IGNOREBL ) aRet <<= bIgnoreBlank; else if ( aPropertyName == SC_UNONAME_SHOWLIST ) aRet <<= nShowList; - else if ( aPropertyName == SC_UNONAME_INPTITLE ) aRet <<= OUString( aInputTitle ); - else if ( aPropertyName == SC_UNONAME_INPMESS ) aRet <<= OUString( aInputMessage ); - else if ( aPropertyName == SC_UNONAME_ERRTITLE ) aRet <<= OUString( aErrorTitle ); - else if ( aPropertyName == SC_UNONAME_ERRMESS ) aRet <<= OUString( aErrorMessage ); + else if ( aPropertyName == SC_UNONAME_INPTITLE ) aRet <<= aInputTitle; + else if ( aPropertyName == SC_UNONAME_INPMESS ) aRet <<= aInputMessage; + else if ( aPropertyName == SC_UNONAME_ERRTITLE ) aRet <<= aErrorTitle; + else if ( aPropertyName == SC_UNONAME_ERRMESS ) aRet <<= aErrorMessage; else if ( aPropertyName == SC_UNONAME_TYPE ) { sheet::ValidationType eType = sheet::ValidationType_ANY; diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 3fb3667e7f02..2a266d94dd17 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -386,7 +386,7 @@ uno::Any SAL_CALL ScNamedRangeObj::getPropertyValue( const OUString& rPropertyNa // ScLinkTargetTypeObj::SetLinkTargetBitmap( aRet, SC_LINKTARGETTYPE_RANGENAME ); } else if ( rPropertyName == SC_UNO_LINKDISPNAME ) - aRet <<= OUString( aName ); + aRet <<= aName; else if ( rPropertyName == SC_UNONAME_TOKENINDEX ) { // get index for use in formula tokens (read-only) diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx index ad58594f95e0..569a054419d3 100644 --- a/sc/source/ui/unoobj/targuno.cxx +++ b/sc/source/ui/unoobj/targuno.cxx @@ -240,7 +240,7 @@ uno::Any SAL_CALL ScLinkTargetTypeObj::getPropertyValue(const OUString& Property if ( PropertyName == SC_UNO_LINKDISPBIT ) SetLinkTargetBitmap( aRet, nType ); else if ( PropertyName == SC_UNO_LINKDISPNAME ) - aRet <<= OUString( aName ); + aRet <<= aName; return aRet; } diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index c5b10dc7ce11..ddd16da0ded0 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -669,7 +669,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink uno::Sequence < beans::PropertyValue > aMedium(1); aMedium[0].Name = "URL"; - aMedium[0].Value <<= OUString( aStrURL ); + aMedium[0].Value <<= aStrURL; comphelper::EmbeddedObjectContainer aCnt( xStorage ); OUString aName; diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 576c17805ce9..2c34c5e068c9 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -130,7 +130,7 @@ void ModifyListenerForewarder::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /* } SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, sal_uInt16 _nMask) -: SdStyleSheetBase( OUString( rDisplayName ), _rPool, eFamily, _nMask) +: SdStyleSheetBase( rDisplayName, _rPool, eFamily, _nMask) , ::cppu::BaseMutex() , msApiName( rDisplayName ) , mxPool( &_rPool ) diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 2422766ccfa0..c2f03a7cf7cc 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -798,7 +798,7 @@ Reference< graphic::XGraphic> SdPhotoAlbumDialog::createXGraphicFromUrl(const OU { // The same as above, except this returns an XGraphic from the image URL ::comphelper::NamedValueCollection aMediaProperties; - aMediaProperties.put( "URL", OUString( sUrl ) ); + aMediaProperties.put( "URL", sUrl ); Reference< graphic::XGraphic> xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() ); return xGraphic; diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 39688be50520..e3b59fa2ee97 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1526,7 +1526,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_QUERY_THROW ); Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY_THROW ); - xPropSet->setPropertyValue( "Label" , Any( OUString( rText ) ) ); + xPropSet->setPropertyValue( "Label" , Any( rText ) ); xPropSet->setPropertyValue( "TargetURL" , Any( sTargetURL ) ); if( !rTarget.isEmpty() ) diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 8cf53b51ea94..75d8038db66a 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -87,7 +87,7 @@ bool SvFileObject::GetData( css::uno::Any & rData, // The media in the application must be opened to lookup the // relative file links!! This is done through the link manager // of the Storage. - rData <<= OUString( sFileNm ); + rData <<= sFileNm; } break; @@ -191,7 +191,7 @@ bool SvFileObject::GetData( css::uno::Any & rData, break; case FILETYPE_OBJECT: // TODO/LATER: possibility to insert a new object - rData <<= OUString( sFileNm ); + rData <<= sFileNm; break; } return true/*0 != aTypeList.Count()*/; @@ -350,7 +350,7 @@ OUString impl_getFilter( const OUString& _rURL ) if ( xTypeDetection.is() ) { utl::MediaDescriptor aDescr; - aDescr[ utl::MediaDescriptor::PROP_URL() ] <<= OUString( _rURL ); + aDescr[ utl::MediaDescriptor::PROP_URL() ] <<= _rURL; css::uno::Sequence< css::beans::PropertyValue > aDescrList = aDescr.getAsConstPropertyValueList(); OUString sType = xTypeDetection->queryTypeByDescriptor( aDescrList, true ); diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx index e42be6dd3ac0..62126dd0d6f8 100644 --- a/sfx2/source/bastyp/helper.cxx +++ b/sfx2/source/bastyp/helper.cxx @@ -101,7 +101,7 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL ) aRow += aType; aRow += "\t"; aRow += xContentAccess->queryContentIdentifierString(); - aList.push_back( OUString( aRow ) ); + aList.push_back( aRow ); } } catch( const ucb::CommandAbortedException& ) diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 7e6c4692553d..106f87b22982 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -636,7 +636,7 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl, Button*, void) } SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId); - aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( sData ) ) ); + aPageOpt.SetUserItem( USERITEM_NAME, makeAny( sData ) ); EndDialog( RET_OK ); } else diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index d74c57e53f23..ccacc752731c 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -528,7 +528,7 @@ bool SfxDocumentInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const } if ( bIsString ) - rVal <<= OUString( aValue ); + rVal <<= aValue; else if ( bIsInt ) rVal <<= nValue; else diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 16633aefb500..6ea2e62a316a 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2011,7 +2011,7 @@ void FileDialogHelper_Impl::saveConfig() } if ( bWriteConfig ) - aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aUserData ) ) ); + aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( aUserData ) ); } SfxApplication *pSfxApp = SfxGetpApp(); diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 757df710d019..df326ed7cc69 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -125,7 +125,7 @@ void SearchDialog::SaveConfig() sUserData += ";"; sUserData += OUString::number( m_pBackwardsBox->IsChecked() ? 1 : 0 ); - Any aUserItem = makeAny( OUString( sUserData ) ); + Any aUserItem = makeAny( sUserData ); aViewOpt.SetUserItem( "UserItem", aUserItem ); } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 04bb0d07d19d..e4910a28e06c 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -359,7 +359,7 @@ void SfxTabDialog::dispose() } SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId); - aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aPageData ) ) ); + aPageOpt.SetUserItem( USERITEM_NAME, makeAny( aPageData ) ); } pDataObject->pTabPage.disposeAndClear(); @@ -663,7 +663,7 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId ) } SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId); - aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aPageData ) ) ); + aPageOpt.SetUserItem( USERITEM_NAME, makeAny( aPageData ) ); } pDataObject->pTabPage.disposeAndClear(); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index d102167352c8..979429bb9829 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2377,7 +2377,7 @@ void SfxMedium::GetMedium_Impl() { if ( bFromTempFile ) { - aMedium[utl::MediaDescriptor::PROP_URL()] <<= OUString( aFileName ); + aMedium[utl::MediaDescriptor::PROP_URL()] <<= aFileName; aMedium.erase( utl::MediaDescriptor::PROP_READONLY() ); aMedium.addInputStream(); } diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index f0d2bac19464..5e14dc699f69 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -551,7 +551,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread aTarget.transferContent( aSource, ::ucbhelper::InsertOperation::Copy, - OUString(sFileName), + sFileName, css::ucb::NameClash::OVERWRITE); } } @@ -652,7 +652,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >& // and append the local filename aCheckedArgs.realloc( aCheckedArgs.getLength()+1 ); aCheckedArgs[nProps].Name = "LocalFileName"; - aCheckedArgs[nProps++].Value <<= OUString( sTemp ); + aCheckedArgs[nProps++].Value <<= sTemp; } else // It's a valid URL. but now we must know, if it is a local one or not. diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index 7e5a4be0e59e..b68b8ab61189 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -438,8 +438,8 @@ bool SfxFrameLoader_Impl::impl_determineTemplateDocument( ::comphelper::NamedVal if ( pTemplateFilter ) { // load the template document, but, well, "as template" - io_rDescriptor.put( "FilterName", OUString( pTemplateFilter->GetName() ) ); - io_rDescriptor.put( "FileName", OUString( sTemplateURL ) ); + io_rDescriptor.put( "FilterName", pTemplateFilter->GetName() ); + io_rDescriptor.put( "FileName", sTemplateURL ); io_rDescriptor.put( "AsTemplate", true ); // #i21583# diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx index c9f63d2e1e5d..b29a6813ecad 100644 --- a/svl/source/items/custritm.cxx +++ b/svl/source/items/custritm.cxx @@ -45,10 +45,9 @@ bool CntUnencodedStringItem::GetPresentation(SfxItemPresentation, MapUnit, } // virtual -bool CntUnencodedStringItem::QueryValue(css::uno::Any& rVal, sal_uInt8) - const +bool CntUnencodedStringItem::QueryValue(css::uno::Any& rVal, sal_uInt8) const { - rVal <<= OUString(m_aValue); + rVal <<= m_aValue; return true; } diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 4d63b6669024..fa53cf0d2208 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -715,27 +715,21 @@ void SvtMiscOptions_Impl::ImplCommit() Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames() { - // Build list of configuration key names. - const OUString pProperties[] = + return Sequence<OUString> { - OUString(PROPERTYNAME_PLUGINSENABLED), - OUString(PROPERTYNAME_SYMBOLSET), - OUString(PROPERTYNAME_TOOLBOXSTYLE), - OUString(PROPERTYNAME_USESYSTEMFILEDIALOG), - OUString(PROPERTYNAME_ICONTHEME), - OUString(PROPERTYNAME_USESYSTEMPRINTDIALOG), - OUString(PROPERTYNAME_SHOWLINKWARNINGDIALOG), - OUString(PROPERTYNAME_DISABLEUICUSTOMIZATION), - OUString(PROPERTYNAME_EXPERIMENTALMODE), - OUString(PROPERTYNAME_MACRORECORDERMODE), - OUString(PROPERTYNAME_SIDEBARICONSIZE), - OUString(PROPERTYNAME_NOTEBOOKBARICONSIZE) + PROPERTYNAME_PLUGINSENABLED, + PROPERTYNAME_SYMBOLSET, + PROPERTYNAME_TOOLBOXSTYLE, + PROPERTYNAME_USESYSTEMFILEDIALOG, + PROPERTYNAME_ICONTHEME, + PROPERTYNAME_USESYSTEMPRINTDIALOG, + PROPERTYNAME_SHOWLINKWARNINGDIALOG, + PROPERTYNAME_DISABLEUICUSTOMIZATION, + PROPERTYNAME_EXPERIMENTALMODE, + PROPERTYNAME_MACRORECORDERMODE, + PROPERTYNAME_SIDEBARICONSIZE, + PROPERTYNAME_NOTEBOOKBARICONSIZE }; - - // Initialize return sequence with these list ... - const Sequence< OUString > seqPropertyNames( pProperties, SAL_N_ELEMENTS( pProperties ) ); - // ... and return it. - return seqPropertyNames; } namespace { diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index e1189e451af5..d4da3e7a0fa2 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -2011,7 +2011,7 @@ bool HTMLParser::ParseMetaOptionsImpl( try { xUDProps->addProperty(aName, beans::PropertyAttribute::REMOVABLE, - uno::makeAny(OUString(aContent))); + uno::makeAny(aContent)); AddMetaUserDefined(aName); bChanged = true; } catch (uno::Exception &) { diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx index d87cc92a3a85..0568defa3ff1 100644 --- a/svx/source/core/extedit.cxx +++ b/svx/source/core/extedit.cxx @@ -122,7 +122,7 @@ void ExternalToolEdit::Edit(GraphicObject const*const pGraphicObject) } // Move it to a file name with image extension properly set - aTempFileName = aTempFileBase + "." + OUString(fExtension); + aTempFileName = aTempFileBase + "." + fExtension; // FIXME: this is pretty stupid, need a better osl temp file API rc = osl::File::move(aTempFileBase, aTempFileName); if (osl::FileBase::E_None != rc) diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 51744355fa5a..9f913c0ec943 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -580,9 +580,9 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void ) sRealName += "_"; sRealName += sPurePostfix; if (i) - xSecondCol->setPropertyValue(FM_PROP_NAME, makeAny(OUString(sRealName))); + xSecondCol->setPropertyValue(FM_PROP_NAME, makeAny(sRealName)); else - xCol->setPropertyValue(FM_PROP_NAME, makeAny(OUString(sRealName))); + xCol->setPropertyValue(FM_PROP_NAME, makeAny(sRealName)); } } else diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 7862c8f1ea5b..c90354bbc7b8 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2403,7 +2403,7 @@ namespace svxform { m_xTempBinding->setPropertyValue( - sPropName, makeAny( OUString( sNewCondition ) ) ); + sPropName, makeAny( sNewCondition ) ); } } } diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 7f26842fa0b7..caa16f3c76cd 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -827,7 +827,7 @@ bool SdrOle2Obj::UpdateLinkURL_Impl() // TODO/LATER: there should be possible to get current mediadescriptor settings from the object uno::Sequence< beans::PropertyValue > aArgs( 1 ); aArgs[0].Name = "URL"; - aArgs[0].Value <<= OUString( aNewLinkURL ); + aArgs[0].Value <<= aNewLinkURL; xPersObj->reload( aArgs, uno::Sequence< beans::PropertyValue >() ); mpImpl->maLinkURL = aNewLinkURL; diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx index be9177dd47a4..c485a813e195 100644 --- a/sw/source/core/access/acctextframe.cxx +++ b/sw/source/core/access/acctextframe.cxx @@ -96,7 +96,7 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * msTitle = sNewTitle; AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::NAME_CHANGED; - aEvent.OldValue <<= OUString( sOldTitle ); + aEvent.OldValue <<= sOldTitle; aEvent.NewValue <<= msTitle; FireAccessibleEvent( aEvent ); diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx index c7fc32b45878..eab9bb0e781d 100644 --- a/sw/source/core/doc/SwStyleNameMapper.cxx +++ b/sw/source/core/doc/SwStyleNameMapper.cxx @@ -350,7 +350,7 @@ lcl_NewUINameArray(sal_uInt16 nStt, sal_uInt16 const nEnd) while( nStt < nEnd ) { const ResId aRId( nStt, *pSwResMgr ); - pNameArray->push_back(OUString(aRId)); + pNameArray->push_back(aRId); ++nStt; } return pNameArray; diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index 7ac1331cb888..27addb54bed4 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -265,7 +265,7 @@ bool SwAutoCompleteWord::InsertWord( const OUString& rWord, SwDoc& rDoc ) std::pair<editeng::SortedAutoCompleteStrings::const_iterator, bool> aInsPair = m_WordList.insert(pNew); - m_LookupTree.insert( OUString(aNewWord).copy(0, nWrdLen) ); + m_LookupTree.insert( aNewWord.copy(0, nWrdLen) ); if (aInsPair.second) { diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 3bd8d906f10e..00cc9799553f 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -1080,7 +1080,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const //and it's one of the initially created sequence fields //then the localized names has to be replaced by a programmatic name OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), true); - rAny <<= OUString( sMyFormula ); + rAny <<= sMyFormula; } break; case FIELD_PROP_DOUBLE: @@ -1094,7 +1094,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const } break; case FIELD_PROP_PAR3: - rAny <<= OUString( aPText ); + rAny <<= aPText; break; case FIELD_PROP_BOOL3: rAny <<= 0 != (nSubType & nsSwExtendedSubType::SUB_CMD); diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index bee1c85121c0..e135c78f9c13 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1927,8 +1927,8 @@ bool SwFormatFootnoteEndAtTextEnd::QueryValue( uno::Any& rVal, sal_uInt8 nMember rVal <<= GetValue() >= FTNEND_ATTXTEND_OWNNUMANDFMT; break; case MID_NUM_TYPE : rVal <<= (sal_Int16)aFormat.GetNumberingType(); break; - case MID_PREFIX : rVal <<= OUString(sPrefix); break; - case MID_SUFFIX : rVal <<= OUString(sSuffix); break; + case MID_PREFIX : rVal <<= sPrefix; break; + case MID_SUFFIX : rVal <<= sSuffix; break; default: return false; } return true; diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 45abe6550540..ad4f5d36e799 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -139,7 +139,7 @@ SfxPoolItem* SwFormatAutoFormat::Clone( SfxItemPool* ) const bool SwFormatAutoFormat::QueryValue( uno::Any& rVal, sal_uInt8 ) const { OUString sCharFormatName = StylePool::nameOf( mpHandle ); - rVal <<= OUString( sCharFormatName ); + rVal <<= sCharFormatName; return true; } diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index d1b2cbf6df6e..2626291fb236 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -153,7 +153,7 @@ void SwHTMLParser::EndScript() if ( !xModLib->hasByName( aModName ) ) { Any aElement; - aElement <<= OUString( m_aScriptSource ); + aElement <<= m_aScriptSource; xModLib->insertByName( aModName , aElement ); } } diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 154372347432..98eeb3677cf0 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -418,11 +418,9 @@ void SwHTMLParser::InsertEmbed() if ( xSet.is() ) { if( bHasURL ) - xSet->setPropertyValue("PluginURL", - uno::makeAny( OUString( aURL ) ) ); + xSet->setPropertyValue("PluginURL", uno::makeAny( aURL ) ); if( bHasType ) - xSet->setPropertyValue("PluginMimeType", - uno::makeAny( OUString( aType ) ) ); + xSet->setPropertyValue("PluginMimeType", uno::makeAny( aType ) ); uno::Sequence < beans::PropertyValue > aProps; aCmdLst.FillSequence( aProps ); diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 02b32af08c49..1954d3039307 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -657,7 +657,7 @@ sal_uInt16 SwWW8ImplReader::End_Field() // Store the OLE Id as a parameter pFieldmark->GetParameters()->insert( std::pair< OUString, uno::Any >( - ODF_OLE_PARAM, uno::makeAny( OUString( sOleId ) ) ) ); + ODF_OLE_PARAM, uno::makeAny( sOleId ) ) ); } } } diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 4c06084fb6bf..537dbcadb7ae 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -724,7 +724,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( makeAny( OUString( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ) ); if( bValidMimeType ) xSet->setPropertyValue("PluginMimeType", - makeAny( OUString( rMimeType ) ) ); + makeAny( rMimeType ) ); } SwFrameFormat *const pFrameFormat = @@ -857,7 +857,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) ) ); xSet->setPropertyValue("FrameName", - makeAny( OUString( rName ) ) ); + makeAny( rName ) ); if ( eScrollMode == ScrollingMode::Auto ) xSet->setPropertyValue("FrameIsAutoScroll", diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 4929214a84d9..409c484e0090 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -259,9 +259,9 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) m_pValueED->SetText(GetFieldMgr().GetCurFieldPar2()); } - if (m_pNameFT->GetText() != OUString(sOldNameFT)) + if (m_pNameFT->GetText() != sOldNameFT) m_pNameFT->SetText(sOldNameFT); - if (m_pValueFT->GetText() != OUString(sOldValueFT)) + if (m_pValueFT->GetText() != sOldValueFT) m_pValueFT->SetText(sOldValueFT); m_pNumFormatLB->SetUpdateMode(false); diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 897583f5e7dd..e83b876c2a5a 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -199,7 +199,7 @@ void SwHeaderFooterWin::SetOffset(Point aOffset, long nXLineStart, long nXLineEn // Compute the text size and get the box position & size from it ::tools::Rectangle aTextRect; - GetTextBoundRect(aTextRect, OUString(m_sLabel)); + GetTextBoundRect(aTextRect, m_sLabel); ::tools::Rectangle aTextPxRect = LogicToPixel(aTextRect); FontMetric aFontMetric = GetFontMetric(GetFont()); Size aBoxSize (aTextPxRect.GetWidth() + BUTTON_WIDTH + TEXT_PADDING * 2, diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 5c5cf145b9af..14f11a31b8c9 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -556,7 +556,7 @@ void InputEdit::UpdateRange(const OUString& rBoxes, aActText = aActText.replaceAt( nPos, 0, aTmp ); nPos = nPos + aTmp.getLength(); } - if( GetText() != OUString(aActText) ) + if( GetText() != aActText ) { SetText( aActText ); SetSelection( Selection( nPos, nPos ) ); diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index b4d2ba3c8c7f..4eecba3f6a82 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -1988,7 +1988,7 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName ) case BASEPROPERTY_HELPURL: { OUString aHelpId( OStringToOUString( GetWindow()->GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); - aProp <<= OUString( aHelpId ); + aProp <<= aHelpId; } break; case BASEPROPERTY_FONTDESCRIPTOR: diff --git a/unotools/source/config/fontoptions.cxx b/unotools/source/config/fontoptions.cxx index 194dff8e4417..d9ce673e82a6 100644 --- a/unotools/source/config/fontoptions.cxx +++ b/unotools/source/config/fontoptions.cxx @@ -41,8 +41,6 @@ using namespace ::com::sun::star::uno; #define PROPERTYHANDLE_FONTHISTORY 1 #define PROPERTYHANDLE_FONTWYSIWYG 2 -#define PROPERTYCOUNT 3 - class SvtFontOptions_Impl : public ConfigItem { public: @@ -230,17 +228,12 @@ void SvtFontOptions_Impl::EnableFontWYSIWYG( bool bState ) Sequence< OUString > SvtFontOptions_Impl::impl_GetPropertyNames() { - // Build list of configuration key names. - const OUString pProperties[] = + return Sequence< OUString > { - OUString(PROPERTYNAME_REPLACEMENTTABLE) , - OUString(PROPERTYNAME_FONTHISTORY) , - OUString(PROPERTYNAME_FONTWYSIWYG) , + PROPERTYNAME_REPLACEMENTTABLE , + PROPERTYNAME_FONTHISTORY , + PROPERTYNAME_FONTWYSIWYG , }; - // Initialize return sequence with these list ... - const Sequence< OUString > seqPropertyNames( pProperties, PROPERTYCOUNT ); - // ... and return it. - return seqPropertyNames; } namespace { diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index 569ce166715e..951785ed687b 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -90,7 +90,6 @@ using namespace ::com::sun::star::uno; #define PROPERTYHANDLE_MACRO_TRUSTEDAUTHORS 14 #define PROPERTYHANDLE_MACRO_DISABLE 15 -#define PROPERTYCOUNT 16 #define PROPERTYHANDLE_INVALID -1 #define CFG_READONLY_DEFAULT false @@ -904,30 +903,25 @@ bool SvtSecurityOptions_Impl::IsOptionEnabled( SvtSecurityOptions::EOption eOpti Sequence< OUString > SvtSecurityOptions_Impl::GetPropertyNames() { - // Build static list of configuration key names. - const OUString pProperties[] = + return Sequence< OUString > { - OUString(PROPERTYNAME_SECUREURL), - OUString(PROPERTYNAME_STAROFFICEBASIC), - OUString(PROPERTYNAME_EXECUTEPLUGINS), - OUString(PROPERTYNAME_WARNINGENABLED), - OUString(PROPERTYNAME_CONFIRMATIONENABLED), - OUString(PROPERTYNAME_DOCWARN_SAVEORSEND), - OUString(PROPERTYNAME_DOCWARN_SIGNING), - OUString(PROPERTYNAME_DOCWARN_PRINT), - OUString(PROPERTYNAME_DOCWARN_CREATEPDF), - OUString(PROPERTYNAME_DOCWARN_REMOVEPERSONALINFO), - OUString(PROPERTYNAME_DOCWARN_RECOMMENDPASSWORD), - OUString(PROPERTYNAME_CTRLCLICK_HYPERLINK), - OUString(PROPERTYNAME_BLOCKUNTRUSTEDREFERERLINKS), - OUString(PROPERTYNAME_MACRO_SECLEVEL), - OUString(PROPERTYNAME_MACRO_TRUSTEDAUTHORS), - OUString(PROPERTYNAME_MACRO_DISABLE) + PROPERTYNAME_SECUREURL, + PROPERTYNAME_STAROFFICEBASIC, + PROPERTYNAME_EXECUTEPLUGINS, + PROPERTYNAME_WARNINGENABLED, + PROPERTYNAME_CONFIRMATIONENABLED, + PROPERTYNAME_DOCWARN_SAVEORSEND, + PROPERTYNAME_DOCWARN_SIGNING, + PROPERTYNAME_DOCWARN_PRINT, + PROPERTYNAME_DOCWARN_CREATEPDF, + PROPERTYNAME_DOCWARN_REMOVEPERSONALINFO, + PROPERTYNAME_DOCWARN_RECOMMENDPASSWORD, + PROPERTYNAME_CTRLCLICK_HYPERLINK, + PROPERTYNAME_BLOCKUNTRUSTEDREFERERLINKS, + PROPERTYNAME_MACRO_SECLEVEL, + PROPERTYNAME_MACRO_TRUSTEDAUTHORS, + PROPERTYNAME_MACRO_DISABLE }; - // Initialize return sequence with these list ... - const Sequence< OUString > seqPropertyNames( pProperties, PROPERTYCOUNT ); - // ... and return it. - return seqPropertyNames; } namespace { diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index 30ddad1c06fc..1bfb1be81109 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -116,22 +116,17 @@ public: #define PROPERTYHANDLE_DATEPATTERNS 4 #define PROPERTYHANDLE_IGNORELANGCHANGE 5 -//#define PROPERTYCOUNT 5 -#define PROPERTYCOUNT 6 - const Sequence< OUString > SvtSysLocaleOptions_Impl::GetPropertyNames() { - const OUString pProperties[] = + return Sequence< OUString > { - OUString(PROPERTYNAME_LOCALE), - OUString(PROPERTYNAME_UILOCALE), - OUString(PROPERTYNAME_CURRENCY), - OUString(PROPERTYNAME_DECIMALSEPARATOR), - OUString(PROPERTYNAME_DATEPATTERNS), - OUString(PROPERTYNAME_IGNORELANGCHANGE) + PROPERTYNAME_LOCALE, + PROPERTYNAME_UILOCALE, + PROPERTYNAME_CURRENCY, + PROPERTYNAME_DECIMALSEPARATOR, + PROPERTYNAME_DATEPATTERNS, + PROPERTYNAME_IGNORELANGCHANGE }; - const Sequence< OUString > seqPropertyNames( pProperties, PROPERTYCOUNT ); - return seqPropertyNames; } SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl() diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index dd88c7047221..b31dbf4828ba 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1532,11 +1532,7 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ) if (!rIStm.GetError()) { - SvgDataPtr aSvgDataPtr( - new SvgData( - aNewData, - OUString(aPath))); - + SvgDataPtr aSvgDataPtr(new SvgData(aNewData, aPath)); rImpGraphic = aSvgDataPtr; } } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 12a5a3027321..248397d3fc51 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3145,11 +3145,8 @@ const OUString& Window::GetHelpText() const static const char* pEnv = getenv( "HELP_DEBUG" ); if( pEnv && *pEnv ) { - OUStringBuffer aTxt( 64+mpWindowImpl->maHelpText.getLength() ); - aTxt.append( mpWindowImpl->maHelpText ); - aTxt.append( "\n------------------\n" ); - aTxt.append( OUString( aStrHelpId ) ); - mpWindowImpl->maHelpText = aTxt.makeStringAndClear(); + OUString aTxt = mpWindowImpl->maHelpText + "\n------------------\n" + aStrHelpId; + mpWindowImpl->maHelpText = aTxt; } mpWindowImpl->mbHelpTextDynamic = false; } diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx index 3563e1aba2b3..5dd511b4046b 100644 --- a/vcl/unx/gtk/salprn-gtk.cxx +++ b/vcl/unx/gtk/salprn-gtk.cxx @@ -938,7 +938,7 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe } aFilterData.realloc(aFilterData.getLength()+1); aFilterData[aFilterData.getLength()-1].Name = "PageRange"; - aFilterData[aFilterData.getLength()-1].Value <<= OUString(aRangeText); + aFilterData[aFilterData.getLength()-1].Value <<= aRangeText; } else if (pStr && !strcmp(pStr, "current")) { diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index 3878152e5bae..9a6108a0022d 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -335,7 +335,7 @@ void XMLTextMarkImportContext::EndElement() xContent = CreateAndInsertMark(GetImport(), (bImportAsField ? OUString("com.sun.star.text.Fieldmark") - : OUString(sAPI_bookmark)), + : sAPI_bookmark), m_sBookmarkName, xInsertionCursor, m_sXmlId); |