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

SvxBackgroundTabPage::FillItemSet: handle XFILL_BITMAP -> XFILL_GRADIENT

This makes it possible to turn the bitmap background of a Writer frame
into a gradient one.

Change-Id: Iae88793d40593a2adbcc7f83e82e28265cdd9be7
üst 206c088c
...@@ -844,8 +844,20 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) ...@@ -844,8 +844,20 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
} }
else // Brush <-> Bitmap changed! else // Brush <-> Bitmap changed!
{ {
if ( bIsBrush ) if (bIsBrush || bIsGradient)
{
rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) ); rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) );
if (bIsGradient)
{
// Handle XFILL_BITMAP -> XFILL_GRADIENT
XFillStyleItem aFillStyleItem(((const XFillStyleItem&)m_rXFillSet.Get(XATTR_FILLSTYLE)).GetValue(), GetWhich(SID_ATTR_FILL_STYLE));
rCoreSet.Put(aFillStyleItem);
const XFillGradientItem& rFillGradientItem = (const XFillGradientItem&)m_rXFillSet.Get(XATTR_FILLGRADIENT);
XFillGradientItem aFillGradientItem(rFillGradientItem.GetName(), rFillGradientItem.GetGradientValue(), GetWhich(SID_ATTR_FILL_GRADIENT));
rCoreSet.Put(aFillGradientItem);
}
}
else else
{ {
SvxBrushItem* pTmpBrush = 0; SvxBrushItem* pTmpBrush = 0;
...@@ -873,7 +885,7 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) ...@@ -873,7 +885,7 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
delete pTmpBrush; delete pTmpBrush;
} }
} }
bModified = ( bIsBrush || m_pBtnLink->IsChecked() || bIsGraphicValid ); bModified = ( bIsBrush || bIsGradient || m_pBtnLink->IsChecked() || bIsGraphicValid );
} }
} }
else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != Color( COL_WHITE ) ) else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != Color( COL_WHITE ) )
......
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