summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/grfsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/shells/grfsh.cxx')
-rw-r--r--sw/source/ui/shells/grfsh.cxx68
1 files changed, 34 insertions, 34 deletions
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 7464b22b06..2d826fec42 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -95,7 +95,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_TWAIN_TRANSFER:
@@ -130,7 +130,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, rSh.IsFrmSelected() ?
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, rSh.IsFrmSelected() ?
FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF);
const SwViewOption* pVOpt = rSh.GetViewOptions();
SwViewOption aUsrPref( *pVOpt );
@@ -152,10 +152,10 @@ void SwGrfShell::Execute(SfxRequest &rReq)
FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
0);
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
FieldUnit eMetric = ::GetDfltMetric((0 != (nHtmlMode&HTMLMODE_ON)));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE);
SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height());
@@ -242,7 +242,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_GRF,
GetView().GetViewFrame(),
GetView().GetWindow(),
- aSet, FALSE, DLG_FRM_GRF);
+ aSet, sal_False, DLG_FRM_GRF);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( pDlg->Execute() )
{
@@ -253,7 +253,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
rReq.Done(*pSet);
// change the 2 frmsize SizeItems to the correct SwFrmSizeItem
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem ))
+ SID_ATTR_GRAF_FRMSIZE, sal_False, &pItem ))
{
SwFmtFrmSize aSize;
const Size& rSz = ((SvxSizeItem*)pItem)->GetSize();
@@ -261,11 +261,11 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSize.SetHeight( rSz.Height() );
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_FRMSIZE_PERCENT, FALSE, &pItem ))
+ SID_ATTR_GRAF_FRMSIZE_PERCENT, sal_False, &pItem ))
{
const Size& rRelativeSize = ((SvxSizeItem*)pItem)->GetSize();
- aSize.SetWidthPercent( static_cast< BYTE >( rRelativeSize.Width() ) );
- aSize.SetHeightPercent( static_cast< BYTE >( rRelativeSize.Height() ) );
+ aSize.SetWidthPercent( static_cast< sal_uInt8 >( rRelativeSize.Width() ) );
+ aSize.SetHeightPercent( static_cast< sal_uInt8 >( rRelativeSize.Height() ) );
}
pSet->Put( aSize );
}
@@ -289,20 +289,20 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
aMgr.UpdateFlyFrm();
- BOOL bApplyUsrPref = FALSE;
+ sal_Bool bApplyUsrPref = sal_False;
if (SFX_ITEM_SET == pSet->GetItemState(
- FN_KEEP_ASPECT_RATIO, TRUE, &pItem ))
+ FN_KEEP_ASPECT_RATIO, sal_True, &pItem ))
{
aUsrPref.SetKeepRatio(
((const SfxBoolItem*)pItem)->GetValue() );
- bApplyUsrPref = TRUE;
+ bApplyUsrPref = sal_True;
}
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_KEEP_ZOOM, TRUE, &pItem ))
+ SID_ATTR_GRAF_KEEP_ZOOM, sal_True, &pItem ))
{
aUsrPref.SetGrfKeepZoom(
((const SfxBoolItem*)pItem)->GetValue() );
- bApplyUsrPref = TRUE;
+ bApplyUsrPref = sal_True;
}
if( bApplyUsrPref )
@@ -310,7 +310,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// and now set all the graphic attributes and other stuff
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_GRAPHIC, TRUE, &pItem ))
+ SID_ATTR_GRAF_GRAPHIC, sal_True, &pItem ))
{
if( ((SvxBrushItem*)pItem)->GetGraphicLink() )
sGrfNm = *((SvxBrushItem*)pItem)->GetGraphicLink();
@@ -325,7 +325,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( sGrfNm.Len() )
{
SwDocShell* pDocSh = GetView().GetDocShell();
- SwWait aWait( *pDocSh, TRUE );
+ SwWait aWait( *pDocSh, sal_True );
SfxMedium* pMedium = pDocSh->GetMedium();
INetURLObject aAbs;
if( pMedium )
@@ -337,7 +337,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
}
if ( SFX_ITEM_SET == pSet->GetItemState(
- FN_SET_FRM_ALT_NAME, TRUE, &pItem ))
+ FN_SET_FRM_ALT_NAME, sal_True, &pItem ))
{
// #i73249#
rSh.SetObjTitle( ((const SfxStringItem*)pItem)->GetValue() );
@@ -375,7 +375,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
void SwGrfShell::ExecAttr( SfxRequest &rReq )
{
- USHORT nGrfType;
+ sal_uInt16 nGrfType;
if( CNT_GRF == GetShell().GetCntType() &&
( GRAPHIC_BITMAP == ( nGrfType = GetShell().GetGraphicType()) ||
GRAPHIC_GDIMETAFILE == nGrfType ))
@@ -384,8 +384,8 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
RES_GRFATR_END -1 );
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlot = rReq.GetSlot();
- if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, FALSE, &pItem ))
+ sal_uInt16 nSlot = rReq.GetSlot();
+ if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, sal_False, &pItem ))
pItem = 0;
switch( nSlot )
@@ -396,7 +396,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
GetShell().GetCurAttr( aGrfSet );
SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get(
RES_GRFATR_MIRRORGRF ) );
- USHORT nMirror = aMirror.GetValue();
+ sal_uInt16 nMirror = aMirror.GetValue();
if( FN_FLIP_VERT_GRAFIC == nSlot )
switch( nMirror )
{
@@ -524,23 +524,23 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
SwWrtShell &rSh = GetShell();
SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange );
rSh.GetCurAttr( aCoreSet );
- BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
- BOOL bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
+ sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
+ sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
SetGetStateSet( &rSet );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
- BOOL bDisable = bParentCntProt;
+ sal_Bool bDisable = bParentCntProt;
switch( nWhich )
{
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
case SID_TWAIN_TRANSFER:
if( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
break;
case FN_SAVE_GRAPHIC:
if( rSh.GetGraphicType() == GRAPHIC_NONE )
@@ -556,7 +556,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_COLOR_SETTINGS:
{
if ( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
else
{
svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
@@ -616,7 +616,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_ATTR_GRAF_GAMMA:
if( !bParentCntProt )
- rSet.Put( SfxUInt32Item( nWhich, static_cast< UINT32 >(
+ rSet.Put( SfxUInt32Item( nWhich, static_cast< sal_uInt32 >(
( (SwGammaGrf&)aCoreSet.Get( RES_GRFATR_GAMMA ) ).GetValue() * 100 ) ) );
break;
case SID_ATTR_GRAF_TRANSPARENCE:
@@ -628,7 +628,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
{
if( pGrfObj->IsAnimated() ||
GRAPHIC_GDIMETAFILE == pGrfObj->GetType() )
- bDisable = TRUE;
+ bDisable = sal_True;
else
rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&)
aCoreSet.Get(RES_GRFATR_TRANSPARENCY)).GetValue() ));
@@ -661,18 +661,18 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_GRFFILTER_SOLARIZE:
{
if( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
// #i59688# load graphic only if type is unknown
else
{
- const USHORT eGraphicType( rSh.GetGraphicType() );
+ const sal_uInt16 eGraphicType( rSh.GetGraphicType() );
if ( ( eGraphicType == GRAPHIC_NONE ||
eGraphicType == GRAPHIC_DEFAULT ) &&
- rSh.IsGrfSwapOut( TRUE ) )
+ rSh.IsGrfSwapOut( sal_True ) )
{
rSet.DisableItem( nWhich );
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -684,7 +684,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
break;
default:
- bDisable = FALSE;
+ bDisable = sal_False;
}
if( bDisable )