diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-10 09:47:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-10 11:31:17 +0200 |
commit | 7e73c033a128403bdeeb8be323e43ba2c7c8f8b4 (patch) | |
tree | 40b82e097eb17cdc994e29024fba21a1c0587205 /hwpfilter/source/hbox.h | |
parent | 365cf17a375f96789ae0b175ebaec80c6c9e8373 (diff) |
loplugin:useuniqueptr in hwpfilter
Change-Id: Id271fdb59cb0dedf2f180879d2116d11e45d68b3
Reviewed-on: https://gerrit.libreoffice.org/39739
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter/source/hbox.h')
-rw-r--r-- | hwpfilter/source/hbox.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h index 8824a0911ded..5959e7def4d5 100644 --- a/hwpfilter/source/hbox.h +++ b/hwpfilter/source/hbox.h @@ -22,6 +22,7 @@ #include <sal/config.h> +#include <array> #include <list> #include <memory> @@ -81,14 +82,14 @@ struct DateCode; struct FieldCode : public HBox { uchar type[2]; /* 2/0 - Formula, 3/0-document summary, 3/1 Personal Information, 3/2-creation date, 4/0-pressing mold */ - char *reserved1; + std::array<char, 4> reserved1; unsigned short location_info; /* 0 - End code, 1 - start code */ - char *reserved2; - hchar *str1; - hchar *str2; - hchar *str3; + std::array<char, 22> reserved2; + std::unique_ptr<hchar[]> str1; + std::unique_ptr<hchar[]> str2; + std::unique_ptr<hchar[]> str3; - DateCode *m_pDate; + std::unique_ptr<DateCode> m_pDate; FieldCode(); virtual ~FieldCode() override; @@ -357,7 +358,7 @@ struct TxtBox: public FBox */ short protect; //1=size lock - Cell *cell; + std::unique_ptr<Cell[]> cell; Table *m_pTable; /** * Paragraph list @@ -629,7 +630,7 @@ struct Picture: public FBox /** * It's for the Drawing object */ - unsigned char *follow; /* When the type of image is drawing, gives additional information. */ + std::unique_ptr<unsigned char[]> follow; /* When the type of image is drawing, gives additional information. */ bool ishyper; |