hwpfilter/source/drawdef.h | 6 hwpfilter/source/formula.cxx | 2 hwpfilter/source/hbox.cxx | 34 ++-- hwpfilter/source/hbox.h | 30 ++-- hwpfilter/source/hcode.cxx | 66 ++++----- hwpfilter/source/hinfo.cxx | 56 ++++---- hwpfilter/source/hiodev.h | 4 hwpfilter/source/hpara.cxx | 4 hwpfilter/source/hpara.h | 14 +- hwpfilter/source/hwpeq.cxx | 44 +++--- hwpfilter/source/hwpfile.cxx | 2 hwpfilter/source/hwpread.cxx | 76 +++++------ hwpfilter/source/hwpreader.cxx | 279 ++++++++++++++++++++--------------------- 13 files changed, 308 insertions(+), 309 deletions(-)
New commits: commit 188208d93a5d95e1f5eb39294c5e467d6d53edef Author: Jihui Choi <[email protected]> Date: Mon Jun 22 12:56:10 2015 +0200 tdf#91067: Translate Korean comments Change-Id: Idbee9cb5a1745bb2cc3c4cb1238773da7ff2a0a3 Signed-off-by: Andrea Gelmini <[email protected]> diff --git a/hwpfilter/source/drawdef.h b/hwpfilter/source/drawdef.h index b80c18b..c6be198 100644 --- a/hwpfilter/source/drawdef.h +++ b/hwpfilter/source/drawdef.h @@ -119,9 +119,9 @@ struct RotationProperty */ struct HWPDOProperty { - int line_pstyle; /* ì ì¤ê° 모ì */ - int line_hstyle; /* ë íì´í 모ì */ - int line_tstyle; /* ìì 모ì */ + int line_pstyle; /* Style of the middle of line */ + int line_hstyle; /* Style of the end of line */ + int line_tstyle; /* Style of the start of line */ unsigned int line_color; hunit line_width; unsigned int fill_color; diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx index bb48aef..6478811 100644 --- a/hwpfilter/source/formula.cxx +++ b/hwpfilter/source/formula.cxx @@ -383,7 +383,7 @@ void Formula::makeDecoration(Node *res) else fprintf(stderr,"<math:munder>\n"); #else - /* accentë ì¸ì trueì´ê³ , ì¸ì , falseì¸ì§ ëª¨ë¥´ê² ë¤. */ + /* FIXME: no idea when 'accent' is true or false. */ if( isover ){ padd("accent","CDATA","true"); rstartEl("math:mover", rList); diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx index 4ef9cbf..c026ca4 100644 --- a/hwpfilter/source/hbox.cxx +++ b/hwpfilter/source/hbox.cxx @@ -451,7 +451,7 @@ Footnote::~Footnote() // auto number(18) // new number(19) // show page number (20) -// íì쪽ìì/ê°ì¶ê¸° (21) +// Start/Hide odd-numbered side (21) // mail merge(22) hchar_string MailMerge::GetString() @@ -597,9 +597,9 @@ static void getOutlineNumStr(int style, int level, int num, hchar * hstr) enum { OUTLINE_ON, OUTLINE_NUM }; -/* level ì 0ë¶í° ìì. ì¦ 1.1.1. ì ë 벨ì 2ì´ë¤. - numberë ê°ì´ ê·¸ëë¡ ë¤ì´ê° ìë¤. ì¦, 1.2.1ìë 1,2,1ì´ ë¤ì´ê° ìë¤. - style ì 1ë¶í° ê°ì´ ë¤ì´ê° ìë¤. hbox.hì ì ìë ë°ë¡.. +/* level starts from zero. ex) '1.1.1.' is the level 2. + number has the value. ex) '1.2.1' has '1,2,1' + style has the value which starts from 1 according to the definition in hbox.h */ hchar_string Outline::GetUnicode() const { @@ -658,17 +658,17 @@ hchar_string Outline::GetUnicode() const if( deco[i][0] ){ buffer[l++] = deco[i][0]; } -/* level ì 0ë¶í° ìì. ì¦ 1.1.1. ì ë 벨ì 2ì´ë¤. - numberë ê°ì´ ê·¸ëë¡ ë¤ì´ê° ìë¤. ì¦, 1.2.1ìë 1,2,1ì´ ë¤ì´ê° ìë¤. - style ì 1ë¶í° ê°ì´ ë¤ì´ê° ìë¤. hbox.hì ì ìë ë°ë¡.. +/* level starts from zero. ex) '1.1.1.' is the level 2. + number has the value. ex) '1.2.1' has '1,2,1' + style has the value which starts from 1 according to the definition in hbox.h */ switch( user_shape[i] ) { case 0: buffer[l++] = '1' + number[i] - 1; break; - case 1: /* ë문ìë¡ë§ */ - case 2: /* ì문ìë¡ë§ */ + case 1: /* Uppercase Roman */ + case 2: /* Lowercase Roman */ num2roman(number[i], dest); if( user_shape[i] == 1 ){ char *ptr = dest; @@ -693,22 +693,22 @@ hchar_string Outline::GetUnicode() const case 6: buffer[l++] = olHanglJaso(number[i] -1, OL_HANGL_JASO); break; - case 7: /* íì ì«ì : ì¼ë° ì«ìë¡ íí */ + case 7: /* Chinese numbers: the number represented by the general */ buffer[l++] = '1' + number[i] -1; break; - case 8: /* ìì«ì */ + case 8: /* Circled numbers */ buffer[l++] = 0x2e00 + number[i]; break; - case 9: /* ì ìíë²³ ì문ì */ + case 9: /* Circled lowercase alphabet */ buffer[l++] = 0x2c20 + number[i]; break; - case 10: /* ì ê°ëë¤ */ + case 10: /* Circled Korean Alphabet */ buffer[l++] = 0x2c50 + number[i] -1; break; - case 11: /* ì ã± ã´ */ + case 11: /* Circled Korean Characters */ buffer[l++] = 0x2c40 + number[i] -1; break; - case 12: /* ì´ì´ì§ ì«ì. */ + case 12: /* Sequenced numbers. */ { char cur_num_str[10],buf[80]; int j; @@ -742,7 +742,7 @@ hchar_string Outline::GetUnicode() const } -/* 묶ì ë¹ì¹¸(30) */ -/* ê³ ì í ë¹ì¹¸(31) */ +/* Bundle of spaces (30) */ +/* Fixed-width spaces (31) */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h index 4ceeb27..3bac8f5 100644 --- a/hwpfilter/source/hbox.h +++ b/hwpfilter/source/hbox.h @@ -82,9 +82,9 @@ struct SkipData: public HBox struct DateCode; struct FieldCode : public HBox { - uchar type[2]; /* 2/0 - ê³ì°ì, 3/0-문ììì½, 3/1-ê°ì¸ì ë³´, 3/2-ë§ë ë ì§, 4/0-ëë¦í */ + uchar type[2]; /* 2/0 - Formula, 3/0-document summary, 3/1 Personal Information, 3/2-creation date, 4/0-pressing mold */ char *reserved1; - unsigned short location_info; /* 0 - ëì½ë, 1 - ììì½ë */ + unsigned short location_info; /* 0 - End code, 1 - start code */ char *reserved2; hchar *str1; hchar *str2; @@ -198,7 +198,7 @@ enum struct CellLine { unsigned char key; - unsigned char top; // 0 - ë¼ì¸ìì, 1-single, 2-thick, 3-double + unsigned char top; // 0-No line, 1-single, 2-thick, 3-double unsigned char bottom; unsigned char left; unsigned char right; @@ -246,7 +246,7 @@ struct FBoxStyle /** * Kind of wrap */ - unsigned char txtflow; /* 그림í¼í¨. 0-2(ì리차ì§,í¬ëª ,ì´ì¸ë¦¼) */ + unsigned char txtflow; /* Avoid painting. 0-2 (seat occupied, transparency, harmony) */ /** * Horizontal alignment */ @@ -264,12 +264,12 @@ struct FBoxStyle /** * Index of floating object */ - short boxnum; /* ì¤íì¤í¼ì¤ìì ì¤íì¼ ì´ë¦ì¼ë¡ ì¬ì©ë ì«ì */ + short boxnum; /* Numbers used as style-name in Libre Office */ /** * Type of floating object : line, txtbox, image, table, equalizer and button */ unsigned char boxtype; // (L)ine, t(X)tbox, Picture - (G) - short cap_len; /* 캡ì ì ê¸¸ì´ */ + short cap_len; /* The length of the caption */ void *cell; @@ -307,8 +307,8 @@ struct FBox: public HBox char xpos_type, ypos_type; unsigned char smart_linesp; -/* ì´ ìë£ë tboxë picììë íì¼ì 기ë¡íì§ ìê³ ì¤íìë§ ìì¼ë©°, - lineììë íì¼ì 기ë¡íë¤. +/* In tbox or pic, this data exists in memory when running, isn't written to a file. + But in line, it will be written to a file. */ short boundsy, boundey; unsigned char boundx, draw; @@ -539,7 +539,7 @@ struct Table TxtBox *box; }; -/* picture (11) 그림, OLE그림, ì½ì 그림, 그리기 */ +/* picture (11) graphics, OLE graphics, inserted graphics, drawing */ enum pictype { PICTYPE_FILE, PICTYPE_OLE, PICTYPE_EMBED, @@ -617,7 +617,7 @@ struct Picture: public FBox * follow_block_size is the size information of the Drawing object of hwp. * It's value is greater than 0 if the pictype is PICTYPE_DRAW. */ - uint follow_block_size; /* ì¶ê°ì ë³´ 길ì´. */ + uint follow_block_size; /* Additional information length. */ short dummy1; // to not change structure size */ short dummy2; // to not change structure size */ uchar reserved1; @@ -647,7 +647,7 @@ struct Picture: public FBox /** * It's for the Drawing object */ - unsigned char *follow; /* ê·¸ë¦¼ì¢ ë¥ê° drawingì¼ë, ì¶ê°ì ë³´. */ + unsigned char *follow; /* When the type of image is drawing, gives additional information. */ bool ishyper; @@ -821,7 +821,7 @@ struct ShowPageNum: public HBox virtual bool Read(HWPFile &hwpf) SAL_OVERRIDE; }; -/* íì쪽ìì (21) */ +/* Start odd side (21) */ /** * Controls the display of page number, header, footer and border. */ @@ -987,7 +987,7 @@ class Outline: public HBox /** * decoration character for the level type */ - hchar deco[MAX_OUTLINE_LEVEL][2]; /* ì¬ì©ì ì ìì ìë¤ ë¬¸ì */ + hchar deco[MAX_OUTLINE_LEVEL][2]; /* Prefix/postfix for Customize */ hchar dummy; Outline(); @@ -996,7 +996,7 @@ class Outline: public HBox hchar_string GetUnicode() const; }; -/* 묶ì ë¹ì¹¸(30) */ +/* Bundle of spaces (30) */ /** * The Special space to be treated non-space when a string is * cut at the end of line @@ -1011,7 +1011,7 @@ struct KeepSpace: public HBox virtual bool Read(HWPFile &hwpf) SAL_OVERRIDE; }; -/* ê³ ì í ë¹ì¹¸(31) */ +/* Fixed-width spaces (31) */ /** * @short Space with always same width not relation with fonts. */ diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx index e015052..700b2db 100644 --- a/hwpfilter/source/hcode.cxx +++ b/hwpfilter/source/hcode.cxx @@ -522,7 +522,7 @@ static hchar cdkssm2ks_han(hchar kssm) unsigned int index; unsigned char lo, hi; -/* "í" */ +/* "One" */ if (kssm == 0xd3c5) return 0xc7d1; @@ -584,7 +584,7 @@ static const hchar choseong_to_unicode[] = 0x110e, 0x110f, 0x1110, 0x1111, 0x1112, 0x1120, 0x1121, 0x1127, 0x112b, 0x112d, 0x112f, 0x1132, 0x1136, 0x1140, 0x114c, 0x1158 }; -/* ì¤ì±ì´ 0ê³¼ 1ì¸ ê³³ìë ë¤ë¥¸ ì½ëë¤ì´ ë¤ì´ê° ìë¤. ì´ë¶ë¶ì ëí ë²ì¹ì ë½ìë¼. */ +/* There are some other codes where the medial sound is 0 or 1. It needs to extract the rules in those area */ static const hchar joongseong_to_unicode[] = { 0, 0, 0, 0x1161, 0x1162, 0x1163, 0x1164, 0x1165, @@ -601,12 +601,12 @@ static const hchar jongseong_to_unicode[] = 0x11bd, 0x11be, 0x11bf, 0x11c0, 0x11c1, 0x11c2, 0x11eb, 0x11f0 }; -/* ì¤ì±ì´ 0ê³¼ 1ì¸ê³³ */ -/* ì²ì 32ê°ë ì모, ëë¨¸ì§ 32ê°ë ì¡°í©ì¼ë¡ 구ì±. - * 0x8000 ~ 0xa413ê¹ì§ 32ê° ëì¤ê³ , 0x0400ëí 0x8400ìì ë¤ì 32ê° ëì¤ë ìì¼ë¡ ì§íëë¤. - * ì모ììì ì¼ë° í ì´ë¸ë¡ ë머ì§ë 구조체 매íí ì´ë¸ë¡ ë§ë ë¤. - */ -/* 308ê°.. 1152ê°ìì 308ê°ë¥¼ ì ì¸í ëë¨¸ì§ 844ê°ë ì모조í©ì´ë¤. */ +/* The medial sound is 0 or 1 + * first 32 are consonants and vowels and the other 32 is combinations of alphabets + * (0x8000 ~ 0xa413) are the first 32. the other 32 start from 0x8400 + * consonants and vowels area is made as a general table and the rest are made of a sructure mapping table + * + * 844, except for the remaining 1152-308 is a combination of consonants and vowels. */ static const hchar jamo_to_unicode[] = { 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138, @@ -665,7 +665,7 @@ struct JamoComp{ hchar v2; hchar v3; }; -/* 704 + 12 = 706 ê° */ +/* 704 + 12 = 706 */ static const JamoComp jamocomp1_to_unicode[] = { {3, 0x1100, 0x1161, 0x11e7}, {3, 0x1100, 0x1161, 0x3167}, @@ -788,7 +788,7 @@ static const JamoComp jamocomp1_to_unicode[] = {3, 0x1105, 0x119e, 0x11d7}, {3, 0x1105, 0x119e, 0x11dc}, {3, 0x1105, 0x119e, 0x11dd}, {2, 0x1105, 0x1176, 0x0000}, -/* -- ì¬ê¸°ë¶í° ì«ì ìë°ê¿ ì¦, 3ì 2ë¡ ë°ê¾¸ì´ 주ì´ì¼ í¨. */ +/* From here, numbers are not changed. So must change 3 to 2 manually. */ {2, 0x1105, 0x1178, 0x0000}, {2, 0x1105, 0x117a, 0x0000}, {2, 0x1105, 0x117b, 0x0000}, {2, 0x1105, 0x1186, 0x0000}, {2, 0x1105, 0x1187, 0x0000}, {2, 0x1105, 0x118c, 0x0000}, @@ -913,13 +913,13 @@ int hcharconv(hchar ch, hchar *dest, int codeType) dest[0] = ch; return 1; } - /* íìë 0x4000ë¶í° 4888ê°ì§ì ê°ì ê°ì§ë¤. */ + /* Chinese characters have a value of 4888 kinds from 0x4000. */ else if (IsHanja(ch)) { unsigned int index; unsigned char hi; - /* 4888ì´ì¸ì ìë ìëíê¸ìì ì ìí íì¥íìì´ë¤. ì´ê²ì ëí´ìë - ì ëì½ëë ìì±íì½ëë¡ì ë³íì ìí 매íí ì´ë¸ì´ ìë ì¤ì ì´ë¤. + /*Out of 4888 kinds are Chinese characters which are defined by Hangul Word Processor. For this + there is no mapping table to convert to Unicode or completion code(KSC5601-87, EUC-KR) */ if ((index = ch - 0x4000) >= 4888) { @@ -931,8 +931,8 @@ int hcharconv(hchar ch, hchar *dest, int codeType) } if (codeType == KS) { - /* íìì½ëë ììì½ëì íìì½ëë¡ ëëì´ì§ë©° íìì½ëë 0xA1 - 0xFE ê¹ì§ì ê°ì ê°ì§ë¤. - ì¦ íìì½ëì ì¬ììë ê°ì§ìë 0xFE - 0xA1 +1 ê°ì§ìì´ë¤. + /* Chinese code is divided into the upper cord and lower cord. Lower code has the value from 0xA1 up to 0xFE. + In other words, the number of lower code is the number of (0xFE - 0xA1) +1 */ hi = sal::static_int_cast<unsigned char>(index / (0xFE - 0xA1 + 1) + 0xCA); lo = sal::static_int_cast<unsigned char>(index % (0xFE - 0xA1 + 1) + 0xA1); @@ -995,9 +995,9 @@ int hcharconv(hchar ch, hchar *dest, int codeType) dest[0] = ch; return 1 ; } -/** - * í¹ì문ì ì½ë - * ìëíê¸ììë 0x3400ë¶í° í¹ì문ìê° ììëë¤. ì¡°í©íì 0xA1A0 +/* + * Special characters code + * In Hangul Word Processor, special characters begins from 0x3400. Combinations are from 0xA1A0 */ else { @@ -1012,7 +1012,7 @@ int hcharconv(hchar ch, hchar *dest, int codeType) dest[0] = ch; return 1; } - /* íê¸ê³¼ì»´í¨í° : 0x37c0 ~ 0x37c5 */ + /* Hangul and Computer: 0x37c0 ~ 0x37c5 */ if( ch2 >= 0x37c0 && ch2 <= 0x37c5 ){ if( ch2 == 0x37c0 ) dest[0] = 0xd55c; else if( ch2 == 0x37c1 ) dest[0] = 0xae00; @@ -1058,7 +1058,7 @@ int hcharconv(hchar ch, hchar *dest, int codeType) } } -/* íê¸ì¼ ê²½ì°. */ +/* If it's Korean(Hangul). */ int kssm_hangul_to_ucs2(hchar ch, hchar *dest) { hchar choseong, joongseong, jongseong; @@ -1069,13 +1069,13 @@ int kssm_hangul_to_ucs2(hchar ch, hchar *dest) //printf("kssm_hangul_to_ucs2 : [%d,%d,%d]\n", choseong,joongseong,jongseong); - if( joongseong < 2 ){ /* ì¡°í©ëì§ ìì ìì ì¤ì±=0,1 */ - if( joongseong == 0 && ch < 0xa414 ){ /* ê³ ì´í¬í¨ ì모 */ + if( joongseong < 2 ){ /* Not combined area, medial sound = 0,1 */ + if( joongseong == 0 && ch < 0xa414 ){ /* consonants and vowels includes old characters */ int index = choseong * 32 + jongseong; dest[0] = jamo_to_unicode[index]; return 1; } - else{ /* ê³ ì´í¬í¨ ìëª¨ì¡°í© : í ì´ë¸ 미ìì± */ + else{ /* combination of consonants and vowels includes old characters: an unfinished table */ unsigned int index = choseong * 32 + jongseong - 308; if( index < SAL_N_ELEMENTS(jamocomp1_to_unicode) ){ dest[0] = jamocomp1_to_unicode[index].v1; @@ -1087,11 +1087,11 @@ int kssm_hangul_to_ucs2(hchar ch, hchar *dest) return 1; } } - else if ( choseong == 1 && jongseong == 1 ){ /* 모ì */ + else if ( choseong == 1 && jongseong == 1 ){ /* Vowel */ dest[0] = joongseong_to_unicode[joongseong]; return 1; } - else if ( joongseong == 2 && jongseong == 1 ){ /* ìì */ + else if ( joongseong == 2 && jongseong == 1 ){ /* Consonant */ dest[0] = choseong_to_unicode[choseong]; return 1; } @@ -1100,8 +1100,8 @@ int kssm_hangul_to_ucs2(hchar ch, hchar *dest) joongseong == 25 || joongseong > 29 || jongseong == 0 || jongseong == 18 || jongseong > 29 || - choseong == 1 || joongseong == 2 /* ìì±ëì§ ìì íê¸ */ - ) { /* ê³ ì´ */ + choseong == 1 || joongseong == 2 /* Incomplete Hangul */ + ) { /* Gore */ int count = 0; if( choseong != 1 ){ dest[count] = choseong_to_unicode[choseong]; @@ -1181,7 +1181,7 @@ hchar_string hstr2ucsstr(hchar const* hstr) } /** - * íì»´ì¤í¸ë§ì ìì±íì¤í¸ë§ì¼ë¡ ë³ííë¤ + * Convert 'Hangul and Computer' strings to the completion code(KSC5601-87) */ ::std::string hstr2ksstr(hchar const* hstr) { @@ -1211,8 +1211,8 @@ hchar_string hstr2ucsstr(hchar const* hstr) /* - * íê¸ìì ì문ì¸ì 문ìê¹ì§ í¬í¨í ì ìë kcharíì ì 문ìì´ì - * íê¸ìì ì¬ì©íë hcharíì ì 문ìì´ë¡ ë³ííë¤. + * Convert strings of kchar type, which can contain Korean, English and others + * to strings of hchar type of Hangul Word Processor */ hchar_string kstr2hstr(unsigned char const* src) { @@ -1243,7 +1243,7 @@ char* Int2Str(int value, const char *format, char *buf) } -/* colorì¸ë±ì¤ ê°ê³¼ ììê°ì ì¡°í©íì¬ ì¤íì¤í¼ì¤ì colorë¡ ë³í */ +/* Convert a combination of a color index value and a shade value to the color value of LibreOffice */ char *hcolor2str(uchar color, uchar shade, char *buf, bool bIsChar) { unsigned short red,green,blue; @@ -1451,11 +1451,11 @@ double calcAngle(int x1, int y1, int x2, int y2) } double angle; angle = (180 / PI) * atan( ( y2 - y1 ) * 1.0 / ( x2 - x1 )); - if( y2 >= y1 ){ /* 1,2ì¬ë¶ë©´ */ + if( y2 >= y1 ){ /* 1, 2 quadrant */ if( angle < 0. ) angle += 180.; } - else{ /* 3, 4 ì¬ë¶ë©´ */ + else{ /* 3, 4 quadrants */ if( angle > 0 ) angle += 180.; else diff --git a/hwpfilter/source/hinfo.cxx b/hwpfilter/source/hinfo.cxx index 96de6d7..0c158ad 100644 --- a/hwpfilter/source/hinfo.cxx +++ b/hwpfilter/source/hinfo.cxx @@ -72,61 +72,61 @@ HWPInfo::~HWPInfo() /** - * 문ìì 보를 ì½ì´ë¤ì´ë í¨ì ( 128 bytes ) - * 문ìì ë³´ë íì¼ì¸ìì ë³´( 30 bytes ) ë¤ìì ìì¹í ì ë³´ì´ë¤. + * Function for reading document information (128 bytes) + * Document information is the information after the file identification information (30 bytes). */ bool HWPInfo::Read(HWPFile & hwpf) { - hwpf.Read2b(&cur_col, 1); /* 문ì를 ì ì¥í ë¹ìì 커ìê° ìì¹í 문ë¨ë²í¸ */ - hwpf.Read2b(&cur_row, 1); /* ë¬¸ë¨ ì¹¸ */ + hwpf.Read2b(&cur_col, 1); /* When a document is saving, the paragraph number where the coursor is */ + hwpf.Read2b(&cur_row, 1); /* Paragraphs rows */ - hwpf.Read1b(&paper.paper_kind, 1); /* ì©ì§ ì¢ ë¥ */ - hwpf.Read1b(&paper.paper_direction, 1); /* ì©ì§ ë°©í¥ */ + hwpf.Read1b(&paper.paper_kind, 1); /* Paper Type */ + hwpf.Read1b(&paper.paper_direction, 1); /* Paper orientation */ // paper geometry information unsigned short tmp16; if (!hwpf.Read2b(tmp16)) return false; - paper.paper_height = tmp16; /* ì©ì§ ê¸¸ì´ */ + paper.paper_height = tmp16; /* Paper length */ if (!hwpf.Read2b(tmp16)) return false; - paper.paper_width = tmp16; /* ì©ì§ ëë¹ */ + paper.paper_width = tmp16; /* Sheet width */ if (!hwpf.Read2b(tmp16)) return false; - paper.top_margin = tmp16; /* ì쪽 ì¬ë°± */ + paper.top_margin = tmp16; /* Top margin */ if (!hwpf.Read2b(tmp16)) return false; - paper.bottom_margin = tmp16; /* ìë쪽 ì¬ë°± */ + paper.bottom_margin = tmp16; /* The bottom margin */ if (!hwpf.Read2b(tmp16)) return false; - paper.left_margin = tmp16; /* ì¼ìª½ ì¬ë°± */ + paper.left_margin = tmp16; /* Left Margin */ if (!hwpf.Read2b(tmp16)) return false; - paper.right_margin = tmp16; /* ì¤ë¥¸ìª½ ì¬ë°± */ + paper.right_margin = tmp16; /* Right margins */ if (!hwpf.Read2b(tmp16)) return false; - paper.header_length = tmp16; /* ë¨¸ë¦¬ë§ ê¸¸ì´ */ + paper.header_length = tmp16; /* Header length */ if (!hwpf.Read2b(tmp16)) return false; - paper.footer_length = tmp16; /* ê¼¬ë¦¬ë§ ê¸¸ì´ */ + paper.footer_length = tmp16; /* Footer length */ if (!hwpf.Read2b(tmp16)) return false; - paper.gutter_length = tmp16; /* ì 본ì¬ë°± */ - hwpf.Read2b(&readonly, 1); /* ìì½ */ - hwpf.Read1b(reserved1, 4); /* ìì½ */ - hwpf.Read1b(&chain_info.chain_page_no, 1); /* 쪽 ë²í¸ ì°ê²° 1-ì°ê²°, 0-ìë¡ìì (ì°ê²°ì¸ììì ì¬ì©) */ - hwpf.Read1b(&chain_info.chain_footnote_no, 1);/* ê°ì£¼ë²í¸ ì°ê²° 1-ì°ê²° 0-ìë¡ìì */ - /* ì°ê²°ì¸ìí íì¼ì ì´ë¦ */ + paper.gutter_length = tmp16; /* The binding margin */ + hwpf.Read2b(&readonly, 1); /* Reserve */ + hwpf.Read1b(reserved1, 4); /* Reserve */ + hwpf.Read1b(&chain_info.chain_page_no, 1); /* Connect page number: 1-Connect, 0-newly started (used in connection printing) */ + hwpf.Read1b(&chain_info.chain_footnote_no, 1);/* Connect footnote number: 1-connect, 0-newly started*/ + /* the file name to be printed with connection */ hwpf.Read1b(chain_info.chain_filename, CHAIN_MAX_PATH); - hwpf.Read1b(annotation, ANNOTATION_LEN); /* ë§ë¶ì´ë ë§ ( íì¼ ì ì¥í ë ë§ë¶ì´ë ë§ì ì§ì í ë´ì© ) */ - hwpf.Read2b(&encrypted, 1); /* ìí¸ ì¬ë¶ 0-ë³´íµíì¼, ê·¸ì¸-ìí¸ê±¸ë¦° íì¼ */ -//hwpf.Read1b(reserved2, 6); /* ìë 3ê°ìê°ì¼ë¡ ë°ëìë¤. */ - hwpf.Read2b(&beginpagenum,1); /* íì´ì§ììë²í¸ */ + hwpf.Read1b(annotation, ANNOTATION_LEN); /* Annotation (additional information when a file is saving.) */ + hwpf.Read2b(&encrypted, 1); /* encrypt: 0-normal file(without password), 1-protected by password */ +//hwpf.Read1b(reserved2, 6); /* it turned into below three values. */ + hwpf.Read2b(&beginpagenum,1); /* Page starting number */ // footnote - hwpf.Read2b(&beginfnnum,1); /* ê°ì£¼ ììë²í¸ */ - hwpf.Read2b(&countfn,1); /* ê°ì£¼ ê°¯ì */ + hwpf.Read2b(&beginfnnum,1); /* Footnote start number */ + hwpf.Read2b(&countfn,1); /* Number of footnote */ if (!hwpf.Read2b(tmp16)) return false; @@ -158,7 +158,7 @@ bool HWPInfo::Read(HWPFile & hwpf) if (hwpf.State()) return false; -/* 문ì ìì½ì ì½ëë¤. */ +/* Read the article summary. */ if (!summary.Read(hwpf)) return false; if (info_block_len > 0) @@ -169,7 +169,7 @@ bool HWPInfo::Read(HWPFile & hwpf) return false; } -/* hwpfì ê°ì ì¬ì¤ì íë¤. */ +/* reset the value of hwpf. */ hwpf.compressed = compressed != 0; hwpf.encrypted = encrypted != 0; hwpf.info_block_len = info_block_len; diff --git a/hwpfilter/source/hiodev.h b/hwpfilter/source/hiodev.h index 967be20..aac99c9 100644 --- a/hwpfilter/source/hiodev.h +++ b/hwpfilter/source/hiodev.h @@ -67,7 +67,7 @@ class DLLEXPORT HIODev struct gz_stream; -/* íì¼ ì ì¶ë ¥ ì¥ì¹ */ +/* File input and output devices */ /** * This controls the HStream given by constructor @@ -134,7 +134,7 @@ class HStreamIODev : public HIODev virtual void init() SAL_OVERRIDE; }; -/* ë©ëª¨ë¦¬ ì ì¶ë ¥ ì¥ì¹ */ +/* Memory, input and output devices */ /** * The HMemIODev class controls the Input/Output device. * @short Memory IO device diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx index e26fb6f..e7febc4 100644 --- a/hwpfilter/source/hpara.cxx +++ b/hwpfilter/source/hpara.cxx @@ -118,12 +118,12 @@ bool HWPPara::Read(HWPFile & hwpf, unsigned char flag) hwpf.Read1b(&pstyno, 1); -/* Paragraph ëí ê¸ì */ +/* Paragraph representative character */ cshape.Read(hwpf); if (nch > 0) hwpf.AddCharShape(&cshape); -/* Paragraph ë¬¸ë¨ ëª¨ì */ +/* Paragraph paragraphs shape */ if (nch && !reuse_shape) { pshape.Read(hwpf); diff --git a/hwpfilter/source/hpara.h b/hwpfilter/source/hpara.h index 7a6c5e3..193dcce 100644 --- a/hwpfilter/source/hpara.h +++ b/hwpfilter/source/hpara.h @@ -53,7 +53,7 @@ class HWPPara; struct LineInfo { -/* ììíë ê¸ìì ìì¹ : ì½í¸ë¡¤ì ì¬ë¬ 길ì´ë¥¼ ê°ì§ë¤ */ +/* the position of the starting character: the control has a different length */ /** * Starting character position */ @@ -84,7 +84,7 @@ class DLLEXPORT HWPPara /** * Zero is for the new paragraph style. */ - unsigned char reuse_shape; /* 0ì´ë©´ ì모ì */ + unsigned char reuse_shape; /* the new shape if 0 */ unsigned short nch; unsigned short nline; @@ -95,16 +95,16 @@ class DLLEXPORT HWPPara /** * If the value is 0, all character of paragraph have same style given cshape */ - unsigned char contain_cshape; /* 0ì´ë©´ 모ë ê¸ìê° ëí ê¸ì 모ì */ + unsigned char contain_cshape; /* if it's 0, all the characters are representing with representative shape */ unsigned char etcflag; /** * Checks the special characters in the paragraph */ unsigned long ctrlflag; unsigned char pstyno; - CharShape cshape; /* ê¸ìê° ëª¨ë ê°ì 모ìì¼ë */ - ParaShape pshape; /* reuse flagê° 0ì´ë©´ */ - int pno; /* run-time only */ + CharShape cshape; /* When characters are all the same shape */ + ParaShape pshape; /* if reuse flag is 0, */ + int pno; /* then run-time only */ LineInfo *linfo; CharShape *cshapep; @@ -120,7 +120,7 @@ class DLLEXPORT HWPPara void SetNext(HWPPara *n) { _next = n; }; -/* layoutì ìí í¨ì */ +/* Functions for layout */ /** * Returns the character style of paragraph. */ diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx index a897abe..393a6db 100644 --- a/hwpfilter/source/hwpeq.cxx +++ b/hwpfilter/source/hwpeq.cxx @@ -32,7 +32,7 @@ using namespace std; #include <sal/types.h> #include <sal/macros.h> -/* @Man: hwpììì LaTeXì¼ë¡ ë°ê¾¸ê¸° */ +/* @Man: change the hwp formula to LaTeX */ #ifdef WIN32 # define ENDL "\r\n" #else /* !WIN32 */ @@ -125,7 +125,7 @@ static const hwpeq eq_tbl[] = { { "bullet", NULL, 0, 0 }, { "cap", NULL, 0, 0 }, { "cases", NULL, 0, EQ_ENV }, - { "ccol", NULL, 0, 0 }, /* ì¸ë¡ë¡ ê°ì´ë° */ + { "ccol", NULL, 0, 0 }, /* Center vertically */ { "cdot", NULL, 0, 0 }, { "cdots", NULL, 0, 0 }, { "check", NULL, 1, 0 }, @@ -401,7 +401,7 @@ static const hwpeq *lookup_eqn(char *str) return result; } -/* 첫ìë§ ë문ìì´ê±°ë ì ë¶ ë문ìë©´ ì문ìë¡ ë°ê¾¼ë¤. */ +/* If only the first character is uppercase or all characters are uppercase, change to lowercase */ void make_keyword( char *keyword, const char *token) { char* ptr; @@ -469,10 +469,10 @@ void push_token(MzString &white, MzString &token, istream *strm) } /* - ì½ì í í°ì 길ì´ë¥¼ ë°ííë¤. -*/ -/* control char, control sequence, binary sequence, - alphabet string, sigle character */ + * It returns the length of the read tokens. + * + * control char, control sequence, binary sequence, + * alphabet string, sigle character */ static int next_token(MzString &white, MzString &token, istream *strm) { int ch = 0; @@ -506,8 +506,8 @@ static int next_token(MzString &white, MzString &token, istream *strm) ch = strm->get(); } while( ch != EOF && (ch & 0x80 || isalpha(ch)) ) ; strm->putback(sal::static_int_cast<char>(ch)); - /* sub, sub, over, atop í¹ì ì²ë¦¬ - ê·¸ ì´ì ë next_state()ì ìí¥ì 미ì¹ê¸° ë문ì´ë¤. + /* special treatment of sub, sub, over, atop + The reason for this is that affect next_state(). */ if( !STRICMP("sub", token) || !STRICMP("from", token) || !STRICMP("sup", token) || !STRICMP("to", token) || @@ -558,18 +558,18 @@ static int read_white_space(MzString& outs, istream *strm) return result; } -/* ì¸ìê° íìíì§ ìì ê²½ì° ê° í목ê°ì 구ë¶ì spaceì brace - sqrt {ab}c = sqrt{ab} c - (, }ë grouping - ^, _ ë ìë¤ë¡ ê²°í©íë¤. - - sqrt ë±ê³¼ ê°ì´ ì¸ìê° ìë íì ì 리 - sqrt a -> sqrt{a} - sqrt {a} -> sqrt{a} - 1 ì´ìì ì¸ìê° ìë ê²½ì° ì¸ìë¤ê°ì ìë°±ì ìì¤ë¤. - \frac a b -> frac{a}{b} - overì íì ì 리 - a over b -> {a}over{b} +/* If the argument is not required, delimiters are space and brace for each items. + sqrt {ab} c = sqrt {ab} c + (,} are for grouping + ^ ,_ are for combination + + Sorting of formats with arguments, such as sqrt + sqrt a -> sqrt {a} + sqrt {a} -> sqrt {a} + If there is more than one argument, it eliminates backslash between arguments. + \frac a b -> frac {a} {b} + Clean the form of over + a over b -> {a} over {b} */ static int eq_word(MzString& outs, istream *strm, int status) @@ -599,7 +599,7 @@ static int eq_word(MzString& outs, istream *strm, int status) state << white << token; } else { - /* ì ìì ì¸ token */ + /* Normal token */ int script_status = SCRIPT_NONE; while( true ) { state << white << token; diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index d4457a5..6f6ea75 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -389,7 +389,7 @@ ColumnDef *HWPFile::GetColumnDef(int num) else return 0; } -/* @return ì¸ë±ì¤ë 1ë¶í° ììíë¤. */ +/* Index of @return starts from 1 */ int HWPFile::GetPageMasterNum(int page) { std::list<ColumnInfo*>::iterator it = columnlist.begin(); diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx index ca8e3ea..55e2068 100644 --- a/hwpfilter/source/hwpread.cxx +++ b/hwpfilter/source/hwpread.cxx @@ -63,10 +63,10 @@ bool FieldCode::Read(HWPFile & hwpf) { uint size; hchar dummy; - uint len1; /* hcharíì ì 문ìì´ í ì´í° #1ì ê¸¸ì´ */ - uint len2; /* hcharíì ì 문ìì´ í ì´í° #2ì ê¸¸ì´ */ - uint len3; /* hcharíì ì 문ìì´ í ì´í° #3ì ê¸¸ì´ */ - uint binlen; /* ìì íìì ë°ì´ë리 ë°ì´í ê¸¸ì´ */ + uint len1; /* Length of hchar type string DATA #1 */ + uint len2; /* Length of hchar type string DATA #2 */ + uint len3; /* Length of hchar type string DATA #3 */ + uint binlen; /* Length of any binary data format */ hwpf.Read4b(&size, 1); hwpf.Read2b(&dummy, 1); @@ -100,7 +100,7 @@ bool FieldCode::Read(HWPFile & hwpf) hwpf.ReadBlock(bin, binlen); - if( type[0] == 3 && type[1] == 2 ){ /* ë§ë ë ì§ë¡ì í¬ë§·ì ìì±í´ì¼ íë¤. */ + if( type[0] == 3 && type[1] == 2 ){ /* It must create a format as created date. */ DateCode *pDate = new DateCode; for (int i = 0 ; i < static_cast<int>(len3_); i++) { if(str3[i] == 0 ) break; @@ -377,55 +377,55 @@ bool Picture::Read(HWPFile & hwpf) hwpf.AddBox(this); hwpf.Read4b(&follow_block_size, 1); - hwpf.Read2b(&dummy1, 1); /* ìì½ 4ë°ì´í¸ */ + hwpf.Read2b(&dummy1, 1); /* Reserved 4 bytes */ hwpf.Read2b(&dummy2, 1); style.boxnum = fboxnum++; zorder = zindex++; - hwpf.Read1b(&style.anchor_type, 1); /* 기ì¤ìì¹ */ - hwpf.Read1b(&style.txtflow, 1); /* 그림í¼í¨. 0-2(ì리차ì§,í¬ëª ,ì´ì¸ë¦¼) */ - hwpf.Read2b(&style.xpos, 1); /* ê°ë¡ìì¹ : 1 ì¼ìª½, 2ì¤ë¥¸ìª½, 3 ê°ì´ë°, ì´ì¸ = ìì */ - hwpf.Read2b(&style.ypos, 1); /* ì¸ë¡ìì¹ : 1 ì, 2 ìë, 3 ê°ì´ë°, ì´ì¸ ìì */ - hwpf.Read2b(&option, 1); /* 기íìµì : í ë리,그림ë°ì ,ë±. bitë¡ ì ì¥. */ - hwpf.Read2b(&ctrl_ch, 1); /* íì 11 */ - hwpf.Read2b(style.margin, 12); /* ì¬ë°± : [0-2][] out/in/ì ,[][0-3] ì¼/ì¤ë¥¸/ì/ìë ì¬ë°± */ - hwpf.Read2b(&box_xs, 1); /* ë°ì¤í¬ê¸° ê°ë¡ */ - hwpf.Read2b(&box_ys, 1); /* ì¸ë¡ */ - hwpf.Read2b(&cap_xs, 1); /* 캡ì í¬ê¸° ê°ë¡ */ - hwpf.Read2b(&cap_ys, 1); /* ì¸ë¡ */ - hwpf.Read2b(&style.cap_len, 1); /* ê¸¸ì´ */ - hwpf.Read2b(&xs, 1); /* ì ì²´ í¬ê¸°(ë°ì¤ í¬ê¸° + 캡ì + ì¬ë°±) ê°ë¡ */ - hwpf.Read2b(&ys, 1); /* ì¸ë¡ */ - hwpf.Read2b(&cap_margin, 1); /* 캡ì ì¬ë°± */ + hwpf.Read1b(&style.anchor_type, 1); /* Reference position */ + hwpf.Read1b(&style.txtflow, 1); /* Avoid painting. 0-2 (seat occupied, transparency, harmony) */ + hwpf.Read2b(&style.xpos, 1); /* Horizontal position: 1=left, 2=right, 3=center, and others=any */ + hwpf.Read2b(&style.ypos, 1); /* Vertical position: 1=top, 2=down, 3=middle, and others=any */ + hwpf.Read2b(&option, 1); /* Other options: Borders, reverse picture, and so on. Save as bit. */ + hwpf.Read2b(&ctrl_ch, 1); /* Always 11 */ + hwpf.Read2b(style.margin, 12); /* Margin: [0-2] [] out / in / cell, [], [0-3] left / right / top / bottom margins */ + hwpf.Read2b(&box_xs, 1); /* Box Size Width */ + hwpf.Read2b(&box_ys, 1); /* Vertical */ + hwpf.Read2b(&cap_xs, 1); /* Caption Size Width */ + hwpf.Read2b(&cap_ys, 1); /* Vertical */ + hwpf.Read2b(&style.cap_len, 1); /* Length */ + hwpf.Read2b(&xs, 1); /* The total size (box size + caption + margin) Horizontal */ + hwpf.Read2b(&ys, 1); /* Vertical */ + hwpf.Read2b(&cap_margin, 1); /* Caption margins */ hwpf.Read1b(&xpos_type, 1); hwpf.Read1b(&ypos_type, 1); - hwpf.Read1b(&smart_linesp, 1); /* ì¤ê°ê²© ë³´í¸ : 0 미보í¸, 1 ë³´í¸ */ + hwpf.Read1b(&smart_linesp, 1); /* Line Spacing protection: 0 unprotected 1 protected */ hwpf.Read1b(&reserved1, 1); - hwpf.Read2b(&pgx, 1); /* ì¤ì ê³ì°ë ë°ì¤ ê°ë¡ */ - hwpf.Read2b(&pgy, 1); /* ì¸ë¡ */ - hwpf.Read2b(&pgno, 1); /* íì´ì§ ì«ì : 0ë¶í° ìì */ - hwpf.Read2b(&showpg, 1); /* ë°ì¤ë³´ì¬ì¤ */ - hwpf.Read2b(&cap_pos, 1); /* 캡ì ìì¹ 0 - 7 ë©ë´ìì. */ - hwpf.Read2b(&num, 1); /* ë°ì¤ë²í¸ 0ë¶í° ììí´ì 매긴ì¼ë ¨ë²í¸ */ + hwpf.Read2b(&pgx, 1); /* Real Calculated box width */ + hwpf.Read2b(&pgy, 1); /* Height */ + hwpf.Read2b(&pgno, 1); /* Page number: starts from 0 */ + hwpf.Read2b(&showpg, 1); /* Show the Box */ + hwpf.Read2b(&cap_pos, 1); /* Caption positions 0-7 Menu Order. */ + hwpf.Read2b(&num, 1); /* Box number, serial number which starts from 0 */ - hwpf.Read1b(&pictype, 1); /* ê·¸ë¦¼ì¢ ë¥ */ + hwpf.Read1b(&pictype, 1); /* Picture type */ unsigned short tmp16; - if (!hwpf.Read2b(tmp16)) /* 그림ìì ì¤ì íì를 ììí ìì¹ ê°ë¡ */ + if (!hwpf.Read2b(tmp16)) /* the real horizontal starting point where shows the picture */ return false; skip[0] = tmp16; - if (!hwpf.Read2b(tmp16)) /* ì¸ë¡ */ + if (!hwpf.Read2b(tmp16)) /* Vertical */ return false; skip[1] = tmp16; - if (!hwpf.Read2b(tmp16)) /* íëë¹ì¨ : 0 ê³ ì , ì´ì¸ í¼ì¼í¸ ë¨ì ê°ë¡ */ + if (!hwpf.Read2b(tmp16)) /* Zoom Ratio: 0:fixed, others are percentage for horizontal */ return false; scale[0] = tmp16; - if (!hwpf.Read2b(tmp16)) /* ì¸ë¡ */ + if (!hwpf.Read2b(tmp16)) /* Vertical */ return false; scale[1] = tmp16; - hwpf.Read1b(picinfo.picun.path, 256); /* 그림íì¼ ì´ë¦ : ì¢ ë¥ê° Drawingì´ ìëë. */ - hwpf.Read1b(reserved3, 9); /* ë°ê¸°/ëª ì/그림í¨ê³¼ ë± */ + hwpf.Read1b(picinfo.picun.path, 256); /* Picture File Name: when type is not a Drawing. */ + hwpf.Read1b(reserved3, 9); /* Brightness / Contrast / Picture Effect, etc. */ UpdateBBox(this); if( pictype != PICTYPE_DRAW ) @@ -460,7 +460,7 @@ bool Picture::Read(HWPFile & hwpf) style.boxtype = 'D'; hwpf.AddFBoxStyle(&style); -// cation +// caption hwpf.ReadParaList(caption); return !hwpf.State(); @@ -834,7 +834,7 @@ bool Outline::Read(HWPFile & hwpf) } -/* 묶ì ë¹ì¹¸(30) */ +/* Bundle of spaces (30)*/ KeepSpace::KeepSpace() : HBox(CH_KEEP_SPACE) , dummy(0) @@ -853,7 +853,7 @@ bool KeepSpace::Read(HWPFile & hwpf) } -/* ê³ ì í ë¹ì¹¸(31) */ +/* Fixed-width spaces (31) */ FixedSpace::FixedSpace() : HBox(CH_FIXED_SPACE) , dummy(0) diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index a68a29b..5240584 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -555,8 +555,8 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo ) pList->clear(); rendEl( "draw:fill-image"); } -/* ê·¸ë¼ë°ì´ì ì´ ì¡´ì¬í´ë, ë¹í¸ë§µíì¼ì´ ì¡´ì¬íë©´, ì´ê²ì´ ì°ì ì´ë¤. */ - else if( prop->flag >> 16 & 0x01 ) /* ê·¸ë¼ë°ì´ì ì¡´ì¬ì¬ë¶ */ +/* If there is a gradient, when a bitmap file is present, this is the first. */ + else if( prop->flag >> 16 & 0x01 ) /* existence gradient */ { padd( "draw:name", sXML_CDATA, ascii(Int2Str(hdo->index, "Grad%d", buf))); switch( prop->gstyle ) @@ -802,8 +802,8 @@ void HwpReader::makeStyles() /** * parse automatic styles from hwpfile - * ìëì ì¼ë¡ ë°ìì´ ëë ì¤íì¼ì ì ìíë¤. ì를ë¤ì´ ê°ê°ì 문ë¨ì´ë, í ì´ë¸, í¤ë ë±ë±ì ì¤íì¼ì ì´ê³³ìì ì ìíê³ , Bodyììë ì´ê³³ì ì ìë ì¤íì¼ì ì´ì©íë¤. - * 1. paragraph, text, fbox, pageì¤íì¼ì ëí´ ì§ìíë¤. + * Define a style that is automatically reflected. For example, defining styles of each paragraph, tables, header, and etc,. at here. In Body, use the defined style. + * 1. supports for the styles of paragraph, text, fbox, and page. */ void HwpReader::makeAutoStyles() { @@ -1032,7 +1032,7 @@ void HwpReader::makeMasterStyles() rstartEl("style:master-page", rList); pList->clear(); - if( pSet[i].bIsSet ) /* íì¬ ì¤ì ì´ ë°ëìì¼ë©´ */ + if( pSet[i].bIsSet ) /* If you've changed the current setting */ { if( !pSet[i].pagenumber ){ if( pPrevSet && pPrevSet->pagenumber ) @@ -1074,11 +1074,11 @@ void HwpReader::makeMasterStyles() pPage = &pSet[i]; pPrevSet = &pSet[i]; } - else if( pPrevSet ) /* ì´ì ì ì¤ì ë ê²ì´ ìì¼ë©´. */ + else if( pPrevSet ) /* If the previous setting exists */ { pPage = pPrevSet; } - else /* ìì§ ì¤ì ì´ ìë¤ë©´ 기본ì¤ì ì¼ë¡ */ + else /* If the previous settings doesn't exist, set to the default settings */ { rstartEl("style:header", rList); padd("text:style-name", sXML_CDATA, "Standard"); @@ -1098,7 +1098,7 @@ void HwpReader::makeMasterStyles() continue; } -// ------------- header ------------- +// header if( pPage->header ) { rstartEl("style:header", rList); @@ -1128,7 +1128,7 @@ void HwpReader::makeMasterStyles() d->nPnPos = 0; rendEl("style:header"); } - /* 기본ì¼ë¡ íë¤. */ + /* Will be the default. */ else if( pPage->header_odd && !pPage->header_even ) { rstartEl("style:header", rList); @@ -1163,7 +1163,7 @@ void HwpReader::makeMasterStyles() d->nPnPos = 0; rendEl("style:header-left"); } - /* 기본ì¼ë¡ íë¤. */ + /* Will be the default. */ else if( pPage->header_even && !pPage->header_odd ) { rstartEl("style:header-left", rList); @@ -1198,7 +1198,7 @@ void HwpReader::makeMasterStyles() rendEl("text:p"); rendEl("style:header"); } -// ------------- footer ------------- +// footer if( pPage->footer ) { rstartEl("style:footer", rList); @@ -1229,7 +1229,7 @@ void HwpReader::makeMasterStyles() d->nPnPos = 0; rendEl("style:footer"); } - /* 기본ì¼ë¡ íë¤. */ + /* Will be the default. */ else if( pPage->footer_odd && !pPage->footer_even ) { rstartEl("style:footer", rList); @@ -1264,7 +1264,7 @@ void HwpReader::makeMasterStyles() d->nPnPos = 0; rendEl("style:footer-left"); } - /* 기본ì¼ë¡ íë¤. */ + /* Will be the default. */ else if( pPage->footer_even && !pPage->footer_odd ) { rstartEl("style:footer-left", rList); @@ -1307,11 +1307,11 @@ void HwpReader::makeMasterStyles() /** - * í ì¤í¸ ì¤íì¼ì ìí íë¡í¼í°ë¤ì ë§ë ë¤. + * Create the properties for text styles. * 1. fo:font-size, fo:font-family, fo:letter-spacing, fo:color, * style:text-background-color, fo:font-style, fo:font-weight, * style:text-underline,style:text-outline,fo:text-shadow,style:text-position - * ì ì§ìíë¤. + * Support them. */ void HwpReader::parseCharShape(CharShape * cshape) { @@ -1381,11 +1381,11 @@ void HwpReader::parseCharShape(CharShape * cshape) /** - * ì¤ì Paragraphì í´ë¹íë propertiesë¤ì ë§ë ë¤. + * Create the properties that correspond to the real Paragraph. * 1. fo:margin-left,fo:margin-right,fo:margin-top, fo:margin-bottom, * fo:text-indent, fo:line-height, fo:text-align, fo:border - * ê° êµ¬íë¨. - * TODO : íì¤ì => 기본ê°ì´ ìëê²ë¤ë§ ì íì ì¼ë¡ ì¤ì í´ì¼ íë¤. + * are implemented. + * TODO: Tab Settings => set values of properties only which doesn't have the default value */ void HwpReader::parseParaShape(ParaShape * pshape) { @@ -1453,7 +1453,7 @@ void HwpReader::parseParaShape(ParaShape * pshape) /** - * Paragraphì ëí ì¤íì¼ì ë§ë ë¤. + * Make the style of the Paragraph. */ void HwpReader::makePStyle(ParaShape * pshape) { @@ -1523,8 +1523,8 @@ void HwpReader::makePStyle(ParaShape * pshape) /** - * íì´ì§ì ì¤íì¼ì ë§ë ë¤. ì¬ê¸°ìë header/footer, footnoteë±ì´ í¬í¨ëë¤. - * TODO : , fo:background-color(ì ë³´ê° ìë¤) + * Create a style for the page. This includes the header/footer, footnote and more. + * TODO: fo: background-color (no information) */ void HwpReader::makePageStyle() { @@ -1757,7 +1757,7 @@ void HwpReader::makePageStyle() rendEl("style:properties"); rendEl("style:footer-style"); - /* footnote style ì´ê±´ dtdììë ë¹ ì¡ì¼ë, ì¤íìë ì ìëì´ ìë¤. REALKING */ + /* Footnote style, but it fell in the dtd, the specification has been defined. REALKING */ rstartEl("style:footnote-layout", rList); padd("style:distance-before-sep", sXML_CDATA, @@ -1796,18 +1796,18 @@ void HwpReader::makeColumns(ColumnDef *coldef) { switch( coldef->separator ) { - case 1: /* ììì */ + case 1: /* thin line */ padd("style:width", sXML_CDATA, "0.02mm"); //fall-through - case 3: /* ì ì */ + case 3: /* dotted line */ padd("style:style", sXML_CDATA, "dotted"); padd("style:width", sXML_CDATA, "0.02mm"); break; - case 2: /* ë꺼ì´ì */ - case 4: /* 2ì¤ì */ + case 2: /* thick line */ + case 4: /* double line */ padd("style:width", sXML_CDATA, "0.35mm"); break; - case 0: /* ìì */ + case 0: /* None */ default: padd("style:style", sXML_CDATA, "none"); break; @@ -1853,7 +1853,7 @@ void HwpReader::makeTStyle(CharShape * cshape) void HwpReader::makeTableStyle(Table *tbl) { -// --------------- table ---------------- +// table TxtBox *hbox = tbl->box; padd("style:name", sXML_CDATA, @@ -1870,7 +1870,7 @@ void HwpReader::makeTableStyle(Table *tbl) rendEl("style:properties"); rendEl("style:style"); -// --------------- column ---------------- +// column for (size_t i = 0 ; i < tbl->columns.nCount -1 ; i++) { sprintf(buf,"Table%d.%c",hbox->style.boxnum, static_cast<char>('A'+i)); @@ -1886,7 +1886,7 @@ void HwpReader::makeTableStyle(Table *tbl) rendEl("style:style"); } -// --------------- row ---------------- +// row for (size_t i = 0 ; i < tbl->rows.nCount -1 ; i++) { sprintf(buf,"Table%d.row%" SAL_PRI_SIZET "u",hbox->style.boxnum, i + 1); @@ -1902,7 +1902,7 @@ void HwpReader::makeTableStyle(Table *tbl) rendEl("style:style"); } -// --------------- cell --------------------- +// cell for (std::list<TCell*>::iterator it = tbl->cells.begin(), aEnd = tbl->cells.end(); it != aEnd; ++it) { TCell *tcell = *it; @@ -1920,14 +1920,14 @@ void HwpReader::makeTableStyle(Table *tbl) { switch( cl->linetype[2] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border", sXML_CDATA,"0.039cm double #000000"); break; @@ -1937,56 +1937,56 @@ void HwpReader::makeTableStyle(Table *tbl) { switch( cl->linetype[0] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-left", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-left", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-left", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-left", sXML_CDATA,"0.039cm double #000000"); break; } switch( cl->linetype[1] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-right", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-right", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-right", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-right", sXML_CDATA,"0.039cm double #000000"); break; } switch( cl->linetype[2] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-top", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-top", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-top", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-top", sXML_CDATA,"0.039cm double #000000"); break; } switch( cl->linetype[3] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-bottom", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-bottom", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-bottom", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-bottom", sXML_CDATA,"0.039cm double #000000"); break; @@ -2323,14 +2323,14 @@ void HwpReader::makeCaptionStyle(FBoxStyle * fstyle) case 0: padd("fo:padding", sXML_CDATA,"0mm"); break; - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border", sXML_CDATA,"0.039cm double #000000"); break; @@ -2340,56 +2340,56 @@ void HwpReader::makeCaptionStyle(FBoxStyle * fstyle) { switch( cell->linetype[0] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-left", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-left", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-left", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-left", sXML_CDATA,"0.039cm double #000000"); break; } switch( cell->linetype[1] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-right", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-right", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-right", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-right", sXML_CDATA,"0.039cm double #000000"); break; } switch( cell->linetype[2] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-top", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-top", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-top", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-top", sXML_CDATA,"0.039cm double #000000"); break; } switch( cell->linetype[3] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-bottom", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-bottom", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-bottom", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-bottom", sXML_CDATA,"0.039cm double #000000"); break; @@ -2408,7 +2408,7 @@ void HwpReader::makeCaptionStyle(FBoxStyle * fstyle) /** - * Floating ê°ì²´ì ëí ì¤íì¼ì ë§ë ë¤. + * Create a style for the Floating objects. */ void HwpReader::makeFStyle(FBoxStyle * fstyle) { @@ -2534,14 +2534,14 @@ void HwpReader::makeFStyle(FBoxStyle * fstyle) case 0: padd("fo:border", sXML_CDATA, "none"); break; - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border", sXML_CDATA,"0.039cm double #000000"); break; @@ -2551,56 +2551,56 @@ void HwpReader::makeFStyle(FBoxStyle * fstyle) { switch( cell->linetype[0] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-left", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-left", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-left", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-left", sXML_CDATA,"0.039cm double #000000"); break; } switch( cell->linetype[1] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-right", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-right", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-right", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-right", sXML_CDATA,"0.039cm double #000000"); break; } switch( cell->linetype[2] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-top", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-top", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-top", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-top", sXML_CDATA,"0.039cm double #000000"); break; } switch( cell->linetype[3] ) { - case 1: /* ê°ëì¤ì */ - case 3: /* ì ì -> ì¤íì¤í¼ì¤ìë ì ì ì´ ìë¤. */ + case 1: /* A thin solid line */ + case 3: /* Dotted line -> LibreOffice, there is no dotted line */ padd("fo:border-bottom", sXML_CDATA,"0.002cm solid #000000"); break; - case 2: /* êµµìì¤ì */ + case 2: /* Bold lines */ padd("fo:border-bottom", sXML_CDATA,"0.035cm solid #000000"); break; - case 4: /* 2ì¤ì */ + case 4: /* Double line */ padd("style:border-line-width-bottom", sXML_CDATA,"0.002cm 0.035cm 0.002cm"); padd("fo:border-bottom", sXML_CDATA,"0.039cm double #000000"); break; @@ -2688,7 +2688,7 @@ void HwpReader::makeChars(hchar_string & rStr) /** - * 문ë¨ë´ì í¹ì문ìê° ìê³ ëª¨ë 문ìê° ëì¼í CharShape를 ì¬ì©íë ê²½ì° + * If no special characters in the paragraph and all characters use the same CharShape */ void HwpReader::make_text_p0(HWPPara * para, bool bParaStart) { @@ -2755,8 +2755,8 @@ void HwpReader::make_text_p0(HWPPara * para, bool bParaStart) } -/** - * 문ë¨ë´ì í¹ì문ìê° ìì¼ë 문ìë¤ì´ ë¤ë¥¸ CharShape를 ì¬ì©íë ê²½ì° +/* + * There is no special characters in the paragraph, but characters use different CharShapes */ void HwpReader::make_text_p1(HWPPara * para,bool bParaStart) { @@ -2839,7 +2839,7 @@ void HwpReader::make_text_p1(HWPPara * para,bool bParaStart) /** - * ë¬¸ë¨ ë´ì í¹ì문ìê° ìì¼ë©° 문ìë¤ì´ ë¤ë¥¸ CharShape를 ê°ë ê²½ì°ì ëí´ ì²ë¦¬ + * Special characters are in the paragraph and characters use different CharShapes */ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart) { @@ -2974,9 +2974,9 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart) } makeTab(static_cast<Tab *>(para->hhstr[n])); break; - case CH_TEXT_BOX: /* 10 - í/í ì¤í¸ë°ì¤/ìì/ë²í¼/íì´í¼í ì¤í¸ ì */ + case CH_TEXT_BOX: /* 10 - ordered by Table/text box/formula/button/hypertext */ { -/* ì¼ë¨ì íë§ ì²ë¦¬íê³ , ììì text:pìì ë¤ì´ê°ë ê²ì¼ë¡ ì²ë¦¬. */ +/* produce tables first, and treat formula as being in text:p. */ TxtBox *hbox = static_cast<TxtBox *>(para->hhstr[n]); if( hbox->style.anchor_type == 0 ) @@ -3074,11 +3074,11 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart) makeChars(str); makeMailMerge(static_cast<MailMerge *>(para->hhstr[n])); break; - case CH_COMPOSE: /* 23 - ê¸ì겹침 */ + case CH_COMPOSE: /* 23 - overlapping letters */ break; case CH_HYPHEN: // 24 break; - case CH_TOC_MARK: /* 25 ìëì 3ê°ë ìì í´ì¼ íë¤. */ + case CH_TOC_MARK: /* 25 Need to fix below 3 */ if( !pstart ) {STARTP;} if( !tstart ) {STARTT;} makeChars(str); @@ -3106,7 +3106,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart) void HwpReader::makeFieldCode(hchar_string & rStr, FieldCode *hbox) { -/* ëë¦í */ +/* Push frame */ if( hbox->type[0] == 4 && hbox->type[1] == 0 ) { padd("text:placeholder-type", sXML_CDATA, "text"); @@ -3117,7 +3117,7 @@ void HwpReader::makeFieldCode(hchar_string & rStr, FieldCode *hbox) rchars( OUString(rStr.c_str())); rendEl( "text:placeholder" ); } -/* 문ììì½ */ +/* Document Summary */ else if( hbox->type[0] == 3 && hbox->type[1] == 0 ) { if (hconv(hbox->str3) == "title") @@ -3145,7 +3145,7 @@ void HwpReader::makeFieldCode(hchar_string & rStr, FieldCode *hbox) rendEl( "text:keywords" ); } } -/* ê°ì¸ì ë³´ */ +/* Personal Information */ else if( hbox->type[0] == 3 && hbox->type[1] == 1 ) { if (hconv(hbox->str3) == "User") @@ -3225,7 +3225,7 @@ void HwpReader::makeFieldCode(hchar_string & rStr, FieldCode *hbox) /** * Completed - * ì¤íì¤í¼ì¤ììë ë¶ë§í¬ë¥¼ Referenceë¡ ì°¸ì¡°íë hwpìë ê·¸ 기ë¥ì´ ìë¤. + * In LibreOffice, refer bookmarks as reference, but hwp doesn't have the sort of feature. */ void HwpReader::makeBookmark(Bookmark * hbox) { @@ -3236,7 +3236,7 @@ void HwpReader::makeBookmark(Bookmark * hbox) pList->clear(); rendEl("text:bookmark"); } - else if (hbox->type == 1) /* ë¸ë¡ ë¶ë§í¬ì¼ ê²½ì° ììê³¼ ëì´ ìë¤ */ + else if (hbox->type == 1) /* Block bookmarks days begin and end there if */ { padd("text:name", sXML_CDATA, (hconv(hbox->id))); rstartEl("text:bookmark-start", rList); @@ -3433,7 +3433,7 @@ void HwpReader::makeTable(TxtBox * hbox) pList->clear(); Table *tbl = hbox->m_pTable; -// ----------- column ---------------- +// column for (size_t i = 0 ; i < tbl->columns.nCount -1 ; i++) { sprintf(buf,"Table%d.%c",hbox->style.boxnum, static_cast<char>('A'+i)); @@ -3443,7 +3443,7 @@ void HwpReader::makeTable(TxtBox * hbox) rendEl("table:table-column"); } -// ----------- cell ---------------- +// cell int j = -1, k = -1; for (std::list<TCell*>::iterator it = tbl->cells.begin(), aEnd = tbl->cells.end(); it != aEnd; ++it) { @@ -3455,7 +3455,7 @@ void HwpReader::makeTable(TxtBox * hbox) rendEl("table:table-row"); k = j; } -// --------------- row ---------------- +// row sprintf(buf,"Table%d.row%d",hbox->style.boxnum, tcell->nRowIndex + 1); padd("table:style-name", sXML_CDATA, ascii( buf )); rstartEl("table:table-row", rList); @@ -3485,10 +3485,10 @@ void HwpReader::makeTable(TxtBox * hbox) /** - * í ì¤í¸ë°ì¤ì í ì´ë¸ì íì±íë¤. - * 1. draw:style-name, draw:name, text:anchor-type, svg:width, - * fo:min-height, svg:x, svg:y - * TODO : fo:background-colorë¡ ì ì ì¹¼ë¼ ì¤ì =>ì¤íì¼ì ë¤ì´ê°ë ì§ ìì§ ëª¨ë¥´ê² ë¤. + * Parses the text boxes and tables. + * 1. draw: style-name, draw: name, text: anchor-type, svg: width, + * Fo: min-height, svg: x, svg: y + * TODO: fo:background-color <= no idea whether the value of color setting->style is in it or not */ void HwpReader::makeTextBox(TxtBox * hbox) { @@ -3530,7 +3530,7 @@ void HwpReader::makeTextBox(TxtBox * hbox) Double2Str(WTMM(( hbox->box_ys + hbox->cap_ys) )) + "mm"); rstartEl("draw:text-box", rList); pList->clear(); - if( hbox->cap_pos % 2 ) /* 캡ì ì´ ì쪽ì ìì¹íë¤ */ + if( hbox->cap_pos % 2 ) /* The caption is on the top */ { parsePara(hbox->caption.front()); } @@ -3597,7 +3597,7 @@ void HwpReader::makeTextBox(TxtBox * hbox) { rstartEl("draw:text-box", rList); pList->clear(); -/* 캡ì ì´ ì¡´ì¬íê³ , ì쪽ì ìì¼ë©´ */ +/* If captions are present and it is on the top */ if( hbox->style.cap_len > 0 && (hbox->cap_pos % 2) && hbox->type == TBL_TYPE ) { parsePara(hbox->caption.front()); @@ -3610,7 +3610,7 @@ void HwpReader::makeTextBox(TxtBox * hbox) { parsePara(hbox->plists[0].front()); } -/* 캡ì ì´ ì¡´ì¬íê³ , ìë쪽ì ìì¼ë©´ */ +/* If captions are present and it is on the bottom */ if( hbox->style.cap_len > 0 && !(hbox->cap_pos % 2) && hbox->type == TBL_TYPE) { parsePara(hbox->caption.front()); @@ -3638,7 +3638,7 @@ void HwpReader::makeTextBox(TxtBox * hbox) /** - * MathMLë¡ ë³íí´ì¼ íë¤. + * It must be converted into MathML. * */ void HwpReader::makeFormula(TxtBox * hbox) @@ -3690,12 +3690,11 @@ void HwpReader::makeFormula(TxtBox * hbox) delete form; } - /** - * platformì 보를 ì½ì´ë¤ì¬ì hrefê° C:\ë D:\ë¡ ììí ê²½ì° ë¦¬ë ì¤ë ìë¼ë¦¬ì¤ì´ë©´ - * C:\ => íì¼ë¡, D:\ => 루í¸(/)ë¡ ë°ê¾¸ì´ì£¼ë ìì ì´ íìíë¤. ì´ê²ì - * íì»´ì´ ëì¤ì뮬ë ì´í°ë¥¼ ì°ê¸° ë문ì´ë¤. + * Read the platform information. if the platform is Linux or Solaris, it needs to change + * C: \ => Home, D: \ => changed to root (/). Because HWP uses DOS emulator. */ + void HwpReader::makeHyperText(TxtBox * hbox) { HyperText *hypert = hwpfile.GetHyperText(); @@ -3740,10 +3739,10 @@ void HwpReader::makeHyperText(TxtBox * hbox) /** - * platformì 보를 ì½ì´ë¤ì¬ì hrefê° C:\ë D:\ë¡ ììí ê²½ì° ë¦¬ë ì¤ë ìë¼ë¦¬ì¤ì´ë©´ - * C:\ => íì¼ë¡, D:\ => 루í¸(/)ë¡ ë°ê¾¸ìë¤. ì´ê²ì - * íì»´ì´ ëì¤ì뮬ë ì´í°ë¥¼ ì°ê¸° ë문ì´ë¤. + * Read the platform information. if the platform is Linux or Solaris, it needs to change¶ + * C: \ => Home, D: \ => changed to root (/). Because HWP uses DOS emulator. */ + void HwpReader::makePicture(Picture * hbox) { switch (hbox->pictype) @@ -3790,7 +3789,7 @@ void HwpReader::makePicture(Picture * hbox) Double2Str(WTMM( hbox->box_ys + hbox->style.margin[1][2] + hbox->style.margin[1][3] + hbox->cap_ys )) + "mm"); rstartEl("draw:text-box", rList); pList->clear(); - if( hbox->cap_pos % 2 ) /* 캡ì ì´ ì쪽ì ìì¹íë¤ */ + if( hbox->cap_pos % 2 ) /* Caption is on the top */ { parsePara(hbox->caption.front()); } @@ -3935,7 +3934,7 @@ void HwpReader::makePicture(Picture * hbox) if( hbox->style.cap_len > 0 ) { rendEl( "text:p"); - if( !(hbox->cap_pos % 2)) /* 캡ì ì´ ìë쪽ì ìì¹íë©´, */ + if( !(hbox->cap_pos % 2)) /* Caption is at the bottom, */ { parsePara(hbox->caption.front()); } @@ -4013,13 +4012,13 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) ZZPoint pt[3], r_pt[3]; for(i = 0 ; i < 3 ; i++ ){ pt[i].x = pal->pt[i].x - drawobj->property.rot_originx; - /* 물리ì¢íê³ë¡ ë³í */ + /* Convert to a physical coordinate */ pt[i].y = -(pal->pt[i].y - drawobj->property.rot_originy); } double rotate, skewX ; - /* 2 - íì ê° ê³ì° */ + /* 2 - rotation angle calculation */ if( pt[1].x == pt[0].x ){ if( pt[1].y > pt[0].y ) rotate = PI/2; @@ -4036,7 +4035,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) r_pt[i].y = (int)(pt[i].y * cos(-(rotate)) + pt[i].x * sin(-(rotate))); } - /* 4 - íê° ê³ì° */ + /* 4 - Calculation of reflex angle */ if( r_pt[2].y == r_pt[1].y ) skewX = 0; else @@ -4074,7 +4073,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) } switch (drawobj->type) { - case HWPDO_LINE: /* ì - ììì¢í, ëì¢í. */ + case HWPDO_LINE: /* Line-starting coordinates, ending coordinates. */ if( drawobj->u.line_arc.flip & 0x01 ) { padd("svg:x1", sXML_CDATA, @@ -4108,7 +4107,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) pList->clear(); rendEl("draw:line"); break; - case HWPDO_RECT: /* ì¬ê°í - ìììì¹, ê°ë¡/ì¸ë¡ */ + case HWPDO_RECT: /* rectangle - the starting position, vertical/horizontal */ if( !bIsRotate ) { padd("svg:x", sXML_CDATA, @@ -4150,8 +4149,8 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) } rendEl("draw:rect"); break; - case HWPDO_ELLIPSE: /* íì - ìììì¹, ê°ë¡/ì¸ë¡ */ - case HWPDO_ADVANCED_ELLIPSE: /* ë³íë íì */ + case HWPDO_ELLIPSE: /* Ellipse - the starting position, vertical/horizontal */ + case HWPDO_ADVANCED_ELLIPSE: /* modified ellipse */ { if( !bIsRotate ) { @@ -4200,10 +4199,10 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) break; } - case HWPDO_ARC: /* í¸ */ + case HWPDO_ARC: /* Arc */ case HWPDO_ADVANCED_ARC: { - /* í¸ì¼ê²½ì°ì, ì¤íì¤í¼ì¤ë ì ì²´ íìì í¬ê¸°ë¥¼ ì¬ì´ì¦ë¡ íë¤. */ + /* If it is the arc, LibreOffice assumes the size as the entire ellipse size */ uint flip = drawobj->u.line_arc.flip; if( !bIsRotate ) { @@ -4310,7 +4309,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) break; } - case HWPDO_CURVE: /* 곡ì : ë¤ê°íì¼ë¡ ë³í. */ + case HWPDO_CURVE: /* Curve: converts to polygons. */ { bool bIsNatural = true; if( drawobj->property.flag >> 5 & 0x01){ @@ -4426,7 +4425,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) break; } case HWPDO_CLOSED_FREEFORM: - case HWPDO_FREEFORM: /* ë¤ê°í */ + case HWPDO_FREEFORM: /* polygon */ { bool bIsPolygon = false; @@ -4569,8 +4568,8 @@ void HwpReader::makeLine(Line * ) /** - * ì ë ¥-주ì-ì¨ìì¤ëª : ì¬ì©ììê² ì¨ì ì¤ëª ì ë³´ì¬ì¤ë¤. - * 문ë¨ì´ í¬í¨ë ì ìì¼ë, ë¨ì§ 문ìì´ë§ ë½ìë´ì´ íì±íë¤. + * Input-comment-hidden description: shows a hidden explanation to the users. + * Parse out only strings, but it may contain paragraphs. */ void HwpReader::makeHidden(Hidden * hbox) { @@ -4603,7 +4602,7 @@ void HwpReader::makeHidden(Hidden * hbox) /** - * ê°ì£¼ë text:footnote, 미주ë text:endnoteë¡ ë³í + * Converts footnote to text:footnote, endnote to text:endnote */ void HwpReader::makeFootnote(Footnote * hbox) { @@ -4693,7 +4692,7 @@ void HwpReader::makeShowPageNum() nPos = 2; else if( hbox->where == 3 || hbox->where == 6 ) nPos = 3; - else /* ì´ ê²½ì°ê° ì¡´ì¬íë©´ ìëë¤. */ + else /* should not exist in this case. */ { if( d->nPnPos == 1 ) nPos = 1;
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
