SwTxtSizeInfo: rename member variables missing their prefix

Conflicts:
	sw/source/core/text/inftxt.hxx

Change-Id: I32a430c35d69308f87b7b6f1b4ef232315deed2f
This commit is contained in:
Miklos Vajna
2013-05-02 21:53:04 +02:00
parent 8f891ad025
commit 6b9f437ee7
4 changed files with 284 additions and 284 deletions

View File

@@ -203,32 +203,32 @@ inline sal_Int32 GetMinLen( const SwTxtSizeInfo &rInf )
SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew ) SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew )
: SwTxtInfo( rNew ), : SwTxtInfo( rNew ),
pKanaComp(((SwTxtSizeInfo&)rNew).GetpKanaComp()), m_pKanaComp(((SwTxtSizeInfo&)rNew).GetpKanaComp()),
pVsh(((SwTxtSizeInfo&)rNew).GetVsh()), m_pVsh(((SwTxtSizeInfo&)rNew).GetVsh()),
pOut(((SwTxtSizeInfo&)rNew).GetOut()), m_pOut(((SwTxtSizeInfo&)rNew).GetOut()),
pRef(((SwTxtSizeInfo&)rNew).GetRefDev()), m_pRef(((SwTxtSizeInfo&)rNew).GetRefDev()),
pFnt(((SwTxtSizeInfo&)rNew).GetFont()), m_pFnt(((SwTxtSizeInfo&)rNew).GetFont()),
pUnderFnt(((SwTxtSizeInfo&)rNew).GetUnderFnt()), m_pUnderFnt(((SwTxtSizeInfo&)rNew).GetUnderFnt()),
pFrm(rNew.pFrm), m_pFrm(rNew.m_pFrm),
pOpt(&rNew.GetOpt()), m_pOpt(&rNew.GetOpt()),
pTxt(&rNew.GetTxt()), m_pTxt(&rNew.GetTxt()),
nIdx(rNew.GetIdx()), m_nIdx(rNew.GetIdx()),
nLen(rNew.GetLen()), m_nLen(rNew.GetLen()),
nKanaIdx( rNew.GetKanaIdx() ), m_nKanaIdx( rNew.GetKanaIdx() ),
bOnWin( rNew.OnWin() ), m_bOnWin( rNew.OnWin() ),
bNotEOL( rNew.NotEOL() ), m_bNotEOL( rNew.NotEOL() ),
bURLNotify( rNew.URLNotify() ), m_bURLNotify( rNew.URLNotify() ),
bStopUnderFlow( rNew.StopUnderFlow() ), m_bStopUnderFlow( rNew.StopUnderFlow() ),
bFtnInside( rNew.IsFtnInside() ), m_bFtnInside( rNew.IsFtnInside() ),
bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ), m_bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ),
bMulti( rNew.IsMulti() ), m_bMulti( rNew.IsMulti() ),
bFirstMulti( rNew.IsFirstMulti() ), m_bFirstMulti( rNew.IsFirstMulti() ),
bRuby( rNew.IsRuby() ), m_bRuby( rNew.IsRuby() ),
bHanging( rNew.IsHanging() ), m_bHanging( rNew.IsHanging() ),
bScriptSpace( rNew.HasScriptSpace() ), m_bScriptSpace( rNew.HasScriptSpace() ),
bForbiddenChars( rNew.HasForbiddenChars() ), m_bForbiddenChars( rNew.HasForbiddenChars() ),
bSnapToGrid( rNew.SnapToGrid() ), m_bSnapToGrid( rNew.SnapToGrid() ),
nDirection( rNew.GetDirection() ) m_nDirection( rNew.GetDirection() )
{ {
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
ChkOutDev( *this ); ChkOutDev( *this );
@@ -238,19 +238,19 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew )
void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt, void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
const xub_StrLen nNewIdx, const xub_StrLen nNewLen ) const xub_StrLen nNewIdx, const xub_StrLen nNewLen )
{ {
pKanaComp = NULL; m_pKanaComp = NULL;
nKanaIdx = 0; m_nKanaIdx = 0;
pFrm = pFrame; m_pFrm = pFrame;
CtorInitTxtInfo( pFrm ); CtorInitTxtInfo( m_pFrm );
const SwTxtNode *pNd = pFrm->GetTxtNode(); const SwTxtNode *pNd = m_pFrm->GetTxtNode();
pVsh = pFrm->getRootFrm()->GetCurrShell(); m_pVsh = m_pFrm->getRootFrm()->GetCurrShell();
// Get the output and reference device // Get the output and reference device
if ( pVsh ) if ( m_pVsh )
{ {
pOut = pVsh->GetOut(); m_pOut = m_pVsh->GetOut();
pRef = &pVsh->GetRefDev(); m_pRef = &m_pVsh->GetRefDev();
bOnWin = pVsh->GetWin() || OUTDEV_WINDOW == pOut->GetOutDevType(); m_bOnWin = m_pVsh->GetWin() || OUTDEV_WINDOW == m_pOut->GetOutDevType();
} }
else else
{ {
@@ -258,12 +258,12 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
if ( pNd->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) ) if ( pNd->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) )
{ {
// We can only pick the AppWin here? (there's nothing better to pick?) // We can only pick the AppWin here? (there's nothing better to pick?)
pOut = GetpApp()->GetDefaultDevice(); m_pOut = GetpApp()->GetDefaultDevice();
} }
else else
pOut = pNd->getIDocumentDeviceAccess()->getPrinter( false ); m_pOut = pNd->getIDocumentDeviceAccess()->getPrinter( false );
pRef = pOut; m_pRef = m_pOut;
} }
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
@@ -271,76 +271,76 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
#endif #endif
// Set default layout mode ( LTR or RTL ). // Set default layout mode ( LTR or RTL ).
if ( pFrm->IsRightToLeft() ) if ( m_pFrm->IsRightToLeft() )
{ {
pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL ); m_pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL );
pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL ); m_pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL );
nDirection = DIR_RIGHT2LEFT; m_nDirection = DIR_RIGHT2LEFT;
} }
else else
{ {
pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG ); m_pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG );
pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG ); m_pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG );
nDirection = DIR_LEFT2RIGHT; m_nDirection = DIR_LEFT2RIGHT;
} }
// //
// The Options // The Options
// //
pOpt = pVsh ? m_pOpt = m_pVsh ?
pVsh->GetViewOptions() : m_pVsh->GetViewOptions() :
SW_MOD()->GetViewOption( pNd->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) ); // Options from Module, due to StarONE SW_MOD()->GetViewOption( pNd->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) ); // Options from Module, due to StarONE
// bURLNotify is set if MakeGraphic prepares it // bURLNotify is set if MakeGraphic prepares it
// TODO: Unwind // TODO: Unwind
bURLNotify = pNoteURL && !bOnWin; m_bURLNotify = pNoteURL && !m_bOnWin;
SetSnapToGrid( pNd->GetSwAttrSet().GetParaGrid().GetValue() && SetSnapToGrid( pNd->GetSwAttrSet().GetParaGrid().GetValue() &&
pFrm->IsInDocBody() ); m_pFrm->IsInDocBody() );
pFnt = pNewFnt; m_pFnt = pNewFnt;
pUnderFnt = 0; m_pUnderFnt = 0;
pTxt = &pNd->GetTxt(); m_pTxt = &pNd->GetTxt();
nIdx = nNewIdx; m_nIdx = nNewIdx;
nLen = nNewLen; m_nLen = nNewLen;
bNotEOL = false; m_bNotEOL = false;
bStopUnderFlow = bFtnInside = bOtherThanFtnInside = false; m_bStopUnderFlow = m_bFtnInside = m_bOtherThanFtnInside = false;
bMulti = bFirstMulti = bRuby = bHanging = bScriptSpace = m_bMulti = m_bFirstMulti = m_bRuby = m_bHanging = m_bScriptSpace =
bForbiddenChars = false; m_bForbiddenChars = false;
SetLen( GetMinLen( *this ) ); SetLen( GetMinLen( *this ) );
} }
SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const OUString* pTxt_, SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const OUString* pTxt,
const sal_Int32 nIndex, const xub_StrLen nLength ) const sal_Int32 nIndex, const xub_StrLen nLength )
: SwTxtInfo( rNew ), : SwTxtInfo( rNew ),
pKanaComp(((SwTxtSizeInfo&)rNew).GetpKanaComp()), m_pKanaComp(((SwTxtSizeInfo&)rNew).GetpKanaComp()),
pVsh(((SwTxtSizeInfo&)rNew).GetVsh()), m_pVsh(((SwTxtSizeInfo&)rNew).GetVsh()),
pOut(((SwTxtSizeInfo&)rNew).GetOut()), m_pOut(((SwTxtSizeInfo&)rNew).GetOut()),
pRef(((SwTxtSizeInfo&)rNew).GetRefDev()), m_pRef(((SwTxtSizeInfo&)rNew).GetRefDev()),
pFnt(((SwTxtSizeInfo&)rNew).GetFont()), m_pFnt(((SwTxtSizeInfo&)rNew).GetFont()),
pUnderFnt(((SwTxtSizeInfo&)rNew).GetUnderFnt()), m_pUnderFnt(((SwTxtSizeInfo&)rNew).GetUnderFnt()),
pFrm( rNew.pFrm ), m_pFrm( rNew.m_pFrm ),
pOpt(&rNew.GetOpt()), m_pOpt(&rNew.GetOpt()),
pTxt(pTxt_), m_pTxt(pTxt),
nIdx(nIndex), m_nIdx(nIndex),
nLen(nLength), m_nLen(nLength),
nKanaIdx( rNew.GetKanaIdx() ), m_nKanaIdx( rNew.GetKanaIdx() ),
bOnWin( rNew.OnWin() ), m_bOnWin( rNew.OnWin() ),
bNotEOL( rNew.NotEOL() ), m_bNotEOL( rNew.NotEOL() ),
bURLNotify( rNew.URLNotify() ), m_bURLNotify( rNew.URLNotify() ),
bStopUnderFlow( rNew.StopUnderFlow() ), m_bStopUnderFlow( rNew.StopUnderFlow() ),
bFtnInside( rNew.IsFtnInside() ), m_bFtnInside( rNew.IsFtnInside() ),
bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ), m_bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ),
bMulti( rNew.IsMulti() ), m_bMulti( rNew.IsMulti() ),
bFirstMulti( rNew.IsFirstMulti() ), m_bFirstMulti( rNew.IsFirstMulti() ),
bRuby( rNew.IsRuby() ), m_bRuby( rNew.IsRuby() ),
bHanging( rNew.IsHanging() ), m_bHanging( rNew.IsHanging() ),
bScriptSpace( rNew.HasScriptSpace() ), m_bScriptSpace( rNew.HasScriptSpace() ),
bForbiddenChars( rNew.HasForbiddenChars() ), m_bForbiddenChars( rNew.HasForbiddenChars() ),
bSnapToGrid( rNew.SnapToGrid() ), m_bSnapToGrid( rNew.SnapToGrid() ),
nDirection( rNew.GetDirection() ) m_nDirection( rNew.GetDirection() )
{ {
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
ChkOutDev( *this ); ChkOutDev( *this );
@@ -354,7 +354,7 @@ void SwTxtSizeInfo::SelectFont()
// In this case pLastMet has it's old value. // In this case pLastMet has it's old value.
// Wrong: GetOut()->SetFont( GetFont()->GetFnt() ); // Wrong: GetOut()->SetFont( GetFont()->GetFnt() );
GetFont()->Invalidate(); GetFont()->Invalidate();
GetFont()->ChgPhysFnt( pVsh, *GetOut() ); GetFont()->ChgPhysFnt( m_pVsh, *GetOut() );
} }
void SwTxtSizeInfo::NoteAnimation() const void SwTxtSizeInfo::NoteAnimation() const
@@ -362,8 +362,8 @@ void SwTxtSizeInfo::NoteAnimation() const
if( OnWin() ) if( OnWin() )
SwRootFrm::FlushVout(); SwRootFrm::FlushVout();
OSL_ENSURE( pOut == pVsh->GetOut(), OSL_ENSURE( m_pOut == m_pVsh->GetOut(),
"SwTxtSizeInfo::NoteAnimation() changed pOut" ); "SwTxtSizeInfo::NoteAnimation() changed m_pOut" );
} }
SwPosSize SwTxtSizeInfo::GetTxtSize( OutputDevice* pOutDev, SwPosSize SwTxtSizeInfo::GetTxtSize( OutputDevice* pOutDev,
@@ -373,12 +373,12 @@ SwPosSize SwTxtSizeInfo::GetTxtSize( OutputDevice* pOutDev,
const xub_StrLen nLength, const xub_StrLen nLength,
const sal_uInt16 nComp ) const const sal_uInt16 nComp ) const
{ {
SwDrawTextInfo aDrawInf( pVsh, *pOutDev, pSI, rTxt, nIndex, nLength ); SwDrawTextInfo aDrawInf( m_pVsh, *pOutDev, pSI, rTxt, nIndex, nLength );
aDrawInf.SetFrm( pFrm ); aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetFont( pFnt ); aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp ); aDrawInf.SetKanaComp( nComp );
SwPosSize aSize = pFnt->_GetTxtSize( aDrawInf ); SwPosSize aSize = m_pFnt->_GetTxtSize( aDrawInf );
return aSize; return aSize;
} }
@@ -395,24 +395,24 @@ SwPosSize SwTxtSizeInfo::GetTxtSize() const
GetKanaComp() : GetKanaComp() :
0 ; 0 ;
SwDrawTextInfo aDrawInf( pVsh, *pOut, &rSI, *pTxt, nIdx, nLen ); SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rSI, *m_pTxt, m_nIdx, m_nLen );
aDrawInf.SetFrm( pFrm ); aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetFont( pFnt ); aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp ); aDrawInf.SetKanaComp( nComp );
return pFnt->_GetTxtSize( aDrawInf ); return m_pFnt->_GetTxtSize( aDrawInf );
} }
void SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIndex, void SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIndex,
const xub_StrLen nLength, const sal_uInt16 nComp, const xub_StrLen nLength, const sal_uInt16 nComp,
sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff ) const sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff ) const
{ {
SwDrawTextInfo aDrawInf( pVsh, *pOut, pSI, *pTxt, nIndex, nLength ); SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, pSI, *m_pTxt, nIndex, nLength );
aDrawInf.SetFrm( pFrm ); aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetFont( pFnt ); aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp ); aDrawInf.SetKanaComp( nComp );
SwPosSize aSize = pFnt->_GetTxtSize( aDrawInf ); SwPosSize aSize = m_pFnt->_GetTxtSize( aDrawInf );
nMaxSizeDiff = (sal_uInt16)aDrawInf.GetKanaDiff(); nMaxSizeDiff = (sal_uInt16)aDrawInf.GetKanaDiff();
nMinSize = aSize.Width(); nMinSize = aSize.Width();
} }
@@ -424,16 +424,16 @@ xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
const SwScriptInfo& rScriptInfo = const SwScriptInfo& rScriptInfo =
( (SwParaPortion*)GetParaPortion() )->GetScriptInfo(); ( (SwParaPortion*)GetParaPortion() )->GetScriptInfo();
OSL_ENSURE( pRef == pOut, "GetTxtBreak is supposed to use the RefDev" ); OSL_ENSURE( m_pRef == m_pOut, "GetTxtBreak is supposed to use the RefDev" );
SwDrawTextInfo aDrawInf( pVsh, *pOut, &rScriptInfo, SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rScriptInfo,
*pTxt, GetIdx(), nMaxLen ); *m_pTxt, GetIdx(), nMaxLen );
aDrawInf.SetFrm( pFrm ); aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetFont( pFnt ); aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp ); aDrawInf.SetKanaComp( nComp );
aDrawInf.SetHyphPos( 0 ); aDrawInf.SetHyphPos( 0 );
return pFnt->GetTxtBreak( aDrawInf, nLineWidth ); return m_pFnt->GetTxtBreak( aDrawInf, nLineWidth );
} }
xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth, xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
@@ -444,16 +444,16 @@ xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
const SwScriptInfo& rScriptInfo = const SwScriptInfo& rScriptInfo =
( (SwParaPortion*)GetParaPortion() )->GetScriptInfo(); ( (SwParaPortion*)GetParaPortion() )->GetScriptInfo();
OSL_ENSURE( pRef == pOut, "GetTxtBreak is supposed to use the RefDev" ); OSL_ENSURE( m_pRef == m_pOut, "GetTxtBreak is supposed to use the RefDev" );
SwDrawTextInfo aDrawInf( pVsh, *pOut, &rScriptInfo, SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rScriptInfo,
*pTxt, GetIdx(), nMaxLen ); *m_pTxt, GetIdx(), nMaxLen );
aDrawInf.SetFrm( pFrm ); aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetFont( pFnt ); aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp ); aDrawInf.SetKanaComp( nComp );
aDrawInf.SetHyphPos( &rExtraCharPos ); aDrawInf.SetHyphPos( &rExtraCharPos );
return pFnt->GetTxtBreak( aDrawInf, nLineWidth ); return m_pFnt->GetTxtBreak( aDrawInf, nLineWidth );
} }
void SwTxtPaintInfo::CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPaint ) void SwTxtPaintInfo::CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPaint )
@@ -474,8 +474,8 @@ void SwTxtPaintInfo::CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPain
#endif #endif
} }
SwTxtPaintInfo::SwTxtPaintInfo( const SwTxtPaintInfo &rInf, const OUString* pTxt_ ) SwTxtPaintInfo::SwTxtPaintInfo( const SwTxtPaintInfo &rInf, const OUString* pTxt )
: SwTxtSizeInfo( rInf, pTxt_ ), : SwTxtSizeInfo( rInf, pTxt ),
pWrongList( rInf.GetpWrongList() ), pWrongList( rInf.GetpWrongList() ),
pGrammarCheckList( rInf.GetGrammarCheckList() ), pGrammarCheckList( rInf.GetGrammarCheckList() ),
pSmartTags( rInf.GetSmartTags() ), // SMARTTAGS pSmartTags( rInf.GetSmartTags() ), // SMARTTAGS
@@ -576,7 +576,7 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
if ( GetTxtFrm()->IsVertical() ) if ( GetTxtFrm()->IsVertical() )
GetTxtFrm()->SwitchHorizontalToVertical( aPoint ); GetTxtFrm()->SwitchHorizontalToVertical( aPoint );
pBlink->Insert( aPoint, &rPor, GetTxtFrm(), pFnt->GetOrientation() ); pBlink->Insert( aPoint, &rPor, GetTxtFrm(), m_pFnt->GetOrientation() );
if( !pBlink->IsVisible() ) if( !pBlink->IsVisible() )
return; return;
@@ -607,12 +607,12 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
const sal_Bool bTmpSmart = bSmartTag && OnWin() && !GetOpt().IsPagePreview() && SwSmartTagMgr::Get().IsSmartTagsEnabled(); // SMARTTAGS const sal_Bool bTmpSmart = bSmartTag && OnWin() && !GetOpt().IsPagePreview() && SwSmartTagMgr::Get().IsSmartTagsEnabled(); // SMARTTAGS
OSL_ENSURE( GetParaPortion(), "No paragraph!"); OSL_ENSURE( GetParaPortion(), "No paragraph!");
SwDrawTextInfo aDrawInf( pFrm->getRootFrm()->GetCurrShell(), *pOut, pSI, rText, nStart, nLength, SwDrawTextInfo aDrawInf( m_pFrm->getRootFrm()->GetCurrShell(), *m_pOut, pSI, rText, nStart, nLength,
rPor.Width(), bBullet ); rPor.Width(), bBullet );
aDrawInf.SetLeft( GetPaintRect().Left() ); aDrawInf.SetLeft( GetPaintRect().Left() );
aDrawInf.SetRight( GetPaintRect().Right() ); aDrawInf.SetRight( GetPaintRect().Right() );
aDrawInf.SetUnderFnt( pUnderFnt ); aDrawInf.SetUnderFnt( m_pUnderFnt );
const long nSpaceAdd = ( rPor.IsBlankPortion() || rPor.IsDropPortion() || const long nSpaceAdd = ( rPor.IsBlankPortion() || rPor.IsDropPortion() ||
rPor.InNumberGrp() ) ? 0 : GetSpaceAdd(); rPor.InNumberGrp() ) ? 0 : GetSpaceAdd();
@@ -630,7 +630,7 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
aDrawInf.SetKanaComp( nComp ); aDrawInf.SetKanaComp( nComp );
// the font is used to identify the current script via nActual // the font is used to identify the current script via nActual
aDrawInf.SetFont( pFnt ); aDrawInf.SetFont( m_pFnt );
// the frame is used to identify the orientation // the frame is used to identify the orientation
aDrawInf.SetFrm( GetTxtFrm() ); aDrawInf.SetFrm( GetTxtFrm() );
// we have to know if the paragraph should snap to grid // we have to know if the paragraph should snap to grid
@@ -660,13 +660,13 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
{ {
aDrawInf.SetPos( aPos ); aDrawInf.SetPos( aPos );
if( bKern ) if( bKern )
pFnt->_DrawStretchText( aDrawInf ); m_pFnt->_DrawStretchText( aDrawInf );
else else
{ {
aDrawInf.SetWrong( bTmpWrong ? pWrongList : NULL ); aDrawInf.SetWrong( bTmpWrong ? pWrongList : NULL );
aDrawInf.SetGrammarCheck( bTmpGrammarCheck ? pGrammarCheckList : NULL ); aDrawInf.SetGrammarCheck( bTmpGrammarCheck ? pGrammarCheckList : NULL );
aDrawInf.SetSmartTags( bTmpSmart ? pSmartTags : NULL ); // SMARTTAGS aDrawInf.SetSmartTags( bTmpSmart ? pSmartTags : NULL ); // SMARTTAGS
pFnt->_DrawText( aDrawInf ); m_pFnt->_DrawText( aDrawInf );
} }
} }
} }
@@ -773,34 +773,34 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
const SwFont* pOldFnt = rInf.GetFont(); const SwFont* pOldFnt = rInf.GetFont();
// Font is generated only once: // Font is generated only once:
static SwFont* pFnt = 0; static SwFont* m_pFnt = 0;
if ( ! pFnt ) if ( ! m_pFnt )
{ {
pFnt = new SwFont( *pOldFnt ); m_pFnt = new SwFont( *pOldFnt );
pFnt->SetFamily( FAMILY_DONTKNOW, pFnt->GetActual() ); m_pFnt->SetFamily( FAMILY_DONTKNOW, m_pFnt->GetActual() );
pFnt->SetName( numfunc::GetDefBulletFontname(), pFnt->GetActual() ); m_pFnt->SetName( numfunc::GetDefBulletFontname(), m_pFnt->GetActual() );
pFnt->SetStyleName( aEmptyStr, pFnt->GetActual() ); m_pFnt->SetStyleName( aEmptyStr, m_pFnt->GetActual() );
pFnt->SetCharSet( RTL_TEXTENCODING_SYMBOL, pFnt->GetActual() ); m_pFnt->SetCharSet( RTL_TEXTENCODING_SYMBOL, m_pFnt->GetActual() );
} }
// Some of the current values are set at the font: // Some of the current values are set at the font:
if ( ! bRotate ) if ( ! bRotate )
pFnt->SetVertical( 0, rInf.GetTxtFrm()->IsVertical() ); m_pFnt->SetVertical( 0, rInf.GetTxtFrm()->IsVertical() );
else else
pFnt->SetVertical( pOldFnt->GetOrientation() ); m_pFnt->SetVertical( pOldFnt->GetOrientation() );
if ( pCol ) if ( pCol )
pFnt->SetColor( *pCol ); m_pFnt->SetColor( *pCol );
else else
pFnt->SetColor( pOldFnt->GetColor() ); m_pFnt->SetColor( pOldFnt->GetColor() );
Size aFontSize( 0, SPECIAL_FONT_HEIGHT ); Size aFontSize( 0, SPECIAL_FONT_HEIGHT );
pFnt->SetSize( aFontSize, pFnt->GetActual() ); m_pFnt->SetSize( aFontSize, m_pFnt->GetActual() );
((SwTxtPaintInfo&)rInf).SetFont( pFnt ); ((SwTxtPaintInfo&)rInf).SetFont( m_pFnt );
// The maximum width depends on the current orientation // The maximum width depends on the current orientation
const sal_uInt16 nDir = pFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() ); const sal_uInt16 nDir = m_pFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
SwTwips nMaxWidth = 0; SwTwips nMaxWidth = 0;
switch ( nDir ) switch ( nDir )
{ {
@@ -825,14 +825,14 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
const SwTwips nOldWidth = aFontSize.Width(); const SwTwips nOldWidth = aFontSize.Width();
// new height for font // new height for font
const sal_uInt8 nAct = pFnt->GetActual(); const sal_uInt8 nAct = m_pFnt->GetActual();
aFontSize.Height() = ( 100 * pFnt->GetSize( nAct ).Height() ) / nFactor; aFontSize.Height() = ( 100 * m_pFnt->GetSize( nAct ).Height() ) / nFactor;
aFontSize.Width() = ( 100 * pFnt->GetSize( nAct).Width() ) / nFactor; aFontSize.Width() = ( 100 * m_pFnt->GetSize( nAct).Width() ) / nFactor;
if ( !aFontSize.Width() && !aFontSize.Height() ) if ( !aFontSize.Width() && !aFontSize.Height() )
break; break;
pFnt->SetSize( aFontSize, nAct ); m_pFnt->SetSize( aFontSize, nAct );
aFontSize = rInf.GetTxtSize( aTmp ).SvLSize(); aFontSize = rInf.GetTxtSize( aTmp ).SvLSize();
@@ -881,13 +881,13 @@ void SwTxtPaintInfo::DrawRect( const SwRect &rRect, sal_Bool bNoGraphic,
{ {
if( aTxtFly.IsOn() ) if( aTxtFly.IsOn() )
((SwTxtPaintInfo*)this)->GetTxtFly()-> ((SwTxtPaintInfo*)this)->GetTxtFly()->
DrawFlyRect( pOut, rRect, *this, bNoGraphic ); DrawFlyRect( m_pOut, rRect, *this, bNoGraphic );
else if ( bNoGraphic ) else if ( bNoGraphic )
pOut->DrawRect( rRect.SVRect() ); m_pOut->DrawRect( rRect.SVRect() );
else else
{ {
OSL_ENSURE( ((SvxBrushItem*)-1) != pBrushItem, "DrawRect: Uninitialized BrushItem!" ); OSL_ENSURE( ((SvxBrushItem*)-1) != pBrushItem, "DrawRect: Uninitialized BrushItem!" );
::DrawGraphic( pBrushItem, 0, 0, pOut, aItemRect, rRect ); ::DrawGraphic( pBrushItem, 0, 0, m_pOut, aItemRect, rRect );
} }
} }
} }
@@ -968,16 +968,16 @@ void SwTxtPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const
{ {
if( OnWin() && pOpt->IsPostIts() ) if( OnWin() && m_pOpt->IsPostIts() )
{ {
Size aSize; Size aSize;
Point aTmp; Point aTmp;
const sal_uInt16 nPostItsWidth = pOpt->GetPostItsWidth( GetOut() ); const sal_uInt16 nPostItsWidth = m_pOpt->GetPostItsWidth( GetOut() );
const sal_uInt16 nFontHeight = pFnt->GetHeight( pVsh, *GetOut() ); const sal_uInt16 nFontHeight = m_pFnt->GetHeight( m_pVsh, *GetOut() );
const sal_uInt16 nFontAscent = pFnt->GetAscent( pVsh, *GetOut() ); const sal_uInt16 nFontAscent = m_pFnt->GetAscent( m_pVsh, *GetOut() );
switch ( pFnt->GetOrientation( GetTxtFrm()->IsVertical() ) ) switch ( m_pFnt->GetOrientation( GetTxtFrm()->IsVertical() ) )
{ {
case 0 : case 0 :
aSize.Width() = nPostItsWidth; aSize.Width() = nPostItsWidth;
@@ -1009,7 +1009,7 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const
GetTxtFrm()->SwitchHorizontalToVertical( aTmpRect ); GetTxtFrm()->SwitchHorizontalToVertical( aTmpRect );
const Rectangle aRect( aTmpRect.SVRect() ); const Rectangle aRect( aTmpRect.SVRect() );
pOpt->PaintPostIts( (OutputDevice*)GetOut(), aRect, bScript ); m_pOpt->PaintPostIts( (OutputDevice*)GetOut(), aRect, bScript );
} }
} }
@@ -1022,24 +1022,24 @@ void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked)
if (OnWin() && SwViewOption::IsFieldShadings() && if (OnWin() && SwViewOption::IsFieldShadings() &&
!GetOpt().IsPagePreview()) !GetOpt().IsPagePreview())
{ {
OutputDevice* pOut_ = (OutputDevice*)GetOut(); OutputDevice* pOut = (OutputDevice*)GetOut();
pOut_->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pOut_->SetFillColor( SwViewOption::GetFieldShadingsColor() ); pOut->SetFillColor( SwViewOption::GetFieldShadingsColor() );
pOut_->SetLineColor(); pOut->SetLineColor();
pOut_->DrawRect( aIntersect.SVRect() ); pOut->DrawRect( aIntersect.SVRect() );
pOut_->Pop(); pOut->Pop();
} }
const int delta=10; const int delta=10;
Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta); Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta);
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); m_pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pOut->SetLineColor( Color(0, 0, 0)); m_pOut->SetLineColor( Color(0, 0, 0));
pOut->SetFillColor(); m_pOut->SetFillColor();
pOut->DrawRect( r ); m_pOut->DrawRect( r );
if (checked) { if (checked) {
pOut->DrawLine(r.TopLeft(), r.BottomRight()); m_pOut->DrawLine(r.TopLeft(), r.BottomRight());
pOut->DrawLine(r.TopRight(), r.BottomLeft()); m_pOut->DrawLine(r.TopRight(), r.BottomLeft());
} }
pOut->Pop(); m_pOut->Pop();
} }
} }
@@ -1052,22 +1052,22 @@ void SwTxtPaintInfo::DrawBackground( const SwLinePortion &rPor ) const
if ( aIntersect.HasArea() ) if ( aIntersect.HasArea() )
{ {
OutputDevice* pTmpOut = (OutputDevice*)GetOut(); OutputDevice* pOut = (OutputDevice*)GetOut();
pTmpOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
// For dark background we do not want to have a filled rectangle // For dark background we do not want to have a filled rectangle
if ( GetVsh() && GetVsh()->GetWin() && lcl_IsDarkBackground( *this ) ) if ( GetVsh() && GetVsh()->GetWin() && lcl_IsDarkBackground( *this ) )
{ {
pTmpOut->SetLineColor( SwViewOption::GetFontColor().GetColor() ); pOut->SetLineColor( SwViewOption::GetFontColor().GetColor() );
} }
else else
{ {
pTmpOut->SetFillColor( SwViewOption::GetFieldShadingsColor() ); pOut->SetFillColor( SwViewOption::GetFieldShadingsColor() );
pTmpOut->SetLineColor(); pOut->SetLineColor();
} }
DrawRect( aIntersect, sal_True ); DrawRect( aIntersect, sal_True );
pTmpOut->Pop(); pOut->Pop();
} }
} }
@@ -1078,7 +1078,7 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
CalcRect( rPor, &aIntersect, 0 ); CalcRect( rPor, &aIntersect, 0 );
if(aIntersect.HasArea()) if(aIntersect.HasArea())
{ {
SwTxtNode *pNd = pFrm->GetTxtNode(); SwTxtNode *pNd = m_pFrm->GetTxtNode();
const ::sw::mark::IFieldmark* pFieldmark = NULL; const ::sw::mark::IFieldmark* pFieldmark = NULL;
if(pNd) if(pNd)
{ {
@@ -1128,9 +1128,9 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
} }
} }
} }
if( !pFnt->GetBackColor() ) return; if( !m_pFnt->GetBackColor() ) return;
OSL_ENSURE( pFnt->GetBackColor(), "DrawBackBrush: Lost Color" ); OSL_ENSURE( m_pFnt->GetBackColor(), "DrawBackBrush: Lost Color" );
SwRect aIntersect; SwRect aIntersect;
CalcRect( rPor, 0, &aIntersect ); CalcRect( rPor, 0, &aIntersect );
@@ -1144,7 +1144,7 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
pTmpOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); pTmpOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pTmpOut->SetFillColor( *pFnt->GetBackColor() ); pTmpOut->SetFillColor( *m_pFnt->GetBackColor() );
pTmpOut->SetLineColor(); pTmpOut->SetLineColor();
DrawRect( aIntersect, sal_True, sal_False ); DrawRect( aIntersect, sal_True, sal_False );
@@ -1175,7 +1175,7 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
!GetOpt().IsReadonly() && !GetOpt().IsReadonly() &&
SwViewOption::IsFieldShadings() && SwViewOption::IsFieldShadings() &&
(POR_NUMBER != nWhich || (POR_NUMBER != nWhich ||
pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615# m_pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615#
bDraw = true; bDraw = true;
break; break;
case POR_TAB: if ( GetOpt().IsTab() ) bDraw = true; break; case POR_TAB: if ( GetOpt().IsTab() ) bDraw = true; break;
@@ -1777,8 +1777,8 @@ sal_Bool SwTxtFormatInfo::ChgHyph( const sal_Bool bNew )
bAutoHyph = bNew; bAutoHyph = bNew;
InitHyph( bNew ); InitHyph( bNew );
// Set language in the Hyphenator // Set language in the Hyphenator
if( pFnt ) if( m_pFnt )
pFnt->ChgPhysFnt( pVsh, *pOut ); m_pFnt->ChgPhysFnt( m_pVsh, *m_pOut );
} }
return bOld; return bOld;
} }

