summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdograf.cxx
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2011-01-10 16:11:35 +0100
committerMikhail Voytenko <mav@openoffice.org>2011-01-10 16:11:35 +0100
commit94d85ef550ad17efba5dec09290d0e8176a8b455 (patch)
tree41a1a79c31bd144b9374142c6259d33e2a3f5b89 /svx/source/svdraw/svdograf.cxx
parent3f4e9b4c3cd9028744ea6ed5e93c41c51a15d229 (diff)
removetooltypes01: #i112600# remove tooltypes from svx
Diffstat (limited to 'svx/source/svdraw/svdograf.cxx')
-rw-r--r--svx/source/svdraw/svdograf.cxx94
1 files changed, 47 insertions, 47 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index b299d4c7a2ef..a271eaca5792 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -93,7 +93,7 @@ const Graphic ImpLoadLinkedGraphic( const String& rFileName, const String& rFilt
{
Graphic aGraphic;
- SfxMedium xMed( rFileName, STREAM_STD_READ, TRUE );
+ SfxMedium xMed( rFileName, STREAM_STD_READ, sal_True );
xMed.DownLoad();
SvStream* pInStrm = xMed.GetInStream();
@@ -102,7 +102,7 @@ const Graphic ImpLoadLinkedGraphic( const String& rFileName, const String& rFilt
pInStrm->Seek( STREAM_SEEK_TO_BEGIN );
GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
- const USHORT nFilter = rFilterName.Len() && pGF->GetImportFormatCount()
+ const sal_uInt16 nFilter = rFilterName.Len() && pGF->GetImportFormatCount()
? pGF->GetImportFormatNumber( rFilterName )
: GRFILTER_FORMAT_DONTKNOW;
@@ -135,7 +135,7 @@ public:
const ::com::sun::star::uno::Any & rValue );
void DataChanged( const Graphic& rGraphic );
- BOOL Connect() { return 0 != GetRealObject(); }
+ sal_Bool Connect() { return 0 != GetRealObject(); }
void UpdateAsynchron();
void RemoveGraphicUpdater();
};
@@ -215,7 +215,7 @@ SdrGraphicLink::SdrGraphicLink(SdrGrafObj* pObj)
, pGrafObj( pObj )
, pGraphicUpdater( NULL )
{
- SetSynchron( FALSE );
+ SetSynchron( sal_False );
}
// -----------------------------------------------------------------------------
@@ -325,11 +325,11 @@ TYPEINIT1(SdrGrafObj,SdrRectObj);
SdrGrafObj::SdrGrafObj()
: SdrRectObj(),
pGraphicLink ( NULL ),
- bMirrored ( FALSE )
+ bMirrored ( sal_False )
{
pGraphic = new GraphicObject;
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
- bNoShear = TRUE;
+ bNoShear = sal_True;
// #111096#
mbGrafAnimationAllowed = sal_True;
@@ -348,11 +348,11 @@ SdrGrafObj::SdrGrafObj()
SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect)
: SdrRectObj ( rRect ),
pGraphicLink ( NULL ),
- bMirrored ( FALSE )
+ bMirrored ( sal_False )
{
pGraphic = new GraphicObject( rGrf );
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
- bNoShear = TRUE;
+ bNoShear = sal_True;
// #111096#
mbGrafAnimationAllowed = sal_True;
@@ -371,11 +371,11 @@ SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect)
SdrGrafObj::SdrGrafObj( const Graphic& rGrf )
: SdrRectObj(),
pGraphicLink ( NULL ),
- bMirrored ( FALSE )
+ bMirrored ( sal_False )
{
pGraphic = new GraphicObject( rGrf );
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
- bNoShear = TRUE;
+ bNoShear = sal_True;
// #111096#
mbGrafAnimationAllowed = sal_True;
@@ -447,7 +447,7 @@ const Graphic& SdrGrafObj::GetGraphic() const
// -----------------------------------------------------------------------------
-Graphic SdrGrafObj::GetTransformedGraphic( ULONG nTransformFlags ) const
+Graphic SdrGrafObj::GetTransformedGraphic( sal_uIntPtr nTransformFlags ) const
{
// #107947# Refactored most of the code to GraphicObject, where
// everybody can use e.g. the cropping functionality
@@ -455,8 +455,8 @@ Graphic SdrGrafObj::GetTransformedGraphic( ULONG nTransformFlags ) const
GraphicType eType = GetGraphicType();
MapMode aDestMap( pModel->GetScaleUnit(), Point(), pModel->GetScaleFraction(), pModel->GetScaleFraction() );
const Size aDestSize( GetLogicRect().GetSize() );
- const BOOL bMirror = ( nTransformFlags & SDRGRAFOBJ_TRANSFORMATTR_MIRROR ) != 0;
- const BOOL bRotate = ( ( nTransformFlags & SDRGRAFOBJ_TRANSFORMATTR_ROTATE ) != 0 ) &&
+ const sal_Bool bMirror = ( nTransformFlags & SDRGRAFOBJ_TRANSFORMATTR_MIRROR ) != 0;
+ const sal_Bool bRotate = ( ( nTransformFlags & SDRGRAFOBJ_TRANSFORMATTR_ROTATE ) != 0 ) &&
( aGeo.nDrehWink && aGeo.nDrehWink != 18000 ) && ( GRAPHIC_NONE != eType );
// #104115# Need cropping info earlier
@@ -472,9 +472,9 @@ Graphic SdrGrafObj::GetTransformedGraphic( ULONG nTransformFlags ) const
if( bMirror )
{
- USHORT nMirrorCase = ( aGeo.nDrehWink == 18000 ) ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 );
- FASTBOOL bHMirr = nMirrorCase == 2 || nMirrorCase == 4;
- FASTBOOL bVMirr = nMirrorCase == 3 || nMirrorCase == 4;
+ sal_uInt16 nMirrorCase = ( aGeo.nDrehWink == 18000 ) ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 );
+ int bHMirr = nMirrorCase == 2 || nMirrorCase == 4;
+ int bVMirr = nMirrorCase == 3 || nMirrorCase == 4;
aActAttr.SetMirrorFlags( ( bHMirr ? BMP_MIRROR_HORZ : 0 ) | ( bVMirr ? BMP_MIRROR_VERT : 0 ) );
}
@@ -657,35 +657,35 @@ void SdrGrafObj::ReleaseGraphicLink()
void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
{
- FASTBOOL bAnim = pGraphic->IsAnimated();
- FASTBOOL bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj;
+ int bAnim = pGraphic->IsAnimated();
+ int bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj;
rInfo.bResizeFreeAllowed = aGeo.nDrehWink % 9000 == 0 ||
aGeo.nDrehWink % 18000 == 0 ||
aGeo.nDrehWink % 27000 == 0;
- rInfo.bResizePropAllowed = TRUE;
+ rInfo.bResizePropAllowed = sal_True;
rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim;
rInfo.bRotate90Allowed = bNoPresGrf && !bAnim;
rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim;
rInfo.bMirror45Allowed = bNoPresGrf && !bAnim;
rInfo.bMirror90Allowed = !bEmptyPresObj;
- rInfo.bTransparenceAllowed = FALSE;
- rInfo.bGradientAllowed = FALSE;
- rInfo.bShearAllowed = FALSE;
- rInfo.bEdgeRadiusAllowed=FALSE;
- rInfo.bCanConvToPath = FALSE;
- rInfo.bCanConvToPathLineToArea = FALSE;
- rInfo.bCanConvToPolyLineToArea = FALSE;
+ rInfo.bTransparenceAllowed = sal_False;
+ rInfo.bGradientAllowed = sal_False;
+ rInfo.bShearAllowed = sal_False;
+ rInfo.bEdgeRadiusAllowed=sal_False;
+ rInfo.bCanConvToPath = sal_False;
+ rInfo.bCanConvToPathLineToArea = sal_False;
+ rInfo.bCanConvToPolyLineToArea = sal_False;
rInfo.bCanConvToPoly = !IsEPS();
rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
}
// -----------------------------------------------------------------------------
-UINT16 SdrGrafObj::GetObjIdentifier() const
+sal_uInt16 SdrGrafObj::GetObjIdentifier() const
{
- return UINT16( OBJ_GRAF );
+ return sal_uInt16( OBJ_GRAF );
}
// -----------------------------------------------------------------------------
@@ -726,7 +726,7 @@ void SdrGrafObj::TakeObjNameSingul(XubString& rName) const
{
case GRAPHIC_BITMAP:
{
- const USHORT nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
+ const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPTRANSLNK : STR_ObjNameSingulGRAFBMPTRANS ) :
( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPLNK : STR_ObjNameSingulGRAFBMP ) );
@@ -765,7 +765,7 @@ void SdrGrafObj::TakeObjNamePlural( XubString& rName ) const
{
case GRAPHIC_BITMAP:
{
- const USHORT nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
+ const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPTRANSLNK : STR_ObjNamePluralGRAFBMPTRANS ) :
( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPLNK : STR_ObjNamePluralGRAFBMP ) );
@@ -884,8 +884,8 @@ void SdrGrafObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
{
SdrRectObj::NbcResize( rRef, xFact, yFact );
- FASTBOOL bMirrX = xFact.GetNumerator() < 0;
- FASTBOOL bMirrY = yFact.GetNumerator() < 0;
+ int bMirrX = xFact.GetNumerator() < 0;
+ int bMirrY = yFact.GetNumerator() < 0;
if( bMirrX != bMirrY )
bMirrored = !bMirrored;
@@ -908,7 +908,7 @@ void SdrGrafObj::NbcMirror(const Point& rRef1, const Point& rRef2)
// -----------------------------------------------------------------------------
-void SdrGrafObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+void SdrGrafObj::NbcShear(const Point& rRef, long nWink, double tn, int bVShear)
{
SdrRectObj::NbcRotate( rRef, nWink, tn, bVShear );
}
@@ -924,7 +924,7 @@ void SdrGrafObj::NbcSetSnapRect(const Rectangle& rRect)
void SdrGrafObj::NbcSetLogicRect( const Rectangle& rRect)
{
- //FASTBOOL bChg=rRect.GetSize()!=aRect.GetSize();
+ //int bChg=rRect.GetSize()!=aRect.GetSize();
SdrRectObj::NbcSetLogicRect(rRect);
}
@@ -950,7 +950,7 @@ void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo)
{
//long nDrehMerk = aGeo.nDrehWink;
//long nShearMerk = aGeo.nShearWink;
- //FASTBOOL bMirrMerk = bMirrored;
+ //int bMirrMerk = bMirrored;
Size aSizMerk( aRect.GetSize() );
SdrRectObj::RestGeoData(rGeo);
@@ -962,8 +962,8 @@ void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo)
void SdrGrafObj::SetPage( SdrPage* pNewPage )
{
- FASTBOOL bRemove = pNewPage == NULL && pPage != NULL;
- FASTBOOL bInsert = pNewPage != NULL && pPage == NULL;
+ int bRemove = pNewPage == NULL && pPage != NULL;
+ int bInsert = pNewPage != NULL && pPage == NULL;
if( bRemove )
{
@@ -985,7 +985,7 @@ void SdrGrafObj::SetPage( SdrPage* pNewPage )
void SdrGrafObj::SetModel( SdrModel* pNewModel )
{
- FASTBOOL bChg = pNewModel != pModel;
+ int bChg = pNewModel != pModel;
if( bChg )
{
@@ -1026,7 +1026,7 @@ void SdrGrafObj::StopAnimation(OutputDevice* /*pOutDev*/, long /*nExtraData*/)
// -----------------------------------------------------------------------------
-FASTBOOL SdrGrafObj::HasGDIMetaFile() const
+int SdrGrafObj::HasGDIMetaFile() const
{
return( pGraphic->GetType() == GRAPHIC_GDIMETAFILE );
}
@@ -1041,7 +1041,7 @@ const GDIMetaFile* SdrGrafObj::GetGDIMetaFile() const
// -----------------------------------------------------------------------------
-SdrObject* SdrGrafObj::DoConvertToPolyObj(BOOL bBezier) const
+SdrObject* SdrGrafObj::DoConvertToPolyObj(sal_Bool bBezier) const
{
SdrObject* pRetval = NULL;
@@ -1058,7 +1058,7 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(BOOL bBezier) const
aFilter.SetScaleRect(GetSnapRect());
aFilter.SetLayer(GetLayer());
- UINT32 nInsAnz = aFilter.DoImport(GetTransformedGraphic().GetGDIMetaFile(), *pGrp->GetSubList(), 0);
+ sal_uInt32 nInsAnz = aFilter.DoImport(GetTransformedGraphic().GetGDIMetaFile(), *pGrp->GetSubList(), 0);
if(nInsAnz)
{
pRetval = pGrp;
@@ -1104,7 +1104,7 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(BOOL bBezier) const
Bitmap aBitmap( GetTransformedGraphic().GetBitmap() );
XOBitmap aXBmp(aBitmap, XBITMAP_STRETCH);
aSet.Put(XFillBitmapItem(String(), aXBmp));
- aSet.Put(XFillBmpTileItem(FALSE));
+ aSet.Put(XFillBmpTileItem(sal_False));
pRetval->SetMergedItemSet(aSet);
}
@@ -1142,7 +1142,7 @@ void SdrGrafObj::ImpSetAttrToGrafInfo()
aGrafInfo.SetChannelG( ( (SdrGrafGreenItem&) rSet.Get( SDRATTR_GRAFGREEN ) ).GetValue() );
aGrafInfo.SetChannelB( ( (SdrGrafBlueItem&) rSet.Get( SDRATTR_GRAFBLUE ) ).GetValue() );
aGrafInfo.SetGamma( ( (SdrGrafGamma100Item&) rSet.Get( SDRATTR_GRAFGAMMA ) ).GetValue() * 0.01 );
- aGrafInfo.SetTransparency( (BYTE) FRound( Min( nTrans, (USHORT) 100 ) * 2.55 ) );
+ aGrafInfo.SetTransparency( (sal_uInt8) FRound( Min( nTrans, (sal_uInt16) 100 ) * 2.55 ) );
aGrafInfo.SetInvert( ( (SdrGrafInvertItem&) rSet.Get( SDRATTR_GRAFINVERT ) ).GetValue() );
aGrafInfo.SetDrawMode( ( (SdrGrafModeItem&) rSet.Get( SDRATTR_GRAFMODE ) ).GetValue() );
aGrafInfo.SetCrop( rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom() );
@@ -1161,7 +1161,7 @@ void SdrGrafObj::ImpSetGrafInfoToAttr()
SetObjectItem( SdrGrafGreenItem( aGrafInfo.GetChannelG() ) );
SetObjectItem( SdrGrafBlueItem( aGrafInfo.GetChannelB() ) );
SetObjectItem( SdrGrafGamma100Item( FRound( aGrafInfo.GetGamma() * 100.0 ) ) );
- SetObjectItem( SdrGrafTransparenceItem( (USHORT) FRound( aGrafInfo.GetTransparency() / 2.55 ) ) );
+ SetObjectItem( SdrGrafTransparenceItem( (sal_uInt16) FRound( aGrafInfo.GetTransparency() / 2.55 ) ) );
SetObjectItem( SdrGrafInvertItem( aGrafInfo.IsInvert() ) );
SetObjectItem( SdrGrafModeItem( aGrafInfo.GetDrawMode() ) );
SetObjectItem( SdrGrafCropItem( aGrafInfo.GetLeftCrop(), aGrafInfo.GetTopCrop(), aGrafInfo.GetRightCrop(), aGrafInfo.GetBottomCrop() ) );
@@ -1234,7 +1234,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
// ## test only if there are VOCs other than the preview renderer
if(!GetViewContact().HasViewObjectContacts(true))
{
- const ULONG nSwapMode = pModel->GetSwapGraphicsMode();
+ const sal_uIntPtr nSwapMode = pModel->GetSwapGraphicsMode();
if( ( pGraphic->HasUserData() || pGraphicLink ) &&
( nSwapMode & SDR_SWAPGRAPHICSMODE_PURGE ) )
@@ -1266,7 +1266,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
{
SdrDocumentStreamInfo aStreamInfo;
- aStreamInfo.mbDeleteAfterUse = FALSE;
+ aStreamInfo.mbDeleteAfterUse = sal_False;
aStreamInfo.maUserData = pGraphic->GetUserData();
SvStream* pStream = pModel->GetDocumentStream( aStreamInfo );
@@ -1384,7 +1384,7 @@ Reference< XInputStream > SdrGrafObj::getInputStream()
{
SdrDocumentStreamInfo aStreamInfo;
- aStreamInfo.mbDeleteAfterUse = FALSE;
+ aStreamInfo.mbDeleteAfterUse = sal_False;
aStreamInfo.maUserData = pGraphic->GetUserData();
SvStream* pStream = pModel->GetDocumentStream( aStreamInfo );