diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-06-15 10:55:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-06-15 12:44:10 +0100 |
commit | a4fd6f2eb41176abe34d1f82a9b9d4561f3336ac (patch) | |
tree | 077025b9b076f07b1209d3a761203ee8eeb94c92 /svx/source/xoutdev | |
parent | d712a4f8225c872451ec3f76e0909825489abaf0 (diff) |
skip a default dtor + assign with copy ctor
Change-Id: Ibf685ff915dacedfbc9ecfa4b119115142cb68c0
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r-- | svx/source/xoutdev/xattrbmp.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index a1dc1b56685c..bf2ed0f4b16e 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -214,8 +214,7 @@ bool isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBack, BitmapColo return bRet; } -XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) -: NameOrIndex(XATTR_FILLBITMAP, rIn) +GraphicObject XFillBitmapItem::makeGraphicObject(SvStream& rIn, sal_uInt16 nVer) const { if (!IsIndex()) { @@ -225,7 +224,7 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) Bitmap aBmp; ReadDIB(aBmp, rIn, true); - maGraphicObject = Graphic(aBmp); + return Graphic(aBmp); } else if(1 == nVer) { @@ -239,7 +238,7 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) Bitmap aBmp; ReadDIB(aBmp, rIn, true); - maGraphicObject = Graphic(aBmp); + return Graphic(aBmp); } else if(XBitmapType::N8x8 == (XBitmapType)iTmp) { @@ -258,7 +257,7 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) const Bitmap aBitmap(createHistorical8x8FromArray(aArray, aColorPix, aColorBack)); - maGraphicObject = Graphic(aBitmap); + return Graphic(aBitmap); } } else if(2 == nVer) @@ -266,14 +265,21 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) BitmapEx aBmpEx; ReadDIBBitmapEx(aBmpEx, rIn); - maGraphicObject = Graphic(aBmpEx); + return Graphic(aBmpEx); } } + return GraphicObject(); +} + +XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) + : NameOrIndex(XATTR_FILLBITMAP, rIn) + , maGraphicObject(makeGraphicObject(rIn, nVer)) +{ } XFillBitmapItem::XFillBitmapItem(const GraphicObject& rGraphicObject) -: NameOrIndex( XATTR_FILLBITMAP, -1), - maGraphicObject(rGraphicObject) + : NameOrIndex(XATTR_FILLBITMAP, -1) + , maGraphicObject(rGraphicObject) { } |