diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-05 15:13:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-11 08:18:19 +0200 |
commit | eeae5cf0432adb83e5e948a217020b776144d783 (patch) | |
tree | 4fae56ac560cac89d2ad62308fa0cabe3313b8ee | |
parent | 729c93c12f3a05bc3afe9a94bbd0a5113a9ff758 (diff) |
svx: sal_Bool->bool
Change-Id: I799d547cb3f81aeae19d0c8b6a2161b3064539f0
-rw-r--r-- | include/svx/obj3d.hxx | 16 | ||||
-rw-r--r-- | include/svx/optgrid.hxx | 26 | ||||
-rw-r--r-- | sd/source/ui/app/optsitem.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/inc/optsitem.hxx | 8 | ||||
-rw-r--r-- | svx/source/dialog/optgrid.cxx | 26 | ||||
-rw-r--r-- | sw/source/core/uibase/app/appopt.cxx | 2 |
6 files changed, 43 insertions, 43 deletions
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx index 2cfe27c99f9e..18ec02f4603d 100644 --- a/include/svx/obj3d.hxx +++ b/include/svx/obj3d.hxx @@ -133,7 +133,7 @@ protected: // and no instances should be created from anyone, so i move the constructors // to protected area E3dObject(); - E3dObject(sal_Bool bIsFromChart); + E3dObject(bool bIsFromChart); public: TYPEINFO(); @@ -250,7 +250,7 @@ public : virtual void AddToHdlList(SdrHdlList& rHdlList) const; // DoubleSided: sal_True/FALSE - sal_Bool GetDoubleSided() const + bool GetDoubleSided() const { return ((const Svx3DDoubleSidedItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); } // NormalsKind: 0 == sal_False/sal_False, 1 == sal_True/sal_False, else == sal_True/TRUE @@ -258,7 +258,7 @@ public : { return ((const Svx3DNormalsKindItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue(); } // NormalsInvert: sal_True/FALSE - sal_Bool GetNormalsInvert() const + bool GetNormalsInvert() const { return ((const Svx3DNormalsInvertItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); } // TextureProjX: 0 == sal_False/sal_False, 1 == sal_True/sal_False, else == sal_True/TRUE @@ -270,7 +270,7 @@ public : { return ((const Svx3DTextureProjectionYItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue(); } // Shadow3D: sal_True/FALSE - sal_Bool GetShadow3D() const + bool GetShadow3D() const { return ((const Svx3DShadow3DItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); } // MaterialColor: Color @@ -290,21 +290,21 @@ public : { return ((const Svx3DMaterialSpecularIntensityItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); } // TextureFilter: sal_True/FALSE - sal_Bool GetTextureFilter() const + bool GetTextureFilter() const { return ((const Svx3DTextureFilterItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); } // #i28528# // Added extra Item (Bool) for chart2 to be able to show reduced line geometry - sal_Bool GetReducedLineGeometry() const + bool GetReducedLineGeometry() const { return ((const Svx3DReducedLineGeometryItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY)).GetValue(); } virtual sal_uInt16 GetObjIdentifier() const; virtual void RecalcSnapRect(); // set/get parameters for geometry creation - sal_Bool GetCreateNormals() const { return bCreateNormals; } + bool GetCreateNormals() const { return bCreateNormals; } - sal_Bool GetCreateTexture() const { return bCreateTexture; } + bool GetCreateTexture() const { return bCreateTexture; } virtual E3dCompoundObject* Clone() const; diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx index 135abfd28f65..c8f6d4efddcd 100644 --- a/include/svx/optgrid.hxx +++ b/include/svx/optgrid.hxx @@ -39,10 +39,10 @@ protected: sal_uInt32 nFldDivisionY; sal_uInt32 nFldSnapX; sal_uInt32 nFldSnapY; - sal_Bool bUseGridsnap:1; - sal_Bool bSynchronize:1; - sal_Bool bGridVisible:1; - sal_Bool bEqualGrid: 1; + bool bUseGridsnap:1; + bool bSynchronize:1; + bool bGridVisible:1; + bool bEqualGrid: 1; public: SvxOptionsGrid(); @@ -54,10 +54,10 @@ public: void SetFldDivisionY(sal_uInt32 nSet){nFldDivisionY = nSet;} void SetFldSnapX( sal_uInt32 nSet){nFldSnapX = nSet;} void SetFldSnapY ( sal_uInt32 nSet){nFldSnapY = nSet;} - void SetUseGridSnap( sal_Bool bSet ) {bUseGridsnap = bSet;} - void SetSynchronize( sal_Bool bSet ) {bSynchronize = bSet;} - void SetGridVisible( sal_Bool bSet ) {bGridVisible = bSet;} - void SetEqualGrid( sal_Bool bSet ) {bEqualGrid = bSet;} + void SetUseGridSnap( bool bSet ) {bUseGridsnap = bSet;} + void SetSynchronize( bool bSet ) {bSynchronize = bSet;} + void SetGridVisible( bool bSet ) {bGridVisible = bSet;} + void SetEqualGrid( bool bSet ) {bEqualGrid = bSet;} sal_uInt32 GetFldDrawX( ) const { return nFldDrawX; } sal_uInt32 GetFldDivisionX() const { return nFldDivisionX;} @@ -65,10 +65,10 @@ public: sal_uInt32 GetFldDivisionY() const { return nFldDivisionY;} sal_uInt32 GetFldSnapX( ) const { return nFldSnapX; } sal_uInt32 GetFldSnapY ( ) const { return nFldSnapY; } - sal_Bool GetUseGridSnap( ) const { return bUseGridsnap; } - sal_Bool GetSynchronize( ) const { return bSynchronize; } - sal_Bool GetGridVisible( ) const { return bGridVisible; } - sal_Bool GetEqualGrid() const { return bEqualGrid; } + bool GetUseGridSnap( ) const { return bUseGridsnap; } + bool GetSynchronize( ) const { return bSynchronize; } + bool GetGridVisible( ) const { return bGridVisible; } + bool GetEqualGrid() const { return bEqualGrid; } }; // class SvxGridItem ----------------------------------------------------- @@ -137,7 +137,7 @@ protected: MetricField* pMtrFldBezAngle; private: - sal_Bool bAttrModified; + bool bAttrModified; DECL_LINK( ClickRotateHdl_Impl, void * ); DECL_LINK( ChangeDrawHdl_Impl, MetricField * ); diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index fcf18b394fcc..8c9453ef264c 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -1107,10 +1107,10 @@ void SdOptionsGrid::SetDefaults() SetFldDrawY( nVal ); SetFldSnapX( nVal ); SetFldSnapY( nVal ); - SetUseGridSnap( sal_False ); - SetSynchronize( sal_True ); - SetGridVisible( sal_False ); - SetEqualGrid( sal_True ); + SetUseGridSnap( false ); + SetSynchronize( true ); + SetGridVisible( false ); + SetEqualGrid( true ); } diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx index 076677156965..a3856b0f3928 100644 --- a/sd/source/ui/inc/optsitem.hxx +++ b/sd/source/ui/inc/optsitem.hxx @@ -477,10 +477,10 @@ public: void SetFldDivisionY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDivisionY() ) { OptionsChanged(); SvxOptionsGrid::SetFldDivisionY( nSet ); } } void SetFldSnapX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldSnapX() ) { OptionsChanged(); SvxOptionsGrid::SetFldSnapX( nSet ); } } void SetFldSnapY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldSnapY() ) { OptionsChanged(); SvxOptionsGrid::SetFldSnapY( nSet ); } } - void SetUseGridSnap( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetUseGridSnap() ) { OptionsChanged(); SvxOptionsGrid::SetUseGridSnap( bSet ); } } - void SetSynchronize( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetSynchronize() ) { OptionsChanged(); SvxOptionsGrid::SetSynchronize( bSet ); } } - void SetGridVisible( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetGridVisible() ) { OptionsChanged(); SvxOptionsGrid::SetGridVisible( bSet ); } } - void SetEqualGrid( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetEqualGrid() ) { OptionsChanged(); SvxOptionsGrid::SetEqualGrid( bSet ); } } + void SetUseGridSnap( bool bSet ) { if( bSet != SvxOptionsGrid::GetUseGridSnap() ) { OptionsChanged(); SvxOptionsGrid::SetUseGridSnap( bSet ); } } + void SetSynchronize( bool bSet ) { if( bSet != SvxOptionsGrid::GetSynchronize() ) { OptionsChanged(); SvxOptionsGrid::SetSynchronize( bSet ); } } + void SetGridVisible( bool bSet ) { if( bSet != SvxOptionsGrid::GetGridVisible() ) { OptionsChanged(); SvxOptionsGrid::SetGridVisible( bSet ); } } + void SetEqualGrid( bool bSet ) { if( bSet != SvxOptionsGrid::GetEqualGrid() ) { OptionsChanged(); SvxOptionsGrid::SetEqualGrid( bSet ); } } }; class SdOptionsGridItem : public SvxGridItem diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index ab729cf3038e..d211172807f0 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -52,10 +52,10 @@ SvxOptionsGrid::SvxOptionsGrid() : nFldDivisionY ( 0 ), nFldSnapX ( 100 ), nFldSnapY ( 100 ), - bUseGridsnap ( 0 ), - bSynchronize ( 1 ), - bGridVisible ( 0 ), - bEqualGrid ( 1 ) + bUseGridsnap ( false ), + bSynchronize ( true ), + bGridVisible ( false ), + bEqualGrid ( true ) { } @@ -129,7 +129,7 @@ SfxItemPresentation SvxGridItem::GetPresentation SvxGridTabPage::SvxGridTabPage( Window* pParent, const SfxItemSet& rCoreSet) : SfxTabPage( pParent, "OptGridPage" , "svx/ui/optgridpage.ui", rCoreSet ), - bAttrModified( sal_False ) + bAttrModified( false ) { get(pCbxUseGridsnap,"usegridsnap"); get(pCbxGridVisible,"gridvisible"); @@ -226,9 +226,9 @@ void SvxGridTabPage::Reset( const SfxItemSet& rSet ) (const SfxPoolItem**)&pAttr )) { const SvxGridItem* pGridAttr = (SvxGridItem*)pAttr; - pCbxUseGridsnap->Check( pGridAttr->bUseGridsnap == 1 ); - pCbxSynchronize->Check( pGridAttr->bSynchronize == 1 ); - pCbxGridVisible->Check( pGridAttr->bGridVisible == 1 ); + pCbxUseGridsnap->Check( pGridAttr->bUseGridsnap ); + pCbxSynchronize->Check( pGridAttr->bSynchronize ); + pCbxGridVisible->Check( pGridAttr->bGridVisible ); SfxMapUnit eUnit = rSet.GetPool()->GetMetric( GetWhich( SID_ATTR_GRID_OPTIONS ) ); @@ -240,7 +240,7 @@ void SvxGridTabPage::Reset( const SfxItemSet& rSet ) } ChangeGridsnapHdl_Impl( pCbxUseGridsnap ); - bAttrModified = sal_False; + bAttrModified = false; } @@ -252,7 +252,7 @@ void SvxGridTabPage::ActivatePage( const SfxItemSet& rSet ) (const SfxPoolItem**)&pAttr )) { const SvxGridItem* pGridAttr = (SvxGridItem*) pAttr; - pCbxUseGridsnap->Check( pGridAttr->bUseGridsnap == 1 ); + pCbxUseGridsnap->Check( pGridAttr->bUseGridsnap ); ChangeGridsnapHdl_Impl( pCbxUseGridsnap ); } @@ -298,7 +298,7 @@ int SvxGridTabPage::DeactivatePage( SfxItemSet* _pSet ) IMPL_LINK( SvxGridTabPage, ChangeDrawHdl_Impl, MetricField *, pField ) { - bAttrModified = sal_True; + bAttrModified = true; if( pCbxSynchronize->IsChecked() ) { if(pField == pMtrFldDrawX) @@ -324,7 +324,7 @@ IMPL_LINK_NOARG(SvxGridTabPage, ClickRotateHdl_Impl) IMPL_LINK( SvxGridTabPage, ChangeDivisionHdl_Impl, NumericField *, pField ) { - bAttrModified = sal_True; + bAttrModified = true; if( pCbxSynchronize->IsChecked() ) { if(pNumFldDivisionX == pField) @@ -338,7 +338,7 @@ IMPL_LINK( SvxGridTabPage, ChangeDivisionHdl_Impl, NumericField *, pField ) IMPL_LINK_NOARG(SvxGridTabPage, ChangeGridsnapHdl_Impl) { - bAttrModified = sal_True; + bAttrModified = true; return 0; } diff --git a/sw/source/core/uibase/app/appopt.cxx b/sw/source/core/uibase/app/appopt.cxx index 3658dfa6c0d1..6eba18e024e0 100644 --- a/sw/source/core/uibase/app/appopt.cxx +++ b/sw/source/core/uibase/app/appopt.cxx @@ -350,7 +350,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) aViewOpt.SetSnap( pGridItem->GetUseGridSnap() ); aViewOpt.SetSynchronize(pGridItem->GetSynchronize()); - if( aViewOpt.IsGridVisible() != pGridItem->GetGridVisible() ) + if( aViewOpt.IsGridVisible() != (pGridItem->GetGridVisible() ? 1 : 0) ) aViewOpt.SetGridVisible( pGridItem->GetGridVisible()); Size aSize = Size( pGridItem->GetFldDrawX() , pGridItem->GetFldDrawY() ); |