diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/crstate.hxx | 128 | ||||
-rw-r--r-- | sw/source/core/access/accpara.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 54 | ||||
-rw-r--r-- | sw/source/core/crsr/crstrvl.cxx | 30 | ||||
-rw-r--r-- | sw/source/core/crsr/swcrsr.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/notxtfrm.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/edit/edlingu.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/trvlfrm.cxx | 68 | ||||
-rw-r--r-- | sw/source/core/text/frmcrsr.cxx | 66 | ||||
-rw-r--r-- | sw/source/core/text/itrcrsr.cxx | 144 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 8 |
11 files changed, 262 insertions, 262 deletions
diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx index 119817b0f67e..e9bf810fac16 100644 --- a/sw/inc/crstate.hxx +++ b/sw/inc/crstate.hxx @@ -128,83 +128,83 @@ enum CrsrMoveState // struct for later extensions struct SwCrsrMoveState { - SwFillCrsrPos *pFill; ///< for automatic filling with tabs etc - Sw2LinesPos *p2Lines; ///< for selections inside/around 2line portions - SwSpecialPos* pSpecialPos; ///< for positions inside fields - Point aRealHeight; ///< contains then the position/height of the cursor - CrsrMoveState eState; - sal_uInt8 nCursorBidiLevel; - bool bStop; - bool bRealHeight; ///< should the real height be calculated? - bool bFieldInfo; ///< should be fields recognized? - bool bPosCorr; ///< Point had to be corrected - bool bFootnoteNoInfo; ///< recognized footnote numbering - bool bExactOnly; /**< let GetCrsrOfst look for exact matches only, + SwFillCrsrPos *m_pFill; ///< for automatic filling with tabs etc + Sw2LinesPos *m_p2Lines; ///< for selections inside/around 2line portions + SwSpecialPos* m_pSpecialPos; ///< for positions inside fields + Point m_aRealHeight; ///< contains then the position/height of the cursor + CrsrMoveState m_eState; + sal_uInt8 m_nCursorBidiLevel; + bool m_bStop; + bool m_bRealHeight; ///< should the real height be calculated? + bool m_bFieldInfo; ///< should be fields recognized? + bool m_bPosCorr; ///< Point had to be corrected + bool m_bFootnoteNoInfo; ///< recognized footnote numbering + bool m_bExactOnly; /**< let GetCrsrOfst look for exact matches only, i.e. never let it run into GetContentPos */ - bool bFillRet; ///< only used temporary in FillMode - bool bSetInReadOnly; ///< ReadOnly areas may be entered - bool bRealWidth; ///< Calculation of the width required - bool b2Lines; ///< Check 2line portions and fill p2Lines - bool bNoScroll; ///< No scrolling of undersized textframes - bool bPosMatchesBounds; /**< GetCrsrOfst should not return the next + bool m_bFillRet; ///< only used temporary in FillMode + bool m_bSetInReadOnly; ///< ReadOnly areas may be entered + bool m_bRealWidth; ///< Calculation of the width required + bool m_b2Lines; ///< Check 2line portions and fill p2Lines + bool m_bNoScroll; ///< No scrolling of undersized textframes + bool m_bPosMatchesBounds; /**< GetCrsrOfst should not return the next position if screen position is inside second have of bound rect */ - bool bContentCheck; // #i43742# Cursor position over content? + bool m_bContentCheck; // #i43742# Cursor position over content? // #i27615# /** cursor in front of label */ - bool bInFrontOfLabel; - bool bInNumPortion; ///< point is in number portion #i23726# - int nInNumPostionOffset; ///< distance from number portion's start + bool m_bInFrontOfLabel; + bool m_bInNumPortion; ///< point is in number portion #i23726# + int m_nInNumPostionOffset; ///< distance from number portion's start SwCrsrMoveState( CrsrMoveState eSt = MV_NONE ) : - pFill( NULL ), - p2Lines( NULL ), - pSpecialPos( NULL ), - eState( eSt ), - nCursorBidiLevel( 0 ), - bStop( false ), - bRealHeight( false ), - bFieldInfo( false ), - bPosCorr( false ), - bFootnoteNoInfo( false ), - bExactOnly( false ), - bFillRet( false ), - bSetInReadOnly( false ), - bRealWidth( false ), - b2Lines( false ), - bNoScroll( false ), - bPosMatchesBounds( false ), - bContentCheck( false ), // #i43742# - bInFrontOfLabel( false ), // #i27615# - bInNumPortion(false), // #i26726# - nInNumPostionOffset(0) // #i26726# + m_pFill( NULL ), + m_p2Lines( NULL ), + m_pSpecialPos( NULL ), + m_eState( eSt ), + m_nCursorBidiLevel( 0 ), + m_bStop( false ), + m_bRealHeight( false ), + m_bFieldInfo( false ), + m_bPosCorr( false ), + m_bFootnoteNoInfo( false ), + m_bExactOnly( false ), + m_bFillRet( false ), + m_bSetInReadOnly( false ), + m_bRealWidth( false ), + m_b2Lines( false ), + m_bNoScroll( false ), + m_bPosMatchesBounds( false ), + m_bContentCheck( false ), // #i43742# + m_bInFrontOfLabel( false ), // #i27615# + m_bInNumPortion(false), // #i26726# + m_nInNumPostionOffset(0) // #i26726# {} SwCrsrMoveState( SwFillCrsrPos *pInitFill ) : - pFill( pInitFill ), - p2Lines( NULL ), - pSpecialPos( NULL ), - eState( MV_SETONLYTEXT ), - nCursorBidiLevel( 0 ), - bStop( false ), - bRealHeight( false ), - bFieldInfo( false ), - bPosCorr( false ), - bFootnoteNoInfo( false ), - bExactOnly( false ), - bFillRet( false ), - bSetInReadOnly( false ), - bRealWidth( false ), - b2Lines( false ), - bNoScroll( false ), - bPosMatchesBounds( false ), - bContentCheck( false ), // #i43742# - bInFrontOfLabel( false ), // #i27615# - bInNumPortion(false), // #i23726# - nInNumPostionOffset(0) // #i23726# + m_pFill( pInitFill ), + m_p2Lines( NULL ), + m_pSpecialPos( NULL ), + m_eState( MV_SETONLYTEXT ), + m_nCursorBidiLevel( 0 ), + m_bStop( false ), + m_bRealHeight( false ), + m_bFieldInfo( false ), + m_bPosCorr( false ), + m_bFootnoteNoInfo( false ), + m_bExactOnly( false ), + m_bFillRet( false ), + m_bSetInReadOnly( false ), + m_bRealWidth( false ), + m_b2Lines( false ), + m_bNoScroll( false ), + m_bPosMatchesBounds( false ), + m_bContentCheck( false ), // #i43742# + m_bInFrontOfLabel( false ), // #i27615# + m_bInNumPortion(false), // #i23726# + m_nInNumPostionOffset(0) // #i23726# {} }; diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index c1fa81571a5e..1471a303e64e 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1370,8 +1370,8 @@ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwAccessiblePa // get model position & prepare GetCharRect() arguments SwCrsrMoveState aMoveState; - aMoveState.bRealHeight = true; - aMoveState.bRealWidth = true; + aMoveState.m_bRealHeight = true; + aMoveState.m_bRealWidth = true; SwSpecialPos aSpecialPos; SwTextNode* pNode = const_cast<SwTextNode*>( GetTextNode() ); @@ -1382,7 +1382,7 @@ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwAccessiblePa paragraph. */ const sal_Int32 nPos = bBehindText ? pNode->GetText().getLength() - : GetPortionData().FillSpecialPos(nIndex, aSpecialPos, aMoveState.pSpecialPos ); + : GetPortionData().FillSpecialPos(nIndex, aSpecialPos, aMoveState.m_pSpecialPos ); // call GetCharRect SwRect aCoreRect; @@ -2413,8 +2413,8 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( // get model position & prepare GetCharRect() arguments SwCrsrMoveState aMoveState; - aMoveState.bRealHeight = true; - aMoveState.bRealWidth = true; + aMoveState.m_bRealHeight = true; + aMoveState.m_bRealWidth = true; SwSpecialPos aSpecialPos; SwTextNode* pNode = const_cast<SwTextNode*>( GetTextNode() ); @@ -2425,7 +2425,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( paragraph. */ const sal_Int32 nPos = bBehindText ? pNode->GetText().getLength() - : GetPortionData().FillSpecialPos(nIndex, aSpecialPos, aMoveState.pSpecialPos ); + : GetPortionData().FillSpecialPos(nIndex, aSpecialPos, aMoveState.m_pSpecialPos ); // call GetCharRect SwRect aCoreRect; @@ -2503,7 +2503,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) OSL_ENSURE( GetFrm()->IsTextFrm(), "The text frame has mutated!" ); const SwTextFrm* pFrm = static_cast<const SwTextFrm*>( GetFrm() ); SwCrsrMoveState aMoveState; - aMoveState.bPosMatchesBounds = true; + aMoveState.m_bPosMatchesBounds = true; const bool bSuccess = pFrm->GetCrsrOfst( &aPos, aCorePoint, &aMoveState ); SwIndex aContentIdx = aPos.nContent; diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index ca3a46a89a44..8e5a44e02999 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -741,7 +741,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock ) Point & rAktCrsrPt = pCrsr->GetPtPos(); SwCrsrMoveState aTmpState( IsTableMode() ? MV_TBLSEL : bOnlyText ? MV_SETONLYTEXT : MV_NONE ); - aTmpState.bSetInReadOnly = IsReadOnlyAvailable(); + aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); SwTextNode * pTextNd = pCrsr->GetNode().GetTextNode(); @@ -750,11 +750,11 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock ) !pCrsr->HasMark() && pTextNd->HasVisibleNumberingOrBullet() ) { - aTmpState.bInFrontOfLabel = true; // #i27615# + aTmpState.m_bInFrontOfLabel = true; // #i27615# } else { - aTmpState.bInFrontOfLabel = false; + aTmpState.m_bInFrontOfLabel = false; } int bRet = CRSR_POSOLD | @@ -762,11 +762,11 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock ) ? 0 : CRSR_POSCHG ); const bool bOldInFrontOfLabel = IsInFrontOfLabel(); - const bool bNewInFrontOfLabel = aTmpState.bInFrontOfLabel; + const bool bNewInFrontOfLabel = aTmpState.m_bInFrontOfLabel; - pCrsr->SetCrsrBidiLevel( aTmpState.nCursorBidiLevel ); + pCrsr->SetCrsrBidiLevel( aTmpState.m_nCursorBidiLevel ); - if( MV_RIGHTMARGIN == aTmpState.eState ) + if( MV_RIGHTMARGIN == aTmpState.m_eState ) m_eMvState = MV_RIGHTMARGIN; // is the new position in header or footer? SwFrm* pFrm = lcl_IsInHeaderFooter( aPos.nNode, aPt ); @@ -976,7 +976,7 @@ bool SwCrsrShell::ChgCurrPam( Point aPt( rPt ); SwCrsrMoveState aTmpState( MV_NONE ); - aTmpState.bSetInReadOnly = IsReadOnlyAvailable(); + aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); if ( !GetLayout()->GetCrsrOfst( &aPtPos, aPt, &aTmpState ) && bTstHit ) return false; @@ -1338,7 +1338,7 @@ void SwCrsrShell::UpdateCrsrPos() if( isInHiddenTextFrm(pShellCrsr) ) { SwCrsrMoveState aTmpState( MV_NONE ); - aTmpState.bSetInReadOnly = IsReadOnlyAvailable(); + aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); GetLayout()->GetCrsrOfst( pShellCrsr->GetPoint(), pShellCrsr->GetPtPos(), &aTmpState ); pShellCrsr->DeleteMark(); @@ -1537,11 +1537,11 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) } SwCrsrMoveState aTmpState( MV_NONE ); - aTmpState.bRealHeight = true; + aTmpState.m_bRealHeight = true; if( !pTableFrm->GetCharRect( m_aCharRect, *m_pTableCrsr->GetPoint(), &aTmpState ) ) { Point aCentrPt( m_aCharRect.Center() ); - aTmpState.bSetInReadOnly = IsReadOnlyAvailable(); + aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); pTableFrm->GetCrsrOfst( m_pTableCrsr->GetPoint(), aCentrPt, &aTmpState ); bool const bResult = pTableFrm->GetCharRect( m_aCharRect, *m_pTableCrsr->GetPoint() ); @@ -1577,7 +1577,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) if( m_bSVCrsrVis ) { m_aCrsrHeight.setX(0); - m_aCrsrHeight.setY(aTmpState.aRealHeight.getY() < 0 ? + m_aCrsrHeight.setY(aTmpState.m_aRealHeight.getY() < 0 ? -m_aCharRect.Width() : m_aCharRect.Height()); m_pVisCrsr->Show(); // show again } @@ -1747,17 +1747,17 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) } while( bAgainst ); SwCrsrMoveState aTmpState( m_eMvState ); - aTmpState.bSetInReadOnly = IsReadOnlyAvailable(); - aTmpState.bRealHeight = true; - aTmpState.bRealWidth = IsOverwriteCrsr(); - aTmpState.nCursorBidiLevel = pShellCrsr->GetCrsrBidiLevel(); + aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); + aTmpState.m_bRealHeight = true; + aTmpState.m_bRealWidth = IsOverwriteCrsr(); + aTmpState.m_nCursorBidiLevel = pShellCrsr->GetCrsrBidiLevel(); // #i27615#,#i30453# SwSpecialPos aSpecialPos; aSpecialPos.nExtendRange = SwSPExtendRange::BEFORE; if (pShellCrsr->IsInFrontOfLabel()) { - aTmpState.pSpecialPos = &aSpecialPos; + aTmpState.m_pSpecialPos = &aSpecialPos; } ++mnStartAction; // tdf#91602 prevent recursive Action! @@ -1770,11 +1770,11 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) --mnStartAction; if( !pShellCrsr->HasMark() ) - m_aCrsrHeight = aTmpState.aRealHeight; + m_aCrsrHeight = aTmpState.m_aRealHeight; else { m_aCrsrHeight.setX(0); - m_aCrsrHeight.setY(aTmpState.aRealHeight.getY() < 0 ? + m_aCrsrHeight.setY(aTmpState.m_aRealHeight.getY() < 0 ? -m_aCharRect.Width() : m_aCharRect.Height()); } @@ -2364,8 +2364,8 @@ bool SwCrsrShell::SetVisCrsr( const Point &rPt ) Point aPt( rPt ); SwPosition aPos( *m_pCurCrsr->GetPoint() ); SwCrsrMoveState aTmpState( MV_SETONLYTEXT ); - aTmpState.bSetInReadOnly = IsReadOnlyAvailable(); - aTmpState.bRealHeight = true; + aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); + aTmpState.m_bRealHeight = true; const bool bRet = GetLayout()->GetCrsrOfst( &aPos, aPt /*, &aTmpState*/ ); @@ -2401,8 +2401,8 @@ bool SwCrsrShell::SetVisCrsr( const Point &rPt ) } { - if( aTmpState.bRealHeight ) - m_aCrsrHeight = aTmpState.aRealHeight; + if( aTmpState.m_bRealHeight ) + m_aCrsrHeight = aTmpState.m_aRealHeight; else { m_aCrsrHeight.setX(0); @@ -2985,7 +2985,7 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText ) if( !pCNd || !pCNd->getLayoutFrm( GetLayout(), 0, 0, false) ) { SwCrsrMoveState aTmpState( MV_NONE ); - aTmpState.bSetInReadOnly = IsReadOnlyAvailable(); + aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); GetLayout()->GetCrsrOfst( m_pCurCrsr->GetPoint(), m_pCurCrsr->GetPtPos(), &aTmpState ); } @@ -3100,7 +3100,7 @@ short SwCrsrShell::GetTextDirection( const Point* pPt ) const if( pPt ) { SwCrsrMoveState aTmpState( MV_NONE ); - aTmpState.bSetInReadOnly = IsReadOnlyAvailable(); + aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState ); } @@ -3464,7 +3464,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect, Point aPt( rPt ); SwCrsrMoveState eTmpState( MV_SETONLYTEXT ); SwSpecialPos aSpecialPos; - eTmpState.pSpecialPos = &aSpecialPos; + eTmpState.m_pSpecialPos = &aSpecialPos; SwTextNode *pNode; const SwWrongList *pSmartTagList; @@ -3484,7 +3484,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect, if ( pSubList ) { pSmartTagList = pSubList; - nCurrent = eTmpState.pSpecialPos->nCharOfst; + nCurrent = eTmpState.m_pSpecialPos->nCharOfst; } lcl_FillRecognizerData( rSmartTagTypes, rStringKeyMaps, *pSmartTagList, nCurrent ); @@ -3530,7 +3530,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect, rContent = nWordStart; SwRect aStartRect; SwCrsrMoveState aState; - aState.bRealWidth = true; + aState.m_bRealWidth = true; SwContentNode* pContentNode = pCrsr->GetContentNode(); SwContentFrm *pContentFrame = pContentNode->getLayoutFrm( GetLayout(), &rPt, pCrsr->GetPoint(), false); diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 34d6dfb6b1b4..7158630c303d 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1131,13 +1131,13 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, SwContentFrm *pFrm(0); SwTextAttr* pTextAttr; SwCrsrMoveState aTmpState; - aTmpState.bFieldInfo = true; - aTmpState.bExactOnly = !( SwContentAtPos::SW_OUTLINE & rContentAtPos.eContentAtPos ); - aTmpState.bContentCheck = (SwContentAtPos::SW_CONTENT_CHECK & rContentAtPos.eContentAtPos) != 0; - aTmpState.bSetInReadOnly = IsReadOnlyAvailable(); + aTmpState.m_bFieldInfo = true; + aTmpState.m_bExactOnly = !( SwContentAtPos::SW_OUTLINE & rContentAtPos.eContentAtPos ); + aTmpState.m_bContentCheck = (SwContentAtPos::SW_CONTENT_CHECK & rContentAtPos.eContentAtPos) != 0; + aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); SwSpecialPos aSpecialPos; - aTmpState.pSpecialPos = ( SwContentAtPos::SW_SMARTTAG & rContentAtPos.eContentAtPos ) ? + aTmpState.m_pSpecialPos = ( SwContentAtPos::SW_SMARTTAG & rContentAtPos.eContentAtPos ) ? &aSpecialPos : 0; const bool bCrsrFoundExact = GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState ); @@ -1164,20 +1164,20 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, else if( pTextNd && SwContentAtPos::SW_NUMLABEL & rContentAtPos.eContentAtPos) { - bRet = aTmpState.bInNumPortion; + bRet = aTmpState.m_bInNumPortion; rContentAtPos.aFnd.pNode = pTextNd; - Size aSizeLogic(aTmpState.nInNumPostionOffset, 0); + Size aSizeLogic(aTmpState.m_nInNumPostionOffset, 0); Size aSizePixel = GetWin()->LogicToPixel(aSizeLogic); rContentAtPos.nDist = aSizePixel.Width(); } else if( bCrsrFoundExact && pTextNd ) { - if( !aTmpState.bPosCorr ) + if( !aTmpState.m_bPosCorr ) { if ( !bRet && SwContentAtPos::SW_SMARTTAG & rContentAtPos.eContentAtPos - && !aTmpState.bFootnoteNoInfo ) + && !aTmpState.m_bFootnoteNoInfo ) { const SwWrongList* pSmartTagList = pTextNd->GetSmartTags(); sal_Int32 nCurrent = aPos.nContent.GetIndex(); @@ -1190,7 +1190,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, const SwWrongList* pSubList = pSmartTagList->SubList( nIndex ); if ( pSubList ) { - nCurrent = aTmpState.pSpecialPos->nCharOfst; + nCurrent = aTmpState.m_pSpecialPos->nCharOfst; if ( pSubList->InWrongWord( nCurrent, nLen ) ) bRet = true; @@ -1221,7 +1221,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, if ( !bRet && ( SwContentAtPos::SW_FIELD | SwContentAtPos::SW_CLICKFIELD ) & rContentAtPos.eContentAtPos - && !aTmpState.bFootnoteNoInfo ) + && !aTmpState.m_bFootnoteNoInfo ) { pTextAttr = pTextNd->GetFieldTextAttrAt( aPos.nContent.GetIndex() ); const SwField* pField = pTextAttr != NULL @@ -1288,7 +1288,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, if( !bRet && SwContentAtPos::SW_FTN & rContentAtPos.eContentAtPos ) { - if( aTmpState.bFootnoteNoInfo ) + if( aTmpState.m_bFootnoteNoInfo ) { // over the footnote's char bRet = true; @@ -1341,7 +1341,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, if( !bRet && ( SwContentAtPos::SW_TOXMARK | SwContentAtPos::SW_REFMARK ) & rContentAtPos.eContentAtPos - && !aTmpState.bFootnoteNoInfo ) + && !aTmpState.m_bFootnoteNoInfo ) { pTextAttr = 0; if( SwContentAtPos::SW_TOXMARK & rContentAtPos.eContentAtPos ) @@ -1407,7 +1407,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, if ( !bRet && SwContentAtPos::SW_INETATTR & rContentAtPos.eContentAtPos - && !aTmpState.bFootnoteNoInfo ) + && !aTmpState.m_bFootnoteNoInfo ) { pTextAttr = pTextNd->GetTextAttrAt( aPos.nContent.GetIndex(), RES_TXTATR_INETFMT); @@ -1493,7 +1493,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, pF = pF->GetUpper(); } - if( aTmpState.bPosCorr ) + if( aTmpState.m_bPosCorr ) { if( pF && !pF->Frm().IsInside( aPt )) pF = 0; diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 188399bcae66..e675a20e0aeb 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -1851,7 +1851,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, // try to position the cursor at half of the char-rect's height pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); SwCrsrMoveState eTmpState( MV_UPDOWN ); - eTmpState.bSetInReadOnly = bInReadOnly; + eTmpState.m_bSetInReadOnly = bInReadOnly; SwRect aTmpRect; pFrm->GetCharRect( aTmpRect, *GetPoint(), &eTmpState ); if ( pFrm->IsVertical() ) diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 6e9609b13d95..56753aa183a5 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -526,10 +526,10 @@ bool SwNoTextFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos, if ( pCMS ) { - if ( pCMS->bRealHeight ) + if ( pCMS->m_bRealHeight ) { - pCMS->aRealHeight.setY(rRect.Height()); - pCMS->aRealHeight.setX(0); + pCMS->m_aRealHeight.setY(rRect.Height()); + pCMS->m_aRealHeight.setX(0); } } diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 30e3d5780ee8..e91cdfe20d47 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -912,7 +912,7 @@ uno::Reference< XSpellAlternatives > rContent = nWordStart; SwRect aStartRect; SwCrsrMoveState aState; - aState.bRealWidth = true; + aState.m_bRealWidth = true; SwContentNode* pContentNode = pCrsr->GetContentNode(); SwContentFrm *pContentFrame = pContentNode->getLayoutFrm( GetLayout(), pPt, pCrsr->GetPoint(), false); @@ -1036,7 +1036,7 @@ bool SwEditShell::GetGrammarCorrection( rContent = nWordStart; SwRect aStartRect; SwCrsrMoveState aState; - aState.bRealWidth = true; + aState.m_bRealWidth = true; SwContentNode* pContentNode = pCrsr->GetContentNode(); SwContentFrm *pContentFrame = pContentNode->getLayoutFrm( GetLayout(), pPt, pCrsr->GetPoint(), false); diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 1a606614a45a..738da43a1505 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -70,7 +70,7 @@ namespace { const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : 0; if ( pFly && bBackgroundMatches && - ( ( pCMS && pCMS->bSetInReadOnly ) || + ( ( pCMS && pCMS->m_bSetInReadOnly ) || !pFly->IsProtected() ) && pFly->GetCrsrOfst( pPos, aPoint, pCMS ) ) { @@ -78,7 +78,7 @@ namespace { break; } - if ( pCMS && pCMS->bStop ) + if ( pCMS && pCMS->m_bStop ) return false; aIter.Prev(); } @@ -150,7 +150,7 @@ bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, pFrm->Calc(pRenderContext); // #i43742# New function - const bool bContentCheck = pFrm->IsTextFrm() && pCMS && pCMS->bContentCheck; + const bool bContentCheck = pFrm->IsTextFrm() && pCMS && pCMS->m_bContentCheck; const SwRect aPaintRect( bContentCheck ? pFrm->UnionFrm() : pFrm->PaintArea() ); @@ -160,7 +160,7 @@ bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, bRet = true; else pFrm = pFrm->GetNext(); - if ( pCMS && pCMS->bStop ) + if ( pCMS && pCMS->m_bStop ) return false; } return bRet; @@ -208,17 +208,17 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, } else { - if ( pCMS && (pCMS->bStop || pCMS->bExactOnly) ) + if ( pCMS && (pCMS->m_bStop || pCMS->m_bExactOnly) ) { - static_cast<SwCrsrMoveState*>(pCMS)->bStop = true; + static_cast<SwCrsrMoveState*>(pCMS)->m_bStop = true; return false; } const SwContentFrm *pCnt = GetContentPos( aPoint, false, false, false, pCMS, false ); - if ( pCMS && pCMS->bStop ) + if ( pCMS && pCMS->m_bStop ) return false; OSL_ENSURE( pCnt, "Crsr is gone to a Black hole" ); - if( pCMS && pCMS->pFill && pCnt->IsTextFrm() ) + if( pCMS && pCMS->m_pFill && pCnt->IsTextFrm() ) bTextRet = pCnt->GetCrsrOfst( &aTextPos, rPoint, pCMS ); else bTextRet = pCnt->GetCrsrOfst( &aTextPos, aPoint, pCMS ); @@ -279,7 +279,7 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, SwCrsrMoveState aMoveState; SwCrsrMoveState *const pState((pCMS) ? pCMS : &aMoveState); comphelper::FlagRestorationGuard g( - pState->bPosMatchesBounds, true); + pState->m_bPosMatchesBounds, true); SwPosition prevTextPos(*pPos); SwLayoutFrm::GetCrsrOfst(&prevTextPos, aPoint, pState); @@ -421,8 +421,8 @@ bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, const bool bOldAction = IsCallbackActionEnabled(); const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( false ); OSL_ENSURE( (Lower() && Lower()->IsPageFrm()), "No PageFrm found." ); - if( pCMS && pCMS->pFill ) - static_cast<SwCrsrMoveState*>(pCMS)->bFillRet = false; + if( pCMS && pCMS->m_pFill ) + static_cast<SwCrsrMoveState*>(pCMS)->m_bFillRet = false; Point aOldPoint = rPoint; // search for page containing rPoint. The borders around the pages are considered @@ -448,10 +448,10 @@ bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( bOldAction ); if( pCMS ) { - if( pCMS->bStop ) + if( pCMS->m_bStop ) return false; - if( pCMS->pFill ) - return pCMS->bFillRet; + if( pCMS->m_pFill ) + return pCMS->m_bFillRet; } return aOldPoint == rPoint; } @@ -470,16 +470,16 @@ bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, if ( !Lower() ) return false; - if ( !(pCMS && pCMS->bSetInReadOnly) && + if ( !(pCMS && pCMS->m_bSetInReadOnly) && GetFormat()->GetProtect().IsContentProtected() ) return false; - if ( pCMS && pCMS->eState == MV_TBLSEL ) + if ( pCMS && pCMS->m_eState == MV_TBLSEL ) { const SwTabFrm *pTab = FindTabFrm(); if ( pTab->IsFollow() && pTab->IsInHeadline( *this ) ) { - static_cast<SwCrsrMoveState*>(pCMS)->bStop = true; + static_cast<SwCrsrMoveState*>(pCMS)->m_bStop = true; return false; } } @@ -500,14 +500,14 @@ bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, if ( pFrm->Frm().IsInside( rPoint ) ) { bRet = pFrm->GetCrsrOfst( pPos, rPoint, pCMS ); - if ( pCMS && pCMS->bStop ) + if ( pCMS && pCMS->m_bStop ) return false; } pFrm = pFrm->GetNext(); } if ( !bRet ) { - const bool bFill = pCMS && pCMS->pFill; + const bool bFill = pCMS && pCMS->m_pFill; Point aPoint( rPoint ); const SwContentFrm *pCnt = GetContentPos( rPoint, true ); if( bFill && pCnt->IsTextFrm() ) @@ -545,7 +545,7 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, //If an Frm contains a graphic, but only text was requested, it basically //won't accept the Crsr. - if ( bInside && pCMS && pCMS->eState == MV_SETONLYTEXT && + if ( bInside && pCMS && pCMS->m_eState == MV_SETONLYTEXT && (!Lower() || Lower()->IsNoTextFrm()) ) bInside = false; @@ -566,7 +566,7 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, bRet = pFly->GetCrsrOfst( pPos, rPoint, pCMS ); if ( bRet ) break; - if ( pCMS && pCMS->bStop ) + if ( pCMS && pCMS->m_bStop ) return false; } aIter.Next(); @@ -582,17 +582,17 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, if ( pFrm->Frm().IsInside( rPoint ) ) { bRet = pFrm->GetCrsrOfst( pPos, rPoint, pCMS ); - if ( pCMS && pCMS->bStop ) + if ( pCMS && pCMS->m_bStop ) return false; } pFrm = pFrm->GetNext(); } if ( !bRet ) { - const bool bFill = pCMS && pCMS->pFill; + const bool bFill = pCMS && pCMS->m_pFill; Point aPoint( rPoint ); const SwContentFrm *pCnt = GetContentPos( rPoint, true, false, false, pCMS ); - if ( pCMS && pCMS->bStop ) + if ( pCMS && pCMS->m_bStop ) return false; if( bFill && pCnt->IsTextFrm() ) { @@ -1213,7 +1213,7 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, //we search the next Content which is not protected. const SwContentFrm *pComp = pContent; pContent = ::lcl_MissProtectedFrames( pContent, lcl_GetNxtCnt, false, - pCMS && pCMS->bSetInReadOnly, false ); + pCMS && pCMS->m_bSetInReadOnly, false ); if ( pComp != pContent ) continue; @@ -1322,12 +1322,12 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, OSL_ENSURE( !bBodyOnly || pActual->IsInDocBody(), "Content not in Body." ); //Special case for selecting tables not in repeated TableHeadlines. - if ( pActual->IsInTab() && pCMS && pCMS->eState == MV_TBLSEL ) + if ( pActual->IsInTab() && pCMS && pCMS->m_eState == MV_TBLSEL ) { const SwTabFrm *pTab = pActual->FindTabFrm(); if ( pTab->IsFollow() && pTab->IsInHeadline( *pActual ) ) { - const_cast<SwCrsrMoveState*>(pCMS)->bStop = true; + const_cast<SwCrsrMoveState*>(pCMS)->m_bStop = true; return 0; } } @@ -2116,19 +2116,19 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) } while( false ); SwCrsrMoveState aTmpState( MV_NONE ); - aTmpState.b2Lines = true; - aTmpState.bNoScroll = true; - aTmpState.nCursorBidiLevel = pStartFrm->IsRightToLeft() ? 1 : 0; + aTmpState.m_b2Lines = true; + aTmpState.m_bNoScroll = true; + aTmpState.m_nCursorBidiLevel = pStartFrm->IsRightToLeft() ? 1 : 0; //ContentRects to Start- and EndFrms. SwRect aStRect, aEndRect; pStartFrm->GetCharRect( aStRect, *pStartPos, &aTmpState ); - Sw2LinesPos *pSt2Pos = aTmpState.p2Lines; - aTmpState.p2Lines = NULL; - aTmpState.nCursorBidiLevel = pEndFrm->IsRightToLeft() ? 1 : 0; + Sw2LinesPos *pSt2Pos = aTmpState.m_p2Lines; + aTmpState.m_p2Lines = NULL; + aTmpState.m_nCursorBidiLevel = pEndFrm->IsRightToLeft() ? 1 : 0; pEndFrm->GetCharRect( aEndRect, *pEndPos, &aTmpState ); - Sw2LinesPos *pEnd2Pos = aTmpState.p2Lines; + Sw2LinesPos *pEnd2Pos = aTmpState.m_p2Lines; SwRect aStFrm ( pStartFrm->UnionFrm( true ) ); aStFrm.Intersection( pStartFrm->PaintArea() ); diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 282c6db673a4..81d17a0e953c 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -187,8 +187,8 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, // needs to be formatted // Optimisation: reading ahead saves us a GetAdjFrmAtPos - const bool bRightMargin = pCMS && ( MV_RIGHTMARGIN == pCMS->eState ); - const bool bNoScroll = pCMS && pCMS->bNoScroll; + const bool bRightMargin = pCMS && ( MV_RIGHTMARGIN == pCMS->m_eState ); + const bool bNoScroll = pCMS && pCMS->m_bNoScroll; SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), rPos, bRightMargin, bNoScroll ); pFrm->GetFormatted(); @@ -241,8 +241,8 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, if ( pCMS ) { - pCMS->aRealHeight.X() = 0; - pCMS->aRealHeight.Y() = bVert ? -rOrig.Width() : rOrig.Height(); + pCMS->m_aRealHeight.X() = 0; + pCMS->m_aRealHeight.Y() = bVert ? -rOrig.Width() : rOrig.Height(); } if ( pFrm->IsRightToLeft() ) @@ -297,30 +297,30 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, { if ( pFrm->IsRightToLeft() ) { - if( pCMS->b2Lines && pCMS->p2Lines) + if( pCMS->m_b2Lines && pCMS->m_p2Lines) { - pFrm->SwitchLTRtoRTL( pCMS->p2Lines->aLine ); - pFrm->SwitchLTRtoRTL( pCMS->p2Lines->aPortion ); + pFrm->SwitchLTRtoRTL( pCMS->m_p2Lines->aLine ); + pFrm->SwitchLTRtoRTL( pCMS->m_p2Lines->aPortion ); } } if ( bVert ) { - if ( pCMS->bRealHeight ) + if ( pCMS->m_bRealHeight ) { - pCMS->aRealHeight.Y() = -pCMS->aRealHeight.Y(); - if ( pCMS->aRealHeight.Y() < 0 ) + pCMS->m_aRealHeight.Y() = -pCMS->m_aRealHeight.Y(); + if ( pCMS->m_aRealHeight.Y() < 0 ) { // writing direction is from top to bottom - pCMS->aRealHeight.X() = ( rOrig.Width() - - pCMS->aRealHeight.X() + - pCMS->aRealHeight.Y() ); + pCMS->m_aRealHeight.X() = ( rOrig.Width() - + pCMS->m_aRealHeight.X() + + pCMS->m_aRealHeight.Y() ); } } - if( pCMS->b2Lines && pCMS->p2Lines) + if( pCMS->m_b2Lines && pCMS->m_p2Lines) { - pFrm->SwitchHorizontalToVertical( pCMS->p2Lines->aLine ); - pFrm->SwitchHorizontalToVertical( pCMS->p2Lines->aPortion ); + pFrm->SwitchHorizontalToVertical( pCMS->m_p2Lines->aLine ); + pFrm->SwitchHorizontalToVertical( pCMS->m_p2Lines->aPortion ); } } @@ -416,13 +416,13 @@ bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const SwTextSizeInfo aInf( pFrm ); SwTextCursor aLine( pFrm, &aInf ); SwCrsrMoveState aTmpState( MV_SETONLYTEXT ); - aTmpState.bRealHeight = true; + aTmpState.m_bRealHeight = true; if( aLine.GetCharRect( &rOrig, nOffset, &aTmpState, nMaxY ) ) { - if( aTmpState.aRealHeight.X() >= 0 ) + if( aTmpState.m_aRealHeight.X() >= 0 ) { - rOrig.Pos().Y() += aTmpState.aRealHeight.X(); - rOrig.Height( aTmpState.aRealHeight.Y() ); + rOrig.Pos().Y() += aTmpState.m_aRealHeight.X(); + rOrig.Height( aTmpState.m_aRealHeight.Y() ); } if ( pFrm->IsRightToLeft() ) @@ -526,16 +526,16 @@ struct SwFillData const Point& rPt ) : aFrm( rR ), pCMS( pC ), pPos( pP ), rPoint( rPt ), nLineWidth( 0 ), bFirstLine( true ), bInner( false ), bColumn( false ), bEmpty( true ){} - SwFillMode Mode() const { return pCMS->pFill->eMode; } + SwFillMode Mode() const { return pCMS->m_pFill->eMode; } long X() const { return rPoint.X(); } long Y() const { return rPoint.Y(); } long Left() const { return aFrm.Left(); } long Right() const { return aFrm.Right(); } long Bottom() const { return aFrm.Bottom(); } - SwFillCrsrPos &Fill() const { return *pCMS->pFill; } - void SetTab( sal_uInt16 nNew ) { pCMS->pFill->nTabCnt = nNew; } - void SetSpace( sal_uInt16 nNew ) { pCMS->pFill->nSpaceCnt = nNew; } - void SetOrient( const sal_Int16 eNew ){ pCMS->pFill->eOrient = eNew; } + SwFillCrsrPos &Fill() const { return *pCMS->m_pFill; } + void SetTab( sal_uInt16 nNew ) { pCMS->m_pFill->nTabCnt = nNew; } + void SetSpace( sal_uInt16 nNew ) { pCMS->m_pFill->nSpaceCnt = nNew; } + void SetOrient( const sal_Int16 eNew ){ pCMS->m_pFill->eOrient = eNew; } }; bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, @@ -560,7 +560,7 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, if ( IsRightToLeft() ) SwitchRTLtoLTR( (Point&)rPoint ); - SwFillData *pFillData = ( pCMS && pCMS->pFill ) ? + SwFillData *pFillData = ( pCMS && pCMS->m_pFill ) ? new SwFillData( pCMS, pPos, Frm(), rPoint ) : NULL; if ( IsEmpty() ) @@ -568,11 +568,11 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, SwTextNode* pTextNd = const_cast<SwTextFrm*>(this)->GetTextNode(); pPos->nNode = *pTextNd; pPos->nContent.Assign( pTextNd, 0 ); - if( pCMS && pCMS->bFieldInfo ) + if( pCMS && pCMS->m_bFieldInfo ) { SwTwips nDiff = rPoint.X() - Frm().Left() - Prt().Left(); if( nDiff > 50 || nDiff < 0 ) - pCMS->bPosCorr = true; + pCMS->m_bPosCorr = true; } } else @@ -596,8 +596,8 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, sal_Int32 nOffset = aLine.GetCrsrOfst( pPos, rPoint, bChgFrm, pCMS ); - if( pCMS && pCMS->eState == MV_NONE && aLine.GetEnd() == nOffset ) - pCMS->eState = MV_RIGHTMARGIN; + if( pCMS && pCMS->m_eState == MV_NONE && aLine.GetEnd() == nOffset ) + pCMS->m_eState = MV_RIGHTMARGIN; // pPos is a pure IN parameter and must not be evaluated. // pIter->GetCrsrOfst returns from a nesting with COMPLETE_STRING. @@ -640,7 +640,7 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, if ( IsRightToLeft() && bChgFillData ) { SwitchLTRtoRTL( pFillData->Fill().aCrsr.Pos() ); - const sal_Int16 eOrient = pFillData->pCMS->pFill->eOrient; + const sal_Int16 eOrient = pFillData->pCMS->m_pFill->eOrient; if ( text::HoriOrientation::LEFT == eOrient ) pFillData->SetOrient( text::HoriOrientation::RIGHT ); @@ -657,7 +657,7 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, bool SwTextFrm::GetCrsrOfst(SwPosition* pPos, Point& rPoint, SwCrsrMoveState* pCMS, bool ) const { - const bool bChgFrm = !(pCMS && MV_UPDOWN == pCMS->eState); + const bool bChgFrm = !(pCMS && MV_UPDOWN == pCMS->m_eState); return _GetCrsrOfst( pPos, rPoint, bChgFrm, pCMS ); } @@ -1662,7 +1662,7 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const rRect.Width( 1 ); } } - const_cast<SwCrsrMoveState*>(rFill.pCMS)->bFillRet = bFill; + const_cast<SwCrsrMoveState*>(rFill.pCMS)->m_bFillRet = bFill; delete pFnt; } diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index 071acfe29d05..852044e85d35 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -59,11 +59,11 @@ static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig, const SwCrsrMoveState& rCMS, const SwLinePortion& rPor ) { - OSL_ENSURE( rCMS.pSpecialPos, "Information about special pos missing" ); + OSL_ENSURE( rCMS.m_pSpecialPos, "Information about special pos missing" ); if ( rPor.InFieldGrp() && !static_cast<const SwFieldPortion&>(rPor).GetExp().isEmpty() ) { - const sal_Int32 nCharOfst = rCMS.pSpecialPos->nCharOfst; + const sal_Int32 nCharOfst = rCMS.m_pSpecialPos->nCharOfst; sal_Int32 nFieldIdx = 0; sal_Int32 nFieldLen = 0; @@ -108,7 +108,7 @@ static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig, 0; SwTwips nX2 = 0; - if ( rCMS.bRealWidth ) + if ( rCMS.m_bRealWidth ) { const_cast<SwLinePortion*>(pPor)->SetLen( nLen ); nX2 = pPor->GetTextSize( rInf ).Width(); @@ -126,7 +126,7 @@ static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig, { // special cases: no common fields, e.g., graphic number portion, // FlyInCntPortions, Notes - rOrig.Width( rCMS.bRealWidth && rPor.Width() ? rPor.Width() : 1 ); + rOrig.Width( rCMS.m_bRealWidth && rPor.Width() ? rPor.Width() : 1 ); } } @@ -452,14 +452,14 @@ bool SwTextCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst, if( pOrig->Left() > nTmpRight ) pOrig->Pos().X() = nTmpRight; - if ( pCMS && pCMS->bRealHeight ) + if ( pCMS && pCMS->m_bRealHeight ) { if ( nTmpAscent > nPorAscent ) - pCMS->aRealHeight.X() = nTmpAscent - nPorAscent; + pCMS->m_aRealHeight.X() = nTmpAscent - nPorAscent; else - pCMS->aRealHeight.X() = 0; + pCMS->m_aRealHeight.X() = 0; OSL_ENSURE( nPorHeight, "GetCharRect: Missing Portion-Height" ); - pCMS->aRealHeight.Y() = nPorHeight; + pCMS->m_aRealHeight.Y() = nPorHeight; } return true; @@ -488,18 +488,18 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, // If we are looking for a position inside a field which covers // more than one line we may not skip any "empty portions" at the // beginning of a line - const bool bInsideFirstField = pCMS && pCMS->pSpecialPos && - ( pCMS->pSpecialPos->nLineOfst || + const bool bInsideFirstField = pCMS && pCMS->m_pSpecialPos && + ( pCMS->m_pSpecialPos->nLineOfst || SwSPExtendRange::BEFORE == - pCMS->pSpecialPos->nExtendRange ); + pCMS->m_pSpecialPos->nExtendRange ); - bool bWidth = pCMS && pCMS->bRealWidth; + bool bWidth = pCMS && pCMS->m_bRealWidth; if( !pCurr->GetLen() && !pCurr->Width() ) { - if ( pCMS && pCMS->bRealHeight ) + if ( pCMS && pCMS->m_bRealHeight ) { - pCMS->aRealHeight.X() = 0; - pCMS->aRealHeight.Y() = nTmpHeight; + pCMS->m_aRealHeight.X() = 0; + pCMS->m_aRealHeight.Y() = nTmpHeight; } } else @@ -670,28 +670,28 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, GetInfo().SetMulti( true ); pOrig->Pos().Y() += nTmpAscent - nPorAscent; - if( pCMS && pCMS->b2Lines ) + if( pCMS && pCMS->m_b2Lines ) { - const bool bRecursion = pCMS->p2Lines; + const bool bRecursion = pCMS->m_p2Lines; if ( !bRecursion ) { - pCMS->p2Lines = new Sw2LinesPos; - pCMS->p2Lines->aLine = SwRect(aCharPos, aCharSize); + pCMS->m_p2Lines = new Sw2LinesPos; + pCMS->m_p2Lines->aLine = SwRect(aCharPos, aCharSize); } if( static_cast<SwMultiPortion*>(pPor)->HasRotation() ) { if( static_cast<SwMultiPortion*>(pPor)->IsRevers() ) - pCMS->p2Lines->nMultiType = MultiPortionType::ROT_270; + pCMS->m_p2Lines->nMultiType = MultiPortionType::ROT_270; else - pCMS->p2Lines->nMultiType = MultiPortionType::ROT_90; + pCMS->m_p2Lines->nMultiType = MultiPortionType::ROT_90; } else if( static_cast<SwMultiPortion*>(pPor)->IsDouble() ) - pCMS->p2Lines->nMultiType = MultiPortionType::TWOLINE; + pCMS->m_p2Lines->nMultiType = MultiPortionType::TWOLINE; else if( static_cast<SwMultiPortion*>(pPor)->IsBidi() ) - pCMS->p2Lines->nMultiType = MultiPortionType::BIDI; + pCMS->m_p2Lines->nMultiType = MultiPortionType::BIDI; else - pCMS->p2Lines->nMultiType = MultiPortionType::RUBY; + pCMS->m_p2Lines->nMultiType = MultiPortionType::RUBY; SwTwips nTmpWidth = pPor->Width(); if( nSpaceAdd ) @@ -701,9 +701,9 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, Size( nTmpWidth, pPor->Height() ) ); if ( ! bRecursion ) - pCMS->p2Lines->aPortion = aRect; + pCMS->m_p2Lines->aPortion = aRect; else - pCMS->p2Lines->aPortion2 = aRect; + pCMS->m_p2Lines->aPortion2 = aRect; } // In a multi-portion we use GetCharRect()-function @@ -826,9 +826,9 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, else pOrig->Pos().Y() = aOldPos.Y() + pPor->Height() - nTmp - pOrig->Height(); - if ( pCMS && pCMS->bRealHeight ) + if ( pCMS && pCMS->m_bRealHeight ) { - pCMS->aRealHeight.Y() = -pCMS->aRealHeight.Y(); + pCMS->m_aRealHeight.Y() = -pCMS->m_aRealHeight.Y(); // result for rotated multi portion is not // correct for reverse (270 degree) portions if( static_cast<SwMultiPortion*>(pPor)->IsRevers() ) @@ -838,14 +838,14 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, // if vertical alignment is set to auto, // we switch from base line alignment // to centered alignment - pCMS->aRealHeight.X() = + pCMS->m_aRealHeight.X() = ( pOrig->Width() + - pCMS->aRealHeight.Y() ) / 2; + pCMS->m_aRealHeight.Y() ) / 2; else - pCMS->aRealHeight.X() = + pCMS->m_aRealHeight.X() = ( pOrig->Width() - - pCMS->aRealHeight.X() + - pCMS->aRealHeight.Y() ); + pCMS->m_aRealHeight.X() + + pCMS->m_aRealHeight.Y() ); } } } @@ -1037,7 +1037,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, } if( pPor && pCMS ) { - if( pCMS->bFieldInfo && pPor->InFieldGrp() && pPor->Width() ) + if( pCMS->m_bFieldInfo && pPor->InFieldGrp() && pPor->Width() ) pOrig->Width( pPor->Width() ); if( pPor->IsDropPortion() ) { @@ -1091,7 +1091,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, } // travel inside field portion? - if ( pCMS->pSpecialPos ) + if ( pCMS->m_pSpecialPos ) { // apply attributes to font Seek( nOfst ); @@ -1114,7 +1114,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, { const sal_uInt8 nPortionLevel = pLastBidiPor->GetLevel(); - if ( pCMS->nCursorBidiLevel >= nPortionLevel ) + if ( pCMS->m_nCursorBidiLevel >= nPortionLevel ) { // we came from inside the bidi portion, we want to blink // behind the portion @@ -1141,7 +1141,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, { const sal_uInt8 nPortionLevel = static_cast<SwBidiPortion*>(pPor)->GetLevel(); - if ( pCMS->nCursorBidiLevel >= nPortionLevel ) + if ( pCMS->m_nCursorBidiLevel >= nPortionLevel ) { // we came from inside the bidi portion, we want to blink // behind the portion @@ -1153,18 +1153,18 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, pOrig->Pos().X() += nX; - if ( pCMS && pCMS->bRealHeight ) + if ( pCMS && pCMS->m_bRealHeight ) { nTmpAscent = AdjustBaseLine( *pCurr, 0, nPorHeight, nPorAscent ); if ( nTmpAscent > nPorAscent ) - pCMS->aRealHeight.X() = nTmpAscent - nPorAscent; + pCMS->m_aRealHeight.X() = nTmpAscent - nPorAscent; else - pCMS->aRealHeight.X() = 0; + pCMS->m_aRealHeight.X() = 0; OSL_ENSURE( nPorHeight, "GetCharRect: Missing Portion-Height" ); if ( nTmpHeight > nPorHeight ) - pCMS->aRealHeight.Y() = nPorHeight; + pCMS->m_aRealHeight.Y() = nPorHeight; else - pCMS->aRealHeight.Y() = nTmpHeight; + pCMS->m_aRealHeight.Y() = nTmpHeight; } } } @@ -1176,14 +1176,14 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, // Indicates that a position inside a special portion (field, number portion) // is requested. - const bool bSpecialPos = pCMS && pCMS->pSpecialPos; + const bool bSpecialPos = pCMS && pCMS->m_pSpecialPos; sal_Int32 nFindOfst = nOfst; if ( bSpecialPos ) { - const SwSPExtendRange nExtendRange = pCMS->pSpecialPos->nExtendRange; + const SwSPExtendRange nExtendRange = pCMS->m_pSpecialPos->nExtendRange; - OSL_ENSURE( ! pCMS->pSpecialPos->nLineOfst || SwSPExtendRange::BEFORE != nExtendRange, + OSL_ENSURE( ! pCMS->m_pSpecialPos->nLineOfst || SwSPExtendRange::BEFORE != nExtendRange, "LineOffset AND Number Portion?" ); // portions which are behind the string @@ -1191,7 +1191,7 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, ++nFindOfst; // skip lines for fields which cover more than one line - for ( sal_uInt16 i = 0; i < pCMS->pSpecialPos->nLineOfst; i++ ) + for ( sal_uInt16 i = 0; i < pCMS->m_pSpecialPos->nLineOfst; i++ ) Next(); } @@ -1210,12 +1210,12 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, pOrig->Pos().X() += aCharPos.X(); pOrig->Pos().Y() += aCharPos.Y(); - if( pCMS && pCMS->b2Lines && pCMS->p2Lines ) + if( pCMS && pCMS->m_b2Lines && pCMS->m_p2Lines ) { - pCMS->p2Lines->aLine.Pos().X() += aCharPos.X(); - pCMS->p2Lines->aLine.Pos().Y() += aCharPos.Y(); - pCMS->p2Lines->aPortion.Pos().X() += aCharPos.X(); - pCMS->p2Lines->aPortion.Pos().Y() += aCharPos.Y(); + pCMS->m_p2Lines->aLine.Pos().X() += aCharPos.X(); + pCMS->m_p2Lines->aLine.Pos().Y() += aCharPos.Y(); + pCMS->m_p2Lines->aPortion.Pos().X() += aCharPos.X(); + pCMS->m_p2Lines->aPortion.Pos().Y() += aCharPos.Y(); } const bool bTabOverMargin = GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN); @@ -1231,16 +1231,16 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, pOrig->Top( nMax ); pOrig->Height( nMax - pOrig->Top() ); } - if ( pCMS && pCMS->bRealHeight && pCMS->aRealHeight.Y() >= 0 ) + if ( pCMS && pCMS->m_bRealHeight && pCMS->m_aRealHeight.Y() >= 0 ) { - long nTmp = pCMS->aRealHeight.X() + pOrig->Top(); + long nTmp = pCMS->m_aRealHeight.X() + pOrig->Top(); if( nTmp >= nMax ) { - pCMS->aRealHeight.X() = nMax - pOrig->Top(); - pCMS->aRealHeight.Y() = 0; + pCMS->m_aRealHeight.X() = nMax - pOrig->Top(); + pCMS->m_aRealHeight.Y() = 0; } - else if( nTmp + pCMS->aRealHeight.Y() > nMax ) - pCMS->aRealHeight.Y() = nMax - nTmp; + else if( nTmp + pCMS->m_aRealHeight.Y() > nMax ) + pCMS->m_aRealHeight.Y() = nMax - nTmp; } } long nOut = pOrig->Right() - GetTextFrm()->Frm().Right(); @@ -1281,7 +1281,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, if( bRightOver ) x = nRightMargin; - const bool bRightAllowed = pCMS && ( pCMS->eState == MV_NONE ); + const bool bRightAllowed = pCMS && ( pCMS->m_eState == MV_NONE ); // Until here everything in document coordinates. x -= nLeftMargin; @@ -1409,21 +1409,21 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, sal_Int32 nLength = pPor->GetLen(); - const bool bFieldInfo = pCMS && pCMS->bFieldInfo; + const bool bFieldInfo = pCMS && pCMS->m_bFieldInfo; if( bFieldInfo && ( nWidth30 < nX || bRightOver || bLeftOver || ( pPor->InNumberGrp() && !pPor->IsFootnoteNumPortion() ) || ( pPor->IsMarginPortion() && nWidth > nX + 30 ) ) ) - static_cast<SwCrsrMoveState*>(pCMS)->bPosCorr = true; + static_cast<SwCrsrMoveState*>(pCMS)->m_bPosCorr = true; // #i27615# if (pCMS) { - if( pCMS->bInFrontOfLabel) + if( pCMS->m_bInFrontOfLabel) { if (! (2 * nX < nWidth && pPor->InNumberGrp() && !pPor->IsFootnoteNumPortion())) - pCMS->bInFrontOfLabel = false; + pCMS->m_bInFrontOfLabel = false; } } @@ -1435,16 +1435,16 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, if( pCMS ) { if( pPor->IsFlyPortion() && bFieldInfo ) - static_cast<SwCrsrMoveState*>(pCMS)->bPosCorr = true; + static_cast<SwCrsrMoveState*>(pCMS)->m_bPosCorr = true; if (!bRightOver && nX) { if( pPor->IsFootnoteNumPortion()) - static_cast<SwCrsrMoveState*>(pCMS)->bFootnoteNoInfo = true; + static_cast<SwCrsrMoveState*>(pCMS)->m_bFootnoteNoInfo = true; else if (pPor->InNumberGrp() ) // #i23726# { - static_cast<SwCrsrMoveState*>(pCMS)->nInNumPostionOffset = nX; - static_cast<SwCrsrMoveState*>(pCMS)->bInNumPortion = true; + static_cast<SwCrsrMoveState*>(pCMS)->m_nInNumPostionOffset = nX; + static_cast<SwCrsrMoveState*>(pCMS)->m_bInNumPortion = true; } } } @@ -1509,7 +1509,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, ++nCurrStart; // if we want to get the position inside the field, we should not return - if ( !pCMS || !pCMS->pSpecialPos ) + if ( !pCMS || !pCMS->m_pSpecialPos ) return nCurrStart; } } @@ -1656,14 +1656,14 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, 0 ); } - if ( pPor->InFieldGrp() && pCMS && pCMS->pSpecialPos ) + if ( pPor->InFieldGrp() && pCMS && pCMS->m_pSpecialPos ) aDrawInf.SetLen( COMPLETE_STRING ); aDrawInf.SetSpace( nSpaceAdd ); aDrawInf.SetFont( aSizeInf.GetFont() ); aDrawInf.SetFrm( pFrm ); aDrawInf.SetSnapToGrid( aSizeInf.SnapToGrid() ); - aDrawInf.SetPosMatchesBounds( pCMS && pCMS->bPosMatchesBounds ); + aDrawInf.SetPosMatchesBounds( pCMS && pCMS->m_bPosMatchesBounds ); if ( SW_CJK == aSizeInf.GetFont()->GetActual() && pPara->GetScriptInfo().CountCompChg() && @@ -1673,15 +1673,15 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, nLength = aSizeInf.GetFont()->_GetCrsrOfst( aDrawInf ); // get position inside field portion? - if ( pPor->InFieldGrp() && pCMS && pCMS->pSpecialPos ) + if ( pPor->InFieldGrp() && pCMS && pCMS->m_pSpecialPos ) { - pCMS->pSpecialPos->nCharOfst = nLength; + pCMS->m_pSpecialPos->nCharOfst = nLength; nLength = 0; } // set cursor bidi level if ( pCMS ) - static_cast<SwCrsrMoveState*>(pCMS)->nCursorBidiLevel = + static_cast<SwCrsrMoveState*>(pCMS)->m_nCursorBidiLevel = aDrawInf.GetCursorBidiLevel(); if( bFieldInfo && nLength == pPor->GetLen() && diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 0b2b1569ce44..c858d7a7bb2e 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -186,10 +186,10 @@ static SwRect lcl_CalculateRepaintRect( SwTextFrm& rTextFrm, sal_Int32 nChgStart SwNodeIndex aNdIdx( *pNode ); SwPosition aPos( aNdIdx, SwIndex( pNode, nChgEnd ) ); SwCrsrMoveState aTmpState( MV_NONE ); - aTmpState.b2Lines = true; + aTmpState.m_b2Lines = true; rTextFrm.GetCharRect( aRect, aPos, &aTmpState ); // information about end of repaint area - Sw2LinesPos* pEnd2Pos = aTmpState.p2Lines; + Sw2LinesPos* pEnd2Pos = aTmpState.m_p2Lines; const SwTextFrm *pEndFrm = &rTextFrm; @@ -211,7 +211,7 @@ static SwRect lcl_CalculateRepaintRect( SwTextFrm& rTextFrm, sal_Int32 nChgStart delete pEnd2Pos; } - aTmpState.p2Lines = NULL; + aTmpState.m_p2Lines = NULL; SwRect aTmp; aPos = SwPosition( aNdIdx, SwIndex( pNode, nChgStart ) ); rTextFrm.GetCharRect( aTmp, aPos, &aTmpState ); @@ -229,7 +229,7 @@ static SwRect lcl_CalculateRepaintRect( SwTextFrm& rTextFrm, sal_Int32 nChgStart pEndFrm = pEndFrm->GetFollow(); // information about start of repaint area - Sw2LinesPos* pSt2Pos = aTmpState.p2Lines; + Sw2LinesPos* pSt2Pos = aTmpState.m_p2Lines; if ( pSt2Pos ) { // we are inside a special portion, take right border |