diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-13 15:04:48 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-13 15:05:31 +0200 |
commit | fddde2b74a24b1e88e33940ee98f7fa2887dc58c (patch) | |
tree | 4cae7cb69b60c2c4628195caf36b7ec56e573c66 /xmloff | |
parent | 22684273d58b1ae9146fcc6c8dfceb90ddf846d9 (diff) |
xmloff,vbahelper: prefer passing OUString and OString by reference
Change-Id: I8b7e4284c122549c03edaa7f3963cbfb2024b3fc
Diffstat (limited to 'xmloff')
27 files changed, 89 insertions, 89 deletions
diff --git a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx index 1dc354aa55dd..1ae5bfdf9419 100644 --- a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx +++ b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx @@ -103,10 +103,10 @@ public: ::com::sun::star::beans::XPropertySet> & rConfig); /// for helper class: set begin notice - void SetBeginNotice( OUString sText); + void SetBeginNotice( const OUString& sText); /// for helper class: set end notice - void SetEndNotice( OUString sText); + void SetEndNotice( const OUString& sText); }; #endif diff --git a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx index 8cd974bded71..aff9c7d5cf9a 100644 --- a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx +++ b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx @@ -93,8 +93,8 @@ protected: void ProcessAttribute( sal_uInt16 nPrefix, - const OUString sLocalName, - const OUString sValue); + const OUString& sLocalName, + const OUString& sValue); }; #endif diff --git a/xmloff/inc/XMLLineNumberingImportContext.hxx b/xmloff/inc/XMLLineNumberingImportContext.hxx index 5eb2cf4b0e01..ccf26488f565 100644 --- a/xmloff/inc/XMLLineNumberingImportContext.hxx +++ b/xmloff/inc/XMLLineNumberingImportContext.hxx @@ -100,7 +100,7 @@ protected: void ProcessAttribute( enum LineNumberingToken eToken, - OUString sValue); + const OUString& sValue); virtual void CreateAndInsert(sal_Bool bOverwrite); @@ -111,8 +111,8 @@ protected: ::com::sun::star::xml::sax::XAttributeList> & xAttrList ); void ProcessAttribute( - const OUString sLocalName, - const OUString sValue); + const OUString& sLocalName, + const OUString& sValue); }; #endif diff --git a/xmloff/inc/forms/property_handler.hxx b/xmloff/inc/forms/property_handler.hxx index fb17d6054e8a..25ce31c9169c 100644 --- a/xmloff/inc/forms/property_handler.hxx +++ b/xmloff/inc/forms/property_handler.hxx @@ -51,7 +51,7 @@ namespace xmloff /** retrieves the values of the properties controlled by an XML attributed, described by a given attribute value */ virtual bool - getPropertyValues( const OUString i_attributeValue, PropertyValues& o_propertyValues ) const = 0; + getPropertyValues( const OUString& i_attributeValue, PropertyValues& o_propertyValues ) const = 0; virtual ~IPropertyHandler() { } }; diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 6728690074d0..d9805b6c342f 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -206,7 +206,7 @@ public: static enum ::xmloff::token::XMLTokenEnum MapReferenceSource(sal_Int16 nType); static enum ::xmloff::token::XMLTokenEnum MapReferenceType(sal_Int16 nType); static enum ::xmloff::token::XMLTokenEnum MapCountFieldName(FieldIdEnum nToken); - static enum ::xmloff::token::XMLTokenEnum MapBibliographyFieldName(OUString sName); + static enum ::xmloff::token::XMLTokenEnum MapBibliographyFieldName(const OUString& sName); static enum ::xmloff::token::XMLTokenEnum MapMeasureKind(sal_Int16 nKind); enum ::xmloff::token::XMLTokenEnum MapPageNumberName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> & xPropSet, @@ -383,7 +383,7 @@ protected: void ProcessStringSequence( const ::com::sun::star::uno::Sequence<OUString>& rSequence, - const OUString sSelected ); + const OUString& sSelected ); void ProcessStringSequence( const ::com::sun::star::uno::Sequence<OUString>& rSequence, diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index 9333688a30f5..74b127b8d4cf 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -161,7 +161,7 @@ protected: inline XMLTextImportHelper& GetImportHelper() { return rTextImportHelper; } inline OUString GetServiceName() { return sServiceName; } - inline void SetServiceName(OUString sStr) { sServiceName = sStr; } + inline void SetServiceName(const OUString& sStr) { sServiceName = sStr; } OUString GetContent(); @@ -1197,7 +1197,7 @@ protected: const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> & xPropertySet); - static const sal_Char* MapBibliographyFieldName(OUString sName); + static const sal_Char* MapBibliographyFieldName(const OUString& sName); }; /** Import an annotation field (<text:annotation>) */ diff --git a/xmloff/inc/txtlists.hxx b/xmloff/inc/txtlists.hxx index eb7f8caa5494..83bdad450ca7 100644 --- a/xmloff/inc/txtlists.hxx +++ b/xmloff/inc/txtlists.hxx @@ -57,16 +57,16 @@ class XMLTextListsHelper : private boost::noncopyable // keeping track of processed lists for import and export // Add optional parameter <sListStyleDefaultListId> (#i92811#) - void KeepListAsProcessed( OUString sListId, - OUString sListStyleName, - OUString sContinueListId, - OUString sListStyleDefaultListId = OUString() ); + void KeepListAsProcessed( const OUString& sListId, + const OUString& sListStyleName, + const OUString& sContinueListId, + const OUString& sListStyleDefaultListId = OUString() ); - sal_Bool IsListProcessed( const OUString sListId ) const; + sal_Bool IsListProcessed( const OUString& sListId ) const; OUString GetListStyleOfProcessedList( - const OUString sListId ) const; + const OUString& sListId ) const; OUString GetContinueListIdOfProcessedList( - const OUString sListId ) const; + const OUString& sListId ) const; const OUString& GetLastProcessedListId() const; const OUString& GetListStyleOfLastProcessedList() const; @@ -76,16 +76,16 @@ class XMLTextListsHelper : private boost::noncopyable OUString GetListIdForListBlock( XMLTextListBlockContext& rListBlock ); // keep track of continue list chain for export - void StoreLastContinuingList( OUString sListId, - OUString sContinuingListId ); + void StoreLastContinuingList( const OUString& sListId, + const OUString& sContinuingListId ); - OUString GetLastContinuingListId( OUString sListId ) const; + OUString GetLastContinuingListId( const OUString& sListId ) const; // keep track of opened list elements of a certain list for export - void PushListOnStack( OUString sListId, - OUString sListStyleName ); + void PushListOnStack( const OUString& sListId, + const OUString& sListStyleName ); void PopListFromStack(); - sal_Bool EqualsToTopListStyleOnStack( const OUString sListId ) const; + sal_Bool EqualsToTopListStyleOnStack( const OUString& sListId ) const; /** for importing numbered-paragraph note that the ID namespace for numbered-paragraph and regular list @@ -95,13 +95,13 @@ class XMLTextListsHelper : private boost::noncopyable ::com::sun::star::container::XIndexReplace> EnsureNumberedParagraph( SvXMLImport & i_rImport, - const OUString i_ListId, - sal_Int16 & io_rLevel, const OUString i_StyleName); + const OUString& i_ListId, + sal_Int16 & io_rLevel, const OUString& i_StyleName); /// get ID of the last numbered-paragraph iff it has given style-name OUString GetNumberedParagraphListId( const sal_uInt16 i_Level, - const OUString i_StyleName); + const OUString& i_StyleName); /** Creates a NumRule from given style-name. @param i_rImport the SvXMLImport @@ -117,8 +117,8 @@ class XMLTextListsHelper : private boost::noncopyable SvXMLImport & i_rImport, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace>& i_xNumRule, - const OUString i_ParentStyleName, - const OUString i_StyleName, + const OUString& i_ParentStyleName, + const OUString& i_StyleName, sal_Int16 & io_rLevel, sal_Bool* o_pRestartNumbering = 0, sal_Bool* io_pSetDefaults = 0); diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 780eec75637b..d1d4bf3253ce 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -173,7 +173,7 @@ Reference< drawing::XShape > SchXMLAxisContext::getTitleShape() return xResult; } -void SchXMLAxisContext::CreateGrid( OUString sAutoStyleName, bool bIsMajor ) +void SchXMLAxisContext::CreateGrid( const OUString& sAutoStyleName, bool bIsMajor ) { Reference< beans::XPropertySet > xDiaProp( m_rImportHelper.GetChartDocument()->getDiagram(), uno::UNO_QUERY ); Reference< chart::XAxis > xAxis( lcl_getChartAxis( m_aCurrentAxis, m_xDiagram ) ); diff --git a/xmloff/source/chart/SchXMLAxisContext.hxx b/xmloff/source/chart/SchXMLAxisContext.hxx index e112a09dcdfd..49966bb968d8 100644 --- a/xmloff/source/chart/SchXMLAxisContext.hxx +++ b/xmloff/source/chart/SchXMLAxisContext.hxx @@ -65,7 +65,7 @@ private: bool& m_rbAxisPositionAttributeImported; ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > getTitleShape(); - void CreateGrid( OUString sAutoStyleName, bool bIsMajor ); + void CreateGrid( const OUString& sAutoStyleName, bool bIsMajor ); void CreateAxis(); void SetAxisTitle(); }; diff --git a/xmloff/source/chart/transporttypes.hxx b/xmloff/source/chart/transporttypes.hxx index 7b125395c420..ab1dde1aef1f 100644 --- a/xmloff/source/chart/transporttypes.hxx +++ b/xmloff/source/chart/transporttypes.hxx @@ -156,7 +156,7 @@ struct RegressionStyle RegressionStyle(const com::sun::star::uno::Reference< com::sun::star::chart2::XDataSeries >& xSeries, - OUString sStyleName) : + const OUString& sStyleName) : m_xSeries ( xSeries ), msStyleName ( sStyleName ) {} @@ -197,7 +197,7 @@ struct DataRowPointStyle com::sun::star::chart2::XDataSeries >& xSeries , sal_Int32 nPointIndex , sal_Int32 nPointRepeat - , OUString sStyleName + , const OUString& sStyleName , sal_Int32 nAttachedAxis = 0 ) : meType( eType ), m_xSeries( xSeries ), diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx index 4b24be9151ed..d3a577af35f0 100644 --- a/xmloff/source/core/DomBuilderContext.cxx +++ b/xmloff/source/core/DomBuilderContext.cxx @@ -60,7 +60,7 @@ using com::sun::star::xml::dom::NodeType_ELEMENT_NODE; static Reference<XNode> lcl_createDomInstance(); static Reference<XNode> lcl_createElement( SvXMLImport& rImport, sal_uInt16 nPrefix, - const OUString rLocalName, + const OUString& rLocalName, Reference<XNode> xParent); @@ -195,7 +195,7 @@ static Reference<XNode> lcl_createDomInstance() static Reference<XNode> lcl_createElement( SvXMLImport& rImport, sal_uInt16 nPrefix, - const OUString rLocalName, + const OUString& rLocalName, Reference<XNode> xParent) { DBG_ASSERT( xParent.is(), "need parent node" ); diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index 9187eb1f6e0e..7137f8e6f290 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -290,7 +290,7 @@ void XMLSettingsExportHelper::exportSequencePropertyValue( } void XMLSettingsExportHelper::exportSymbolDescriptors( const uno::Sequence < formula::SymbolDescriptor > &rProps, - const OUString rName) const + const OUString& rName) const { uno::Reference< container::XIndexContainer > xBox = document::IndexedPropertyValues::create(m_rContext.GetComponentContext()); @@ -397,7 +397,7 @@ void XMLSettingsExportHelper::exportNameAccess( void XMLSettingsExportHelper::exportIndexAccess( const uno::Reference<container::XIndexAccess> aIndexed, - const OUString rName) const + const OUString& rName) const { DBG_ASSERT(!rName.isEmpty(), "no name"); DBG_ASSERT(aIndexed->getElementType().equals(getCppuType( (uno::Sequence<beans::PropertyValue> *)0 ) ), @@ -418,7 +418,7 @@ void XMLSettingsExportHelper::exportIndexAccess( void XMLSettingsExportHelper::exportForbiddenCharacters( const uno::Any &rAny, - const OUString rName) const + const OUString& rName) const { uno::Reference<i18n::XForbiddenCharacters> xForbChars; uno::Reference<linguistic2::XSupportedLocales> xLocales; diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx index 1ba863f84c23..11b43d045fae 100644 --- a/xmloff/source/core/attrlist.cxx +++ b/xmloff/source/core/attrlist.cxx @@ -165,7 +165,7 @@ void SvXMLAttributeList::Clear() OSL_ASSERT( ! getLength() ); } -void SvXMLAttributeList::RemoveAttribute( const OUString sName ) +void SvXMLAttributeList::RemoveAttribute( const OUString& sName ) { ::std::vector<struct SvXMLTagAttribute_Impl>::iterator ii = m_pImpl->vecAttribute.begin(); diff --git a/xmloff/source/forms/handler/vcl_date_handler.cxx b/xmloff/source/forms/handler/vcl_date_handler.cxx index a29f01815a36..3d3826c8d957 100644 --- a/xmloff/source/forms/handler/vcl_date_handler.cxx +++ b/xmloff/source/forms/handler/vcl_date_handler.cxx @@ -63,7 +63,7 @@ namespace xmloff return aBuffer.makeStringAndClear(); } - bool VCLDateHandler::getPropertyValues( const OUString i_attributeValue, PropertyValues& o_propertyValues ) const + bool VCLDateHandler::getPropertyValues( const OUString& i_attributeValue, PropertyValues& o_propertyValues ) const { DateTime aDateTime; Date aDate; diff --git a/xmloff/source/forms/handler/vcl_date_handler.hxx b/xmloff/source/forms/handler/vcl_date_handler.hxx index a2736e11cd7d..513655f063f1 100644 --- a/xmloff/source/forms/handler/vcl_date_handler.hxx +++ b/xmloff/source/forms/handler/vcl_date_handler.hxx @@ -34,7 +34,7 @@ namespace xmloff // IPropertyHandler virtual OUString getAttributeValue( const PropertyValues& i_propertyValues ) const; virtual OUString getAttributeValue( const ::com::sun::star::uno::Any& i_propertyValue ) const; - virtual bool getPropertyValues( const OUString i_attributeValue, PropertyValues& o_propertyValues ) const; + virtual bool getPropertyValues( const OUString& i_attributeValue, PropertyValues& o_propertyValues ) const; }; } // namespace xmloff diff --git a/xmloff/source/forms/handler/vcl_time_handler.cxx b/xmloff/source/forms/handler/vcl_time_handler.cxx index bdbd211b2575..c02c2e6e2c1e 100644 --- a/xmloff/source/forms/handler/vcl_time_handler.cxx +++ b/xmloff/source/forms/handler/vcl_time_handler.cxx @@ -64,7 +64,7 @@ namespace xmloff return aBuffer.makeStringAndClear(); } - bool VCLTimeHandler::getPropertyValues( const OUString i_attributeValue, PropertyValues& o_propertyValues ) const + bool VCLTimeHandler::getPropertyValues( const OUString& i_attributeValue, PropertyValues& o_propertyValues ) const { Duration aDuration; Time aTime; diff --git a/xmloff/source/forms/handler/vcl_time_handler.hxx b/xmloff/source/forms/handler/vcl_time_handler.hxx index 564714e8ff38..be52be0acd34 100644 --- a/xmloff/source/forms/handler/vcl_time_handler.hxx +++ b/xmloff/source/forms/handler/vcl_time_handler.hxx @@ -34,7 +34,7 @@ namespace xmloff // IPropertyHandler virtual OUString getAttributeValue( const PropertyValues& i_propertyValues ) const; virtual OUString getAttributeValue( const ::com::sun::star::uno::Any& i_propertyValue ) const; - virtual bool getPropertyValues( const OUString i_attributeValue, PropertyValues& o_propertyValues ) const; + virtual bool getPropertyValues( const OUString& i_attributeValue, PropertyValues& o_propertyValues ) const; }; } // namespace xmloff diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index 4afa5fa41aee..944caa0634bc 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -280,7 +280,7 @@ void SvXMLAutoStylePoolP::AddFamily( sal_Int32 nFamily, const OUString& rStrName, SvXMLExportPropertyMapper* pMapper, - OUString aStrPrefix, + const OUString& aStrPrefix, sal_Bool bAsFamily ) { UniReference <SvXMLExportPropertyMapper> xTmp = pMapper; diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index 5fcc75b496c0..a83f65957edd 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx @@ -429,13 +429,13 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings( } void XMLFootnoteConfigurationImportContext::SetBeginNotice( - OUString sText) + const OUString& sText) { sBeginNotice = sText; } void XMLFootnoteConfigurationImportContext::SetEndNotice( - OUString sText) + const OUString& sText) { sEndNotice = sText; } diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx index 62f7d13c54d9..6779741fdfc3 100644 --- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx @@ -95,8 +95,8 @@ void XMLIndexBibliographyConfigurationContext::StartElement( void XMLIndexBibliographyConfigurationContext::ProcessAttribute( sal_uInt16 nPrefix, - OUString sLocalName, - OUString sValue) + const OUString& sLocalName, + const OUString& sValue) { if( XML_NAMESPACE_TEXT == nPrefix ) { diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx index a2cc6d511237..8b1a67c8e387 100644 --- a/xmloff/source/text/XMLLineNumberingImportContext.cxx +++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx @@ -126,7 +126,7 @@ void XMLLineNumberingImportContext::StartElement( void XMLLineNumberingImportContext::ProcessAttribute( enum LineNumberingToken eToken, - OUString sValue) + const OUString& sValue) { bool bTmp(false); sal_Int32 nTmp; diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index fb8aecce0b89..4cb16199a3d0 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2795,7 +2795,7 @@ void XMLTextFieldExport::ProcessCommandType( void XMLTextFieldExport::ProcessStringSequence( const Sequence<OUString>& rSequence, - const OUString sSelected ) + const OUString& sSelected ) { // find selected element sal_Int32 nSelected = -1; @@ -3353,7 +3353,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapDocInfoFieldName( return eElement; } -enum XMLTokenEnum XMLTextFieldExport::MapBibliographyFieldName(OUString sName) +enum XMLTokenEnum XMLTextFieldExport::MapBibliographyFieldName(const OUString& sName) { enum XMLTokenEnum eName = XML_TOKEN_INVALID; diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index cd24661347d4..e54b8ea2c2f5 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -3449,7 +3449,7 @@ void XMLBibliographyFieldImportContext::PrepareField( } const sal_Char* XMLBibliographyFieldImportContext::MapBibliographyFieldName( - OUString sName) + const OUString& sName) { const sal_Char* pName = NULL; diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 833e5ebfa781..bb3e867f1e7b 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1285,7 +1285,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, /* Apply special case, that found list style equals the chapter numbering, also to the found list styles of the parent styles. (#i73973#) */ -static bool lcl_HasListStyle( OUString sStyleName, +static bool lcl_HasListStyle( const OUString& sStyleName, const Reference < XNameContainer >& xParaStyles, SvXMLImport& rImport, const OUString& sNumberingStyleName, @@ -2548,7 +2548,7 @@ OUString XMLTextImportHelper::FindActiveBookmarkName() } } -void XMLTextImportHelper::pushFieldCtx( OUString name, OUString type ) +void XMLTextImportHelper::pushFieldCtx( const OUString& name, const OUString& type ) { m_pImpl->m_FieldStack.push(Impl::field_stack_item_t( Impl::field_name_type_t(name, type), Impl::field_params_t())); @@ -2560,7 +2560,7 @@ void XMLTextImportHelper::popFieldCtx() m_pImpl->m_FieldStack.pop(); } -void XMLTextImportHelper::addFieldParam( OUString name, OUString value ) +void XMLTextImportHelper::addFieldParam( const OUString& name, const OUString& value ) { DBG_ASSERT(!m_pImpl->m_FieldStack.empty(), "stack is empty: not good! Do a pushFieldCtx before..."); diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index 853286ff864c..f252b1e3a32c 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -133,10 +133,10 @@ void XMLTextListsHelper::SetListItem( XMLTextListItemContext *i_pListItem ) } // Handling for parameter <sListStyleDefaultListId> (#i92811#) -void XMLTextListsHelper::KeepListAsProcessed( OUString sListId, - OUString sListStyleName, - OUString sContinueListId, - OUString sListStyleDefaultListId ) +void XMLTextListsHelper::KeepListAsProcessed( const OUString& sListId, + const OUString& sListStyleName, + const OUString& sContinueListId, + const OUString& sListStyleDefaultListId ) { if ( IsListProcessed( sListId ) ) { @@ -176,7 +176,7 @@ void XMLTextListsHelper::KeepListAsProcessed( OUString sListId, } } -sal_Bool XMLTextListsHelper::IsListProcessed( const OUString sListId ) const +sal_Bool XMLTextListsHelper::IsListProcessed( const OUString& sListId ) const { if ( mpProcessedLists == 0 ) { @@ -187,7 +187,7 @@ sal_Bool XMLTextListsHelper::IsListProcessed( const OUString sListId ) const } OUString XMLTextListsHelper::GetListStyleOfProcessedList( - const OUString sListId ) const + const OUString& sListId ) const { if ( mpProcessedLists != 0 ) { @@ -202,7 +202,7 @@ OUString XMLTextListsHelper::GetListStyleOfProcessedList( } OUString XMLTextListsHelper::GetContinueListIdOfProcessedList( - const OUString sListId ) const + const OUString& sListId ) const { if ( mpProcessedLists != 0 ) { @@ -292,8 +292,8 @@ OUString XMLTextListsHelper::GetListIdForListBlock( XMLTextListBlockContext& rLi return sListBlockListId; } -void XMLTextListsHelper::StoreLastContinuingList( OUString sListId, - OUString sContinuingListId ) +void XMLTextListsHelper::StoreLastContinuingList( const OUString& sListId, + const OUString& sContinuingListId ) { if ( mpContinuingLists == 0 ) { @@ -304,7 +304,7 @@ void XMLTextListsHelper::StoreLastContinuingList( OUString sListId, } OUString XMLTextListsHelper::GetLastContinuingListId( - OUString sListId ) const + const OUString& sListId ) const { if ( mpContinuingLists != 0) { @@ -319,8 +319,8 @@ OUString XMLTextListsHelper::GetLastContinuingListId( return sListId; } -void XMLTextListsHelper::PushListOnStack( OUString sListId, - OUString sListStyleName ) +void XMLTextListsHelper::PushListOnStack( const OUString& sListId, + const OUString& sListStyleName ) { if ( mpListStack == 0 ) { @@ -339,7 +339,7 @@ void XMLTextListsHelper::PopListFromStack() } } -sal_Bool XMLTextListsHelper::EqualsToTopListStyleOnStack( const OUString sListId ) const +sal_Bool XMLTextListsHelper::EqualsToTopListStyleOnStack( const OUString& sListId ) const { return mpListStack != 0 ? sListId == mpListStack->back().second @@ -349,7 +349,7 @@ sal_Bool XMLTextListsHelper::EqualsToTopListStyleOnStack( const OUString sListId OUString XMLTextListsHelper::GetNumberedParagraphListId( const sal_uInt16 i_Level, - const OUString i_StyleName) + const OUString& i_StyleName) { if (i_StyleName.isEmpty()) { OSL_FAIL("invalid numbered-paragraph: no style-name"); @@ -382,8 +382,8 @@ ClampLevel(uno::Reference<container::XIndexReplace> const& i_xNumRules, uno::Reference<container::XIndexReplace> XMLTextListsHelper::EnsureNumberedParagraph( SvXMLImport & i_rImport, - const OUString i_ListId, - sal_Int16 & io_rLevel, const OUString i_StyleName) + const OUString& i_ListId, + sal_Int16 & io_rLevel, const OUString& i_StyleName) { OSL_ENSURE(!i_ListId.isEmpty(), "invalid ListId"); OSL_ENSURE(io_rLevel >= 0, "invalid Level"); @@ -444,8 +444,8 @@ uno::Reference<container::XIndexReplace> XMLTextListsHelper::MakeNumRule( SvXMLImport & i_rImport, const uno::Reference<container::XIndexReplace>& i_rNumRule, - const OUString i_ParentStyleName, - const OUString i_StyleName, + const OUString& i_ParentStyleName, + const OUString& i_StyleName, sal_Int16 & io_rLevel, sal_Bool* o_pRestartNumbering, sal_Bool* io_pSetDefaults) diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 8f858c96dcf5..eb09a5745245 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -1037,8 +1037,8 @@ protected: * are not expected to. */ virtual void ProcessAttribute(sal_uInt16 nNamespace, - OUString sLocalName, - OUString sValue, + const OUString& sLocalName, + const OUString& sValue, Reference<beans::XPropertySet>& rPropSet); static void GetServiceName(OUString& sServiceName, @@ -1168,8 +1168,8 @@ void XMLIndexMarkImportContext_Impl::ProcessAttributes( void XMLIndexMarkImportContext_Impl::ProcessAttribute( sal_uInt16 nNamespace, - OUString sLocalName, - OUString sValue, + const OUString& sLocalName, + const OUString& sValue, Reference<beans::XPropertySet>& rPropSet) { // we only know ID + string-value attribute; @@ -1297,8 +1297,8 @@ protected: /** process outline level */ virtual void ProcessAttribute(sal_uInt16 nNamespace, - OUString sLocalName, - OUString sValue, + const OUString& sLocalName, + const OUString& sValue, Reference<beans::XPropertySet>& rPropSet); }; @@ -1315,8 +1315,8 @@ XMLTOCMarkImportContext_Impl::XMLTOCMarkImportContext_Impl( void XMLTOCMarkImportContext_Impl::ProcessAttribute( sal_uInt16 nNamespace, - OUString sLocalName, - OUString sValue, + const OUString& sLocalName, + const OUString& sValue, Reference<beans::XPropertySet>& rPropSet) { SAL_WARN_IF(!rPropSet.is(), "xmloff.text", "need PropertySet"); @@ -1362,8 +1362,8 @@ protected: /** process index name */ virtual void ProcessAttribute(sal_uInt16 nNamespace, - OUString sLocalName, - OUString sValue, + const OUString& sLocalName, + const OUString& sValue, Reference<beans::XPropertySet>& rPropSet); }; @@ -1380,7 +1380,7 @@ XMLUserIndexMarkImportContext_Impl::XMLUserIndexMarkImportContext_Impl( } void XMLUserIndexMarkImportContext_Impl::ProcessAttribute( - sal_uInt16 nNamespace, OUString sLocalName, OUString sValue, + sal_uInt16 nNamespace, const OUString& sLocalName, const OUString& sValue, Reference<beans::XPropertySet>& rPropSet) { if ( XML_NAMESPACE_TEXT == nNamespace ) @@ -1439,8 +1439,8 @@ protected: /** process primary + secondary keys */ virtual void ProcessAttribute(sal_uInt16 nNamespace, - OUString sLocalName, - OUString sValue, + const OUString& sLocalName, + const OUString& sValue, Reference<beans::XPropertySet>& rPropSet); }; @@ -1462,7 +1462,7 @@ XMLAlphaIndexMarkImportContext_Impl::XMLAlphaIndexMarkImportContext_Impl( } void XMLAlphaIndexMarkImportContext_Impl::ProcessAttribute( - sal_uInt16 nNamespace, OUString sLocalName, OUString sValue, + sal_uInt16 nNamespace, const OUString& sLocalName, const OUString& sValue, Reference<beans::XPropertySet>& rPropSet) { if (XML_NAMESPACE_TEXT == nNamespace) diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx index 5cce41e9316a..dda882090a96 100644 --- a/xmloff/source/text/txtparaimphint.hxx +++ b/xmloff/source/text/txtparaimphint.hxx @@ -171,7 +171,7 @@ public: XMLIndexMarkHint_Impl( const css::uno::Reference < css::beans::XPropertySet > & rPropSet, const css::uno::Reference < css::text::XTextRange > & rPos, - OUString sIDString) : + const OUString& sIDString) : XMLHint_Impl( XML_HINT_INDEX_MARK, rPos, rPos ), xIndexMarkPropSet( rPropSet ), sID(sIDString) |