diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-15 16:23:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-16 07:55:00 +0100 |
commit | 121303615054568c204def97872343d2014af4a0 (patch) | |
tree | 233ba5de1ddb4d890310d0648c31b13a1c561f00 /hwpfilter/source/hwpfile.h | |
parent | 13b89618c49adfd77d184f22e23420a7b6d4678b (diff) |
loplugin:useuniqueptr in hwpfilter
Change-Id: If6e8dfcec2842a329229e5c57417ca3f00ef74b3
Reviewed-on: https://gerrit.libreoffice.org/44763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter/source/hwpfile.h')
-rw-r--r-- | hwpfilter/source/hwpfile.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h index 817173d24707..83bf28860f9b 100644 --- a/hwpfilter/source/hwpfile.h +++ b/hwpfilter/source/hwpfile.h @@ -27,6 +27,7 @@ #include <algorithm> #include <list> +#include <memory> #include <vector> #include <stdio.h> #include <string.h> @@ -220,7 +221,7 @@ class DLLEXPORT HWPFile void AddDateFormat(DateCode *); void AddHeaderFooter(HeaderFooter *); void AddPageNumber(ShowPageNum *); - void AddTable(Table *); + void AddTable(std::unique_ptr<Table>); ColumnDef* GetColumnDef(int); int GetPageMasterNum(int page); @@ -229,7 +230,7 @@ class DLLEXPORT HWPFile HWPInfo& GetHWPInfo(void) { return _hwpInfo; } HWPFont& GetHWPFont(void) { return _hwpFont; } HWPStyle& GetHWPStyle(void) { return _hwpStyle; } - HWPPara *GetFirstPara(void) { return plist.front(); } + HWPPara *GetFirstPara(void) { return plist.front().get(); } EmPicture *GetEmPicture(Picture *pic); EmPicture *GetEmPictureByName(char * name); @@ -284,14 +285,14 @@ class DLLEXPORT HWPFile HWPInfo _hwpInfo; HWPFont _hwpFont; HWPStyle _hwpStyle; - std::vector<ColumnInfo*> columnlist; + std::vector<std::unique_ptr<ColumnInfo>> columnlist; // paragraph list - std::vector<HWPPara*> plist; + std::vector<std::unique_ptr<HWPPara>> plist; // floating box list std::vector<FBox*> blist; // embedded picture list(tag datas) - std::vector<EmPicture*> emblist; - std::vector<HyperText*> hyperlist; + std::vector<std::unique_ptr<EmPicture>> emblist; + std::vector<std::unique_ptr<HyperText>> hyperlist; int currenthyper; std::vector<std::shared_ptr<ParaShape>> pslist; std::vector<std::shared_ptr<CharShape>> cslist; @@ -299,7 +300,7 @@ class DLLEXPORT HWPFile std::vector<DateCode*> datecodes; std::vector<HeaderFooter*> headerfooters; std::vector<ShowPageNum*> pagenumbers; - std::vector<Table*> tables; + std::vector<std::unique_ptr<Table>> tables; //track the stack of HParas types we're currently importing std::vector<unsigned char> element_import_stack; |