diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-01-28 11:56:10 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-01-28 13:49:41 +0100 |
commit | a1bef744a24b072adc22035b5b15b376961351d8 (patch) | |
tree | 9bb035b3db18f8d85769469a7621bce710628f8c /editeng | |
parent | 06de72bea24a83e4a4efbc235853a40781bce168 (diff) |
SwXTextFrame: use XFillGradientItem instead of extending SvxBrushItem
Change-Id: I8863cbe1d01fceac0f4b4152264c1464c90e02b8
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/inc/editeng/brshitem.hxx | 3 | ||||
-rw-r--r-- | editeng/inc/editeng/memberids.hrc | 2 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 50 |
3 files changed, 1 insertions, 54 deletions
diff --git a/editeng/inc/editeng/brshitem.hxx b/editeng/inc/editeng/brshitem.hxx index b35df0e1b0d2..fca5653a6aaf 100644 --- a/editeng/inc/editeng/brshitem.hxx +++ b/editeng/inc/editeng/brshitem.hxx @@ -33,7 +33,6 @@ namespace rtl { class OUString; } -class Gradient; #define BRUSH_GRAPHIC_VERSION ((sal_uInt16)0x0001) @@ -112,14 +111,12 @@ public: const GraphicObject* GetGraphicObject() const; const String* GetGraphicLink() const { return pStrLink; } const String* GetGraphicFilter() const { return pStrFilter; } - const Gradient& GetGradient() const; void SetGraphicPos( SvxGraphicPosition eNew ); void SetGraphic( const Graphic& rNew ); void SetGraphicObject( const GraphicObject& rNewObj ); void SetGraphicLink( const String& rNew ); void SetGraphicFilter( const String& rNew ); - void SetGradient(Gradient& rNew); SvxBrushItem& operator=( const SvxBrushItem& rItem); diff --git a/editeng/inc/editeng/memberids.hrc b/editeng/inc/editeng/memberids.hrc index 376c219a11ee..2ce6c22ace2f 100644 --- a/editeng/inc/editeng/memberids.hrc +++ b/editeng/inc/editeng/memberids.hrc @@ -170,8 +170,6 @@ #define MID_GRAPHIC_TRANSPARENCY 8 #define MID_BACK_COLOR_R_G_B 9 #define MID_BACK_COLOR_TRANSPARENCY 10 -#define MID_FILL_STYLE 11 -#define MID_FILL_GRADIENT 12 //SvxFmtBreakItem #define MID_BREAK_BEFORE 0 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 , |