summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/gallery2/galmisc.cxx2
-rw-r--r--svx/source/gallery2/galobj.cxx12
-rw-r--r--svx/source/sdr/overlay/overlaymanagerbuffered.cxx1
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx6
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx9
5 files changed, 17 insertions, 13 deletions
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index 499ab340d238..06c8d158af6c 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -590,7 +590,7 @@ sal_Bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor )
}
else if( ( FORMAT_BITMAP == nFormat ) && mpGraphicObject )
{
- bRet = SetBitmap( mpGraphicObject->GetGraphic().GetBitmap(), rFlavor );
+ bRet = SetBitmapEx( mpGraphicObject->GetGraphic().GetBitmapEx(), rFlavor );
}
return bRet;
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 573dcf6875cb..eb1b6e4e701d 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -21,11 +21,9 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <sfx2/objsh.hxx>
#include <sfx2/docfac.hxx>
-
#include <comphelper/classids.hxx>
#include <comphelper/string.hxx>
#include <unotools/pathoptions.hxx>
-
#include <tools/rcid.h>
#include <tools/vcompat.hxx>
#include <tools/helpers.hxx>
@@ -38,7 +36,7 @@
#include "svx/galmisc.hxx"
#include "galobj.hxx"
#include <vcl/svapp.hxx>
-
+#include <vcl/dibtools.hxx>
#include "gallerydrawmodel.hxx"
using namespace ::com::sun::star;
@@ -150,7 +148,7 @@ void SgaObject::WriteData( SvStream& rOut, const String& rDestDir ) const
rOut.SetCompressMode( COMPRESSMODE_ZBITMAP );
rOut.SetVersion( SOFFICE_FILEFORMAT_50 );
- rOut << aThumbBmp;
+ WriteDIBBitmapEx(aThumbBmp, rOut);
rOut.SetVersion( nOldVersion );
rOut.SetCompressMode( nOldCompressMode );
@@ -173,9 +171,13 @@ void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion )
rIn >> nTmp32 >> nTmp16 >> rReadVersion >> nTmp16 >> bIsThumbBmp;
if( bIsThumbBmp )
- rIn >> aThumbBmp;
+ {
+ ReadDIBBitmapEx(aThumbBmp, rIn);
+ }
else
+ {
rIn >> aThumbMtf;
+ }
OUString aTmpStr = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
aURL = INetURLObject(aTmpStr);
diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 47d76f835d00..d502094d55fb 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -26,6 +26,7 @@
#include <tools/stream.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <vcl/cursor.hxx>
+#include <vcl/dibtools.hxx>
//////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 33e36ee0fd10..535d6b3299dc 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <sot/factory.hxx>
#include <tools/poly.hxx>
#include <vcl/bmpacc.hxx>
@@ -27,6 +26,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/app.hxx>
#include "svx/xoutbmp.hxx"
+#include <vcl/dibtools.hxx>
#include <vcl/FilterConfigItem.hxx>
#include <vcl/graphicfilter.hxx>
@@ -363,8 +363,8 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold )
const long nHeight = aSize.Height();
const long nHeight2 = nHeight - 2L;
const long lThres2 = (long) cThreshold * cThreshold;
- const sal_uInt8 nWhitePalIdx = pWriteAcc->GetBestPaletteIndex( Color( COL_WHITE ) );
- const sal_uInt8 nBlackPalIdx = pWriteAcc->GetBestPaletteIndex( Color( COL_BLACK ) );
+ const sal_uInt8 nWhitePalIdx(static_cast< sal_uInt8 >(pWriteAcc->GetBestPaletteIndex(Color(COL_WHITE))));
+ const sal_uInt8 nBlackPalIdx(static_cast< sal_uInt8 >(pWriteAcc->GetBestPaletteIndex(Color(COL_BLACK))));
long nSum1;
long nSum2;
long lGray;
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 85255918e682..462bae6b5036 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <vcl/salbtype.hxx>
#include <vcl/bmpacc.hxx>
+#include <vcl/dibtools.hxx>
using namespace ::com::sun::star;
@@ -357,7 +358,7 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer)
// Behandlung der alten Bitmaps
Bitmap aBmp;
- rIn >> aBmp;
+ ReadDIB(aBmp, rIn, true);
maGraphicObject = Graphic(aBmp);
}
else if(1 == nVer)
@@ -371,7 +372,7 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer)
{
Bitmap aBmp;
- rIn >> aBmp;
+ ReadDIB(aBmp, rIn, true);
maGraphicObject = Graphic(aBmp);
}
else if(XBITMAP_8X8 == iTmp)
@@ -398,7 +399,7 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer)
{
BitmapEx aBmpEx;
- rIn >> aBmpEx;
+ ReadDIBBitmapEx(aBmpEx, rIn);
maGraphicObject = Graphic(aBmpEx);
}
}
@@ -442,7 +443,7 @@ SvStream& XFillBitmapItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) cons
if(!IsIndex())
{
- rOut << maGraphicObject.GetGraphic().GetBitmapEx();
+ WriteDIBBitmapEx(maGraphicObject.GetGraphic().GetBitmapEx(), rOut);
}
return rOut;