diff options
Diffstat (limited to 'sw/source/uibase/shells/grfsh.cxx')
-rw-r--r-- | sw/source/uibase/shells/grfsh.cxx | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index a217b5d56ecb..1aa4b210a8a2 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -191,7 +191,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) convertTwipToMm100(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Width()), convertTwipToMm100(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Height())); - SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF> ); + SfxItemSetFixed<RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF> aSet( rSh.GetAttrPool() ); rSh.GetCurAttr( aSet ); SwMirrorGrf aMirror( aSet.Get(RES_GRFATR_MIRRORGRF) ); SwCropGrf aCrop( aSet.Get(RES_GRFATR_CROPGRF) ); @@ -258,9 +258,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) const SwViewOption* pVOpt = rSh.GetViewOptions(); SwViewOption aUsrPref( *pVOpt ); - SfxItemSet aSet( - GetPool(), - svl::Items< + SfxItemSetFixed< RES_FRMATR_BEGIN, RES_GRFATR_CROPGRF, // FillAttribute support: XATTR_FILL_FIRST, XATTR_FILL_LAST, @@ -283,7 +281,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) FN_PARAM_GRF_DIALOG, FN_PARAM_GRF_DIALOG, FN_SET_FRM_NAME, FN_KEEP_ASPECT_RATIO, FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, - FN_UNO_DESCRIPTION, FN_UNO_DESCRIPTION>); + FN_UNO_DESCRIPTION, FN_UNO_DESCRIPTION> aSet( GetPool() ); // create needed items for XPropertyList entries from the DrawModel so that // the Area TabPage can access them @@ -366,8 +364,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) // get Mirror and Crop { - SfxItemSet aTmpSet( rSh.GetAttrPool(), - svl::Items<RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF> ); + SfxItemSetFixed<RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF> aTmpSet( rSh.GetAttrPool() ); rSh.GetCurAttr( aTmpSet ); aSet.Put( aTmpSet ); @@ -390,7 +387,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) { // RotGrfFlyFrame: Add current RotationAngle value, convert from // RES_GRFATR_ROTATION to SID_ATTR_TRANSFORM_ANGLE. Do not forget to // convert from 10th degrees to 100th degrees - SfxItemSet aTmpSet( rSh.GetAttrPool(), svl::Items<RES_GRFATR_ROTATION, RES_GRFATR_ROTATION> ); + SfxItemSetFixed<RES_GRFATR_ROTATION, RES_GRFATR_ROTATION> aTmpSet( rSh.GetAttrPool() ); rSh.GetCurAttr( aTmpSet ); const SwRotationGrf& rRotation = aTmpSet.Get(RES_GRFATR_ROTATION); nCurrentRotation = rRotation.GetValue(); @@ -437,11 +434,9 @@ void SwGrfShell::Execute(SfxRequest &rReq) if(pFormat && pFormat->IsAutoUpdateFormat()) { pFormat->SetFormatAttr(*pSet); - SfxItemSet aShellSet( - GetPool(), - svl::Items< + SfxItemSetFixed< RES_FRM_SIZE, RES_FRM_SIZE, - RES_SURROUND, RES_ANCHOR>); + RES_SURROUND, RES_ANCHOR> aShellSet( GetPool() ); aShellSet.Put(*pSet); aMgr.SetAttrSet(aShellSet); } @@ -518,8 +513,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) aMgr.SetRotation(nCurrentRotation, aNewRotation, aUnrotatedSize); } - SfxItemSet aGrfSet( rSh.GetAttrPool(), svl::Items<RES_GRFATR_BEGIN, - RES_GRFATR_END-1> ); + SfxItemSetFixed<RES_GRFATR_BEGIN, RES_GRFATR_END-1> aGrfSet( rSh.GetAttrPool() ); aGrfSet.Put( *pSet ); if( aGrfSet.Count() ) rSh.SetAttrSet( aGrfSet ); @@ -532,7 +526,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) case FN_GRAPHIC_MIRROR_ON_EVEN_PAGES: { - SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_GRFATR_MIRRORGRF, RES_GRFATR_MIRRORGRF>); + SfxItemSetFixed<RES_GRFATR_MIRRORGRF, RES_GRFATR_MIRRORGRF> aSet(rSh.GetAttrPool()); rSh.GetCurAttr( aSet ); SwMirrorGrf aGrf(aSet.Get(RES_GRFATR_MIRRORGRF)); aGrf.SetGrfToggle(!aGrf.IsGrfToggle()); @@ -563,8 +557,7 @@ void SwGrfShell::ExecAttr( SfxRequest const &rReq ) if (GraphicType::Bitmap == nGrfType || GraphicType::GdiMetafile == nGrfType) { - SfxItemSet aGrfSet( GetShell().GetAttrPool(), svl::Items<RES_GRFATR_BEGIN, - RES_GRFATR_END -1> ); + SfxItemSetFixed<RES_GRFATR_BEGIN, RES_GRFATR_END -1> aGrfSet( GetShell().GetAttrPool() ); const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; sal_uInt16 nSlot = rReq.GetSlot(); @@ -933,7 +926,7 @@ void SwGrfShell::ExecuteRotation(SfxRequest const &rReq) return; SwWrtShell& rShell = GetShell(); - SfxItemSet aSet( rShell.GetAttrPool(), svl::Items<RES_GRFATR_ROTATION, RES_GRFATR_ROTATION> ); + SfxItemSetFixed<RES_GRFATR_ROTATION, RES_GRFATR_ROTATION> aSet( rShell.GetAttrPool() ); rShell.GetCurAttr( aSet ); const SwRotationGrf& rRotation = aSet.Get(RES_GRFATR_ROTATION); SwFlyFrameAttrMgr aMgr(false, &rShell, rShell.IsFrameSelected() ? Frmmgr_Type::NONE : Frmmgr_Type::GRF, nullptr); @@ -978,7 +971,7 @@ void SwGrfShell::GetAttrStateForRotation(SfxItemSet &rSet) case SID_ROTATE_GRAPHIC_RESET: { // RotGrfFlyFrame: disable when already no rotation - SfxItemSet aSet( rShell.GetAttrPool(), svl::Items<RES_GRFATR_ROTATION, RES_GRFATR_ROTATION> ); + SfxItemSetFixed<RES_GRFATR_ROTATION, RES_GRFATR_ROTATION> aSet( rShell.GetAttrPool() ); rShell.GetCurAttr( aSet ); const SwRotationGrf& rRotation = aSet.Get(RES_GRFATR_ROTATION); bDisable = (0_deg10 == rRotation.GetValue()); @@ -988,7 +981,7 @@ void SwGrfShell::GetAttrStateForRotation(SfxItemSet &rSet) { // RotGrfFlyFrame: get rotation value from RES_GRFATR_ROTATION and copy to rSet as // SID_ATTR_TRANSFORM_ANGLE, convert from 10th degrees to 100th degrees - SfxItemSet aSet( rShell.GetAttrPool(), svl::Items<RES_GRFATR_ROTATION, RES_GRFATR_ROTATION> ); + SfxItemSetFixed<RES_GRFATR_ROTATION, RES_GRFATR_ROTATION> aSet( rShell.GetAttrPool() ); rShell.GetCurAttr( aSet ); const SwRotationGrf& rRotation = aSet.Get(RES_GRFATR_ROTATION); rSet.Put(SdrAngleItem(SID_ATTR_TRANSFORM_ANGLE, toDegree100(rRotation.GetValue()))); |