summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2012-05-10 09:29:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-03-15 15:24:52 +0000
commitc97aec0d2276901c20634abe53867f739f420f50 (patch)
treedb775ba307edfffaa990a5d01361ae5c53c43f28 /lotuswordpro
parentd2cccde341af33b72378f3e7b0e8dd9ff1cd5e65 (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 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpbackgroundstuff.cxx34
1 files changed, 2 insertions, 32 deletions
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
index a38d41920235..0c8deba1ac7f 100644
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
+++ b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
@@ -65,7 +65,6 @@
#include "tools/stream.hxx"
#include "vcl/bmpacc.hxx"
-#include "svx/xbitmap.hxx"
void LwpBackgroundStuff::Read(LwpObjectStream* pStrm)
@@ -129,38 +128,9 @@ XFBGImage* LwpBackgroundStuff::GetFillPattern()
pPttnArray = NULL;
}
- // create XOBitmap object from bitmap object
- XOBitmap aXOBitmap;
- aXOBitmap.SetBitmap( aBmp );
- aXOBitmap.Bitmap2Array();
- aXOBitmap.SetBitmapType( XBITMAP_8X8 );
-
- // set back/fore-ground colors
- if (m_aFillColor.IsValidColor() && m_aPatternColor.IsValidColor())
- {
- Color aBackColor(static_cast<sal_uInt8>(m_aFillColor.GetRed()),
- static_cast<sal_uInt8>(m_aFillColor.GetGreen()),
- static_cast<sal_uInt8>(m_aFillColor.GetBlue()));
- Color aForeColor(static_cast<sal_uInt8>(m_aPatternColor.GetRed()),
- static_cast<sal_uInt8>(m_aPatternColor.GetGreen()),
- static_cast<sal_uInt8>(m_aPatternColor.GetBlue()));
-
- if( aXOBitmap.GetBackgroundColor() == COL_BLACK )
- {
- aXOBitmap.SetPixelColor( aBackColor );
- aXOBitmap.SetBackgroundColor( aForeColor );
- }
- else
- {
- aXOBitmap.SetPixelColor( aForeColor );
- aXOBitmap.SetBackgroundColor( aBackColor );
- }
- }
-
- // transfer image data from XOBitmap->SvStream->BYTE-Array
+ // transfer image data from Bitmap->SvStream->BYTE-Array
SvMemoryStream aPicMemStream;
- aXOBitmap.Array2Bitmap();
- aXOBitmap.GetBitmap().Write(aPicMemStream);
+ aBmp.Write(aPicMemStream);
sal_uInt32 nSize = aPicMemStream.GetEndOfData();
sal_uInt8* pImageBuff = new sal_uInt8 [nSize];
memcpy(pImageBuff, aPicMemStream.GetData(), nSize);