include/svx/dlgctrl.hxx                        |   20 +++++-------
 include/svx/fmgridcl.hxx                       |    6 +--
 include/svx/nbdtmg.hxx                         |   14 +++-----
 include/svx/svdundo.hxx                        |    3 -
 include/svx/unopool.hxx                        |    2 -
 include/svx/unoshape.hxx                       |   39 ++++++++++---------------
 svx/inc/sdr/contact/viewcontactofe3d.hxx       |   13 ++++----
 svx/inc/sdr/properties/attributeproperties.hxx |    6 +--
 svx/source/table/accessiblecell.hxx            |    3 +
 9 files changed, 47 insertions(+), 59 deletions(-)

New commits:
commit 8307321e6c56e153a6198f54ef3f9d555c96920b
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Nov 28 15:04:09 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Nov 28 21:01:30 2022 +0100

    loplugin:unusedfields make some protected fields private
    
    Change-Id: I61d1bc59dce1ff53f48be66e6fdcd92b47004871
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143399
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 26371185c7f0..75e51d276411 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -74,16 +74,6 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxRectCtl : public 
weld::CustomWidgetContro
 {
 private:
     SvxTabPage* m_pPage;
-
-    SVX_DLLPRIVATE static void      InitSettings(vcl::RenderContext& 
rRenderContext);
-    SVX_DLLPRIVATE void             InitRectBitmap();
-    SVX_DLLPRIVATE BitmapEx&        GetRectBitmap();
-    SVX_DLLPRIVATE void             Resize_Impl(const Size& rSize);
-
-    SvxRectCtl(const SvxRectCtl&) = delete;
-    SvxRectCtl& operator=(const SvxRectCtl&) = delete;
-
-protected:
     rtl::Reference<SvxRectCtlAccessibleContext> pAccContext;
     sal_uInt16 nBorderWidth;
     Point aPtLT, aPtMT, aPtRT;
@@ -93,9 +83,17 @@ protected:
     RectPoint eRP, eDefRP;
     std::unique_ptr<BitmapEx> pBitmap;
     CTL_STATE m_nState;
-
     bool mbCompleteDisable : 1;
 
+    SVX_DLLPRIVATE static void      InitSettings(vcl::RenderContext& 
rRenderContext);
+    SVX_DLLPRIVATE void             InitRectBitmap();
+    SVX_DLLPRIVATE BitmapEx&        GetRectBitmap();
+    SVX_DLLPRIVATE void             Resize_Impl(const Size& rSize);
+
+    SvxRectCtl(const SvxRectCtl&) = delete;
+    SvxRectCtl& operator=(const SvxRectCtl&) = delete;
+
+protected:
     RectPoint           GetRPFromPoint( Point, bool bRTL = false ) const;
     const Point&        GetPointFromRP( RectPoint ) const;
     Point               SetActualRPWithoutInvalidate( RectPoint eNewRP );  // 
returns the last point
diff --git a/include/svx/fmgridcl.hxx b/include/svx/fmgridcl.hxx
index 8f3db081e143..57ba3ccd8bbf 100644
--- a/include/svx/fmgridcl.hxx
+++ b/include/svx/fmgridcl.hxx
@@ -36,15 +36,11 @@ class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FmGridHeader
             :public ::svt::EditBrowserHeader
             ,public DropTargetHelper
 {
-protected:
-    std::unique_ptr<FmGridHeaderData>       m_pImpl;
-
 public:
     FmGridHeader( BrowseBox* pParent, WinBits nWinBits = WB_STDHEADERBAR | 
WB_DRAG );
     virtual ~FmGridHeader() override;
     virtual void dispose() override;
 
-public:
     // trigger context menu execution
     void    triggerColumnContextMenu( const ::Point& _rPreferredPos );
 
@@ -83,6 +79,8 @@ protected:
     void notifyColumnSelect(sal_uInt16 nColumnId);
 private:
     DECL_DLLPRIVATE_LINK( OnAsyncExecuteDrop, void*, void );
+
+    std::unique_ptr<FmGridHeaderData>       m_pImpl;
 };
 
 
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index 7d397687ab37..5bbb310a9d74 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -170,11 +170,7 @@ class BulletsTypeMgr final : public NBOTypeMgrBase
 
 class NumberingTypeMgr final : public NBOTypeMgrBase
 {
-    private:
         NumberingTypeMgr(const NumberingTypeMgr&) = delete;
-    public:
-        NumberSettingsArr_Impl      maNumberSettingsArr;
-        NumberSettingsArr_Impl      maDefaultNumberSettingsArr;
     public:
         NumberingTypeMgr();
         virtual ~NumberingTypeMgr() override;
@@ -185,15 +181,14 @@ class NumberingTypeMgr final : public NBOTypeMgrBase
         virtual OUString GetDescription(sal_uInt16 nIndex, bool isDefault) 
override;
         virtual bool IsCustomized(sal_uInt16 nIndex) override;
         static NumberingTypeMgr& GetInstance();
+    private:
+        NumberSettingsArr_Impl      maNumberSettingsArr;
+        NumberSettingsArr_Impl      maDefaultNumberSettingsArr;
 };
 
 class OutlineTypeMgr final : public NBOTypeMgrBase
 {
-    private:
         OutlineTypeMgr(const OutlineTypeMgr&) = delete;
-    public:
-        OutlineSettings_Impl*       
pOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT];
-        OutlineSettings_Impl*       
pDefaultOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT];
     public:
         OutlineTypeMgr();
         virtual void Init() override;
