diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-07-07 15:58:27 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-07-07 18:59:55 +0200 |
commit | b46492d06e389728bee7a2f2a8560c3891ef099b (patch) | |
tree | c612fed5ff929764d207bcb159604970c5343f60 /sd | |
parent | 623c2f723b3c599f05988c6d4db2a8e72a32c02d (diff) |
loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: If24b3ba75023c68fddcaec1ff7ae5f2517761587
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/cusshow.hxx | 2 | ||||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 4 | ||||
-rw-r--r-- | sd/qa/unit/sdmodeltestbase.hxx | 6 | ||||
-rw-r--r-- | sd/source/core/cusshow.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/eppt.cxx | 6 | ||||
-rw-r--r-- | sd/source/filter/eppt/eppt.hxx | 6 | ||||
-rw-r--r-- | sd/source/filter/eppt/epptbase.hxx | 4 | ||||
-rw-r--r-- | sd/source/filter/eppt/epptooxml.hxx | 4 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptexanimations.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptexanimations.hxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 8 | ||||
-rw-r--r-- | sd/source/filter/grf/sdgrffilter.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unosrch.cxx | 2 |
16 files changed, 32 insertions, 30 deletions
diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx index 83de986db8c1..eb915b9803f0 100644 --- a/sd/inc/cusshow.hxx +++ b/sd/inc/cusshow.hxx @@ -45,7 +45,7 @@ private: public: // single argument ctors shall be explicit explicit SdCustomShow(SdDrawDocument* pDrawDoc); - SdCustomShow(SdDrawDocument* pDrawDoc, css::uno::Reference< css::uno::XInterface > xShow ); + SdCustomShow(SdDrawDocument* pDrawDoc, css::uno::Reference< css::uno::XInterface > const & xShow ); virtual ~SdCustomShow(); diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index fc90c82cd7b6..83eecaa9082f 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -367,7 +367,7 @@ void SdOOXMLExportTest2::testTdf91378() xDocShRef->DoClose(); } -bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> xDoc, sal_Int32 nSlideNumber, +bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> const & xDoc, sal_Int32 nSlideNumber, sal_Int16 nExpectedTransitionType, sal_Int16 nExpectedTransitionSubType, bool bExpectedDirection = true) { @@ -507,7 +507,7 @@ void SdOOXMLExportTest2::testTdf92527() namespace { -void matchNumberFormat( int nPage, uno::Reference< text::XTextField > xField) +void matchNumberFormat( int nPage, uno::Reference< text::XTextField > const & xField) { uno::Reference< beans::XPropertySet > xPropSet( xField, uno::UNO_QUERY_THROW ); sal_Int32 nNumFmt; diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx index 29e498fddc53..9df78373be6f 100644 --- a/sd/qa/unit/sdmodeltestbase.hxx +++ b/sd/qa/unit/sdmodeltestbase.hxx @@ -291,7 +291,7 @@ protected: return pPage; } - uno::Reference< beans::XPropertySet > getShape( int nShape, uno::Reference< drawing::XDrawPage > xPage ) + uno::Reference< beans::XPropertySet > getShape( int nShape, uno::Reference< drawing::XDrawPage > const & xPage ) { uno::Reference< beans::XPropertySet > xShape( xPage->getByIndex( nShape ), uno::UNO_QUERY ); CPPUNIT_ASSERT_MESSAGE( "Failed to load shape", xShape.is() ); @@ -309,7 +309,7 @@ protected: } // Nth paragraph of text in given text shape - uno::Reference< text::XTextRange > getParagraphFromShape( int nPara, uno::Reference< beans::XPropertySet > xShape ) + uno::Reference< text::XTextRange > getParagraphFromShape( int nPara, uno::Reference< beans::XPropertySet > const & xShape ) { uno::Reference< text::XText > xText = uno::Reference< text::XTextRange>( xShape, uno::UNO_QUERY )->getText(); CPPUNIT_ASSERT_MESSAGE( "Not a text shape", xText.is() ); @@ -325,7 +325,7 @@ protected: return xParagraph; } - uno::Reference< text::XTextRange > getRunFromParagraph( int nRun, uno::Reference< text::XTextRange > xParagraph ) + uno::Reference< text::XTextRange > getRunFromParagraph( int nRun, uno::Reference< text::XTextRange > const & xParagraph ) { uno::Reference< container::XEnumerationAccess > runEnumAccess(xParagraph, uno::UNO_QUERY); uno::Reference< container::XEnumeration > runEnum = runEnumAccess->createEnumeration(); diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx index 7eea70f4f2e9..6095f4cca110 100644 --- a/sd/source/core/cusshow.cxx +++ b/sd/source/core/cusshow.cxx @@ -52,7 +52,7 @@ SdCustomShow::SdCustomShow( const SdCustomShow& rShow ) pDoc = rShow.GetDoc(); } -SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc, css::uno::Reference< css::uno::XInterface > xShow ) +SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc, css::uno::Reference< css::uno::XInterface > const & xShow ) : maPages(), pDoc(pDrawDoc), mxUnoCustomShow( xShow ) diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index b3f57a82521b..a7e6353c3fd1 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -171,7 +171,7 @@ void PPTWriter::exportPPTPost( ) void ImplExportComments( const uno::Reference< drawing::XDrawPage >& xPage, SvMemoryStream& rBinaryTagData10Atom ); void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_uInt16 nMode, - bool bHasBackground, Reference< XPropertySet > aXBackgroundPropSet ) + bool bHasBackground, Reference< XPropertySet > const & aXBackgroundPropSet ) { Any aAny; @@ -359,7 +359,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ mpPptEscherEx->CloseContainer(); // EPP_Slide } -void PPTWriter::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertySet > aXBackgroundPropSet ) +void PPTWriter::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertySet > const & aXBackgroundPropSet ) { mpPptEscherEx->PtReplaceOrInsert( EPP_Persist_MainMaster | nPageNum, mpStrm->Tell() ); mpPptEscherEx->OpenContainer( EPP_MainMaster ); @@ -1160,7 +1160,7 @@ void PPTWriter::ImplWriteNotes( sal_uInt32 nPageNum ) mpPptEscherEx->CloseContainer(); // EPP_Notes }; -void PPTWriter::ImplWriteBackground( css::uno::Reference< css::beans::XPropertySet > & rXPropSet ) +void PPTWriter::ImplWriteBackground( css::uno::Reference< css::beans::XPropertySet > const & rXPropSet ) { //************************ ****** //** DEFAULT BACKGROUND SHAPE ** diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index f8e2b25316d5..8c867359f9e4 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -221,7 +221,7 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider sal_uInt32 ImplInsertBookmarkURL( const OUString& rBookmark, const sal_uInt32 nType, const OUString& rStringVer0, const OUString& rStringVer1, const OUString& rStringVer2, const OUString& rStringVer3 ); virtual bool ImplCreateMainNotes() override; - void ImplWriteBackground( css::uno::Reference< css::beans::XPropertySet > & rXBackgroundPropSet ); + void ImplWriteBackground( css::uno::Reference< css::beans::XPropertySet > const & rXBackgroundPropSet ); void ImplWriteVBA(); void ImplWriteOLE(); bool ImplWriteAtomEnding(); @@ -259,9 +259,9 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider bool ImplCloseDocument(); // we write the font, hyper and sound list virtual void ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterID, sal_uInt16 nMode, - bool bHasBackground, css::uno::Reference< css::beans::XPropertySet > aXBackgroundPropSet ) override; + bool bHasBackground, css::uno::Reference< css::beans::XPropertySet > const & aXBackgroundPropSet ) override; virtual void ImplWriteNotes( sal_uInt32 nPageNum ) override; - virtual void ImplWriteSlideMaster( sal_uInt32 nPageNum, css::uno::Reference< css::beans::XPropertySet > aXBackgroundPropSet ) override; + virtual void ImplWriteSlideMaster( sal_uInt32 nPageNum, css::uno::Reference< css::beans::XPropertySet > const & aXBackgroundPropSet ) override; public: PPTWriter( tools::SvRef<SotStorage>& rSvStorage, diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index 8c5684b37aae..38f762cc76b0 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -354,9 +354,9 @@ protected: FontCollection maFontCollection; virtual void ImplWriteSlide( sal_uInt32 /* nPageNum */, sal_uInt32 /* nMasterNum */, sal_uInt16 /* nMode */, - bool /* bHasBackground */, css::uno::Reference< css::beans::XPropertySet > /* aXBackgroundPropSet */ ) {} + bool /* bHasBackground */, css::uno::Reference< css::beans::XPropertySet > const & /* aXBackgroundPropSet */ ) {} virtual void ImplWriteNotes( sal_uInt32 nPageNum ) = 0; - virtual void ImplWriteSlideMaster( sal_uInt32 /* nPageNum */, css::uno::Reference< css::beans::XPropertySet > /* aXBackgroundPropSet */ ) {} + virtual void ImplWriteSlideMaster( sal_uInt32 /* nPageNum */, css::uno::Reference< css::beans::XPropertySet > const & /* aXBackgroundPropSet */ ) {} virtual void ImplWriteLayout( sal_Int32 /* nOffset */, sal_uInt32 /* nMasterNum */ ) {} virtual void exportPPTPre( const std::vector< css::beans::PropertyValue >& ) {} diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index d84cd66523f4..dd87cc5beae1 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -87,9 +87,9 @@ public: protected: virtual void ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_uInt16 nMode, - bool bHasBackground, css::uno::Reference< css::beans::XPropertySet > aXBackgroundPropSet ) override; + bool bHasBackground, css::uno::Reference< css::beans::XPropertySet > const & aXBackgroundPropSet ) override; virtual void ImplWriteNotes( sal_uInt32 nPageNum ) override; - virtual void ImplWriteSlideMaster( sal_uInt32 nPageNum, css::uno::Reference< css::beans::XPropertySet > aXBackgroundPropSet ) override; + virtual void ImplWriteSlideMaster( sal_uInt32 nPageNum, css::uno::Reference< css::beans::XPropertySet > const & aXBackgroundPropSet ) override; virtual void ImplWriteLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum ) override; void ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum ); void WriteTheme( sal_Int32 nThemeNum ); diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index e772714d7bd4..4a839c272588 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -474,9 +474,11 @@ bool AnimationExporter::isEmptyNode( const Reference< XAnimationNode >& xNode ) return true; } -void AnimationExporter::exportNode( SvStream& rStrm, Reference< XAnimationNode > xNode, const Reference< XAnimationNode >* pParent, const sal_uInt16 nContainerRecType, +void AnimationExporter::exportNode( SvStream& rStrm, Reference< XAnimationNode > const & xNode_in, const Reference< XAnimationNode >* pParent, const sal_uInt16 nContainerRecType, const sal_uInt16 nInstance, const sal_Int32 nGroupLevel, const bool bTakeBackInteractiveSequenceTiming, const sal_Int16 nFDef ) { + auto xNode = xNode_in; + if( (nGroupLevel == 4) && isEmptyNode( xNode ) ) return; diff --git a/sd/source/filter/eppt/pptexanimations.hxx b/sd/source/filter/eppt/pptexanimations.hxx index 555ecbd1347c..441264a523fa 100644 --- a/sd/source/filter/eppt/pptexanimations.hxx +++ b/sd/source/filter/eppt/pptexanimations.hxx @@ -86,7 +86,7 @@ class AnimationExporter void exportAnimateSet( SvStream& rStrm, const css::uno::Reference< css::animations::XAnimationNode >& xNode, int nAfterEffectType ); static void exportAnimAction( SvStream& rStrm, const css::uno::Reference< css::animations::XAnimationNode >& xNode ); void exportAnimEvent( SvStream& rStrm, const css::uno::Reference< css::animations::XAnimationNode >& xNode, const sal_Int32 nFlags = 0 ); - void exportNode( SvStream& rStrm, css::uno::Reference< css::animations::XAnimationNode > xNode, + void exportNode( SvStream& rStrm, css::uno::Reference< css::animations::XAnimationNode > const & xNode, const css::uno::Reference< css::animations::XAnimationNode >* xParent, const sal_uInt16 nContainerRecType, const sal_uInt16 nInstance, const sal_Int32 nGroupLevel, const bool bTakeBackInteractiveSequenceTiming, const sal_Int16 nFillDefault ); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 8236a9902296..9f2d329a23ad 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -93,7 +93,7 @@ using ::com::sun::star::container::XIndexAccess; using ::sax_fastparser::FSHelperPtr; -void dump_pset(Reference< XPropertySet > rXPropSet); +void dump_pset(Reference< XPropertySet > const & rXPropSet); #define IDS(x) OString(OStringLiteral(#x " ") + OString::number( mnShapeIdMax++ )).getStr() namespace oox { @@ -1503,7 +1503,7 @@ bool PowerPointExport::WriteComments( sal_uInt32 nPageNum ) } void PowerPointExport::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_uInt16 /* nMode */, - bool bHasBackground, Reference< XPropertySet > aXBackgroundPropSet ) + bool bHasBackground, Reference< XPropertySet > const & aXBackgroundPropSet ) { SAL_INFO("sd.eppt", "write slide: " << nPageNum << "\n----------------"); @@ -1666,7 +1666,7 @@ sal_Int32 PowerPointExport::nStyleLevelToken[5] = XML_lvl5pPr }; -void PowerPointExport::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertySet > aXBackgroundPropSet ) +void PowerPointExport::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertySet > const & aXBackgroundPropSet ) { SAL_INFO("sd.eppt", "write slide master: " << nPageNum << "\n--------------"); @@ -2335,7 +2335,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdfilt_component_getFactory( const sal_Char* } #endif -void dump_pset(Reference< XPropertySet > rXPropSet) +void dump_pset(Reference< XPropertySet > const & rXPropSet) { Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo (); Sequence< beans::Property > props = info->getProperties (); diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index 08e82b553d74..d2e90326c661 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -90,7 +90,7 @@ class SdGRFFilter_ImplInteractionHdl : public ::cppu::WeakImplHelper< css::task: public: - explicit SdGRFFilter_ImplInteractionHdl( css::uno::Reference< css::task::XInteractionHandler > xInteraction ) : + explicit SdGRFFilter_ImplInteractionHdl( css::uno::Reference< css::task::XInteractionHandler > const & xInteraction ) : m_xInter( xInteraction ), nFilterError( GRFILTER_OK ) {} diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index ade2ef6f918a..cbb8fd9457b1 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -109,7 +109,7 @@ public: enum Mode { ALL, FROM, CUSTOM, PREVIEW }; public: - AnimationSlideController( Reference< XIndexAccess > xSlides, Mode eMode ); + AnimationSlideController( Reference< XIndexAccess > const & xSlides, Mode eMode ); void setStartSlideNumber( sal_Int32 nSlideNumber ) { mnStartSlideNumber = nSlideNumber; } sal_Int32 getStartSlideIndex() const; @@ -189,7 +189,7 @@ void AnimationSlideController::setPreviewNode( const Reference< XAnimationNode > mxPreviewNode = xPreviewNode; } -AnimationSlideController::AnimationSlideController( Reference< XIndexAccess > xSlides, Mode eMode ) +AnimationSlideController::AnimationSlideController( Reference< XIndexAccess > const & xSlides, Mode eMode ) : meMode( eMode ) , mnStartSlideNumber(-1) , mnSlideCount( 0 ) diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx index 3919dad3a59b..d0c0c2096ff5 100644 --- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx +++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx @@ -38,7 +38,7 @@ public: Size maPreviewSize; CacheDescriptor( - ::sd::slidesorter::cache::PageCacheManager::DocumentKey pDocument, + ::sd::slidesorter::cache::PageCacheManager::DocumentKey const & pDocument, const Size& rPreviewSize) :mpDocument(pDocument),maPreviewSize(rPreviewSize) {} @@ -410,7 +410,7 @@ std::shared_ptr<PageCacheManager::Cache> PageCacheManager::GetRecentlyUsedCache } void PageCacheManager::PutRecentlyUsedCache( - DocumentKey pDocument, + DocumentKey const & pDocument, const Size& rPreviewSize, const std::shared_ptr<Cache>& rpCache) { diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx index 97e6d426c6e0..91e289c37f15 100644 --- a/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx +++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx @@ -139,7 +139,7 @@ private: most mnMaximalRecentlyCacheCount members. */ void PutRecentlyUsedCache( - DocumentKey pDocument, + DocumentKey const & pDocument, const Size& rPreviewSize, const std::shared_ptr<Cache>& rpCache); diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx index bf9244440e76..92384457209c 100644 --- a/sd/source/ui/unoidl/unosrch.cxx +++ b/sd/source/ui/unoidl/unosrch.cxx @@ -56,7 +56,7 @@ class SearchContext_impl SearchContext_impl* mpParent; public: - SearchContext_impl( uno::Reference< drawing::XShapes > xShapes, SearchContext_impl* pParent = nullptr ) + SearchContext_impl( uno::Reference< drawing::XShapes > const & xShapes, SearchContext_impl* pParent = nullptr ) : mxShapes( xShapes ), mnIndex( -1 ), mpParent( pParent ) {} uno::Reference< drawing::XShape > firstShape() |