diff options
author | Malte Timmermann <mt@openoffice.org> | 2002-02-28 17:51:59 +0000 |
---|---|---|
committer | Malte Timmermann <mt@openoffice.org> | 2002-02-28 17:51:59 +0000 |
commit | ddf78c379e669323da931adc61c8b0f1d62a19e7 (patch) | |
tree | 4840101832e307c7a043c059560bdef9bcf8608b /svx/source/outliner | |
parent | 0010ca46d2896e375b113575e9d2e7b8ee79afb0 (diff) |
#97032# GetBulletInfo
Diffstat (limited to 'svx/source/outliner')
-rw-r--r-- | svx/source/outliner/outliner.cxx | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx index 14c24029a51a..d7fd778953a9 100644 --- a/svx/source/outliner/outliner.cxx +++ b/svx/source/outliner/outliner.cxx @@ -2,9 +2,9 @@ * * $RCSfile: outliner.cxx,v $ * - * $Revision: 1.36 $ + * $Revision: 1.37 $ * - * last change: $Author: mt $ $Date: 2002-02-25 16:10:51 $ + * last change: $Author: mt $ $Date: 2002-02-28 18:51:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1873,6 +1873,36 @@ void Outliner::OverwriteLevel0Bullet( const SvxNumberFormat& rNumberFormat ) pOverwriteLevel0Bullet = new SvxNumberFormat( rNumberFormat ); } +EBulletInfo Outliner::GetBulletInfo( USHORT nPara ) +{ + EBulletInfo aInfo; + + aInfo.nParagraph = nPara; + aInfo.bVisible = ImplHasBullet( nPara ); + + const SvxNumberFormat* pFmt = ImplGetBullet( nPara ); + aInfo.nType = pFmt ? pFmt->GetNumberingType() : 0; + + if( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) + { + aInfo.aText = ImplGetBulletText( nPara ); + } + else if ( pFmt && pFmt->GetBrush()->GetGraphicObject() ) + { + aInfo.aGraphic = pFmt->GetBrush()->GetGraphicObject()->GetGraphic(); + } + + if ( aInfo.bVisible ) + { + aInfo.aBounds = ImpCalcBulletArea( nPara, TRUE ); + Point aParaXY = pEditEngine->GetDocPosTopLeft( nPara ); + aInfo.aBounds.Top() += aParaXY.Y(); + aInfo.aBounds.Bottom() += aParaXY.Y(); + } + + return aInfo; +} + XubString Outliner::GetText( Paragraph* pParagraph, ULONG nCount ) const { DBG_CHKTHIS(Outliner,0); |