sw/source/filter/ww8/ww8toolbar.cxx |   92 ++++++++++++++++++------------------
 sw/source/filter/ww8/ww8toolbar.hxx |   32 ++++++------
 2 files changed, 62 insertions(+), 62 deletions(-)

New commits:
commit 3b7920043fcb42f68efae99fe290d1b759522443
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Jul 4 08:04:17 2022 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Jul 4 08:46:54 2022 +0200

    sw: prefix members of ww8toolbar
    
    PlfAcd, PlfKme, PlfMcd and SwCTB
    
    See tdf#94879 for motivation.
    
    Change-Id: If1d7b99971299f2360df5c7ef4631680f29fb3fa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136791
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/filter/ww8/ww8toolbar.cxx 
b/sw/source/filter/ww8/ww8toolbar.cxx
index fb31b698ecaa..a8540849d1c3 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -374,11 +374,11 @@ bool TBDelta::Read(SvStream &rS)
     return rS.good();
 }
 
-SwCTB::SwCTB() : cbTBData( 0 )
-,iWCTBl( 0 )
-,reserved( 0 )
-,unused( 0 )
-,cCtls( 0 )
+SwCTB::SwCTB() : m_cbTBData( 0 )
+,m_iWCTBl( 0 )
+,m_reserved( 0 )
+,m_unused( 0 )
+,m_cCtls( 0 )
 {
 }
 