@@ -203,6 +198,9 @@ class OutlineTypeMgr final : public NBOTypeMgrBase
         virtual OUString GetDescription(sal_uInt16 nIndex, bool isDefault) 
override;
         virtual bool IsCustomized(sal_uInt16 nIndex) override;
         static OutlineTypeMgr& GetInstance();
+    private:
+        OutlineSettings_Impl*       
pOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT];
+        OutlineSettings_Impl*       
pDefaultOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT];
 };
 }
 #endif
diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index e2c6b62524ed..5b0c9a6fd869 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -149,7 +149,6 @@ protected:
 
 class SVXCORE_DLLPUBLIC SdrUndoAttrObj : public SdrUndoObj
 {
-protected:
     std::optional<SfxItemSet> moUndoSet;
     std::optional<SfxItemSet> moRedoSet;
 
@@ -168,6 +167,7 @@ protected:
     // If we have a group object:
     std::unique_ptr<SdrUndoGroup> pUndoGroup;
 
+protected:
     // Helper to ensure StyleSheet is in pool (provided by SdrModel from 
SdrObject)
     static void ensureStyleSheetInStyleSheetPool(SfxStyleSheetBasePool& 
rStyleSheetPool, SfxStyleSheet& rSheet);
 
@@ -420,7 +420,6 @@ public:
 
 class SVXCORE_DLLPUBLIC SdrUndoObjSetText : public SdrUndoObj
 {
-protected:
     std::optional<OutlinerParaObject>
                                 pOldText;
     std::optional<OutlinerParaObject>
diff --git a/include/svx/unopool.hxx b/include/svx/unopool.hxx
index 96b9bc17956d..1647375209b1 100644
--- a/include/svx/unopool.hxx
+++ b/include/svx/unopool.hxx
@@ -88,7 +88,7 @@ protected:
     /// @throws css::uno::RuntimeException
     virtual void putAny( SfxItemPool* pPool, const 
comphelper::PropertyMapEntry* pEntry, const css::uno::Any& rValue );
 
-protected:
+private:
     SdrModel* mpModel;
     rtl::Reference<SfxItemPool> mpDefaultsPool;
 };
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 862cbb1a0766..9828f08fcb26 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -101,31 +101,11 @@ class SVXCORE_DLLPUBLIC SvxShape :
                  public SvxShape_UnoImplHelper,
                  public SfxListener
 {
-private:
-    css::awt::Size maSize;
-    css::awt::Point maPosition;
-    OUString maShapeType;
-    OUString maShapeName;
-
-    /** these members are used to optimize XMultiProperty calls */
-    std::unique_ptr<SvxShapeImpl> mpImpl;
-    bool mbIsMultiPropertyCall;
-
-    css::uno::WeakReference< css::container::XIndexContainer > mxGluePoints;
-
 protected:
     friend class SvxDrawPage;
     friend class SvxShapeConnector;
     friend class SdXShape;
 
-    const SvxItemPropertySet* mpPropSet;
-    SvxItemPropertySetUsrAnys maUrsAnys;
-    o3tl::span<const SfxItemPropertyMapEntry> maPropMapEntries;
-
-private:
-    rtl::Reference< SdrObject > mxSdrObject;
-
-protected:
     // translations for writer, which works in TWIPS
     void ForceMetricToItemPoolMetric(Pair& rPoint) const noexcept;
     void ForceMetricToItemPoolMetric(Point& rPoint) const noexcept { 
ForceMetricToItemPoolMetric(rPoint.toPair()); }
@@ -152,9 +132,6 @@ protected:
     /** called from the XActionLockable interface methods on final unlock */
     virtual void unlock();
 
-    /** used from the XActionLockable interface */
-    sal_uInt16 mnLockCount;
-
     o3tl::span<const SfxItemPropertyMapEntry> getPropertyMapEntries() const { 
return maPropMapEntries; }
 
     void updateShapeKind();
@@ -334,6 +311,22 @@ private:
     SVX_DLLPRIVATE void impl_initFromSdrObject();
     /// CTOR-Impl
     SVX_DLLPRIVATE void impl_construct();
+
+    css::awt::Size maSize;
+    css::awt::Point maPosition;
+    OUString maShapeType;
+    OUString maShapeName;
+    /** these members are used to optimize XMultiProperty calls */
+    std::unique_ptr<SvxShapeImpl> mpImpl;
+    bool mbIsMultiPropertyCall;
+
+    css::uno::WeakReference< css::container::XIndexContainer > mxGluePoints;
+    const SvxItemPropertySet* mpPropSet;
+    SvxItemPropertySetUsrAnys maUrsAnys;
+    o3tl::span<const SfxItemPropertyMapEntry> maPropMapEntries;
+    rtl::Reference< SdrObject > mxSdrObject;
+    /** used from the XActionLockable interface */
+    sal_uInt16 mnLockCount;
 };
 
 class SVXCORE_DLLPUBLIC SvxShapeText : public SvxShape, public SvxUnoTextBase
