diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-07 14:40:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-07 15:27:38 +0200 |
commit | 959ace5861ca8dbb5fbec7a1954eeeb3b93ae4f3 (patch) | |
tree | 7213673c1ee87c1706416b5bf037fb14dc1580cc /sw/source/ui/vba | |
parent | 22d5927000a32c54b0ba0355ca9c0999d3b00fb7 (diff) |
loplugin:constparams in sw part10
Change-Id: I7d708c3e6157d0b8690b433d3363d2c0745b2410
Reviewed-on: https://gerrit.libreoffice.org/40832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/vba')
-rw-r--r-- | sw/source/ui/vba/vbaborders.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaborders.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbadocumentproperties.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/vba/vbadocuments.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbalisttemplate.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbalisttemplate.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaoptions.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaoptions.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaparagraphformat.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaparagraphformat.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbarangehelper.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbarangehelper.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbasystem.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbasystem.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbatablehelper.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/vba/vbatablehelper.hxx | 4 |
16 files changed, 22 insertions, 22 deletions
diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index 552cfaf294bf..73d3fd2c6c79 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -46,7 +46,7 @@ class SwVbaBorder : public SwVbaBorder_Base private: uno::Reference< beans::XPropertySet > m_xProps; sal_Int32 m_LineType; - void setBorderLine( table::BorderLine& rBorderLine ) + void setBorderLine( table::BorderLine const & rBorderLine ) { table::TableBorder aTableBorder; m_xProps->getPropertyValue( "TableBorder" ) >>= aTableBorder; @@ -247,7 +247,7 @@ private: return getCount(); // error condition } public: - RangeBorders( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, VbaPalette& rPalette ) : m_xRange( xRange ), m_xContext( xContext ), m_Palette( rPalette ) + RangeBorders( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, VbaPalette const & rPalette ) : m_xRange( xRange ), m_xContext( xContext ), m_Palette( rPalette ) { } // XIndexAccess @@ -277,7 +277,7 @@ public: }; uno::Reference< container::XIndexAccess > -rangeToBorderIndexAccess( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, VbaPalette& rPalette ) +rangeToBorderIndexAccess( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, VbaPalette const & rPalette ) { return new RangeBorders( xRange, xContext, rPalette ); } @@ -302,7 +302,7 @@ public: }; // for Table borders -SwVbaBorders::SwVbaBorders( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< table::XCellRange >& xRange, VbaPalette& rPalette ): SwVbaBorders_BASE( xParent, xContext, rangeToBorderIndexAccess( xRange ,xContext, rPalette ) ) +SwVbaBorders::SwVbaBorders( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< table::XCellRange >& xRange, VbaPalette const & rPalette ): SwVbaBorders_BASE( xParent, xContext, rangeToBorderIndexAccess( xRange ,xContext, rPalette ) ) { m_xProps.set( xRange, uno::UNO_QUERY_THROW ); } diff --git a/sw/source/ui/vba/vbaborders.hxx b/sw/source/ui/vba/vbaborders.hxx index 45364e3c5f59..a4ca819f6752 100644 --- a/sw/source/ui/vba/vbaborders.hxx +++ b/sw/source/ui/vba/vbaborders.hxx @@ -33,7 +33,7 @@ class SwVbaBorders : public SwVbaBorders_BASE virtual css::uno::Any getItemByIntIndex( const sal_Int32 nIndex ) override; css::uno::Reference< css::beans::XPropertySet > m_xProps; public: - SwVbaBorders( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::table::XCellRange >& xRange, VbaPalette& rPalette ); + SwVbaBorders( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::table::XCellRange >& xRange, VbaPalette const & rPalette ); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 126306d25218..cb3d227fb09a 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -360,7 +360,7 @@ public: OUString msOOOPropName; std::shared_ptr< PropertGetSetHelper > mpPropGetSetHelper; - static DocPropInfo createDocPropInfo( const OUString& sDesc, const OUString& sPropName, std::shared_ptr< PropertGetSetHelper >& rHelper ) + static DocPropInfo createDocPropInfo( const OUString& sDesc, const OUString& sPropName, std::shared_ptr< PropertGetSetHelper > const & rHelper ) { DocPropInfo aItem; aItem.msMSODesc = sDesc; @@ -369,7 +369,7 @@ public: return aItem; } - static DocPropInfo createDocPropInfo( const sal_Char* sDesc, const sal_Char* sPropName, std::shared_ptr< PropertGetSetHelper >& rHelper ) + static DocPropInfo createDocPropInfo( const sal_Char* sDesc, const sal_Char* sPropName, std::shared_ptr< PropertGetSetHelper > const & rHelper ) { return createDocPropInfo( OUString::createFromAscii( sDesc ), OUString::createFromAscii( sPropName ), rHelper ); } diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index c7fd7421a824..3594b24daab7 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -42,7 +42,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; static uno::Any -getDocument( uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< text::XTextDocument > &xDoc, const uno::Any& aApplication ) +getDocument( uno::Reference< uno::XComponentContext > const & xContext, const uno::Reference< text::XTextDocument > &xDoc, const uno::Any& aApplication ) { // FIXME: fine as long as SwVbaDocument is stateless ... uno::Reference< frame::XModel > xModel( xDoc, uno::UNO_QUERY ); diff --git a/sw/source/ui/vba/vbalisttemplate.cxx b/sw/source/ui/vba/vbalisttemplate.cxx index a4e646d26f78..97ea48983fc3 100644 --- a/sw/source/ui/vba/vbalisttemplate.cxx +++ b/sw/source/ui/vba/vbalisttemplate.cxx @@ -43,7 +43,7 @@ SwVbaListTemplate::ListLevels( const uno::Any& index ) return uno::makeAny( xCol ); } -void SwVbaListTemplate::applyListTemplate( uno::Reference< beans::XPropertySet >& xProps ) +void SwVbaListTemplate::applyListTemplate( uno::Reference< beans::XPropertySet > const & xProps ) { uno::Reference< container::XIndexReplace > xNumberingRules = pListHelper->getNumberingRules(); xProps->setPropertyValue("NumberingRules", uno::makeAny( xNumberingRules ) ); diff --git a/sw/source/ui/vba/vbalisttemplate.hxx b/sw/source/ui/vba/vbalisttemplate.hxx index 598656f9dd48..902695cb2700 100644 --- a/sw/source/ui/vba/vbalisttemplate.hxx +++ b/sw/source/ui/vba/vbalisttemplate.hxx @@ -37,7 +37,7 @@ public: virtual ~SwVbaListTemplate() override; /// @throws css::uno::RuntimeException - void applyListTemplate( css::uno::Reference< css::beans::XPropertySet >& xProps ); + void applyListTemplate( css::uno::Reference< css::beans::XPropertySet > const & xProps ); // Methods virtual css::uno::Any SAL_CALL ListLevels( const css::uno::Any& index ) override; diff --git a/sw/source/ui/vba/vbaoptions.cxx b/sw/source/ui/vba/vbaoptions.cxx index 34b2b38146ba..2c2e2af16fb3 100644 --- a/sw/source/ui/vba/vbaoptions.cxx +++ b/sw/source/ui/vba/vbaoptions.cxx @@ -31,7 +31,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaOptions::SwVbaOptions( uno::Reference<uno::XComponentContext >& xContext ) : SwVbaOptions_BASE( uno::Reference< XHelperInterface >(), xContext ) +SwVbaOptions::SwVbaOptions( uno::Reference<uno::XComponentContext > const & xContext ) : SwVbaOptions_BASE( uno::Reference< XHelperInterface >(), xContext ) { } diff --git a/sw/source/ui/vba/vbaoptions.hxx b/sw/source/ui/vba/vbaoptions.hxx index d7de9d6ea661..9d9403564bb9 100644 --- a/sw/source/ui/vba/vbaoptions.hxx +++ b/sw/source/ui/vba/vbaoptions.hxx @@ -32,7 +32,7 @@ class SwVbaOptions : public SwVbaOptions_BASE, private: OUString msDefaultFilePath; public: - explicit SwVbaOptions( css::uno::Reference< css::uno::XComponentContext >& m_xContext ); + explicit SwVbaOptions( css::uno::Reference< css::uno::XComponentContext > const & m_xContext ); virtual ~SwVbaOptions() override; // Attributes diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index a6184d4358bf..c50dd5d4a396 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -424,7 +424,7 @@ float SwVbaParagraphFormat::getMSWordLineSpacing( style::LineSpacing& rLineSpaci return wdLineSpacing; } -sal_Int32 SwVbaParagraphFormat::getMSWordLineSpacingRule( style::LineSpacing& rLineSpacing ) +sal_Int32 SwVbaParagraphFormat::getMSWordLineSpacingRule( style::LineSpacing const & rLineSpacing ) { sal_Int32 wdLineSpacing = word::WdLineSpacing::wdLineSpaceSingle; switch( rLineSpacing.Mode ) diff --git a/sw/source/ui/vba/vbaparagraphformat.hxx b/sw/source/ui/vba/vbaparagraphformat.hxx index 80e5407c1ed3..c24162a712c8 100644 --- a/sw/source/ui/vba/vbaparagraphformat.hxx +++ b/sw/source/ui/vba/vbaparagraphformat.hxx @@ -36,7 +36,7 @@ private: static css::style::LineSpacing getOOoLineSpacing( float _lineSpace, sal_Int16 mode ); css::style::LineSpacing getOOoLineSpacingFromRule( sal_Int32 _linespacingrule ); static float getMSWordLineSpacing( css::style::LineSpacing& rLineSpacing ); - static sal_Int32 getMSWordLineSpacingRule( css::style::LineSpacing& rLineSpacing ); + static sal_Int32 getMSWordLineSpacingRule( css::style::LineSpacing const & rLineSpacing ); /// @throws css::uno::RuntimeException sal_Int16 getCharHeight(); static css::style::ParagraphAdjust getOOoAlignment( sal_Int32 _alignment ); diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx index 17fd3a0bfa71..db299585fbb2 100644 --- a/sw/source/ui/vba/vbarangehelper.cxx +++ b/sw/source/ui/vba/vbarangehelper.cxx @@ -60,7 +60,7 @@ uno::Reference< text::XTextRange > SwVbaRangeHelper::getRangeByPosition( const u return xRange; } -void SwVbaRangeHelper::insertString( uno::Reference< text::XTextRange >& rTextRange, uno::Reference< text::XText >& rText, const OUString& rStr, bool _bAbsorb ) +void SwVbaRangeHelper::insertString( uno::Reference< text::XTextRange > const & rTextRange, uno::Reference< text::XText > const & rText, const OUString& rStr, bool _bAbsorb ) { sal_Int32 nlastIndex = 0; sal_Int32 nIndex = 0; diff --git a/sw/source/ui/vba/vbarangehelper.hxx b/sw/source/ui/vba/vbarangehelper.hxx index 40b02531bd74..5d91af3c8c02 100644 --- a/sw/source/ui/vba/vbarangehelper.hxx +++ b/sw/source/ui/vba/vbarangehelper.hxx @@ -31,7 +31,7 @@ public: /// @throws css::uno::RuntimeException static css::uno::Reference< css::text::XTextRange > getRangeByPosition( const css::uno::Reference< css::text::XText >& rText, sal_Int32 _position ); /// @throws css::uno::RuntimeException - static void insertString( css::uno::Reference< css::text::XTextRange >& rTextRange, css::uno::Reference< css::text::XText >& rText, const OUString& rStr, bool _bAbsorb ); + static void insertString( css::uno::Reference< css::text::XTextRange > const & rTextRange, css::uno::Reference< css::text::XText > const & rText, const OUString& rStr, bool _bAbsorb ); /// @throws css::uno::RuntimeException /// @throws css::script::BasicErrorException static css::uno::Reference< css::text::XTextCursor > initCursor( const css::uno::Reference< css::text::XTextRange >& rTextRange, const css::uno::Reference< css::text::XText >& rText ); diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index f02ea0c243ba..270d22dd2fd7 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -167,7 +167,7 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value ) } -SwVbaSystem::SwVbaSystem( uno::Reference<uno::XComponentContext >& xContext ): SwVbaSystem_BASE( uno::Reference< XHelperInterface >(), xContext ) +SwVbaSystem::SwVbaSystem( uno::Reference<uno::XComponentContext > const & xContext ): SwVbaSystem_BASE( uno::Reference< XHelperInterface >(), xContext ) { } diff --git a/sw/source/ui/vba/vbasystem.hxx b/sw/source/ui/vba/vbasystem.hxx index 9c5921f3de16..c0acb2ad490f 100644 --- a/sw/source/ui/vba/vbasystem.hxx +++ b/sw/source/ui/vba/vbasystem.hxx @@ -47,7 +47,7 @@ private: PrivateProfileStringListener maPrivateProfileStringListener; public: - explicit SwVbaSystem( css::uno::Reference< css::uno::XComponentContext >& m_xContext ); + explicit SwVbaSystem( css::uno::Reference< css::uno::XComponentContext > const & m_xContext ); virtual ~SwVbaSystem() override; // XSystem diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index eeff0d96ae69..efcf9aadb6e9 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -160,7 +160,7 @@ void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart ) pTable->GetTabCols( rCols, pStart ); } -sal_Int32 SwVbaTableHelper::GetColCount( SwTabCols& rCols ) +sal_Int32 SwVbaTableHelper::GetColCount( SwTabCols const & rCols ) { sal_Int32 nCount = 0; for( size_t i = 0; i < rCols.Count(); ++i ) @@ -169,7 +169,7 @@ sal_Int32 SwVbaTableHelper::GetColCount( SwTabCols& rCols ) return rCols.Count() - nCount; } -sal_Int32 SwVbaTableHelper::GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) +sal_Int32 SwVbaTableHelper::GetRightSeparator( SwTabCols const & rCols, sal_Int32 nNum) { OSL_ENSURE( nNum < GetColCount( rCols ) ,"Index out of range"); sal_Int32 i = 0; diff --git a/sw/source/ui/vba/vbatablehelper.hxx b/sw/source/ui/vba/vbatablehelper.hxx index 6f4a4d4424b6..c569a64ae06d 100644 --- a/sw/source/ui/vba/vbatablehelper.hxx +++ b/sw/source/ui/vba/vbatablehelper.hxx @@ -34,8 +34,8 @@ private: /// @throws css::uno::RuntimeException SwTableBox* GetTabBox( sal_Int32 nCol, sal_Int32 nRow ); void InitTabCols( SwTabCols& rCols, const SwTableBox *pStart ); - static sal_Int32 GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum); - static sal_Int32 GetColCount( SwTabCols& rCols ); + static sal_Int32 GetRightSeparator( SwTabCols const & rCols, sal_Int32 nNum); + static sal_Int32 GetColCount( SwTabCols const & rCols ); /// @throws css::uno::RuntimeException static sal_Int32 GetColWidth( SwTabCols& rCols, sal_Int32 nNum ); |