[Libreoffice-commits] core.git: 2 commits - cui/source
Miklos Vajna
vmiklos at suse.cz
Wed Feb 13 03:01:13 PST 2013
cui/source/tabpages/backgrnd.cxx | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
New commits:
commit 33fcc140ba412bd7565cc469418e65d445c98b52
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Wed Feb 13 11:26:50 2013 +0100
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
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 15b6d10..3553df8 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -844,8 +844,20 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
}
else // Brush <-> Bitmap changed!
{
- if ( bIsBrush )
+ if (bIsBrush || bIsGradient)
+ {
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
{
SvxBrushItem* pTmpBrush = 0;
@@ -873,7 +885,7 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
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 ) )
commit 206c088c092d484dbbed82ff3c18e6dfc00de513
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Wed Feb 13 10:50:03 2013 +0100
SvxBackgroundTabPage::FillItemSet: handle XFILL_GRADIENT -> XFILL_SOLID
This makes it possible to turn off the gradient background of a Writer
frame.
Change-Id: Ic7bdfec252847f463da47c838c7de0fdb7625869
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index b5c2f63..15b6d10 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -785,6 +785,9 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
}
else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) )
rCoreSet.ClearItem( nWhich );
+ // Handle XFILL_GRADIENT -> XFILL_SOLID
+ XFillStyleItem aFillStyleItem(XFILL_SOLID, GetWhich(SID_ATTR_FILL_STYLE));
+ rCoreSet.Put(aFillStyleItem);
}
else
{
More information about the Libreoffice-commits
mailing list