diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-06-22 09:07:49 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-06-22 09:48:05 +0200 |
commit | 3c41f9f8fbcc159983ddf54848efb59f5ed96017 (patch) | |
tree | a8a50be09204ad4b0f2e4d260b1a916c7e664e4e /sw | |
parent | 70479e1f4cb3c120f46239a648e65f035af2922d (diff) |
sw: prefix members of SwDocDisplayItem, SwNode2LayoutSaveUpperFrames, ...
... SwShadowCursorItem and SwUndoSort
See tdf#94879 for motivation.
Change-Id: Ic41cd974cc91bf29d73611a7ca920adc9a6551d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96833
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/docnode/node2lay.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/inc/UndoSort.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/inc/node2lay.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/undo/unsort.cxx | 34 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 32 | ||||
-rw-r--r-- | sw/source/uibase/app/appopt.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/config/cfgitems.cxx | 76 | ||||
-rw-r--r-- | sw/source/uibase/inc/cfgitems.hxx | 33 |
8 files changed, 99 insertions, 100 deletions
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index 7eb1a0ce15f3..714468c9808a 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -430,15 +430,15 @@ SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx ) } SwNode2LayoutSaveUpperFrames::SwNode2LayoutSaveUpperFrames(const SwNode& rNd) - : pImpl( new SwNode2LayImpl( rNd, rNd.GetIndex(), true ) ) + : m_pImpl( new SwNode2LayImpl( rNd, rNd.GetIndex(), true ) ) { - pImpl->SaveUpperFrames(); + m_pImpl->SaveUpperFrames(); } void SwNode2LayoutSaveUpperFrames::RestoreUpperFrames( SwNodes& rNds, sal_uLong const nStt, sal_uLong const nEnd) { - pImpl->RestoreUpperFrames( rNds, nStt, nEnd ); + m_pImpl->RestoreUpperFrames( rNds, nStt, nEnd ); } SwFrame* SwNode2Layout::NextFrame() diff --git a/sw/source/core/inc/UndoSort.hxx b/sw/source/core/inc/UndoSort.hxx index 27f97ceaf995..798a5ea1894f 100644 --- a/sw/source/core/inc/UndoSort.hxx +++ b/sw/source/core/inc/UndoSort.hxx @@ -59,10 +59,10 @@ struct SwSortUndoElement class SwUndoSort : public SwUndo, private SwUndRng { - std::unique_ptr<SwSortOptions> pSortOpt; + std::unique_ptr<SwSortOptions> m_pSortOptions; std::vector<std::unique_ptr<SwSortUndoElement>> m_SortList; - std::unique_ptr<SwUndoAttrTable> pUndoTableAttr; - sal_uLong nTableNd; + std::unique_ptr<SwUndoAttrTable> m_pUndoAttrTable; + sal_uLong m_nTableNode; public: SwUndoSort( const SwPaM&, const SwSortOptions& ); diff --git a/sw/source/core/inc/node2lay.hxx b/sw/source/core/inc/node2lay.hxx index c61e2e9e80a7..56073cd89bde 100644 --- a/sw/source/core/inc/node2lay.hxx +++ b/sw/source/core/inc/node2lay.hxx @@ -67,7 +67,7 @@ public: class SwNode2LayoutSaveUpperFrames { - std::unique_ptr<SwNode2LayImpl> pImpl; + std::unique_ptr<SwNode2LayImpl> m_pImpl; public: /// Use this ctor for collecting the UpperFrames SwNode2LayoutSaveUpperFrames( const SwNode& rNd ); diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx index 8f0820fb6b13..682ede12c95f 100644 --- a/sw/source/core/undo/unsort.cxx +++ b/sw/source/core/undo/unsort.cxx @@ -44,9 +44,9 @@ SwSortUndoElement::~SwSortUndoElement() SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt) : SwUndo(SwUndoId::SORT_TXT, rRg.GetDoc()) , SwUndRng(rRg) - , nTableNd(0) + , m_nTableNode(0) { - pSortOpt.reset( new SwSortOptions(rOpt) ); + m_pSortOptions.reset( new SwSortOptions(rOpt) ); } SwUndoSort::SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode& rTableNd, @@ -55,33 +55,33 @@ SwUndoSort::SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode& rTabl { m_nSttNode = nStt; m_nEndNode = nEnd; - nTableNd = rTableNd.GetIndex(); + m_nTableNode = rTableNd.GetIndex(); - pSortOpt.reset( new SwSortOptions(rOpt) ); + m_pSortOptions.reset( new SwSortOptions(rOpt) ); if( bSaveTable ) - pUndoTableAttr.reset( new SwUndoAttrTable( rTableNd ) ); + m_pUndoAttrTable.reset( new SwUndoAttrTable( rTableNd ) ); } SwUndoSort::~SwUndoSort() { - pSortOpt.reset(); - pUndoTableAttr.reset(); + m_pSortOptions.reset(); + m_pUndoAttrTable.reset(); } void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext) { SwDoc & rDoc = rContext.GetDoc(); - if(pSortOpt->bTable) + if(m_pSortOptions->bTable) { // Undo for Table RemoveIdxFromSection( rDoc, m_nSttNode, &m_nEndNode ); - if( pUndoTableAttr ) + if( m_pUndoAttrTable ) { - pUndoTableAttr->UndoImpl(rContext); + m_pUndoAttrTable->UndoImpl(rContext); } - SwTableNode* pTableNd = rDoc.GetNodes()[ nTableNd ]->GetTableNode(); + SwTableNode* pTableNd = rDoc.GetNodes()[ m_nTableNode ]->GetTableNode(); // #i37739# A simple 'MakeFrames' after the node sorting // does not work if the table is inside a frame and has no prev/next. @@ -153,12 +153,12 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext) { SwDoc & rDoc = rContext.GetDoc(); - if(pSortOpt->bTable) + if(m_pSortOptions->bTable) { // Redo for Table RemoveIdxFromSection( rDoc, m_nSttNode, &m_nEndNode ); - SwTableNode* pTableNd = rDoc.GetNodes()[ nTableNd ]->GetTableNode(); + SwTableNode* pTableNd = rDoc.GetNodes()[ m_nTableNode ]->GetTableNode(); // #i37739# A simple 'MakeFrames' after the node sorting // does not work if the table is inside a frame and has no prev/next. @@ -182,9 +182,9 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext) aMovedList.push_back( pSource ); } - if( pUndoTableAttr ) + if( m_pUndoAttrTable ) { - pUndoTableAttr->RedoImpl(rContext); + m_pUndoAttrTable->RedoImpl(rContext); } // Restore table frames: @@ -230,13 +230,13 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext) void SwUndoSort::RepeatImpl(::sw::RepeatContext & rContext) { // table not repeat capable - if(!pSortOpt->bTable) + if(!m_pSortOptions->bTable) { SwPaM *const pPam = & rContext.GetRepeatPaM(); SwDoc& rDoc = *pPam->GetDoc(); if( !rDoc.IsIdxInTable( pPam->Start()->nNode ) ) - rDoc.SortText(*pPam, *pSortOpt); + rDoc.SortText(*pPam, *m_pSortOptions); } } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 7c6140ea3a6c..777b454d2828 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1281,14 +1281,14 @@ bool SwShdwCursorOptionsTabPage::FillItemSet( SfxItemSet* rSet ) SwDocDisplayItem aDisp; - aDisp.bParagraphEnd = m_xParaCB->get_active(); - aDisp.bTab = m_xTabCB->get_active(); - aDisp.bSpace = m_xSpacesCB->get_active(); - aDisp.bNonbreakingSpace = m_xHSpacesCB->get_active(); - aDisp.bSoftHyphen = m_xSHyphCB->get_active(); - aDisp.bCharHiddenText = m_xCharHiddenCB->get_active(); - aDisp.bBookmarks = m_xBookmarkCB->get_active(); - aDisp.bManualBreak = m_xBreakCB->get_active(); + aDisp.m_bParagraphEnd = m_xParaCB->get_active(); + aDisp.m_bTab = m_xTabCB->get_active(); + aDisp.m_bSpace = m_xSpacesCB->get_active(); + aDisp.m_bNonbreakingSpace = m_xHSpacesCB->get_active(); + aDisp.m_bSoftHyphen = m_xSHyphCB->get_active(); + aDisp.m_bCharHiddenText = m_xCharHiddenCB->get_active(); + aDisp.m_bBookmarks = m_xBookmarkCB->get_active(); + aDisp.m_bManualBreak = m_xBreakCB->get_active(); bRet |= (!pOldAttr || aDisp != *pOldAttr); if(bRet) @@ -1329,14 +1329,14 @@ void SwShdwCursorOptionsTabPage::Reset( const SfxItemSet* rSet ) reinterpret_cast<const SfxPoolItem**>(&pDocDisplayAttr) ); if(pDocDisplayAttr) { - m_xParaCB->set_active( pDocDisplayAttr->bParagraphEnd ); - m_xTabCB->set_active( pDocDisplayAttr->bTab ); - m_xSpacesCB->set_active( pDocDisplayAttr->bSpace ); - m_xHSpacesCB->set_active( pDocDisplayAttr->bNonbreakingSpace ); - m_xSHyphCB->set_active( pDocDisplayAttr->bSoftHyphen ); - m_xCharHiddenCB->set_active( pDocDisplayAttr->bCharHiddenText ); - m_xBookmarkCB->set_active(pDocDisplayAttr->bBookmarks); - m_xBreakCB->set_active( pDocDisplayAttr->bManualBreak ); + m_xParaCB->set_active( pDocDisplayAttr->m_bParagraphEnd ); + m_xTabCB->set_active( pDocDisplayAttr->m_bTab ); + m_xSpacesCB->set_active( pDocDisplayAttr->m_bSpace ); + m_xHSpacesCB->set_active( pDocDisplayAttr->m_bNonbreakingSpace ); + m_xSHyphCB->set_active( pDocDisplayAttr->m_bSoftHyphen ); + m_xCharHiddenCB->set_active( pDocDisplayAttr->m_bCharHiddenText ); + m_xBookmarkCB->set_active(pDocDisplayAttr->m_bBookmarks); + m_xBreakCB->set_active( pDocDisplayAttr->m_bManualBreak ); } } diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx index dcc59d8d0c58..47e0ef408b8d 100644 --- a/sw/source/uibase/app/appopt.cxx +++ b/sw/source/uibase/app/appopt.cxx @@ -237,11 +237,11 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) if(!aViewOpt.IsViewMetaChars()) { - if( (!aViewOpt.IsTab( true ) && pDocDispItem->bTab) || - (!aViewOpt.IsBlank( true ) && pDocDispItem->bSpace) || - (!aViewOpt.IsShowBookmarks(true) && pDocDispItem->bBookmarks) || - (!aViewOpt.IsParagraph( true ) && pDocDispItem->bParagraphEnd) || - (!aViewOpt.IsLineBreak( true ) && pDocDispItem->bManualBreak) ) + if( (!aViewOpt.IsTab( true ) && pDocDispItem->m_bTab) || + (!aViewOpt.IsBlank( true ) && pDocDispItem->m_bSpace) || + (!aViewOpt.IsShowBookmarks(true) && pDocDispItem->m_bBookmarks) || + (!aViewOpt.IsParagraph( true ) && pDocDispItem->m_bParagraphEnd) || + (!aViewOpt.IsLineBreak( true ) && pDocDispItem->m_bManualBreak) ) { aViewOpt.SetViewMetaChars(true); if(pBindings) diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index 41ce1246072d..217ae8624c56 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -26,28 +26,28 @@ SwDocDisplayItem::SwDocDisplayItem() : SfxPoolItem(FN_PARAM_DOCDISP) { - bParagraphEnd = - bTab = - bSpace = - bNonbreakingSpace = - bSoftHyphen = - bCharHiddenText = - bBookmarks = - bManualBreak = true; + m_bParagraphEnd = + m_bTab = + m_bSpace = + m_bNonbreakingSpace = + m_bSoftHyphen = + m_bCharHiddenText = + m_bBookmarks = + m_bManualBreak = true; }; // Item for the Settings dialog, page document view SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt ) : SfxPoolItem( FN_PARAM_DOCDISP ) { - bParagraphEnd = rVOpt.IsParagraph(true); - bTab = rVOpt.IsTab(true); - bSpace = rVOpt.IsBlank(true); - bNonbreakingSpace = rVOpt.IsHardBlank(); - bSoftHyphen = rVOpt.IsSoftHyph(); - bCharHiddenText = rVOpt.IsShowHiddenChar(true); - bBookmarks = rVOpt.IsShowBookmarks(true); - bManualBreak = rVOpt.IsLineBreak(true); + m_bParagraphEnd = rVOpt.IsParagraph(true); + m_bTab = rVOpt.IsTab(true); + m_bSpace = rVOpt.IsBlank(true); + m_bNonbreakingSpace = rVOpt.IsHardBlank(); + m_bSoftHyphen = rVOpt.IsSoftHyph(); + m_bCharHiddenText = rVOpt.IsShowHiddenChar(true); + m_bBookmarks = rVOpt.IsShowBookmarks(true); + m_bManualBreak = rVOpt.IsLineBreak(true); } SwDocDisplayItem* SwDocDisplayItem::Clone( SfxItemPool* ) const @@ -61,26 +61,26 @@ bool SwDocDisplayItem::operator==( const SfxPoolItem& rAttr ) const const SwDocDisplayItem& rItem = static_cast<const SwDocDisplayItem&>(rAttr); - return ( bParagraphEnd == rItem.bParagraphEnd && - bTab == rItem.bTab && - bSpace == rItem.bSpace && - bNonbreakingSpace == rItem.bNonbreakingSpace && - bSoftHyphen == rItem.bSoftHyphen && - bCharHiddenText == rItem.bCharHiddenText && - bBookmarks == rItem.bBookmarks && - bManualBreak == rItem.bManualBreak ); + return ( m_bParagraphEnd == rItem.m_bParagraphEnd && + m_bTab == rItem.m_bTab && + m_bSpace == rItem.m_bSpace && + m_bNonbreakingSpace == rItem.m_bNonbreakingSpace && + m_bSoftHyphen == rItem.m_bSoftHyphen && + m_bCharHiddenText == rItem.m_bCharHiddenText && + m_bBookmarks == rItem.m_bBookmarks && + m_bManualBreak == rItem.m_bManualBreak ); } void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const { - rVOpt.SetParagraph (bParagraphEnd ); - rVOpt.SetTab (bTab ); - rVOpt.SetBlank (bSpace ); - rVOpt.SetHardBlank (bNonbreakingSpace ); - rVOpt.SetSoftHyph (bSoftHyphen ); - rVOpt.SetShowHiddenChar(bCharHiddenText ); - rVOpt.SetShowBookmarks(bBookmarks ); - rVOpt.SetLineBreak (bManualBreak ); + rVOpt.SetParagraph (m_bParagraphEnd ); + rVOpt.SetTab (m_bTab ); + rVOpt.SetBlank (m_bSpace ); + rVOpt.SetHardBlank (m_bNonbreakingSpace ); + rVOpt.SetSoftHyph (m_bSoftHyphen ); + rVOpt.SetShowHiddenChar(m_bCharHiddenText ); + rVOpt.SetShowBookmarks(m_bBookmarks ); + rVOpt.SetLineBreak (m_bManualBreak ); } SwElemItem::SwElemItem() : @@ -185,15 +185,15 @@ bool SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const // Item for Settings dialog, ShadowCursorPage SwShadowCursorItem::SwShadowCursorItem() : SfxPoolItem( FN_PARAM_SHADOWCURSOR ), - eMode( SwFillMode::Tab ) - ,bOn( false ) + m_eMode( SwFillMode::Tab ) + ,m_bOn( false ) { } SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt ) : SfxPoolItem( FN_PARAM_SHADOWCURSOR ), - eMode( rVOpt.GetShdwCursorFillMode() ) - ,bOn( rVOpt.IsShadowCursor() ) + m_eMode( rVOpt.GetShdwCursorFillMode() ) + ,m_bOn( rVOpt.IsShadowCursor() ) { } @@ -212,8 +212,8 @@ bool SwShadowCursorItem::operator==( const SfxPoolItem& rCmp ) const void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const { - rVOpt.SetShadowCursor( bOn ); - rVOpt.SetShdwCursorFillMode( eMode ); + rVOpt.SetShadowCursor( m_bOn ); + rVOpt.SetShdwCursorFillMode( m_eMode ); } #ifdef DBG_UTIL diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx index bf50b8f105f0..feb68c81a9bc 100644 --- a/sw/source/uibase/inc/cfgitems.hxx +++ b/sw/source/uibase/inc/cfgitems.hxx @@ -37,21 +37,20 @@ class SwContentOptPage; class SwShdwCursorOptionsTabPage; enum class SwFillMode; -// OS 12.01.95 -// Item for settings dialog - document view +/// Item for settings dialog - document view class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem { friend class SwShdwCursorOptionsTabPage; friend class SwModule; - bool bParagraphEnd :1; - bool bTab :1; - bool bSpace :1; - bool bNonbreakingSpace :1; - bool bSoftHyphen :1; - bool bCharHiddenText :1; - bool bBookmarks :1; - bool bManualBreak :1; + bool m_bParagraphEnd :1; + bool m_bTab :1; + bool m_bSpace :1; + bool m_bNonbreakingSpace :1; + bool m_bSoftHyphen :1; + bool m_bCharHiddenText :1; + bool m_bBookmarks :1; + bool m_bManualBreak :1; public: SwDocDisplayItem(); @@ -109,11 +108,11 @@ public: virtual bool operator==( const SfxPoolItem& ) const override; }; -// Item for settings dialog, ShadowCursorPage +/// Item for settings dialog, ShadowCursorPage class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem { - SwFillMode eMode; - bool bOn; + SwFillMode m_eMode; + bool m_bOn; public: SwShadowCursorItem(); SwShadowCursorItem( const SwViewOption& rVOpt ); @@ -123,11 +122,11 @@ public: void FillViewOptions( SwViewOption& rVOpt) const; - SwFillMode GetMode() const { return eMode; } - bool IsOn() const { return bOn; } + SwFillMode GetMode() const { return m_eMode; } + bool IsOn() const { return m_bOn; } - void SetMode( SwFillMode eM ) { eMode = eM; } - void SetOn( bool bFlag ) { bOn = bFlag; } + void SetMode( SwFillMode eM ) { m_eMode = eM; } + void SetOn( bool bFlag ) { m_bOn = bFlag; } }; #ifdef DBG_UTIL |