diff options
Diffstat (limited to 'sw/source/core/doc/notxtfrm.cxx')
-rw-r--r-- | sw/source/core/doc/notxtfrm.cxx | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 7c70418191c5..74da906022f6 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -89,9 +89,9 @@ using namespace com::sun::star; extern void ClrContourCache( const SdrObject *pObj ); // TxtFly.Cxx -inline BOOL GetRealURL( const SwGrfNode& rNd, String& rTxt ) +inline sal_Bool GetRealURL( const SwGrfNode& rNd, String& rTxt ) { - BOOL bRet = rNd.GetFileFilterNms( &rTxt, 0 ); + sal_Bool bRet = rNd.GetFileFilterNms( &rTxt, 0 ); if( bRet ) rTxt = URIHelper::removePassword( rTxt, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS); @@ -100,7 +100,7 @@ inline BOOL GetRealURL( const SwGrfNode& rNd, String& rTxt ) void lcl_PaintReplacement( const SwRect &rRect, const String &rText, const ViewShell &rSh, const SwNoTxtFrm *pFrm, - BOOL bDefect ) + sal_Bool bDefect ) { static Font *pFont = 0; if ( !pFont ) @@ -111,7 +111,7 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText, pFont->SetName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Arial Unicode" ))); pFont->SetFamily( FAMILY_SWISS ); - pFont->SetTransparent( TRUE ); + pFont->SetTransparent( sal_True ); } Color aCol( COL_RED ); @@ -119,16 +119,16 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText, const SwFmtURL &rURL = pFrm->FindFlyFrm()->GetFmt()->GetURL(); if( rURL.GetURL().Len() || rURL.GetMap() ) { - BOOL bVisited = FALSE; + sal_Bool bVisited = sal_False; if ( rURL.GetMap() ) { ImageMap *pMap = (ImageMap*)rURL.GetMap(); - for( USHORT i = 0; i < pMap->GetIMapObjectCount(); i++ ) + for( sal_uInt16 i = 0; i < pMap->GetIMapObjectCount(); i++ ) { IMapObject *pObj = pMap->GetIMapObject( i ); if( rSh.GetDoc()->IsVisitedURL( pObj->GetURL() ) ) { - bVisited = TRUE; + bVisited = sal_True; break; } } @@ -145,7 +145,7 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText, pFont->SetUnderline( eUnderline ); pFont->SetColor( aCol ); - const BitmapEx& rBmp = ViewShell::GetReplacementBitmap( bDefect != FALSE ); + const BitmapEx& rBmp = ViewShell::GetReplacementBitmap( bDefect != sal_False ); Graphic::DrawEx( rSh.GetOut(), rText, *pFont, rBmp, rRect.Pos(), rRect.SSize() ); } @@ -238,8 +238,8 @@ void lcl_ClearArea( const SwFrm &rFrm, if ( aRegion.Count() ) { const SvxBrushItem *pItem; const Color *pCol; SwRect aOrigRect; - if ( rFrm.GetBackgroundBrush( pItem, pCol, aOrigRect, FALSE ) ) - for( USHORT i = 0; i < aRegion.Count(); ++i ) + if ( rFrm.GetBackgroundBrush( pItem, pCol, aOrigRect, sal_False ) ) + for( sal_uInt16 i = 0; i < aRegion.Count(); ++i ) ::DrawGraphic( pItem, &rOut, aOrigRect, aRegion[i] ); else { @@ -247,7 +247,7 @@ void lcl_ClearArea( const SwFrm &rFrm, rOut.Push( PUSH_FILLCOLOR|PUSH_LINECOLOR ); rOut.SetFillColor( rFrm.getRootFrm()->GetCurrShell()->Imp()->GetRetoucheColor()); rOut.SetLineColor(); - for( USHORT i = 0; i < aRegion.Count(); ++i ) + for( sal_uInt16 i = 0; i < aRegion.Count(); ++i ) rOut.DrawRect( aRegion[i].SVRect() ); rOut.Pop(); } @@ -282,7 +282,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const GetRealURL( *(SwGrfNode*)pNd, aTxt ); if( !aTxt.Len() ) aTxt = FindFlyFrm()->GetFmt()->GetName(); - lcl_PaintReplacement( Frm(), aTxt, *pSh, this, FALSE ); + lcl_PaintReplacement( Frm(), aTxt, *pSh, this, sal_False ); } return; } @@ -297,13 +297,13 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const OutputDevice *pOut = pSh->GetOut(); pOut->Push(); - BOOL bClip = TRUE; + sal_Bool bClip = sal_True; PolyPolygon aPoly; SwNoTxtNode& rNoTNd = *(SwNoTxtNode*)GetNode(); SwGrfNode* pGrfNd = rNoTNd.GetGrfNode(); if( pGrfNd ) - pGrfNd->SetFrameInPaint( TRUE ); + pGrfNd->SetFrameInPaint( sal_True ); // OD 16.04.2003 #i13147# - add 2nd parameter with value <sal_True> to // method call <FindFlyFrm().GetContour(..)> to indicate that it is called @@ -314,7 +314,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const ) { pOut->SetClipRegion( aPoly ); - bClip = FALSE; + bClip = sal_False; } SwRect aOrigPaint( rRect ); @@ -349,7 +349,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const // wenn nicht sichtbar, loesche einfach den angegebenen Bereich lcl_ClearArea( *this, *pSh->GetOut(), aPaintArea, SwRect() ); if( pGrfNd ) - pGrfNd->SetFrameInPaint( FALSE ); + pGrfNd->SetFrameInPaint( sal_False ); pOut->Pop(); SfxProgress::LeaveLock(); @@ -358,7 +358,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const /************************************************************************* |* |* void lcl_CalcRect( Point & aPt, Size & aDim, -|* USHORT nMirror ) +|* sal_uInt16 nMirror ) |* |* Beschreibung Errechne die Position und die Groesse der Grafik im |* Frame, entsprechen der aktuellen Grafik-Attribute @@ -372,7 +372,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const *************************************************************************/ -void lcl_CalcRect( Point& rPt, Size& rDim, USHORT nMirror ) +void lcl_CalcRect( Point& rPt, Size& rDim, sal_uInt16 nMirror ) { if( nMirror == RES_MIRROR_GRAPH_VERT || nMirror == RES_MIRROR_GRAPH_BOTH ) { @@ -400,7 +400,7 @@ void lcl_CalcRect( Point& rPt, Size& rDim, USHORT nMirror ) *************************************************************************/ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, - BOOL ) const + sal_Bool ) const { // JP 23.01.2001: currently only used for scaling, cropping and mirroring // the contour of graphics! @@ -411,7 +411,7 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, const SwAttrSet& rAttrSet = GetNode()->GetSwAttrSet(); const SwCropGrf& rCrop = rAttrSet.GetCropGrf(); - USHORT nMirror = rAttrSet.GetMirrorGrf().GetValue(); + sal_uInt16 nMirror = rAttrSet.GetMirrorGrf().GetValue(); if( rAttrSet.GetMirrorGrf().IsGrfToggle() ) { @@ -563,7 +563,7 @@ void SwNoTxtFrm::MakeAll() MakePrtArea( rAttrs ); if ( !bValidSize ) - { bValidSize = TRUE; + { bValidSize = sal_True; Format(); } } @@ -605,11 +605,11 @@ void SwNoTxtFrm::Format( const SwBorderAttrs * ) |*************************************************************************/ -BOOL SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos, +sal_Bool SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos, SwCrsrMoveState *pCMS ) const { if ( &rPos.nNode.GetNode() != (SwNode*)GetNode() ) - return FALSE; + return sal_False; Calc(); SwRect aFrameRect( Frm() ); @@ -638,17 +638,17 @@ BOOL SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos, } } - return TRUE; + return sal_True; } -BOOL SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& , +sal_Bool SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& , SwCrsrMoveState* ) const { SwCntntNode* pCNd = (SwCntntNode*)GetNode(); pPos->nNode = *pCNd; pPos->nContent.Assign( pCNd, 0 ); - return TRUE; + return sal_True; } #define CLEARCACHE( pNd ) {\ @@ -663,7 +663,7 @@ BOOL SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& , void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { - USHORT nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0; + sal_uInt16 nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0; // --> OD 2007-03-06 #i73788# // no <SwCntntFrm::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED @@ -676,7 +676,7 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) SwCntntFrm::Modify( pOld, pNew ); } - BOOL bComplete = TRUE; + sal_Bool bComplete = sal_True; switch( nWhich ) { @@ -686,7 +686,7 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) case RES_GRF_REREAD_AND_INCACHE: if( ND_GRFNODE == GetNode()->GetNodeType() ) { - bComplete = FALSE; + bComplete = sal_False; SwGrfNode* pNd = (SwGrfNode*) GetNode(); ViewShell *pVSh = 0; @@ -722,10 +722,10 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) case RES_ATTRSET_CHG: { - USHORT n; + sal_uInt16 n; for( n = RES_GRFATR_BEGIN; n < RES_GRFATR_END; ++n ) if( SFX_ITEM_SET == ((SwAttrSetChg*)pOld)->GetChgSet()-> - GetItemState( n, FALSE )) + GetItemState( n, sal_False )) { CLEARCACHE( (SwGrfNode*) GetNode() ) break; @@ -743,7 +743,7 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) // <-- if ( GetNode()->GetNodeType() == ND_GRFNODE ) { - bComplete = FALSE; + bComplete = sal_False; SwGrfNode* pNd = (SwGrfNode*) GetNode(); CLEARCACHE( pNd ) @@ -830,7 +830,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons SwGrfNode* pGrfNd = rNoTNd.GetGrfNode(); SwOLENode* pOLENd = rNoTNd.GetOLENode(); - const BOOL bPrn = pOut == rNoTNd.getIDocumentDeviceAccess()->getPrinter( false ) || + const sal_Bool bPrn = pOut == rNoTNd.getIDocumentDeviceAccess()->getPrinter( false ) || pOut->GetConnectMetaFile(); const bool bIsChart = pOLENd && ChartPrettyPainter::IsChart( pOLENd->GetOLEObj().GetObject() ); @@ -860,7 +860,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons if( pGrfNd ) { - BOOL bForceSwap = FALSE, bContinue = TRUE; + sal_Bool bForceSwap = sal_False, bContinue = sal_True; GraphicObject& rGrfObj = pGrfNd->GetGrfObj(); GraphicAttr aGrfAttr; @@ -898,8 +898,8 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons String aTxt( pGrfNd->GetTitle() ); if ( !aTxt.Len() ) GetRealURL( *pGrfNd, aTxt ); - ::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, FALSE ); - bContinue = FALSE; + ::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, sal_False ); + bContinue = sal_False; } else if( rGrfObj.IsCached( pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), &aGrfAttr )) @@ -907,17 +907,17 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons rGrfObj.DrawWithPDFHandling( *pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), &aGrfAttr ); - bContinue = FALSE; + bContinue = sal_False; } } if( bContinue ) { - const BOOL bSwapped = rGrfObj.IsSwappedOut(); - const BOOL bSwappedIn = 0 != pGrfNd->SwapIn( bPrn ); + const sal_Bool bSwapped = rGrfObj.IsSwappedOut(); + const sal_Bool bSwappedIn = 0 != pGrfNd->SwapIn( bPrn ); if( bSwappedIn && rGrfObj.GetGraphic().IsSupportedGraphic()) { - const BOOL bAnimate = rGrfObj.IsAnimated() && + const sal_Bool bAnimate = rGrfObj.IsAnimated() && !pShell->IsPreView() && !pShell->GetAccessibilityOptions()->IsStopAnimatedGraphics() && // --> FME 2004-06-21 #i9684# Stop animation during printing/pdf export @@ -951,7 +951,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons } else { - USHORT nResId = 0; + sal_uInt16 nResId = 0; if( bSwappedIn ) { if( GRAPHIC_NONE == rGrfObj.GetType() ) @@ -970,12 +970,12 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons if ( nResId ) aText = SW_RESSTR( nResId ); - ::lcl_PaintReplacement( aAlignedGrfArea, aText, *pShell, this, TRUE ); + ::lcl_PaintReplacement( aAlignedGrfArea, aText, *pShell, this, sal_True ); } //Beim Drucken duerfen wir nicht die Grafiken sammeln... if( bSwapped && bPrn ) - bForceSwap = TRUE; + bForceSwap = sal_True; } if( bForceSwap ) pGrfNd->SwapOut(); @@ -993,11 +993,11 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons { // --> OD 2009-03-05 #i99665# // Adjust AntiAliasing mode at output device for chart OLE - const USHORT nFormerAntialiasingAtOutput( pOut->GetAntialiasing() ); + const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() ); if ( pOLENd->IsChart() && pShell->Imp()->GetDrawView()->IsAntiAliasing() ) { - const USHORT nAntialiasingForChartOLE = + const sal_uInt16 nAntialiasingForChartOLE = nFormerAntialiasingAtOutput | ANTIALIASING_PIXELSNAPHAIRLINE; pOut->SetAntialiasing( nAntialiasingForChartOLE ); } @@ -1009,7 +1009,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons // Im BrowseModus gibt es nicht unbedingt einen Drucker und // damit kein JobSetup, also legen wir eines an ... const JobSetup* pJobSetup = pOLENd->getIDocumentDeviceAccess()->getJobsetup(); - BOOL bDummyJobSetup = 0 == pJobSetup; + sal_Bool bDummyJobSetup = 0 == pJobSetup; if( bDummyJobSetup ) pJobSetup = new JobSetup(); @@ -1064,18 +1064,18 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons } -BOOL SwNoTxtFrm::IsTransparent() const +sal_Bool SwNoTxtFrm::IsTransparent() const { const ViewShell* pSh = getRootFrm()->GetCurrShell(); if ( !pSh || !pSh->GetViewOptions()->IsGraphic() ) - return TRUE; + return sal_True; const SwGrfNode *pNd; if( 0 != (pNd = GetNode()->GetGrfNode()) ) return pNd->IsTransparent(); //#29381# OLE sind immer Transparent. - return TRUE; + return sal_True; } @@ -1088,7 +1088,7 @@ void SwNoTxtFrm::StopAnimation( OutputDevice* pOut ) const } -BOOL SwNoTxtFrm::HasAnimation() const +sal_Bool SwNoTxtFrm::HasAnimation() const { const SwGrfNode* pGrfNd = GetNode()->GetGrfNode(); return pGrfNd && pGrfNd->IsAnimated(); |