summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-10 12:37:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-11 09:26:28 +0200
commit2962ceec4b96758bec7e7a0390d5ec60e3ce708f (patch)
tree54b1f57a5ee59babeef28b2f624024cecef8f4c3 /sc
parentb5303563b785115075b5f9b7b4abccd8f9d916e2 (diff)
remove some unnecessary temporary OUStrings
found with: git grep -nP 'OUString\(\s*\w+\s*\)' | grep -v new | grep -v return Change-Id: I923109b4339210aed2639e423fbc4d5f19233f02 Reviewed-on: https://gerrit.libreoffice.org/37463 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen3.cxx3
-rw-r--r--sc/source/core/data/tabprotection.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx4
-rw-r--r--sc/source/filter/xml/xmlsceni.cxx2
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx4
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx2
-rw-r--r--sc/source/ui/undo/undotab.cxx4
-rw-r--r--sc/source/ui/unoobj/TablePivotCharts.cxx2
-rw-r--r--sc/source/ui/unoobj/addruno.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx2
-rw-r--r--sc/source/ui/unoobj/datauno.cxx2
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx8
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx2
-rw-r--r--sc/source/ui/unoobj/targuno.cxx2
-rw-r--r--sc/source/ui/view/viewfun4.cxx2
17 files changed, 23 insertions, 24 deletions
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;