diff options
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxbitmap.cxx | 8 | ||||
-rw-r--r-- | toolkit/source/helper/vclunohelper.cxx | 9 |
2 files changed, 6 insertions, 11 deletions
diff --git a/toolkit/source/awt/vclxbitmap.cxx b/toolkit/source/awt/vclxbitmap.cxx index fd9b5aea22a8..7047f123ff9b 100644 --- a/toolkit/source/awt/vclxbitmap.cxx +++ b/toolkit/source/awt/vclxbitmap.cxx @@ -22,6 +22,7 @@ #include <cppuhelper/typeprovider.hxx> #include <tools/stream.hxx> #include <rtl/uuid.h> +#include <vcl/dibtools.hxx> // ---------------------------------------------------- // class VCLXBitmap @@ -62,7 +63,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() ); } @@ -71,11 +72,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() ); } - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 3d275c1593b5..5767b27fe185 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <tools/stream.hxx> #include <vcl/bitmap.hxx> #include <vcl/window.hxx> @@ -36,9 +35,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> @@ -49,13 +46,13 @@ #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/Toolkit.hpp> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/awt/Point.hpp> +#include <vcl/dibtools.hxx> using namespace ::com::sun::star; @@ -91,12 +88,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 ); } |