@@ -388,35 +388,35 @@ SwCTB::~SwCTB()
 
 bool SwCTB::IsMenuToolbar() const
 {
-    return tb.IsMenuToolbar();
+    return m_tb.IsMenuToolbar();
 }
 
 bool SwCTB::Read( SvStream &rS)
 {
     SAL_INFO("sw.ww8","SwCTB::Read() stream pos 0x" << std::hex << rS.Tell() );
     nOffSet = rS.Tell();
-    if ( !name.Read( rS ) )
+    if ( !m_name.Read( rS ) )
         return false;
-    rS.ReadInt32( cbTBData );
-    if ( !tb.Read( rS ) )
+    rS.ReadInt32( m_cbTBData );
+    if ( !m_tb.Read( rS ) )
         return false;
     for ( short index = 0; index < nVisualData; ++index )
     {
         TBVisualData aVisData;
         aVisData.Read( rS );
-        rVisualData.push_back( aVisData );
+        m_rVisualData.push_back( aVisData );
     }
 
-    rS.ReadInt32( iWCTBl ).ReadUInt16( reserved ).ReadUInt16( unused 
).ReadInt32( cCtls );
+    rS.ReadInt32( m_iWCTBl ).ReadUInt16( m_reserved ).ReadUInt16( m_unused 
).ReadInt32( m_cCtls );
 
-    if ( cCtls )
+    if ( m_cCtls )
     {
-        for ( sal_Int32 index = 0; index < cCtls; ++index )
+        for ( sal_Int32 index = 0; index < m_cCtls; ++index )
         {
             SwTBC aTBC;
             if ( !aTBC.Read( rS ) )
                 return false;
-            rTBC.push_back( aTBC );
+            m_rTBC.push_back( aTBC );
         }
     }
     return rS.good();
@@ -427,7 +427,7 @@ bool SwCTB::ImportCustomToolBar( SwCTBWrapper& rWrapper, 
CustomToolBarImportHelp
     bool bRes = false;
     try
     {
-        if ( !tb.IsEnabled() )
+        if ( !m_tb.IsEnabled() )
             return true;  // didn't fail, just ignoring
         // Create default setting
         uno::Reference< container::XIndexContainer > xIndexContainer( 
helper.getCfgManager()->createSettings(), uno::UNO_SET_THROW );
@@ -435,10 +435,10 @@ bool SwCTB::ImportCustomToolBar( SwCTBWrapper& rWrapper, 
CustomToolBarImportHelp
         uno::Reference< beans::XPropertySet > xProps( xIndexContainer, 
uno::UNO_QUERY_THROW );
 
         // set UI name for toolbar
-        xProps->setPropertyValue( "UIName", uno::Any( name.getString() ) );
+        xProps->setPropertyValue( "UIName", uno::Any( m_name.getString() ) );
 
-        const OUString sToolBarName = "private:resource/toolbar/custom_" + 
name.getString();
-        for ( auto& rItem : rTBC )
+        const OUString sToolBarName = "private:resource/toolbar/custom_" + 
m_name.getString();
+        for ( auto& rItem : m_rTBC )
         {
             // createToolBar item for control
             if ( !rItem.ImportToolBarControl( rWrapper, xIndexContainer, 
helper, IsMenuToolbar() ) )
@@ -468,7 +468,7 @@ bool SwCTB::ImportCustomToolBar( SwCTBWrapper& rWrapper, 
CustomToolBarImportHelp
 
 bool SwCTB::ImportMenuTB( SwCTBWrapper& rWrapper, const css::uno::Reference< 
css::container::XIndexContainer >& xIndexContainer, CustomToolBarImportHelper& 
rHelper )
 {
-    for ( auto& rItem : rTBC )
+    for ( auto& rItem : m_rTBC )
     {
         // createToolBar item for control
         if ( !rItem.ImportToolBarControl( rWrapper, xIndexContainer, rHelper, 
true ) )
@@ -746,7 +746,7 @@ bool Tcg255SubStruct::Read(SvStream &rS)
 }
 
 PlfMcd::PlfMcd()
-    : iMac(0)
+    : m_iMac(0)
 {
 }
 
@@ -755,21 +755,21 @@ bool PlfMcd::Read(SvStream &rS)
     SAL_INFO("sw.ww8","PffMcd::Read() stream pos 0x" << std::hex << rS.Tell() 
);
     nOffSet = rS.Tell();
     Tcg255SubStruct::Read( rS );
-    rS.ReadInt32( iMac );
-    if (iMac < 0)
+    rS.ReadInt32( m_iMac );
+    if (m_iMac < 0)
         return false;
     auto nMaxPossibleRecords = rS.remainingSize() / 24 /*sizeof MCD*/;
-    if (o3tl::make_unsigned(iMac) > nMaxPossibleRecords)
+    if (o3tl::make_unsigned(m_iMac) > nMaxPossibleRecords)
     {
-        SAL_WARN("sw.ww8", iMac << " records claimed, but max possible is " << 
nMaxPossibleRecords);
-        iMac = nMaxPossibleRecords;
+        SAL_WARN("sw.ww8", m_iMac << " records claimed, but max possible is " 
<< nMaxPossibleRecords);
+        m_iMac = nMaxPossibleRecords;
     }
-    if (iMac)
+    if (m_iMac)
     {
-        rgmcd.resize(iMac);
-        for ( sal_Int32 index = 0; index < iMac; ++index )
+        m_rgmcd.resize(m_iMac);
+        for ( sal_Int32 index = 0; index < m_iMac; ++index )
         {
-            if ( !rgmcd[ index ].Read( rS ) )
+            if ( !m_rgmcd[ index ].Read( rS ) )
                 return false;
         }
     }
@@ -777,7 +777,7 @@ bool PlfMcd::Read(SvStream &rS)
 }
 
 PlfAcd::PlfAcd() :
- iMac(0)
+ m_iMac(0)
 {
 }
 
@@ -790,21 +790,21 @@ bool PlfAcd::Read( SvStream &rS)
     SAL_INFO("sw.ww8","PffAcd::Read() stream pos 0x" << std::hex << rS.Tell() 
);
     nOffSet = rS.Tell();
     Tcg255SubStruct::Read( rS );
-    rS.ReadInt32( iMac );
-    if (iMac < 0)
+    rS.ReadInt32( m_iMac );
+    if (m_iMac < 0)
         return false;
     auto nMaxPossibleRecords = rS.remainingSize() / (sizeof(sal_uInt16)*2);
-    if (o3tl::make_unsigned(iMac) > nMaxPossibleRecords)
+    if (o3tl::make_unsigned(m_iMac) > nMaxPossibleRecords)
     {
-        SAL_WARN("sw.ww8", iMac << " records claimed, but max possible is " << 
nMaxPossibleRecords);
-        iMac = nMaxPossibleRecords;
+        SAL_WARN("sw.ww8", m_iMac << " records claimed, but max possible is " 
<< nMaxPossibleRecords);
+        m_iMac = nMaxPossibleRecords;
     }
-    if (iMac)
+    if (m_iMac)
     {
-        rgacd.reset( new Acd[ iMac ] );
-        for ( sal_Int32 index = 0; index < iMac; ++index )
+        m_rgacd.reset( new Acd[ m_iMac ] );
+        for ( sal_Int32 index = 0; index < m_iMac; ++index )
         {
-            if ( !rgacd[ index ].Read( rS ) )
+            if ( !m_rgacd[ index ].Read( rS ) )
                 return false;
         }
     }
@@ -812,7 +812,7 @@ bool PlfAcd::Read( SvStream &rS)
 }
 
 PlfKme::PlfKme() :
- iMac( 0 )
+ m_iMac( 0 )
 {
 }
 
@@ -825,18 +825,18 @@ bool PlfKme::Read(SvStream &rS)
     SAL_INFO("sw.ww8","PlfKme::Read() stream pos 0x" << std::hex << rS.Tell() 
);
     nOffSet = rS.Tell();
     Tcg255SubStruct::Read( rS );
-    rS.ReadInt32( iMac );
-    if (iMac > 0)
+    rS.ReadInt32( m_iMac );
+    if (m_iMac > 0)
     {
         //each Kme is 14 bytes in size
         size_t nMaxAvailableRecords = rS.remainingSize() / 14;
-        if (o3tl::make_unsigned(iMac) > nMaxAvailableRecords)
+        if (o3tl::make_unsigned(m_iMac) > nMaxAvailableRecords)
             return false;
 
-        rgkme.reset( new Kme[ iMac ] );
-        for( sal_Int32 index=0; index<iMac; ++index )
+        m_rgkme.reset( new Kme[ m_iMac ] );
+        for( sal_Int32 index=0; index<m_iMac; ++index )
         {
-            if ( !rgkme[ index ].Read( rS ) )
+            if ( !m_rgkme[ index ].Read( rS ) )
                 return false;
         }
     }
diff --git a/sw/source/filter/ww8/ww8toolbar.hxx 
b/sw/source/filter/ww8/ww8toolbar.hxx
index 0e5f63e28a48..3a2420c744d2 100644
--- a/sw/source/filter/ww8/ww8toolbar.hxx
+++ b/sw/source/filter/ww8/ww8toolbar.hxx
@@ -42,15 +42,15 @@ public:
 
 class SwCTB : public TBBase
 {
-    Xst name;
-    sal_Int32 cbTBData;
-    TB tb;
-    std::vector<TBVisualData> rVisualData;
-    sal_Int32 iWCTBl;
-    sal_uInt16 reserved;
-    sal_uInt16 unused;
-    sal_Int32 cCtls;
-    std::vector< SwTBC > rTBC;
+    Xst m_name;
+    sal_Int32 m_cbTBData;
+    TB m_tb;
+    std::vector<TBVisualData> m_rVisualData;
+    sal_Int32 m_iWCTBl;
+    sal_uInt16 m_reserved;
+    sal_uInt16 m_unused;
+    sal_Int32 m_cCtls;
+    std::vector< SwTBC > m_rTBC;
 
     SwCTB(const SwCTB&) = delete;
     SwCTB& operator = ( const SwCTB&) = delete;
@@ -62,7 +62,7 @@ public:
     bool IsMenuToolbar() const;
     bool ImportCustomToolBar( SwCTBWrapper&, CustomToolBarImportHelper& );
     bool ImportMenuTB( SwCTBWrapper&, const css::uno::Reference< 
css::container::XIndexContainer >&, CustomToolBarImportHelper& );
-    OUString const & GetName() { return tb.getName().getString(); }
+    OUString const & GetName() { return m_tb.getName().getString(); }
 };
 
 class TBDelta : public TBBase
@@ -171,8 +171,8 @@ public:
 
 class PlfMcd : public Tcg255SubStruct
 {
-    sal_Int32 iMac;
-    std::vector<MCD> rgmcd; // array of MCD's
+    sal_Int32 m_iMac;
+    std::vector<MCD> m_rgmcd; // array of MCD's
     PlfMcd(const PlfMcd&) = delete;
     PlfMcd& operator = ( const PlfMcd&) = delete;
 
@@ -195,8 +195,8 @@ public:
 
 class PlfAcd: public Tcg255SubStruct
 {
-    sal_Int32 iMac;
-    std::unique_ptr<Acd[]> rgacd;
+    sal_Int32 m_iMac;
+    std::unique_ptr<Acd[]> m_rgacd;
     PlfAcd(const PlfAcd&) = delete;
     PlfAcd& operator = ( const PlfAcd&) = delete;
 
@@ -226,8 +226,8 @@ public:
 
 class PlfKme : public Tcg255SubStruct
 {
-    sal_Int32 iMac;
-    std::unique_ptr<Kme[]> rgkme;
+    sal_Int32 m_iMac;
+    std::unique_ptr<Kme[]> m_rgkme;
     PlfKme(const PlfKme&) = delete;
     PlfKme& operator = ( const PlfKme&) = delete;
 

Reply via email to