diff options
author | Armin Le Grand <alg@apache.org> | 2012-05-10 09:29:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-15 15:24:52 +0000 |
commit | c97aec0d2276901c20634abe53867f739f420f50 (patch) | |
tree | db775ba307edfffaa990a5d01361ae5c53c43f28 /sc | |
parent | d2cccde341af33b72378f3e7b0e8dd9ff1cd5e65 (diff) |
Related: #i119125# change XFillBitmapItem to work with GraphicObject
Completely changed XFillBitmapItem to work with GraphicObject, removed XOBitmap
class, adapted all usages (also the pretty old 8x8 pixel editor).
All Bitmap fill styles will now accept transparent bitmaps as fillings in all
variations (tiled, etc.). LoadSave is no problem, ODF defines graphic as
content for fill. Backward means that OOs before this change will use a white
background of fill with transparent, same as the fallback all the time when
using a transparent fill.
This is also a preparation to e.g. offer SVG or Metafiles as fill style.
Conflicts:
cui/source/tabpages/backgrnd.cxx
cui/source/tabpages/tparea.cxx
cui/source/tabpages/tpbitmap.cxx
filter/source/msfilter/msdffimp.cxx
filter/source/msfilter/svdfppt.cxx
sc/source/filter/excel/xiescher.cxx
sd/source/ui/func/fupage.cxx
svx/inc/svx/dlgctrl.hxx
svx/inc/svx/xbitmap.hxx
svx/inc/svx/xbtmpit.hxx
svx/inc/svx/xtable.hxx
svx/source/customshapes/EnhancedCustomShape2d.cxx
svx/source/dialog/dlgctrl.cxx
svx/source/svdraw/svdograf.cxx
svx/source/tbxctrls/fillctrl.cxx
svx/source/unodraw/XPropertyTable.cxx
svx/source/xoutdev/xattrbmp.cxx
svx/source/xoutdev/xtabbtmp.cxx
Change-Id: Id838bfbacc863695d078fb3cf379d1c0cd951680
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun7.cxx | 6 |
2 files changed, 4 insertions, 15 deletions
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index b4a131617286..b51f7b203c4c 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -670,16 +670,9 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa aMemStrm << sal_uInt32( pnPattern[ nIdx ] ); // 32-bit little-endian aMemStrm.Seek( STREAM_SEEK_TO_BEGIN ); Bitmap aBitmap; - aBitmap.Read( aMemStrm, 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 ); - rSdrObj.SetMergedItem( XFillStyleItem( XFILL_BITMAP ) ); - rSdrObj.SetMergedItem( XFillBitmapItem( EMPTY_STRING, aXOBitmap ) ); + aBitmap.Read( aMemStrm, sal_False ); + rSdrObj.SetMergedItem(XFillStyleItem(XFILL_BITMAP)); + rSdrObj.SetMergedItem(XFillBitmapItem(EMPTY_STRING, Graphic(aBitmap))); } } } diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index e85878959820..a93edc6707cb 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -26,7 +26,6 @@ #include <svx/svdpage.hxx> #include <svx/svdpagv.hxx> #include <svx/svdundo.hxx> -#include <svx/xbitmap.hxx> #include <svx/xbtmpit.hxx> #include <svx/xoutbmp.hxx> #include <sfx2/objsh.hxx> @@ -452,15 +451,12 @@ sal_Bool ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& r /****************************************************************** * Object gets filled with the graphic ******************************************************************/ - //pScDrawView->BegUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP)); pScDrawView->AddUndo(new SdrUndoAttrObj(*pPickObj)); - //pScDrawView->EndUndo(); - XOBitmap aXOBitmap( rGraphic.GetBitmap() ); SfxItemSet aSet( pScDrawView->GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP ); aSet.Put(XFillStyleItem(XFILL_BITMAP)); - aSet.Put(XFillBitmapItem(String(), aXOBitmap)); + aSet.Put(XFillBitmapItem(String(), rGraphic)); pPickObj->SetMergedItemSetAndBroadcast(aSet); |