summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/notxtfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/notxtfrm.cxx')
-rw-r--r--sw/source/core/doc/notxtfrm.cxx102
1 files changed, 51 insertions, 51 deletions
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index f5666ce73968..15aaccd7c9a1 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -88,9 +88,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);
@@ -99,7 +99,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 )
@@ -110,7 +110,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 );
@@ -118,16 +118,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;
}
}
@@ -144,7 +144,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() );
}
@@ -221,15 +221,15 @@ 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
{
rOut.Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
rOut.SetFillColor( rFrm.GetShell()->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();
}
@@ -242,7 +242,7 @@ void lcl_ClearArea( const SwFrm &rFrm,
|*
*************************************************************************/
-void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
+void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( Frm().IsEmpty() )
return;
@@ -260,7 +260,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
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;
}
@@ -275,13 +275,13 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
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 );
// #i13147# - add 2nd parameter with value <sal_True> to
// method call <FindFlyFrm().GetContour(..)> to indicate that it is called
@@ -292,7 +292,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
)
{
pOut->SetClipRegion( aPoly );
- bClip = FALSE;
+ bClip = sal_False;
}
SwRect aOrigPaint( rRect );
@@ -327,7 +327,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
// 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();
@@ -336,7 +336,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
/*************************************************************************
|*
|* 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
@@ -348,7 +348,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
*************************************************************************/
-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 )
{
@@ -373,7 +373,7 @@ void lcl_CalcRect( Point& rPt, Size& rDim, USHORT nMirror )
*************************************************************************/
void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
- BOOL ) const
+ sal_Bool ) const
{
//currently only used for scaling, cropping and mirroring the contour of graphics!
//all other is handled by the GraphicObject
@@ -383,7 +383,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() )
{
@@ -530,7 +530,7 @@ void SwNoTxtFrm::MakeAll()
MakePrtArea( rAttrs );
if ( !bValidSize )
- { bValidSize = TRUE;
+ { bValidSize = sal_True;
Format();
}
}
@@ -566,11 +566,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() );
@@ -599,17 +599,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 ) {\
@@ -624,7 +624,7 @@ BOOL SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- USHORT nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0;
+ sal_uInt16 nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0;
// #i73788#
// no <SwCntntFrm::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED
@@ -637,7 +637,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
SwCntntFrm::Modify( pOld, pNew );
}
- BOOL bComplete = TRUE;
+ sal_Bool bComplete = sal_True;
switch( nWhich )
{
@@ -647,7 +647,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, 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;
@@ -683,10 +683,10 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, 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;
@@ -702,7 +702,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_LINKED_GRAPHIC_STREAM_ARRIVED:
if ( GetNode()->GetNodeType() == ND_GRFNODE )
{
- bComplete = FALSE;
+ bComplete = sal_False;
SwGrfNode* pNd = (SwGrfNode*) GetNode();
CLEARCACHE( pNd )
@@ -789,7 +789,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() );
@@ -818,7 +818,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;
@@ -853,8 +853,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 ))
@@ -862,17 +862,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
@@ -906,7 +906,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() )
@@ -925,12 +925,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();
@@ -948,11 +948,11 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
{
// #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 );
}
@@ -964,7 +964,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();
@@ -1011,18 +1011,18 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
-BOOL SwNoTxtFrm::IsTransparent() const
+sal_Bool SwNoTxtFrm::IsTransparent() const
{
const ViewShell* pSh = GetShell();
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;
}
@@ -1035,7 +1035,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();