SwTxtSizeInfo: rename member variables missing their prefix
Conflicts: sw/source/core/text/inftxt.hxx Change-Id: I32a430c35d69308f87b7b6f1b4ef232315deed2f
This commit is contained in:
@@ -203,32 +203,32 @@ inline sal_Int32 GetMinLen( const SwTxtSizeInfo &rInf )
|
||||
|
||||
SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew )
|
||||
: SwTxtInfo( rNew ),
|
||||
pKanaComp(((SwTxtSizeInfo&)rNew).GetpKanaComp()),
|
||||
pVsh(((SwTxtSizeInfo&)rNew).GetVsh()),
|
||||
pOut(((SwTxtSizeInfo&)rNew).GetOut()),
|
||||
pRef(((SwTxtSizeInfo&)rNew).GetRefDev()),
|
||||
pFnt(((SwTxtSizeInfo&)rNew).GetFont()),
|
||||
pUnderFnt(((SwTxtSizeInfo&)rNew).GetUnderFnt()),
|
||||
pFrm(rNew.pFrm),
|
||||
pOpt(&rNew.GetOpt()),
|
||||
pTxt(&rNew.GetTxt()),
|
||||
nIdx(rNew.GetIdx()),
|
||||
nLen(rNew.GetLen()),
|
||||
nKanaIdx( rNew.GetKanaIdx() ),
|
||||
bOnWin( rNew.OnWin() ),
|
||||
bNotEOL( rNew.NotEOL() ),
|
||||
bURLNotify( rNew.URLNotify() ),
|
||||
bStopUnderFlow( rNew.StopUnderFlow() ),
|
||||
bFtnInside( rNew.IsFtnInside() ),
|
||||
bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ),
|
||||
bMulti( rNew.IsMulti() ),
|
||||
bFirstMulti( rNew.IsFirstMulti() ),
|
||||
bRuby( rNew.IsRuby() ),
|
||||
bHanging( rNew.IsHanging() ),
|
||||
bScriptSpace( rNew.HasScriptSpace() ),
|
||||
bForbiddenChars( rNew.HasForbiddenChars() ),
|
||||
bSnapToGrid( rNew.SnapToGrid() ),
|
||||
nDirection( rNew.GetDirection() )
|
||||
m_pKanaComp(((SwTxtSizeInfo&)rNew).GetpKanaComp()),
|
||||
m_pVsh(((SwTxtSizeInfo&)rNew).GetVsh()),
|
||||
m_pOut(((SwTxtSizeInfo&)rNew).GetOut()),
|
||||
m_pRef(((SwTxtSizeInfo&)rNew).GetRefDev()),
|
||||
m_pFnt(((SwTxtSizeInfo&)rNew).GetFont()),
|
||||
m_pUnderFnt(((SwTxtSizeInfo&)rNew).GetUnderFnt()),
|
||||
m_pFrm(rNew.m_pFrm),
|
||||
m_pOpt(&rNew.GetOpt()),
|
||||
m_pTxt(&rNew.GetTxt()),
|
||||
m_nIdx(rNew.GetIdx()),
|
||||
m_nLen(rNew.GetLen()),
|
||||
m_nKanaIdx( rNew.GetKanaIdx() ),
|
||||
m_bOnWin( rNew.OnWin() ),
|
||||
m_bNotEOL( rNew.NotEOL() ),
|
||||
m_bURLNotify( rNew.URLNotify() ),
|
||||
m_bStopUnderFlow( rNew.StopUnderFlow() ),
|
||||
m_bFtnInside( rNew.IsFtnInside() ),
|
||||
m_bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ),
|
||||
m_bMulti( rNew.IsMulti() ),
|
||||
m_bFirstMulti( rNew.IsFirstMulti() ),
|
||||
m_bRuby( rNew.IsRuby() ),
|
||||
m_bHanging( rNew.IsHanging() ),
|
||||
m_bScriptSpace( rNew.HasScriptSpace() ),
|
||||
m_bForbiddenChars( rNew.HasForbiddenChars() ),
|
||||
m_bSnapToGrid( rNew.SnapToGrid() ),
|
||||
m_nDirection( rNew.GetDirection() )
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
ChkOutDev( *this );
|
||||
@@ -238,19 +238,19 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew )
|
||||
void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
|
||||
const xub_StrLen nNewIdx, const xub_StrLen nNewLen )
|
||||
{
|
||||
pKanaComp = NULL;
|
||||
nKanaIdx = 0;
|
||||
pFrm = pFrame;
|
||||
CtorInitTxtInfo( pFrm );
|
||||
const SwTxtNode *pNd = pFrm->GetTxtNode();
|
||||
pVsh = pFrm->getRootFrm()->GetCurrShell();
|
||||
m_pKanaComp = NULL;
|
||||
m_nKanaIdx = 0;
|
||||
m_pFrm = pFrame;
|
||||
CtorInitTxtInfo( m_pFrm );
|
||||
const SwTxtNode *pNd = m_pFrm->GetTxtNode();
|
||||
m_pVsh = m_pFrm->getRootFrm()->GetCurrShell();
|
||||
|
||||
// Get the output and reference device
|
||||
if ( pVsh )
|
||||
if ( m_pVsh )
|
||||
{
|
||||
pOut = pVsh->GetOut();
|
||||
pRef = &pVsh->GetRefDev();
|
||||
bOnWin = pVsh->GetWin() || OUTDEV_WINDOW == pOut->GetOutDevType();
|
||||
m_pOut = m_pVsh->GetOut();
|
||||
m_pRef = &m_pVsh->GetRefDev();
|
||||
m_bOnWin = m_pVsh->GetWin() || OUTDEV_WINDOW == m_pOut->GetOutDevType();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -258,12 +258,12 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
|
||||
if ( pNd->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) )
|
||||
{
|
||||
// We can only pick the AppWin here? (there's nothing better to pick?)
|
||||
pOut = GetpApp()->GetDefaultDevice();
|
||||
m_pOut = GetpApp()->GetDefaultDevice();
|
||||
}
|
||||
else
|
||||
pOut = pNd->getIDocumentDeviceAccess()->getPrinter( false );
|
||||
m_pOut = pNd->getIDocumentDeviceAccess()->getPrinter( false );
|
||||
|
||||
pRef = pOut;
|
||||
m_pRef = m_pOut;
|
||||
}
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@@ -271,76 +271,76 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
|
||||
#endif
|
||||
|
||||
// Set default layout mode ( LTR or RTL ).
|
||||
if ( pFrm->IsRightToLeft() )
|
||||
if ( m_pFrm->IsRightToLeft() )
|
||||
{
|
||||
pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL );
|
||||
pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL );
|
||||
nDirection = DIR_RIGHT2LEFT;
|
||||
m_pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL );
|
||||
m_pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL );
|
||||
m_nDirection = DIR_RIGHT2LEFT;
|
||||
}
|
||||
else
|
||||
{
|
||||
pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG );
|
||||
pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG );
|
||||
nDirection = DIR_LEFT2RIGHT;
|
||||
m_pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG );
|
||||
m_pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG );
|
||||
m_nDirection = DIR_LEFT2RIGHT;
|
||||
}
|
||||
|
||||
//
|
||||
// The Options
|
||||
//
|
||||
pOpt = pVsh ?
|
||||
pVsh->GetViewOptions() :
|
||||
m_pOpt = m_pVsh ?
|
||||
m_pVsh->GetViewOptions() :
|
||||
SW_MOD()->GetViewOption( pNd->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) ); // Options from Module, due to StarONE
|
||||
|
||||
// bURLNotify is set if MakeGraphic prepares it
|
||||
// TODO: Unwind
|
||||
bURLNotify = pNoteURL && !bOnWin;
|
||||
m_bURLNotify = pNoteURL && !m_bOnWin;
|
||||
|
||||
SetSnapToGrid( pNd->GetSwAttrSet().GetParaGrid().GetValue() &&
|
||||
pFrm->IsInDocBody() );
|
||||
m_pFrm->IsInDocBody() );
|
||||
|
||||
pFnt = pNewFnt;
|
||||
pUnderFnt = 0;
|
||||
pTxt = &pNd->GetTxt();
|
||||
m_pFnt = pNewFnt;
|
||||
m_pUnderFnt = 0;
|
||||
m_pTxt = &pNd->GetTxt();
|
||||
|
||||
nIdx = nNewIdx;
|
||||
nLen = nNewLen;
|
||||
bNotEOL = false;
|
||||
bStopUnderFlow = bFtnInside = bOtherThanFtnInside = false;
|
||||
bMulti = bFirstMulti = bRuby = bHanging = bScriptSpace =
|
||||
bForbiddenChars = false;
|
||||
m_nIdx = nNewIdx;
|
||||
m_nLen = nNewLen;
|
||||
m_bNotEOL = false;
|
||||
m_bStopUnderFlow = m_bFtnInside = m_bOtherThanFtnInside = false;
|
||||
m_bMulti = m_bFirstMulti = m_bRuby = m_bHanging = m_bScriptSpace =
|
||||
m_bForbiddenChars = false;
|
||||
|
||||
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 )
|
||||
: SwTxtInfo( rNew ),
|
||||
pKanaComp(((SwTxtSizeInfo&)rNew).GetpKanaComp()),
|
||||
pVsh(((SwTxtSizeInfo&)rNew).GetVsh()),
|
||||
pOut(((SwTxtSizeInfo&)rNew).GetOut()),
|
||||
pRef(((SwTxtSizeInfo&)rNew).GetRefDev()),
|
||||
pFnt(((SwTxtSizeInfo&)rNew).GetFont()),
|
||||
pUnderFnt(((SwTxtSizeInfo&)rNew).GetUnderFnt()),
|
||||
pFrm( rNew.pFrm ),
|
||||
pOpt(&rNew.GetOpt()),
|
||||
pTxt(pTxt_),
|
||||
nIdx(nIndex),
|
||||
nLen(nLength),
|
||||
nKanaIdx( rNew.GetKanaIdx() ),
|
||||
bOnWin( rNew.OnWin() ),
|
||||
bNotEOL( rNew.NotEOL() ),
|
||||
bURLNotify( rNew.URLNotify() ),
|
||||
bStopUnderFlow( rNew.StopUnderFlow() ),
|
||||
bFtnInside( rNew.IsFtnInside() ),
|
||||
bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ),
|
||||
bMulti( rNew.IsMulti() ),
|
||||
bFirstMulti( rNew.IsFirstMulti() ),
|
||||
bRuby( rNew.IsRuby() ),
|
||||
bHanging( rNew.IsHanging() ),
|
||||
bScriptSpace( rNew.HasScriptSpace() ),
|
||||
bForbiddenChars( rNew.HasForbiddenChars() ),
|
||||
bSnapToGrid( rNew.SnapToGrid() ),
|
||||
nDirection( rNew.GetDirection() )
|
||||
m_pKanaComp(((SwTxtSizeInfo&)rNew).GetpKanaComp()),
|
||||
m_pVsh(((SwTxtSizeInfo&)rNew).GetVsh()),
|
||||
m_pOut(((SwTxtSizeInfo&)rNew).GetOut()),
|
||||
m_pRef(((SwTxtSizeInfo&)rNew).GetRefDev()),
|
||||
m_pFnt(((SwTxtSizeInfo&)rNew).GetFont()),
|
||||
m_pUnderFnt(((SwTxtSizeInfo&)rNew).GetUnderFnt()),
|
||||
m_pFrm( rNew.m_pFrm ),
|
||||
m_pOpt(&rNew.GetOpt()),
|
||||
m_pTxt(pTxt),
|
||||
m_nIdx(nIndex),
|
||||
m_nLen(nLength),
|
||||
m_nKanaIdx( rNew.GetKanaIdx() ),
|
||||
m_bOnWin( rNew.OnWin() ),
|
||||
m_bNotEOL( rNew.NotEOL() ),
|
||||
m_bURLNotify( rNew.URLNotify() ),
|
||||
m_bStopUnderFlow( rNew.StopUnderFlow() ),
|
||||
m_bFtnInside( rNew.IsFtnInside() ),
|
||||
m_bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ),
|
||||
m_bMulti( rNew.IsMulti() ),
|
||||
m_bFirstMulti( rNew.IsFirstMulti() ),
|
||||
m_bRuby( rNew.IsRuby() ),
|
||||
m_bHanging( rNew.IsHanging() ),
|
||||
m_bScriptSpace( rNew.HasScriptSpace() ),
|
||||
m_bForbiddenChars( rNew.HasForbiddenChars() ),
|
||||
m_bSnapToGrid( rNew.SnapToGrid() ),
|
||||
m_nDirection( rNew.GetDirection() )
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
ChkOutDev( *this );
|
||||
@@ -354,7 +354,7 @@ void SwTxtSizeInfo::SelectFont()
|
||||
// In this case pLastMet has it's old value.
|
||||
// Wrong: GetOut()->SetFont( GetFont()->GetFnt() );
|
||||
GetFont()->Invalidate();
|
||||
GetFont()->ChgPhysFnt( pVsh, *GetOut() );
|
||||
GetFont()->ChgPhysFnt( m_pVsh, *GetOut() );
|
||||
}
|
||||
|
||||
void SwTxtSizeInfo::NoteAnimation() const
|
||||
@@ -362,8 +362,8 @@ void SwTxtSizeInfo::NoteAnimation() const
|
||||
if( OnWin() )
|
||||
SwRootFrm::FlushVout();
|
||||
|
||||
OSL_ENSURE( pOut == pVsh->GetOut(),
|
||||
"SwTxtSizeInfo::NoteAnimation() changed pOut" );
|
||||
OSL_ENSURE( m_pOut == m_pVsh->GetOut(),
|
||||
"SwTxtSizeInfo::NoteAnimation() changed m_pOut" );
|
||||
}
|
||||
|
||||
SwPosSize SwTxtSizeInfo::GetTxtSize( OutputDevice* pOutDev,
|
||||
@@ -373,12 +373,12 @@ SwPosSize SwTxtSizeInfo::GetTxtSize( OutputDevice* pOutDev,
|
||||
const xub_StrLen nLength,
|
||||
const sal_uInt16 nComp ) const
|
||||
{
|
||||
SwDrawTextInfo aDrawInf( pVsh, *pOutDev, pSI, rTxt, nIndex, nLength );
|
||||
aDrawInf.SetFrm( pFrm );
|
||||
aDrawInf.SetFont( pFnt );
|
||||
SwDrawTextInfo aDrawInf( m_pVsh, *pOutDev, pSI, rTxt, nIndex, nLength );
|
||||
aDrawInf.SetFrm( m_pFrm );
|
||||
aDrawInf.SetFont( m_pFnt );
|
||||
aDrawInf.SetSnapToGrid( SnapToGrid() );
|
||||
aDrawInf.SetKanaComp( nComp );
|
||||
SwPosSize aSize = pFnt->_GetTxtSize( aDrawInf );
|
||||
SwPosSize aSize = m_pFnt->_GetTxtSize( aDrawInf );
|
||||
return aSize;
|
||||
}
|
||||
|
||||
@@ -395,24 +395,24 @@ SwPosSize SwTxtSizeInfo::GetTxtSize() const
|
||||
GetKanaComp() :
|
||||
0 ;
|
||||
|
||||
SwDrawTextInfo aDrawInf( pVsh, *pOut, &rSI, *pTxt, nIdx, nLen );
|
||||
aDrawInf.SetFrm( pFrm );
|
||||
aDrawInf.SetFont( pFnt );
|
||||
SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rSI, *m_pTxt, m_nIdx, m_nLen );
|
||||
aDrawInf.SetFrm( m_pFrm );
|
||||
aDrawInf.SetFont( m_pFnt );
|
||||
aDrawInf.SetSnapToGrid( SnapToGrid() );
|
||||
aDrawInf.SetKanaComp( nComp );
|
||||
return pFnt->_GetTxtSize( aDrawInf );
|
||||
return m_pFnt->_GetTxtSize( aDrawInf );
|
||||
}
|
||||
|
||||
void SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIndex,
|
||||
const xub_StrLen nLength, const sal_uInt16 nComp,
|
||||
sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff ) const
|
||||
{
|
||||
SwDrawTextInfo aDrawInf( pVsh, *pOut, pSI, *pTxt, nIndex, nLength );
|
||||
aDrawInf.SetFrm( pFrm );
|
||||
aDrawInf.SetFont( pFnt );
|
||||
SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, pSI, *m_pTxt, nIndex, nLength );
|
||||
aDrawInf.SetFrm( m_pFrm );
|
||||
aDrawInf.SetFont( m_pFnt );
|
||||
aDrawInf.SetSnapToGrid( SnapToGrid() );
|
||||
aDrawInf.SetKanaComp( nComp );
|
||||
SwPosSize aSize = pFnt->_GetTxtSize( aDrawInf );
|
||||
SwPosSize aSize = m_pFnt->_GetTxtSize( aDrawInf );
|
||||
nMaxSizeDiff = (sal_uInt16)aDrawInf.GetKanaDiff();
|
||||
nMinSize = aSize.Width();
|
||||
}
|
||||
@@ -424,16 +424,16 @@ xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
|
||||
const SwScriptInfo& rScriptInfo =
|
||||
( (SwParaPortion*)GetParaPortion() )->GetScriptInfo();
|
||||
|
||||
OSL_ENSURE( pRef == pOut, "GetTxtBreak is supposed to use the RefDev" );
|
||||
SwDrawTextInfo aDrawInf( pVsh, *pOut, &rScriptInfo,
|
||||
*pTxt, GetIdx(), nMaxLen );
|
||||
aDrawInf.SetFrm( pFrm );
|
||||
aDrawInf.SetFont( pFnt );
|
||||
OSL_ENSURE( m_pRef == m_pOut, "GetTxtBreak is supposed to use the RefDev" );
|
||||
SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rScriptInfo,
|
||||
*m_pTxt, GetIdx(), nMaxLen );
|
||||
aDrawInf.SetFrm( m_pFrm );
|
||||
aDrawInf.SetFont( m_pFnt );
|
||||
aDrawInf.SetSnapToGrid( SnapToGrid() );
|
||||
aDrawInf.SetKanaComp( nComp );
|
||||
aDrawInf.SetHyphPos( 0 );
|
||||
|
||||
return pFnt->GetTxtBreak( aDrawInf, nLineWidth );
|
||||
return m_pFnt->GetTxtBreak( aDrawInf, nLineWidth );
|
||||
}
|
||||
|
||||
xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
|
||||
@@ -444,16 +444,16 @@ xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
|
||||
const SwScriptInfo& rScriptInfo =
|
||||
( (SwParaPortion*)GetParaPortion() )->GetScriptInfo();
|
||||
|
||||
OSL_ENSURE( pRef == pOut, "GetTxtBreak is supposed to use the RefDev" );
|
||||
SwDrawTextInfo aDrawInf( pVsh, *pOut, &rScriptInfo,
|
||||
*pTxt, GetIdx(), nMaxLen );
|
||||
aDrawInf.SetFrm( pFrm );
|
||||
aDrawInf.SetFont( pFnt );
|
||||
OSL_ENSURE( m_pRef == m_pOut, "GetTxtBreak is supposed to use the RefDev" );
|
||||
SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rScriptInfo,
|
||||
*m_pTxt, GetIdx(), nMaxLen );
|
||||
aDrawInf.SetFrm( m_pFrm );
|
||||
aDrawInf.SetFont( m_pFnt );
|
||||
aDrawInf.SetSnapToGrid( SnapToGrid() );
|
||||
aDrawInf.SetKanaComp( nComp );
|
||||
aDrawInf.SetHyphPos( &rExtraCharPos );
|
||||
|
||||
return pFnt->GetTxtBreak( aDrawInf, nLineWidth );
|
||||
return m_pFnt->GetTxtBreak( aDrawInf, nLineWidth );
|
||||
}
|
||||
|
||||
void SwTxtPaintInfo::CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPaint )
|
||||
@@ -474,8 +474,8 @@ void SwTxtPaintInfo::CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPain
|
||||
#endif
|
||||
}
|
||||
|
||||
SwTxtPaintInfo::SwTxtPaintInfo( const SwTxtPaintInfo &rInf, const OUString* pTxt_ )
|
||||
: SwTxtSizeInfo( rInf, pTxt_ ),
|
||||
SwTxtPaintInfo::SwTxtPaintInfo( const SwTxtPaintInfo &rInf, const OUString* pTxt )
|
||||
: SwTxtSizeInfo( rInf, pTxt ),
|
||||
pWrongList( rInf.GetpWrongList() ),
|
||||
pGrammarCheckList( rInf.GetGrammarCheckList() ),
|
||||
pSmartTags( rInf.GetSmartTags() ), // SMARTTAGS
|
||||
@@ -576,7 +576,7 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
|
||||
if ( GetTxtFrm()->IsVertical() )
|
||||
GetTxtFrm()->SwitchHorizontalToVertical( aPoint );
|
||||
|
||||
pBlink->Insert( aPoint, &rPor, GetTxtFrm(), pFnt->GetOrientation() );
|
||||
pBlink->Insert( aPoint, &rPor, GetTxtFrm(), m_pFnt->GetOrientation() );
|
||||
|
||||
if( !pBlink->IsVisible() )
|
||||
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
|
||||
|
||||
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 );
|
||||
|
||||
aDrawInf.SetLeft( GetPaintRect().Left() );
|
||||
aDrawInf.SetRight( GetPaintRect().Right() );
|
||||
aDrawInf.SetUnderFnt( pUnderFnt );
|
||||
aDrawInf.SetUnderFnt( m_pUnderFnt );
|
||||
|
||||
const long nSpaceAdd = ( rPor.IsBlankPortion() || rPor.IsDropPortion() ||
|
||||
rPor.InNumberGrp() ) ? 0 : GetSpaceAdd();
|
||||
@@ -630,7 +630,7 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
|
||||
aDrawInf.SetKanaComp( nComp );
|
||||
|
||||
// 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
|
||||
aDrawInf.SetFrm( GetTxtFrm() );
|
||||
// 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 );
|
||||
if( bKern )
|
||||
pFnt->_DrawStretchText( aDrawInf );
|
||||
m_pFnt->_DrawStretchText( aDrawInf );
|
||||
else
|
||||
{
|
||||
aDrawInf.SetWrong( bTmpWrong ? pWrongList : NULL );
|
||||
aDrawInf.SetGrammarCheck( bTmpGrammarCheck ? pGrammarCheckList : NULL );
|
||||
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();
|
||||
|
||||
// Font is generated only once:
|
||||
static SwFont* pFnt = 0;
|
||||
if ( ! pFnt )
|
||||
static SwFont* m_pFnt = 0;
|
||||
if ( ! m_pFnt )
|
||||
{
|
||||
pFnt = new SwFont( *pOldFnt );
|
||||
pFnt->SetFamily( FAMILY_DONTKNOW, pFnt->GetActual() );
|
||||
pFnt->SetName( numfunc::GetDefBulletFontname(), pFnt->GetActual() );
|
||||
pFnt->SetStyleName( aEmptyStr, pFnt->GetActual() );
|
||||
pFnt->SetCharSet( RTL_TEXTENCODING_SYMBOL, pFnt->GetActual() );
|
||||
m_pFnt = new SwFont( *pOldFnt );
|
||||
m_pFnt->SetFamily( FAMILY_DONTKNOW, m_pFnt->GetActual() );
|
||||
m_pFnt->SetName( numfunc::GetDefBulletFontname(), m_pFnt->GetActual() );
|
||||
m_pFnt->SetStyleName( aEmptyStr, m_pFnt->GetActual() );
|
||||
m_pFnt->SetCharSet( RTL_TEXTENCODING_SYMBOL, m_pFnt->GetActual() );
|
||||
}
|
||||
|
||||
// Some of the current values are set at the font:
|
||||
if ( ! bRotate )
|
||||
pFnt->SetVertical( 0, rInf.GetTxtFrm()->IsVertical() );
|
||||
m_pFnt->SetVertical( 0, rInf.GetTxtFrm()->IsVertical() );
|
||||
else
|
||||
pFnt->SetVertical( pOldFnt->GetOrientation() );
|
||||
m_pFnt->SetVertical( pOldFnt->GetOrientation() );
|
||||
|
||||
if ( pCol )
|
||||
pFnt->SetColor( *pCol );
|
||||
m_pFnt->SetColor( *pCol );
|
||||
else
|
||||
pFnt->SetColor( pOldFnt->GetColor() );
|
||||
m_pFnt->SetColor( pOldFnt->GetColor() );
|
||||
|
||||
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
|
||||
const sal_uInt16 nDir = pFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
|
||||
const sal_uInt16 nDir = m_pFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
|
||||
SwTwips nMaxWidth = 0;
|
||||
switch ( nDir )
|
||||
{
|
||||
@@ -825,14 +825,14 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
|
||||
const SwTwips nOldWidth = aFontSize.Width();
|
||||
|
||||
// new height for font
|
||||
const sal_uInt8 nAct = pFnt->GetActual();
|
||||
aFontSize.Height() = ( 100 * pFnt->GetSize( nAct ).Height() ) / nFactor;
|
||||
aFontSize.Width() = ( 100 * pFnt->GetSize( nAct).Width() ) / nFactor;
|
||||
const sal_uInt8 nAct = m_pFnt->GetActual();
|
||||
aFontSize.Height() = ( 100 * m_pFnt->GetSize( nAct ).Height() ) / nFactor;
|
||||
aFontSize.Width() = ( 100 * m_pFnt->GetSize( nAct).Width() ) / nFactor;
|
||||
|
||||
if ( !aFontSize.Width() && !aFontSize.Height() )
|
||||
break;
|
||||
|
||||
pFnt->SetSize( aFontSize, nAct );
|
||||
m_pFnt->SetSize( aFontSize, nAct );
|
||||
|
||||
aFontSize = rInf.GetTxtSize( aTmp ).SvLSize();
|
||||
|
||||
@@ -881,13 +881,13 @@ void SwTxtPaintInfo::DrawRect( const SwRect &rRect, sal_Bool bNoGraphic,
|
||||
{
|
||||
if( aTxtFly.IsOn() )
|
||||
((SwTxtPaintInfo*)this)->GetTxtFly()->
|
||||
DrawFlyRect( pOut, rRect, *this, bNoGraphic );
|
||||
DrawFlyRect( m_pOut, rRect, *this, bNoGraphic );
|
||||
else if ( bNoGraphic )
|
||||
pOut->DrawRect( rRect.SVRect() );
|
||||
m_pOut->DrawRect( rRect.SVRect() );
|
||||
else
|
||||
{
|
||||
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
|
||||
{
|
||||
if( OnWin() && pOpt->IsPostIts() )
|
||||
if( OnWin() && m_pOpt->IsPostIts() )
|
||||
{
|
||||
Size aSize;
|
||||
Point aTmp;
|
||||
|
||||
const sal_uInt16 nPostItsWidth = pOpt->GetPostItsWidth( GetOut() );
|
||||
const sal_uInt16 nFontHeight = pFnt->GetHeight( pVsh, *GetOut() );
|
||||
const sal_uInt16 nFontAscent = pFnt->GetAscent( pVsh, *GetOut() );
|
||||
const sal_uInt16 nPostItsWidth = m_pOpt->GetPostItsWidth( GetOut() );
|
||||
const sal_uInt16 nFontHeight = m_pFnt->GetHeight( m_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 :
|
||||
aSize.Width() = nPostItsWidth;
|
||||
@@ -1009,7 +1009,7 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const
|
||||
GetTxtFrm()->SwitchHorizontalToVertical( aTmpRect );
|
||||
|
||||
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() &&
|
||||
!GetOpt().IsPagePreview())
|
||||
{
|
||||
OutputDevice* pOut_ = (OutputDevice*)GetOut();
|
||||
pOut_->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
pOut_->SetFillColor( SwViewOption::GetFieldShadingsColor() );
|
||||
pOut_->SetLineColor();
|
||||
pOut_->DrawRect( aIntersect.SVRect() );
|
||||
pOut_->Pop();
|
||||
OutputDevice* pOut = (OutputDevice*)GetOut();
|
||||
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
pOut->SetFillColor( SwViewOption::GetFieldShadingsColor() );
|
||||
pOut->SetLineColor();
|
||||
pOut->DrawRect( aIntersect.SVRect() );
|
||||
pOut->Pop();
|
||||
}
|
||||
const int delta=10;
|
||||
Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta);
|
||||
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
pOut->SetLineColor( Color(0, 0, 0));
|
||||
pOut->SetFillColor();
|
||||
pOut->DrawRect( r );
|
||||
m_pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
m_pOut->SetLineColor( Color(0, 0, 0));
|
||||
m_pOut->SetFillColor();
|
||||
m_pOut->DrawRect( r );
|
||||
if (checked) {
|
||||
pOut->DrawLine(r.TopLeft(), r.BottomRight());
|
||||
pOut->DrawLine(r.TopRight(), r.BottomLeft());
|
||||
m_pOut->DrawLine(r.TopLeft(), r.BottomRight());
|
||||
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() )
|
||||
{
|
||||
OutputDevice* pTmpOut = (OutputDevice*)GetOut();
|
||||
pTmpOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
OutputDevice* pOut = (OutputDevice*)GetOut();
|
||||
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
|
||||
// For dark background we do not want to have a filled rectangle
|
||||
if ( GetVsh() && GetVsh()->GetWin() && lcl_IsDarkBackground( *this ) )
|
||||
{
|
||||
pTmpOut->SetLineColor( SwViewOption::GetFontColor().GetColor() );
|
||||
pOut->SetLineColor( SwViewOption::GetFontColor().GetColor() );
|
||||
}
|
||||
else
|
||||
{
|
||||
pTmpOut->SetFillColor( SwViewOption::GetFieldShadingsColor() );
|
||||
pTmpOut->SetLineColor();
|
||||
pOut->SetFillColor( SwViewOption::GetFieldShadingsColor() );
|
||||
pOut->SetLineColor();
|
||||
}
|
||||
|
||||
DrawRect( aIntersect, sal_True );
|
||||
pTmpOut->Pop();
|
||||
pOut->Pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1078,7 +1078,7 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
|
||||
CalcRect( rPor, &aIntersect, 0 );
|
||||
if(aIntersect.HasArea())
|
||||
{
|
||||
SwTxtNode *pNd = pFrm->GetTxtNode();
|
||||
SwTxtNode *pNd = m_pFrm->GetTxtNode();
|
||||
const ::sw::mark::IFieldmark* pFieldmark = NULL;
|
||||
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;
|
||||
CalcRect( rPor, 0, &aIntersect );
|
||||
@@ -1144,7 +1144,7 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
|
||||
|
||||
pTmpOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
|
||||
pTmpOut->SetFillColor( *pFnt->GetBackColor() );
|
||||
pTmpOut->SetFillColor( *m_pFnt->GetBackColor() );
|
||||
pTmpOut->SetLineColor();
|
||||
|
||||
DrawRect( aIntersect, sal_True, sal_False );
|
||||
@@ -1175,7 +1175,7 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
|
||||
!GetOpt().IsReadonly() &&
|
||||
SwViewOption::IsFieldShadings() &&
|
||||
(POR_NUMBER != nWhich ||
|
||||
pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615#
|
||||
m_pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615#
|
||||
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;
|
||||
InitHyph( bNew );
|
||||
// Set language in the Hyphenator
|
||||
if( pFnt )
|
||||
pFnt->ChgPhysFnt( pVsh, *pOut );
|
||||
if( m_pFnt )
|
||||
m_pFnt->ChgPhysFnt( m_pVsh, *m_pOut );
|
||||
}
|
||||
return bOld;
|
||||
}
|
||||
|
@@ -157,51 +157,51 @@ class SwTxtSizeInfo : public SwTxtInfo
|
||||
protected:
|
||||
// during formatting, a small database is built, mapping portion pointers
|
||||
// to their maximum size (used for kana compression)
|
||||
SwTxtPortionMap aMaxWidth;
|
||||
SwTxtPortionMap m_aMaxWidth;
|
||||
// for each line, an array of compression values is calculated
|
||||
// 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
|
||||
OutputDevice* pOut;
|
||||
OutputDevice* pRef;
|
||||
// m_pOut is the output device, m_pRef is the device used for formatting
|
||||
OutputDevice* m_pOut;
|
||||
OutputDevice* m_pRef;
|
||||
|
||||
SwFont *pFnt;
|
||||
SwUnderlineFont *pUnderFnt; // Font for underlining
|
||||
SwTxtFrm *pFrm;
|
||||
const SwViewOption *pOpt;
|
||||
const OUString *pTxt;
|
||||
sal_Int32 nIdx, nLen;
|
||||
sal_uInt16 nKanaIdx;
|
||||
bool bOnWin : 1;
|
||||
bool bNotEOL : 1;
|
||||
bool bURLNotify : 1;
|
||||
bool bStopUnderFlow : 1; // Underflow was stopped e.g. by a FlyPortion
|
||||
bool bFtnInside : 1; // the current line contains a footnote
|
||||
bool bOtherThanFtnInside : 1; // the current line contains another portion than a footnote portion.
|
||||
SwFont *m_pFnt;
|
||||
SwUnderlineFont *m_pUnderFnt; // Font for underlining
|
||||
SwTxtFrm *m_pFrm;
|
||||
const SwViewOption *m_pOpt;
|
||||
const OUString *m_pTxt;
|
||||
sal_Int32 m_nIdx, m_nLen;
|
||||
sal_uInt16 m_nKanaIdx;
|
||||
bool m_bOnWin : 1;
|
||||
bool m_bNotEOL : 1;
|
||||
bool m_bURLNotify : 1;
|
||||
bool m_bStopUnderFlow : 1; // Underflow was stopped e.g. by a FlyPortion
|
||||
bool m_bFtnInside : 1; // the current line contains a footnote
|
||||
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
|
||||
bool bMulti : 1; // inside a multiportion
|
||||
bool bFirstMulti : 1; // this flag is used for two purposes:
|
||||
bool m_bMulti : 1; // inside a multiportion
|
||||
bool m_bFirstMulti : 1; // this flag is used for two purposes:
|
||||
// - the multiportion is the first lineportion
|
||||
// - indicates, if we are currently in second
|
||||
// line of multi portion
|
||||
bool bRuby : 1; // during the formatting of a phonetic line
|
||||
bool bHanging : 1; // formatting of hanging punctuation allowed
|
||||
bool bScriptSpace : 1; // space between different scripts (Asian/Latin)
|
||||
bool bForbiddenChars : 1; // Forbidden start/endline characters
|
||||
bool bSnapToGrid : 1; // paragraph snaps to grid
|
||||
sal_uInt8 nDirection : 2; // writing direction: 0/90/180/270 degree
|
||||
bool m_bRuby : 1; // during the formatting of a phonetic line
|
||||
bool m_bHanging : 1; // formatting of hanging punctuation allowed
|
||||
bool m_bScriptSpace : 1; // space between different scripts (Asian/Latin)
|
||||
bool m_bForbiddenChars : 1; // Forbidden start/endline characters
|
||||
bool m_bSnapToGrid : 1; // paragraph snaps to grid
|
||||
sal_uInt8 m_nDirection : 2; // writing direction: 0/90/180/270 degree
|
||||
|
||||
protected:
|
||||
void CtorInitTxtSizeInfo( SwTxtFrm *pFrm, SwFont *pFnt = 0,
|
||||
const xub_StrLen nIdx = 0,
|
||||
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:
|
||||
SwTxtSizeInfo( const SwTxtSizeInfo &rInf );
|
||||
SwTxtSizeInfo( const SwTxtSizeInfo &rInf, const OUString* pTxt_,
|
||||
SwTxtSizeInfo( const SwTxtSizeInfo &rInf, const OUString* pTxt,
|
||||
const sal_Int32 nIdx = 0,
|
||||
const xub_StrLen nLen = STRING_LEN );
|
||||
|
||||
@@ -215,57 +215,57 @@ public:
|
||||
// rPos will set to the end of the multi-line part.
|
||||
SwMultiCreator* GetMultiCreator( xub_StrLen &rPos, SwMultiPortion* pM ) const;
|
||||
|
||||
inline bool OnWin() const { return bOnWin; }
|
||||
inline void SetOnWin( const bool bNew ) { bOnWin = bNew; }
|
||||
inline bool NotEOL() const { return bNotEOL; }
|
||||
inline void SetNotEOL( const bool bNew ) { bNotEOL = bNew; }
|
||||
inline bool URLNotify() const { return bURLNotify; }
|
||||
inline void SetURLNotify( const bool bNew ) { bURLNotify = bNew; }
|
||||
inline bool StopUnderFlow() const { return bStopUnderFlow; }
|
||||
inline void SetStopUnderFlow( const bool bNew ) { bStopUnderFlow = bNew; }
|
||||
inline bool IsFtnInside() const { return bFtnInside; }
|
||||
inline void SetFtnInside( const bool bNew ) { bFtnInside = bNew; }
|
||||
inline bool IsOtherThanFtnInside() const { return bOtherThanFtnInside; }
|
||||
inline void SetOtherThanFtnInside( const bool bNew ) { bOtherThanFtnInside = bNew; }
|
||||
inline bool IsMulti() const { return bMulti; }
|
||||
inline void SetMulti( const bool bNew ) { bMulti = bNew; }
|
||||
inline bool IsFirstMulti() const { return bFirstMulti; }
|
||||
inline void SetFirstMulti( const bool bNew ) { bFirstMulti = bNew; }
|
||||
inline bool IsRuby() const { return bRuby; }
|
||||
inline void SetRuby( const bool bNew ) { bRuby = bNew; }
|
||||
inline bool IsHanging() const { return bHanging; }
|
||||
inline void SetHanging( const bool bNew ) { bHanging = bNew; }
|
||||
inline bool HasScriptSpace() const { return bScriptSpace; }
|
||||
inline void SetScriptSpace( const bool bNew ) { bScriptSpace = bNew; }
|
||||
inline bool HasForbiddenChars() const { return bForbiddenChars; }
|
||||
inline void SetForbiddenChars( const bool bN ) { bForbiddenChars = bN; }
|
||||
inline bool SnapToGrid() const { return bSnapToGrid; }
|
||||
inline void SetSnapToGrid( const bool bN ) { bSnapToGrid = bN; }
|
||||
inline sal_uInt8 GetDirection() const { return nDirection; }
|
||||
inline void SetDirection( const sal_uInt8 nNew ) { nDirection = nNew; }
|
||||
inline sal_Bool IsRotated() const { return 0 != ( 1 & nDirection ); }
|
||||
inline bool OnWin() const { return m_bOnWin; }
|
||||
inline void SetOnWin( const bool bNew ) { m_bOnWin = bNew; }
|
||||
inline bool NotEOL() const { return m_bNotEOL; }
|
||||
inline void SetNotEOL( const bool bNew ) { m_bNotEOL = bNew; }
|
||||
inline bool URLNotify() const { return m_bURLNotify; }
|
||||
inline void SetURLNotify( const bool bNew ) { m_bURLNotify = bNew; }
|
||||
inline bool StopUnderFlow() const { return m_bStopUnderFlow; }
|
||||
inline void SetStopUnderFlow( const bool bNew ) { m_bStopUnderFlow = bNew; }
|
||||
inline bool IsFtnInside() const { return m_bFtnInside; }
|
||||
inline void SetFtnInside( const bool bNew ) { m_bFtnInside = bNew; }
|
||||
inline bool IsOtherThanFtnInside() const { return m_bOtherThanFtnInside; }
|
||||
inline void SetOtherThanFtnInside( const bool bNew ) { m_bOtherThanFtnInside = bNew; }
|
||||
inline bool IsMulti() const { return m_bMulti; }
|
||||
inline void SetMulti( const bool bNew ) { m_bMulti = bNew; }
|
||||
inline bool IsFirstMulti() const { return m_bFirstMulti; }
|
||||
inline void SetFirstMulti( const bool bNew ) { m_bFirstMulti = bNew; }
|
||||
inline bool IsRuby() const { return m_bRuby; }
|
||||
inline void SetRuby( const bool bNew ) { m_bRuby = bNew; }
|
||||
inline bool IsHanging() const { return m_bHanging; }
|
||||
inline void SetHanging( const bool bNew ) { m_bHanging = bNew; }
|
||||
inline bool HasScriptSpace() const { return m_bScriptSpace; }
|
||||
inline void SetScriptSpace( const bool bNew ) { m_bScriptSpace = bNew; }
|
||||
inline bool HasForbiddenChars() const { return m_bForbiddenChars; }
|
||||
inline void SetForbiddenChars( const bool bN ) { m_bForbiddenChars = bN; }
|
||||
inline bool SnapToGrid() const { return m_bSnapToGrid; }
|
||||
inline void SetSnapToGrid( const bool bN ) { m_bSnapToGrid = bN; }
|
||||
inline sal_uInt8 GetDirection() const { return m_nDirection; }
|
||||
inline void SetDirection( const sal_uInt8 nNew ) { m_nDirection = nNew; }
|
||||
inline sal_Bool IsRotated() const { return 0 != ( 1 & m_nDirection ); }
|
||||
|
||||
inline ViewShell *GetVsh() { return pVsh; }
|
||||
inline const ViewShell *GetVsh() const { return pVsh; }
|
||||
inline ViewShell *GetVsh() { return m_pVsh; }
|
||||
inline const ViewShell *GetVsh() const { return m_pVsh; }
|
||||
|
||||
inline OutputDevice *GetOut() { return pOut; }
|
||||
inline const OutputDevice *GetOut() const { return pOut; }
|
||||
inline void SetOut( OutputDevice* pNewOut ) { pOut = pNewOut; }
|
||||
inline OutputDevice *GetOut() { return m_pOut; }
|
||||
inline const OutputDevice *GetOut() const { return m_pOut; }
|
||||
inline void SetOut( OutputDevice* pNewOut ) { m_pOut = pNewOut; }
|
||||
|
||||
inline OutputDevice *GetRefDev() { return pRef; }
|
||||
inline const OutputDevice *GetRefDev() const { return pRef; }
|
||||
inline OutputDevice *GetRefDev() { return m_pRef; }
|
||||
inline const OutputDevice *GetRefDev() const { return m_pRef; }
|
||||
|
||||
inline SwFont *GetFont() { return pFnt; }
|
||||
inline const SwFont *GetFont() const { return pFnt; }
|
||||
inline void SetFont( SwFont *pNew ) { pFnt = pNew; }
|
||||
inline SwFont *GetFont() { return m_pFnt; }
|
||||
inline const SwFont *GetFont() const { return m_pFnt; }
|
||||
inline void SetFont( SwFont *pNew ) { m_pFnt = pNew; }
|
||||
void SelectFont();
|
||||
inline void SetUnderFnt( SwUnderlineFont* pNew ) { pUnderFnt = pNew; }
|
||||
inline SwUnderlineFont* GetUnderFnt() const { return pUnderFnt; }
|
||||
inline void SetUnderFnt( SwUnderlineFont* pNew ) { m_pUnderFnt = pNew; }
|
||||
inline SwUnderlineFont* GetUnderFnt() const { return m_pUnderFnt; }
|
||||
|
||||
inline const SwViewOption &GetOpt() const { return *pOpt; }
|
||||
inline const OUString &GetTxt() const { return *pTxt; }
|
||||
inline const SwViewOption &GetOpt() const { return *m_pOpt; }
|
||||
inline const OUString &GetTxt() const { return *m_pTxt; }
|
||||
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;
|
||||
|
||||
@@ -296,67 +296,67 @@ public:
|
||||
|
||||
inline KSHORT GetAscent() const;
|
||||
|
||||
inline sal_Int32 GetIdx() const { return nIdx; }
|
||||
inline void SetIdx( const sal_Int32 nNew ) { nIdx = nNew; }
|
||||
inline sal_Int32 GetLen() const { return nLen; }
|
||||
inline void SetLen( const sal_Int32 nNew ) { nLen = nNew; }
|
||||
inline void SetTxt( const OUString &rNew ){ pTxt = &rNew; }
|
||||
inline sal_Int32 GetIdx() const { return m_nIdx; }
|
||||
inline void SetIdx( const sal_Int32 nNew ) { m_nIdx = nNew; }
|
||||
inline sal_Int32 GetLen() const { return m_nLen; }
|
||||
inline void SetLen( const sal_Int32 nNew ) { m_nLen = nNew; }
|
||||
inline void SetTxt( const OUString &rNew ){ m_pTxt = &rNew; }
|
||||
|
||||
friend SvStream &operator<<( SvStream &rOS, const SwTxtSizeInfo &rInf );
|
||||
|
||||
// No Bullets for the symbol font!
|
||||
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;
|
||||
|
||||
// Home is where Your heart is...
|
||||
inline SwTxtFrm *GetTxtFrm() { return pFrm; }
|
||||
inline const SwTxtFrm *GetTxtFrm() const { return pFrm; }
|
||||
inline SwTxtFrm *GetTxtFrm() { return m_pFrm; }
|
||||
inline const SwTxtFrm *GetTxtFrm() const { return m_pFrm; }
|
||||
|
||||
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 );
|
||||
|
||||
// If Kana Compression is enabled, a minimum and maximum portion width
|
||||
// is calculated. We format lines with minimal size and share remaining
|
||||
// space among compressed kanas.
|
||||
// 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 )
|
||||
{
|
||||
aMaxWidth.insert( ::std::make_pair( nKey, nVal ) );
|
||||
m_aMaxWidth.insert( ::std::make_pair( nKey, nVal ) );
|
||||
};
|
||||
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;
|
||||
else
|
||||
return 0;
|
||||
};
|
||||
inline void ResetMaxWidthDiff()
|
||||
{
|
||||
aMaxWidth.clear();
|
||||
m_aMaxWidth.clear();
|
||||
};
|
||||
inline sal_Bool CompressLine()
|
||||
{
|
||||
return (sal_Bool)!aMaxWidth.empty();
|
||||
return (sal_Bool)!m_aMaxWidth.empty();
|
||||
};
|
||||
|
||||
//
|
||||
// Feature: Kana Compression
|
||||
//
|
||||
inline MSHORT GetKanaIdx() const { return nKanaIdx; }
|
||||
inline void ResetKanaIdx(){ nKanaIdx = 0; }
|
||||
inline void SetKanaIdx( MSHORT nNew ) { nKanaIdx = nNew; }
|
||||
inline void IncKanaIdx() { ++nKanaIdx; }
|
||||
inline void SetKanaComp( std::deque<sal_uInt16> *pNew ){ pKanaComp = pNew; }
|
||||
inline std::deque<sal_uInt16>* GetpKanaComp() const { return pKanaComp; }
|
||||
inline MSHORT GetKanaIdx() const { return m_nKanaIdx; }
|
||||
inline void ResetKanaIdx(){ m_nKanaIdx = 0; }
|
||||
inline void SetKanaIdx( MSHORT nNew ) { m_nKanaIdx = nNew; }
|
||||
inline void IncKanaIdx() { ++m_nKanaIdx; }
|
||||
inline void SetKanaComp( std::deque<sal_uInt16> *pNew ){ m_pKanaComp = pNew; }
|
||||
inline std::deque<sal_uInt16>* GetpKanaComp() const { return m_pKanaComp; }
|
||||
inline sal_uInt16 GetKanaComp() const
|
||||
{ return ( pKanaComp && nKanaIdx < pKanaComp->size() )
|
||||
? (*pKanaComp)[nKanaIdx] : 0; }
|
||||
{ return ( m_pKanaComp && m_nKanaIdx < m_pKanaComp->size() )
|
||||
? (*m_pKanaComp)[m_nKanaIdx] : 0; }
|
||||
|
||||
#ifdef DBG_UTIL
|
||||
sal_Bool IsOptDbg() const;
|
||||
@@ -392,10 +392,10 @@ class SwTxtPaintInfo : public SwTxtSizeInfo
|
||||
|
||||
protected:
|
||||
#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);}
|
||||
#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;}
|
||||
#endif
|
||||
public:
|
||||
@@ -781,19 +781,19 @@ public:
|
||||
|
||||
inline KSHORT SwTxtSizeInfo::GetAscent() const
|
||||
{
|
||||
OSL_ENSURE( GetOut(), "SwTxtSizeInfo::GetAscent() without pOut" );
|
||||
return ((SwFont*)GetFont())->GetAscent( pVsh, *GetOut() );
|
||||
OSL_ENSURE( GetOut(), "SwTxtSizeInfo::GetAscent() without m_pOut" );
|
||||
return ((SwFont*)GetFont())->GetAscent( m_pVsh, *GetOut() );
|
||||
}
|
||||
|
||||
inline KSHORT SwTxtSizeInfo::GetTxtHeight() const
|
||||
{
|
||||
OSL_ENSURE( GetOut(), "SwTxtSizeInfo::GetTxtHeight() without pOut" );
|
||||
return ((SwFont*)GetFont())->GetHeight( pVsh, *GetOut() );
|
||||
OSL_ENSURE( GetOut(), "SwTxtSizeInfo::GetTxtHeight() without m_pOut" );
|
||||
return ((SwFont*)GetFont())->GetHeight( m_pVsh, *GetOut() );
|
||||
}
|
||||
|
||||
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,
|
||||
@@ -801,7 +801,7 @@ inline SwPosSize SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI,
|
||||
const xub_StrLen nNewLen,
|
||||
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,
|
||||
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,
|
||||
@@ -840,7 +840,7 @@ inline void SwTxtPaintInfo::DrawMarkedText( const SwLinePortion &rPor,
|
||||
const sal_Bool bSmartTags,
|
||||
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 );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@@ -911,14 +911,14 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
|
||||
|
||||
const SvxCharRotateItem* pRotate = NULL;
|
||||
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 ) &&
|
||||
((SvxCharRotateItem*)pRotItem)->GetValue() )
|
||||
pRotate = (SvxCharRotateItem*)pRotItem;
|
||||
else
|
||||
pRotItem = NULL;
|
||||
const SvxTwoLinesItem* p2Lines = NULL;
|
||||
const SwTxtNode *pLclTxtNode = pFrm->GetTxtNode();
|
||||
const SwTxtNode *pLclTxtNode = m_pFrm->GetTxtNode();
|
||||
if( !pLclTxtNode )
|
||||
return NULL;
|
||||
const SfxPoolItem* pItem;
|
||||
|
@@ -43,14 +43,14 @@ using namespace ::com::sun::star::i18n;
|
||||
Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
|
||||
const XubString &rTxt, const MSHORT nMinTrail )
|
||||
{
|
||||
if( rTxt.Len() < 4 || pFnt->IsSymbol(pVsh) )
|
||||
if( rTxt.Len() < 4 || m_pFnt->IsSymbol(m_pVsh) )
|
||||
return 0;
|
||||
Reference< XHyphenator > xHyph = ::GetHyphenator();
|
||||
Reference< XHyphenatedWord > xHyphWord;
|
||||
|
||||
if( xHyph.is() )
|
||||
xHyphWord = xHyph->hyphenate( OUString(rTxt),
|
||||
g_pBreakIt->GetLocale( pFnt->GetLanguage() ),
|
||||
g_pBreakIt->GetLocale( m_pFnt->GetLanguage() ),
|
||||
rTxt.Len() - nMinTrail, GetHyphValues() );
|
||||
return xHyphWord;
|
||||
|
||||
|
Reference in New Issue
Block a user