diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-06-20 08:15:00 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-06-20 08:59:11 +0200 |
commit | 2914e2d497f153736e5725c0428f9d340ef621ca (patch) | |
tree | 0d4d3030c6e0b4efb2e708634664bc119952ff71 /sw | |
parent | 983aa4a107bac672497f07b0bbbc752126af2d2a (diff) |
sw: prefix members of Acd, Customization, MSOWordCommandConvertor and ...
... Sttb
See tdf#94879 for motivation.
Change-Id: Ifc5637a97fced3a4bbab64b4ef9784cb4f586694
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136135
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 28 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8toolbar.cxx | 72 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8toolbar.hxx | 20 |
3 files changed, 60 insertions, 60 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 8b253338cf2d..9dab410cd66b 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -418,11 +418,11 @@ struct SBBItem OUString data; SBBItem() : cchData(0){} }; - sal_uInt16 fExtend; - sal_uInt16 cData; - sal_uInt16 cbExtra; + sal_uInt16 m_fExtend; + sal_uInt16 m_cData; + sal_uInt16 m_cbExtra; - std::vector< SBBItem > dataItems; + std::vector< SBBItem > m_dataItems; Sttb(Sttb const&) = delete; Sttb& operator=(Sttb const&) = delete; @@ -437,9 +437,9 @@ public: } Sttb::Sttb() - : fExtend(0) - , cData(0) - , cbExtra(0) + : m_fExtend(0) + , m_cData(0) + , m_cbExtra(0) { } @@ -447,19 +447,19 @@ bool Sttb::Read( SvStream& rS ) { SAL_INFO("sw.ww8", "stream pos " << rS.Tell()); nOffSet = rS.Tell(); - rS.ReadUInt16( fExtend ).ReadUInt16( cData ).ReadUInt16( cbExtra ); - if ( cData ) + rS.ReadUInt16( m_fExtend ).ReadUInt16( m_cData ).ReadUInt16( m_cbExtra ); + if ( m_cData ) { //if they are all going to be empty strings, how many could there be const size_t nMaxPossibleRecords = rS.remainingSize() / sizeof(sal_uInt16); - if (cData > nMaxPossibleRecords) + if (m_cData > nMaxPossibleRecords) return false; - for ( sal_Int32 index = 0; index < cData; ++index ) + for ( sal_Int32 index = 0; index < m_cData; ++index ) { SBBItem aItem; rS.ReadUInt16( aItem.cchData ); aItem.data = read_uInt16s_ToOUString(rS, aItem.cchData); - dataItems.push_back( aItem ); + m_dataItems.push_back( aItem ); } } return true; @@ -469,8 +469,8 @@ OUString Sttb::getStringAtIndex( sal_uInt32 index ) { OUString aRet; - if ( index < dataItems.size() ) - aRet = dataItems[ index ].data; + if ( index < m_dataItems.size() ) + aRet = m_dataItems[ index ].data; return aRet; } diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index b03eb8b863ac..ad558141cda3 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -39,8 +39,8 @@ namespace { class MSOWordCommandConvertor : public MSOCommandConvertor { - IdToString msoToOOcmd; - IdToString tcidToOOcmd; + IdToString m_MSOToOOcmd; + IdToString m_TCIDToOOcmd; public: MSOWordCommandConvertor(); @@ -54,26 +54,26 @@ MSOWordCommandConvertor::MSOWordCommandConvertor() { // mso command id to ooo command string // #FIXME and *HUNDREDS* of id's to added here - msoToOOcmd[ 0x20b ] = ".uno:CloseDoc"; - msoToOOcmd[ 0x50 ] = ".uno:Open"; + m_MSOToOOcmd[ 0x20b ] = ".uno:CloseDoc"; + m_MSOToOOcmd[ 0x50 ] = ".uno:Open"; // mso tcid to ooo command string // #FIXME and *HUNDREDS* of id's to added here - tcidToOOcmd[ 0x9d9 ] = ".uno:Print"; + m_TCIDToOOcmd[ 0x9d9 ] = ".uno:Print"; } OUString MSOWordCommandConvertor::MSOCommandToOOCommand( sal_Int16 key ) { - IdToString::iterator it = msoToOOcmd.find( key ); - if ( it != msoToOOcmd.end() ) + IdToString::iterator it = m_MSOToOOcmd.find( key ); + if ( it != m_MSOToOOcmd.end() ) return it->second; return OUString(); } OUString MSOWordCommandConvertor::MSOTCIDToOOCommand( sal_Int16 key ) { - IdToString::iterator it = tcidToOOcmd.find( key ); - if ( it != tcidToOOcmd.end() ) + IdToString::iterator it = m_TCIDToOOcmd.find( key ); + if ( it != m_TCIDToOOcmd.end() ) return it->second; return OUString(); } @@ -170,7 +170,7 @@ bool SwCTBWrapper::Read( SvStream& rS ) { if (rIndex < 0 || o3tl::make_unsigned(rIndex) >= rCustomizations.size()) continue; - rCustomizations[rIndex].bIsDroppedMenuTB = true; + rCustomizations[rIndex].m_bIsDroppedMenuTB = true; } return rS.good(); } @@ -212,11 +212,11 @@ bool SwCTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh ) } Customization::Customization( SwCTBWrapper* wrapper ) - : tbidForTBD( 0 ) - , reserved1( 0 ) - , ctbds( 0 ) - , pWrapper( wrapper ) - , bIsDroppedMenuTB( false ) + : m_tbidForTBD( 0 ) + , m_reserved1( 0 ) + , m_ctbds( 0 ) + , m_pWrapper( wrapper ) + , m_bIsDroppedMenuTB( false ) { } @@ -224,28 +224,28 @@ bool Customization::Read( SvStream &rS) { SAL_INFO("sw.ww8","Customization::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); - rS.ReadInt32( tbidForTBD ).ReadUInt16( reserved1 ).ReadUInt16( ctbds ); - if ( tbidForTBD ) + rS.ReadInt32( m_tbidForTBD ).ReadUInt16( m_reserved1 ).ReadUInt16( m_ctbds ); + if ( m_tbidForTBD ) { //each TBDelta is at least 18 bytes in size size_t nMaxAvailableRecords = rS.remainingSize() / 18; - if (ctbds > nMaxAvailableRecords) + if (m_ctbds > nMaxAvailableRecords) return false; - for (sal_uInt16 index = 0; index < ctbds; ++index) + for (sal_uInt16 index = 0; index < m_ctbds; ++index) { TBDelta aTBDelta; if (!aTBDelta.Read( rS ) ) return false; - customizationDataTBDelta.push_back( aTBDelta ); + m_customizationDataTBDelta.push_back( aTBDelta ); // Only set the drop down for menus associated with standard toolbar - if ( aTBDelta.ControlDropsToolBar() && tbidForTBD == 0x25 ) - pWrapper->InsertDropIndex( aTBDelta.CustomizationIndex() ); + if ( aTBDelta.ControlDropsToolBar() && m_tbidForTBD == 0x25 ) + m_pWrapper->InsertDropIndex( aTBDelta.CustomizationIndex() ); } } else { - customizationDataCTB = std::make_shared<SwCTB>(); - if ( !customizationDataCTB->Read( rS ) ) + m_customizationDataCTB = std::make_shared<SwCTB>(); + if ( !m_customizationDataCTB->Read( rS ) ) return false; } return rS.good(); @@ -253,22 +253,22 @@ bool Customization::Read( SvStream &rS) bool Customization::ImportMenu( SwCTBWrapper& rWrapper, CustomToolBarImportHelper& helper ) { - if ( tbidForTBD == 0x25 ) // we can handle in a limited way additions the built-in menu bar + if ( m_tbidForTBD == 0x25 ) // we can handle in a limited way additions the built-in menu bar { - for ( auto& rTBDelta : customizationDataTBDelta ) + for ( auto& rTBDelta : m_customizationDataTBDelta ) { // for each new menu ( control that drops a toolbar ) // import a toolbar if ( rTBDelta.ControlIsInserted() && rTBDelta.ControlDropsToolBar() ) { - Customization* pCust = pWrapper->GetCustomizaton( rTBDelta.CustomizationIndex() ); + Customization* pCust = m_pWrapper->GetCustomizaton( rTBDelta.CustomizationIndex() ); if ( pCust ) { // currently only support built-in menu static const OUStringLiteral sMenuBar( u"private:resource/menubar/menubar" ); // Get menu name - SwTBC* pTBC = pWrapper->GetTBCAtOffset( rTBDelta.TBCStreamOffset() ); + SwTBC* pTBC = m_pWrapper->GetTBCAtOffset( rTBDelta.TBCStreamOffset() ); if ( !pTBC ) return false; const OUString sMenuName = pTBC->GetCustomText().replace('&','~'); @@ -301,7 +301,7 @@ bool Customization::ImportMenu( SwCTBWrapper& rWrapper, CustomToolBarImportHelpe comphelper::makePropertyValue("Type", sal_Int32( 0 )), comphelper::makePropertyValue("ItemDescriptorContainer", xMenuContainer) }; - if ( pCust->customizationDataCTB && !pCust->customizationDataCTB->ImportMenuTB( rWrapper, xMenuContainer, helper ) ) + if ( pCust->m_customizationDataCTB && !pCust->m_customizationDataCTB->ImportMenuTB( rWrapper, xMenuContainer, helper ) ) return false; SAL_INFO("sw.ww8","** there are " << xIndexContainer->getCount() << " menu items on the bar, inserting after that"); xIndexContainer->insertByIndex( xIndexContainer->getCount(), uno::Any( aPopupMenu ) ); @@ -323,13 +323,13 @@ bool Customization::ImportMenu( SwCTBWrapper& rWrapper, CustomToolBarImportHelpe bool Customization::ImportCustomToolBar( SwCTBWrapper& rWrapper, CustomToolBarImportHelper& helper ) { - if ( tbidForTBD == 0x25 ) + if ( m_tbidForTBD == 0x25 ) return ImportMenu( rWrapper, helper ); - if ( !customizationDataCTB ) + if ( !m_customizationDataCTB ) return false; - if ( !customizationDataCTB->IsMenuToolbar() ) + if ( !m_customizationDataCTB->IsMenuToolbar() ) { - if ( !customizationDataCTB->ImportCustomToolBar( rWrapper, helper ) ) + if ( !m_customizationDataCTB->ImportCustomToolBar( rWrapper, helper ) ) return false; } return true; @@ -967,8 +967,8 @@ Kme::Read(SvStream &rS) return rS.good(); } -Acd::Acd() : ibst( 0 ) -, fciBasedOnABC( 0 ) +Acd::Acd() : m_ibst( 0 ) +, m_fciBasedOnABC( 0 ) { } @@ -976,7 +976,7 @@ bool Acd::Read(SvStream &rS) { SAL_INFO("sw.ww8","Acd::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); - rS.ReadInt16( ibst ).ReadUInt16( fciBasedOnABC ); + rS.ReadInt16( m_ibst ).ReadUInt16( m_fciBasedOnABC ); return rS.good(); } diff --git a/sw/source/filter/ww8/ww8toolbar.hxx b/sw/source/filter/ww8/ww8toolbar.hxx index 346c39535a09..aeef83e63ca5 100644 --- a/sw/source/filter/ww8/ww8toolbar.hxx +++ b/sw/source/filter/ww8/ww8toolbar.hxx @@ -105,20 +105,20 @@ class Customization : public TBBase { friend class SwCTBWrapper; - sal_Int32 tbidForTBD; - sal_uInt16 reserved1; - sal_uInt16 ctbds; - SwCTBWrapper* pWrapper; - std::shared_ptr< SwCTB > customizationDataCTB; - std::vector< TBDelta > customizationDataTBDelta; - bool bIsDroppedMenuTB; + sal_Int32 m_tbidForTBD; + sal_uInt16 m_reserved1; + sal_uInt16 m_ctbds; + SwCTBWrapper* m_pWrapper; + std::shared_ptr< SwCTB > m_customizationDataCTB; + std::vector< TBDelta > m_customizationDataTBDelta; + bool m_bIsDroppedMenuTB; public: explicit Customization( SwCTBWrapper* rapper ); bool Read(SvStream &rS) override; bool ImportCustomToolBar( SwCTBWrapper&, CustomToolBarImportHelper& ); bool ImportMenu( SwCTBWrapper&, CustomToolBarImportHelper& ); - SwCTB* GetCustomizationData() { return customizationDataCTB.get(); }; + SwCTB* GetCustomizationData() { return m_customizationDataCTB.get(); }; }; class SwCTBWrapper : public Tcg255SubStruct @@ -183,8 +183,8 @@ public: class Acd : public TBBase { - sal_Int16 ibst; - sal_uInt16 fciBasedOnABC; // fciBasedOn(13 bits) A(1bit)B(1bit)C(1Bit) + sal_Int16 m_ibst; + sal_uInt16 m_fciBasedOnABC; // fciBasedOn(13 bits) A(1bit)B(1bit)C(1Bit) Acd(const Acd&) = delete; Acd& operator = ( const Acd&) = delete; |