diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 11:58:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 17:11:46 +0100 |
commit | 52976d3a9f693548f4f833f56f7d029baddf3389 (patch) | |
tree | 60f1a9f87209c4e09b69470a6198a98bdba737b6 /hwpfilter | |
parent | 581cfc49baddae96b12ed29724e929a2ded1e886 (diff) |
HBox::Read should return bool
Change-Id: Ia262ab66ecf1da38f9bcf8bf34763aff85745423
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hbox.h | 50 | ||||
-rw-r--r-- | hwpfilter/source/hpara.cxx | 2 | ||||
-rw-r--r-- | hwpfilter/source/hpara.h | 2 | ||||
-rw-r--r-- | hwpfilter/source/hwpread.cxx | 54 |
4 files changed, 54 insertions, 54 deletions
diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h index 88d789825269..8be92f73023d 100644 --- a/hwpfilter/source/hbox.h +++ b/hwpfilter/source/hbox.h @@ -59,7 +59,7 @@ struct HBox * @param hwpf HWPFile Object having all information for a hwp file. * @returns True if reading from stream is successful. */ - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); virtual hchar_string GetString(); private: @@ -77,7 +77,7 @@ struct SkipData: public HBox SkipData(hchar); virtual ~SkipData(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; struct DateCode; struct FieldCode : public HBox @@ -95,7 +95,7 @@ struct FieldCode : public HBox FieldCode(); virtual ~FieldCode(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; /** * Kind of BOOKMARK @@ -120,7 +120,7 @@ struct Bookmark: public HBox Bookmark(); virtual ~Bookmark(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; // date format(7) @@ -135,7 +135,7 @@ struct DateFormat: public HBox hchar dummy; DateFormat(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; /** @@ -157,7 +157,7 @@ struct DateCode: public HBox unsigned char key; DateCode(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); virtual hchar_string GetString(); }; @@ -172,7 +172,7 @@ struct Tab: public HBox hchar dummy; Tab(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; // tbox(10) TABLE BOX MATH BUTTON HYPERTEXT @@ -385,7 +385,7 @@ struct TxtBox: public FBox */ virtual int Type() { return type; } - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); virtual hunit Height(CharShape *csty); }; @@ -656,7 +656,7 @@ struct Picture: public FBox virtual ~Picture(); virtual int Type (); - virtual int Read (HWPFile &hwpf); + virtual bool Read (HWPFile &hwpf); virtual hunit Height (CharShape *sty); }; @@ -677,7 +677,7 @@ struct Line: public FBox Line(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; // hidden(15) @@ -695,7 +695,7 @@ struct Hidden: public HBox Hidden(); virtual ~Hidden(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; /** @@ -724,7 +724,7 @@ struct HeaderFooter: public HBox HeaderFooter(); virtual ~HeaderFooter(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; /** @@ -757,7 +757,7 @@ struct Footnote: public HBox Footnote(); virtual ~Footnote(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; // auto number(18) @@ -785,7 +785,7 @@ struct AutoNum: public HBox AutoNum(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; /** @@ -799,7 +799,7 @@ struct NewNum: public HBox NewNum(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; // page numger(20) @@ -821,7 +821,7 @@ struct ShowPageNum: public HBox ShowPageNum(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; /* Ȧʽ (21) */ @@ -846,7 +846,7 @@ struct PageNumCtrl: public HBox PageNumCtrl(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; // mail merge(22) @@ -861,7 +861,7 @@ struct MailMerge: public HBox MailMerge(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); virtual hchar_string GetString(); }; @@ -877,7 +877,7 @@ struct Compose: public HBox Compose(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; // hyphen(24) @@ -894,7 +894,7 @@ struct Hyphen: public HBox Hyphen(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; // toc mark(25) @@ -910,7 +910,7 @@ struct TocMark: public HBox TocMark(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; // index mark(26) @@ -928,7 +928,7 @@ struct IndexMark: public HBox IndexMark(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; // outline(28) @@ -999,7 +999,7 @@ class Outline: public HBox Outline(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); hchar_string GetUnicode() const; }; @@ -1015,7 +1015,7 @@ struct KeepSpace: public HBox KeepSpace(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; /* ĭ(31) */ @@ -1028,7 +1028,7 @@ struct FixedSpace: public HBox FixedSpace(); - virtual int Read(HWPFile &hwpf); + virtual bool Read(HWPFile &hwpf); }; #endif /* _HBOX_H_ */ diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx index f1b374e1c8d2..009876b10dde 100644 --- a/hwpfilter/source/hpara.cxx +++ b/hwpfilter/source/hpara.cxx @@ -83,7 +83,7 @@ HWPPara::~HWPPara(void) } -int HWPPara::Read(HWPFile & hwpf, unsigned char flag) +bool HWPPara::Read(HWPFile & hwpf, unsigned char flag) { unsigned char same_cshape; int ii; diff --git a/hwpfilter/source/hpara.h b/hwpfilter/source/hpara.h index 27b283c49e40..3ace278636b3 100644 --- a/hwpfilter/source/hpara.h +++ b/hwpfilter/source/hpara.h @@ -116,7 +116,7 @@ class DLLEXPORT HWPPara HWPPara(void); ~HWPPara(void); - int Read(HWPFile &hwpf, unsigned char flag = 0); + bool Read(HWPFile &hwpf, unsigned char flag = 0); int Write(CTextOut &txtf); int Write(CHTMLOut &html); diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx index becdb76773a6..42d4be0223b9 100644 --- a/hwpfilter/source/hwpread.cxx +++ b/hwpfilter/source/hwpread.cxx @@ -34,16 +34,16 @@ static short fboxnum = 1; static int zindex = 1; static int lnnumber = 0; -int HBox::Read(HWPFile & ) +bool HBox::Read(HWPFile & ) { // already read - return 1; + return true; } // skip block -int SkipData::Read(HWPFile & hwpf) +bool SkipData::Read(HWPFile & hwpf) { hwpf.Read4b(&data_block_len, 1); hwpf.Read2b(&dummy, 1); @@ -59,7 +59,7 @@ int SkipData::Read(HWPFile & hwpf) // Field code(5) -int FieldCode::Read(HWPFile & hwpf) +bool FieldCode::Read(HWPFile & hwpf) { ulong size; hchar dummy; @@ -116,7 +116,7 @@ int FieldCode::Read(HWPFile & hwpf) // book mark(6) -int Bookmark::Read(HWPFile & hwpf) +bool Bookmark::Read(HWPFile & hwpf) { long len; @@ -134,13 +134,13 @@ int Bookmark::Read(HWPFile & hwpf) hwpf.Read2b(id, BMK_COMMENT_LEN + 1); hwpf.Read2b(&type, 1); //return hwpf.Read2b(&type, 1); - return 1; + return true; } // date format(7) -int DateFormat::Read(HWPFile & hwpf) +bool DateFormat::Read(HWPFile & hwpf) { hwpf.Read2b(format, DATE_SIZE); dummy = sal::static_int_cast<hchar>(hwpf.Read2b()); @@ -153,7 +153,7 @@ int DateFormat::Read(HWPFile & hwpf) // date code(8) -int DateCode::Read(HWPFile & hwpf) +bool DateCode::Read(HWPFile & hwpf) { hwpf.Read2b(format, DATE_SIZE); hwpf.Read2b(date, 6); @@ -168,7 +168,7 @@ int DateCode::Read(HWPFile & hwpf) // tab(9) -int Tab::Read(HWPFile & hwpf) +bool Tab::Read(HWPFile & hwpf) { width = hwpf.Read2b(); leader = sal::static_int_cast<unsigned short>(hwpf.Read2b()); @@ -211,7 +211,7 @@ void Cell::Read(HWPFile & hwpf) } -int TxtBox::Read(HWPFile & hwpf) +bool TxtBox::Read(HWPFile & hwpf) { int ii, ncell; @@ -369,7 +369,7 @@ int TxtBox::Read(HWPFile & hwpf) // picture(11) -int Picture::Read(HWPFile & hwpf) +bool Picture::Read(HWPFile & hwpf) { hwpf.Read2b(reserved, 2); hwpf.Read2b(&dummy, 1); @@ -468,7 +468,7 @@ Line::Line():FBox(CH_LINE) } -int Line::Read(HWPFile & hwpf) +bool Line::Read(HWPFile & hwpf) { hwpf.Read2b(reserved, 2); hwpf.Read2b(&dummy, 1); @@ -528,7 +528,7 @@ Hidden::Hidden():HBox(CH_HIDDEN) } -int Hidden::Read(HWPFile & hwpf) +bool Hidden::Read(HWPFile & hwpf) { hwpf.Read2b(reserved, 2); hwpf.Read2b(&dummy, 1); @@ -550,7 +550,7 @@ HeaderFooter::HeaderFooter():HBox(CH_HEADER_FOOTER) } -int HeaderFooter::Read(HWPFile & hwpf) +bool HeaderFooter::Read(HWPFile & hwpf) { hwpf.Read2b(reserved, 2); hwpf.Read2b(&dummy, 1); @@ -578,7 +578,7 @@ Footnote::Footnote():HBox(CH_FOOTNOTE) } -int Footnote::Read(HWPFile & hwpf) +bool Footnote::Read(HWPFile & hwpf) { hwpf.Read2b(reserved, 2); hwpf.Read2b(&dummy, 1); @@ -602,7 +602,7 @@ AutoNum::AutoNum():HBox(CH_AUTO_NUM) } -int AutoNum::Read(HWPFile & hwpf) +bool AutoNum::Read(HWPFile & hwpf) { hwpf.Read2b(&type, 1); hwpf.Read2b(&number, 1); @@ -621,7 +621,7 @@ NewNum::NewNum():HBox(CH_NEW_NUM) } -int NewNum::Read(HWPFile & hwpf) +bool NewNum::Read(HWPFile & hwpf) { hwpf.Read2b(&type, 1); hwpf.Read2b(&number, 1); @@ -640,7 +640,7 @@ ShowPageNum::ShowPageNum():HBox(CH_SHOW_PAGE_NUM) } -int ShowPageNum::Read(HWPFile & hwpf) +bool ShowPageNum::Read(HWPFile & hwpf) { hwpf.Read2b(&where, 1); hwpf.Read2b(&shape, 1); @@ -662,7 +662,7 @@ PageNumCtrl::PageNumCtrl():HBox(CH_PAGE_NUM_CTRL) } -int PageNumCtrl::Read(HWPFile & hwpf) +bool PageNumCtrl::Read(HWPFile & hwpf) { hwpf.Read2b(&kind, 1); hwpf.Read2b(&what, 1); @@ -681,7 +681,7 @@ MailMerge::MailMerge():HBox(CH_MAIL_MERGE) } -int MailMerge::Read(HWPFile & hwpf) +bool MailMerge::Read(HWPFile & hwpf) { hwpf.Read1b(field_name, 20); hwpf.Read2b(&dummy, 1); @@ -699,7 +699,7 @@ Compose::Compose():HBox(CH_COMPOSE) } -int Compose::Read(HWPFile & hwpf) +bool Compose::Read(HWPFile & hwpf) { hwpf.Read2b(compose, 3); hwpf.Read2b(&dummy, 1); @@ -717,7 +717,7 @@ Hyphen::Hyphen():HBox(CH_HYPHEN) } -int Hyphen::Read(HWPFile & hwpf) +bool Hyphen::Read(HWPFile & hwpf) { hwpf.Read2b(&width, 1); hwpf.Read2b(&dummy, 1); @@ -735,7 +735,7 @@ TocMark::TocMark():HBox(CH_TOC_MARK) } -int TocMark::Read(HWPFile & hwpf) +bool TocMark::Read(HWPFile & hwpf) { hwpf.Read2b(&kind, 1); hwpf.Read2b(&dummy, 1); @@ -753,7 +753,7 @@ IndexMark::IndexMark():HBox(CH_INDEX_MARK) } -int IndexMark::Read(HWPFile & hwpf) +bool IndexMark::Read(HWPFile & hwpf) { hwpf.Read2b(&keyword1, 60); hwpf.Read2b(&keyword2, 60); @@ -773,7 +773,7 @@ Outline::Outline():HBox(CH_OUTLINE) } -int Outline::Read(HWPFile & hwpf) +bool Outline::Read(HWPFile & hwpf) { hwpf.Read2b(&kind, 1); hwpf.Read1b(&shape, 1); @@ -796,7 +796,7 @@ KeepSpace::KeepSpace():HBox(CH_KEEP_SPACE) } -int KeepSpace::Read(HWPFile & hwpf) +bool KeepSpace::Read(HWPFile & hwpf) { hwpf.Read2b(&dummy, 1); @@ -813,7 +813,7 @@ FixedSpace::FixedSpace():HBox(CH_FIXED_SPACE) } -int FixedSpace::Read(HWPFile & hwpf) +bool FixedSpace::Read(HWPFile & hwpf) { hwpf.Read2b(&dummy, 1); |