diff --git a/svx/inc/sdr/contact/viewcontactofe3d.hxx 
b/svx/inc/sdr/contact/viewcontactofe3d.hxx
index 553407deb4fb..75e88adb9904 100644
--- a/svx/inc/sdr/contact/viewcontactofe3d.hxx
+++ b/svx/inc/sdr/contact/viewcontactofe3d.hxx
@@ -59,12 +59,6 @@ public:
 
     // primitive stuff
 
-    // 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
@@ -87,6 +81,13 @@ public:
     // use getVIP3DSWithoutObjectTransform and embed to 3d transform primitive 
when object's
     // local 3d transform is used
     drawinglayer::primitive3d::Primitive3DContainer 
getViewIndependentPrimitive3DContainer() const;
+
+private:
+    // 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;
 };
 }
 
diff --git a/svx/inc/sdr/properties/attributeproperties.hxx 
b/svx/inc/sdr/properties/attributeproperties.hxx
index d2f1aa15a70c..a150abe77385 100644
--- a/svx/inc/sdr/properties/attributeproperties.hxx
+++ b/svx/inc/sdr/properties/attributeproperties.hxx
@@ -39,9 +39,6 @@ namespace sdr::properties
             void ImpRemoveStyleSheet();
 
         protected:
-            // the StyleSheet of this object
-            SfxStyleSheet*                                  mpStyleSheet;
-
             // create a new itemset
             virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) 
override;
 
@@ -86,6 +83,9 @@ namespace sdr::properties
             virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) 
override;
 
             virtual bool isUsedByModel() const override;
+        private:
+            // the StyleSheet of this object
+            SfxStyleSheet*                                  mpStyleSheet;
         };
 
 } // end of namespace sdr::properties
diff --git a/svx/source/table/accessiblecell.hxx 
b/svx/source/table/accessiblecell.hxx
index e57616f5789d..38a28b9e333d 100644
--- a/svx/source/table/accessiblecell.hxx
+++ b/svx/source/table/accessiblecell.hxx
@@ -107,7 +107,8 @@ public:
 
     //Get the parent table
     AccessibleTableShape* GetParentTable() { return pAccTable; }
-protected:
+
+private:
     /// Bundle of information passed to all shapes in a document tree.
     AccessibleShapeTreeInfo maShapeTreeInfo;
 

Reply via email to