Kaydet (Commit) 0de82fe2 authored tarafından Rodolfo Ribeiro Gomes's avatar Rodolfo Ribeiro Gomes Kaydeden (comit) Norbert Thiebaud

sal_Bool to bool in sw/source/ui/shells/grfsh.cxx

Change-Id: I10727407c04b46eb80fb7b9b7f5ddcb0c7d628fa
Reviewed-on: https://gerrit.libreoffice.org/1425Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 509eb776
...@@ -290,20 +290,20 @@ void SwGrfShell::Execute(SfxRequest &rReq) ...@@ -290,20 +290,20 @@ void SwGrfShell::Execute(SfxRequest &rReq)
} }
aMgr.UpdateFlyFrm(); aMgr.UpdateFlyFrm();
sal_Bool bApplyUsrPref = sal_False; bool bApplyUsrPref = false;
if (SFX_ITEM_SET == pSet->GetItemState( if (SFX_ITEM_SET == pSet->GetItemState(
FN_KEEP_ASPECT_RATIO, sal_True, &pItem )) FN_KEEP_ASPECT_RATIO, sal_True, &pItem ))
{ {
aUsrPref.SetKeepRatio( aUsrPref.SetKeepRatio(
((const SfxBoolItem*)pItem)->GetValue() ); ((const SfxBoolItem*)pItem)->GetValue() );
bApplyUsrPref = sal_True; bApplyUsrPref = true;
} }
if( SFX_ITEM_SET == pSet->GetItemState( if( SFX_ITEM_SET == pSet->GetItemState(
SID_ATTR_GRAF_KEEP_ZOOM, sal_True, &pItem )) SID_ATTR_GRAF_KEEP_ZOOM, sal_True, &pItem ))
{ {
aUsrPref.SetGrfKeepZoom( aUsrPref.SetGrfKeepZoom(
((const SfxBoolItem*)pItem)->GetValue() ); ((const SfxBoolItem*)pItem)->GetValue() );
bApplyUsrPref = sal_True; bApplyUsrPref = true;
} }
if( bApplyUsrPref ) if( bApplyUsrPref )
...@@ -524,8 +524,8 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) ...@@ -524,8 +524,8 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
SwWrtShell &rSh = GetShell(); SwWrtShell &rSh = GetShell();
SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange ); SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange );
rSh.GetCurAttr( aCoreSet ); rSh.GetCurAttr( aCoreSet );
sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ); bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType(); bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
SetGetStateSet( &rSet ); SetGetStateSet( &rSet );
...@@ -533,24 +533,24 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) ...@@ -533,24 +533,24 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
sal_uInt16 nWhich = aIter.FirstWhich(); sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich ) while( nWhich )
{ {
sal_Bool bDisable = bParentCntProt; bool bDisable = bParentCntProt;
switch( nWhich ) switch( nWhich )
{ {
case SID_INSERT_GRAPHIC: case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG: case FN_FORMAT_GRAFIC_DLG:
case SID_TWAIN_TRANSFER: case SID_TWAIN_TRANSFER:
if( bParentCntProt || !bIsGrfCntnt ) if( bParentCntProt || !bIsGrfCntnt )
bDisable = sal_True; bDisable = true;
break; break;
case SID_SAVE_GRAPHIC: case SID_SAVE_GRAPHIC:
case SID_EXTERNAL_EDIT: case SID_EXTERNAL_EDIT:
if( rSh.GetGraphicType() == GRAPHIC_NONE ) if( rSh.GetGraphicType() == GRAPHIC_NONE )
bDisable = sal_True; bDisable = true;
break; break;
case SID_COLOR_SETTINGS: case SID_COLOR_SETTINGS:
{ {
if ( bParentCntProt || !bIsGrfCntnt ) if ( bParentCntProt || !bIsGrfCntnt )
bDisable = sal_True; bDisable = true;
else else
{ {
svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME ); svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
...@@ -622,7 +622,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) ...@@ -622,7 +622,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
{ {
if( pGrafObj->IsAnimated() || if( pGrafObj->IsAnimated() ||
GRAPHIC_GDIMETAFILE == pGrafObj->GetType() ) GRAPHIC_GDIMETAFILE == pGrafObj->GetType() )
bDisable = sal_True; bDisable = true;
else else
rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&) rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&)
aCoreSet.Get(RES_GRFATR_TRANSPARENCY)).GetValue() )); aCoreSet.Get(RES_GRFATR_TRANSPARENCY)).GetValue() ));
...@@ -655,7 +655,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) ...@@ -655,7 +655,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_GRFFILTER_SOLARIZE: case SID_GRFFILTER_SOLARIZE:
{ {
if( bParentCntProt || !bIsGrfCntnt ) if( bParentCntProt || !bIsGrfCntnt )
bDisable = sal_True; bDisable = true;
// #i59688# load graphic only if type is unknown // #i59688# load graphic only if type is unknown
else else
{ {
...@@ -677,7 +677,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) ...@@ -677,7 +677,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
break; break;
default: default:
bDisable = sal_False; bDisable = false;
} }
if( bDisable ) if( bDisable )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment