include/oox/helper/propertymap.hxx            |    2 -
 include/oox/ole/axbinaryreader.hxx            |   14 +++++++-
 include/oox/ole/axbinarywriter.hxx            |    5 ++-
 include/oox/ole/olehelper.hxx                 |    2 -
 io/source/acceptor/acceptor.hxx               |    2 +
 jvmfwk/inc/vendorbase.hxx                     |   11 +++---
 lotuswordpro/inc/xfilter/xfparastyle.hxx      |    2 -
 lotuswordpro/source/filter/explode.hxx        |    1 
 lotuswordpro/source/filter/lwpcelllayout.hxx  |    1 
 lotuswordpro/source/filter/lwplayout.hxx      |   24 ++++++---------
 lotuswordpro/source/filter/lwppara.hxx        |    2 -
 lotuswordpro/source/filter/lwprowlayout.hxx   |    2 -
 lotuswordpro/source/filter/lwpsdwrect.hxx     |    2 -
 lotuswordpro/source/filter/lwptable.hxx       |    5 ++-
 lotuswordpro/source/filter/lwptablelayout.hxx |   41 ++++++++++++--------------
 oox/source/drawingml/diagram/datamodel.hxx    |    1 
 16 files changed, 66 insertions(+), 51 deletions(-)

New commits:
commit b1fad7043a7286d5d9bb33c9ed9235f044d92aed
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Nov 23 16:15:17 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Nov 24 07:00:21 2022 +0100

    loplugin:unusedfields make some fields private
    
    this is one of the secondary analyses this plugin performs
    
    Change-Id: I6fac8c926b53f1d909c5b183304744126549f2bc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143181
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/oox/helper/propertymap.hxx 
b/include/oox/helper/propertymap.hxx
index 423bb11fcdcb..cf8031d46dd1 100644
--- a/include/oox/helper/propertymap.hxx
+++ b/include/oox/helper/propertymap.hxx
@@ -117,8 +117,6 @@ public:
 #endif
 private:
     const std::vector<OUString>* mpPropNames;
-
-protected:
     std::map< sal_Int32, css::uno::Any > maProperties;
 };
 
