diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-24 14:22:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-24 22:12:05 +0200 |
commit | cef587ce6c14261250623fe1d5e100f67952f4ca (patch) | |
tree | 3bed958355e99a731876fb4d3cb1cdccfa59c0ef /hwpfilter | |
parent | ofz#11119 Direct-leak (diff) | |
download | core-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')
-rw-r--r-- | hwpfilter/source/hbox.cxx | 4 | ||||
-rw-r--r-- | hwpfilter/source/hbox.h | 4 | ||||
-rw-r--r-- | hwpfilter/source/hwpreader.cxx | 2 |
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; |