diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-05 17:49:45 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-05 17:49:45 +0000 |
commit | 0c478a57c3e92805a5ba4d4a534117cf24f6bec6 (patch) | |
tree | e98d61db3671b47bb0aebed6a5885295666fa146 /svx/source/outliner | |
parent | 91b4358ce216334236fe25a165ba85e08de89234 (diff) |
CWS-TOOLING: integrate CWS overline3
2008-12-11 15:24:46 +0100 fredrikh r265314 : i97099
2008-12-11 15:20:37 +0100 fredrikh r265313 : i97099
2008-12-11 15:18:00 +0100 fredrikh r265312 : i97099
2008-12-11 15:17:00 +0100 fredrikh r265311 : i97099
2008-12-11 15:13:20 +0100 fredrikh r265309 : i97144
2008-12-11 15:06:24 +0100 fredrikh r265306 : i97099
2008-11-24 10:41:42 +0100 fme r264213 : #i5991# Overline support
2008-11-24 10:39:53 +0100 fme r264212 : #i5991# Overline support
2008-11-24 10:02:13 +0100 fme r264209 : #5991# Overline support
2008-11-24 10:01:26 +0100 fme r264208 : #5991# Overline support
2008-11-24 09:59:11 +0100 fme r264207 : #5991# Overline support
2008-11-24 09:57:11 +0100 fme r264206 : #5991# Overline support
2008-11-14 10:36:44 +0100 fme r263667 : CWS-TOOLING: rebase CWS overline3 to trunk@263288 (milestone: DEV300:m35)
2008-11-13 16:12:13 +0100 fme r263649 : #i5991# migrate CWS overline3 to SVN.
Diffstat (limited to 'svx/source/outliner')
-rw-r--r-- | svx/source/outliner/outleeng.cxx | 9 | ||||
-rw-r--r-- | svx/source/outliner/outleeng.hxx | 13 | ||||
-rw-r--r-- | svx/source/outliner/outliner.cxx | 62 |
3 files changed, 44 insertions, 40 deletions
diff --git a/svx/source/outliner/outleeng.cxx b/svx/source/outliner/outleeng.cxx index 5dad2e60b2..3ee790dc44 100644 --- a/svx/source/outliner/outleeng.cxx +++ b/svx/source/outliner/outleeng.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -155,7 +155,7 @@ XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const } // #101498# -void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, +void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, @@ -163,12 +163,13 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rTex bool bEndOfParagraph, bool bEndOfBullet, const ::com::sun::star::lang::Locale* pLocale, + const Color& rOverlineColor, const Color& rTextLineColor) { // why do bullet here at all? Just use GetEditEnginePtr()->PaintingFirstLine // inside of ImpEditEngine::Paint which calls pOwner->PaintBullet with the correct // values for hor and ver. No change for not-layouting (painting). - // changed, bullet rendering now using PaintBullet via + // changed, bullet rendering now using PaintBullet via /* if ( nIndex == 0 ) { // Dann das Bullet 'malen', dort wird bStrippingPortions ausgewertet @@ -197,7 +198,7 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rTex // #101498# pOwner->DrawingText(rStartPos,rText,nTextStart,nTextLen,pDXArray,rFont,nPara,nIndex,nRightToLeft, - pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, bEndOfBullet, pLocale, rTextLineColor); + pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, bEndOfBullet, pLocale, rOverlineColor, rTextLineColor); } void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) diff --git a/svx/source/outliner/outleeng.hxx b/svx/source/outliner/outleeng.hxx index 4fb43dacaa..cf4d7d13a9 100644 --- a/svx/source/outliner/outleeng.hxx +++ b/svx/source/outliner/outleeng.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,9 +43,9 @@ class OutlinerEditEng : public EditEngine Outliner* pOwner; protected: - - // derived from EditEngine. Allows Outliner objetcs to provide - // bullet access to the EditEngine. + + // derived from EditEngine. Allows Outliner objetcs to provide + // bullet access to the EditEngine. virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const; public: @@ -60,7 +60,7 @@ public: // #101498# virtual void DrawingText( - const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, + const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, @@ -68,6 +68,7 @@ public: bool bEndOfParagraph, bool bEndOfBullet, const ::com::sun::star::lang::Locale* pLocale, + const Color& rOverlineColor, const Color& rTextLineColor); virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); @@ -87,7 +88,7 @@ public: virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); // belongs into class Outliner, move there before incompatible update! - Link aOutlinerNotifyHdl; + Link aOutlinerNotifyHdl; NotifyList aNotifyCache; }; diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx index 9e29502f25..d5adb9294a 100644 --- a/svx/source/outliner/outliner.cxx +++ b/svx/source/outliner/outliner.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: outliner.cxx,v $ - * $Revision: 1.74.6.2 $ + * $Revision: 1.75.20.2 $ * * This file is part of OpenOffice.org. * @@ -200,7 +200,7 @@ void Outliner::ParagraphDeleted( USHORT nPara ) Paragraph* pPara = pParaList->GetParagraph( nPara ); if (!pPara) return; - + sal_Int16 nDepth = pPara->GetDepth(); if( !pEditEngine->IsInUndo() ) @@ -244,14 +244,14 @@ void Outliner::Init( USHORT nMode ) case OUTLINERMODE_TEXTOBJECT: case OUTLINERMODE_TITLEOBJECT: break; - + case OUTLINERMODE_OUTLINEOBJECT: nCtrl |= EE_CNTRL_OUTLINER2; break; case OUTLINERMODE_OUTLINEVIEW: nCtrl |= EE_CNTRL_OUTLINER; break; - + default: DBG_ERROR( "Outliner::Init - Invalid Mode!" ); } @@ -694,7 +694,7 @@ void Outliner::SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle ) DBG_CHKTHIS(Outliner,0); Paragraph* pPara = pParaList->GetParagraph( nPara ); if (pPara) - { + { pEditEngine->SetStyleSheet( (USHORT)nPara, pStyle ); pPara->nFlags |= PARAFLAG_SETBULLETTEXT; ImplCheckNumBulletItem( (USHORT) nPara ); @@ -707,7 +707,7 @@ void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible ) DBG_ASSERT( pPara, "SetVisible: pPara = NULL" ); if (pPara) - { + { pPara->bVisible = bVisible; ULONG nPara = pParaList->GetAbsPos( pPara ); pEditEngine->ShowParagraph( (USHORT)nPara, bVisible ); @@ -894,6 +894,7 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const { aBulletFont = aStdFont; aBulletFont.SetUnderline( UNDERLINE_NONE ); + aBulletFont.SetOverline( UNDERLINE_NONE ); aBulletFont.SetStrikeout( STRIKEOUT_NONE ); aBulletFont.SetEmphasisMark( EMPHASISMARK_NONE ); aBulletFont.SetRelief( RELIEF_NONE ); @@ -1016,16 +1017,16 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, aTextPos.Y() -= aMetric.GetDescent(); } - DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().Len(), pBuf, - aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color()); - + DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().Len(), pBuf, + aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color(), Color()); + delete[] pBuf; } else { pOutDev->DrawText( aTextPos, pPara->GetText() ); } - + pOutDev->SetFont( aOldFont ); } else @@ -1057,7 +1058,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, // created DrawBulletInfo and added handling to sdrtextdecomposition.cxx DrawBulletInfo aDrawBulletInfo( *pFmt->GetBrush()->GetGraphicObject(), - aBulletPos, + aBulletPos, pPara->aBulSize); aDrawBulletHdl.Call(&aDrawBulletInfo); @@ -1443,7 +1444,7 @@ const SvxNumberFormat* Outliner::GetNumberFormat( USHORT nPara ) const Paragraph* pPara = pParaList->GetParagraph( nPara ); if (pPara == NULL) return NULL; - + sal_Int16 nDepth = pPara? pPara->GetDepth() : -1; if( nDepth >= 0 ) @@ -1579,7 +1580,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP // the ODF attribut text:space-before which holds the spacing to add to the left of the label const short nSpaceBefore = pFmt->GetAbsLSpace() + pFmt->GetFirstLineOffset(); - + const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&) pEditEngine->GetParaAttrib( nPara, bOutlineMode ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE ); aTopLeft.X() = rLR.GetTxtLeft() + rLR.GetTxtFirstLineOfst() + nSpaceBefore; @@ -1592,7 +1593,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP // Bei zentriert/rechtsbuendig anpassen const SvxAdjustItem& rItem = (const SvxAdjustItem&)pEditEngine->GetParaAttrib( nPara, EE_PARA_JUST ); if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_LEFT ) ) || - ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_RIGHT ) ) ) + ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_RIGHT ) ) ) { aTopLeft.X() = pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth; } @@ -1683,11 +1684,11 @@ EBulletInfo Outliner::GetBulletInfo( USHORT nPara ) aInfo.nType = pFmt ? pFmt->GetNumberingType() : 0; if( pFmt ) - { + { if( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) { aInfo.aText = ImplGetBulletText( nPara ); - + if( pFmt->GetBulletFont() ) aInfo.aFont = *pFmt->GetBulletFont(); } @@ -1696,7 +1697,7 @@ EBulletInfo Outliner::GetBulletInfo( USHORT nPara ) aInfo.aGraphic = pFmt->GetBrush()->GetGraphicObject()->GetGraphic(); } } - + if ( aInfo.bVisible ) { aInfo.aBounds = ImpCalcBulletArea( nPara, TRUE, TRUE ); @@ -1745,7 +1746,7 @@ void Outliner::StripPortions() } // #101498# -void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont, +void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, @@ -1753,16 +1754,17 @@ void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHO bool bEndOfParagraph, bool bEndOfBullet, const ::com::sun::star::lang::Locale* pLocale, + const Color& rOverlineColor, const Color& rTextLineColor) { DBG_CHKTHIS(Outliner,0); - + if(aDrawPortionHdl.IsSet()) { // #101498# - DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector, - pFieldData, pLocale, rTextLineColor, nRightToLeft, bEndOfLine, bEndOfParagraph, bEndOfBullet); - + DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector, + pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft, bEndOfLine, bEndOfParagraph, bEndOfBullet); + aDrawPortionHdl.Call( &aInfo ); } } @@ -1852,7 +1854,7 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar { pPara = pParaList->GetParagraph( nPara ); const sal_Int16 nDepth = pPara->GetDepth(); - + // ignore paragraphs that are below our paragraph if( nDepth > nParaDepth ) continue; @@ -1981,7 +1983,7 @@ String Outliner::ImplGetBulletText( USHORT nPara ) // if( pPara->nFlags & PARAFLAG_SETBULLETTEXT ) ImplCalcBulletText( nPara, FALSE, FALSE ); aRes = pPara->GetText(); - } + } return aRes; } @@ -2031,7 +2033,7 @@ IMPL_LINK( Outliner, EditEngineNotifyHdl, EENotify*, pNotify ) EENotify* pNewNotify = new EENotify( *pNotify ); pEditEngine->aNotifyCache.Insert( pNewNotify, pEditEngine->aNotifyCache.Count() ); } - + return 0; } @@ -2097,8 +2099,8 @@ bool Outliner::HasParaFlag( const Paragraph* pPara, sal_uInt16 nFlag ) const } -sal_Bool DrawPortionInfo::IsRTL() const -{ +sal_Bool DrawPortionInfo::IsRTL() const +{ if(0xFF == mnBiDiLevel) { // Use Bidi functions from icu 2.0 to calculate if this portion @@ -2109,7 +2111,7 @@ sal_Bool DrawPortionInfo::IsRTL() const // I do not have this info here. Is it necessary? I'll have to ask MT. const BYTE nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR; - + ubidi_setPara(pBidi, mrText.GetBuffer(), mrText.Len(), nDefaultDir, NULL, &nError); nError = U_ZERO_ERROR; @@ -2127,7 +2129,7 @@ sal_Bool DrawPortionInfo::IsRTL() const ((DrawPortionInfo*)this)->mnBiDiLevel = nCurrDir; } - return (1 == (mnBiDiLevel % 2)); + return (1 == (mnBiDiLevel % 2)); } // eof |