View File

@@ -157,51 +157,51 @@ class SwTxtSizeInfo : public SwTxtInfo
protected: protected:
// during formatting, a small database is built, mapping portion pointers // during formatting, a small database is built, mapping portion pointers
// to their maximum size (used for kana compression) // to their maximum size (used for kana compression)
SwTxtPortionMap aMaxWidth; SwTxtPortionMap m_aMaxWidth;
// for each line, an array of compression values is calculated // for each line, an array of compression values is calculated
// this array is passed over to the info structure // this array is passed over to the info structure
std::deque<sal_uInt16>* pKanaComp; std::deque<sal_uInt16>* m_pKanaComp;
ViewShell *pVsh; ViewShell *m_pVsh;
// pOut is the output device, pRef is the device used for formatting // m_pOut is the output device, m_pRef is the device used for formatting
OutputDevice* pOut; OutputDevice* m_pOut;
OutputDevice* pRef; OutputDevice* m_pRef;
SwFont *pFnt; SwFont *m_pFnt;
SwUnderlineFont *pUnderFnt; // Font for underlining SwUnderlineFont *m_pUnderFnt; // Font for underlining
SwTxtFrm *pFrm; SwTxtFrm *m_pFrm;
const SwViewOption *pOpt; const SwViewOption *m_pOpt;
const OUString *pTxt; const OUString *m_pTxt;
sal_Int32 nIdx, nLen; sal_Int32 m_nIdx, m_nLen;
sal_uInt16 nKanaIdx; sal_uInt16 m_nKanaIdx;
bool bOnWin : 1; bool m_bOnWin : 1;
bool bNotEOL : 1; bool m_bNotEOL : 1;
bool bURLNotify : 1; bool m_bURLNotify : 1;
bool bStopUnderFlow : 1; // Underflow was stopped e.g. by a FlyPortion bool m_bStopUnderFlow : 1; // Underflow was stopped e.g. by a FlyPortion
bool bFtnInside : 1; // the current line contains a footnote bool m_bFtnInside : 1; // the current line contains a footnote
bool bOtherThanFtnInside : 1; // the current line contains another portion than a footnote portion. bool m_bOtherThanFtnInside : 1; // the current line contains another portion than a footnote portion.
// needed for checking keep together of footnote portion with previous portion // needed for checking keep together of footnote portion with previous portion
bool bMulti : 1; // inside a multiportion bool m_bMulti : 1; // inside a multiportion
bool bFirstMulti : 1; // this flag is used for two purposes: bool m_bFirstMulti : 1; // this flag is used for two purposes:
// - the multiportion is the first lineportion // - the multiportion is the first lineportion
// - indicates, if we are currently in second // - indicates, if we are currently in second
// line of multi portion // line of multi portion
bool bRuby : 1; // during the formatting of a phonetic line bool m_bRuby : 1; // during the formatting of a phonetic line
bool bHanging : 1; // formatting of hanging punctuation allowed bool m_bHanging : 1; // formatting of hanging punctuation allowed
bool bScriptSpace : 1; // space between different scripts (Asian/Latin) bool m_bScriptSpace : 1; // space between different scripts (Asian/Latin)
bool bForbiddenChars : 1; // Forbidden start/endline characters bool m_bForbiddenChars : 1; // Forbidden start/endline characters
bool bSnapToGrid : 1; // paragraph snaps to grid bool m_bSnapToGrid : 1; // paragraph snaps to grid
sal_uInt8 nDirection : 2; // writing direction: 0/90/180/270 degree sal_uInt8 m_nDirection : 2; // writing direction: 0/90/180/270 degree
protected: protected:
void CtorInitTxtSizeInfo( SwTxtFrm *pFrm, SwFont *pFnt = 0, void CtorInitTxtSizeInfo( SwTxtFrm *pFrm, SwFont *pFnt = 0,
const xub_StrLen nIdx = 0, const xub_StrLen nIdx = 0,
const xub_StrLen nLen = STRING_LEN ); const xub_StrLen nLen = STRING_LEN );
SwTxtSizeInfo() : pKanaComp(0), pVsh(0), pOut(0), pRef(0), pFnt(0), pUnderFnt(0), pFrm(0), pOpt(0), pTxt(0) {} SwTxtSizeInfo() : m_pKanaComp(0), m_pVsh(0), m_pOut(0), m_pRef(0), m_pFnt(0), m_pUnderFnt(0), m_pFrm(0), m_pOpt(0), m_pTxt(0) {}
public: public:
SwTxtSizeInfo( const SwTxtSizeInfo &rInf ); SwTxtSizeInfo( const SwTxtSizeInfo &rInf );
SwTxtSizeInfo( const SwTxtSizeInfo &rInf, const OUString* pTxt_, SwTxtSizeInfo( const SwTxtSizeInfo &rInf, const OUString* pTxt,
const sal_Int32 nIdx = 0, const sal_Int32 nIdx = 0,
const xub_StrLen nLen = STRING_LEN ); const xub_StrLen nLen = STRING_LEN );
@@ -215,57 +215,57 @@ public:
// rPos will set to the end of the multi-line part. // rPos will set to the end of the multi-line part.
SwMultiCreator* GetMultiCreator( xub_StrLen &rPos, SwMultiPortion* pM ) const; SwMultiCreator* GetMultiCreator( xub_StrLen &rPos, SwMultiPortion* pM ) const;
inline bool OnWin() const { return bOnWin; } inline bool OnWin() const { return m_bOnWin; }
inline void SetOnWin( const bool bNew ) { bOnWin = bNew; } inline void SetOnWin( const bool bNew ) { m_bOnWin = bNew; }
inline bool NotEOL() const { return bNotEOL; } inline bool NotEOL() const { return m_bNotEOL; }
inline void SetNotEOL( const bool bNew ) { bNotEOL = bNew; } inline void SetNotEOL( const bool bNew ) { m_bNotEOL = bNew; }
inline bool URLNotify() const { return bURLNotify; } inline bool URLNotify() const { return m_bURLNotify; }
inline void SetURLNotify( const bool bNew ) { bURLNotify = bNew; } inline void SetURLNotify( const bool bNew ) { m_bURLNotify = bNew; }
inline bool StopUnderFlow() const { return bStopUnderFlow; } inline bool StopUnderFlow() const { return m_bStopUnderFlow; }
inline void SetStopUnderFlow( const bool bNew ) { bStopUnderFlow = bNew; } inline void SetStopUnderFlow( const bool bNew ) { m_bStopUnderFlow = bNew; }
inline bool IsFtnInside() const { return bFtnInside; } inline bool IsFtnInside() const { return m_bFtnInside; }
inline void SetFtnInside( const bool bNew ) { bFtnInside = bNew; } inline void SetFtnInside( const bool bNew ) { m_bFtnInside = bNew; }
inline bool IsOtherThanFtnInside() const { return bOtherThanFtnInside; } inline bool IsOtherThanFtnInside() const { return m_bOtherThanFtnInside; }
inline void SetOtherThanFtnInside( const bool bNew ) { bOtherThanFtnInside = bNew; } inline void SetOtherThanFtnInside( const bool bNew ) { m_bOtherThanFtnInside = bNew; }
inline bool IsMulti() const { return bMulti; } inline bool IsMulti() const { return m_bMulti; }
inline void SetMulti( const bool bNew ) { bMulti = bNew; } inline void SetMulti( const bool bNew ) { m_bMulti = bNew; }
inline bool IsFirstMulti() const { return bFirstMulti; } inline bool IsFirstMulti() const { return m_bFirstMulti; }
inline void SetFirstMulti( const bool bNew ) { bFirstMulti = bNew; } inline void SetFirstMulti( const bool bNew ) { m_bFirstMulti = bNew; }
inline bool IsRuby() const { return bRuby; } inline bool IsRuby() const { return m_bRuby; }
inline void SetRuby( const bool bNew ) { bRuby = bNew; } inline void SetRuby( const bool bNew ) { m_bRuby = bNew; }
inline bool IsHanging() const { return bHanging; } inline bool IsHanging() const { return m_bHanging; }
inline void SetHanging( const bool bNew ) { bHanging = bNew; } inline void SetHanging( const bool bNew ) { m_bHanging = bNew; }
inline bool HasScriptSpace() const { return bScriptSpace; } inline bool HasScriptSpace() const { return m_bScriptSpace; }
inline void SetScriptSpace( const bool bNew ) { bScriptSpace = bNew; } inline void SetScriptSpace( const bool bNew ) { m_bScriptSpace = bNew; }
inline bool HasForbiddenChars() const { return bForbiddenChars; } inline bool HasForbiddenChars() const { return m_bForbiddenChars; }
inline void SetForbiddenChars( const bool bN ) { bForbiddenChars = bN; } inline void SetForbiddenChars( const bool bN ) { m_bForbiddenChars = bN; }
inline bool SnapToGrid() const { return bSnapToGrid; } inline bool SnapToGrid() const { return m_bSnapToGrid; }
inline void SetSnapToGrid( const bool bN ) { bSnapToGrid = bN; } inline void SetSnapToGrid( const bool bN ) { m_bSnapToGrid = bN; }
inline sal_uInt8 GetDirection() const { return nDirection; } inline sal_uInt8 GetDirection() const { return m_nDirection; }
inline void SetDirection( const sal_uInt8 nNew ) { nDirection = nNew; } inline void SetDirection( const sal_uInt8 nNew ) { m_nDirection = nNew; }
inline sal_Bool IsRotated() const { return 0 != ( 1 & nDirection ); } inline sal_Bool IsRotated() const { return 0 != ( 1 & m_nDirection ); }
inline ViewShell *GetVsh() { return pVsh; } inline ViewShell *GetVsh() { return m_pVsh; }
inline const ViewShell *GetVsh() const { return pVsh; } inline const ViewShell *GetVsh() const { return m_pVsh; }
inline OutputDevice *GetOut() { return pOut; } inline OutputDevice *GetOut() { return m_pOut; }
inline const OutputDevice *GetOut() const { return pOut; } inline const OutputDevice *GetOut() const { return m_pOut; }
inline void SetOut( OutputDevice* pNewOut ) { pOut = pNewOut; } inline void SetOut( OutputDevice* pNewOut ) { m_pOut = pNewOut; }
inline OutputDevice *GetRefDev() { return pRef; } inline OutputDevice *GetRefDev() { return m_pRef; }
inline const OutputDevice *GetRefDev() const { return pRef; } inline const OutputDevice *GetRefDev() const { return m_pRef; }
inline SwFont *GetFont() { return pFnt; } inline SwFont *GetFont() { return m_pFnt; }
inline const SwFont *GetFont() const { return pFnt; } inline const SwFont *GetFont() const { return m_pFnt; }
inline void SetFont( SwFont *pNew ) { pFnt = pNew; } inline void SetFont( SwFont *pNew ) { m_pFnt = pNew; }
void SelectFont(); void SelectFont();
inline void SetUnderFnt( SwUnderlineFont* pNew ) { pUnderFnt = pNew; } inline void SetUnderFnt( SwUnderlineFont* pNew ) { m_pUnderFnt = pNew; }
inline SwUnderlineFont* GetUnderFnt() const { return pUnderFnt; } inline SwUnderlineFont* GetUnderFnt() const { return m_pUnderFnt; }
inline const SwViewOption &GetOpt() const { return *pOpt; } inline const SwViewOption &GetOpt() const { return *m_pOpt; }
inline const OUString &GetTxt() const { return *pTxt; } inline const OUString &GetTxt() const { return *m_pTxt; }
inline sal_Unicode GetChar( const sal_Int32 nPos ) const inline sal_Unicode GetChar( const sal_Int32 nPos ) const
{ if (pTxt && !pTxt->isEmpty()) return (*pTxt)[ nPos ]; return 0; } { if (m_pTxt && !m_pTxt->isEmpty()) return (*m_pTxt)[ nPos ]; return 0; }
inline KSHORT GetTxtHeight() const; inline KSHORT GetTxtHeight() const;
@@ -296,67 +296,67 @@ public:
inline KSHORT GetAscent() const; inline KSHORT GetAscent() const;
inline sal_Int32 GetIdx() const { return nIdx; } inline sal_Int32 GetIdx() const { return m_nIdx; }
inline void SetIdx( const sal_Int32 nNew ) { nIdx = nNew; } inline void SetIdx( const sal_Int32 nNew ) { m_nIdx = nNew; }
inline sal_Int32 GetLen() const { return nLen; } inline sal_Int32 GetLen() const { return m_nLen; }
inline void SetLen( const sal_Int32 nNew ) { nLen = nNew; } inline void SetLen( const sal_Int32 nNew ) { m_nLen = nNew; }
inline void SetTxt( const OUString &rNew ){ pTxt = &rNew; } inline void SetTxt( const OUString &rNew ){ m_pTxt = &rNew; }
friend SvStream &operator<<( SvStream &rOS, const SwTxtSizeInfo &rInf ); friend SvStream &operator<<( SvStream &rOS, const SwTxtSizeInfo &rInf );
// No Bullets for the symbol font! // No Bullets for the symbol font!
inline sal_Bool IsNoSymbol() const inline sal_Bool IsNoSymbol() const
{ return RTL_TEXTENCODING_SYMBOL != pFnt->GetCharSet( pFnt->GetActual() ); } { return RTL_TEXTENCODING_SYMBOL != m_pFnt->GetCharSet( m_pFnt->GetActual() ); }
void NoteAnimation() const; void NoteAnimation() const;
// Home is where Your heart is... // Home is where Your heart is...
inline SwTxtFrm *GetTxtFrm() { return pFrm; } inline SwTxtFrm *GetTxtFrm() { return m_pFrm; }
inline const SwTxtFrm *GetTxtFrm() const { return pFrm; } inline const SwTxtFrm *GetTxtFrm() const { return m_pFrm; }
inline sal_Bool HasHint( xub_StrLen nPos ) const inline sal_Bool HasHint( xub_StrLen nPos ) const
{ return _HasHint( pFrm->GetTxtNode(), nPos ); } { return _HasHint( m_pFrm->GetTxtNode(), nPos ); }
static sal_Bool _HasHint( const SwTxtNode* pTxtNode, xub_StrLen nPos ); static sal_Bool _HasHint( const SwTxtNode* pTxtNode, xub_StrLen nPos );
// If Kana Compression is enabled, a minimum and maximum portion width // If Kana Compression is enabled, a minimum and maximum portion width
// is calculated. We format lines with minimal size and share remaining // is calculated. We format lines with minimal size and share remaining
// space among compressed kanas. // space among compressed kanas.
// During formatting, the maximum values of compressable portions are // During formatting, the maximum values of compressable portions are
// stored in aMaxWidth and discarded after a line has been formatted. // stored in m_aMaxWidth and discarded after a line has been formatted.
inline void SetMaxWidthDiff( sal_uLong nKey, sal_uInt16 nVal ) inline void SetMaxWidthDiff( sal_uLong nKey, sal_uInt16 nVal )
{ {
aMaxWidth.insert( ::std::make_pair( nKey, nVal ) ); m_aMaxWidth.insert( ::std::make_pair( nKey, nVal ) );
}; };
inline sal_uInt16 GetMaxWidthDiff( sal_uLong nKey ) inline sal_uInt16 GetMaxWidthDiff( sal_uLong nKey )
{ {
SwTxtPortionMap::iterator it = aMaxWidth.find( nKey ); SwTxtPortionMap::iterator it = m_aMaxWidth.find( nKey );
if( it != aMaxWidth.end() ) if( it != m_aMaxWidth.end() )
return it->second; return it->second;
else else
return 0; return 0;
}; };
inline void ResetMaxWidthDiff() inline void ResetMaxWidthDiff()
{ {
aMaxWidth.clear(); m_aMaxWidth.clear();
}; };
inline sal_Bool CompressLine() inline sal_Bool CompressLine()
{ {
return (sal_Bool)!aMaxWidth.empty(); return (sal_Bool)!m_aMaxWidth.empty();
}; };
// //
// Feature: Kana Compression // Feature: Kana Compression
// //
inline MSHORT GetKanaIdx() const { return nKanaIdx; } inline MSHORT GetKanaIdx() const { return m_nKanaIdx; }
inline void ResetKanaIdx(){ nKanaIdx = 0; } inline void ResetKanaIdx(){ m_nKanaIdx = 0; }
inline void SetKanaIdx( MSHORT nNew ) { nKanaIdx = nNew; } inline void SetKanaIdx( MSHORT nNew ) { m_nKanaIdx = nNew; }
inline void IncKanaIdx() { ++nKanaIdx; } inline void IncKanaIdx() { ++m_nKanaIdx; }
inline void SetKanaComp( std::deque<sal_uInt16> *pNew ){ pKanaComp = pNew; } inline void SetKanaComp( std::deque<sal_uInt16> *pNew ){ m_pKanaComp = pNew; }
inline std::deque<sal_uInt16>* GetpKanaComp() const { return pKanaComp; } inline std::deque<sal_uInt16>* GetpKanaComp() const { return m_pKanaComp; }
inline sal_uInt16 GetKanaComp() const inline sal_uInt16 GetKanaComp() const
{ return ( pKanaComp && nKanaIdx < pKanaComp->size() ) { return ( m_pKanaComp && m_nKanaIdx < m_pKanaComp->size() )
? (*pKanaComp)[nKanaIdx] : 0; } ? (*m_pKanaComp)[m_nKanaIdx] : 0; }
#ifdef DBG_UTIL #ifdef DBG_UTIL
sal_Bool IsOptDbg() const; sal_Bool IsOptDbg() const;
@@ -392,10 +392,10 @@ class SwTxtPaintInfo : public SwTxtSizeInfo
protected: protected:
#ifdef DBG_UTIL #ifdef DBG_UTIL
SwTxtPaintInfo() { pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pSmartTags = 0; pSpaceAdd = 0; SwTxtPaintInfo() { m_pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pSmartTags = 0; pSpaceAdd = 0;
pBrushItem = ((SvxBrushItem*)-1);} pBrushItem = ((SvxBrushItem*)-1);}
#else #else
SwTxtPaintInfo() { pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pSmartTags = 0; pSpaceAdd = 0; SwTxtPaintInfo() { m_pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pSmartTags = 0; pSpaceAdd = 0;
pBrushItem = 0;} pBrushItem = 0;}
#endif #endif
public: public:
@@ -781,19 +781,19 @@ public:
inline KSHORT SwTxtSizeInfo::GetAscent() const inline KSHORT SwTxtSizeInfo::GetAscent() const
{ {
OSL_ENSURE( GetOut(), "SwTxtSizeInfo::GetAscent() without pOut" ); OSL_ENSURE( GetOut(), "SwTxtSizeInfo::GetAscent() without m_pOut" );
return ((SwFont*)GetFont())->GetAscent( pVsh, *GetOut() ); return ((SwFont*)GetFont())->GetAscent( m_pVsh, *GetOut() );
} }
inline KSHORT SwTxtSizeInfo::GetTxtHeight() const inline KSHORT SwTxtSizeInfo::GetTxtHeight() const
{ {
OSL_ENSURE( GetOut(), "SwTxtSizeInfo::GetTxtHeight() without pOut" ); OSL_ENSURE( GetOut(), "SwTxtSizeInfo::GetTxtHeight() without m_pOut" );
return ((SwFont*)GetFont())->GetHeight( pVsh, *GetOut() ); return ((SwFont*)GetFont())->GetHeight( m_pVsh, *GetOut() );
} }
inline SwPosSize SwTxtSizeInfo::GetTxtSize( const XubString &rTxt ) const inline SwPosSize SwTxtSizeInfo::GetTxtSize( const XubString &rTxt ) const
{ {
return GetTxtSize( pOut, 0, rTxt, 0, rTxt.Len(), 0 ); return GetTxtSize( m_pOut, 0, rTxt, 0, rTxt.Len(), 0 );
} }
inline SwPosSize SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, inline SwPosSize SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI,
@@ -801,7 +801,7 @@ inline SwPosSize SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI,
const xub_StrLen nNewLen, const xub_StrLen nNewLen,
const sal_uInt16 nCompress ) const const sal_uInt16 nCompress ) const
{ {
return GetTxtSize( pOut, pSI, *pTxt, nNewIdx, nNewLen, nCompress ); return GetTxtSize( m_pOut, pSI, *m_pTxt, nNewIdx, nNewLen, nCompress );
} }
/************************************************************************* /*************************************************************************
@@ -830,7 +830,7 @@ inline void SwTxtPaintInfo::DrawText( const XubString &rText,
inline void SwTxtPaintInfo::DrawText( const SwLinePortion &rPor, inline void SwTxtPaintInfo::DrawText( const SwLinePortion &rPor,
const xub_StrLen nLength, const sal_Bool bKern ) const const xub_StrLen nLength, const sal_Bool bKern ) const
{ {
((SwTxtPaintInfo*)this)->_DrawText( *pTxt, rPor, nIdx, nLength, bKern ); ((SwTxtPaintInfo*)this)->_DrawText( *m_pTxt, rPor, m_nIdx, nLength, bKern );
} }
inline void SwTxtPaintInfo::DrawMarkedText( const SwLinePortion &rPor, inline void SwTxtPaintInfo::DrawMarkedText( const SwLinePortion &rPor,
@@ -840,7 +840,7 @@ inline void SwTxtPaintInfo::DrawMarkedText( const SwLinePortion &rPor,
const sal_Bool bSmartTags, const sal_Bool bSmartTags,
const sal_Bool bGrammarCheck ) const const sal_Bool bGrammarCheck ) const
{ {
((SwTxtPaintInfo*)this)->_DrawText( *pTxt, rPor, nIdx, nLength, bKern, bWrong, bSmartTags, bGrammarCheck ); ((SwTxtPaintInfo*)this)->_DrawText( *m_pTxt, rPor, m_nIdx, nLength, bKern, bWrong, bSmartTags, bGrammarCheck );
} }
/************************************************************************* /*************************************************************************

View File

@@ -911,14 +911,14 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
const SvxCharRotateItem* pRotate = NULL; const SvxCharRotateItem* pRotate = NULL;
const SfxPoolItem* pRotItem; const SfxPoolItem* pRotItem;
if( SFX_ITEM_SET == pFrm->GetTxtNode()->GetSwAttrSet(). if( SFX_ITEM_SET == m_pFrm->GetTxtNode()->GetSwAttrSet().
GetItemState( RES_CHRATR_ROTATE, sal_True, &pRotItem ) && GetItemState( RES_CHRATR_ROTATE, sal_True, &pRotItem ) &&
((SvxCharRotateItem*)pRotItem)->GetValue() ) ((SvxCharRotateItem*)pRotItem)->GetValue() )
pRotate = (SvxCharRotateItem*)pRotItem; pRotate = (SvxCharRotateItem*)pRotItem;
else else
pRotItem = NULL; pRotItem = NULL;
const SvxTwoLinesItem* p2Lines = NULL; const SvxTwoLinesItem* p2Lines = NULL;
const SwTxtNode *pLclTxtNode = pFrm->GetTxtNode(); const SwTxtNode *pLclTxtNode = m_pFrm->GetTxtNode();
if( !pLclTxtNode ) if( !pLclTxtNode )
return NULL; return NULL;
const SfxPoolItem* pItem; const SfxPoolItem* pItem;

View File

@@ -43,14 +43,14 @@ using namespace ::com::sun::star::i18n;
Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord( Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
const XubString &rTxt, const MSHORT nMinTrail ) const XubString &rTxt, const MSHORT nMinTrail )
{ {
if( rTxt.Len() < 4 || pFnt->IsSymbol(pVsh) ) if( rTxt.Len() < 4 || m_pFnt->IsSymbol(m_pVsh) )
return 0; return 0;
Reference< XHyphenator > xHyph = ::GetHyphenator(); Reference< XHyphenator > xHyph = ::GetHyphenator();
Reference< XHyphenatedWord > xHyphWord; Reference< XHyphenatedWord > xHyphWord;
if( xHyph.is() ) if( xHyph.is() )
xHyphWord = xHyph->hyphenate( OUString(rTxt), xHyphWord = xHyph->hyphenate( OUString(rTxt),
g_pBreakIt->GetLocale( pFnt->GetLanguage() ), g_pBreakIt->GetLocale( m_pFnt->GetLanguage() ),
rTxt.Len() - nMinTrail, GetHyphValues() ); rTxt.Len() - nMinTrail, GetHyphValues() );
return xHyphWord; return xHyphWord;