diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-08-18 10:55:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-08-18 10:55:36 +0200 |
commit | a51c423743835793bf132c925ad962283fd2dc22 (patch) | |
tree | 830680b766492f00f7706ee6680dba4b644c1394 | |
parent | b5a0b00d494928482e4dd44395765c480c8ae252 (diff) |
Consistency around SdrMetricItem in svx/sdsxyitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: I3734cb14b6ed8f556af85b234968682a55ac8a4c
-rw-r--r-- | cui/source/tabpages/tpshadow.cxx | 20 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 12 | ||||
-rw-r--r-- | include/svx/sdsxyitm.hxx | 22 | ||||
-rw-r--r-- | sc/source/core/data/drwlayer.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/postit.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/tool/detfunc.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 4 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 16 | ||||
-rw-r--r-- | sd/source/core/stlpool.cxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/primitive2d/sdrattributecreator.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/attr/swatrset.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentDrawModelManager.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 8 |
16 files changed, 60 insertions, 70 deletions
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 13dc14245baf..0a5658005b4f 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -296,23 +296,23 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) if( rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE && rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { - nOldX = ( ( const SdrShadowXDistItem& ) rOutAttrs. + nOldX = ( ( const SdrMetricItem& ) rOutAttrs. Get( SDRATTR_SHADOWXDIST ) ).GetValue(); - nOldY = ( ( const SdrShadowYDistItem& ) rOutAttrs. + nOldY = ( ( const SdrMetricItem& ) rOutAttrs. Get( SDRATTR_SHADOWYDIST ) ).GetValue(); } - SdrShadowXDistItem aXItem( nX ); + SdrMetricItem aXItem( makeSdrShadowXDistItem(nX) ); pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWXDIST ); if ( nX != nOldX && - ( !pOld || !( *(const SdrShadowXDistItem*)pOld == aXItem ) ) ) + ( !pOld || !( *(const SdrMetricItem*)pOld == aXItem ) ) ) { rAttrs->Put( aXItem ); bModified = true; } - SdrShadowYDistItem aYItem( nY ); + SdrMetricItem aYItem( makeSdrShadowYDistItem(nY) ); pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWYDIST ); if ( nY != nOldY && - ( !pOld || !( *(const SdrShadowYDistItem*)pOld == aYItem ) ) ) + ( !pOld || !( *(const SdrMetricItem*)pOld == aYItem ) ) ) { rAttrs->Put( aYItem ); bModified = true; @@ -382,8 +382,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) if( rAttrs->GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE && rAttrs->GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { - sal_Int32 nX = ( ( const SdrShadowXDistItem& ) rAttrs->Get( SDRATTR_SHADOWXDIST ) ).GetValue(); - sal_Int32 nY = ( ( const SdrShadowYDistItem& ) rAttrs->Get( SDRATTR_SHADOWYDIST ) ).GetValue(); + sal_Int32 nX = ( ( const SdrMetricItem& ) rAttrs->Get( SDRATTR_SHADOWXDIST ) ).GetValue(); + sal_Int32 nY = ( ( const SdrMetricItem& ) rAttrs->Get( SDRATTR_SHADOWYDIST ) ).GetValue(); if( nX != 0 ) SetMetricValue( *m_pMtrDistance, nX < 0L ? -nX : nX, ePoolUnit ); @@ -406,8 +406,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) { // determine default-distance SfxItemPool* pPool = rOutAttrs.GetPool(); - SdrShadowXDistItem* pXDistItem = (SdrShadowXDistItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWXDIST); - SdrShadowYDistItem* pYDistItem = (SdrShadowYDistItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWYDIST); + SdrMetricItem* pXDistItem = (SdrMetricItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWXDIST); + SdrMetricItem* pYDistItem = (SdrMetricItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWYDIST); if (pXDistItem && pYDistItem) { sal_Int32 nX = pXDistItem->GetValue(); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 2bf8a09f9776..293e4394f442 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2551,14 +2551,14 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj { sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetX ) ); rManager.ScaleEmu( nVal ); - rSet.Put( SdrShadowXDistItem( nVal ) ); + rSet.Put( makeSdrShadowXDistItem( nVal ) ); bNonZeroShadowOffset = ( nVal > 0 ); } if ( IsProperty( DFF_Prop_shadowOffsetY ) ) { sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetY ) ); rManager.ScaleEmu( nVal ); - rSet.Put( SdrShadowYDistItem( nVal ) ); + rSet.Put( makeSdrShadowYDistItem( nVal ) ); bNonZeroShadowOffset = ( nVal > 0 ); } if ( IsProperty( DFF_Prop_fshadowObscured ) ) @@ -2567,9 +2567,9 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj if ( bHasShadow ) { if ( !IsProperty( DFF_Prop_shadowOffsetX ) ) - rSet.Put( SdrShadowXDistItem( 35 ) ); + rSet.Put( makeSdrShadowXDistItem( 35 ) ); if ( !IsProperty( DFF_Prop_shadowOffsetY ) ) - rSet.Put( SdrShadowYDistItem( 35 ) ); + rSet.Put( makeSdrShadowYDistItem( 35 ) ); } } if ( IsProperty( DFF_Prop_shadowType ) ) @@ -2579,8 +2579,8 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj { //0.12" == 173 twip == 302 100mm sal_uInt32 nDist = rManager.pSdrModel->GetScaleUnit() == MAP_TWIP ? 173: 302; - rSet.Put( SdrShadowXDistItem( nDist ) ); - rSet.Put( SdrShadowYDistItem( nDist ) ); + rSet.Put( makeSdrShadowXDistItem( nDist ) ); + rSet.Put( makeSdrShadowYDistItem( nDist ) ); } } if ( bHasShadow ) diff --git a/include/svx/sdsxyitm.hxx b/include/svx/sdsxyitm.hxx index e8653d8b56cd..e2686a5689a9 100644 --- a/include/svx/sdsxyitm.hxx +++ b/include/svx/sdsxyitm.hxx @@ -22,23 +22,13 @@ #include <svx/sdmetitm.hxx> #include <svx/svddef.hxx> +inline SdrMetricItem makeSdrShadowXDistItem(long nDist) { + return SdrMetricItem(SDRATTR_SHADOWXDIST, nDist); +} -// class SdrShadowXDistItem - -class SdrShadowXDistItem: public SdrMetricItem { -public: - SdrShadowXDistItem(long nDist=0) : SdrMetricItem(SDRATTR_SHADOWXDIST,nDist) {} - SdrShadowXDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_SHADOWXDIST,rIn) {} -}; - - -// class SdrShadowYDistItem - -class SdrShadowYDistItem: public SdrMetricItem { -public: - SdrShadowYDistItem(long nDist=0) : SdrMetricItem(SDRATTR_SHADOWYDIST,nDist) {} - SdrShadowYDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_SHADOWYDIST,rIn) {} -}; +inline SdrMetricItem makeSdrShadowYDistItem(long nDist) { + return SdrMetricItem(SDRATTR_SHADOWYDIST, nDist); +} #endif diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 70f7634da6f4..a6dc6e7323c9 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -221,8 +221,8 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const OUString& rName ) : // #i33700# // Set shadow distance defaults as PoolDefaultItems. Details see bug. - rPool.SetPoolDefaultItem(SdrShadowXDistItem(300)); - rPool.SetPoolDefaultItem(SdrShadowYDistItem(300)); + rPool.SetPoolDefaultItem(makeSdrShadowXDistItem(300)); + rPool.SetPoolDefaultItem(makeSdrShadowYDistItem(300)); // default for script spacing depends on locale, see SdDrawDocument ctor in sd LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 433138ddfbba..c1d56b0ac948 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -124,8 +124,8 @@ void ScCaptionUtil::SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc ) rectangle only with SetSpecialTextBoxShadow() when the object is created (item must be set to adjust objects from older files). */ aItemSet.Put( makeSdrShadowItem( false ) ); - aItemSet.Put( SdrShadowXDistItem( 100 ) ); - aItemSet.Put( SdrShadowYDistItem( 100 ) ); + aItemSet.Put( makeSdrShadowXDistItem( 100 ) ); + aItemSet.Put( makeSdrShadowYDistItem( 100 ) ); // text attributes aItemSet.Put( makeSdrTextLeftDistItem( 100 ) ); @@ -147,8 +147,8 @@ void ScCaptionUtil::SetCaptionItems( SdrCaptionObj& rCaption, const SfxItemSet& rCaption.SetMergedItemSet( rItemSet ); // reset shadow items rCaption.SetMergedItem( makeSdrShadowItem( false ) ); - rCaption.SetMergedItem( SdrShadowXDistItem( 100 ) ); - rCaption.SetMergedItem( SdrShadowYDistItem( 100 ) ); + rCaption.SetMergedItem( makeSdrShadowXDistItem( 100 ) ); + rCaption.SetMergedItem( makeSdrShadowYDistItem( 100 ) ); rCaption.SetSpecialTextBoxShadow(); } diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index c71b7c5b6e88..9ecebad81f53 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -215,8 +215,8 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) : // only with SetSpecialTextBoxShadow when the object is created // (item must be set to adjust objects from older files) aCaptionSet.Put( makeSdrShadowItem( false ) ); - aCaptionSet.Put( SdrShadowXDistItem( 100 ) ); - aCaptionSet.Put( SdrShadowYDistItem( 100 ) ); + aCaptionSet.Put( makeSdrShadowXDistItem( 100 ) ); + aCaptionSet.Put( makeSdrShadowYDistItem( 100 ) ); // text attributes aCaptionSet.Put( makeSdrTextLeftDistItem( 100 ) ); diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 3f5a1f1a2818..858c154a2d8d 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -769,8 +769,8 @@ void XclImpDrawObjBase::ConvertFrameStyle( SdrObject& rSdrObj, sal_uInt16 nFrame if( ::get_flag( nFrameFlags, EXC_OBJ_FRAME_SHADOW ) ) { rSdrObj.SetMergedItem( makeSdrShadowItem( true ) ); - rSdrObj.SetMergedItem( SdrShadowXDistItem( 35 ) ); - rSdrObj.SetMergedItem( SdrShadowYDistItem( 35 ) ); + rSdrObj.SetMergedItem( makeSdrShadowXDistItem( 35 ) ); + rSdrObj.SetMergedItem( makeSdrShadowYDistItem( 35 ) ); rSdrObj.SetMergedItem( SdrShadowColorItem( GetPalette().GetColor( EXC_COLOR_WINDOWTEXT ) ) ); } } diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 4f9b5f494e47..c138922b2985 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -177,8 +177,8 @@ void SdDrawDocument::CreateLayoutTemplates() // Shadow attributes (Drawing Engine) rISet.Put(makeSdrShadowItem(false)); rISet.Put(SdrShadowColorItem(RGB_Color(COL_GRAY))); - rISet.Put(SdrShadowXDistItem(200)); // 3 mm Shadow distance - rISet.Put(SdrShadowYDistItem(200)); + rISet.Put(makeSdrShadowXDistItem(200)); // 3 mm Shadow distance + rISet.Put(makeSdrShadowYDistItem(200)); Font aLatinFont, aCJKFont, aCTLFont; @@ -285,8 +285,8 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(makeSdrShadowItem(true)); pISet->Put(SdrShadowColorItem(RGB_Color(COL_GRAY))); - pISet->Put(SdrShadowXDistItem(200)); // 3 mm shadow distance - pISet->Put(SdrShadowYDistItem(200)); + pISet->Put(makeSdrShadowXDistItem(200)); // 3 mm shadow distance + pISet->Put(makeSdrShadowYDistItem(200)); // Object without fillung aName = SD_RESSTR(STR_POOLSHEET_OBJWITHOUTFILL); @@ -384,8 +384,8 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(makeSdrShadowItem(true)); pISet->Put(SdrShadowColorItem(RGB_Color(COL_GRAY))); - pISet->Put(SdrShadowXDistItem(200)); // 2 mm shadow distance - pISet->Put(SdrShadowYDistItem(200)); + pISet->Put(makeSdrShadowXDistItem(200)); // 2 mm shadow distance + pISet->Put(makeSdrShadowYDistItem(200)); pISet->Put(SvxFontHeightItem(846, 100, EE_CHAR_FONTHEIGHT )); // 24 pt @@ -408,8 +408,8 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(makeSdrShadowItem(true)); pISet->Put(SdrShadowColorItem(RGB_Color(COL_GRAY))); - pISet->Put(SdrShadowXDistItem(200)); // 2 mm shadow distance - pISet->Put(SdrShadowYDistItem(200)); + pISet->Put(makeSdrShadowXDistItem(200)); // 2 mm shadow distance + pISet->Put(makeSdrShadowYDistItem(200)); pISet->Put(SvxFontHeightItem(1270, 100, EE_CHAR_FONTHEIGHT )); // 36 pt diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 824e05af097f..3fbfecf90e77 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -488,8 +488,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool SfxItemSet& rBackgroundObjectsSet = pSheet->GetItemSet(); rBackgroundObjectsSet.Put(makeSdrShadowItem(false)); rBackgroundObjectsSet.Put(SdrShadowColorItem(Color(COL_GRAY))); - rBackgroundObjectsSet.Put(SdrShadowXDistItem(200)); // 3 mm shadow distance - rBackgroundObjectsSet.Put(SdrShadowYDistItem(200)); + rBackgroundObjectsSet.Put(makeSdrShadowXDistItem(200)); // 3 mm shadow distance + rBackgroundObjectsSet.Put(makeSdrShadowYDistItem(200)); // #i16874# enable kerning by default but only for new documents rBackgroundObjectsSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) ); rBackgroundObjectsSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK)); diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx index cc569c238490..6aeb71498031 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx @@ -145,8 +145,8 @@ namespace sdr if(!aFill.isDefault() && 1.0 != aFill.getTransparence()) { // add shadow offset to object matrix - const sal_uInt32 nXDist(((SdrShadowXDistItem&)(rItemSet.Get(SDRATTR_SHADOWXDIST))).GetValue()); - const sal_uInt32 nYDist(((SdrShadowYDistItem&)(rItemSet.Get(SDRATTR_SHADOWYDIST))).GetValue()); + const sal_uInt32 nXDist(((SdrMetricItem&)(rItemSet.Get(SDRATTR_SHADOWXDIST))).GetValue()); + const sal_uInt32 nYDist(((SdrMetricItem&)(rItemSet.Get(SDRATTR_SHADOWYDIST))).GetValue()); if(nXDist || nYDist) { diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index ac87b70dc334..ef44f3f9c165 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -368,8 +368,8 @@ namespace drawinglayer if(100 != nTransparence) { const basegfx::B2DVector aOffset( - (double)((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue(), - (double)((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue()); + (double)((SdrMetricItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue(), + (double)((SdrMetricItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue()); const Color aColor(((SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue()); return attribute::SdrShadowAttribute(aOffset, (double)nTransparence * 0.01, aColor.getBColor()); diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index f5a275b2276b..917274e4d512 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -130,8 +130,8 @@ SdrItemPool::SdrItemPool( // init own PoolDefaults mppLocalPoolDefaults[SDRATTR_SHADOW -SDRATTR_START]=new SdrOnOffItem(SDRATTR_SHADOW, false); mppLocalPoolDefaults[SDRATTR_SHADOWCOLOR -SDRATTR_START]=new SdrShadowColorItem(aNullCol); - mppLocalPoolDefaults[SDRATTR_SHADOWXDIST -SDRATTR_START]=new SdrShadowXDistItem; - mppLocalPoolDefaults[SDRATTR_SHADOWYDIST -SDRATTR_START]=new SdrShadowYDistItem; + mppLocalPoolDefaults[SDRATTR_SHADOWXDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWXDIST, 0); + mppLocalPoolDefaults[SDRATTR_SHADOWYDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWYDIST, 0); mppLocalPoolDefaults[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]=new SdrShadowTransparenceItem; mppLocalPoolDefaults[SDRATTR_SHADOW3D -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D ); mppLocalPoolDefaults[SDRATTR_SHADOWPERSP -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP ); diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 8c49061328c1..8e4f0934df93 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -211,8 +211,8 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS if(bShadow) { // create a shadow representing object - const sal_Int32 nXDist(((SdrShadowXDistItem&)(rOriginalSet.Get(SDRATTR_SHADOWXDIST))).GetValue()); - const sal_Int32 nYDist(((SdrShadowYDistItem&)(rOriginalSet.Get(SDRATTR_SHADOWYDIST))).GetValue()); + const sal_Int32 nXDist(((SdrMetricItem&)(rOriginalSet.Get(SDRATTR_SHADOWXDIST))).GetValue()); + const sal_Int32 nYDist(((SdrMetricItem&)(rOriginalSet.Get(SDRATTR_SHADOWYDIST))).GetValue()); const ::Color aShadowColor(((SdrShadowColorItem&)(rOriginalSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue()); const sal_uInt16 nShadowTransparence(((SdrShadowTransparenceItem&)(rOriginalSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue()); pRetval = rOriginal.Clone(); @@ -281,8 +281,8 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS // no shadow aTempSet.Put(makeSdrShadowItem(false)); - aTempSet.Put(SdrShadowXDistItem(0L)); - aTempSet.Put(SdrShadowYDistItem(0L)); + aTempSet.Put(makeSdrShadowXDistItem(0L)); + aTempSet.Put(makeSdrShadowYDistItem(0L)); // line color and transparency like shadow if(bLineUsed) diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index 6eee57dd9c67..20c787446cdd 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -96,8 +96,8 @@ void SwAttrPool::createAndAddSecondaryPools() pSdrPool->SetPoolDefaultItem(SdrEdgeNode2VertDistItem(nDefEdgeDist)); // #i33700# // Set shadow distance defaults as PoolDefaultItems - pSdrPool->SetPoolDefaultItem(SdrShadowXDistItem((300 * 72) / 127)); - pSdrPool->SetPoolDefaultItem(SdrShadowYDistItem((300 * 72) / 127)); + pSdrPool->SetPoolDefaultItem(makeSdrShadowXDistItem((300 * 72) / 127)); + pSdrPool->SetPoolDefaultItem(makeSdrShadowYDistItem((300 * 72) / 127)); } SfxItemPool *pEEgPool = EditEngine::CreatePool(false); diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx index ce0155554808..95f7bfad4018 100644 --- a/sw/source/core/doc/DocumentDrawModelManager.cxx +++ b/sw/source/core/doc/DocumentDrawModelManager.cxx @@ -86,8 +86,8 @@ void DocumentDrawModelManager::InitDrawModel() // // // #i33700# // // Set shadow distance defaults as PoolDefaultItems. Details see bug. -// pSdrPool->SetPoolDefaultItem(SdrShadowXDistItem((300 * 72) / 127)); -// pSdrPool->SetPoolDefaultItem(SdrShadowYDistItem((300 * 72) / 127)); +// pSdrPool->SetPoolDefaultItem(makeSdrShadowXDistItem((300 * 72) / 127)); +// pSdrPool->SetPoolDefaultItem(makeSdrShadowYDistItem((300 * 72) / 127)); // } // SfxItemPool *pEEgPool = EditEngine::CreatePool( false ); // pSdrPool->SetSecondaryPool( pEEgPool ); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 4a0141450a96..bbaf439f436e 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -232,8 +232,8 @@ static void SetStdAttr( SfxItemSet& rSet, WW8_DP_LINETYPE& rL, } if( SVBT16ToShort( rSh.shdwpi ) ){ // shadow rSet.Put(makeSdrShadowItem(true)); - rSet.Put( SdrShadowXDistItem( SVBT16ToShort( rSh.xaOffset ) ) ); - rSet.Put( SdrShadowYDistItem( SVBT16ToShort( rSh.yaOffset ) ) ); + rSet.Put( makeSdrShadowXDistItem( SVBT16ToShort( rSh.xaOffset ) ) ); + rSet.Put( makeSdrShadowYDistItem( SVBT16ToShort( rSh.yaOffset ) ) ); } } @@ -1701,9 +1701,9 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, const Color aShdColor = static_cast< SdrShadowColorItem const & >( rOldSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue(); const sal_Int32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST, - SdrShadowXDistItem); + SdrMetricItem); const sal_Int32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST, - SdrShadowYDistItem); + SdrMetricItem); aShadow.SetColor( Color( aShdColor ) ); |