summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-01-30 19:09:35 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:25:56 -0400
commitda695330ee333d3210fd6ff236294684e27c5f82 (patch)
tree300b5da7ad08d4d94eea8b1b618a6f7e5969e7e4 /sc
parentb41c9ce2aaaf7ef38071298c7427f6b0905a9bd9 (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> (cherry picked from commit 1ef9f3988ee4dcbc77e1fdefa20442e044a67d4d)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dpoutput.cxx4
-rw-r--r--sc/source/core/data/stlsheet.cxx2
-rw-r--r--sc/source/core/tool/editutil.cxx2
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx2
-rw-r--r--sc/source/ui/unoobj/addruno.cxx2
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx6
-rw-r--r--sc/source/ui/view/cellsh2.cxx8
-rw-r--r--sc/source/ui/view/gridwin4.cxx2
9 files changed, 15 insertions, 15 deletions
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 6c54992a1711..b83c7507d7b7 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -884,9 +884,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;
}
@@ -901,9 +901,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 5a3bf1bae3a8..80d5197aad19 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1347,7 +1347,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 )
{