diff --git a/include/oox/ole/axbinaryreader.hxx 
b/include/oox/ole/axbinaryreader.hxx
index eb185f235d49..e5e59b970d2f 100644
--- a/include/oox/ole/axbinaryreader.hxx
+++ b/include/oox/ole/axbinaryreader.hxx
@@ -170,8 +170,9 @@ private:
     /** Complex property for a 32-bit value pair, e.g. point or size. */
     struct PairProperty final : public ComplexProperty
     {
+    private:
         AxPairData&         mrPairData;
-
+    public:
         explicit            PairProperty( AxPairData& rPairData ) :
                                 mrPairData( rPairData ) {}
         virtual bool        readProperty( AxAlignedInputStream& rInStrm ) 
override;
@@ -180,9 +181,10 @@ private:
     /** Complex property for a string value. */
     struct StringProperty final : public ComplexProperty
     {
+    private:
         OUString&    mrValue;
         sal_uInt32          mnSize;
-
+    public:
         explicit            StringProperty( OUString& rValue, sal_uInt32 nSize 
) :
                                 mrValue( rValue ), mnSize( nSize ) {}
         virtual bool        readProperty( AxAlignedInputStream& rInStrm ) 
override;
@@ -191,8 +193,10 @@ private:
     /** Complex property for an array of strings. */
     struct ArrayStringProperty final : public ComplexProperty
     {
+    private:
         AxArrayString&      mrArray;
         sal_uInt32          mnSize;
+    public:
         explicit            ArrayStringProperty( AxArrayString& rArray, 
sal_uInt32 nSize ) :
                                 mrArray( rArray ), mnSize( nSize ) {}
         virtual bool        readProperty( AxAlignedInputStream& rInStrm ) 
override;
@@ -201,8 +205,10 @@ private:
     /** Complex property for a GUID value. */
     struct GuidProperty final : public ComplexProperty
     {
+    private:
         OUString&    mrGuid;
 
+    public:
         explicit            GuidProperty( OUString& rGuid ) :
                                 mrGuid( rGuid ) {}
         virtual bool        readProperty( AxAlignedInputStream& rInStrm ) 
override;
@@ -211,8 +217,10 @@ private:
     /** Stream property for a font structure. */
     struct FontProperty final : public ComplexProperty
     {
+    private:
         AxFontData&         mrFontData;
 
+    public:
         explicit            FontProperty( AxFontData& rFontData ) :
                                 mrFontData( rFontData ) {}
         virtual bool        readProperty( AxAlignedInputStream& rInStrm ) 
override;
@@ -221,8 +229,10 @@ private:
     /** Stream property for a picture or mouse icon. */
     struct PictureProperty final : public ComplexProperty
     {
+    private:
         StreamDataSequence& mrPicData;
 
+    public:
         explicit            PictureProperty( StreamDataSequence& rPicData ) :
                                 mrPicData( rPicData ) {}
         virtual bool        readProperty( AxAlignedInputStream& rInStrm ) 
override;
diff --git a/include/oox/ole/axbinarywriter.hxx 
b/include/oox/ole/axbinarywriter.hxx
index eb370473aecb..d19e2ae3b3c3 100644
--- a/include/oox/ole/axbinarywriter.hxx
+++ b/include/oox/ole/axbinarywriter.hxx
@@ -118,8 +118,10 @@ private:
     /** Complex property for a 32-bit value pair, e.g. point or size. */
     struct PairProperty final : public ComplexProperty
     {
+    private:
         AxPairData&         mrPairData;
 
+    public:
         explicit            PairProperty( AxPairData& rPairData ) :
                                 mrPairData( rPairData ) {}
         virtual bool        writeProperty( AxAlignedOutputStream& rOutStrm ) 
override;
@@ -128,9 +130,10 @@ private:
     /** Complex property for a string value. */
     struct StringProperty final : public ComplexProperty
     {
+    private:
         OUString&    mrValue;
         sal_uInt32          mnSize;
-
+    public:
         explicit            StringProperty( OUString& rValue, sal_uInt32 nSize 
) :
                                 mrValue( rValue ), mnSize( nSize ) {}
         virtual bool        writeProperty( AxAlignedOutputStream& rOutStrm ) 
override;
diff --git a/include/oox/ole/olehelper.hxx b/include/oox/ole/olehelper.hxx
index b6f60ca8b539..a2810460bcd3 100644
--- a/include/oox/ole/olehelper.hxx
+++ b/include/oox/ole/olehelper.hxx
@@ -169,10 +169,10 @@ public:
 // implementation into the sd module itself.
 class OOX_DLLPUBLIC MSConvertOCXControls : public SvxMSConvertOCXControls
 {
-protected:
     css::uno::Reference< css::uno::XComponentContext > mxCtx;
     ::oox::GraphicHelper maGrfHelper;
 
+protected:
     bool importControlFromStream( ::oox::BinaryInputStream& rInStrm,
                                   css::uno::Reference< 
css::form::XFormComponent > & rxFormComp,
                                   std::u16string_view rGuidString );
diff --git a/oox/source/drawingml/diagram/datamodel.hxx 
b/oox/source/drawingml/diagram/datamodel.hxx
index 21137f6e05d2..23104812edf1 100644
--- a/oox/source/drawingml/diagram/datamodel.hxx
+++ b/oox/source/drawingml/diagram/datamodel.hxx
@@ -58,6 +58,7 @@ protected:
     void secureStyleDataFromShapeToModel(::oox::drawingml::Shape& rShape);
     void restoreStyleDataFromShapeToModel(::oox::drawingml::Shape& rShape);
 
+private:
     // The model definition, the parts *only* available in oox. Also look for 
already
     // defined ModelData in svx::diagram::DiagramData
 
commit 4504d6ddf1b466ae069e7fa0c97f93b74ed0f724
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Nov 23 16:09:51 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Nov 24 07:00:02 2022 +0100

    loplugin:unusedfields make some fields private
    
    this is one of the secondary analyses this plugin performs
    
    Change-Id: I1c496e234513362338600180e51f7e71e605a7cc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143180
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/io/source/acceptor/acceptor.hxx b/io/source/acceptor/acceptor.hxx
index 9dc3690166cc..221ad16d2b2d 100644
--- a/io/source/acceptor/acceptor.hxx
+++ b/io/source/acceptor/acceptor.hxx
@@ -39,6 +39,7 @@ namespace io_acceptor {
 
         void stopAccepting();
 
+    private:
         std::mutex m_mutex;
         ::osl::Pipe m_pipe;
         OUString m_sPipeName;
@@ -59,6 +60,7 @@ namespace io_acceptor {
 
         void stopAccepting();
 
+    private:
         ::osl::SocketAddr m_addr;
         ::osl::AcceptorSocket m_socket;
         OUString m_sSocketName;
diff --git a/jvmfwk/inc/vendorbase.hxx b/jvmfwk/inc/vendorbase.hxx
index 5c13ee7a5f94..dca8f3fb02d8 100644
--- a/jvmfwk/inc/vendorbase.hxx
+++ b/jvmfwk/inc/vendorbase.hxx
@@ -167,17 +167,18 @@ protected:
 
     virtual char const* const* getLibraryPaths(int* size) = 0;
 
+    typedef rtl::Reference<VendorBase> (*createInstance_func)();
+    friend rtl::Reference<VendorBase>
+    createInstance(createInstance_func pFunc,
+                   const std::vector<std::pair<OUString, OUString>>& 
properties);
+
+private:
     OUString m_sVendor;
     OUString m_sVersion;
     OUString m_sHome;
     OUString m_sRuntimeLibrary;
     OUString m_sLD_LIBRARY_PATH;
     OUString m_sArch;
-
-    typedef rtl::Reference<VendorBase> (*createInstance_func)();
-    friend rtl::Reference<VendorBase>
-    createInstance(createInstance_func pFunc,
-                   const std::vector<std::pair<OUString, OUString>>& 
properties);
 };
 }
 
diff --git a/lotuswordpro/inc/xfilter/xfparastyle.hxx 
b/lotuswordpro/inc/xfilter/xfparastyle.hxx
index 339f6a3c7fff..1a12c2f4c9c4 100644
--- a/lotuswordpro/inc/xfilter/xfparastyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfparastyle.hxx
@@ -217,7 +217,7 @@ public:
     void SetNumberRight(bool bFlag){m_bNumberRight = bFlag;}
     bool GetNumberRight() const {return m_bNumberRight;}
 
-protected:
+private:
     OUString   m_strMasterPage;
     enumXFAlignType m_eAlignType;
 
diff --git a/lotuswordpro/source/filter/explode.hxx 
b/lotuswordpro/source/filter/explode.hxx
index fb13a6f26696..d3151b22fef3 100644
--- a/lotuswordpro/source/filter/explode.hxx
+++ b/lotuswordpro/source/filter/explode.hxx
@@ -93,6 +93,7 @@ public:
     sal_uInt32 ReadBits(sal_uInt16 iCount, sal_uInt32& nBits);
     sal_uInt32 Decode(HuffmanTreeNode* pRoot);
 
+private:
     /**
      * @brief
      * compressed/decompressed stream
diff --git a/lotuswordpro/source/filter/lwpcelllayout.hxx 
b/lotuswordpro/source/filter/lwpcelllayout.hxx
index e6a3130702b3..72aad7b4136f 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.hxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.hxx
@@ -184,6 +184,7 @@ protected:
     virtual sal_uInt16 GetBelowRowID(sal_uInt16 nRow) override {return nRow + 
m_nRealrowspan; };
     virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 
nCol, LwpTableLayout * pTableLayout) override;
     virtual rtl::Reference<XFCell> ConvertCell(LwpObjectID aTableID, 
sal_uInt16 nRow, sal_uInt16 nCol) override;
+private:
     sal_uInt16  cnumrows;
     sal_uInt8   cnumcols;
     sal_uInt16  m_nRealrowspan;
diff --git a/lotuswordpro/source/filter/lwplayout.hxx 
b/lotuswordpro/source/filter/lwplayout.hxx
index 9ac89fddc60c..3c86921da631 100644
--- a/lotuswordpro/source/filter/lwplayout.hxx
+++ b/lotuswordpro/source/filter/lwplayout.hxx
@@ -418,9 +418,6 @@ public:
 
 class LwpLayout : public LwpMiddleLayout
 {
-private:
-    bool m_bGettingShadow;
-    bool m_bGettingNumCols;
 public:
     LwpLayout( LwpObjectHeader const &objHdr, LwpSvStream* pStrm );
     virtual ~LwpLayout() override;
@@ -430,21 +427,12 @@ public:
     XFShadow* GetXFShadow();
 protected:
     void Read() override;
-protected:
-    LwpUseWhen  m_aUseWhen;
-    LwpObjectID m_Position;
-    LwpObjectID m_LayColumns;
-    LwpObjectID m_LayGutterStuff;
-    LwpObjectID m_LayJoinStuff;
-    LwpObjectID m_LayShadow;
-    LwpObjectID m_LayExtJoinStuff;
 
 public:
     LwpUseWhen* VirtualGetUseWhen() override;
     virtual sal_uInt16 GetNumCols() override;
     virtual double GetColGap(sal_uInt16 nIndex) override;
     sal_uInt16 GetUsePage();
-public:
     enum UseWhenType
     {
         StartWithinColume,
@@ -453,7 +441,6 @@ public:
         StartOnOddPage,
         StartOnEvenPage
     };
-public:
     UseWhenType GetUseWhenType();
     virtual bool IsUseOnAllPages() override;
     virtual bool IsUseOnAllEvenPages() override;
@@ -461,6 +448,17 @@ public:
     virtual bool IsUseOnPage() override;
     LwpObjectID& GetPosition(){ return m_Position;}
     virtual rtl::Reference<LwpVirtualLayout> GetContainerLayout() override;
+
+private:
+    bool m_bGettingShadow;
+    bool m_bGettingNumCols;
+    LwpUseWhen  m_aUseWhen;
+    LwpObjectID m_Position;
+    LwpObjectID m_LayColumns;
+    LwpObjectID m_LayGutterStuff;
+    LwpObjectID m_LayJoinStuff;
+    LwpObjectID m_LayShadow;
+    LwpObjectID m_LayExtJoinStuff;
 };
 
 class LwpPlacableLayout : public LwpLayout
diff --git a/lotuswordpro/source/filter/lwppara.hxx 
b/lotuswordpro/source/filter/lwppara.hxx
index bfb1dcb82b9a..2d2f980914c2 100644
--- a/lotuswordpro/source/filter/lwppara.hxx
+++ b/lotuswordpro/source/filter/lwppara.hxx
@@ -187,7 +187,7 @@ public:
 
     void SetAllText(std::u16string_view sText);
 
-protected:
+private:
     sal_uInt32  m_nOrdinal; // Ordinal number of this paragraph
     LwpObjectID m_ParaStyle;    // handle of paragraph style
     LwpPoint        m_Hint;     // Paragraph hint - width & height
diff --git a/lotuswordpro/source/filter/lwprowlayout.hxx 
b/lotuswordpro/source/filter/lwprowlayout.hxx
index ad2c9eacb959..38dfefaaef5c 100644
--- a/lotuswordpro/source/filter/lwprowlayout.hxx
+++ b/lotuswordpro/source/filter/lwprowlayout.hxx
@@ -84,6 +84,7 @@ public:
     void SetRowMap();
 protected:
     void Read() override;
+private:
     sal_uInt16 crowid;
     sal_Int32 cheight;              // Minimum height if height is automatic.
     sal_uInt8 cLeaderDotCount;  // dfb - # of cells with leader dots
@@ -95,7 +96,6 @@ protected:
         RF_VALID_HAS_BORDER = 0x02,
         RF_LEADER_COUNT_VALID = 0x4
     };
-private:
     std::vector<LwpConnectedCellLayout*> m_ConnCellList;
     sal_Int32 FindMarkConnCell(sal_uInt8 nStartCol,sal_uInt8 nEndCol);
     sal_Int32 FindNextMarkConnCell(sal_uInt16 nMarkConnCell,sal_uInt8 nEndCol);
diff --git a/lotuswordpro/source/filter/lwpsdwrect.hxx 
b/lotuswordpro/source/filter/lwpsdwrect.hxx
index ec92097f58bd..a5fd73ab3ea3 100644
--- a/lotuswordpro/source/filter/lwpsdwrect.hxx
+++ b/lotuswordpro/source/filter/lwpsdwrect.hxx
@@ -89,8 +89,6 @@ class SdwRectangle
 {
 private:
     bool m_bRotated;
-
-public:
     std::array<Point, 4> m_nRectCorner;
 
 public:
diff --git a/lotuswordpro/source/filter/lwptable.hxx 
b/lotuswordpro/source/filter/lwptable.hxx
index b55d7a4b4436..6139a351c594 100644
--- a/lotuswordpro/source/filter/lwptable.hxx
+++ b/lotuswordpro/source/filter/lwptable.hxx
@@ -122,7 +122,11 @@ public:
     bool IsNumberDown() const;
     virtual bool IsTable() override { return true;}
     LwpSuperTableLayout* GetSuperTableLayout();
+
 protected:
+    void Read() override;
+
+private:
     LwpForkedNotifyList m_CPNotifyList;
 
     sal_uInt16      m_nRow, m_nColumn;
@@ -139,7 +143,6 @@ protected:
 
     LwpObjectID     m_Layout;
     LwpObjectID     m_DefaultCellStyle; // gCVirtualLayout
-    void Read() override;
 };
 
 /**
diff --git a/lotuswordpro/source/filter/lwptablelayout.hxx 
b/lotuswordpro/source/filter/lwptablelayout.hxx
index beee6acb6c16..945d6ca5bce7 100644
--- a/lotuswordpro/source/filter/lwptablelayout.hxx
+++ b/lotuswordpro/source/filter/lwptablelayout.hxx
@@ -154,23 +154,6 @@ protected:
     void ParseTable();
     void PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_uInt16 
nColID);
 
-    sal_uInt16 m_nRows;
-    sal_uInt16 m_nCols;
-
-    std::vector<TableConvertAttempt> m_aConvertingStack;
-
-private:
-    //CColumnLayoutHead cColumnLayout;
-    LwpObjectID m_ColumnLayout;
-    LwpCellLayout * m_pDefaultCellLayout;
-    OUString m_DefaultColumnStyleName;
-    OUString m_DefaultRowStyleName;
-
-    // wordpro cell  map
-    std::vector<LwpCellLayout*> m_WordProCellsMap;
-    // column vector
-    std::vector<LwpColumnLayout*> m_aColumns;
-
 public:
     void XFConvert(XFContentContainer* pCont) override;
     void ConvertTable(rtl::Reference<XFTable> const & pXFTable, sal_uInt16 
nStartRow,
@@ -180,6 +163,7 @@ public:
     XFCell* GetCellsMap(sal_uInt16 nRow,sal_uInt8 nCol);
    const  std::map<sal_uInt16,LwpRowLayout*>& GetRowsMap() const {return 
m_RowsMap;}
     LwpRowLayout* GetRowLayout(sal_uInt16 nRow);
+
 private:
     void ConvertDefaultRow(rtl::Reference<XFTable> const & pXFTable, sal_uInt8 
nStartCol,
                 sal_uInt8 nEndCol, sal_uInt16 nRowID);
@@ -189,15 +173,30 @@ private:
     void SplitRowToCells(XFTable* pTmpTable, rtl::Reference<XFTable> const & 
pXFTable,
                 sal_uInt8 nFirstColSpann, const sal_uInt8* pCellMark);
 
-    std::map<sal_uInt16,LwpRowLayout*> m_RowsMap;
     void SplitConflictCells();
+
+    void PutCellVals(LwpFoundry* pFoundry, LwpObjectID aTableID);
+
+    sal_uInt16 m_nRows;
+    sal_uInt16 m_nCols;
+
+    std::vector<TableConvertAttempt> m_aConvertingStack;
+
+    //CColumnLayoutHead cColumnLayout;
+    LwpObjectID m_ColumnLayout;
+    LwpCellLayout * m_pDefaultCellLayout;
+    OUString m_DefaultColumnStyleName;
+    OUString m_DefaultRowStyleName;
+
+    // wordpro cell  map
+    std::vector<LwpCellLayout*> m_WordProCellsMap;
+    // column vector
+    std::vector<LwpColumnLayout*> m_aColumns;
+    std::map<sal_uInt16,LwpRowLayout*> m_RowsMap;
     rtl::Reference<XFTable> m_pXFTable;
     bool m_bConverted;
-
     using rt_type = mdds::rtree<int, XFCellListener>;
     rt_type m_CellsMap;
-
-    void PutCellVals(LwpFoundry* pFoundry, LwpObjectID aTableID);
 };
 
 /**

Reply via email to