diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-12 16:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-18 07:37:31 +0000 |
commit | 789055bc2acb4c71483fd60ea258d158bd5aec10 (patch) | |
tree | 7849de841a71f667a30b2a971ad0c3d406110396 /xmloff | |
parent | 150ac9cf05ed9da6a2af5bc3f820280fd853e519 (diff) |
clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.
Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLChartContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/nmspmap.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/GradientStyle.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/style/MarkerStyle.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/style/xmlaustp.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextFrameContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextListItemContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/transform/DlgOASISTContext.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/transform/EventOASISTContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/transform/EventOOoTContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/OOo2Oasis.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/transform/Oasis2OOo.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/transform/PersAttrListTContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/transform/StyleOASISTContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/transform/StyleOOoTContext.cxx | 12 |
19 files changed, 45 insertions, 54 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 4161ba834bb6..abc91100c06d 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -332,7 +332,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut { SAL_WARN("xmloff.chart", "need a charttype to create a diagram" ); //set a fallback value: - OUString aChartClass_Bar( GetXMLToken(XML_BAR ) ); + const OUString& aChartClass_Bar( GetXMLToken(XML_BAR ) ); aOldChartTypeName = SchXMLTools::GetChartTypeByClassName( aChartClass_Bar, true /* bUseOldNames */ ); maChartTypeServiceName = SchXMLTools::GetChartTypeByClassName( aChartClass_Bar, false /* bUseOldNames */ ); } diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index f75d65f3c26e..8392c2016008 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -455,10 +455,10 @@ bool SvXMLNamespaceMap::NormalizeW3URI( OUString& rName ) // - xforms bool bSuccess = false; - const OUString sURIPrefix = GetXMLToken( XML_URI_W3_PREFIX ); + const OUString& sURIPrefix = GetXMLToken( XML_URI_W3_PREFIX ); if( rName.startsWith( sURIPrefix ) ) { - const OUString sURISuffix = GetXMLToken( XML_URI_XFORMS_SUFFIX ); + const OUString& sURISuffix = GetXMLToken( XML_URI_XFORMS_SUFFIX ); sal_Int32 nCompareFrom = rName.getLength() - sURISuffix.getLength(); if( rName.copy( nCompareFrom ).equals( sURISuffix ) ) { diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 6586867f0cbc..44cfd31a4048 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1128,7 +1128,7 @@ void SvXMLExport::ImplExportSettings() if ( !settings->aSettings.getLength() ) continue; - OUString sSettingsName( GetXMLToken( settings->eGroupName ) ); + const OUString& sSettingsName( GetXMLToken( settings->eGroupName ) ); OUString sQName = GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OOO, sSettingsName ); aSettingsExportHelper.exportAllSettings( settings->aSettings, sQName ); } diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 513f6100b8ef..d8358a7bf1a5 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -1550,10 +1550,10 @@ XMLEventImportHelper& SvXMLImport::GetEventImport() // construct event helper and register StarBasic handler and standard // event tables mpEventImportHelper = new XMLEventImportHelper(); - OUString sStarBasic(GetXMLToken(XML_STARBASIC)); + const OUString& sStarBasic(GetXMLToken(XML_STARBASIC)); mpEventImportHelper->RegisterFactory(sStarBasic, new XMLStarBasicContextFactory()); - OUString sScript(GetXMLToken(XML_SCRIPT)); + const OUString& sScript(GetXMLToken(XML_SCRIPT)); mpEventImportHelper->RegisterFactory(sScript, new XMLScriptContextFactory()); mpEventImportHelper->AddTranslationTable(aStandardEventTable); diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 976cf1afd8dc..392dcf0d656b 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1733,7 +1733,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x if( nFound & FOUND_LIBRARY ) { - OUString sLocation( GetXMLToken( + const OUString& sLocation( GetXMLToken( (aStrLibrary.equalsIgnoreAsciiCase("StarOffice") || aStrLibrary.equalsIgnoreAsciiCase("application") ) ? XML_APPLICATION : XML_DOCUMENT ) ); diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx index 141fcc901a3c..fd72968f93a3 100644 --- a/xmloff/source/style/GradientStyle.cxx +++ b/xmloff/source/style/GradientStyle.cxx @@ -217,13 +217,12 @@ void XMLGradientStyleExport::exportXML( { // Name bool bEncoded = false; - OUString aStrName( rStrName ); rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, - rExport.EncodeStyleName( aStrName, + rExport.EncodeStyleName( rStrName, &bEncoded ) ); if( bEncoded ) rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, - aStrName ); + rStrName ); aStrValue = aOut.makeStringAndClear(); rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE, aStrValue ); diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx index bd0f35b59b29..e109c78581dc 100644 --- a/xmloff/source/style/MarkerStyle.cxx +++ b/xmloff/source/style/MarkerStyle.cxx @@ -162,13 +162,12 @@ void XMLMarkerStyleExport::exportXML( { // Name bool bEncoded(false); - OUString aStrName( rStrName ); - rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, rExport.EncodeStyleName( aStrName, &bEncoded ) ); + rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, rExport.EncodeStyleName( rStrName, &bEncoded ) ); if( bEncoded ) { - rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, aStrName ); + rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, rStrName ); } const basegfx::B2DPolyPolygon aPolyPolygon( diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index 582d541c7998..493d46913733 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -69,7 +69,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( { if ( XML_STYLE_FAMILY_CONTROL_ID == nFamily ) { // it's a control-related style - rtl::Reference< XMLPropertySetMapper > aPropertyMapper = rPropExp.getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& aPropertyMapper = rPropExp.getPropertySetMapper(); for ( vector< XMLPropertyState >::const_iterator pProp = rProperties.begin(); pProp != rProperties.end(); @@ -87,7 +87,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( if( (XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily) || (XML_STYLE_FAMILY_SD_PRESENTATION_ID == nFamily) ) { // it's a graphics style - rtl::Reference< XMLPropertySetMapper > aPropertyMapper = rPropExp.getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& aPropertyMapper = rPropExp.getPropertySetMapper(); assert(aPropertyMapper.is()); bool bFoundControlShapeDataStyle = false; @@ -150,7 +150,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( { if (pProp->mnIndex > -1) { - rtl::Reference< XMLPropertySetMapper > aPropMapper = rPropExp.getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& aPropMapper = rPropExp.getPropertySetMapper(); sal_Int32 nIndex = pProp->mnIndex; sal_Int16 nContextID = aPropMapper->GetEntryContextId( nIndex ); switch( nContextID ) @@ -194,7 +194,7 @@ void SvXMLAutoStylePoolP::exportStyleContent( bool bFooterStartIndex(false); bool bFooterEndIndex(false); - rtl::Reference< XMLPropertySetMapper > aPropMapper = rPropExp.getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& aPropMapper = rPropExp.getPropertySetMapper(); sal_Int32 nIndex(0); while(nIndex < aPropMapper->GetEntryCount()) diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index e032bdd770f6..0e6704220f24 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -1056,7 +1056,7 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( { OUString sValue( rValue ); sValue = sValue.trim(); - const OUString aRotate(GetXMLToken(XML_ROTATE)); + const OUString& aRotate(GetXMLToken(XML_ROTATE)); const sal_Int32 nRotateLen(aRotate.getLength()); sal_Int32 nLen = sValue.getLength(); if( nLen >= nRotateLen+3 && diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx index d95fca4a0794..a255ecf88410 100644 --- a/xmloff/source/text/XMLTextListItemContext.cxx +++ b/xmloff/source/text/XMLTextListItemContext.cxx @@ -70,7 +70,7 @@ XMLTextListItemContext::XMLTextListItemContext( else if ( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( aLocalName, XML_STYLE_OVERRIDE ) ) { - const OUString sListStyleOverrideName = rValue; + const OUString& sListStyleOverrideName = rValue; if ( !sListStyleOverrideName.isEmpty() ) { OUString sDisplayStyleName( diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index c7e03bbbeae3..9b4ff7354ae3 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -382,7 +382,7 @@ void FieldParamExporter::Export() for(const OUString* pCurrent = vParameters.begin(); pCurrent != vParameters.end(); ++pCurrent) { const Any aValue = m_xFieldParams->getByName(*pCurrent); - const Type aValueType = aValue.getValueType(); + const Type& aValueType = aValue.getValueType(); if(aValueType == aStringType) { OUString sValue; @@ -855,10 +855,10 @@ void XMLTextParagraphExport::exportListChange( if ( nListLevelsToBeOpened > 0 ) { - const OUString sListStyleName( rNextInfo.GetNumRulesName() ); + const OUString& sListStyleName( rNextInfo.GetNumRulesName() ); // Currently only the text documents support <ListId>. // Thus, for other document types <sListId> is empty. - const OUString sListId( rNextInfo.GetListId() ); + const OUString& sListId( rNextInfo.GetListId() ); bool bExportListStyle( true ); bool bRestartNumberingAtContinuedList( false ); sal_Int32 nRestartValueForContinuedList( -1 ); @@ -1093,7 +1093,7 @@ void XMLTextParagraphExport::exportListChange( if ( ( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) && GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) { - const OUString sListStyleName( rNextInfo.GetNumRulesName() ); + const OUString& sListStyleName( rNextInfo.GetNumRulesName() ); if ( !mpTextListsHelper->EqualsToTopListStyleOnStack( sListStyleName ) ) { GetExport().AddAttribute( XML_NAMESPACE_TEXT, diff --git a/xmloff/source/transform/DlgOASISTContext.cxx b/xmloff/source/transform/DlgOASISTContext.cxx index af17e79a2ae0..0397c3746cb7 100644 --- a/xmloff/source/transform/DlgOASISTContext.cxx +++ b/xmloff/source/transform/DlgOASISTContext.cxx @@ -77,11 +77,9 @@ void XMLDlgOASISTransformerContext::StartElement( { case XML_ATACTION_DLG_BORDER: { - OUString aAttrValue( rAttrValue ); - - if ( !aAttrValue.equals( GetXMLToken( XML_NONE ) ) && - !aAttrValue.equals( GetXMLToken( XML_SIMPLE ) ) && - !aAttrValue.equals( GetXMLToken( XML_3D ) ) ) + if ( !rAttrValue.equals( GetXMLToken( XML_NONE ) ) && + !rAttrValue.equals( GetXMLToken( XML_SIMPLE ) ) && + !rAttrValue.equals( GetXMLToken( XML_3D ) ) ) { pMutableAttrList->SetValueByIndex( i, GetXMLToken( XML_NONE ) ); diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx index cb529c34f6da..7781631123e6 100644 --- a/xmloff/source/transform/EventOASISTContext.cxx +++ b/xmloff/source/transform/EventOASISTContext.cxx @@ -138,7 +138,7 @@ bool ParseURL( if ( xUrl.is() ) { - OUString aLanguageKey = GetXMLToken( XML_LANGUAGE ); + const OUString& aLanguageKey = GetXMLToken( XML_LANGUAGE ); if ( xUrl.is() && xUrl->hasParameter( aLanguageKey ) ) { OUString aLanguage = xUrl->getParameter( aLanguageKey ); @@ -150,7 +150,7 @@ bool ParseURL( OUString tmp = xUrl->getParameter( GetXMLToken( XML_LOCATION ) ); - OUString doc = GetXMLToken( XML_DOCUMENT ); + const OUString& doc = GetXMLToken( XML_DOCUMENT ); if ( tmp.equalsIgnoreAsciiCase( doc ) ) { diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx index 7abb9977a369..cc7b17365247 100644 --- a/xmloff/source/transform/EventOOoTContext.cxx +++ b/xmloff/source/transform/EventOOoTContext.cxx @@ -116,7 +116,7 @@ sal_uInt16 XMLEventOOoTransformerContext::GetEventName( OUString& rNewName, XMLTransformerOOoEventMap_Impl& rMap ) { - XMLTransformerOOoEventMap_Impl::key_type aKey( rName ); + const XMLTransformerOOoEventMap_Impl::key_type& aKey( rName ); XMLTransformerOOoEventMap_Impl::const_iterator aIter = rMap.find( aKey ); if( aIter == rMap.end() ) { diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index d444f3c938e3..ed4ff6db9cc9 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1416,11 +1416,10 @@ XMLTrackedChangesOOoTContext_Impl::~XMLTrackedChangesOOoTContext_Impl() void XMLTrackedChangesOOoTContext_Impl::StartElement( const Reference< XAttributeList >& rAttrList ) { - Reference< XAttributeList > xAttrList( rAttrList ); - sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; + sal_Int16 nAttrCount = rAttrList.is() ? rAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { - const OUString& rAttrName = xAttrList->getNameByIndex( i ); + const OUString& rAttrName = rAttrList->getNameByIndex( i ); OUString aLocalName; sal_uInt16 nPrefix = GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName, @@ -1441,7 +1440,7 @@ void XMLTrackedChangesOOoTContext_Impl::StartElement( { Sequence < sal_Int8 > aKey; ::sax::Converter::decodeBase64( aKey, - xAttrList->getValueByIndex( i ) ); + rAttrList->getValueByIndex( i ) ); rPropSet->setPropertyValue( aPropName, makeAny( aKey ) ); } else @@ -1452,7 +1451,7 @@ void XMLTrackedChangesOOoTContext_Impl::StartElement( break; } } - XMLTransformerContext::StartElement( xAttrList ); + XMLTransformerContext::StartElement( rAttrList ); } class XMLTableOOoTransformerContext_Impl : public XMLTransformerContext diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index e23b5e128228..03b99f35f704 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -1459,12 +1459,10 @@ XMLConfigItemTContext_Impl::~XMLConfigItemTContext_Impl() void XMLConfigItemTContext_Impl::StartElement( const Reference< XAttributeList >& rAttrList ) { - Reference< XAttributeList > xAttrList( rAttrList ); - - sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; + sal_Int16 nAttrCount = rAttrList.is() ? rAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { - const OUString& rAttrName = xAttrList->getNameByIndex( i ); + const OUString& rAttrName = rAttrList->getNameByIndex( i ); OUString aLocalName; sal_uInt16 nPrefix = GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName, @@ -1473,7 +1471,7 @@ void XMLConfigItemTContext_Impl::StartElement( { if ( IsXMLToken( aLocalName, XML_NAME ) ) { - const OUString& rValue = xAttrList->getValueByIndex( i ); + const OUString& rValue = rAttrList->getValueByIndex( i ); if( rValue == "RedlineProtectionKey" ) m_bIsRedlineProtectionKey = true; else if( rValue == "CursorPositionX" ) @@ -1486,7 +1484,7 @@ void XMLConfigItemTContext_Impl::StartElement( } } - XMLTransformerContext::StartElement( xAttrList ); + XMLTransformerContext::StartElement( rAttrList ); } void XMLConfigItemTContext_Impl::Characters( const OUString& rChars ) diff --git a/xmloff/source/transform/PersAttrListTContext.cxx b/xmloff/source/transform/PersAttrListTContext.cxx index 3f708fd482ae..21bd235c3a30 100644 --- a/xmloff/source/transform/PersAttrListTContext.cxx +++ b/xmloff/source/transform/PersAttrListTContext.cxx @@ -34,7 +34,7 @@ void XMLPersAttrListTContext::AddAttribute( ::xmloff::token::XMLTokenEnum eAToken, ::xmloff::token::XMLTokenEnum eVToken ) { - OUString aAttrValue( ::xmloff::token::GetXMLToken( eVToken ) ); + const OUString& aAttrValue( ::xmloff::token::GetXMLToken( eVToken ) ); AddAttribute( nAPrefix, eAToken, aAttrValue ); } @@ -45,7 +45,7 @@ void XMLPersAttrListTContext::AddAttribute( { OUString aAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey( nAPrefix, ::xmloff::token::GetXMLToken( eAToken ) ) ); - OUString aAttrValue( rValue ); + const OUString& aAttrValue( rValue ); XMLMutableAttributeList *pMutableAttrList; if( m_xAttrList.is() ) diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index 060336798936..65f72b3562a2 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -263,7 +263,7 @@ void XMLPropertiesTContext_Impl::StartElement( } else { - OUString aAttrValue( GetXMLToken( bWordMode + const OUString& aAttrValue( GetXMLToken( bWordMode ? XML_FALSE : XML_TRUE ) ); pAttrList->AddAttribute( aAttrQName, aAttrValue ); @@ -272,7 +272,7 @@ void XMLPropertiesTContext_Impl::StartElement( break; case XML_OPTACTION_KEEP_WITH_NEXT: { - OUString aAttrValue( GetXMLToken( + const OUString& aAttrValue( GetXMLToken( IsXMLToken( rAttrValue, XML_ALWAYS ) ? XML_TRUE : XML_FALSE) ); @@ -517,7 +517,7 @@ void XMLPropertiesTContext_Impl::StartElement( pAttrList->AddAttribute( rAttrName, aNewAttrValue ); // create old draw:mirror for drawing graphic objects - OUString aAttrValue( GetXMLToken( IsXMLToken( rAttrValue, XML_HORIZONTAL ) ? XML_TRUE : XML_FALSE ) ); + const OUString& aAttrValue( GetXMLToken( IsXMLToken( rAttrValue, XML_HORIZONTAL ) ? XML_TRUE : XML_FALSE ) ); pAttrList->AddAttribute( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_DRAW, GetXMLToken( XML_MIRROR )), aAttrValue ); diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index 4f30727767d6..a7321722ee96 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -392,8 +392,6 @@ rtl::Reference<XMLTransformerContext> XMLPropertiesOOoTContext_Impl::CreateChild void XMLPropertiesOOoTContext_Impl::StartElement( const Reference< XAttributeList >& rAttrList ) { - Reference< XAttributeList > xAttrList( rAttrList ); - XMLTypedPropertiesOOoTContext_Impl * pIntervalMinorDivisorContext = nullptr; double fIntervalMajor = 0.0; double fIntervalMinor = 0.0; @@ -412,11 +410,11 @@ void XMLPropertiesOOoTContext_Impl::StartElement( OUString aDrawMirrorAttrValue; XMLTypedPropertiesOOoTContext_Impl* pMirrorContext( nullptr ); - sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; + sal_Int16 nAttrCount = rAttrList.is() ? rAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { - const OUString sAttrName = xAttrList->getNameByIndex( i ); - const OUString sAttrValue = xAttrList->getValueByIndex( i ); + const OUString sAttrName = rAttrList->getNameByIndex( i ); + const OUString sAttrValue = rAttrList->getValueByIndex( i ); OUString aLocalName; sal_uInt16 nPrefix = GetTransformer().GetNamespaceMap().GetKeyByAttrName( sAttrName, @@ -506,7 +504,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( break; case XML_PTACTION_LINE_MODE: { - OUString aAttrValue( GetXMLToken( + const OUString& aAttrValue( GetXMLToken( IsXMLToken( sAttrValue, XML_TRUE ) ? XML_CONTINUOUS : XML_SKIP_WHITE_SPACE) ); @@ -525,7 +523,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( break; case XML_PTACTION_KEEP_WITH_NEXT: { - OUString aAttrValue( GetXMLToken( + const OUString& aAttrValue( GetXMLToken( IsXMLToken( sAttrValue, XML_TRUE ) ? XML_ALWAYS : XML_AUTO) ); |