summaryrefslogtreecommitdiff
path: root/svx/source/engine3d
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2013-03-21 12:04:56 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2013-03-21 12:12:29 +0900
commit322257d53202f4d6bf3e7fa687c3902b4c61d794 (patch)
tree39ada4d043eb4d7f2d98b1d300ad0845cde83810 /svx/source/engine3d
parentff140bb6b8b109f14c270ff059f0b8d71dab5d6c (diff)
sal_Bool to bool
Change-Id: I9bdb9db8b38758117a6bad27a014376806841470
Diffstat (limited to 'svx/source/engine3d')
-rw-r--r--svx/source/engine3d/extrud3d.cxx4
-rw-r--r--svx/source/engine3d/float3d.cxx54
-rw-r--r--svx/source/engine3d/lathe3d.cxx4
-rw-r--r--svx/source/engine3d/obj3d.cxx10
-rw-r--r--svx/source/engine3d/objfac3d.cxx4
-rw-r--r--svx/source/engine3d/scene3d.cxx24
-rw-r--r--svx/source/engine3d/view3d.cxx48
7 files changed, 74 insertions, 74 deletions
diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx
index f89455f827b2..724f45d3f8b4 100644
--- a/svx/source/engine3d/extrud3d.cxx
+++ b/svx/source/engine3d/extrud3d.cxx
@@ -141,9 +141,9 @@ void E3dExtrudeObj::TakeObjNamePlural(XubString& rName) const
rName=ImpGetResStr(STR_ObjNamePluralExtrude3d);
}
-sal_Bool E3dExtrudeObj::IsBreakObjPossible()
+bool E3dExtrudeObj::IsBreakObjPossible()
{
- return sal_True;
+ return true;
}
SdrAttrObj* E3dExtrudeObj::GetBreakObj()
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index e0089ed13e03..acc7095e3922 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -523,11 +523,11 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
if( SFX_ITEM_SET == eState )
{
sal_uInt32 nState = ( ( const SfxUInt32Item* )pItem )->GetValue();
- sal_Bool bExtrude = (sal_Bool) ( nState & 2 );
- sal_Bool bSphere = (sal_Bool) ( nState & 4 );
- sal_Bool bCube = (sal_Bool) ( nState & 8 );
+ bool bExtrude = ( nState & 2 );
+ bool bSphere = ( nState & 4 );
+ bool bCube = ( nState & 8 );
- sal_Bool bChart = (sal_Bool) ( nState & 32 ); // Chart
+ bool bChart = ( nState & 32 ); // Chart
if( !bChart )
{
@@ -2614,7 +2614,7 @@ IMPL_LINK( Svx3DWin, ClickViewTypeHdl, void *, pBtn )
// -----------------------------------------------------------------------
IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
{
- sal_Bool bUpdatePreview = sal_False;
+ bool bUpdatePreview = false;
if( pBtn )
{
@@ -2636,7 +2636,7 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
aBtnNormalsObj.Check( pBtn == &aBtnNormalsObj );
aBtnNormalsFlat.Check( pBtn == &aBtnNormalsFlat );
aBtnNormalsSphere.Check( pBtn == &aBtnNormalsSphere );
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( pBtn == &aBtnLight1 ||
pBtn == &aBtnLight2 ||
@@ -2705,7 +2705,7 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
pLb->Enable( bEnable );
ClickLight(*pBtn);
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
// Textures
else if( pBtn == &aBtnTexLuminance ||
@@ -2713,14 +2713,14 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
{
aBtnTexLuminance.Check( pBtn == &aBtnTexLuminance );
aBtnTexColor.Check( pBtn == &aBtnTexColor );
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( pBtn == &aBtnTexReplace ||
pBtn == &aBtnTexModulate )
{
aBtnTexReplace.Check( pBtn == &aBtnTexReplace );
aBtnTexModulate.Check( pBtn == &aBtnTexModulate );
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( pBtn == &aBtnTexParallelX ||
pBtn == &aBtnTexCircleX ||
@@ -2729,7 +2729,7 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
aBtnTexParallelX.Check( pBtn == &aBtnTexParallelX );
aBtnTexCircleX.Check( pBtn == &aBtnTexCircleX );
aBtnTexObjectX.Check( pBtn == &aBtnTexObjectX );
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( pBtn == &aBtnTexParallelY ||
pBtn == &aBtnTexCircleY ||
@@ -2738,20 +2738,20 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
aBtnTexParallelY.Check( pBtn == &aBtnTexParallelY );
aBtnTexCircleY.Check( pBtn == &aBtnTexCircleY );
aBtnTexObjectY.Check( pBtn == &aBtnTexObjectY );
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( pBtn == &aBtnShadow3d )
{
pBtn->Check( !pBtn->IsChecked() );
aFtSlant.Enable( pBtn->IsChecked() );
aMtrSlant.Enable( pBtn->IsChecked() );
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
// Other (no groups)
else if( pBtn != NULL )
{
pBtn->Check( !pBtn->IsChecked() );
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
if( nSId > 0 )
@@ -2764,7 +2764,7 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
nSId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
}
}
- else if( bUpdatePreview == sal_True )
+ else if( bUpdatePreview )
UpdatePreview();
}
return( 0L );
@@ -2805,7 +2805,7 @@ IMPL_LINK( Svx3DWin, SelectHdl, void *, p )
{
if( p )
{
- sal_Bool bUpdatePreview = sal_False;
+ bool bUpdatePreview = false;
// Material
if( p == &aLbMatFavorites )
@@ -2868,19 +2868,19 @@ IMPL_LINK( Svx3DWin, SelectHdl, void *, p )
LBSelectColor( &aLbMatSpecular, aColSpec );
aMtrMatSpecularIntensity.SetValue( nSpecIntens );
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( p == &aLbMatColor ||
p == &aLbMatEmission ||
p == &aLbMatSpecular )
{
aLbMatFavorites.SelectEntryPos( 0 );
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
// Lighting
else if( p == &aLbAmbientlight )
{
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( p == &aLbLight1 ||
p == &aLbLight2 ||
@@ -2891,12 +2891,12 @@ IMPL_LINK( Svx3DWin, SelectHdl, void *, p )
p == &aLbLight7 ||
p == &aLbLight8 )
{
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( p == &aLbShademode )
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
- if( bUpdatePreview == sal_True )
+ if( bUpdatePreview )
UpdatePreview();
}
return( 0L );
@@ -2907,27 +2907,27 @@ IMPL_LINK( Svx3DWin, ModifyHdl, void*, pField )
{
if( pField )
{
- sal_Bool bUpdatePreview = sal_False;
+ bool bUpdatePreview = false;
// Material
if( pField == &aMtrMatSpecularIntensity )
{
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( pField == &aNumHorizontal )
{
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( pField == &aNumVertical )
{
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
else if( pField == &aMtrSlant )
{
- bUpdatePreview = sal_True;
+ bUpdatePreview = true;
}
- if( bUpdatePreview == sal_True )
+ if( bUpdatePreview )
UpdatePreview();
}
return( 0L );
diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx
index be5e9660a019..d9153bfbe1eb 100644
--- a/svx/source/engine3d/lathe3d.cxx
+++ b/svx/source/engine3d/lathe3d.cxx
@@ -169,9 +169,9 @@ void E3dLatheObj::TakeObjNamePlural(XubString& rName) const
rName=ImpGetResStr(STR_ObjNamePluralLathe3d);
}
-sal_Bool E3dLatheObj::IsBreakObjPossible()
+bool E3dLatheObj::IsBreakObjPossible()
{
- return sal_True;
+ return true;
}
SdrAttrObj* E3dLatheObj::GetBreakObj()
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index 12ac40a6e76b..06835cefa6ea 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -213,9 +213,9 @@ void E3dObject::SetSelected(bool bNew)
// Break, default implementations
-sal_Bool E3dObject::IsBreakObjPossible()
+bool E3dObject::IsBreakObjPossible()
{
- return sal_False;
+ return false;
}
SdrAttrObj* E3dObject::GetBreakObj()
@@ -960,17 +960,17 @@ basegfx::B2DPolyPolygon E3dCompoundObject::TransformToScreenCoor(const basegfx::
return aRetval;
}
-sal_Bool E3dCompoundObject::IsAOrdNumRemapCandidate(E3dScene*& prScene) const
+bool E3dCompoundObject::IsAOrdNumRemapCandidate(E3dScene*& prScene) const
{
if(GetObjList()
&& GetObjList()->GetOwnerObj()
&& GetObjList()->GetOwnerObj()->ISA(E3dScene))
{
prScene = (E3dScene*)GetObjList()->GetOwnerObj();
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/engine3d/objfac3d.cxx b/svx/source/engine3d/objfac3d.cxx
index 55d89e0d33db..4eb26d7f7d8c 100644
--- a/svx/source/engine3d/objfac3d.cxx
+++ b/svx/source/engine3d/objfac3d.cxx
@@ -28,14 +28,14 @@
#include "svx/objfac3d.hxx"
#include <svx/svdobj.hxx>
-static sal_Bool bInit = sal_False;
+static bool bInit = false;
E3dObjFactory::E3dObjFactory()
{
if ( !bInit )
{
SdrObjFactory::InsertMakeObjectHdl(LINK(this, E3dObjFactory, MakeObject));
- bInit = sal_True;
+ bInit = true;
}
}
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index c5491ca6cebf..059e61f0f85d 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -54,7 +54,7 @@ class ImpRemap3DDepth
double mfMinimalDepth;
// bit field
- unsigned mbIsScene : 1;
+ bool mbIsScene : 1;
public:
ImpRemap3DDepth(sal_uInt32 nOrdNum, double fMinimalDepth);
@@ -65,20 +65,20 @@ public:
bool operator<(const ImpRemap3DDepth& rComp) const;
sal_uInt32 GetOrdNum() const { return mnOrdNum; }
- sal_Bool IsScene() const { return mbIsScene; }
+ bool IsScene() const { return mbIsScene; }
};
ImpRemap3DDepth::ImpRemap3DDepth(sal_uInt32 nOrdNum, double fMinimalDepth)
: mnOrdNum(nOrdNum),
mfMinimalDepth(fMinimalDepth),
- mbIsScene(sal_False)
+ mbIsScene(false)
{
}
ImpRemap3DDepth::ImpRemap3DDepth(sal_uInt32 nOrdNum)
: mnOrdNum(nOrdNum),
mfMinimalDepth(0.0),
- mbIsScene(sal_True)
+ mbIsScene(true)
{
}
@@ -90,13 +90,13 @@ bool ImpRemap3DDepth::operator<(const ImpRemap3DDepth& rComp) const
{
if(IsScene())
{
- return sal_False;
+ return false;
}
else
{
if(rComp.IsScene())
{
- return sal_True;
+ return true;
}
else
{
@@ -661,7 +661,7 @@ void E3dScene::RecalcSnapRect()
}
}
-sal_Bool E3dScene::IsBreakObjPossible()
+bool E3dScene::IsBreakObjPossible()
{
// Break scene, if all members are able to break
SdrObjListIter a3DIterator(maSubList, IM_DEEPWITHGROUPS);
@@ -671,10 +671,10 @@ sal_Bool E3dScene::IsBreakObjPossible()
E3dObject* pObj = (E3dObject*) a3DIterator.Next();
DBG_ASSERT(pObj->ISA(E3dObject), "only 3D objects are allowed in scenes!");
if(!pObj->IsBreakObjPossible())
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
basegfx::B2DPolyPolygon E3dScene::TakeCreatePoly(const SdrDragStat& /*rDrag*/) const
@@ -689,7 +689,7 @@ bool E3dScene::BegCreate(SdrDragStat& rStat)
aRect1.Justify();
rStat.SetActionRect(aRect1);
NbcSetSnapRect(aRect1);
- return sal_True;
+ return true;
}
bool E3dScene::MovCreate(SdrDragStat& rStat)
@@ -701,7 +701,7 @@ bool E3dScene::MovCreate(SdrDragStat& rStat)
NbcSetSnapRect(aRect1);
SetBoundRectDirty();
bSnapRectDirty=sal_True;
- return sal_True;
+ return true;
}
bool E3dScene::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
@@ -716,7 +716,7 @@ bool E3dScene::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
bool E3dScene::BckCreate(SdrDragStat& /*rStat*/)
{
- return sal_False;
+ return false;
}
void E3dScene::BrkCreate(SdrDragStat& /*rStat*/)
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 40900eef413e..4dc904f7bef4 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -234,7 +234,7 @@ E3dView::E3dView(SdrModel* pModel, OutputDevice* pOut) :
void E3dView::DrawMarkedObj(OutputDevice& rOut) const
{
// Does 3D objects exist which scenes are not selected?
- sal_Bool bSpecialHandling = sal_False;
+ bool bSpecialHandling = false;
E3dScene *pScene = NULL;
long nCnt = GetMarkedObjectCount();
@@ -246,7 +246,7 @@ void E3dView::DrawMarkedObj(OutputDevice& rOut) const
// related scene
pScene = ((E3dCompoundObject*)pObj)->GetScene();
if(pScene && !IsObjMarked(pScene))
- bSpecialHandling = sal_True;
+ bSpecialHandling = true;
}
// Reset all selection flags
if(pObj && pObj->ISA(E3dObject))
@@ -492,9 +492,9 @@ sal_Bool E3dView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLs
}
// Service routine used from local Clone() and from SdrCreateView::EndCreateObj(...)
-sal_Bool E3dView::ImpCloneAll3DObjectsToDestScene(E3dScene* pSrcScene, E3dScene* pDstScene, Point /*aOffset*/)
+bool E3dView::ImpCloneAll3DObjectsToDestScene(E3dScene* pSrcScene, E3dScene* pDstScene, Point /*aOffset*/)
{
- sal_Bool bRetval(sal_False);
+ bool bRetval(false);
if(pSrcScene && pDstScene)
{
@@ -588,7 +588,7 @@ sal_Bool E3dView::ImpCloneAll3DObjectsToDestScene(E3dScene* pSrcScene, E3dScene*
pNewCompoundObj->NbcSetLayer(pCompoundObj->GetLayer());
pNewCompoundObj->NbcSetStyleSheet(pCompoundObj->GetStyleSheet(), sal_True);
pDstScene->Insert3DObj(pNewCompoundObj);
- bRetval = sal_True;
+ bRetval = true;
// Create undo
if( GetModel()->IsUndoEnabled() )
@@ -601,11 +601,11 @@ sal_Bool E3dView::ImpCloneAll3DObjectsToDestScene(E3dScene* pSrcScene, E3dScene*
return bRetval;
}
-sal_Bool E3dView::IsConvertTo3DObjPossible() const
+bool E3dView::IsConvertTo3DObjPossible() const
{
sal_Bool bAny3D(sal_False);
sal_Bool bGroupSelected(sal_False);
- sal_Bool bRetval(sal_True);
+ bool bRetval(true);
for(sal_uInt32 a=0;!bAny3D && a<GetMarkedObjectCount();a++)
{
@@ -1194,25 +1194,25 @@ sal_Bool E3dView::BegDragObj(const Point& rPnt, OutputDevice* pOut,
}
else
{
- sal_Bool bOwnActionNecessary;
+ bool bOwnActionNecessary;
if (pHdl == NULL)
{
- bOwnActionNecessary = sal_True;
+ bOwnActionNecessary = true;
}
else if (pHdl->IsVertexHdl() || pHdl->IsCornerHdl())
{
- bOwnActionNecessary = sal_True;
+ bOwnActionNecessary = true;
}
else
{
- bOwnActionNecessary = sal_False;
+ bOwnActionNecessary = false;
}
if(bOwnActionNecessary && GetMarkedObjectCount() >= 1)
{
E3dDragConstraint eConstraint = E3DDRAG_CONSTR_XYZ;
- sal_Bool bThereAreRootScenes = sal_False;
- sal_Bool bThereAre3DObjects = sal_False;
+ bool bThereAreRootScenes = false;
+ bool bThereAre3DObjects = false;
long nCnt = GetMarkedObjectCount();
for(long nObjs = 0;nObjs < nCnt;nObjs++)
{
@@ -1220,9 +1220,9 @@ sal_Bool E3dView::BegDragObj(const Point& rPnt, OutputDevice* pOut,
if(pObj)
{
if(pObj->ISA(E3dScene) && ((E3dScene*)pObj)->GetScene() == pObj)
- bThereAreRootScenes = sal_True;
+ bThereAreRootScenes = true;
if(pObj->ISA(E3dObject))
- bThereAre3DObjects = sal_True;
+ bThereAre3DObjects = true;
}
}
if( bThereAre3DObjects )
@@ -1537,7 +1537,7 @@ void E3dView::InitView ()
mpMirrorOverlay = 0L;
}
-sal_Bool E3dView::IsBreak3DObjPossible() const
+bool E3dView::IsBreak3DObjPossible() const
{
sal_uIntPtr nCount = GetMarkedObjectCount();
@@ -1552,11 +1552,11 @@ sal_Bool E3dView::IsBreak3DObjPossible() const
if (pObj && pObj->ISA(E3dObject))
{
if(!(((E3dObject*)pObj)->IsBreakObjPossible()))
- return sal_False;
+ return false;
}
else
{
- return sal_False;
+ return false;
}
i++;
@@ -1564,10 +1564,10 @@ sal_Bool E3dView::IsBreak3DObjPossible() const
}
else
{
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
void E3dView::Break3DObj()
@@ -1622,15 +1622,15 @@ void E3dView::CheckPossibilities()
if(bGroupPossible || bUnGroupPossible || bGrpEnterPossible)
{
sal_Int32 nMarkCnt = GetMarkedObjectCount();
- sal_Bool bCoumpound = sal_False;
- sal_Bool b3DObject = sal_False;
+ bool bCoumpound = false;
+ bool b3DObject = false;
for(sal_Int32 nObjs = 0L; (nObjs < nMarkCnt) && !bCoumpound; nObjs++)
{
SdrObject *pObj = GetMarkedObjectByIndex(nObjs);
if(pObj && pObj->ISA(E3dCompoundObject))
- bCoumpound = sal_True;
+ bCoumpound = true;
if(pObj && pObj->ISA(E3dObject))
- b3DObject = sal_True;
+ b3DObject = true;
}
// So far: there are two or more of any objects selected. See if