summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-01-10 16:28:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-13 14:50:46 +0100
commite0cce521f1ad0cc384d30ce2f1077ea229fffe62 (patch)
treeae40b74bceb4b036d87b79e861f5eef76ec41102 /sfx2
parent6ed3ef87d2472bad71b719e9ec927e72acfd2850 (diff)
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
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/fileobj.cxx13
-rw-r--r--sfx2/source/appl/linkmgr2.cxx3
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx3
-rw-r--r--sfx2/source/doc/docinf.cxx6
4 files changed, 16 insertions, 9 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 1083a85956a4..b99ef48cdf75 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <vcl/wrkwin.hxx>
#include <vcl/msgbox.hxx>
#include <tools/urlobj.hxx>
@@ -41,6 +40,7 @@
#include "sfx2/sfxresid.hxx"
#include "fileobj.hxx"
#include "app.hrc"
+#include <vcl/dibtools.hxx>
#define FILETYPE_TEXT 1
#define FILETYPE_GRF 2
@@ -170,9 +170,16 @@ sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
break;
case FORMAT_BITMAP:
- if( !aGrf.GetBitmap().IsEmpty())
- aMemStm << aGrf.GetBitmap();
+ {
+ const Bitmap aBitmap(aGrf.GetBitmap());
+
+ if(!aBitmap.IsEmpty())
+ {
+ WriteDIB(aBitmap, aMemStm, false, true);
+ }
+
break;
+ }
default:
if( aGrf.GetGDIMetaFile().GetActionSize() )
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 6c0219b38a6b..7dcccadc2e85 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -36,6 +36,7 @@
#include <unotools/localfilehelper.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <sfx2/request.hxx>
+#include <vcl/dibtools.hxx>
#include "fileobj.hxx"
#include "impldde.hxx"
@@ -570,7 +571,7 @@ sal_Bool LinkManager::GetGraphicFromAny( const String& rMimeType,
case FORMAT_BITMAP:
{
Bitmap aBmp;
- aMemStm >> aBmp;
+ ReadDIB(aBmp, aMemStm, true);
rGrf = aBmp;
bRet = sal_True;
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index a927cfe35e74..d11cdf920aab 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -67,6 +67,7 @@
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
+#include <vcl/dibtools.hxx>
#include <vcl/graphicfilter.hxx>
#include <unotools/viewoptions.hxx>
#include <unotools/moduleoptions.hxx>
@@ -742,7 +743,7 @@ IMPL_LINK_NOARG(FileDialogHelper_Impl, TimeOutHdl_Impl)
// and copy it into the Any
SvMemoryStream aData;
- aData << aBmp;
+ WriteDIB(aBmp, aData, false, true);
const Sequence < sal_Int8 > aBuffer(
static_cast< const sal_Int8* >(aData.GetData()),
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index 5dbb9dd97f29..172cfb7eeeaf 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -19,20 +19,18 @@
#include <sfx2/docinf.hxx>
-
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyContainer.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XCompatWriterDocProperties.hpp>
#include <com/sun/star/uno/Exception.hpp>
-
#include <rtl/ustring.hxx>
#include <tools/debug.hxx>
#include <comphelper/string.hxx>
#include <sot/storage.hxx>
#include <vcl/gdimtf.hxx>
-
+#include <vcl/dibtools.hxx>
#include "oleprops.hxx"
// ============================================================================
@@ -310,7 +308,7 @@ uno::Sequence<sal_uInt8> SFX2_DLLPUBLIC convertMetaFile(GDIMetaFile* i_pThumb)
SvMemoryStream aStream;
// magic value 160 taken from GraphicHelper::getThumbnailFormatFromGDI_Impl()
if( i_pThumb->CreateThumbnail( 160, aBitmap ) ) {
- aBitmap.GetBitmap().Write( aStream, sal_False, sal_False );
+ WriteDIB(aBitmap.GetBitmap(), aStream, false, false);
aStream.Seek(STREAM_SEEK_TO_END);
uno::Sequence<sal_uInt8> aSeq(aStream.Tell());
const sal_uInt8* pBlob(