diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 09:47:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-24 08:36:27 +0200 |
commit | 645db9a2643832e29dbdf904e1cf7b323d273f86 (patch) | |
tree | bb799a9a87fb09b5d93972c6a627b1bc0b67ff85 /sw/source/filter/ww8 | |
parent | 2629aac31142449312f77c5843ea209cc810acb4 (diff) |
clang-tidy performance-unnecessary-copy-init in sw
Change-Id: I515e3e8ddaee3e3ddc4bf3827fb85f3489e84539
Reviewed-on: https://gerrit.libreoffice.org/62253
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8num.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index a71ab90cc5b3..b5a75c2e8be4 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6089,7 +6089,7 @@ static OString impl_LevelNFC( sal_uInt16 nNumberingType , const SfxItemSet *pOut case style::NumberingType::NUMBER_LOWER_ZH: aType="taiwaneseCountingThousand"; if (pOutSet) { - const SvxLanguageItem rLang = pOutSet->Get( RES_CHRATR_CJK_LANGUAGE); + const SvxLanguageItem& rLang = pOutSet->Get( RES_CHRATR_CJK_LANGUAGE); const LanguageType eLang = rLang.GetLanguage(); if (LANGUAGE_CHINESE_SIMPLIFIED == eLang) { diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index ac7815c13a6a..d64917bb54f9 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1348,7 +1348,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp sal_Int32 nCurrentPos = 0; const sal_Int32 nEnd = aStr.getLength(); - const SfxItemSet aSet(rEditObj.GetParaAttribs(n)); + const SfxItemSet& aSet(rEditObj.GetParaAttribs(n)); bool bIsRTLPara = false; const SfxPoolItem *pItem; if(SfxItemState::SET == aSet.GetItemState(EE_PARA_WRITINGDIR, true, &pItem)) @@ -1634,7 +1634,7 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uI } else { - Graphic aGraphic(pGrfNd->GetGrf()); + const Graphic& aGraphic(pGrfNd->GetGrf()); GraphicObject aGraphicObject( aGraphic ); OString aUniqueId = aGraphicObject.GetUniqueID(); diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index 62ce13405c52..b0b0cde57768 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -204,7 +204,7 @@ static sal_uInt8 GetLevelNFC( sal_uInt16 eNumType, const SfxItemSet *pOutSet) case SVX_NUM_NUMBER_LOWER_ZH: nRet = 35; if ( pOutSet ) { - const SvxLanguageItem rLang = pOutSet->Get( RES_CHRATR_CJK_LANGUAGE); + const SvxLanguageItem& rLang = pOutSet->Get( RES_CHRATR_CJK_LANGUAGE); const LanguageType eLang = rLang.GetLanguage(); if (LANGUAGE_CHINESE_SIMPLIFIED ==eLang) { nRet = 39; diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 29259003ab88..5e22e0bb57a3 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3248,7 +3248,7 @@ bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec sal_uInt16 aPassword[16]; memset( aPassword, 0, sizeof( aPassword ) ); - OUString sPassword(pPasswordItem->GetValue()); + const OUString& sPassword(pPasswordItem->GetValue()); for ( sal_Int32 nChar = 0; nChar < sPassword.getLength(); ++nChar ) aPassword[nChar] = sPassword[nChar]; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 7a92a825ceaf..317a4efc9bcf 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2030,7 +2030,7 @@ void AttributeOutputBase::GenerateBookmarksForSequenceField(const SwTextNode& rN { // Need to create a separate run for separator character SwWW8AttrIter aLocalAttrIter( GetExport(), rNode ); // We need a local iterator having the right number of runs - const OUString aText = rNode.GetText(); + const OUString& aText = rNode.GetText(); const sal_Int32 nCategoryStart = aText.indexOf(pRefField->GetSetRefName()); const sal_Int32 nPosBeforeSeparator = std::max(nCategoryStart, pHt->GetStart()); bool bCategoryFirst = nCategoryStart < pHt->GetStart(); @@ -2210,7 +2210,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) if(SwTOXElement::IndexEntryType & pTOX->GetCreateType()) { sStr += "\\f "; - OUString sName = pTOX->GetEntryTypeName(); + const OUString& sName = pTOX->GetEntryTypeName(); if(!sName.isEmpty()) { sStr += sName; @@ -2248,7 +2248,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) sStr = FieldString(eCode); sStr += "\\c "; - OUString seqName = pTOX->GetSequenceName(); + const OUString& seqName = pTOX->GetSequenceName(); if(!seqName.isEmpty()) { sStr += "\""; @@ -2311,7 +2311,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) if(SwTOXElement::Bookmark & pTOX->GetCreateType()) { sStr += "\\b \""; - OUString bName = pTOX->GetBookmarkName(); + const OUString& bName = pTOX->GetBookmarkName(); sStr += bName; sStr += sEntryEnd; } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 70f3cdf41f6c..b7fa6ed3f00a 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4748,7 +4748,7 @@ void SwWW8ImplReader::ReadDocInfo() SfxMedium* pMedium = m_pDocShell->GetMedium(); if ( pMedium ) { - OUString aName = pMedium->GetName(); + const OUString& aName = pMedium->GetName(); INetURLObject aURL( aName ); sTemplateURL = aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri); if ( !sTemplateURL.isEmpty() ) @@ -4858,7 +4858,7 @@ void SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, return; SvtPathOptions aPathOpt; - OUString aAddinPath = aPathOpt.GetAddinPath(); + const OUString& aAddinPath = aPathOpt.GetAddinPath(); uno::Sequence< OUString > sGlobalTemplates; // first get the autoload addins in the directory STARTUP |