[Libreoffice-commits] core.git: include/svx svx/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 11 08:52:38 UTC 2017
include/svx/xbitmap.hxx | 7 +++---
svx/source/xoutdev/xattrbmp.cxx | 44 ----------------------------------------
2 files changed, 4 insertions(+), 47 deletions(-)
New commits:
commit f4785d5754c687212650f3e4980a3f3435257f14
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 10 21:13:08 2017 +0000
make XOBitmap uncopyable
Change-Id: I9c28434e8923451ddb1af4fa3c63917db206f47a
Reviewed-on: https://gerrit.libreoffice.org/32940
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svx/xbitmap.hxx b/include/svx/xbitmap.hxx
index 32a8e9f..0a2128e 100644
--- a/include/svx/xbitmap.hxx
+++ b/include/svx/xbitmap.hxx
@@ -39,13 +39,14 @@ private:
const GraphicObject& GetGraphicObject() const;
+ XOBitmap(const XOBitmap& rXBmp) = delete;
+ XOBitmap& operator=(const XOBitmap& rXOBitmap) = delete;
+
+
public:
XOBitmap( const Bitmap& rBitmap );
- XOBitmap( const XOBitmap& rXBmp );
~XOBitmap();
- XOBitmap& operator=( const XOBitmap& rXOBitmap );
-
void Bitmap2Array();
void Array2Bitmap();
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 93abb7e..343c0f8 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -52,55 +52,11 @@ XOBitmap::XOBitmap( const Bitmap& rBmp ) :
{
}
-XOBitmap::XOBitmap( const XOBitmap& rXBmp ) :
- pPixelArray ( nullptr )
-{
- eType = rXBmp.eType;
- aGraphicObject = rXBmp.aGraphicObject;
- aArraySize = rXBmp.aArraySize;
- aPixelColor = rXBmp.aPixelColor;
- aBckgrColor = rXBmp.aBckgrColor;
- bGraphicDirty = rXBmp.bGraphicDirty;
-
- if( rXBmp.pPixelArray )
- {
- if( eType == XBitmapType::N8x8 )
- {
- pPixelArray = new sal_uInt16[ 64 ];
-
- for( sal_uInt16 i = 0; i < 64; i++ )
- *( pPixelArray + i ) = *( rXBmp.pPixelArray + i );
- }
- }
-}
-
XOBitmap::~XOBitmap()
{
delete [] pPixelArray;
}
-XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp )
-{
- eType = rXBmp.eType;
- aGraphicObject = rXBmp.aGraphicObject;
- aArraySize = rXBmp.aArraySize;
- aPixelColor = rXBmp.aPixelColor;
- aBckgrColor = rXBmp.aBckgrColor;
- bGraphicDirty = rXBmp.bGraphicDirty;
-
- if( rXBmp.pPixelArray )
- {
- if( eType == XBitmapType::N8x8 )
- {
- pPixelArray = new sal_uInt16[ 64 ];
-
- for( sal_uInt16 i = 0; i < 64; i++ )
- *( pPixelArray + i ) = *( rXBmp.pPixelArray + i );
- }
- }
- return *this;
-}
-
Bitmap XOBitmap::GetBitmap() const
{
return GetGraphicObject().GetGraphic().GetBitmap();
More information about the Libreoffice-commits
mailing list