summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-18 17:37:31 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-18 17:38:08 +0200
commit69dd9c669a4021b5202dad7030bc4738145de661 (patch)
tree5d9e55de9eb3158c1699df330e5c8527e68d61ca
parent65b09ff5975f1c53ed33870ffa974fbf8b94279d (diff)
Consistency around SdrPercentItem in svx/sdshtitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in 6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and 68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem." Change-Id: I4e98c362f811c19f03766d0c78f10c795d3ac79d
-rw-r--r--cui/source/tabpages/tparea.cxx4
-rw-r--r--cui/source/tabpages/tpshadow.cxx6
-rw-r--r--filter/source/msfilter/msdffimp.cxx2
-rw-r--r--include/svx/sdshtitm.hxx11
-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
9 files changed, 14 insertions, 19 deletions
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 818613db83fa..21779035a8e2 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -323,7 +323,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs)
if(m_pMtrTransparent->IsValueChangedFromSaved() || !bLinearActive)
{
XFillTransparenceItem aItem(nPos);
- SdrShadowTransparenceItem aShadowItem(nPos);
+ SdrPercentItem aShadowItem(makeSdrShadowTransparenceItem(nPos));
const SfxPoolItem* pOld = GetOldItem(*rAttrs, XATTR_FILLTRANSPARENCE);
if(!pOld || !(*(const XFillTransparenceItem*)pOld == aItem) || !bLinearActive)
{
@@ -393,7 +393,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs)
if(bSwitchOffLinear && (bLinearActive || bLinearUsed))
{
XFillTransparenceItem aItem(0);
- SdrShadowTransparenceItem aShadowItem(0);
+ SdrPercentItem aShadowItem(makeSdrShadowTransparenceItem(0));
rAttrs->Put(aItem);
rAttrs->Put(aShadowItem);
bModified = true;
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 43eeabf0fa91..643e80f58b1d 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -336,9 +336,9 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs )
sal_uInt16 nVal = (sal_uInt16)m_pMtrTransparent->GetValue();
if( m_pMtrTransparent->IsValueChangedFromSaved() )
{
- SdrShadowTransparenceItem aItem( nVal );
+ SdrPercentItem aItem( makeSdrShadowTransparenceItem(nVal) );
pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWTRANSPARENCE );
- if ( !pOld || !( *(const SdrShadowTransparenceItem*)pOld == aItem ) )
+ if ( !pOld || !( *(const SdrPercentItem*)pOld == aItem ) )
{
rAttrs->Put( aItem );
bModified = true;
@@ -433,7 +433,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SFX_ITEM_DONTCARE )
{
- sal_uInt16 nTransp = ( ( const SdrShadowTransparenceItem& ) rAttrs->Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue();
+ sal_uInt16 nTransp = ( ( const SdrPercentItem& ) rAttrs->Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue();
m_pMtrTransparent->SetValue( nTransp );
}
else
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index b6bf96dfaf73..22825bc383c7 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -2546,7 +2546,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj
rSet.Put( SdrShadowColorItem( rManager.MSO_CLR_ToColor( 0x00808080, DFF_Prop_shadowColor ) ) );
}
if ( IsProperty( DFF_Prop_shadowOpacity ) )
- rSet.Put( SdrShadowTransparenceItem( (sal_uInt16)( ( 0x10000 - GetPropertyValue( DFF_Prop_shadowOpacity ) ) / 655 ) ) );
+ rSet.Put( makeSdrShadowTransparenceItem( (sal_uInt16)( ( 0x10000 - GetPropertyValue( DFF_Prop_shadowOpacity ) ) / 655 ) ) );
if ( IsProperty( DFF_Prop_shadowOffsetX ) )
{
sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetX ) );
diff --git a/include/svx/sdshtitm.hxx b/include/svx/sdshtitm.hxx
index 607f3bc2e5ad..e1035077be43 100644
--- a/include/svx/sdshtitm.hxx
+++ b/include/svx/sdshtitm.hxx
@@ -22,14 +22,9 @@
#include <svx/sdprcitm.hxx>
#include <svx/svddef.hxx>
-/**
- * class SdrShadowTransparenceItem
- */
-class SdrShadowTransparenceItem: public SdrPercentItem {
-public:
- SdrShadowTransparenceItem(sal_uInt16 nTransp=0): SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE,nTransp) {}
- SdrShadowTransparenceItem(SvStream& rIn) : SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE,rIn) {}
-};
+inline SdrPercentItem makeSdrShadowTransparenceItem(sal_uInt16 nTransp) {
+ return SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, nTransp);
+}
#endif
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
index 1b10633c2522..3b384c28a21c 100644
--- a/svx/source/sdr/attribute/sdrformtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -83,7 +83,7 @@ namespace
if(bShadow)
{
- nRetval = (sal_uInt8)((((SdrShadowTransparenceItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue() * 255) / 100);
+ nRetval = (sal_uInt8)((((SdrPercentItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue() * 255) / 100);
}
else
{
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index 6aeb71498031..58ff93981008 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -109,7 +109,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 sal_uInt16 nShadowTransparence(((SdrShadowTransparenceItem&)(rItemSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue());
+ 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 3b8074b1cb60..914d06a2fc3e 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -339,7 +339,7 @@ namespace drawinglayer
if(bShadow)
{
- sal_uInt16 nTransparence(((SdrShadowTransparenceItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue());
+ sal_uInt16 nTransparence(((SdrPercentItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue());
if(nTransparence > 100)
{
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 9f148ad6d3de..24e77e7bf42b 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -132,7 +132,7 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_SHADOWCOLOR -SDRATTR_START]=new SdrShadowColorItem(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 SdrShadowTransparenceItem;
+ mppLocalPoolDefaults[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]=new SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, 0);
mppLocalPoolDefaults[SDRATTR_SHADOW3D -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D );
mppLocalPoolDefaults[SDRATTR_SHADOWPERSP -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP );
mppLocalPoolDefaults[SDRATTR_CAPTIONTYPE -SDRATTR_START]=new SdrCaptionTypeItem ;
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 8e4f0934df93..e2e99178abd1 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -214,7 +214,7 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS
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());
+ const sal_uInt16 nShadowTransparence(((SdrPercentItem&)(rOriginalSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue());
pRetval = rOriginal.Clone();
DBG_ASSERT(pRetval, "ImpCreateShadowObjectClone: Could not clone object (!)");