diff options
-rw-r--r-- | sw/source/core/inc/layact.hxx | 10 | ||||
-rw-r--r-- | sw/source/core/layout/flycnt.cxx | 182 | ||||
-rw-r--r-- | sw/source/core/layout/layact.cxx | 78 | ||||
-rw-r--r-- | sw/source/uibase/config/usrpref.cxx | 24 | ||||
-rw-r--r-- | sw/source/uibase/inc/usrpref.hxx | 4 |
5 files changed, 156 insertions, 142 deletions
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 44dfa7feb4d8..a5ed0c4eb37e 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -181,11 +181,11 @@ public: class SwLayIdle { TaskStopwatch m_aWatch; - SwRootFrame *pRoot; - SwViewShellImp *pImp; // The Idler registers and deregisters here - SwContentNode *pContentNode; // The current cursor position is saved here - sal_Int32 nTextPos; - bool bPageValid; // Were we able to evaluate everything on the whole page? + SwRootFrame *m_pRoot; + SwViewShellImp *m_pImp; // The Idler registers and deregisters here + SwContentNode *m_pContentNode; // The current cursor position is saved here + sal_Int32 m_nTextPos; + bool m_bPageValid; // Were we able to evaluate everything on the whole page? #ifdef DBG_UTIL bool m_bIndicator; diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 953b527ee65b..c19794e98e28 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -206,13 +206,13 @@ namespace { // #i3317# - re-factoring of the position stack class SwOszControl { - static const SwFlyFrame *pStack1; - static const SwFlyFrame *pStack2; - static const SwFlyFrame *pStack3; - static const SwFlyFrame *pStack4; - static const SwFlyFrame *pStack5; + static const SwFlyFrame* m_pStack1; + static const SwFlyFrame* m_pStack2; + static const SwFlyFrame* m_pStack3; + static const SwFlyFrame* m_pStack4; + static const SwFlyFrame* m_pStack5; - const SwFlyFrame *pFly; + const SwFlyFrame* m_pFly; std::vector<Point> maObjPositions; public: @@ -224,54 +224,54 @@ public: } -const SwFlyFrame *SwOszControl::pStack1 = nullptr; -const SwFlyFrame *SwOszControl::pStack2 = nullptr; -const SwFlyFrame *SwOszControl::pStack3 = nullptr; -const SwFlyFrame *SwOszControl::pStack4 = nullptr; -const SwFlyFrame *SwOszControl::pStack5 = nullptr; +const SwFlyFrame* SwOszControl::m_pStack1 = nullptr; +const SwFlyFrame* SwOszControl::m_pStack2 = nullptr; +const SwFlyFrame* SwOszControl::m_pStack3 = nullptr; +const SwFlyFrame* SwOszControl::m_pStack4 = nullptr; +const SwFlyFrame* SwOszControl::m_pStack5 = nullptr; -SwOszControl::SwOszControl( const SwFlyFrame *pFrame ) - : pFly( pFrame ) +SwOszControl::SwOszControl(const SwFlyFrame* pFrame) + : m_pFly(pFrame) { - if ( !SwOszControl::pStack1 ) - SwOszControl::pStack1 = pFly; - else if ( !SwOszControl::pStack2 ) - SwOszControl::pStack2 = pFly; - else if ( !SwOszControl::pStack3 ) - SwOszControl::pStack3 = pFly; - else if ( !SwOszControl::pStack4 ) - SwOszControl::pStack4 = pFly; - else if ( !SwOszControl::pStack5 ) - SwOszControl::pStack5 = pFly; + if (!SwOszControl::m_pStack1) + SwOszControl::m_pStack1 = m_pFly; + else if (!SwOszControl::m_pStack2) + SwOszControl::m_pStack2 = m_pFly; + else if (!SwOszControl::m_pStack3) + SwOszControl::m_pStack3 = m_pFly; + else if (!SwOszControl::m_pStack4) + SwOszControl::m_pStack4 = m_pFly; + else if (!SwOszControl::m_pStack5) + SwOszControl::m_pStack5 = m_pFly; } SwOszControl::~SwOszControl() { - if ( SwOszControl::pStack1 == pFly ) - SwOszControl::pStack1 = nullptr; - else if ( SwOszControl::pStack2 == pFly ) - SwOszControl::pStack2 = nullptr; - else if ( SwOszControl::pStack3 == pFly ) - SwOszControl::pStack3 = nullptr; - else if ( SwOszControl::pStack4 == pFly ) - SwOszControl::pStack4 = nullptr; - else if ( SwOszControl::pStack5 == pFly ) - SwOszControl::pStack5 = nullptr; + if (SwOszControl::m_pStack1 == m_pFly) + SwOszControl::m_pStack1 = nullptr; + else if (SwOszControl::m_pStack2 == m_pFly) + SwOszControl::m_pStack2 = nullptr; + else if (SwOszControl::m_pStack3 == m_pFly) + SwOszControl::m_pStack3 = nullptr; + else if (SwOszControl::m_pStack4 == m_pFly) + SwOszControl::m_pStack4 = nullptr; + else if (SwOszControl::m_pStack5 == m_pFly) + SwOszControl::m_pStack5 = nullptr; // #i3317# maObjPositions.clear(); } bool SwOszControl::IsInProgress( const SwFlyFrame *pFly ) { - if ( SwOszControl::pStack1 && !pFly->IsLowerOf( SwOszControl::pStack1 ) ) + if (SwOszControl::m_pStack1 && !pFly->IsLowerOf(SwOszControl::m_pStack1)) return true; - if ( SwOszControl::pStack2 && !pFly->IsLowerOf( SwOszControl::pStack2 ) ) + if (SwOszControl::m_pStack2 && !pFly->IsLowerOf(SwOszControl::m_pStack2)) return true; - if ( SwOszControl::pStack3 && !pFly->IsLowerOf( SwOszControl::pStack3 ) ) + if (SwOszControl::m_pStack3 && !pFly->IsLowerOf(SwOszControl::m_pStack3)) return true; - if ( SwOszControl::pStack4 && !pFly->IsLowerOf( SwOszControl::pStack4 ) ) + if (SwOszControl::m_pStack4 && !pFly->IsLowerOf(SwOszControl::m_pStack4)) return true; - if ( SwOszControl::pStack5 && !pFly->IsLowerOf( SwOszControl::pStack5 ) ) + if (SwOszControl::m_pStack5 && !pFly->IsLowerOf(SwOszControl::m_pStack5)) return true; return false; } @@ -287,7 +287,7 @@ bool SwOszControl::ChkOsz() } else { - Point aNewObjPos = pFly->GetObjRect().Pos(); + Point aNewObjPos = m_pFly->GetObjRect().Pos(); for ( auto const & pt : maObjPositions ) { if ( aNewObjPos == pt ) @@ -548,14 +548,23 @@ namespace { class SwDistance { public: - SwTwips nMain, nSub; - SwDistance() : nMain(0), nSub(0) { } + SwTwips m_nMain, m_nSub; + SwDistance() + : m_nMain(0) + , m_nSub(0) + { + } bool operator<( const SwDistance& rTwo ) const - { return nMain < rTwo.nMain || ( nMain == rTwo.nMain && nSub && - rTwo.nSub && nSub < rTwo.nSub ); } + { + return m_nMain < rTwo.m_nMain + || (m_nMain == rTwo.m_nMain && m_nSub && rTwo.m_nSub && m_nSub < rTwo.m_nSub); + } bool operator<=( const SwDistance& rTwo ) const - { return nMain < rTwo.nMain || ( nMain == rTwo.nMain && ( !nSub || - !rTwo.nSub || nSub <= rTwo.nSub ) ); } + { + return m_nMain < rTwo.m_nMain + || (m_nMain == rTwo.m_nMain + && (!m_nSub || !rTwo.m_nSub || m_nSub <= rTwo.m_nSub)); + } }; } @@ -564,12 +573,12 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, const Point &rPt, const SwContentFrame *pCnt ) { - rRet.nSub = 0; + rRet.m_nSub = 0; //If the point stays inside the Cnt everything is clear already; the Content //automatically has a distance of 0. if ( pCnt->getFrameArea().IsInside( rPt ) ) { - rRet.nMain = 0; + rRet.m_nMain = 0; return pCnt; } else @@ -593,19 +602,19 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, if( bVert ) { if ( bVertL2R ) - rRet.nMain = rPt.X() - nTopForObjPos; + rRet.m_nMain = rPt.X() - nTopForObjPos; else - rRet.nMain = nTopForObjPos - rPt.X(); + rRet.m_nMain = nTopForObjPos - rPt.X(); } else - rRet.nMain = rPt.Y() - nTopForObjPos; + rRet.m_nMain = rPt.Y() - nTopForObjPos; return pCnt; } else if ( rPt.Y() <= pUp->getFrameArea().Top() ) { // <rPt> point is above environment of given content frame // correct for vertical layout? - rRet.nMain = LONG_MAX; + rRet.m_nMain = LONG_MAX; } else if( rPt.X() < pUp->getFrameArea().Left() && rPt.Y() <= ( bVert ? pUp->getFrameArea().Top() : pUp->getFrameArea().Bottom() ) ) @@ -622,24 +631,27 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, if( bVert ) { if ( bVertL2R ) - rRet.nMain = rPt.X() - nTopForObjPos; + rRet.m_nMain = rPt.X() - nTopForObjPos; else - rRet.nMain = nTopForObjPos - rPt.X(); + rRet.m_nMain = nTopForObjPos - rPt.X(); } else - rRet.nMain = rPt.Y() - nTopForObjPos; + rRet.m_nMain = rPt.Y() - nTopForObjPos; return pCnt; } else - rRet.nMain = LONG_MAX; + rRet.m_nMain = LONG_MAX; } else { - rRet.nMain = bVert - ? ( bVertL2R - ? ( (pUp->getFrameArea().Left() + pUp->getFramePrintArea().Right()) - nTopForObjPos ) - : ( nTopForObjPos - (pUp->getFrameArea().Left() + pUp->getFramePrintArea().Left() ) ) ) - : ( (pUp->getFrameArea().Top() + pUp->getFramePrintArea().Bottom()) - nTopForObjPos ); + rRet.m_nMain + = bVert ? (bVertL2R + ? ((pUp->getFrameArea().Left() + pUp->getFramePrintArea().Right()) + - nTopForObjPos) + : (nTopForObjPos + - (pUp->getFrameArea().Left() + pUp->getFramePrintArea().Left()))) + : ((pUp->getFrameArea().Top() + pUp->getFramePrintArea().Bottom()) + - nTopForObjPos); const SwFrame *pPre = pCnt; const SwFrame *pLay = pUp->GetLeaf( MAKEPAGE_NONE, true, pCnt ); @@ -649,8 +661,8 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, const SwSectionFrame *pSect = pUp->FindSctFrame(); if( pSect ) { - rRet.nSub = rRet.nMain; - rRet.nMain = 0; + rRet.m_nSub = rRet.m_nMain; + rRet.m_nMain = 0; } if( pSect && !pSect->IsAnLower( pLay ) ) { @@ -743,9 +755,9 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, else { if( bSct || pSect ) - rRet.nSub += nPrtHeight; + rRet.m_nSub += nPrtHeight; else - rRet.nMain += nPrtHeight; + rRet.m_nMain += nPrtHeight; pPre = pLay; pLay = pLay->GetLeaf( MAKEPAGE_NONE, true, pCnt ); if( pSect && !pSect->IsAnLower( pLay ) ) @@ -836,9 +848,9 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrameTop ) : ( nFrameTop - rPt.X() ) ) : ( rPt.Y() - nFrameTop ); if( bSct || pSect ) - rRet.nSub += nDiff; + rRet.m_nSub += nDiff; else - rRet.nMain += nDiff; + rRet.m_nMain += nDiff; } if ( pLay->IsFootnoteContFrame() && !static_cast<const SwLayoutFrame*>(pLay)->Lower() ) { @@ -850,7 +862,7 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, return pLay; } else - rRet.nMain = LONG_MAX; + rRet.m_nMain = LONG_MAX; } } return nullptr; @@ -1104,23 +1116,23 @@ const SwContentFrame *FindAnchor( const SwFrame *pOldAnch, const Point &rNew, } } if ( !pUpFrame ) - nUp.nMain = LONG_MAX; - if ( nUp.nMain >= 0 && LONG_MAX != nUp.nMain ) + nUp.m_nMain = LONG_MAX; + if (nUp.m_nMain >= 0 && LONG_MAX != nUp.m_nMain) { bNegAllowed = false; - if ( nUpLst.nMain < 0 ) //don't take the wrong one, if the value - //just changed from negative to positive. + if (nUpLst.m_nMain < 0) //don't take the wrong one, if the value + //just changed from negative to positive. { pUpLst = pUpFrame; nUpLst = nUp; } } - } while ( pUpFrame && ( ( bNegAllowed && nUp.nMain < 0 ) || ( nUp <= nUpLst ) ) ); + } while (pUpFrame && ((bNegAllowed && nUp.m_nMain < 0) || (nUp <= nUpLst))); const SwContentFrame *pDownLst; const SwContentFrame *pDownFrame = pCnt; SwDistance nDownLst; - if ( nDown.nMain < 0 ) - nDown.nMain = LONG_MAX; + if (nDown.m_nMain < 0) + nDown.m_nMain = LONG_MAX; do { pDownLst = pDownFrame; nDownLst = nDown; @@ -1131,32 +1143,34 @@ const SwContentFrame *FindAnchor( const SwFrame *pOldAnch, const Point &rNew, if ( pDownFrame ) { ::lcl_CalcDownDist( nDown, aNew, pDownFrame ); - if ( nDown.nMain < 0 ) - nDown.nMain = LONG_MAX; + if (nDown.m_nMain < 0) + nDown.m_nMain = LONG_MAX; //It makes sense to search further, if the distance grows inside //a table. if ( pDownLst->IsInTab() && pDownFrame->IsInTab() ) { - while ( pDownFrame && ( ( nDown.nMain != LONG_MAX && pDownFrame->IsInTab()) || bBody != pDownFrame->IsInDocBody() ) ) + while (pDownFrame + && ((nDown.m_nMain != LONG_MAX && pDownFrame->IsInTab()) + || bBody != pDownFrame->IsInDocBody())) { pDownFrame = pDownFrame->GetNextContentFrame(); if ( pDownFrame ) ::lcl_CalcDownDist( nDown, aNew, pDownFrame ); - if ( nDown.nMain < 0 ) - nDown.nMain = LONG_MAX; + if (nDown.m_nMain < 0) + nDown.m_nMain = LONG_MAX; } } } if ( !pDownFrame ) - nDown.nMain = LONG_MAX; + nDown.m_nMain = LONG_MAX; - } while ( pDownFrame && nDown <= nDownLst && - nDown.nMain != LONG_MAX && nDownLst.nMain != LONG_MAX ); + } while (pDownFrame && nDown <= nDownLst && nDown.m_nMain != LONG_MAX + && nDownLst.m_nMain != LONG_MAX); //If we couldn't find one in both directions, we'll search the Content whose //left upper corner is the nearest to the point. Such a situation may //happen, if the point doesn't lay in the text flow but in any margin. - if ( nDownLst.nMain == LONG_MAX && nUpLst.nMain == LONG_MAX ) + if (nDownLst.m_nMain == LONG_MAX && nUpLst.m_nMain == LONG_MAX) { // If an OLE objects, which is contained in a fly frame // is resized in inplace mode and the new Position is outside the @@ -1232,7 +1246,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew ) { SwDistance aDist; pFrame = ::lcl_CalcDownDist( aDist, aNew, pCnt ); - nY = aDist.nMain + aDist.nSub; + nY = aDist.m_nMain + aDist.m_nSub; } SwTwips nX = 0; diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 93f3da8da9e8..2195829f06ed 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1932,23 +1932,23 @@ bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob ) if( bProcess ) { assert(pTextNode); - SwViewShell *pSh = pImp->GetShell(); - if( COMPLETE_STRING == nTextPos ) + SwViewShell *pSh = m_pImp->GetShell(); + if( COMPLETE_STRING == m_nTextPos ) { - --nTextPos; + --m_nTextPos; if( auto pCursorShell = dynamic_cast<SwCursorShell *>( pSh ) ) if( !pCursorShell->IsTableMode() ) { SwPaM *pCursor = pCursorShell->GetCursor(); if( !pCursor->HasMark() && !pCursor->IsMultiSelection() ) { - pContentNode = pCursor->GetContentNode(); - nTextPos = pCursor->GetPoint()->nContent.GetIndex(); + m_pContentNode = pCursor->GetContentNode(); + m_nTextPos = pCursor->GetPoint()->nContent.GetIndex(); } } } - sal_Int32 const nPos((pContentNode && pTextNode == pContentNode) - ? nTextPos + sal_Int32 const nPos((m_pContentNode && pTextNode == m_pContentNode) + ? m_nTextPos : COMPLETE_STRING); switch ( eJob ) @@ -1957,9 +1957,9 @@ bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob ) { SwRect aRepaint( const_cast<SwTextFrame*>(pTextFrame)->AutoSpell_(*pTextNode, nPos) ); // PENDING should stop idle spell checking - bPageValid = bPageValid && (SwTextNode::WrongState::TODO != pTextNode->GetWrongDirty()); + m_bPageValid = m_bPageValid && (SwTextNode::WrongState::TODO != pTextNode->GetWrongDirty()); if ( aRepaint.HasArea() ) - pImp->GetShell()->InvalidateWindows( aRepaint ); + m_pImp->GetShell()->InvalidateWindows( aRepaint ); if (IsInterrupt()) return true; break; @@ -1984,9 +1984,9 @@ bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob ) { try { const SwRect aRepaint( const_cast<SwTextFrame*>(pTextFrame)->SmartTagScan(*pTextNode) ); - bPageValid = bPageValid && !pTextNode->IsSmartTagDirty(); + m_bPageValid = m_bPageValid && !pTextNode->IsSmartTagDirty(); if ( aRepaint.HasArea() ) - pImp->GetShell()->InvalidateWindows( aRepaint ); + m_pImp->GetShell()->InvalidateWindows( aRepaint ); } catch( const css::uno::RuntimeException&) { // handle smarttag problems gracefully and provide diagnostics TOOLS_WARN_EXCEPTION( "sw.core", "SMART_TAGS"); @@ -2029,7 +2029,7 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) { // Spellcheck all contents of the pages. Either only the // visible ones or all of them. - const SwViewShell* pViewShell = pImp->GetShell(); + const SwViewShell* pViewShell = m_pImp->GetShell(); const SwViewOption* pViewOptions = pViewShell->GetViewOptions(); const SwDoc* pDoc = pViewShell->GetDoc(); @@ -2059,16 +2059,16 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) SwPageFrame *pPage; if ( bVisAreaOnly ) - pPage = pImp->GetFirstVisPage(pViewShell->GetOut()); + pPage = m_pImp->GetFirstVisPage(pViewShell->GetOut()); else - pPage = static_cast<SwPageFrame*>(pRoot->Lower()); + pPage = static_cast<SwPageFrame*>(m_pRoot->Lower()); - pContentNode = nullptr; - nTextPos = COMPLETE_STRING; + m_pContentNode = nullptr; + m_nTextPos = COMPLETE_STRING; while ( pPage ) { - bPageValid = true; + m_bPageValid = true; const SwContentFrame *pCnt = pPage->ContainsContent(); while( pCnt && pPage->IsAnLower( pCnt ) ) { @@ -2098,7 +2098,7 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) } } - if( bPageValid ) + if( m_bPageValid ) { switch ( eJob ) { @@ -2111,7 +2111,7 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) pPage = static_cast<SwPageFrame*>(pPage->GetNext()); if ( pPage && bVisAreaOnly && - !pPage->getFrameArea().IsOver( pImp->GetShell()->VisArea())) + !pPage->getFrameArea().IsOver( m_pImp->GetShell()->VisArea())) break; } return false; @@ -2124,7 +2124,7 @@ void SwLayIdle::ShowIdle( Color eColor ) return; m_bIndicator = true; - vcl::Window *pWin = pImp->GetShell()->GetWin(); + vcl::Window *pWin = m_pImp->GetShell()->GetWin(); if (pWin && !pWin->SupportsDoubleBuffering()) // FIXME make this work with double-buffering { tools::Rectangle aRect( 0, 0, 5, 5 ); @@ -2143,19 +2143,19 @@ void SwLayIdle::ShowIdle( Color eColor ) #endif // DBG_UTIL SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : - pRoot( pRt ), - pImp( pI ) + m_pRoot( pRt ), + m_pImp( pI ) #ifdef DBG_UTIL , m_bIndicator( false ) #endif { SAL_INFO("sw.idle", "SwLayIdle() entry"); - pImp->m_pIdleAct = this; + m_pImp->m_pIdleAct = this; SHOW_IDLE( COL_LIGHTRED ); - pImp->GetShell()->EnableSmooth( false ); + m_pImp->GetShell()->EnableSmooth( false ); // First, spellcheck the visible area. Only if there's nothing // to do there, we trigger the IdleFormat. @@ -2169,7 +2169,7 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : // We remember the shells where the cursor is visible, so we can make // it visible again if needed after a document change. std::vector<bool> aBools; - for(SwViewShell& rSh : pImp->GetShell()->GetRingContainer()) + for(SwViewShell& rSh : m_pImp->GetShell()->GetRingContainer()) { ++rSh.mnStartAction; bool bVis = false; @@ -2182,9 +2182,9 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : bool bInterrupt(false); { - SwLayAction aAction(pRoot, pImp, &m_aWatch); + SwLayAction aAction(m_pRoot, m_pImp, &m_aWatch); aAction.SetWaitAllowed( false ); - aAction.Action(pImp->GetShell()->GetOut()); + aAction.Action(m_pImp->GetShell()->GetOut()); bInterrupt = aAction.IsInterrupt(); } @@ -2192,7 +2192,7 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : // somewhere or if the visibility of the CharRects has changed. bool bActions = false; size_t nBoolIdx = 0; - for(SwViewShell& rSh : pImp->GetShell()->GetRingContainer()) + for(SwViewShell& rSh : m_pImp->GetShell()->GetRingContainer()) { --rSh.mnStartAction; @@ -2223,7 +2223,7 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : // Prepare start/end actions via CursorShell, so the cursor, selection // and VisArea can be set correctly. nBoolIdx = 0; - for(SwViewShell& rSh : pImp->GetShell()->GetRingContainer()) + for(SwViewShell& rSh : m_pImp->GetShell()->GetRingContainer()) { SwCursorShell* pCursorShell = dynamic_cast<SwCursorShell*>( &rSh); @@ -2278,8 +2278,8 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : } bool bInValid = false; - const SwViewOption& rVOpt = *pImp->GetShell()->GetViewOptions(); - const SwViewShell* pViewShell = pImp->GetShell(); + const SwViewOption& rVOpt = *m_pImp->GetShell()->GetViewOptions(); + const SwViewShell* pViewShell = m_pImp->GetShell(); // See conditions in DoIdleJob() const bool bSpell = rVOpt.IsOnlineSpell(); const bool bACmplWrd = SwViewOption::IsAutoCompleteWords(); @@ -2288,7 +2288,7 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : !pViewShell->GetDoc()->isXForms() && SwSmartTagMgr::Get().IsSmartTagsEnabled(); - SwPageFrame *pPg = static_cast<SwPageFrame*>(pRoot->Lower()); + SwPageFrame *pPg = static_cast<SwPageFrame*>(m_pRoot->Lower()); do { bInValid = pPg->IsInvalidContent() || pPg->IsInvalidLayout() || @@ -2305,8 +2305,8 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : if ( !bInValid ) { - pRoot->ResetIdleFormat(); - SfxObjectShell* pDocShell = pImp->GetShell()->GetDoc()->GetDocShell(); + m_pRoot->ResetIdleFormat(); + SfxObjectShell* pDocShell = m_pImp->GetShell()->GetDoc()->GetDocShell(); pDocShell->Broadcast( SfxEventHint( SfxEventHintId::SwEventLayoutFinished, SwDocShell::GetEventName(STR_SW_EVENT_LAYOUT_FINISHED), pDocShell ) ); // Limit lifetime of the text glyphs cache to a single run of the // layout. @@ -2314,15 +2314,15 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : } } - pImp->GetShell()->EnableSmooth( true ); + m_pImp->GetShell()->EnableSmooth( true ); - if( pImp->IsAccessible() ) - pImp->FireAccessibleEvents(); + if( m_pImp->IsAccessible() ) + m_pImp->FireAccessibleEvents(); SAL_INFO("sw.idle", "SwLayIdle() return"); #ifdef DBG_UTIL - if ( m_bIndicator && pImp->GetShell()->GetWin() ) + if ( m_bIndicator && m_pImp->GetShell()->GetWin() ) { // Do not invalidate indicator, this may cause an endless loop. Instead, just repaint it // This should be replaced by an overlay object in the future, anyways. Since it's only for debug @@ -2334,7 +2334,7 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : SwLayIdle::~SwLayIdle() { - pImp->m_pIdleAct = nullptr; + m_pImp->m_pIdleAct = nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index 6c8ca7fe29a7..8b4acb3a1824 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -553,10 +553,10 @@ void SwCursorConfig::Notify( const css::uno::Sequence< OUString >& ) {} SwWebColorConfig::SwWebColorConfig(SwMasterUsrPref& rPar) : ConfigItem("Office.WriterWeb/Background", ConfigItemMode::ReleaseTree), - rParent(rPar), - aPropNames(1) + m_rParent(rPar), + m_aPropNames(1) { - aPropNames.getArray()[0] = "Color"; + m_aPropNames.getArray()[0] = "Color"; } SwWebColorConfig::~SwWebColorConfig() @@ -565,29 +565,29 @@ SwWebColorConfig::~SwWebColorConfig() void SwWebColorConfig::ImplCommit() { - Sequence<Any> aValues(aPropNames.getLength()); + Sequence<Any> aValues(m_aPropNames.getLength()); Any* pValues = aValues.getArray(); - for(int nProp = 0; nProp < aPropNames.getLength(); nProp++) + for(int nProp = 0; nProp < m_aPropNames.getLength(); nProp++) { switch(nProp) { - case 0: pValues[nProp] <<= rParent.GetRetoucheColor(); break;// "Color", + case 0: pValues[nProp] <<= m_rParent.GetRetoucheColor(); break;// "Color", } } - PutProperties(aPropNames, aValues); + PutProperties(m_aPropNames, aValues); } void SwWebColorConfig::Notify( const css::uno::Sequence< OUString >& ) {} void SwWebColorConfig::Load() { - Sequence<Any> aValues = GetProperties(aPropNames); + Sequence<Any> aValues = GetProperties(m_aPropNames); const Any* pValues = aValues.getConstArray(); - OSL_ENSURE(aValues.getLength() == aPropNames.getLength(), "GetProperties failed"); - if(aValues.getLength() != aPropNames.getLength()) + OSL_ENSURE(aValues.getLength() == m_aPropNames.getLength(), "GetProperties failed"); + if(aValues.getLength() != m_aPropNames.getLength()) return; - for(int nProp = 0; nProp < aPropNames.getLength(); nProp++) + for(int nProp = 0; nProp < m_aPropNames.getLength(); nProp++) { if(pValues[nProp].hasValue()) { @@ -595,7 +595,7 @@ void SwWebColorConfig::Load() { case 0: Color nSet; - pValues[nProp] >>= nSet; rParent.SetRetoucheColor(nSet); + pValues[nProp] >>= nSet; m_rParent.SetRetoucheColor(nSet); break;// "Color", } } diff --git a/sw/source/uibase/inc/usrpref.hxx b/sw/source/uibase/inc/usrpref.hxx index 2ebe466e247c..41ba99b6c988 100644 --- a/sw/source/uibase/inc/usrpref.hxx +++ b/sw/source/uibase/inc/usrpref.hxx @@ -106,8 +106,8 @@ public: class SwWebColorConfig : public utl::ConfigItem { private: - SwMasterUsrPref& rParent; - css::uno::Sequence<OUString> aPropNames; + SwMasterUsrPref& m_rParent; + css::uno::Sequence<OUString> m_aPropNames; virtual void ImplCommit() override; |