summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-08 19:39:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-09 07:14:51 +0100
commit2d40c43e868494abb87b405680f9c5ef460293cc (patch)
tree80ac9495557fd060fa6d092e42fccf8354c9ff98 /sc
parent97e47e7b004945d3ac28a9262df371ca2faf1903 (diff)
loplugin:redundantfcast look for unnecessary temporaries
when calling methods that take a const& Change-Id: Idf45dfd9fea0de6fae0b1f89550f2f7fc302aa15 Reviewed-on: https://gerrit.libreoffice.org/50970 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/olinetab.cxx2
-rw-r--r--sc/source/core/tool/token.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx4
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx8
-rw-r--r--sc/source/ui/unoobj/targuno.cxx2
5 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index f43a873556ab..6ec7d071e6d7 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -153,7 +153,7 @@ ScOutlineArray::ScOutlineArray( const ScOutlineArray& rArray ) :
for (; it != itEnd; ++it)
{
const ScOutlineEntry *const pEntry = &it->second;
- aCollections[nLevel].insert(ScOutlineEntry(*pEntry));
+ aCollections[nLevel].insert(*pEntry);
}
}
}
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index de5abccd1ae1..868e92928d6e 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2139,7 +2139,7 @@ FormulaToken* ScTokenArray::MergeArray( )
}
else if ( t->GetType() == svString )
{
- pArray->PutString(svl::SharedString(t->GetString()), nCol, nRow);
+ pArray->PutString(t->GetString(), nCol, nRow);
}
break;
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 12c9d94241ad..d68573a3264b 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2114,7 +2114,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const OUString& aPropert
break;
case SC_WID_UNO_NUMRULES:
{
- aAny <<= uno::Reference<container::XIndexReplace>(ScStyleObj::CreateEmptyNumberingRules());
+ aAny <<= ScStyleObj::CreateEmptyNumberingRules();
}
break;
}
@@ -2601,7 +2601,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
case SC_WID_UNO_NUMRULES:
{
// always return empty numbering rules object
- rAny <<= uno::Reference<container::XIndexReplace>(ScStyleObj::CreateEmptyNumberingRules());
+ rAny <<= ScStyleObj::CreateEmptyNumberingRules();
}
break;
case SC_WID_UNO_ABSNAME:
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 645d5f416e74..0f4af4a65662 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -1975,7 +1975,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
{
const DataPilotFieldAutoShowInfo* pInfo = getAutoShowInfo();
if (pInfo)
- aRet <<= DataPilotFieldAutoShowInfo(*pInfo);
+ aRet <<= *pInfo;
}
else if ( aPropertyName == SC_UNONAME_HASLAYOUTINFO )
aRet <<= (getLayoutInfo() != nullptr);
@@ -1983,7 +1983,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
{
const DataPilotFieldLayoutInfo* pInfo = getLayoutInfo();
if (pInfo)
- aRet <<= DataPilotFieldLayoutInfo(*pInfo);
+ aRet <<= *pInfo;
}
else if ( aPropertyName == SC_UNONAME_HASREFERENCE )
aRet <<= (getReference() != nullptr);
@@ -1991,7 +1991,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
{
const DataPilotFieldReference* pRef = getReference();
if (pRef)
- aRet <<= DataPilotFieldReference(*pRef);
+ aRet <<= *pRef;
}
else if ( aPropertyName == SC_UNONAME_HASSORTINFO )
aRet <<= (getSortInfo() != nullptr);
@@ -1999,7 +1999,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
{
const DataPilotFieldSortInfo* pInfo = getSortInfo();
if (pInfo)
- aRet <<= DataPilotFieldSortInfo(*pInfo);
+ aRet <<= *pInfo;
}
else if ( aPropertyName == SC_UNONAME_ISGROUP )
aRet <<= hasGroupInfo();
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index d3d2deb062de..96ba5208ebb9 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -230,7 +230,7 @@ void ScLinkTargetTypeObj::SetLinkTargetBitmap( uno::Any& rRet, sal_uInt16 nType
if (nImgId != ScContentId::ROOT)
{
BitmapEx aBitmapEx(aContentBmps[static_cast<int>(nImgId) -1 ]);
- rRet <<= uno::Reference< awt::XBitmap > (VCLUnoHelper::CreateBitmap(aBitmapEx));
+ rRet <<= VCLUnoHelper::CreateBitmap(aBitmapEx);
}
}