summaryrefslogtreecommitdiff
path: root/editeng/source/items
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-01-28 11:56:10 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-01-28 13:49:41 +0100
commita1bef744a24b072adc22035b5b15b376961351d8 (patch)
tree9bb035b3db18f8d85769469a7621bce710628f8c /editeng/source/items
parent06de72bea24a83e4a4efbc235853a40781bce168 (diff)
SwXTextFrame: use XFillGradientItem instead of extending SvxBrushItem
Change-Id: I8863cbe1d01fceac0f4b4152264c1464c90e02b8
Diffstat (limited to 'editeng/source/items')
-rw-r--r--editeng/source/items/frmitems.cxx50
1 files changed, 1 insertions, 49 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 9bcafd61fa1a..6e202da73a87 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -41,7 +41,6 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/frame/status/UpperLowerMarginScale.hpp>
-#include <com/sun/star/awt/Gradient.hpp>
#include <unotools/ucbstreamhelper.hxx>
#include <limits.h>
@@ -56,7 +55,6 @@
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <vcl/graphicfilter.hxx>
-#include <vcl/gradient.hxx>
#include <editeng/editids.hrc>
#include <editeng/editrids.hrc>
#include <editeng/pbinitem.hxx>
@@ -3327,7 +3325,6 @@ public:
//copied to the GraphicObject when necessary
Link aDoneLink;
SvStream* pStream;
- Gradient aGradient;
SvxBrushItem_Impl( GraphicObject* p ) : pGraphicObject( p ), nGraphicTransparency(0), pStream(0) {}
};
@@ -3642,22 +3639,6 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
case MID_GRAPHIC_TRANSPARENCY :
rVal <<= pImpl->nGraphicTransparency;
break;
- case MID_FILL_GRADIENT:
- {
- awt::Gradient aGradient;
- aGradient.Style = (awt::GradientStyle)pImpl->aGradient.GetStyle();
- aGradient.StartColor = pImpl->aGradient.GetStartColor().GetColor();
- aGradient.EndColor = pImpl->aGradient.GetEndColor().GetColor();
- aGradient.Angle = pImpl->aGradient.GetAngle();
- aGradient.Border = pImpl->aGradient.GetBorder();
- aGradient.XOffset = pImpl->aGradient.GetOfsX();
- aGradient.YOffset = pImpl->aGradient.GetOfsY();
- aGradient.StartIntensity = pImpl->aGradient.GetStartIntensity();
- aGradient.EndIntensity = pImpl->aGradient.GetEndIntensity();
- aGradient.StepCount = pImpl->aGradient.GetSteps();
- rVal <<= aGradient;
- }
- break;
}
return true;
@@ -3773,23 +3754,6 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
}
}
break;
- case MID_FILL_GRADIENT:
- {
- awt::Gradient aGradient;
- if (!(rVal >>= aGradient))
- return false;
- pImpl->aGradient.SetStyle((GradientStyle)aGradient.Style);
- pImpl->aGradient.SetStartColor(aGradient.StartColor);
- pImpl->aGradient.SetEndColor(aGradient.EndColor);
- pImpl->aGradient.SetAngle(aGradient.Angle);
- pImpl->aGradient.SetBorder(aGradient.Border);
- pImpl->aGradient.SetOfsX(aGradient.XOffset);
- pImpl->aGradient.SetOfsY(aGradient.YOffset);
- pImpl->aGradient.SetStartIntensity(aGradient.StartIntensity);
- pImpl->aGradient.SetEndIntensity(aGradient.EndIntensity);
- pImpl->aGradient.SetSteps(aGradient.StepCount);
- }
- break;
}
return true;
@@ -3860,7 +3824,6 @@ SvxBrushItem& SvxBrushItem::operator=( const SvxBrushItem& rItem )
}
}
pImpl->nGraphicTransparency = rItem.pImpl->nGraphicTransparency;
- pImpl->aGradient = rItem.pImpl->aGradient;
return *this;
}
@@ -3872,8 +3835,7 @@ int SvxBrushItem::operator==( const SfxPoolItem& rAttr ) const
SvxBrushItem& rCmp = (SvxBrushItem&)rAttr;
sal_Bool bEqual = ( aColor == rCmp.aColor && eGraphicPos == rCmp.eGraphicPos &&
- pImpl->nGraphicTransparency == rCmp.pImpl->nGraphicTransparency &&
- pImpl->aGradient == rCmp.pImpl->aGradient);
+ pImpl->nGraphicTransparency == rCmp.pImpl->nGraphicTransparency);
if ( bEqual )
{
@@ -4185,16 +4147,6 @@ void SvxBrushItem::ApplyGraphicTransparency_Impl()
}
}
-const Gradient& SvxBrushItem::GetGradient() const
-{
- return pImpl->aGradient;
-}
-
-void SvxBrushItem::SetGradient(Gradient& rNew)
-{
- pImpl->aGradient = rNew;
-}
-
// class SvxFrameDirectionItem ----------------------------------------------
SvxFrameDirectionItem::SvxFrameDirectionItem( SvxFrameDirection nValue ,