[Libreoffice-commits] core.git: basctl/source chart2/source connectivity/source embeddedobj/source filter/source include/filter include/formula include/oox oox/inc oox/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Dec 29 17:20:04 UTC 2017


 basctl/source/basicide/baside2.hxx                  |    8 ++++----
 basctl/source/basicide/baside3.cxx                  |    2 +-
 basctl/source/inc/baside3.hxx                       |    2 +-
 chart2/source/controller/inc/SelectionHelper.hxx    |    4 ++--
 chart2/source/controller/main/SelectionHelper.cxx   |    4 ++--
 chart2/source/inc/PopupRequest.hxx                  |    2 +-
 chart2/source/view/main/VButton.hxx                 |    2 +-
 connectivity/source/drivers/firebird/Util.hxx       |    2 +-
 embeddedobj/source/inc/commonembobj.hxx             |    2 +-
 embeddedobj/source/inc/docholder.hxx                |    2 +-
 filter/source/msfilter/mstoolbar.cxx                |    2 +-
 filter/source/svg/impsvgdialog.cxx                  |    2 +-
 filter/source/svg/impsvgdialog.hxx                  |    2 +-
 include/filter/msfilter/mstoolbar.hxx               |    4 ++--
 include/formula/tokenarray.hxx                      |    2 +-
 include/oox/core/filterbase.hxx                     |    4 ++--
 include/oox/export/vmlexport.hxx                    |    4 ++--
 oox/inc/drawingml/chart/converterbase.hxx           |    4 ++--
 oox/source/core/filterbase.cxx                      |    4 ++--
 oox/source/drawingml/chart/converterbase.cxx        |    4 ++--
 oox/source/drawingml/diagram/layoutatomvisitors.hxx |    2 +-
 oox/source/export/vmlexport.cxx                     |    4 ++--
 22 files changed, 34 insertions(+), 34 deletions(-)

New commits:
commit 4b030651a0ad5e0eedd6d08b6cd1459ca514d818
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Dec 29 14:15:54 2017 +0200

    loplugin:passstuffbyref improved return in various
    
    Change-Id: I0a8282d8e0d9575b055243073fc89a7d6b67b560
    Reviewed-on: https://gerrit.libreoffice.org/47173
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index b2d10b8aa205..1e97b1cf9040 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -420,8 +420,8 @@ public:
 public:
     void BasicAddWatch (OUString const&);
     void BasicRemoveWatch ();
-    Color GetBackgroundColor () const { return aSyntaxColors.GetBackgroundColor(); }
-    Color GetFontColor () const { return aSyntaxColors.GetFontColor(); }
+    Color const & GetBackgroundColor () const { return aSyntaxColors.GetBackgroundColor(); }
+    Color const & GetFontColor () const { return aSyntaxColors.GetFontColor(); }
     Color GetSyntaxColor (TokenType eType) const { return aSyntaxColors.GetColor(eType); }
 
 protected:
@@ -447,8 +447,8 @@ private:
     public:
         void SetActiveEditor (EditorWindow* pEditor_) { pEditor = pEditor_; }
     public:
-        Color GetBackgroundColor () const { return m_aBackgroundColor; };
-        Color GetFontColor () const { return m_aFontColor; }
+        Color const & GetBackgroundColor () const { return m_aBackgroundColor; };
+        Color const & GetFontColor () const { return m_aFontColor; }
         Color GetColor (TokenType eType) const { return aColors[eType]; }
 
     private:
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 4ebbadb600d5..5b705b15f2c4 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -564,7 +564,7 @@ void DialogWindow::ExecuteCommand( SfxRequest& rReq )
     rReq.Done();
 }
 
-Reference< container::XNameContainer > DialogWindow::GetDialog() const
+Reference< container::XNameContainer > const & DialogWindow::GetDialog() const
 {
     return m_pEditor->GetDialog();
 }
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index ae09f3cecc0c..5062e8050751 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -84,7 +84,7 @@ public:
     virtual void        ExecuteCommand( SfxRequest& rReq ) override;
     virtual void        GetState( SfxItemSet& ) override;
     DlgEditor&          GetEditor() const   { return *m_pEditor; }
-    css::uno::Reference< css::container::XNameContainer > GetDialog() const;
+    css::uno::Reference< css::container::XNameContainer > const & GetDialog() const;
     DlgEdModel&         GetModel() const;
     DlgEdPage&          GetPage() const;
     DlgEdView&          GetView() const;
