diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-25 10:24:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-27 07:34:52 +0100 |
commit | 19240f625f8bd7b772481abc8e678d7b0fadd921 (patch) | |
tree | df98eb1d1d2bf11179aea13de58aa38548458b9d /include | |
parent | 60c7725a20ff0d77e3025ed60608f57d46e50b58 (diff) |
loplugin:unusedfields look for classes where we can make all the..
fields private
Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27
Reviewed-on: https://gerrit.libreoffice.org/68302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
27 files changed, 28 insertions, 42 deletions
diff --git a/include/basegfx/raster/bzpixelraster.hxx b/include/basegfx/raster/bzpixelraster.hxx index 6c370fe61459..fc6511c2160a 100644 --- a/include/basegfx/raster/bzpixelraster.hxx +++ b/include/basegfx/raster/bzpixelraster.hxx @@ -32,7 +32,7 @@ namespace basegfx private: BZPixelRaster(const BZPixelRaster&) = delete; BZPixelRaster& operator=(const BZPixelRaster&) = delete; - protected: + sal_uInt32 mnWidth; sal_uInt32 mnHeight; sal_uInt32 mnCount; diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx index 73f233e6b6b7..97014fc6fdef 100644 --- a/include/basic/sbx.hxx +++ b/include/basic/sbx.hxx @@ -112,9 +112,9 @@ class BASIC_DLLPUBLIC SbxArray : public SbxBase BASIC_DLLPRIVATE void PutDirect( SbxVariable* pVar, sal_uInt32 nIdx ); std::vector<SbxVarEntry> mVarEntries; // The variables + SbxDataType eType; // Data type of the array protected: - SbxDataType eType; // Data type of the array virtual ~SbxArray() override; virtual bool LoadData( SvStream&, sal_uInt16 ) override; virtual bool StoreData( SvStream& ) const override; diff --git a/include/connectivity/sdbcx/VIndexColumn.hxx b/include/connectivity/sdbcx/VIndexColumn.hxx index 0611e7ccc54d..89f7007065a3 100644 --- a/include/connectivity/sdbcx/VIndexColumn.hxx +++ b/include/connectivity/sdbcx/VIndexColumn.hxx @@ -33,8 +33,8 @@ namespace connectivity class OOO_DLLPUBLIC_DBTOOLS OIndexColumn : public OColumn, public OIndexColumn_PROP { - protected: bool m_IsAscending; + protected: virtual ::cppu::IPropertyArrayHelper* createArrayHelper( sal_Int32 _nId) const override; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; public: diff --git a/include/connectivity/sdbcx/VKeyColumn.hxx b/include/connectivity/sdbcx/VKeyColumn.hxx index 20d326e40666..6eecf9459e22 100644 --- a/include/connectivity/sdbcx/VKeyColumn.hxx +++ b/include/connectivity/sdbcx/VKeyColumn.hxx @@ -33,8 +33,8 @@ namespace connectivity class OOO_DLLPUBLIC_DBTOOLS OKeyColumn : public OColumn, public OKeyColumn_PROP { - protected: OUString m_ReferencedColumn; + protected: virtual ::cppu::IPropertyArrayHelper* createArrayHelper( sal_Int32 _nId) const override; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; public: diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx index 0b4a2bf445f9..c078ad6392e4 100644 --- a/include/editeng/unotext.hxx +++ b/include/editeng/unotext.hxx @@ -420,9 +420,9 @@ class EDITENG_DLLPUBLIC SvxUnoTextBase : public SvxUnoTextRangeBase, public css::text::XTextRangeMover, public css::lang::XTypeProvider { -protected: css::uno::Reference< css::text::XText > xParentText; +protected: SvxUnoTextBase(const SvxItemPropertySet* _pSet); SvxUnoTextBase(const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, css::uno::Reference < css::text::XText > const & xParent); SvxUnoTextBase(const SvxUnoTextBase& rText); diff --git a/include/formula/token.hxx b/include/formula/token.hxx index bd33935cbf26..26643fc08fcd 100644 --- a/include/formula/token.hxx +++ b/include/formula/token.hxx @@ -123,12 +123,10 @@ inline std::string StackVarEnumToString(StackVar const e) class FORMULA_DLLPUBLIC FormulaToken { OpCode eOp; - FormulaToken& operator=( const FormulaToken& ) = delete; -protected: - - const StackVar eType; // type of data - mutable oslInterlockedCount mnRefCnt; // reference count + const StackVar eType; // type of data + mutable oslInterlockedCount mnRefCnt; // reference count + FormulaToken& operator=( const FormulaToken& ) = delete; public: FormulaToken( StackVar eTypeP,OpCode e = ocPush ); FormulaToken( const FormulaToken& r ); diff --git a/include/oox/dump/dumperbase.hxx b/include/oox/dump/dumperbase.hxx index 7367bfd6cec7..5445be3761cf 100644 --- a/include/oox/dump/dumperbase.hxx +++ b/include/oox/dump/dumperbase.hxx @@ -1602,7 +1602,6 @@ protected: private: void constructTextStrmObj( rtl_TextEncoding eTextEnc ); -protected: std::shared_ptr< TextInputStream > mxTextStrm; }; diff --git a/include/oox/vml/vmlshapecontext.hxx b/include/oox/vml/vmlshapecontext.hxx index 84694e655865..7251c1656f68 100644 --- a/include/oox/vml/vmlshapecontext.hxx +++ b/include/oox/vml/vmlshapecontext.hxx @@ -141,10 +141,8 @@ private: /** Processes the 'path' attribute. */ void setVmlPath( const OUString& rPath ); -protected: - ShapeBase& mrShape; - private: + ShapeBase& mrShape; ShapeModel& mrShapeModel; }; diff --git a/include/registry/registry.hxx b/include/registry/registry.hxx index 0cd7d576f644..e678a118f369 100644 --- a/include/registry/registry.hxx +++ b/include/registry/registry.hxx @@ -217,7 +217,7 @@ protected: @param length specifies the length of the array specified by phKeys. */ inline void setKeyHandles(Registry const & registry, RegKeyHandle* phKeys, sal_uInt32 length); - +private: /// stores the number of open subkeys, the number of elements. sal_uInt32 m_length; /// stores an array of open subkeys. @@ -255,7 +255,7 @@ protected: @param length specifies the length of the array specified by pKeyNames. */ inline void setKeyNames(Registry const & registry, rtl_uString** pKeyNames, sal_uInt32 length); - +private: /// stores the number of key names, the number of elements. sal_uInt32 m_length; /// stores an array of key names. diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 74b93408d5c3..45120686ca96 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -213,14 +213,13 @@ public: OKButton* GetOKButton() const { return pOKBtn; } -protected: +private: VclPtr<OKButton> pOKBtn; VclPtr<CancelButton> pCancelBtn; VclPtr<HelpButton> pHelpBtn; DECL_DLLPRIVATE_LINK(OKHdl_Impl, Button*, void); -private: std::unique_ptr<SingleTabDlgImpl> pImpl; }; diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index b3f4483f9450..01f1298f0ff3 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -82,7 +82,6 @@ namespace svt friend class EditBrowseBox; Link<LinkParamNone*, void> maModifyHdl; - protected: VclPtr<Control> pWindow; bool bSuspended; // <true> if the window is hidden and disabled diff --git a/include/svtools/printoptions.hxx b/include/svtools/printoptions.hxx index 2cb5315b02f3..cdc3acf586c8 100644 --- a/include/svtools/printoptions.hxx +++ b/include/svtools/printoptions.hxx @@ -32,10 +32,11 @@ class PrinterOptions; class SVT_DLLPUBLIC SvtBasePrintOptions: public utl::detail::Options { -protected: SvtPrintOptions_Impl* m_pDataContainer; +protected: + void SetDataContainer( SvtPrintOptions_Impl* pDataContainer ) { m_pDataContainer = pDataContainer; } public: diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx index f6d085902db5..0131b7d68ecc 100644 --- a/include/svx/nbdtmg.hxx +++ b/include/svx/nbdtmg.hxx @@ -115,6 +115,8 @@ class SVX_DLLPUBLIC NBOTypeMgrBase // store the attributes passed from pSet OUString aBulletCharFmtName; OUString aNumCharFmtName; + bool bIsLoading; + NBOTypeMgrBase(const NBOTypeMgrBase&) = delete; public: @@ -138,7 +140,6 @@ class SVX_DLLPUBLIC NBOTypeMgrBase const OUString& GetNumCharFmtName() { return aNumCharFmtName;} MapUnit GetMapUnit() { return eCoreUnit;} protected: - bool bIsLoading; void ImplLoad(const OUString& filename); void ImplStore(const OUString& filename); diff --git a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx index d9d0ffbf795b..e7c39c061f99 100644 --- a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx +++ b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx @@ -82,13 +82,13 @@ public: class ObjectContactOfPagePainter : public ObjectContactPainter { -protected: // the original ObjectContact this painter is working on ObjectContact& mrOriginalObjectContact; // Set StartPoint for next run, also given in constructor tools::WeakReference<SdrPage> mxStartPage; +protected: // Hierarchy access methods virtual sal_uInt32 GetPaintObjectCount() const override; virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) override; diff --git a/include/svx/sdr/contact/viewcontactofe3d.hxx b/include/svx/sdr/contact/viewcontactofe3d.hxx index a6a633eb698d..8dc25997f4f4 100644 --- a/include/svx/sdr/contact/viewcontactofe3d.hxx +++ b/include/svx/sdr/contact/viewcontactofe3d.hxx @@ -62,13 +62,13 @@ public: // primitive stuff -protected: // Primitive3DContainer of the ViewContact. This contains all necessary information // for the graphical visualisation and needs to be supported by all 3D VCs which // can be visualized. It does NOT contain the object transformation to be able to // buffer for all possible usages drawinglayer::primitive3d::Primitive3DContainer mxViewIndependentPrimitive3DContainer; +protected: // This method is responsible for creating the graphical visualisation data which is // stored in mxViewIndependentPrimitive3DContainer, but without object transformation virtual drawinglayer::primitive3d::Primitive3DContainer createViewIndependentPrimitive3DContainer() const = 0; diff --git a/include/svx/sdrundomanager.hxx b/include/svx/sdrundomanager.hxx index df9ac0845827..f932c91eac1c 100644 --- a/include/svx/sdrundomanager.hxx +++ b/include/svx/sdrundomanager.hxx @@ -36,8 +36,8 @@ private: SfxUndoAction* mpLastUndoActionBeforeTextEdit; bool mbEndTextEditTriggeredFromUndo; -protected: SfxObjectShell* m_pDocSh; +protected: // call to check for TextEdit active bool isTextEditActive() const; virtual void EmptyActionsChanged() override; diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 0d39a3843aae..c84965d4e984 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -198,11 +198,9 @@ public: */ class SVX_DLLPUBLIC SdrObjUserData { -protected: SdrInventor const nInventor; sal_uInt16 const nIdentifier; -private: void operator=(const SdrObjUserData& rData) = delete; bool operator==(const SdrObjUserData& rData) const = delete; bool operator!=(const SdrObjUserData& rData) const = delete; diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx index ad4b02c60ab1..8fa51167a113 100644 --- a/include/svx/svdoutl.hxx +++ b/include/svx/svdoutl.hxx @@ -30,7 +30,6 @@ class SdrPage; class SVX_DLLPUBLIC SdrOutliner : public Outliner { tools::WeakReference<SdrTextObj> mpTextObj; -protected: const SdrPage* mpVisualizedPage; public: diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index 815aa160b4b2..b7e5ed43b1d7 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -62,17 +62,15 @@ class SvxUnoDrawPagesAccess; // class SdrObjList class SVX_DLLPUBLIC SdrObjList { +friend class SdrObjListIter; +friend class SdrEditView; + private: SdrObjList(const SdrObjList& rSrcList) = delete; SdrObjList &operator=(const SdrObjList& rSrcList) = delete; -private: ::std::vector<SdrObject*> maList; -protected: -friend class SdrObjListIter; -friend class SdrEditView; - tools::Rectangle maSdrObjListOutRect; tools::Rectangle maSdrObjListSnapRect; bool mbObjOrdNumsDirty; diff --git a/include/svx/svdpoev.hxx b/include/svx/svdpoev.hxx index 187eadd4ca12..4d418a33d2e5 100644 --- a/include/svx/svdpoev.hxx +++ b/include/svx/svdpoev.hxx @@ -29,7 +29,6 @@ class SVX_DLLPUBLIC SdrPolyEditView : public SdrEditView, public IPolyPolygonEdi { friend class SdrEditView; -protected: bool bSetMarkedPointsSmoothPossible : 1; bool bSetMarkedSegmentsKindPossible : 1; diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx index f046700050c3..0e30f39c4661 100644 --- a/include/svx/svdundo.hxx +++ b/include/svx/svdundo.hxx @@ -206,7 +206,6 @@ public: class SVX_DLLPUBLIC SdrUndoGeoObj : public SdrUndoObj { -protected: std::unique_ptr<SdrObjGeoData> pUndoGeo; std::unique_ptr<SdrObjGeoData> pRedoGeo; // If we have a group object: @@ -333,7 +332,6 @@ class SVX_DLLPUBLIC SdrUndoReplaceObj : public SdrUndoObj bool bOldOwner; bool bNewOwner; -protected: SdrObjList* pObjList; sal_uInt32 nOrdNum; SdrObject* pNewObj; diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx index 5e800e37adb4..c0d3b21a8f42 100644 --- a/include/svx/svdview.hxx +++ b/include/svx/svdview.hxx @@ -154,7 +154,6 @@ class SVX_DLLPUBLIC SdrView : public SdrCreateView, public virtual tools::WeakBa bool bNoExtendedKeyDispatcher : 1; bool mbMasterPagePaintCaching : 1; -protected: SvtAccessibilityOptions maAccessibilityOptions; public: diff --git a/include/svx/textchain.hxx b/include/svx/textchain.hxx index f270754c2df5..2a0cc42f6b02 100644 --- a/include/svx/textchain.hxx +++ b/include/svx/textchain.hxx @@ -142,9 +142,10 @@ public: protected: TextChain(); - std::map< ChainLinkId, ImpChainLinkProperties *> maLinkPropertiesMap; private: + std::map< ChainLinkId, ImpChainLinkProperties *> maLinkPropertiesMap; + friend class SdrModel; //SdrTextObj *impGetNextLink(const SdrTextObj *) const; //SdrTextObj *impGetPrevLink(const SdrTextObj *) const; diff --git a/include/svx/view3d.hxx b/include/svx/view3d.hxx index 83f25353c7b6..64c13412152f 100644 --- a/include/svx/view3d.hxx +++ b/include/svx/view3d.hxx @@ -41,13 +41,13 @@ class Impl3DMirrorConstructOverlay; class SVX_DLLPUBLIC E3dView : public SdrView { -protected: E3dDefaultAttributes a3DDefaultAttr; MouseEvent aMouseEvent; // The parameters of the last Events (Mouse, Keyboard) // Migrate selections std::unique_ptr<Impl3DMirrorConstructOverlay> mpMirrorOverlay; +protected: void InitView(); void ImpCreate3DObject(E3dScene* pScene, SdrObject* pObj, bool bExtrude, double fDepth, basegfx::B2DHomMatrix const & rLatheMat); diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx index f2adf5b302e8..9234f4ad2119 100644 --- a/include/vbahelper/vbacollectionimpl.hxx +++ b/include/vbahelper/vbacollectionimpl.hxx @@ -121,7 +121,7 @@ public: the passed container element. */ virtual css::uno::Any createCollectionObject( const css::uno::Any& rSource ) = 0; -protected: +private: css::uno::Reference< css::container::XEnumeration > mxEnumeration; }; diff --git a/include/vbahelper/vbaglobalbase.hxx b/include/vbahelper/vbaglobalbase.hxx index ed1f2114fcfb..517784d64773 100644 --- a/include/vbahelper/vbaglobalbase.hxx +++ b/include/vbahelper/vbaglobalbase.hxx @@ -46,9 +46,8 @@ namespace ooo { namespace vba { typedef InheritedHelperInterfaceWeakImpl< ov::XGlobalsBase > Globals_BASE; class VBAHELPER_DLLPUBLIC VbaGlobalsBase : public Globals_BASE { -protected: const OUString msDocCtxName; - +protected: bool hasServiceName( const OUString& serviceName ); void init( const css::uno::Sequence< css::beans::PropertyValue >& aInitArgs ); diff --git a/include/vcl/BitmapConvolutionMatrixFilter.hxx b/include/vcl/BitmapConvolutionMatrixFilter.hxx index 928eaa9f0aa2..185d14012d49 100644 --- a/include/vcl/BitmapConvolutionMatrixFilter.hxx +++ b/include/vcl/BitmapConvolutionMatrixFilter.hxx @@ -27,7 +27,7 @@ public: virtual BitmapEx execute(BitmapEx const& rBitmapEx) const override; -protected: +private: const long (&mrMatrix)[9]; }; |