summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-01-10 16:28:40 +0000
committerArmin Le Grand <alg@apache.org>2013-01-10 16:28:40 +0000
commitef3931ff410117e1237b3bef7bc090e8b83b9519 (patch)
tree8e02a7db820f632e343c984e9b327fe2578bcb23 /toolkit
parent534ef6b86ac9ef61e4e7ae98c12149fc9dc9c204 (diff)
#121504# Support for alpha channel in clipboard for all systems
Notes
Notes: merged as: e0cce521f1ad0cc384d30ce2f1077ea229fffe62
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxbitmap.cxx12
-rw-r--r--toolkit/source/helper/vclunohelper.cxx11
2 files changed, 7 insertions, 16 deletions
diff --git a/toolkit/source/awt/vclxbitmap.cxx b/toolkit/source/awt/vclxbitmap.cxx
index cf982f20a06e..451229232bc4 100644
--- a/toolkit/source/awt/vclxbitmap.cxx
+++ b/toolkit/source/awt/vclxbitmap.cxx
@@ -19,18 +19,16 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_toolkit.hxx"
-
#include <toolkit/awt/vclxbitmap.hxx>
#include <toolkit/helper/macros.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <tools/stream.hxx>
#include <rtl/memory.h>
#include <rtl/uuid.h>
+#include <vcl/dibtools.hxx>
// ----------------------------------------------------
// class VCLXBitmap
@@ -71,7 +69,7 @@ IMPL_XTYPEPROVIDER_END
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
SvMemoryStream aMem;
- aMem << maBitmap.GetBitmap();
+ WriteDIB(maBitmap.GetBitmap(), aMem, false, true);
return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() );
}
@@ -80,10 +78,8 @@ IMPL_XTYPEPROVIDER_END
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
SvMemoryStream aMem;
- aMem << maBitmap.GetMask();
+ WriteDIB(maBitmap.GetMask(), aMem, false, true);
return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() );
}
-
-
-
+// eof
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index d64646896d5a..fdb41cc296e6 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_toolkit.hxx"
@@ -42,9 +40,7 @@
#include <com/sun/star/awt/MouseButton.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/embed/EmbedMapUnits.hpp>
-
#include <com/sun/star/graphic/XGraphic.hpp>
-
#include <toolkit/helper/vclunohelper.hxx>
#include <toolkit/helper/convert.hxx>
#include <toolkit/awt/vclxbitmap.hxx>
@@ -55,12 +51,11 @@
#include <toolkit/awt/vclxfont.hxx>
#include <toolkit/controls/unocontrolcontainer.hxx>
#include <toolkit/controls/unocontrolcontainermodel.hxx>
-
#include <vcl/graph.hxx>
#include <comphelper/processfactory.hxx>
-
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/Point.hpp>
+#include <vcl/dibtools.hxx>
using namespace ::com::sun::star;
@@ -101,12 +96,12 @@ BitmapEx VCLUnoHelper::GetBitmap( const ::com::sun::star::uno::Reference< ::com:
{
::com::sun::star::uno::Sequence<sal_Int8> aBytes = rxBitmap->getDIB();
SvMemoryStream aMem( (char*) aBytes.getArray(), aBytes.getLength(), STREAM_READ );
- aMem >> aDIB;
+ ReadDIB(aDIB, aMem, true);
}
{
::com::sun::star::uno::Sequence<sal_Int8> aBytes = rxBitmap->getMaskDIB();
SvMemoryStream aMem( (char*) aBytes.getArray(), aBytes.getLength(), STREAM_READ );
- aMem >> aMask;
+ ReadDIB(aMask, aMem, true);
}
aBmp = BitmapEx( aDIB, aMask );
}