diff --git a/chart2/source/controller/inc/SelectionHelper.hxx b/chart2/source/controller/inc/SelectionHelper.hxx
index b40d8fe8592c..a3002dda8a7f 100644
--- a/chart2/source/controller/inc/SelectionHelper.hxx
+++ b/chart2/source/controller/inc/SelectionHelper.hxx
@@ -36,8 +36,8 @@ class Selection
 public: //methods
     bool hasSelection();
 
-    OUString getSelectedCID();
-    css::uno::Reference< css::drawing::XShape > getSelectedAdditionalShape();
+    OUString const & getSelectedCID();
+    css::uno::Reference< css::drawing::XShape > const & getSelectedAdditionalShape();
     const ObjectIdentifier& getSelectedOID() const { return m_aSelectedOID;}
 
     bool isResizeableObjectSelected();
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index cf6ebddf102e..44171c6bd966 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -65,12 +65,12 @@ bool Selection::hasSelection()
     return m_aSelectedOID.isValid();
 }
 
-OUString Selection::getSelectedCID()
+OUString const & Selection::getSelectedCID()
 {
     return m_aSelectedOID.getObjectCID();
 }
 
-uno::Reference< drawing::XShape > Selection::getSelectedAdditionalShape()
+uno::Reference< drawing::XShape > const & Selection::getSelectedAdditionalShape()
 {
     return m_aSelectedOID.getAdditionalShape();
 }
diff --git a/chart2/source/inc/PopupRequest.hxx b/chart2/source/inc/PopupRequest.hxx
index fb98d3d9b19d..006a58003ffc 100644
--- a/chart2/source/inc/PopupRequest.hxx
+++ b/chart2/source/inc/PopupRequest.hxx
@@ -31,7 +31,7 @@ public:
     explicit PopupRequest();
     virtual ~PopupRequest() override;
 
-    css::uno::Reference<css::awt::XCallback> getCallback()
+    css::uno::Reference<css::awt::XCallback> const & getCallback()
     {
         return m_xCallback;
     }
diff --git a/chart2/source/view/main/VButton.hxx b/chart2/source/view/main/VButton.hxx
index 9af9318cb1f6..adb53282b85a 100644
--- a/chart2/source/view/main/VButton.hxx
+++ b/chart2/source/view/main/VButton.hxx
@@ -66,7 +66,7 @@ public:
     {
         m_aPosition = rPosition;
     }
-    css::awt::Size getSize()
+    css::awt::Size const & getSize()
     {
         return m_aSize;
     }
diff --git a/connectivity/source/drivers/firebird/Util.hxx b/connectivity/source/drivers/firebird/Util.hxx
index e93d3b68f288..0b06e3c18fb8 100644
--- a/connectivity/source/drivers/firebird/Util.hxx
+++ b/connectivity/source/drivers/firebird/Util.hxx
@@ -66,7 +66,7 @@ public:
             short getType() const { return m_aType; }
             short getSubType() const { return m_aSubType; }
             short getScale() const { return m_nScale; }
-            OUString getCharacterSet() const { return m_sCharsetName; }
+            OUString const & getCharacterSet() const { return m_sCharsetName; }
 
             sal_Int32 getSdbcType() const;
             ::rtl::OUString getColumnTypeName() const;
diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx
index 5e857b0a3331..0ae22154959e 100644
--- a/embeddedobj/source/inc/commonembobj.hxx
+++ b/embeddedobj/source/inc/commonembobj.hxx
@@ -248,7 +248,7 @@ public:
     // not a real listener and should not be
     void PostEvent_Impl( const OUString& aEventName );
 
-    OUString getContainerName() { return m_aContainerName; }
+    OUString const & getContainerName() { return m_aContainerName; }
 // XInterface
 
     virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override ;
diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx
index 410b9f73161e..974a762a995a 100644
--- a/embeddedobj/source/inc/docholder.hxx
+++ b/embeddedobj/source/inc/docholder.hxx
@@ -131,7 +131,7 @@ public:
         return m_aContainerName + ( m_aDocumentNamePart.isEmpty() ? OUString() : ( " - " + m_aDocumentNamePart ) );
     }
 
-    OUString GetContainerName() const
+    OUString const & GetContainerName() const
     {
         return m_aContainerName;
     }
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 35bfecb37dae..fff43f3f9693 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -423,7 +423,7 @@ TBCExtraInfo::Print( FILE* fp )
 }
 #endif
 
