From e0cce521f1ad0cc384d30ce2f1077ea229fffe62 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 10 Jan 2013 16:28:40 +0000 Subject: Resolves: #i121504# Support for alpha channel in clipboard for all systems (cherry picked from commit ef3931ff410117e1237b3bef7bc090e8b83b9519) Conflicts: automation/source/server/statemnt.cxx basic/source/runtime/methods.cxx canvas/source/vcl/devicehelper.cxx canvas/source/vcl/spritedevicehelper.cxx drawinglayer/source/processor2d/vclhelperbufferdevice.cxx drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx drawinglayer/source/tools/converters.cxx dtrans/source/win32/dtobj/FmtFilter.cxx editeng/source/items/bulitem.cxx extensions/source/scanner/sanedlg.cxx external/gcc3_specific/makefile.mk filter/source/graphicfilter/eos2met/eos2met.cxx filter/source/graphicfilter/ios2met/ios2met.cxx filter/source/msfilter/msdffimp.cxx fpicker/source/office/iodlg.cxx framework/source/fwe/classes/addonsoptions.cxx framework/source/fwe/helper/actiontriggerhelper.cxx sc/source/filter/excel/xiescher.cxx sc/source/ui/docshell/docsh.cxx sc/source/ui/inc/viewfunc.hxx sd/source/ui/app/sdxfer.cxx sd/source/ui/unoidl/unopage.cxx sd/source/ui/view/sdview3.cxx sfx2/source/appl/fileobj.cxx sfx2/source/appl/linkmgr2.cxx sfx2/source/dialog/filedlghelper.cxx sfx2/source/dialog/intro.cxx sfx2/source/doc/docinf.cxx sot/inc/sot/formats.hxx sot/source/base/formats.cxx svtools/bmpmaker/bmpcore.cxx svtools/bmpmaker/bmpsum.cxx svtools/inc/svtools/transfer.hxx svtools/source/filter/filter.cxx svtools/source/filter/wmf/emfwr.cxx svtools/source/filter/wmf/enhwmf.cxx svtools/source/filter/wmf/winwmf.cxx svtools/source/filter/wmf/wmfwr.cxx svtools/source/graphic/graphic.cxx svtools/source/graphic/provider.cxx svtools/source/misc/transfer.cxx svx/inc/svx/xoutbmp.hxx svx/source/sdr/overlay/overlaymanagerbuffered.cxx svx/source/xoutdev/_xoutbmp.cxx sw/source/core/view/viewsh.cxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww8/ww8par.hxx sw/source/ui/dochdl/swdtflvr.cxx toolkit/source/awt/vclxbitmap.cxx toolkit/source/helper/vclunohelper.cxx vcl/Library_vcl.mk vcl/Package_inc.mk vcl/aqua/source/dtrans/DataFlavorMapping.cxx vcl/aqua/source/dtrans/OSXTransferable.cxx vcl/aqua/source/dtrans/PictToBmpFlt.cxx vcl/aqua/source/dtrans/PictToBmpFlt.hxx vcl/inc/vcl/alpha.hxx vcl/inc/vcl/bitmap.hxx vcl/inc/vcl/bitmapex.hxx vcl/inc/vcl/pngwrite.hxx vcl/inc/vcl/salbtype.hxx vcl/inc/vcl/wall.hxx vcl/source/gdi/animate.cxx vcl/source/gdi/bitmap2.cxx vcl/source/gdi/bitmapex.cxx vcl/source/gdi/bmpconv.cxx vcl/source/gdi/cvtsvm.cxx vcl/source/gdi/impgraph.cxx vcl/source/gdi/impimagetree.cxx vcl/source/gdi/metaact.cxx vcl/source/gdi/wall.cxx Change-Id: I79938bc412c048c3d4e64f430f216e73bec16167 --- framework/source/fwe/classes/addonsoptions.cxx | 3 ++- framework/source/fwe/classes/imagewrapper.cxx | 7 ++++--- framework/source/fwe/helper/actiontriggerhelper.cxx | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'framework') diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 0fdc325dd466..a94fe1c75165 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -1661,7 +1662,7 @@ sal_Bool AddonsOptions_Impl::CreateImageFromSequence( Image& rImage, sal_Bool bB SvMemoryStream aMemStream( rBitmapDataSeq.getArray(), rBitmapDataSeq.getLength(), STREAM_STD_READ ); BitmapEx aBitmapEx; - aMemStream >> aBitmapEx; + ReadDIBBitmapEx(aBitmapEx, aMemStream); // Scale bitmap to fit the correct size for the menu/toolbar. Use best quality if ( aBitmapEx.GetSizePixel() != aSize ) diff --git a/framework/source/fwe/classes/imagewrapper.cxx b/framework/source/fwe/classes/imagewrapper.cxx index 054a63ae4866..ac42ab5f9238 100644 --- a/framework/source/fwe/classes/imagewrapper.cxx +++ b/framework/source/fwe/classes/imagewrapper.cxx @@ -25,6 +25,7 @@ #include #include #include +#include using namespace com::sun::star::lang; using namespace com::sun::star::uno; @@ -72,7 +73,7 @@ Sequence< sal_Int8 > SAL_CALL ImageWrapper::getDIB() throw ( RuntimeException ) SolarMutexGuard aGuard; SvMemoryStream aMem; - aMem << m_aImage.GetBitmapEx().GetBitmap(); + WriteDIB(m_aImage.GetBitmapEx().GetBitmap(), aMem, false, true); return Sequence< sal_Int8 >( (sal_Int8*) aMem.GetData(), aMem.Tell() ); } @@ -84,13 +85,13 @@ Sequence< sal_Int8 > SAL_CALL ImageWrapper::getMaskDIB() throw ( RuntimeExceptio if ( aBmpEx.IsAlpha() ) { SvMemoryStream aMem; - aMem << aBmpEx.GetAlpha().GetBitmap(); + WriteDIB(aBmpEx.GetAlpha().GetBitmap(), aMem, false, true); return Sequence< sal_Int8 >( (sal_Int8*) aMem.GetData(), aMem.Tell() ); } else if ( aBmpEx.IsTransparent() ) { SvMemoryStream aMem; - aMem << aBmpEx.GetMask(); + WriteDIB(aBmpEx.GetMask(), aMem, false, true); return Sequence< sal_Int8 >( (sal_Int8*) aMem.GetData(), aMem.Tell() ); } diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx index 67fdd65ff413..96149e4338d2 100644 --- a/framework/source/fwe/helper/actiontriggerhelper.cxx +++ b/framework/source/fwe/helper/actiontriggerhelper.cxx @@ -30,7 +30,7 @@ #include #include #include - +#include const sal_uInt16 START_ITEMID = 1000; @@ -183,7 +183,7 @@ void InsertSubMenuItems( Menu* pSubMenu, sal_uInt16& nItemId, Reference< XIndexC { aDIBSeq = xBitmap->getDIB(); SvMemoryStream aMem( (void *)aDIBSeq.getConstArray(), aDIBSeq.getLength(), STREAM_READ ); - aMem >> aBitmap; + ReadDIB(aBitmap, aMem, true); } aDIBSeq = xBitmap->getMaskDIB(); @@ -191,7 +191,7 @@ void InsertSubMenuItems( Menu* pSubMenu, sal_uInt16& nItemId, Reference< XIndexC { Bitmap aMaskBitmap; SvMemoryStream aMem( (void *)aDIBSeq.getConstArray(), aDIBSeq.getLength(), STREAM_READ ); - aMem >> aMaskBitmap; + ReadDIB(aMaskBitmap, aMem, true); aImage = Image( aBitmap, aMaskBitmap ); } else -- cgit