diff options
Diffstat (limited to 'sd/source/ui/view/drviews2.cxx')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 65 |
1 files changed, 29 insertions, 36 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index eb01114c5be7..e81d073f9f45 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -304,9 +304,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_HYPHENATION: { - // const SfxPoolItem* pItem = rReq.GetArg( SID_HYPHENATION ); - // ^-- should not be used (defaults are wrong) ! - SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, SID_HYPHENATION); + const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(SID_HYPHENATION); if( pItem ) { @@ -475,9 +473,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if (pArgs) if (pArgs->Count () == 3) { - SFX_REQUEST_ARG(rReq, pWidth, SfxUInt32Item, ID_VAL_PAGEWIDTH); - SFX_REQUEST_ARG(rReq, pHeight, SfxUInt32Item, ID_VAL_PAGEHEIGHT); - SFX_REQUEST_ARG(rReq, pScaleAll, SfxBoolItem, ID_VAL_SCALEOBJECTS); + const SfxUInt32Item* pWidth = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGEWIDTH); + const SfxUInt32Item* pHeight = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGEHEIGHT); + const SfxBoolItem* pScaleAll = rReq.GetArg<SfxBoolItem>(ID_VAL_SCALEOBJECTS); Size aSize (pWidth->GetValue (), pHeight->GetValue ()); @@ -499,11 +497,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if (pArgs) if (pArgs->Count () == 5) { - SFX_REQUEST_ARG(rReq, pLeft, SfxUInt32Item, ID_VAL_PAGELEFT); - SFX_REQUEST_ARG(rReq, pRight, SfxUInt32Item, ID_VAL_PAGERIGHT); - SFX_REQUEST_ARG(rReq, pUpper, SfxUInt32Item, ID_VAL_PAGETOP); - SFX_REQUEST_ARG(rReq, pLower, SfxUInt32Item, ID_VAL_PAGEBOTTOM); - SFX_REQUEST_ARG(rReq, pScaleAll, SfxBoolItem, ID_VAL_SCALEOBJECTS); + const SfxUInt32Item* pLeft = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGELEFT); + const SfxUInt32Item* pRight = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGERIGHT); + const SfxUInt32Item* pUpper = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGETOP); + const SfxUInt32Item* pLower = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGEBOTTOM); + const SfxBoolItem* pScaleAll = rReq.GetArg<SfxBoolItem>(ID_VAL_SCALEOBJECTS); Size aEmptySize (0, 0); @@ -526,7 +524,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if (pArgs && pArgs->Count () == 1 ) { - SFX_REQUEST_ARG(rReq, pScale, SfxUInt16Item, SID_ATTR_ZOOMSLIDER); + const SfxUInt16Item* pScale = rReq.GetArg<SfxUInt16Item>(SID_ATTR_ZOOMSLIDER); if (CHECK_RANGE (5, pScale->GetValue (), 3000)) { SetZoom (pScale->GetValue ()); @@ -551,7 +549,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if (pArgs) if (pArgs->Count () == 1) { - SFX_REQUEST_ARG(rReq, pScale, SfxUInt32Item, ID_VAL_ZOOM); + const SfxUInt32Item* pScale = rReq.GetArg<SfxUInt32Item>(ID_VAL_ZOOM); if (CHECK_RANGE (10, pScale->GetValue (), 1000)) { SetZoom (pScale->GetValue ()); @@ -1453,10 +1451,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } else { - SFX_REQUEST_ARG(rReq, pLayerName, SfxStringItem, ID_VAL_LAYERNAME); - SFX_REQUEST_ARG(rReq, pIsVisible, SfxBoolItem, ID_VAL_ISVISIBLE); - SFX_REQUEST_ARG(rReq, pIsLocked, SfxBoolItem, ID_VAL_ISLOCKED); - SFX_REQUEST_ARG(rReq, pIsPrintable, SfxBoolItem, ID_VAL_ISPRINTABLE); + const SfxStringItem* pLayerName = rReq.GetArg<SfxStringItem>(ID_VAL_LAYERNAME); + const SfxBoolItem* pIsVisible = rReq.GetArg<SfxBoolItem>(ID_VAL_ISVISIBLE); + const SfxBoolItem* pIsLocked = rReq.GetArg<SfxBoolItem>(ID_VAL_ISLOCKED); + const SfxBoolItem* pIsPrintable = rReq.GetArg<SfxBoolItem>(ID_VAL_ISPRINTABLE); aLayerName = pLayerName->GetValue (); bIsVisible = pIsVisible->GetValue (); @@ -1614,10 +1612,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } else if (pArgs->Count () == 4) { - SFX_REQUEST_ARG(rReq, pLayerName, SfxStringItem, ID_VAL_LAYERNAME); - SFX_REQUEST_ARG(rReq, pIsVisible, SfxBoolItem, ID_VAL_ISVISIBLE); - SFX_REQUEST_ARG(rReq, pIsLocked, SfxBoolItem, ID_VAL_ISLOCKED); - SFX_REQUEST_ARG(rReq, pIsPrintable, SfxBoolItem, ID_VAL_ISPRINTABLE); + const SfxStringItem* pLayerName = rReq.GetArg<SfxStringItem>(ID_VAL_LAYERNAME); + const SfxBoolItem* pIsVisible = rReq.GetArg<SfxBoolItem>(ID_VAL_ISVISIBLE); + const SfxBoolItem* pIsLocked = rReq.GetArg<SfxBoolItem>(ID_VAL_ISLOCKED); + const SfxBoolItem* pIsPrintable = rReq.GetArg<SfxBoolItem>(ID_VAL_ISPRINTABLE); aLayerName = pLayerName->GetValue (); bIsVisible = pIsVisible->GetValue (); @@ -2936,7 +2934,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_FONT: if( rReq.GetArgs() ) { - SFX_REQUEST_ARG(rReq, pItem, SvxFontItem, SID_ATTR_CHAR_FONT); + const SvxFontItem* pItem = rReq.GetArg<SvxFontItem>(SID_ATTR_CHAR_FONT); if (pItem) { aNewAttr.Put(*pItem); @@ -2946,7 +2944,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_FONTHEIGHT: if( rReq.GetArgs() ) { - SFX_REQUEST_ARG(rReq, pItem, SvxFontHeightItem, SID_ATTR_CHAR_FONTHEIGHT); + const SvxFontHeightItem* pItem = rReq.GetArg<SvxFontHeightItem>(SID_ATTR_CHAR_FONTHEIGHT); if (pItem) { aNewAttr.Put(*pItem); @@ -2956,8 +2954,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_WEIGHT: if( rReq.GetArgs() ) { - //const SvxWeightItem *pItem = (const SvxWeightItem*) rReq.GetArg( SID_ATTR_CHAR_WEIGHT, sal_False, TYPE(SvxWeightItem) ); - SFX_REQUEST_ARG(rReq, pItem, SvxWeightItem, SID_ATTR_CHAR_WEIGHT); + const SvxWeightItem* pItem = rReq.GetArg<SvxWeightItem>(SID_ATTR_CHAR_WEIGHT); if (pItem) { aNewAttr.Put(*pItem); @@ -2967,8 +2964,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_POSTURE: if( rReq.GetArgs() ) { - //const SvxPostureItem *pItem = (const SvxPostureItem*) rReq.GetArg( SID_ATTR_CHAR_POSTURE, sal_False, TYPE(SvxPostureItem) ); - SFX_REQUEST_ARG(rReq, pItem, SvxPostureItem, SID_ATTR_CHAR_POSTURE); + const SvxPostureItem* pItem = rReq.GetArg<SvxPostureItem>(SID_ATTR_CHAR_POSTURE); if (pItem) { aNewAttr.Put(*pItem); @@ -2978,10 +2974,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_UNDERLINE: if( rReq.GetArgs() ) { - //<<modify by wj for sym2_1873 - //SFX_REQUEST_ARG(rReq, pItem, SvxTextLineItem, SID_ATTR_CHAR_UNDERLINE , sal_False); - SFX_REQUEST_ARG(rReq, pItem, SvxUnderlineItem, SID_ATTR_CHAR_UNDERLINE); - //end>> + const SvxUnderlineItem* pItem = rReq.GetArg<SvxUnderlineItem>(SID_ATTR_CHAR_UNDERLINE); if (pItem) { aNewAttr.Put(*pItem); @@ -2996,7 +2989,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_SHADOWED: if( rReq.GetArgs() ) { - SFX_REQUEST_ARG(rReq, pItem, SvxShadowedItem, SID_ATTR_CHAR_SHADOWED); + const SvxShadowedItem* pItem = rReq.GetArg<SvxShadowedItem>(SID_ATTR_CHAR_SHADOWED); if (pItem) { aNewAttr.Put(*pItem); @@ -3006,7 +2999,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_STRIKEOUT: if( rReq.GetArgs() ) { - SFX_REQUEST_ARG(rReq, pItem, SvxCrossedOutItem, SID_ATTR_CHAR_STRIKEOUT); + const SvxCrossedOutItem* pItem = rReq.GetArg<SvxCrossedOutItem>(SID_ATTR_CHAR_STRIKEOUT); if (pItem) { aNewAttr.Put(*pItem); @@ -3016,7 +3009,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_COLOR: if( rReq.GetArgs() ) { - SFX_REQUEST_ARG(rReq, pItem, SvxColorItem, SID_ATTR_CHAR_COLOR); + const SvxColorItem* pItem = rReq.GetArg<SvxColorItem>(SID_ATTR_CHAR_COLOR); if (pItem) { aNewAttr.Put(*pItem); @@ -3026,7 +3019,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_KERNING: if( rReq.GetArgs() ) { - SFX_REQUEST_ARG(rReq, pItem, SvxKerningItem, SID_ATTR_CHAR_KERNING); + const SvxKerningItem* pItem = rReq.GetArg<SvxKerningItem>(SID_ATTR_CHAR_KERNING); if (pItem) { aNewAttr.Put(*pItem); @@ -3036,7 +3029,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_CASEMAP: if( rReq.GetArgs() ) { - SFX_REQUEST_ARG(rReq, pItem, SvxCaseMapItem, SID_ATTR_CHAR_CASEMAP); + const SvxCaseMapItem* pItem = rReq.GetArg<SvxCaseMapItem>(SID_ATTR_CHAR_CASEMAP); if (pItem) { aNewAttr.Put(*pItem); |