From cef587ce6c14261250623fe1d5e100f67952f4ca Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 24 Oct 2018 14:22:20 +0100 Subject: hdo is always a HWPDrawingObject MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia9484304e9fc3c5bc9aa833bf14711203e9e72fe Reviewed-on: https://gerrit.libreoffice.org/62306 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- hwpfilter/source/hbox.cxx | 4 ++-- hwpfilter/source/hbox.h | 4 +++- hwpfilter/source/hwpreader.cxx | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'hwpfilter') 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(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(hbox->picinfo.picdraw.hdo), hbox); + makePictureDRAW(hbox->picinfo.picdraw.hdo, hbox); break; case PICTYPE_UNKNOWN: break; -- cgit