diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-03-15 14:35:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-15 15:24:53 +0000 |
commit | 188042ad5230e912f3149cc7ea1bb836e084069a (patch) | |
tree | c7e627a84aabb501f2d921f7110e9928e769599c /sc | |
parent | c97aec0d2276901c20634abe53867f739f420f50 (diff) |
restore enough of XOBitmap to do fore/back color setting on escher patterns
i.e. restore the logic of setting the colors of imported escher patterns like
we always did in the past. Stripping that out seems risky in the absence of
definite test-cases.
Change-Id: I16bbb451b053fd04a5154602f8f38ed799e21286
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index b51f7b203c4c..256287305959 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -78,6 +78,7 @@ #include <svx/xlinjoit.hxx> #include <svx/xlntrit.hxx> #include <svx/xbtmpit.hxx> +#include <svx/xbitmap.hxx> #include "document.hxx" #include "drwlayer.hxx" @@ -671,6 +672,17 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa aMemStrm.Seek( STREAM_SEEK_TO_BEGIN ); Bitmap aBitmap; aBitmap.Read( aMemStrm, sal_False ); + + XOBitmap aXOBitmap( aBitmap ); + aXOBitmap.Bitmap2Array(); + aXOBitmap.SetBitmapType( XBITMAP_8X8 ); + if( aXOBitmap.GetBackgroundColor().GetColor() == COL_BLACK ) + ::std::swap( aPattColor, aBackColor ); + aXOBitmap.SetPixelColor( aPattColor ); + aXOBitmap.SetBackgroundColor( aBackColor ); + aXOBitmap.Array2Bitmap(); + aBitmap = aXOBitmap.GetBitmap(); + rSdrObj.SetMergedItem(XFillStyleItem(XFILL_BITMAP)); rSdrObj.SetMergedItem(XFillBitmapItem(EMPTY_STRING, Graphic(aBitmap))); } |