LibreOffice Module hwpfilter (master) 1
hbox.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_HWPFILTER_SOURCE_HBOX_H
21#define INCLUDED_HWPFILTER_SOURCE_HBOX_H
22
23#include <sal/config.h>
24
25#include <array>
26#include <memory>
27
28#include <rtl/ustring.hxx>
29#include <sal/types.h>
30
31#include "hwplib.h"
32#include "hwpfile.h"
33#include "hinfo.h"
34#include "hpara.h"
35
43struct HBox
44{
45 public:
47
52 explicit HBox( hchar hch );
53 virtual ~HBox();
57 int WSize();
64 virtual bool Read(HWPFile &hwpf);
65
66 private:
67 static int boxCount;
68};
69
73struct SkipData: public HBox
74{
75 explicit SkipData(hchar);
76 virtual ~SkipData() override;
77 virtual bool Read(HWPFile &hwpf) override;
78};
79
80struct DateCode;
81struct FieldCode : public HBox
82{
83 uchar type[2]; /* 2/0 - Formula, 3/0-document summary, 3/1 Personal Information, 3/2-creation date, 4/0-pressing mold */
84 std::array<char, 4> reserved1;
85 unsigned short location_info; /* 0 - End code, 1 - start code */
86 std::array<char, 22> reserved2;
87 std::unique_ptr<hchar[]> str1;
88 std::unique_ptr<hchar[]> str2;
89 std::unique_ptr<hchar[]> str3;
90
91 std::unique_ptr<DateCode> m_pDate;
92
93 FieldCode();
94 virtual ~FieldCode() override;
95 virtual bool Read(HWPFile &hwpf) override;
96};
100enum
101{
104 BM_END
106
107#define BMK_COMMENT_LEN 15
108
112struct Bookmark: public HBox
113{
116 unsigned short type;
117
118 Bookmark();
119 virtual ~Bookmark() override;
120 virtual bool Read(HWPFile &hwpf) override;
121};
122
123// date format(7)
124const int DATE_SIZE = 40;
125
129struct DateFormat: public HBox
130{
133
134 DateFormat();
135 virtual bool Read(HWPFile &hwpf) override;
136};
137
141struct DateCode: public HBox
142{
143 enum
144 {
146 };
147
152 short date[6];
154 unsigned char key;
155
156 DateCode();
157 virtual bool Read(HWPFile &hwpf) override;
158
160};
161
165struct Tab: public HBox
166{
168 unsigned short leader;
170
171 Tab();
172 virtual bool Read(HWPFile &hwpf) override;
173};
174
175// tbox(10) TABLE BOX MATH BUTTON HYPERTEXT
176
178enum /* TxtBox->margin[n][?] */
179{
182enum /* TxtBox->margin[?][n] */
183{
188enum
189{
194
196{
197 unsigned char key;
198 unsigned char top; // 0-No line, 1-single, 2-thick, 3-double
199 unsigned char bottom;
200 unsigned char left;
201 unsigned char right;
202 short color; // cell color
203 unsigned char shade; // <100%
204};
216struct Cell // Cell
217{
218 unsigned char key; // Index value of border style
219 short p;
220 short color; // cell color
221 short x, y; // [x,y] cell pos
222 short w, h; // [x,y] cell size
223 short txthigh, cellhigh; // used maximum
224 unsigned char flag, changed, used; // unused(file)
225 unsigned char ver_align; // vertical align {1=center}
226 unsigned char linetype[4]; // [left,right,top,bottom]
227 unsigned char shade; // <100%
228 unsigned char diagonal; // { 0=none,\=1,/=2,X=3}
229 unsigned char protect;
230
231 bool Read(HWPFile &hwpf);
232};
233
238{
242 unsigned char anchor_type;
246 unsigned char txtflow; /* Avoid painting. 0-2 (seat occupied, transparency, harmony) */
250 short xpos; // left, right, center, xx
254 short ypos; // page top, bottom, yy
260 short margin[3][4] = {}; // out : left, right, top, bottom
264 short boxnum; /* Numbers used as style-name in Libre Office */
268 unsigned char boxtype; // (L)ine, t(X)tbox, Picture - (G)
269 short cap_len; /* The length of the caption */
270
271 void *cell;
272
274 : anchor_type(0)
275 , txtflow(0)
276 , xpos(0)
277 , ypos(0)
278 , boxnum(0)
279 , boxtype(0)
280 , cap_len(0)
281 , cell(nullptr)
282 {
283 }
284};
285
291struct FBox: public HBox
292{
294 short option; // draw frame
297
299 short cap_xs, cap_ys ;
300 short xs, ys; // ys = fig_ys + cap_ys + margin
301// xs = fig_xs + cap_xs + margin
304 unsigned char smart_linesp;
305
306/* In tbox or pic, this data exists in memory when running, isn't written to a file.
307 But in line, it will be written to a file.
308 */
310 unsigned char boundx, draw;
311
315 short pgx, pgy; // physical xpos, ypos
316 short pgno, showpg; // pageno where code is
317
318 explicit FBox( hchar hch );
319 virtual ~FBox() override;
320};
321
322struct Table;
326struct TxtBox: public FBox
327{
330
331 short dummy1; // to not change structure size */
332 short cap_len;
333 short next_box;
334 short dummy2; // to not change structure size */
335 unsigned char reserved1;
339 short cap_pos; // caption pos
340 short num; // numbering
341
342 short dummy3;
343 short baseline; //(for equ)
344
349 short type; // 0-table, 1-textbox, 2-수식, 3-button
353 short nCell; //:=1 offset 80
357 short protect; //1=size lock
358
359 std::unique_ptr<Cell[]> cell;
364 typedef std::vector<std::unique_ptr<HWPPara>> plist_t;
365 typedef std::vector<plist_t> plists_t;
367
371 std::vector<std::unique_ptr<HWPPara>> caption;
372
373 TxtBox();
374 virtual ~TxtBox() override;
375
376 virtual bool Read(HWPFile &hwpf) override;
377};
378
379#define ALLOWED_GAP 5
380#define INIT_SIZE 20
381#define ADD_AMOUNT 10
382
384{
385 std::unique_ptr<int[]> data;
386 size_t nCount;
387 size_t nTotal;
389 nCount = 0;
391 data.reset(new int[nTotal]);
392 }
393
395 if (nTotal + ADD_AMOUNT < nTotal) // overflow
396 {
397 throw ::std::bad_alloc();
398 }
399 int* tmp = new int[nTotal + ADD_AMOUNT];
400 for (size_t i = 0 ; i < nTotal ; i++)
401 tmp[i] = data[i];
403 data.reset(tmp);
404 }
405
406 void insert(int pos){
407 if( nCount == 0 ){
408 data[nCount++] = pos;
409 return;
410 }
411 for (size_t i = 0 ; i < nCount; i++ ) {
412 if( pos < data[i] + ALLOWED_GAP && pos > data[i] - ALLOWED_GAP )
413 return; // Already exist;
414 if( pos < data[i] ){
415 if( nCount == nTotal )
417 for (size_t j = nCount ; j > i ; j--)
418 data[j] = data[j-1];
419 data[i] = pos;
420 nCount++;
421 return;
422 }
423 }
424 // last position.
425 if( nCount == nTotal )
427 data[nCount++] = pos;
428 }
429
430 int getIndex(int pos)
431 {
432 if( pos == 0 )
433 return 0;
434 for (size_t i = 0 ; i < nCount; i++) {
435 if( pos < data[i] + ALLOWED_GAP && pos > data[i] - ALLOWED_GAP )
436 return i;
437 }
438 return -1;
439 }
440};
441
442struct Rows
443{
444 std::unique_ptr<int[]> data;
445 size_t nCount;
446 size_t nTotal;
448 nCount = 0;
450 data.reset( new int[nTotal] );
451 }
452
454 if (nTotal + ADD_AMOUNT < nTotal) // overflow
455 {
456 throw ::std::bad_alloc();
457 }
458 int* tmp = new int[nTotal + ADD_AMOUNT];
459 for (size_t i = 0 ; i < nTotal ; i++)
460 tmp[i] = data[i];
462 data.reset(tmp);
463 }
464
465 void insert(int pos){
466 if( nCount == 0 ){
467 data[nCount++] = pos;
468 return;
469 }
470 for (size_t i = 0 ; i < nCount; i++) {
471 if( pos < data[i] + ALLOWED_GAP && pos > data[i] - ALLOWED_GAP )
472 return; // Already exist;
473 if( pos < data[i] ){
474 if( nCount == nTotal )
475 AddRowsSize();
476 for (size_t j = nCount ; j > i ; j--)
477 data[j] = data[j-1];
478 data[i] = pos;
479 nCount++;
480 return;
481 }
482 }
483 // last position.
484 if( nCount == nTotal )
485 AddRowsSize();
486 data[nCount++] = pos;
487 }
488
489 int getIndex(int pos)
490 {
491 if( pos == 0 )
492 return 0;
493 for (size_t i = 0 ; i < nCount; i++) {
494 if( pos < data[i] + ALLOWED_GAP && pos > data[i] - ALLOWED_GAP )
495 return i;
496 }
497 return -1;
498 }
499};
500
501struct TCell
502{
508};
509
510struct Table
511{
512 Table() : box(nullptr) {};
513
516 std::vector<std::unique_ptr<TCell>> cells;
518};
519
520/* picture (11) graphics, OLE graphics, inserted graphics, drawing */
522{
530{
531 char path[256];
532 void *img;
534};
535
540{
541 char embname[16];
542};
543
548{
549 char embname[16];
550 void *hwpole;
551};
552
553struct HWPDrawingObject;
554
559{
564};
565
570{
571 char path[256];
572};
573
574typedef union
575{
581} PicDef;
582
592struct Picture: public FBox
593{
600 uint follow_block_size; /* Additional information length. */
601 short dummy1; // to not change structure size */
602 short dummy2; // to not change structure size */
607 short cap_pos; // caption pos
611 short num; // numbering
612
624 char reserved3[9];
625
626 std::vector<std::unique_ptr<HWPPara>> caption;
630 std::vector<unsigned char> follow; /* When the type of image is drawing, gives additional information. */
631
633
634 Picture();
635 virtual ~Picture() override;
636
637 virtual bool Read (HWPFile &hwpf) override;
638};
639
640// line (14)
644struct Line: public FBox
645{
648
649 char reserved2[8];
650
651 short sx, sy, ex, ey;
653
654 Line();
655
656 virtual bool Read(HWPFile &hwpf) override;
657};
658
659// hidden(15)
663struct Hidden: public HBox
664{
667
668 unsigned char info[8]; // h, next, dummy
669 std::vector<std::unique_ptr<HWPPara>> plist;
670
671 Hidden();
672 virtual ~Hidden() override;
673
674 virtual bool Read(HWPFile &hwpf) override;
675};
676
680struct HeaderFooter: public HBox
681{
684
685 unsigned char info[8];
689 unsigned char type;
690 unsigned char where;
691 unsigned char linenumber;
692
693 unsigned int m_nPageNumber;
694
698 std::vector<std::unique_ptr<HWPPara>> plist;
699
700 HeaderFooter();
701 virtual ~HeaderFooter() override;
702
703 virtual bool Read(HWPFile &hwpf) override;
704};
705
710struct Footnote: public HBox
711{
714
715 unsigned char info[8];
719 unsigned short number;
723 unsigned short type;
731 std::vector<std::unique_ptr<HWPPara>> plist;
732
733 Footnote();
734 virtual ~Footnote() override;
735
736 virtual bool Read(HWPFile &hwpf) override;
737};
738
739// auto number(18)
743enum
744{
752
756struct AutoNum: public HBox
757{
758 unsigned short type;
759 unsigned short number;
761
762 AutoNum();
763
764 virtual bool Read(HWPFile &hwpf) override;
765};
766
770struct NewNum: public HBox
771{
772 unsigned short type;
773 unsigned short number;
775
776 NewNum();
777
778 virtual bool Read(HWPFile &hwpf) override;
779};
780
781// page number(20)
785struct ShowPageNum: public HBox
786{
790 unsigned short where;
791 unsigned int m_nPageNumber;
795 unsigned short shape;
797
798 ShowPageNum();
799
800 virtual bool Read(HWPFile &hwpf) override;
801};
802
803/* Start odd side (21) */
807struct PageNumCtrl: public HBox
808{
812 unsigned short kind;
816 unsigned short what;
818
819 PageNumCtrl();
820
821 virtual bool Read(HWPFile &hwpf) override;
822};
823
824// mail merge(22)
829struct MailMerge: public HBox
830{
831 unsigned char field_name[20] = {};
833
834 MailMerge();
835
836 virtual bool Read(HWPFile &hwpf) override;
837 static hchar_string GetString();
838};
839
840// char composition(23)
845struct Compose: public HBox
846{
849
850 Compose();
851
852 virtual bool Read(HWPFile &hwpf) override;
853};
854
855// hyphen(24)
859struct Hyphen: public HBox
860{
866
867 Hyphen();
868
869 virtual bool Read(HWPFile &hwpf) override;
870};
871
872// toc mark(25)
878struct TocMark: public HBox
879{
882
883 TocMark();
884
885 virtual bool Read(HWPFile &hwpf) override;
886};
887
888// index mark(26)
894struct IndexMark: public HBox
895{
896 hchar keyword1[60] = {};
897 hchar keyword2[60] = {};
898 unsigned short pgno;
900
901 IndexMark();
902
903 virtual bool Read(HWPFile &hwpf) override;
904};
905
906// outline(28)
907#define MAX_OUTLINE_LEVEL 7
908
909enum
910{
922 OLSTY_BULLET5 = 133
924
925// value is in style->userchar[level];
926enum
927{
940 N_UDO
946class Outline: public HBox
947{
948 public:
952 unsigned short kind;
953 unsigned char shape;
957 unsigned char level;
961 unsigned short number[MAX_OUTLINE_LEVEL];
969 hchar deco[MAX_OUTLINE_LEVEL][2]; /* Prefix/postfix for Customize */
971
972 Outline();
973
974 virtual bool Read(HWPFile &hwpf) override;
975 OUString GetUnicode() const;
976};
977
978/* Bundle of spaces (30) */
984struct KeepSpace: public HBox
985{
987
988 KeepSpace();
989
990 virtual bool Read(HWPFile &hwpf) override;
991};
992
993/* Fixed-width spaces (31) */
997struct FixedSpace: public HBox
998{
1000
1001 FixedSpace();
1002
1003 virtual bool Read(HWPFile &hwpf) override;
1004};
1005#endif // INCLUDED_HWPFILTER_SOURCE_HBOX_H
1006
1007/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
unsigned int uint
The HWPFile class is the main class of hwp for reading file information from stream.
Definition: hwpfile.h:98
Number and format of title.
Definition: hbox.h:947
hchar user_shape[MAX_OUTLINE_LEVEL]
shape of level
Definition: hbox.h:965
OUString GetUnicode() const
Definition: hbox.cxx:567
unsigned short kind
kind of numbering format
Definition: hbox.h:952
unsigned char level
level of number, Ex) The level of 1.3.2.4 is four
Definition: hbox.h:957
hchar dummy
Definition: hbox.h:970
unsigned short number[MAX_OUTLINE_LEVEL]
value of level
Definition: hbox.h:961
hchar deco[MAX_OUTLINE_LEVEL][2]
decoration character for the level type
Definition: hbox.h:969
Outline()
Definition: hwpread.cxx:872
unsigned char shape
Definition: hbox.h:953
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:881
@ TF_OCCUPY_SPACE
Definition: hbox.h:187
@ TF_AROUND_TEXT
Definition: hbox.h:187
@ TF_TRANSPARENT
Definition: hbox.h:187
@ OLSTY_NUMSIG2
Definition: hbox.h:915
@ OLSTY_USER
Definition: hbox.h:911
@ OLSTY_NUMS2
Definition: hbox.h:913
@ OLSTY_BULLET3
Definition: hbox.h:920
@ OLSTY_NUMS1
Definition: hbox.h:912
@ OLSTY_NUMSIG3
Definition: hbox.h:916
@ OLSTY_BULLET2
Definition: hbox.h:919
@ OLSTY_BULLET4
Definition: hbox.h:921
@ OLSTY_BULLET5
Definition: hbox.h:922
@ OLSTY_BULLET1
Definition: hbox.h:918
@ OLSTY_NUMSIG1
Definition: hbox.h:914
@ OLSTY_BULUSER
Definition: hbox.h:917
#define ADD_AMOUNT
Definition: hbox.h:381
pictype
Definition: hbox.h:522
@ PICTYPE_UNKNOWN
Definition: hbox.h:524
@ PICTYPE_FILE
Definition: hbox.h:523
@ PICTYPE_OLE
Definition: hbox.h:523
@ PICTYPE_DRAW
Definition: hbox.h:524
@ PICTYPE_EMBED
Definition: hbox.h:523
@ IN_M
Definition: hbox.h:180
@ CELL_M
Definition: hbox.h:180
@ OUT_M
Definition: hbox.h:180
@ R_M
Definition: hbox.h:184
@ B_M
Definition: hbox.h:184
@ L_M
Definition: hbox.h:184
@ T_M
Definition: hbox.h:184
#define INIT_SIZE
Definition: hbox.h:380
#define ALLOWED_GAP
Definition: hbox.h:379
@ PGNUM_AUTO
Definition: hbox.h:745
@ TBLNUM_AUTO
Definition: hbox.h:749
@ ENNUM_AUTO
Definition: hbox.h:747
@ EQUNUM_AUTO
Definition: hbox.h:750
@ PICNUM_AUTO
Definition: hbox.h:748
@ FNNUM_AUTO
Definition: hbox.h:746
@ UDO_LENG
Definition: hbox.h:932
@ UDO_SP_CSYLL
Definition: hbox.h:938
@ UDO_NUM
Definition: hbox.h:928
@ UDO_HANJA
Definition: hbox.h:935
@ UDO_JAMO
Definition: hbox.h:934
@ UDO_UROM
Definition: hbox.h:929
@ UDO_UENG
Definition: hbox.h:931
@ UDO_SP_CLENG
Definition: hbox.h:937
@ UDO_LROM
Definition: hbox.h:930
@ UDO_SP_CJAMO
Definition: hbox.h:939
@ UDO_SYLL
Definition: hbox.h:933
@ N_UDO
Definition: hbox.h:940
@ UDO_SP_CNUM
Definition: hbox.h:936
@ CAP_IN_BOT
Definition: hbox.h:190
@ CAP_RIGHT_BOT
Definition: hbox.h:191
@ CAP_OUT_TOP
Definition: hbox.h:190
@ CAP_IN_TOP
Definition: hbox.h:190
@ CAP_RIGHT_TOP
Definition: hbox.h:191
@ EQU_CAP_POS
Definition: hbox.h:192
@ CAP_LEFT_TOP
Definition: hbox.h:191
@ CAP_OUT_BOT
Definition: hbox.h:190
@ CAP_LEFT_BOT
Definition: hbox.h:191
#define BMK_COMMENT_LEN
Definition: hbox.h:107
ttype
Definition: hbox.h:177
@ BUTTON_TYPE
Definition: hbox.h:177
@ TBL_TYPE
Definition: hbox.h:177
@ HYPERTEXT_TYPE
Definition: hbox.h:177
@ EQU_TYPE
Definition: hbox.h:177
@ TXT_TYPE
Definition: hbox.h:177
@ BM_BEGIN
Definition: hbox.h:103
@ BM_END
Definition: hbox.h:104
@ BM_MARK
Definition: hbox.h:102
anchor
Definition: hbox.h:186
@ PARA_ANCHOR
Definition: hbox.h:186
@ CHAR_ANCHOR
Definition: hbox.h:186
@ PAGE_ANCHOR
Definition: hbox.h:186
@ PAPER_ANCHOR
Definition: hbox.h:186
const int DATE_SIZE
Definition: hbox.h:124
#define MAX_OUTLINE_LEVEL
Definition: hbox.h:907
::std::basic_string< hchar > hchar_string
Definition: hwplib.h:44
char16_t hchar
size of hunit is 4 since hwp96 version
Definition: hwplib.h:36
int hunit
Definition: hwplib.h:37
unsigned char uchar
Definition: hwplib.h:40
int i
Input current index of page,comment,table and picture.
Definition: hbox.h:757
unsigned short type
Definition: hbox.h:758
unsigned short number
Definition: hbox.h:759
AutoNum()
Definition: hwpread.cxx:685
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:693
hchar dummy
Definition: hbox.h:760
Class for BOOKMARK.
Definition: hbox.h:113
virtual ~Bookmark() override
Definition: hbox.cxx:99
hchar dummy
Definition: hbox.h:114
unsigned short type
Definition: hbox.h:116
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:125
Bookmark()
Definition: hbox.cxx:92
Definition: hbox.h:196
unsigned char right
Definition: hbox.h:201
short color
Definition: hbox.h:202
unsigned char shade
Definition: hbox.h:203
unsigned char left
Definition: hbox.h:200
unsigned char bottom
Definition: hbox.h:199
unsigned char key
Definition: hbox.h:197
unsigned char top
Definition: hbox.h:198
A cell has four properties to specify the position for itself in hwp.
Definition: hbox.h:217
unsigned char protect
Definition: hbox.h:229
short x
Definition: hbox.h:221
unsigned char flag
Definition: hbox.h:224
unsigned char linetype[4]
Definition: hbox.h:226
unsigned char changed
Definition: hbox.h:224
short txthigh
Definition: hbox.h:223
unsigned char used
Definition: hbox.h:224
short h
Definition: hbox.h:222
short w
Definition: hbox.h:222
short color
Definition: hbox.h:220
short p
Definition: hbox.h:219
unsigned char ver_align
Definition: hbox.h:225
short cellhigh
Definition: hbox.h:223
short y
Definition: hbox.h:221
unsigned char shade
Definition: hbox.h:227
bool Read(HWPFile &hwpf)
Definition: hwpread.cxx:196
unsigned char diagonal
Definition: hbox.h:228
unsigned char key
Definition: hbox.h:218
Definition: hbox.h:384
size_t nTotal
Definition: hbox.h:387
size_t nCount
Definition: hbox.h:386
std::unique_ptr< int[]> data
Definition: hbox.h:385
void AddColumnsSize()
Definition: hbox.h:394
int getIndex(int pos)
Definition: hbox.h:430
void insert(int pos)
Definition: hbox.h:406
Columns()
Definition: hbox.h:388
The compose struct displays characters at position.
Definition: hbox.h:846
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:799
hchar compose[3]
Definition: hbox.h:847
hchar dummy
Definition: hbox.h:848
Compose()
Definition: hwpread.cxx:793
Class for current date and time with specified format.
Definition: hbox.h:142
DateCode()
Definition: hbox.cxx:111
unsigned char key
Definition: hbox.h:154
@ HOUR
Definition: hbox.h:145
@ YEAR
Definition: hbox.h:145
@ WEEK
Definition: hbox.h:145
@ MONTH
Definition: hbox.h:145
@ DAY
Definition: hbox.h:145
@ MIN
Definition: hbox.h:145
hchar dummy
Definition: hbox.h:153
hchar_string GetString()
Definition: hbox.cxx:141
hchar format[DATE_SIZE]
Definition: hbox.h:148
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:159
short date[6]
year/month/week/day/hour/minute
Definition: hbox.h:152
Class for saving date format made by user.
Definition: hbox.h:130
hchar format[DATE_SIZE]
Definition: hbox.h:131
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:147
DateFormat()
Definition: hbox.cxx:104
hchar dummy
Definition: hbox.h:132
Style for floating object.
Definition: hbox.h:238
short ypos
Vertical alignment.
Definition: hbox.h:254
unsigned char boxtype
Type of floating object : line, txtbox, image, table, equalizer and button.
Definition: hbox.h:268
short margin[3][4]
Every margin of border [0-2][] : out/in/cell margin [][0-3] : left/right/top/bottom.
Definition: hbox.h:260
void * cell
Definition: hbox.h:271
unsigned char txtflow
Kind of wrap.
Definition: hbox.h:246
short boxnum
Index of floating object.
Definition: hbox.h:264
short xpos
Horizontal alignment.
Definition: hbox.h:250
short cap_len
Definition: hbox.h:269
unsigned char anchor_type
Anchor type : paragraph , page, char.
Definition: hbox.h:242
FBoxStyle()
Definition: hbox.h:273
This object is for floating object like table, image, line and so on.
Definition: hbox.h:292
short pgno
Definition: hbox.h:316
short boundsy
Definition: hbox.h:309
short cap_ys
Definition: hbox.h:299
FBox(hchar hch)
Definition: hbox.cxx:311
short box_ys
Definition: hbox.h:298
short ys
Definition: hbox.h:300
short cap_margin
Definition: hbox.h:302
char ypos_type
Definition: hbox.h:303
short boundey
Definition: hbox.h:309
char xpos_type
Definition: hbox.h:303
short showpg
Definition: hbox.h:316
int zorder
Definition: hbox.h:293
FBoxStyle style
Definition: hbox.h:296
short pgx
Physical x,y position.
Definition: hbox.h:315
unsigned char smart_linesp
Definition: hbox.h:304
short cap_xs
Definition: hbox.h:299
unsigned char draw
Definition: hbox.h:310
hchar ctrl_ch
Definition: hbox.h:295
short xs
Definition: hbox.h:300
virtual ~FBox() override
Definition: hbox.cxx:337
short pgy
Definition: hbox.h:315
short option
Definition: hbox.h:294
short box_xs
Definition: hbox.h:298
unsigned char boundx
Definition: hbox.h:310
Definition: hbox.h:82
unsigned short location_info
Definition: hbox.h:85
std::unique_ptr< hchar[]> str2
Definition: hbox.h:88
std::unique_ptr< hchar[]> str1
Definition: hbox.h:87
std::unique_ptr< hchar[]> str3
Definition: hbox.h:89
std::array< char, 22 > reserved2
Definition: hbox.h:86
virtual ~FieldCode() override
Definition: hbox.cxx:87
std::array< char, 4 > reserved1
Definition: hbox.h:84
std::unique_ptr< DateCode > m_pDate
Definition: hbox.h:91
uchar type[2]
Definition: hbox.h:83
FieldCode()
Definition: hbox.cxx:81
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:64
Space with always same width not relation with fonts.
Definition: hbox.h:998
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:925
hchar dummy
Definition: hbox.h:999
Both footnote and endnote are comment.
Definition: hbox.h:711
std::vector< std::unique_ptr< HWPPara > > plist
Paragraph list of Footnote objects.
Definition: hbox.h:731
virtual ~Footnote() override
Definition: hbox.cxx:408
hchar dummy
Definition: hbox.h:713
hunit width
The width of the Footnote object.
Definition: hbox.h:727
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:664
unsigned short number
The number of current footnote/endnote.
Definition: hbox.h:719
unsigned short type
Set the type of Footnote either footnote or endnote.
Definition: hbox.h:723
hchar reserved[2]
Definition: hbox.h:712
Footnote()
Definition: hwpread.cxx:655
unsigned char info[8]
Definition: hbox.h:715
The HBox class is the base class for all date classes in hwp document.
Definition: hbox.h:44
HBox(hchar hch)
Construct a HBox object with parameter hch.
Definition: hbox.cxx:39
static int boxCount
Definition: hbox.h:67
int WSize()
Definition: hbox.cxx:52
virtual ~HBox()
Definition: hbox.cxx:46
hchar hh
Definition: hbox.h:46
virtual bool Read(HWPFile &hwpf)
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:40
Common header for drawing object.
Definition: drawdef.h:202
Header or footer.
Definition: hbox.h:681
unsigned char info[8]
Definition: hbox.h:685
hchar reserved[2]
Definition: hbox.h:682
unsigned char where
Definition: hbox.h:690
hchar dummy
Definition: hbox.h:683
unsigned char type
Header or footer.
Definition: hbox.h:689
unsigned int m_nPageNumber
Definition: hbox.h:693
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:632
virtual ~HeaderFooter() override
Definition: hbox.cxx:402
unsigned char linenumber
Definition: hbox.h:691
std::vector< std::unique_ptr< HWPPara > > plist
Paragraph list of header or footer.
Definition: hbox.h:698
Hidden section.
Definition: hbox.h:664
hchar reserved[2]
Definition: hbox.h:665
hchar dummy
Definition: hbox.h:666
unsigned char info[8]
Definition: hbox.h:668
Hidden()
Definition: hwpread.cxx:601
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:607
std::vector< std::unique_ptr< HWPPara > > plist
Definition: hbox.h:669
virtual ~Hidden() override
Definition: hbox.cxx:396
Hyphen.
Definition: hbox.h:860
hchar width
Width of hyphen.
Definition: hbox.h:864
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:818
Hyphen()
Definition: hwpread.cxx:811
hchar dummy
Definition: hbox.h:865
IndexMark marks the table of search.
Definition: hbox.h:895
hchar dummy
Definition: hbox.h:899
unsigned short pgno
Definition: hbox.h:898
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:858
hchar keyword1[60]
Definition: hbox.h:896
hchar keyword2[60]
Definition: hbox.h:897
The Special space to be treated non-space when a string is cut at the end of line.
Definition: hbox.h:985
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:906
hchar dummy
Definition: hbox.h:986
Line.
Definition: hbox.h:645
short ey
Definition: hbox.h:651
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:546
char reserved2[8]
Definition: hbox.h:649
short width
Definition: hbox.h:652
hchar reserved[2]
Definition: hbox.h:646
hchar dummy
Definition: hbox.h:647
short ex
Definition: hbox.h:651
short shade
Definition: hbox.h:652
short sx
Definition: hbox.h:651
Line()
Definition: hwpread.cxx:533
short color
Definition: hbox.h:652
short sy
Definition: hbox.h:651
Generates the mailing list automatically using address book and mail body format.
Definition: hbox.h:830
unsigned char field_name[20]
Definition: hbox.h:831
hchar dummy
Definition: hbox.h:832
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:781
static hchar_string GetString()
Definition: hbox.cxx:419
Input new number as current index of page,comment,table and picture.
Definition: hbox.h:771
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:716
unsigned short type
Definition: hbox.h:772
NewNum()
Definition: hwpread.cxx:707
hchar dummy
Definition: hbox.h:774
unsigned short number
Definition: hbox.h:773
Controls the display of page number, header, footer and border.
Definition: hbox.h:808
hchar dummy
Definition: hbox.h:817
unsigned short kind
object type
Definition: hbox.h:812
unsigned short what
control command.
Definition: hbox.h:816
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:762
Drawing object of hwp.
Definition: hbox.h:559
HWPDrawingObject * hdo
Definition: hbox.h:560
ZZRect vrect
Definition: hbox.h:562
uint zorder
Definition: hbox.h:561
int mbrcnt
Definition: hbox.h:563
Embedded image file.
Definition: hbox.h:540
char embname[16]
Definition: hbox.h:541
External image file.
Definition: hbox.h:530
char path[256]
Definition: hbox.h:531
bool skipfind
Definition: hbox.h:533
void * img
Definition: hbox.h:532
Win32 ole object.
Definition: hbox.h:548
void * hwpole
Definition: hbox.h:550
char embname[16]
Definition: hbox.h:549
For using common case.
Definition: hbox.h:570
char path[256]
Definition: hbox.h:571
There are four kinds of image.
Definition: hbox.h:593
uchar pictype
Type of this object It is one of external/ole/embedded/drawing picture.
Definition: hbox.h:617
std::vector< unsigned char > follow
It's for the Drawing object.
Definition: hbox.h:630
hchar reserved[2]
Definition: hbox.h:594
bool ishyper
Definition: hbox.h:632
std::vector< std::unique_ptr< HWPPara > > caption
Definition: hbox.h:626
short num
Index of current Picture object.
Definition: hbox.h:611
char reserved3[9]
Definition: hbox.h:624
PicDef picinfo
Definition: hbox.h:623
uchar reserved1
Definition: hbox.h:603
short dummy2
Definition: hbox.h:602
short cap_pos
Position of caption.
Definition: hbox.h:607
Picture()
Definition: hbox.cxx:368
hunit scale[2]
Ratio of magnification or reduction.
Definition: hbox.h:622
hunit skip[2]
Definition: hbox.h:618
hchar dummy
Definition: hbox.h:595
short dummy1
Definition: hbox.h:601
uint follow_block_size
follow_block_size is the size information of the Drawing object of hwp.
Definition: hbox.h:600
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:399
virtual ~Picture() override
Definition: hbox.cxx:387
Definition: hbox.h:443
int getIndex(int pos)
Definition: hbox.h:489
size_t nTotal
Definition: hbox.h:446
void insert(int pos)
Definition: hbox.h:465
void AddRowsSize()
Definition: hbox.h:453
Rows()
Definition: hbox.h:447
std::unique_ptr< int[]> data
Definition: hbox.h:444
size_t nCount
Definition: hbox.h:445
Input page index in footer or header.
Definition: hbox.h:786
unsigned int m_nPageNumber
Definition: hbox.h:791
hchar dummy
Definition: hbox.h:796
unsigned short where
Location of page number to be inserted.
Definition: hbox.h:790
unsigned short shape
Shape of page number to be inserted.
Definition: hbox.h:795
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:738
Class for skipping data.
Definition: hbox.h:74
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:47
SkipData(hchar)
Definition: hbox.cxx:70
virtual ~SkipData() override
Definition: hbox.cxx:75
Definition: hbox.h:502
int nColumnIndex
Definition: hbox.h:503
Cell * pCell
Definition: hbox.h:507
int nRowSpan
Definition: hbox.h:506
int nColumnSpan
Definition: hbox.h:505
int nRowIndex
Definition: hbox.h:504
Tab object.
Definition: hbox.h:166
unsigned short leader
Definition: hbox.h:168
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:173
Tab()
Definition: hbox.cxx:302
hchar dummy
Definition: hbox.h:169
hunit width
Definition: hbox.h:167
Definition: hbox.h:511
std::vector< std::unique_ptr< TCell > > cells
Definition: hbox.h:516
Table()
Definition: hbox.h:512
Columns columns
Definition: hbox.h:512
Rows rows
Definition: hbox.h:515
TxtBox * box
Definition: hbox.h:517
The TocMark class is for making the content of a table.
Definition: hbox.h:879
hchar kind
Definition: hbox.h:880
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:839
hchar dummy
Definition: hbox.h:881
TocMark()
Definition: hwpread.cxx:831
The TxtBox class saves object properties about table, textbox, equalizer or button.
Definition: hbox.h:327
short dummy1
Definition: hbox.h:331
short nCell
nCell is greater than one only for table, otherwise it is 1.
Definition: hbox.h:353
std::vector< std::unique_ptr< HWPPara > > caption
Caption.
Definition: hbox.h:371
short protect
If value of protect is 1, size of cell can't change.
Definition: hbox.h:357
std::vector< plist_t > plists_t
Definition: hbox.h:365
plists_t plists
Definition: hbox.h:366
std::unique_ptr< Cell[]> cell
Definition: hbox.h:359
std::vector< std::unique_ptr< HWPPara > > plist_t
Paragraph list.
Definition: hbox.h:364
short cap_len
Definition: hbox.h:332
hchar dummy
Definition: hbox.h:329
virtual ~TxtBox() override
Definition: hbox.cxx:362
short cap_pos
caption position
Definition: hbox.h:339
Table * m_pTable
Definition: hbox.h:360
TxtBox()
Definition: hbox.cxx:342
short dummy2
Definition: hbox.h:334
short num
Definition: hbox.h:340
short next_box
Definition: hbox.h:333
short baseline
Definition: hbox.h:343
unsigned char reserved1
Definition: hbox.h:335
short dummy3
Definition: hbox.h:342
short type
The value of type indicates as the below: zero is table, one is textbox, two is equalizer and three i...
Definition: hbox.h:349
virtual bool Read(HWPFile &hwpf) override
Read properties from HIODevice object like stream, file, memory.
Definition: hwpread.cxx:217
hchar reserved[2]
Definition: hbox.h:328
Rectangle.
Definition: hwplib.h:73
Definition: hbox.h:575
PicDefEmbed picembed
Definition: hbox.h:577
PicDefOle picole
Definition: hbox.h:578
PicDefDraw picdraw
Definition: hbox.h:579
PicDefFile picfile
Definition: hbox.h:576
PicDefUnknown picun
Definition: hbox.h:580
size_t pos