From 8bedbc3f567f3f6d567376ccf0830160df1d4bbb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 20 Jul 2017 11:49:30 +0200 Subject: loplugin:constparams in xmloff Change-Id: Iec9535b106c85e47ddb14eec4ef3db5b1c8d8fd7 Reviewed-on: https://gerrit.libreoffice.org/40219 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/inc/RDFaImportHelper.hxx | 2 +- xmloff/inc/XMLEmbeddedObjectImportContext.hxx | 3 +-- xmloff/inc/XMLNumberStylesImport.hxx | 2 +- xmloff/inc/animationimport.hxx | 2 +- xmloff/inc/txtlists.hxx | 2 +- xmloff/source/chart/SchXMLChartContext.cxx | 2 +- xmloff/source/chart/SchXMLPlotAreaContext.cxx | 6 +++--- xmloff/source/chart/SchXMLPlotAreaContext.hxx | 2 +- xmloff/source/chart/SchXMLSeries2Context.cxx | 4 ++-- xmloff/source/chart/SchXMLSeries2Context.hxx | 2 +- xmloff/source/core/DocumentSettingsContext.cxx | 2 +- xmloff/source/core/RDFaImportHelper.cxx | 2 +- xmloff/source/core/XMLEmbeddedObjectImportContext.cxx | 3 +-- xmloff/source/core/xmlexp.cxx | 4 ++-- xmloff/source/core/xmlimp.cxx | 2 +- xmloff/source/core/xmluconv.cxx | 2 +- xmloff/source/draw/XMLNumberStyles.cxx | 2 +- xmloff/source/draw/animationimport.cxx | 2 +- xmloff/source/draw/shapeexport.cxx | 6 +++--- xmloff/source/draw/shapeimport.cxx | 10 +++++----- xmloff/source/draw/ximppage.cxx | 4 ++-- xmloff/source/draw/ximppage.hxx | 4 ++-- xmloff/source/draw/ximpstyl.cxx | 4 ++-- xmloff/source/draw/ximpstyl.hxx | 4 ++-- xmloff/source/script/XMLEventExport.cxx | 8 ++++---- xmloff/source/style/numehelp.cxx | 4 ++-- xmloff/source/style/xmlaustp.cxx | 4 ++-- xmloff/source/style/xmlnumfe.cxx | 4 ++-- xmloff/source/style/xmlnumfi.cxx | 2 +- xmloff/source/text/XMLSectionExport.cxx | 2 +- xmloff/source/text/XMLSectionExport.hxx | 3 +-- xmloff/source/text/XMLTextMarkImportContext.cxx | 2 +- xmloff/source/text/txtimp.cxx | 18 +++++++++--------- xmloff/source/text/txtimppr.cxx | 10 +++++----- xmloff/source/text/txtlists.cxx | 2 +- xmloff/source/text/txtparae.cxx | 2 +- xmloff/source/xforms/XFormsBindContext.cxx | 4 ++-- xmloff/source/xforms/xformsapi.cxx | 2 +- xmloff/source/xforms/xformsapi.hxx | 2 +- xmloff/source/xforms/xformsexport.cxx | 4 ++-- 40 files changed, 74 insertions(+), 77 deletions(-) (limited to 'xmloff') diff --git a/xmloff/inc/RDFaImportHelper.hxx b/xmloff/inc/RDFaImportHelper.hxx index b25c09b8ab32..c64e5a19cd7c 100644 --- a/xmloff/inc/RDFaImportHelper.hxx +++ b/xmloff/inc/RDFaImportHelper.hxx @@ -67,7 +67,7 @@ public: /** Add a RDFa statement; must have been parsed with ParseRDFa */ void AddRDFa( css::uno::Reference< css::rdf::XMetadatable> const & i_xObject, - std::shared_ptr & i_pRDFaAttributes); + std::shared_ptr const & i_pRDFaAttributes); /** Parse and add a RDFa statement; parameters are XML attribute values */ void ParseAndAddRDFa( diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx index 01046620e0d7..206707ce1409 100644 --- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx +++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx @@ -55,8 +55,7 @@ public: virtual void Characters( const OUString& rChars ) override; - void SetComponent( - css::uno::Reference< css::lang::XComponent >& rComp ); + void SetComponent( css::uno::Reference< css::lang::XComponent > const & rComp ); }; diff --git a/xmloff/inc/XMLNumberStylesImport.hxx b/xmloff/inc/XMLNumberStylesImport.hxx index 172e17587742..4f4d1c8e849a 100644 --- a/xmloff/inc/XMLNumberStylesImport.hxx +++ b/xmloff/inc/XMLNumberStylesImport.hxx @@ -43,7 +43,7 @@ private: bool compareStyle( const SdXMLFixedDataStyle* pStyle, sal_Int16& nIndex ) const; protected: - void add( OUString& rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString& rText ); + void add( OUString const & rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString const & rText ); public: diff --git a/xmloff/inc/animationimport.hxx b/xmloff/inc/animationimport.hxx index 03abc23a6f9b..6e77eea29ee8 100644 --- a/xmloff/inc/animationimport.hxx +++ b/xmloff/inc/animationimport.hxx @@ -54,7 +54,7 @@ public: virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; - static void postProcessRootNode( const css::uno::Reference< css::animations::XAnimationNode >& xNode, css::uno::Reference< css::beans::XPropertySet >& xPageProps ); + static void postProcessRootNode( const css::uno::Reference< css::animations::XAnimationNode >& xNode, css::uno::Reference< css::beans::XPropertySet > const & xPageProps ); }; } diff --git a/xmloff/inc/txtlists.hxx b/xmloff/inc/txtlists.hxx index f4696713908e..1d335be473f9 100644 --- a/xmloff/inc/txtlists.hxx +++ b/xmloff/inc/txtlists.hxx @@ -74,7 +74,7 @@ class XMLTextListsHelper OUString GenerateNewListId() const; // Provide list id for a certain list block for import (#i92811#) - OUString GetListIdForListBlock( XMLTextListBlockContext& rListBlock ); + OUString GetListIdForListBlock( XMLTextListBlockContext const & rListBlock ); // keep track of continue list chain for export void StoreLastContinuingList( const OUString& sListId, diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 69c76d5ab9ea..a65e6c81434d 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -241,7 +241,7 @@ SchXMLChartContext::SchXMLChartContext( SchXMLImportHelper& rImpHelper, SchXMLChartContext::~SchXMLChartContext() {} -bool lcl_hasServiceName(Reference & xFactory, OUString const & rServiceName) +bool lcl_hasServiceName(Reference const & xFactory, OUString const & rServiceName) { const uno::Sequence aServiceNames(xFactory->getAvailableServiceNames()); diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 74141afbc526..e76f51b04c52 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -706,7 +706,7 @@ void SchXMLPositionAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefi } } -void SchXMLPositionAttributesHelper::readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ) +void SchXMLPositionAttributesHelper::readAutomaticPositioningProperties( XMLPropStyleContext const * pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ) { if( pPropStyleContext && pStylesCtxt ) { @@ -942,7 +942,7 @@ SchXMLStatisticsObjectContext::~SchXMLStatisticsObjectContext() namespace { void SetErrorBarStyleProperties( const OUString& rStyleName, const uno::Reference< beans::XPropertySet >& xBarProp, - SchXMLImportHelper& rImportHelper ) + SchXMLImportHelper const & rImportHelper ) { const SvXMLStylesContext* pStylesCtxt = rImportHelper.GetAutoStylesContext(); const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(SchXMLImportHelper::GetChartFamilyID(), @@ -955,7 +955,7 @@ void SetErrorBarStyleProperties( const OUString& rStyleName, const uno::Referenc } void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, const uno::Reference< beans::XPropertySet>& xBarProp, - SchXMLImportHelper& rImportHelper, OUString& aPosRange, OUString& aNegRange) + SchXMLImportHelper const & rImportHelper, OUString& aPosRange, OUString& aNegRange) { const SvXMLStylesContext* pStylesCtxt = rImportHelper.GetAutoStylesContext(); const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(SchXMLImportHelper::GetChartFamilyID(), diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index 612bdbb26363..f839420b8718 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -58,7 +58,7 @@ public: ~SchXMLPositionAttributesHelper(); void readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue ); - void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); + void readAutomaticPositioningProperties( XMLPropStyleContext const * pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); bool hasPosSize() const; bool isAutomatic() const; diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index ee6a10c447f7..d868cf61ae13 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -230,7 +230,7 @@ Reference< chart2::data::XLabeledDataSequence2 > lcl_createAndAddSequenceToSerie XMLPropStyleContext* lcl_GetStylePropContext( const SvXMLStylesContext* pStylesCtxt, const SvXMLStyleContext*& rpStyle, - OUString& rStyleName ) + OUString const & rStyleName ) { rpStyle = pStylesCtxt->FindStyleChildContext( SchXMLImportHelper::GetChartFamilyID(), rStyleName ); XMLPropStyleContext* pPropStyleContext = @@ -876,7 +876,7 @@ void SchXMLSeries2Context::setStylesToRegressionCurves( SeriesDefaultsAndStyles& rSeriesDefaultsAndStyles, const SvXMLStylesContext* pStylesCtxt, const SvXMLStyleContext*& rpStyle, - OUString& rCurrentStyleName ) + OUString const & rCurrentStyleName ) { std::list< RegressionStyle >::iterator iStyle; diff --git a/xmloff/source/chart/SchXMLSeries2Context.hxx b/xmloff/source/chart/SchXMLSeries2Context.hxx index a546d2671535..c3ebf3a000c5 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.hxx +++ b/xmloff/source/chart/SchXMLSeries2Context.hxx @@ -115,7 +115,7 @@ public: SeriesDefaultsAndStyles& rSeriesDefaultsAndStyles, const SvXMLStylesContext* pStylesCtxt, const SvXMLStyleContext*& rpStyle, - OUString &rCurrStyleName ); + OUString const &rCurrStyleName ); static void setStylesToDataPoints( SeriesDefaultsAndStyles& rSeriesDefaultsAndStyles , const SvXMLStylesContext* pStylesCtxt diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 6dfe2e723967..7f902830f5b9 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -59,7 +59,7 @@ class XMLMyList public: explicit XMLMyList(const uno::Reference& rxContext); - void push_back(beans::PropertyValue& aProp) { aProps.push_back(aProp); nCount++; } + void push_back(beans::PropertyValue const & aProp) { aProps.push_back(aProp); nCount++; } uno::Sequence GetSequence(); uno::Reference GetNameContainer(); uno::Reference GetIndexContainer(); diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index 1d8b440d3ea5..abfa5ed80ced 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.cxx @@ -397,7 +397,7 @@ RDFaImportHelper::ParseRDFa( void RDFaImportHelper::AddRDFa( uno::Reference const & i_xObject, - std::shared_ptr & i_pRDFaAttributes) + std::shared_ptr const & i_pRDFaAttributes) { if (!i_xObject.is()) { diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 9c0699b80ca7..50401c3dc7ee 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -100,8 +100,7 @@ void XMLEmbeddedObjectImportContext_Impl::Characters( const OUString& rChars ) } -void XMLEmbeddedObjectImportContext::SetComponent( - Reference< XComponent >& rComp ) +void XMLEmbeddedObjectImportContext::SetComponent( Reference< XComponent > const & rComp ) { if( !rComp.is() || sFilterService.isEmpty() ) return; diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 89fe990f6d11..874a330882b3 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1216,7 +1216,7 @@ void SvXMLExport::SetBodyAttributes() } static void -lcl_AddGrddl(SvXMLExport & rExport, const SvXMLExportFlags /*nExportMode*/) +lcl_AddGrddl(SvXMLExport const & rExport, const SvXMLExportFlags /*nExportMode*/) { // check version >= 1.2 switch (rExport.getDefaultVersion()) { @@ -2065,7 +2065,7 @@ sal_Int64 SAL_CALL SvXMLExport::getSomething( const uno::Sequence< sal_Int8 >& r return 0; } -void SvXMLExport::ExportEmbeddedOwnObject( Reference< XComponent >& rComp ) +void SvXMLExport::ExportEmbeddedOwnObject( Reference< XComponent > const & rComp ) { OUString sFilterService; diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 10f31883f236..464d397d29b6 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -2117,7 +2117,7 @@ SvXMLImportFastNamespaceHandler::SvXMLImportFastNamespaceHandler() { } -void SvXMLImportFastNamespaceHandler::addNSDeclAttributes( rtl::Reference < comphelper::AttributeList >& rAttrList ) +void SvXMLImportFastNamespaceHandler::addNSDeclAttributes( rtl::Reference < comphelper::AttributeList > const & rAttrList ) { for(const auto& aNamespaceDefine : m_aNamespaceDefines) { diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index 7272ac0e6870..d65ad047c130 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -732,7 +732,7 @@ void SvXMLUnitConverter::convertPropertySet(uno::Sequence& } } -void SvXMLUnitConverter::convertPropertySet(uno::Reference& rProperties, +void SvXMLUnitConverter::convertPropertySet(uno::Reference const & rProperties, const uno::Sequence& aProps) { sal_Int32 nCount(aProps.getLength()); diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 5e083fe05a43..909c0d69372d 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -601,7 +601,7 @@ SdXMLNumberFormatImportContext::~SdXMLNumberFormatImportContext() { } -void SdXMLNumberFormatImportContext::add( OUString& rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString& rText ) +void SdXMLNumberFormatImportContext::add( OUString const & rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString const & rText ) { if( mnIndex == -1 || mnIndex == 16 ) { diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index d99066d71ccc..98941c827b41 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -1331,7 +1331,7 @@ Reference< XAnimationNode > SAL_CALL AnimationsImport::getAnimationNode() return mxRootNode; } -void AnimationNodeContext::postProcessRootNode( const Reference< XAnimationNode >& xRootNode, Reference< XPropertySet >& xPageProps ) +void AnimationNodeContext::postProcessRootNode( const Reference< XAnimationNode >& xRootNode, Reference< XPropertySet > const & xPageProps ) { if( xRootNode.is() && xPageProps.is() ) try { diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index c288640a68fa..375de1e64ba6 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1377,8 +1377,8 @@ void XMLShapeExport::ImpExportNewTrans_DecomposeAndRefPoint(const ::basegfx::B2D } } -void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple& rTRScale, double fTRShear, - double fTRRotate, ::basegfx::B2DTuple& rTRTranslate, const XMLShapeExportFlags nFeatures) +void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple const & rTRScale, double fTRShear, + double fTRRotate, ::basegfx::B2DTuple const & rTRTranslate, const XMLShapeExportFlags nFeatures) { // always write Size (rTRScale) since this statement carries the union // of the object @@ -2640,7 +2640,7 @@ void XMLShapeExport::ImpExportConnectorShape( void XMLShapeExport::ImpExportMeasureShape( const uno::Reference< drawing::XShape >& xShape, - XMLShapeExportFlags nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */) + XMLShapeExportFlags nFeatures /* = SEF_DEFAULT */, awt::Point const * pRefPoint /* = NULL */) { uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 17682d8ba61c..c20bb8c2f560 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -843,7 +843,7 @@ void XMLShapeImportHelper::popGroupAndSort() mpImpl->mpSortContext = mpImpl->mpSortContext->mpParentContext; } -void XMLShapeImportHelper::shapeWithZIndexAdded( css::uno::Reference< css::drawing::XShape >& xShape, sal_Int32 nZIndex ) +void XMLShapeImportHelper::shapeWithZIndexAdded( css::uno::Reference< css::drawing::XShape > const & xShape, sal_Int32 nZIndex ) { if( mpImpl->mpSortContext) { @@ -896,7 +896,7 @@ void XMLShapeImportHelper::shapeRemoved(const uno::Reference& x } } -void XMLShapeImportHelper::addShapeConnection( css::uno::Reference< css::drawing::XShape >& rConnectorShape, +void XMLShapeImportHelper::addShapeConnection( css::uno::Reference< css::drawing::XShape > const & rConnectorShape, bool bStart, const OUString& rDestShapeId, sal_Int32 nDestGlueId ) @@ -968,7 +968,7 @@ SvXMLImportPropertyMapper* XMLShapeImportHelper::CreateShapePropMapper( const un /** adds a mapping for a glue point identifier from an xml file to the identifier created after inserting the new glue point into the core. The saved mappings can be retrieved by getGluePointId() */ -void XMLShapeImportHelper::addGluePointMapping( css::uno::Reference< css::drawing::XShape >& xShape, +void XMLShapeImportHelper::addGluePointMapping( css::uno::Reference< css::drawing::XShape > const & xShape, sal_Int32 nSourceId, sal_Int32 nDestinnationId ) { if( mpPageContext ) @@ -1014,7 +1014,7 @@ sal_Int32 XMLShapeImportHelper::getGluePointId( const css::uno::Reference< css:: } /** this method must be calling before the first shape is imported for the given page */ -void XMLShapeImportHelper::startPage( css::uno::Reference< css::drawing::XShapes >& rShapes ) +void XMLShapeImportHelper::startPage( css::uno::Reference< css::drawing::XShapes > const & rShapes ) { const std::shared_ptr pOldContext = mpPageContext; mpPageContext = std::make_shared(); @@ -1023,7 +1023,7 @@ void XMLShapeImportHelper::startPage( css::uno::Reference< css::drawing::XShapes } /** this method must be calling after the last shape is imported for the given page */ -void XMLShapeImportHelper::endPage( css::uno::Reference< css::drawing::XShapes >& rShapes ) +void XMLShapeImportHelper::endPage( css::uno::Reference< css::drawing::XShapes > const & rShapes ) { SAL_WARN_IF( !mpPageContext || (mpPageContext->mxShapes != rShapes), "xmloff", "wrong call to endPage(), no startPage called or wrong page" ); if( nullptr == mpPageContext ) diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index dcc94e696e11..6be82e5e56fb 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -352,7 +352,7 @@ void SdXMLGenericPageContext::EndElement() SetNavigationOrder(); } -void SdXMLGenericPageContext::SetStyle( OUString& rStyleName ) +void SdXMLGenericPageContext::SetStyle( OUString const & rStyleName ) { // set PageProperties? if(!rStyleName.isEmpty()) @@ -471,7 +471,7 @@ void SdXMLGenericPageContext::DeleteAllShapes() } } -void SdXMLGenericPageContext::SetPageMaster( OUString& rsPageMasterName ) +void SdXMLGenericPageContext::SetPageMaster( OUString const & rsPageMasterName ) { if (GetSdImport().GetShapeImport()->GetStylesContext()) { diff --git a/xmloff/source/draw/ximppage.hxx b/xmloff/source/draw/ximppage.hxx index 21cce5b8ca41..1ed281a48a12 100644 --- a/xmloff/source/draw/ximppage.hxx +++ b/xmloff/source/draw/ximppage.hxx @@ -43,7 +43,7 @@ protected: OUString msNavOrder; /** sets the page style on this page */ - void SetStyle( OUString& rStyleName ); + void SetStyle( OUString const & rStyleName ); /** sets the presentation layout at this page. It is used for drawing pages and for the handout master */ void SetLayout(); @@ -55,7 +55,7 @@ protected: SdXMLImport& GetSdImport() { return static_cast(GetImport()); } /** sets the properties from a page master style with the given name on this contexts page */ - void SetPageMaster( OUString& rsPageMasterName ); + void SetPageMaster( OUString const & rsPageMasterName ); void SetNavigationOrder(); diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 5ec90505c443..0df1d145314f 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -1135,7 +1135,7 @@ void SdXMLStylesContext::EndElement() // set master-page styles (all with family="presentation" and a special // prefix) on given master-page. -void SdXMLStylesContext::SetMasterPageStyles(SdXMLMasterPageContext& rMaster) const +void SdXMLStylesContext::SetMasterPageStyles(SdXMLMasterPageContext const & rMaster) const { const uno::Reference& rStyleFamilies = GetSdImport().GetLocalDocStyleFamilies(); @@ -1231,7 +1231,7 @@ static bool canSkipReset(const OUString &rName, const XMLPropStyleContext* pProp // help function used by ImpSetGraphicStyles() and ImpSetMasterPageStyles() -void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAccess >& xPageStyles, sal_uInt16 nFamily, const OUString& rPrefix) const +void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAccess > const & xPageStyles, sal_uInt16 nFamily, const OUString& rPrefix) const { sal_Int32 nPrefLen(rPrefix.getLength()); diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx index bf7cc23fefe7..a159c895386b 100644 --- a/xmloff/source/draw/ximpstyl.hxx +++ b/xmloff/source/draw/ximpstyl.hxx @@ -185,7 +185,7 @@ class SdXMLStylesContext : public SvXMLStylesContext void ImpSetGraphicStyles() const; void ImpSetCellStyles() const; - void ImpSetGraphicStyles( css::uno::Reference< css::container::XNameAccess >& xPageStyles, + void ImpSetGraphicStyles( css::uno::Reference< css::container::XNameAccess > const & xPageStyles, sal_uInt16 nFamily, const OUString& rPrefix) const; protected: @@ -216,7 +216,7 @@ public: virtual void EndElement() override; virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(sal_uInt16 nFamily) const override; - void SetMasterPageStyles(SdXMLMasterPageContext& rMaster) const; + void SetMasterPageStyles(SdXMLMasterPageContext const & rMaster) const; css::uno::Reference< css::container::XNameAccess > getPageLayouts() const; }; diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx index 19d23e47f2ac..aa110820e98b 100644 --- a/xmloff/source/script/XMLEventExport.cxx +++ b/xmloff/source/script/XMLEventExport.cxx @@ -89,7 +89,7 @@ void XMLEventExport::AddTranslationTable( // else? ignore! } -void XMLEventExport::Export( Reference & rSupplier, +void XMLEventExport::Export( Reference const & rSupplier, bool bWhitespace) { if (rSupplier.is()) @@ -100,14 +100,14 @@ void XMLEventExport::Export( Reference & rSupplier, // else: no supplier, no export -> ignore! } -void XMLEventExport::Export( Reference & rReplace, +void XMLEventExport::Export( Reference const & rReplace, bool bWhitespace) { Reference xAccess(rReplace, UNO_QUERY); Export(xAccess, bWhitespace); } -void XMLEventExport::Export( Reference & rAccess, +void XMLEventExport::Export( Reference const & rAccess, bool bWhitespace) { // early out if we don't actually get any events @@ -152,7 +152,7 @@ void XMLEventExport::Export( Reference & rAccess, } } -void XMLEventExport::ExportExt( Reference & rAccess ) +void XMLEventExport::ExportExt( Reference const & rAccess ) { // set bExtNamespace flag to use XML_NAMESPACE_OFFICE_EXT namespace // for events element (not for child elements) diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index 30cba2664d25..5bc0c5fe9a6b 100644 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -218,7 +218,7 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(SvXMLExport& rXMLExp } bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int32 nNumberFormat, OUString& sCurrencySymbol, - uno::Reference & xNumberFormatsSupplier) + uno::Reference const & xNumberFormatsSupplier) { if (xNumberFormatsSupplier.is()) { @@ -255,7 +255,7 @@ bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int32 nN sal_Int16 XMLNumberFormatAttributesExportHelper::GetCellType(const sal_Int32 nNumberFormat, bool& bIsStandard, - uno::Reference & xNumberFormatsSupplier) + uno::Reference const & xNumberFormatsSupplier) { if (xNumberFormatsSupplier.is()) { diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index b03387993f54..0da5730f4d8f 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -322,8 +322,8 @@ void SvXMLAutoStylePoolP::GetRegisteredNames( } void SvXMLAutoStylePoolP::RegisterNames( - uno::Sequence& aFamilies, - uno::Sequence& aNames ) + uno::Sequence const & aFamilies, + uno::Sequence const & aNames ) { assert(aFamilies.getLength() == aNames.getLength()); diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 1b2b42b120c9..a1ee8d905804 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -932,7 +932,7 @@ bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString, return bRet; // true: currency element written } -static OUString lcl_GetDefaultCalendar( SvNumberFormatter* pFormatter, LanguageType nLang ) +static OUString lcl_GetDefaultCalendar( SvNumberFormatter const * pFormatter, LanguageType nLang ) { // get name of first non-gregorian calendar for the language @@ -1903,7 +1903,7 @@ void SvXMLNumFmtExport::SetWasUsed(const uno::Sequence& rWasUsed) pUsedList->SetWasUsed(rWasUsed); } -static const SvNumberformat* lcl_GetFormat( SvNumberFormatter* pFormatter, +static const SvNumberformat* lcl_GetFormat( SvNumberFormatter const * pFormatter, sal_uInt32 nKey ) { return ( pFormatter != nullptr ) ? pFormatter->GetEntry( nKey ) : nullptr; diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index f6f1574e0136..25d54ecf4252 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1620,7 +1620,7 @@ sal_Int32 SvXMLNumFormatContext::PrivateGetKey() } } -sal_Int32 SvXMLNumFormatContext::CreateAndInsert( css::uno::Reference< css::util::XNumberFormatsSupplier >& xFormatsSupplier ) +sal_Int32 SvXMLNumFormatContext::CreateAndInsert( css::uno::Reference< css::util::XNumberFormatsSupplier > const & xFormatsSupplier ) { if (nKey <= -1) { diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index f276db392811..f77344f0d42b 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -1469,7 +1469,7 @@ void XMLSectionExport::ExportIndexTemplateElement( } void XMLSectionExport::ExportLevelParagraphStyles( - Reference & xLevelParagraphStyles) + Reference const & xLevelParagraphStyles) { // iterate over levels sal_Int32 nPLevelCount = xLevelParagraphStyles->getCount(); diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx index d7f403adbdd5..b4e49dac7439 100644 --- a/xmloff/source/text/XMLSectionExport.hxx +++ b/xmloff/source/text/XMLSectionExport.hxx @@ -248,8 +248,7 @@ protected: /// export level paragraph styles void ExportLevelParagraphStyles( - css::uno::Reference< - css::container::XIndexReplace> & xStyles); + css::uno::Reference< css::container::XIndexReplace> const & xStyles); /// helper to export boolean properties diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index 9a6108a0022d..30a2a78ad6de 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -126,7 +126,7 @@ static SvXMLEnumMapEntry const lcl_aMarkTypeMap[] = }; -static const char *lcl_getFormFieldmarkName(OUString &name) +static const char *lcl_getFormFieldmarkName(OUString const &name) { if (name == ODF_FORMCHECKBOX || name == "msoffice.field.FORMCHECKBOX" || diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index b5b0b4243965..a49e9f621f30 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1236,7 +1236,7 @@ void XMLTextImportHelper::InsertControlCharacter( sal_Int16 nControl ) } void XMLTextImportHelper::InsertTextContent( - Reference < XTextContent > & xContent ) + Reference < XTextContent > const & xContent ) { assert(m_xImpl->m_xText.is()); assert(m_xImpl->m_xCursorAsRange.is()); @@ -1368,10 +1368,10 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, to the found list styles of the parent styles. (#i73973#) */ static bool lcl_HasListStyle( const OUString& sStyleName, - const Reference < XNameContainer >& xParaStyles, - SvXMLImport& rImport, - const OUString& sNumberingStyleName, - const OUString& sOutlineStyleName ) + const Reference < XNameContainer >& xParaStyles, + SvXMLImport const & rImport, + const OUString& sNumberingStyleName, + const OUString& sOutlineStyleName ) { bool bRet( false ); @@ -1486,7 +1486,7 @@ static bool lcl_HasListStyle( const OUString& sStyleName, return bRet; } OUString XMLTextImportHelper::SetStyleAndAttrs( - SvXMLImport& rImport, + SvXMLImport const & rImport, const Reference < XTextCursor >& rCursor, const OUString& rStyleName, bool bPara, @@ -2086,7 +2086,7 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels ) } void XMLTextImportHelper::SetHyperlink( - SvXMLImport& rImport, + SvXMLImport const & rImport, const Reference < XTextCursor >& rCursor, const OUString& rHRef, const OUString& rName, @@ -2167,7 +2167,7 @@ void XMLTextImportHelper::SetHyperlink( } void XMLTextImportHelper::SetRuby( - SvXMLImport& rImport, + SvXMLImport const & rImport, const Reference < XTextCursor >& rCursor, const OUString& rStyleName, const OUString& rTextStyleName, @@ -2666,7 +2666,7 @@ bool XMLTextImportHelper::hasCurrentFieldCtx() return !m_xImpl->m_FieldStack.empty(); } -void XMLTextImportHelper::setCurrentFieldParamsTo(css::uno::Reference< css::text::XFormField> &xFormField) +void XMLTextImportHelper::setCurrentFieldParamsTo(css::uno::Reference< css::text::XFormField> const &xFormField) { assert(!m_xImpl->m_FieldStack.empty()); if (!m_xImpl->m_FieldStack.empty() && xFormField.is()) diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index 893957a22dd8..5f9ee099c37e 100644 --- a/xmloff/source/text/txtimppr.cxx +++ b/xmloff/source/text/txtimppr.cxx @@ -182,11 +182,11 @@ void XMLTextImportPropertyMapper::FontFinished( #99928# CL */ void XMLTextImportPropertyMapper::FontDefaultsCheck( - XMLPropertyState* pFontFamilyName, - XMLPropertyState* pFontStyleName, - XMLPropertyState* pFontFamily, - XMLPropertyState* pFontPitch, - XMLPropertyState* pFontCharSet, + XMLPropertyState const * pFontFamilyName, + XMLPropertyState const * pFontStyleName, + XMLPropertyState const * pFontFamily, + XMLPropertyState const * pFontPitch, + XMLPropertyState const * pFontCharSet, XMLPropertyState** ppNewFontStyleName, XMLPropertyState** ppNewFontFamily, XMLPropertyState** ppNewFontPitch, diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index f26df8acd606..25ff8ec94f11 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -221,7 +221,7 @@ OUString XMLTextListsHelper::GenerateNewListId() const } // Provide list id for a certain list block for import (#i92811#) -OUString XMLTextListsHelper::GetListIdForListBlock( XMLTextListBlockContext& rListBlock ) +OUString XMLTextListsHelper::GetListIdForListBlock( XMLTextListBlockContext const & rListBlock ) { OUString sListBlockListId( rListBlock.GetContinueListId() ); if ( sListBlockListId.isEmpty() ) diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 05cb915e31c9..720ac814a24a 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -3278,7 +3278,7 @@ bool XMLTextParagraphExport::addHyperlinkAttributes( void XMLTextParagraphExport::exportTextRangeSpan( const css::uno::Reference< css::text::XTextRange > & rTextRange, - Reference< XPropertySet > & xPropSet, + Reference< XPropertySet > const & xPropSet, Reference < XPropertySetInfo > & xPropSetInfo, const bool bIsUICharStyle, const bool bHasAutoStyle, diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx index 9cb04313ac17..0a624dd58ea5 100644 --- a/xmloff/source/xforms/XFormsBindContext.cxx +++ b/xmloff/source/xforms/XFormsBindContext.cxx @@ -58,7 +58,7 @@ static const struct SvXMLTokenMapEntry aAttributeMap[] = // helper function; see below static void lcl_fillNamespaceContainer( const SvXMLNamespaceMap&, - Reference& ); + Reference const & ); XFormsBindContext::XFormsBindContext( SvXMLImport& rImport, @@ -143,7 +143,7 @@ SvXMLImportContext* XFormsBindContext::HandleChild( static void lcl_fillNamespaceContainer( const SvXMLNamespaceMap& aMap, - Reference& xContainer ) + Reference const & xContainer ) { sal_uInt16 nKeyIter = aMap.GetFirstKey(); do diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index 4d22dbff862c..dbe8170e75d8 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.cxx @@ -161,7 +161,7 @@ Reference xforms_findXFormsSubmission( return lcl_findXFormsBindingOrSubmission( xDocument, rBindingID, false ); } -void xforms_setValue( Reference& xPropertySet, +void xforms_setValue( Reference const & xPropertySet, const OUString& rName, const Any& rAny ) { diff --git a/xmloff/source/xforms/xformsapi.hxx b/xmloff/source/xforms/xformsapi.hxx index 0af4c48223ad..6f770627046a 100644 --- a/xmloff/source/xforms/xformsapi.hxx +++ b/xmloff/source/xforms/xformsapi.hxx @@ -45,7 +45,7 @@ css::uno::Reference xforms_findXFormsBinding( css::uno css::uno::Reference xforms_findXFormsSubmission( css::uno::Reference const &, const OUString& ); void xforms_setValue( - css::uno::Reference& xPropSet, + css::uno::Reference const & xPropSet, const OUString& rName, const css::uno::Any& rAny ); diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 1f0b099507e3..a0c8ed01cfa9 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.cxx @@ -143,7 +143,7 @@ convert_t const xforms_date = &xforms_convertRef; // other functions -static OUString lcl_getXSDType( SvXMLExport& rExport, +static OUString lcl_getXSDType( SvXMLExport const & rExport, const Reference& xType ); @@ -458,7 +458,7 @@ static void lcl_exportDataTypeFacets( SvXMLExport& rExport, } } -static OUString lcl_getXSDType( SvXMLExport& rExport, +static OUString lcl_getXSDType( SvXMLExport const & rExport, const Reference& xType ) { // we use string as default... -- cgit