-OUString
+OUString const &
 TBCExtraInfo::getOnAction()
 {
     return wstrOnAction.getString();
diff --git a/filter/source/svg/impsvgdialog.cxx b/filter/source/svg/impsvgdialog.cxx
index d0248bfafcac..9aebbb56a924 100644
--- a/filter/source/svg/impsvgdialog.cxx
+++ b/filter/source/svg/impsvgdialog.cxx
@@ -109,7 +109,7 @@ void ImpSVGDialog::dispose()
 }
 
 
-Sequence< PropertyValue > ImpSVGDialog::GetFilterData()
+Sequence< PropertyValue > const & ImpSVGDialog::GetFilterData()
 {
     maConfigItem.WriteBool( SVG_PROP_TINYPROFILE, maCBTinyProfile->IsChecked() );
     maConfigItem.WriteBool( SVG_PROP_EMBEDFONTS, maCBEmbedFonts->IsChecked() );
diff --git a/filter/source/svg/impsvgdialog.hxx b/filter/source/svg/impsvgdialog.hxx
index 9f1d04fa9a32..d2d205cfe5ea 100644
--- a/filter/source/svg/impsvgdialog.hxx
+++ b/filter/source/svg/impsvgdialog.hxx
@@ -66,7 +66,7 @@ public:
     virtual ~ImpSVGDialog() override;
     virtual void dispose() override;
 
-    css::uno::Sequence< css::beans::PropertyValue > GetFilterData();
+    css::uno::Sequence< css::beans::PropertyValue > const & GetFilterData();
 };
 
 #endif // INCLUDED_FILTER_SOURCE_SVG_IMPSVGDIALOG_HXX
diff --git a/include/filter/msfilter/mstoolbar.hxx b/include/filter/msfilter/mstoolbar.hxx
index 8eeb8a655d3a..076ec6567738 100644
--- a/include/filter/msfilter/mstoolbar.hxx
+++ b/include/filter/msfilter/mstoolbar.hxx
@@ -134,7 +134,7 @@ public:
 #ifdef DEBUG_FILTER_MSTOOLBAR
     virtual void Print( FILE* ) override;
 #endif
-    OUString getOnAction();
+    OUString const & getOnAction();
 };
 
 class MSFILTER_DLLPUBLIC TBCGeneralInfo  : public TBBase
@@ -152,7 +152,7 @@ public:
     virtual void Print( FILE* ) override;
 #endif
     void ImportToolBarControlData( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >& );
-    OUString CustomText() { return customText.getString(); }
+    OUString const & CustomText() { return customText.getString(); }
 };
 
 class MSFILTER_DLLPUBLIC TBCBitMap : public TBBase
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 92c39bd4c60a..087f7eacb83f 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -182,7 +182,7 @@ public:
         return result;
     }
 
-    FormulaTokenArrayReferencesIterator operator++()
+    FormulaTokenArrayReferencesIterator const & operator++()
     {
         assert(maIter != maEnd);
         ++maIter;
diff --git a/include/oox/core/filterbase.hxx b/include/oox/core/filterbase.hxx
index 3accd63f2872..790d8d94b436 100644
--- a/include/oox/core/filterbase.hxx
+++ b/include/oox/core/filterbase.hxx
@@ -152,7 +152,7 @@ public:
     OUString     getAbsoluteUrl( const OUString& rUrl ) const;
 
     /** Returns the base storage of the imported/exported file. */
-    StorageRef          getStorage() const;
+    StorageRef const & getStorage() const;
 
     /** Opens and returns the specified input stream from the base storage.
 
@@ -248,7 +248,7 @@ protected:
 
     virtual bool        implFinalizeExport( utl::MediaDescriptor& rMediaDescriptor );
 
-    css::uno::Reference< css::io::XStream >
+    css::uno::Reference< css::io::XStream > const &
                         getMainDocumentStream( ) const;
 
 private:
diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx
index 0564eff65832..bea395e32ce3 100644
--- a/include/oox/export/vmlexport.hxx
+++ b/include/oox/export/vmlexport.hxx
@@ -134,10 +134,10 @@ public:
     /// Export the sdr object as VML.
     ///
     /// Call this when you need to export the object as VML.
-    OString AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1,
+    OString const & AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1,
             sal_Int16 eVOri = -1, sal_Int16 eHRel = -1,
             sal_Int16 eVRel = -1, const bool bOOxmlExport = false );
-    OString AddInlineSdrObject( const SdrObject& rObj, const bool bOOxmlExport );
+    OString const & AddInlineSdrObject( const SdrObject& rObj, const bool bOOxmlExport );
     virtual void  AddSdrObjectVMLObject( const SdrObject& rObj) override;
     static bool IsWaterMarkShape(const OUString& rStr);
 
diff --git a/oox/inc/drawingml/chart/converterbase.hxx b/oox/inc/drawingml/chart/converterbase.hxx
index 42f763b86405..11e14ebaf596 100644
--- a/oox/inc/drawingml/chart/converterbase.hxx
+++ b/oox/inc/drawingml/chart/converterbase.hxx
@@ -67,7 +67,7 @@ public:
     /** Creates an instance for the passed service name, using the process service factory. */
     css::uno::Reference< css::uno::XInterface >
                         createInstance( const OUString& rServiceName ) const;
-    css::uno::Reference< css::uno::XComponentContext >
+    css::uno::Reference< css::uno::XComponentContext > const &
                         getComponentContext() const;
 
 protected:
@@ -76,7 +76,7 @@ protected:
     /** Returns the chart converter. */
     ChartConverter&     getChartConverter() const;
     /** Returns the API chart document model. */
-    css::uno::Reference< css::chart2::XChartDocument >
+    css::uno::Reference< css::chart2::XChartDocument > const &
                         getChartDocument() const;
     /** Returns the position and size of the chart shape in 1/100 mm. */
     const css::awt::Size& getChartSize() const;
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 2808134857d0..aee15b3995a8 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -329,7 +329,7 @@ OUString FilterBase::getAbsoluteUrl( const OUString& rUrl ) const
     return aUrl;
 }
 
