Kaydet (Commit) d8de1d60 authored tarafından Miklos Vajna's avatar Miklos Vajna

XFillGradientItem: don't assume the default Which ID

Change-Id: I2baced123f957fb47f7710c122664842e0b1bb1d
üst a1bef744
...@@ -38,7 +38,7 @@ public: ...@@ -38,7 +38,7 @@ public:
XFillGradientItem() : NameOrIndex(XATTR_FILLGRADIENT, -1) {} XFillGradientItem() : NameOrIndex(XATTR_FILLGRADIENT, -1) {}
XFillGradientItem(sal_uInt16 nWhich_) : NameOrIndex(nWhich_, -1) {} XFillGradientItem(sal_uInt16 nWhich_) : NameOrIndex(nWhich_, -1) {}
XFillGradientItem(sal_Int32 nIndex, const XGradient& rTheGradient); XFillGradientItem(sal_Int32 nIndex, const XGradient& rTheGradient);
XFillGradientItem(const UniString& rName, const XGradient& rTheGradient); XFillGradientItem(const UniString& rName, const XGradient& rTheGradient, sal_uInt16 nWhich_ = XATTR_FILLGRADIENT);
XFillGradientItem(const XGradient& rTheGradient); XFillGradientItem(const XGradient& rTheGradient);
XFillGradientItem(const XFillGradientItem& rItem); XFillGradientItem(const XFillGradientItem& rItem);
XFillGradientItem(SvStream& rIn, sal_uInt16 nVer = 0); XFillGradientItem(SvStream& rIn, sal_uInt16 nVer = 0);
......
...@@ -3163,8 +3163,8 @@ XFillGradientItem::XFillGradientItem(sal_Int32 nIndex, ...@@ -3163,8 +3163,8 @@ XFillGradientItem::XFillGradientItem(sal_Int32 nIndex,
*************************************************************************/ *************************************************************************/
XFillGradientItem::XFillGradientItem(const XubString& rName, XFillGradientItem::XFillGradientItem(const XubString& rName,
const XGradient& rTheGradient) : const XGradient& rTheGradient, sal_uInt16 nWhich_) :
NameOrIndex(XATTR_FILLGRADIENT, rName), NameOrIndex(nWhich_, rName),
aGradient(rTheGradient) aGradient(rTheGradient)
{ {
} }
...@@ -3601,7 +3601,7 @@ XFillGradientItem* XFillGradientItem::checkForUniqueItem( SdrModel* pModel ) con ...@@ -3601,7 +3601,7 @@ XFillGradientItem* XFillGradientItem::checkForUniqueItem( SdrModel* pModel ) con
// if the given name is not valid, replace it! // if the given name is not valid, replace it!
if( aUniqueName != GetName() ) if( aUniqueName != GetName() )
return new XFillGradientItem( aUniqueName, aGradient ); return new XFillGradientItem( aUniqueName, aGradient, Which() );
} }
return (XFillGradientItem*)this; return (XFillGradientItem*)this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment