summaryrefslogtreecommitdiffstats
path: root/hwpfilter/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-24 14:22:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-24 22:12:05 +0200
commitcef587ce6c14261250623fe1d5e100f67952f4ca (patch)
tree3bed958355e99a731876fb4d3cb1cdccfa59c0ef /hwpfilter/source
parentofz#11119 Direct-leak (diff)
downloadcore-cef587ce6c14261250623fe1d5e100f67952f4ca.tar.gz
core-cef587ce6c14261250623fe1d5e100f67952f4ca.zip
hdo is always a HWPDrawingObject
Change-Id: Ia9484304e9fc3c5bc9aa833bf14711203e9e72fe Reviewed-on: https://gerrit.libreoffice.org/62306 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter/source')
-rw-r--r--hwpfilter/source/hbox.cxx4
-rw-r--r--hwpfilter/source/hbox.h4
-rw-r--r--hwpfilter/source/hwpreader.cxx2
3 files changed, 6 insertions, 4 deletions
diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index 200f95b6e609..cb1c8da4e1af 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -359,8 +359,8 @@ Picture::Picture()
Picture::~Picture()
{
- if( pictype == PICTYPE_DRAW && picinfo.picdraw.hdo )
- delete static_cast<HWPDrawingObject *>(picinfo.picdraw.hdo);
+ if (pictype == PICTYPE_DRAW)
+ delete picinfo.picdraw.hdo;
}
diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h
index e87af92e7dcf..cc3b13963a31 100644
--- a/hwpfilter/source/hbox.h
+++ b/hwpfilter/source/hbox.h
@@ -549,12 +549,14 @@ struct PicDefOle
void *hwpole;
};
+struct HWPDrawingObject;
+
/**
* @short Drawing object of hwp
*/
struct PicDefDraw
{
- void *hdo;
+ HWPDrawingObject *hdo;
uint zorder;
ZZRect vrect;
int mbrcnt;
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 3b3ecefa90cd..49e819b84cd2 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -3968,7 +3968,7 @@ void HwpReader::makePicture(Picture * hbox)
if( hbox->picinfo.picdraw.zorder > 0 )
padd("draw:z-index", sXML_CDATA,
ascii(Int2Str( hbox->picinfo.picdraw.zorder + 10000, "%d", buf)));
- makePictureDRAW( static_cast<HWPDrawingObject *>(hbox->picinfo.picdraw.hdo), hbox);
+ makePictureDRAW(hbox->picinfo.picdraw.hdo, hbox);
break;
case PICTYPE_UNKNOWN:
break;