summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/tabpages/tpshadow.cxx6
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--include/svx/sdshcitm.hxx11
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx8
-rw-r--r--sd/source/core/stlpool.cxx2
-rw-r--r--svx/source/sdr/attribute/sdrformtextattribute.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx2
-rw-r--r--svx/source/svdraw/svdattr.cxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx2
12 files changed, 20 insertions, 25 deletions
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 643e80f58b1d..30b7dc73230f 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -323,9 +323,9 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs )
if( nPos != LISTBOX_ENTRY_NOTFOUND &&
m_pLbShadowColor->IsValueChangedFromSaved() )
{
- SdrShadowColorItem aItem(m_pLbShadowColor->GetSelectEntryColor());
+ XColorItem aItem(makeSdrShadowColorItem(m_pLbShadowColor->GetSelectEntryColor()));
pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWCOLOR );
- if ( !pOld || !( *(const SdrShadowColorItem*)pOld == aItem ) )
+ if ( !pOld || !( *(const XColorItem*)pOld == aItem ) )
{
rAttrs->Put( aItem );
bModified = true;
@@ -426,7 +426,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( SDRATTR_SHADOWCOLOR ) != SFX_ITEM_DONTCARE )
{
- m_pLbShadowColor->SelectEntry( ( ( const SdrShadowColorItem& ) rAttrs->Get( SDRATTR_SHADOWCOLOR ) ).GetColorValue() );
+ m_pLbShadowColor->SelectEntry( ( ( const XColorItem& ) rAttrs->Get( SDRATTR_SHADOWCOLOR ) ).GetColorValue() );
}
else
m_pLbShadowColor->SetNoSelection();
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 22825bc383c7..4764533a02a2 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -2539,11 +2539,11 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj
if ( IsProperty( DFF_Prop_fillColor ) )
rSet.Put( XFillColorItem( OUString(), rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillColor ), DFF_Prop_fillColor ) ) );
if ( IsProperty( DFF_Prop_shadowColor ) )
- rSet.Put( SdrShadowColorItem( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_shadowColor ), DFF_Prop_shadowColor ) ) );
+ rSet.Put( makeSdrShadowColorItem( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_shadowColor ), DFF_Prop_shadowColor ) ) );
else
{
//The default value for this property is 0x00808080
- rSet.Put( SdrShadowColorItem( rManager.MSO_CLR_ToColor( 0x00808080, DFF_Prop_shadowColor ) ) );
+ rSet.Put( makeSdrShadowColorItem( rManager.MSO_CLR_ToColor( 0x00808080, DFF_Prop_shadowColor ) ) );
}
if ( IsProperty( DFF_Prop_shadowOpacity ) )
rSet.Put( makeSdrShadowTransparenceItem( (sal_uInt16)( ( 0x10000 - GetPropertyValue( DFF_Prop_shadowOpacity ) ) / 655 ) ) );
diff --git a/include/svx/sdshcitm.hxx b/include/svx/sdshcitm.hxx
index 63ea604698e0..01c474127c8d 100644
--- a/include/svx/sdshcitm.hxx
+++ b/include/svx/sdshcitm.hxx
@@ -22,14 +22,9 @@
#include <svx/xcolit.hxx>
#include <svx/svddef.hxx>
-class SdrShadowColorItem: public XColorItem
-{
-public:
- SdrShadowColorItem(const Color& rTheColor)
- : XColorItem(SDRATTR_SHADOWCOLOR, rTheColor)
- {
- }
-};
+inline XColorItem makeSdrShadowColorItem(const Color& rTheColor) {
+ return XColorItem(SDRATTR_SHADOWCOLOR, rTheColor);
+}
#endif
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 858c154a2d8d..c463097480e5 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -771,7 +771,7 @@ void XclImpDrawObjBase::ConvertFrameStyle( SdrObject& rSdrObj, sal_uInt16 nFrame
rSdrObj.SetMergedItem( makeSdrShadowItem( true ) );
rSdrObj.SetMergedItem( makeSdrShadowXDistItem( 35 ) );
rSdrObj.SetMergedItem( makeSdrShadowYDistItem( 35 ) );
- rSdrObj.SetMergedItem( SdrShadowColorItem( GetPalette().GetColor( EXC_COLOR_WINDOWTEXT ) ) );
+ rSdrObj.SetMergedItem( makeSdrShadowColorItem( GetPalette().GetColor( EXC_COLOR_WINDOWTEXT ) ) );
}
}
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index c138922b2985..b5ab78dd473a 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -176,7 +176,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Shadow attributes (Drawing Engine)
rISet.Put(makeSdrShadowItem(false));
- rISet.Put(SdrShadowColorItem(RGB_Color(COL_GRAY)));
+ rISet.Put(makeSdrShadowColorItem(RGB_Color(COL_GRAY)));
rISet.Put(makeSdrShadowXDistItem(200)); // 3 mm Shadow distance
rISet.Put(makeSdrShadowYDistItem(200));
@@ -284,7 +284,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet = &pSheet->GetItemSet();
pISet->Put(makeSdrShadowItem(true));
- pISet->Put(SdrShadowColorItem(RGB_Color(COL_GRAY)));
+ pISet->Put(makeSdrShadowColorItem(RGB_Color(COL_GRAY)));
pISet->Put(makeSdrShadowXDistItem(200)); // 3 mm shadow distance
pISet->Put(makeSdrShadowYDistItem(200));
@@ -383,7 +383,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(XFillColorItem(OUString(), RGB_Color(COL_CYAN)));
pISet->Put(makeSdrShadowItem(true));
- pISet->Put(SdrShadowColorItem(RGB_Color(COL_GRAY)));
+ pISet->Put(makeSdrShadowColorItem(RGB_Color(COL_GRAY)));
pISet->Put(makeSdrShadowXDistItem(200)); // 2 mm shadow distance
pISet->Put(makeSdrShadowYDistItem(200));
@@ -407,7 +407,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(XFillColorItem(OUString(), aOrange4));
pISet->Put(makeSdrShadowItem(true));
- pISet->Put(SdrShadowColorItem(RGB_Color(COL_GRAY)));
+ pISet->Put(makeSdrShadowColorItem(RGB_Color(COL_GRAY)));
pISet->Put(makeSdrShadowXDistItem(200)); // 2 mm shadow distance
pISet->Put(makeSdrShadowYDistItem(200));
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 3fbfecf90e77..7cde782592f8 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -487,7 +487,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
pSheet->SetParent( OUString() );
SfxItemSet& rBackgroundObjectsSet = pSheet->GetItemSet();
rBackgroundObjectsSet.Put(makeSdrShadowItem(false));
- rBackgroundObjectsSet.Put(SdrShadowColorItem(Color(COL_GRAY)));
+ rBackgroundObjectsSet.Put(makeSdrShadowColorItem(Color(COL_GRAY)));
rBackgroundObjectsSet.Put(makeSdrShadowXDistItem(200)); // 3 mm shadow distance
rBackgroundObjectsSet.Put(makeSdrShadowYDistItem(200));
// #i16874# enable kerning by default but only for new documents
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
index 3b384c28a21c..7fd8fe94c442 100644
--- a/svx/source/sdr/attribute/sdrformtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -99,7 +99,7 @@ namespace
if(bShadow)
{
- const Color aShadowColor(((SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue());
+ const Color aShadowColor(((XColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue());
aColorAttribute = aShadowColor.getBColor();
}
else
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index 58ff93981008..e5c84ed87830 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -108,7 +108,7 @@ namespace sdr
{
// for SC, the caption object may have a specialized shadow. The usual object shadow is off
// and a specialized shadow gets created here (see old paint)
- const SdrShadowColorItem& rShadColItem = (SdrShadowColorItem&)(rItemSet.Get(SDRATTR_SHADOWCOLOR));
+ const XColorItem& rShadColItem = (XColorItem&)(rItemSet.Get(SDRATTR_SHADOWCOLOR));
const sal_uInt16 nShadowTransparence(((SdrPercentItem&)(rItemSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue());
const Color aShadowColor(rShadColItem.GetColorValue());
const drawing::FillStyle eShadowStyle = ((XFillStyleItem&)(rItemSet.Get(XATTR_FILLSTYLE))).GetValue();
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 914d06a2fc3e..47019b7caa3e 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -370,7 +370,7 @@ namespace drawinglayer
const basegfx::B2DVector aOffset(
(double)((SdrMetricItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue(),
(double)((SdrMetricItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue());
- const Color aColor(((SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue());
+ const Color aColor(((XColorItem&)(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 24e77e7bf42b..a738e25f76a8 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -129,7 +129,7 @@ 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_SHADOWCOLOR -SDRATTR_START]=new XColorItem(SDRATTR_SHADOWCOLOR, aNullCol);
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 SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, 0);
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index e2e99178abd1..687ed35740e4 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -213,7 +213,7 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS
// create a shadow representing object
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 ::Color aShadowColor(((XColorItem&)(rOriginalSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue());
const sal_uInt16 nShadowTransparence(((SdrPercentItem&)(rOriginalSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue());
pRetval = rOriginal.Clone();
DBG_ASSERT(pRetval, "ImpCreateShadowObjectClone: Could not clone object (!)");
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index bbaf439f436e..1abac07881bd 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1698,7 +1698,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
{
SvxShadowItem aShadow( RES_SHADOW );
- const Color aShdColor = static_cast< SdrShadowColorItem const & >(
+ const Color aShdColor = static_cast< XColorItem const & >(
rOldSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue();
const sal_Int32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST,
SdrMetricItem);