summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--idl/source/prj/database.cxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx3
-rw-r--r--l10ntools/source/pocheck.cxx6
-rw-r--r--l10ntools/source/xrmmerge.cxx9
-rw-r--r--lingucomponent/source/lingutil/lingutil.cxx2
-rw-r--r--linguistic/source/convdicxml.cxx7
-rw-r--r--oox/source/drawingml/diagram/layoutatomvisitors.cxx2
-rw-r--r--oox/source/export/vmlexport.cxx2
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx2
-rw-r--r--oox/source/vml/vmlshapecontext.cxx2
-rw-r--r--reportdesign/source/core/sdr/ReportDrawPage.cxx2
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx2
-rw-r--r--reportdesign/source/ui/report/FormattedFieldBeautifier.cxx2
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx2
-rw-r--r--reportdesign/source/ui/report/dlgedfunc.cxx2
15 files changed, 22 insertions, 25 deletions
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index e6521bdbf37b..c0b7b8cf9cea 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -284,7 +284,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
if( rTok.IsIdentifier() )
{
- OString aName = rTok.GetString();
+ const OString& aName = rTok.GetString();
for( const auto& aType : GetTypeList() )
{
if( aType->GetName() == aName )
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 52a9b063c900..02cd94b295d2 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -733,9 +733,8 @@ void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec)
}
if(nCmp == 1) // cur > next
{
- rtl::Reference<VendorBase> less = next;
vec.at(j-1)= cur;
- vec.at(j)= less;
+ vec.at(j)= next;
}
}
++cIter;
diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index 4f7c7686757a..49aa9551c3fb 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -45,7 +45,7 @@ static void checkStyleNames(const OString& aLanguage)
if( !aPoEntry.isFuzzy() && aPoEntry.getMsgCtxt().startsWith("STR_POOLCOLL") )
{
- OString aMsgStr = aPoEntry.getMsgStr();
+ const OString& aMsgStr = aPoEntry.getMsgStr();
if( aMsgStr.isEmpty() )
continue;
if( aLocalizedStyleNames.find(aMsgStr) == aLocalizedStyleNames.end() )
@@ -57,7 +57,7 @@ static void checkStyleNames(const OString& aLanguage)
}
if( !aPoEntry.isFuzzy() && aPoEntry.getMsgCtxt().startsWith("STR_POOLNUMRULE") )
{
- OString aMsgStr = aPoEntry.getMsgStr();
+ const OString& aMsgStr = aPoEntry.getMsgStr();
if( aMsgStr.isEmpty() )
continue;
if( aLocalizedNumStyleNames.find(aMsgStr) == aLocalizedNumStyleNames.end() )
@@ -163,7 +163,7 @@ static void checkFunctionNames(const OString& aLanguage)
break;
if( !aPoEntry.isFuzzy() && aPoEntry.getMsgCtxt() == "RID_STRLIST_FUNCTION_NAMES" )
{
- OString aMsgStr = aPoEntry.getMsgStr();
+ const OString& aMsgStr = aPoEntry.getMsgStr();
if( aMsgStr.isEmpty() )
continue;
if( aLocalizedCoreFunctionNames.find(aMsgStr) == aLocalizedCoreFunctionNames.end() )
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 45899a4995d4..ee45efe8b1a1 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -405,12 +405,11 @@ void XRMResMerge::WorkOnDesc(
OString sDescFilename = GetAttribute ( rOpenTag, "xlink:href" );
for( size_t n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
- OString sContent;
+ OString sText;
if ( !sCur.equalsIgnoreAsciiCase("en-US") &&
- ( pEntrys->GetText( sContent, sCur, true )) &&
- !sContent.isEmpty())
+ ( pEntrys->GetText( sText, sCur, true )) &&
+ !sText.isEmpty())
{
- OString sText( sContent );
OString sAdditionalLine( "\n " );
sAdditionalLine += rOpenTag;
OString sSearch = sLangAttribute;
@@ -498,7 +497,7 @@ void XRMResMerge::EndOfText(
!sContent.isEmpty() &&
helper::isWellFormedXML( sContent ))
{
- OString sText( sContent );
+ const OString& sText( sContent );
OString sAdditionalLine( "\n " );
sAdditionalLine += rOpenTag;
OString sSearch = sLangAttribute;
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index ab36d54f416a..76c79aba698a 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -112,7 +112,7 @@ static void GetOldStyleDicsInDir(
continue;
// Thus we first get the language of the dictionary
- OUString aLocaleName(aLangTag.getBcp47());
+ const OUString& aLocaleName(aLangTag.getBcp47());
if (aDicLangInUse.insert(aLocaleName).second)
{
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 0ee4844c1b38..55b1f40b5dd0 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -329,9 +329,8 @@ void ConvDicXMLExport::ExportContent_()
for (auto const& elem : rDic.aFromLeft)
aKeySet.insert( elem.first );
- for (auto const& elem : aKeySet)
+ for (const OUString& aLeftText : aKeySet)
{
- OUString aLeftText(elem);
AddAttribute( XML_NAMESPACE_TCD, "left-text", aLeftText );
if (rDic.pConvPropType) // property-type list available?
{
@@ -348,10 +347,10 @@ void ConvDicXMLExport::ExportContent_()
"entry" , true, true );
pair< ConvMap::iterator, ConvMap::iterator > aRange =
- rDic.aFromLeft.equal_range(elem);
+ rDic.aFromLeft.equal_range(aLeftText);
for (auto aIt = aRange.first; aIt != aRange.second; ++aIt)
{
- DBG_ASSERT( elem == (*aIt).first, "key <-> entry mismatch" );
+ DBG_ASSERT( aLeftText == (*aIt).first, "key <-> entry mismatch" );
OUString aRightText( (*aIt).second );
SvXMLElementExport aEntryRightText( *this, XML_NAMESPACE_TCD,
"right-text" , true, false );
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
index bf8747f0995d..b85b5228407d 100644
--- a/oox/source/drawingml/diagram/layoutatomvisitors.cxx
+++ b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
@@ -220,7 +220,7 @@ void ShapeTemplateVisitor::visit(ShapeAtom& rAtom)
return;
}
- ShapePtr pCurrShape(rAtom.getShapeTemplate());
+ const ShapePtr& pCurrShape(rAtom.getShapeTemplate());
// TODO(F3): cloned shape shares all properties by reference,
// don't change them!
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index ed7b6fb11d3a..0ec745e69d45 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -666,7 +666,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
XFastAttributeListRef(pAttrListSignatureLine));
// Get signature line graphic
- const uno::Reference<graphic::XGraphic> xGraphic
+ const uno::Reference<graphic::XGraphic>& xGraphic
= pSdrGrafObj->getSignatureLineUnsignedGraphic();
Graphic aGraphic(xGraphic);
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index bbf725620b76..f2477b2cef6e 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -105,7 +105,7 @@ static void ResolveTextFields( XmlFilterBase const & rFilter )
const oox::core::TextFieldStack& rTextFields = rFilter.getTextFieldStack();
if ( !rTextFields.empty() )
{
- Reference< frame::XModel > xModel( rFilter.getModel() );
+ const Reference< frame::XModel >& xModel( rFilter.getModel() );
for (auto const& textField : rTextFields)
{
const OUString sURL = "URL";
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index eb78598274c5..f5f4bf884e31 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -71,7 +71,7 @@ OptValue< double > lclDecodeOpacity( const AttributeList& rAttribs, sal_Int32 nT
if( oValue.has() )
{
- const OUString aString(oValue.get());
+ const OUString& aString(oValue.get());
const sal_Int32 nLength(aString.getLength());
if(nLength > 0)
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 87984ce3b445..15910df12a12 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -75,7 +75,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::CreateShape( SdrObject *pObj
if ( xFactory.is() )
{
bool bChangeOrientation = false;
- OUString sServiceName = pBaseObj->getServiceName();
+ const OUString& sServiceName = pBaseObj->getServiceName();
OSL_ENSURE(!sServiceName.isEmpty(),"No Service Name given!");
if (dynamic_cast< const OUnoObject* >(pObj) != nullptr)
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index ea94d02740b5..eb0f45742e77 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -404,7 +404,7 @@ void OObjectBase::SetPropsFromRect(const tools::Rectangle& _rRect)
OReportPage* pPage = dynamic_cast<OReportPage*>(GetImplPage());
if ( pPage && !_rRect.IsEmpty() )
{
- uno::Reference<report::XSection> xSection = pPage->getSection();
+ const uno::Reference<report::XSection>& xSection = pPage->getSection();
assert(_rRect.getHeight() >= 0);
const sal_uInt32 newHeight( ::std::max(0l, _rRect.getHeight()+_rRect.Top()) );
if ( xSection.is() && ( newHeight > xSection->getHeight() ) )
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
index 7cf51a8e53b5..7021ed43f1ae 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -86,7 +86,7 @@ namespace rptui
bool bSet = true;
if ( aFormula.getType() == ReportFormula::Field )
{
- const OUString sColumnName = aFormula.getFieldName();
+ const OUString& sColumnName = aFormula.getFieldName();
OUString sLabel = m_rReportController.getColumnLabel_throw(sColumnName);
if ( !sLabel.isEmpty() )
{
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index d5b6261b9bf5..3a1deb5958d9 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -716,7 +716,7 @@ void OViewsWindow::collectBoundResizeRect(const TRectangleMap& _rSortRectangles,
{
bOnlyOnce = true;
OReportSection* pReportSection = aRectIter->second.second->getReportSection();
- const uno::Reference< report::XSection> xSection = pReportSection->getSection();
+ const uno::Reference< report::XSection>& xSection = pReportSection->getSection();
try
{
uno::Reference<report::XReportDefinition> xReportDefinition = xSection->getReportDefinition();
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index 161f28e0b0f0..58a71a4bddcd 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -446,7 +446,7 @@ void DlgEdFunc::colorizeOverlappedObject(SdrObject* _pOverlappedObj)
OObjectBase* pObj = dynamic_cast<OObjectBase*>(_pOverlappedObj);
if ( pObj )
{
- uno::Reference<report::XReportComponent> xComponent = pObj->getReportComponent();
+ const uno::Reference<report::XReportComponent>& xComponent = pObj->getReportComponent();
if (xComponent.is() && xComponent != m_xOverlappingObj)
{
OReportModel& rRptModel(static_cast< OReportModel& >(_pOverlappedObj->getSdrModelFromSdrObject()));