-StorageRef FilterBase::getStorage() const
+StorageRef const & FilterBase::getStorage() const
 {
     return mxImpl->mxStorage;
 }
@@ -522,7 +522,7 @@ bool FilterBase::implFinalizeExport( MediaDescriptor& /*rMediaDescriptor*/ )
     return true;
 }
 
-Reference< XStream > FilterBase::getMainDocumentStream( ) const
+Reference< XStream > const & FilterBase::getMainDocumentStream( ) const
 {
     return mxImpl->mxOutStream;
 }
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx
index cf2bd687053c..35ed591936f5 100644
--- a/oox/source/drawingml/chart/converterbase.cxx
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -229,7 +229,7 @@ Reference< XInterface > ConverterRoot::createInstance( const OUString& rServiceN
     return xInt;
 }
 
-Reference< XComponentContext > ConverterRoot::getComponentContext() const
+Reference< XComponentContext > const & ConverterRoot::getComponentContext() const
 {
     return mxData->mrFilter.getComponentContext();
 }
@@ -244,7 +244,7 @@ ChartConverter& ConverterRoot::getChartConverter() const
     return mxData->mrConverter;
 }
 
-Reference< XChartDocument > ConverterRoot::getChartDocument() const
+Reference< XChartDocument > const & ConverterRoot::getChartDocument() const
 {
     return mxData->mxDoc;
 }
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.hxx b/oox/source/drawingml/diagram/layoutatomvisitors.hxx
index 18effc18be92..299739186315 100644
--- a/oox/source/drawingml/diagram/layoutatomvisitors.hxx
+++ b/oox/source/drawingml/diagram/layoutatomvisitors.hxx
@@ -68,7 +68,7 @@ class ShapeTemplateVisitor : public LayoutAtomVisitor
 
 public:
     void defaultVisit(LayoutAtom const & rAtom);
-    ShapePtr getShapeCopy() const
+    ShapePtr const & getShapeCopy() const
         { return mpShape; }
 };
 
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 498552b01c8a..0e3de4a20dda 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1397,7 +1397,7 @@ void VMLExport::EndShape( sal_Int32 nShapeElement )
     }
 }
 
-OString VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_Int16 eVOri, sal_Int16 eHRel, sal_Int16 eVRel, const bool bOOxmlExport )
+OString const & VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_Int16 eVOri, sal_Int16 eHRel, sal_Int16 eVRel, const bool bOOxmlExport )
 {
     m_pSdrObject = &rObj;
     m_eHOri = eHOri;
@@ -1409,7 +1409,7 @@ OString VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_Int
     return m_sShapeId;
 }
 
-OString VMLExport::AddInlineSdrObject( const SdrObject& rObj, const bool bOOxmlExport )
+OString const & VMLExport::AddInlineSdrObject( const SdrObject& rObj, const bool bOOxmlExport )
 {
     m_pSdrObject = &rObj;
     m_eHOri = -1;


More information about the Libreoffice-commits mailing list