[Libreoffice-commits] core.git: filter/source include/filter include/vcl vcl/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Jun 1 18:12:38 UTC 2018
filter/source/msfilter/mstoolbar.cxx | 4 ++--
include/filter/msfilter/mstoolbar.hxx | 6 +++---
include/vcl/alpha.hxx | 2 +-
include/vcl/dibtools.hxx | 4 +++-
vcl/source/gdi/dibtools.cxx | 6 ++++--
5 files changed, 13 insertions(+), 9 deletions(-)
New commits:
commit c96d58cca2503fd257c3c742188af66075e194de
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Jun 1 10:05:16 2018 +0200
use more BitmapEx in filter
Change-Id: I68fdad6a69a178df8c59c4272f1d8d0b2f101315
Reviewed-on: https://gerrit.libreoffice.org/55163
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index ed50eaaccca2..ecfa1f7ee318 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -298,7 +298,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect
// according to the spec:
// "the iconMask is white in all the areas in which the icon is
// displayed as transparent and is black in all other areas."
- aBitEx = BitmapEx( aBitEx.GetBitmap(), pSpecificInfo->getIconMask()->getBitMap().CreateMask( COL_WHITE ) );
+ aBitEx = BitmapEx( aBitEx.GetBitmap(), pSpecificInfo->getIconMask()->getBitMap().GetBitmap().CreateMask( COL_WHITE ) );
Graphic aGraphic( aBitEx );
helper.addIcon( aGraphic.GetXGraphic(), sCommand );
@@ -720,7 +720,7 @@ bool TBCBitMap::Read( SvStream& rS)
nOffSet = rS.Tell();
rS.ReadInt32( cbDIB );
// cbDIB = sizeOf(biHeader) + sizeOf(colors) + sizeOf(bitmapData) + 10
- return ReadDIB(mBitMap, rS, false, true);
+ return ReadDIBBitmapEx(mBitMap, rS, false, true);
}
#ifdef DEBUG_FILTER_MSTOOLBAR
diff --git a/include/filter/msfilter/mstoolbar.hxx b/include/filter/msfilter/mstoolbar.hxx
index 6b2f923247dd..5a7da86b37b5 100644
--- a/include/filter/msfilter/mstoolbar.hxx
+++ b/include/filter/msfilter/mstoolbar.hxx
@@ -19,7 +19,7 @@
#include <rtl/ustring.hxx>
#include <sal/types.h>
#include <tools/stream.hxx>
-#include <vcl/bitmap.hxx>
+#include <vcl/bitmapex.hxx>
namespace com { namespace sun { namespace star {
namespace beans { struct PropertyValue; }
@@ -156,7 +156,7 @@ class MSFILTER_DLLPUBLIC TBCBitMap : public TBBase
{
friend class TBCBSpecific; // #FIXME hacky access, need to fix
sal_Int32 cbDIB;
- Bitmap mBitMap;
+ BitmapEx mBitMap;
public:
TBCBitMap();
virtual ~TBCBitMap() override;
@@ -165,7 +165,7 @@ public:
virtual void Print( FILE* ) override;
#endif
// #FIXME Const-ness
- Bitmap& getBitMap() { return mBitMap;}
+ BitmapEx& getBitMap() { return mBitMap;}
};
class MSFILTER_DLLPUBLIC TBCMenuSpecific : public TBBase
diff --git a/include/vcl/alpha.hxx b/include/vcl/alpha.hxx
index a36e4b6b0bfd..e91845c638a8 100644
--- a/include/vcl/alpha.hxx
+++ b/include/vcl/alpha.hxx
@@ -72,7 +72,7 @@ public:
private:
friend class BitmapEx;
friend class ::OutputDevice;
- friend bool VCL_DLLPUBLIC ReadDIBBitmapEx(BitmapEx& rTarget, SvStream& rIStm);
+ friend bool VCL_DLLPUBLIC ReadDIBBitmapEx(BitmapEx& rTarget, SvStream& rIStm, bool bFileHeader, bool bMSOFormat);
SAL_DLLPRIVATE const Bitmap& ImplGetBitmap() const;
SAL_DLLPRIVATE void ImplSetBitmap( const Bitmap& rBitmap );
diff --git a/include/vcl/dibtools.hxx b/include/vcl/dibtools.hxx
index 65d6b26f2340..dca6730c88b6 100644
--- a/include/vcl/dibtools.hxx
+++ b/include/vcl/dibtools.hxx
@@ -46,7 +46,9 @@ bool VCL_DLLPUBLIC ReadDIB( // ReadDIB(rBitmap, rIStm, true);
bool VCL_DLLPUBLIC ReadDIBBitmapEx(
BitmapEx& rTarget,
- SvStream& rIStm);
+ SvStream& rIStm,
+ bool bFileHeader = true,
+ bool bMSOFormat = false);
bool VCL_DLLPUBLIC ReadDIBV5(
Bitmap& rTarget,
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index d0a0a53b2e87..75f0c08d3bf2 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -1727,10 +1727,12 @@ bool ReadDIB(
bool ReadDIBBitmapEx(
BitmapEx& rTarget,
- SvStream& rIStm)
+ SvStream& rIStm,
+ bool bFileHeader,
+ bool bMSOFormat)
{
Bitmap aBmp;
- bool bRetval(ImplReadDIB(aBmp, nullptr, rIStm, true) && !rIStm.GetError());
+ bool bRetval(ImplReadDIB(aBmp, nullptr, rIStm, bFileHeader, /*bMask*/false, bMSOFormat) && !rIStm.GetError());
if(bRetval)
{
More information about the Libreoffice-commits
mailing list