From 2cd35d3abbf196ffaf0a4166841c0ecfe323c3ce Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 13 Apr 2014 16:42:00 +0200 Subject: Change encoding from EUC-KR to utf8 These files have been converted with this command line: iconv -f EUC-KR -t utf8 > For more info, see http://nabble.documentfoundation.org/About-encoding-of-some-files-in-hwpfilter-td4105106.html Change-Id: Ibb2fc0af465641d6cc9236887addefe8062d4ffe --- hwpfilter/source/formula.cxx | 2 +- hwpfilter/source/hbox.cxx | 34 ++++++++++---------- hwpfilter/source/hbox.h | 32 +++++++++---------- hwpfilter/source/hcode.cxx | 62 ++++++++++++++++++------------------ hwpfilter/source/hinfo.cxx | 56 ++++++++++++++++---------------- hwpfilter/source/hwpeq.cxx | 26 +++++++-------- hwpfilter/source/hwpfile.cxx | 2 +- hwpfilter/source/hwpread.cxx | 76 ++++++++++++++++++++++---------------------- 8 files changed, 145 insertions(+), 145 deletions(-) (limited to 'hwpfilter') diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx index 9d61d2ac1488..c6fa80f421a2 100644 --- a/hwpfilter/source/formula.cxx +++ b/hwpfilter/source/formula.cxx @@ -387,7 +387,7 @@ void Formula::makeDecoration(Node *res) else fprintf(stderr,"\n"); #else - /* accent truḛ, , false 𸣰ڴ. */ + /* accent는 언제 true이고, 언제, false인지 모르겠다. */ if( isover ){ padd(ascii("accent"),ascii("CDATA"),ascii("true")); rstartEl(ascii("math:mover"), rList); diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx index c2b8647ad058..7b8705968032 100644 --- a/hwpfilter/source/hbox.cxx +++ b/hwpfilter/source/hbox.cxx @@ -436,7 +436,7 @@ Footnote::~Footnote(void) // auto number(18) // new number(19) // show page number (20) -// Ȧʽ/߱ (21) +// 홀수쪽시작/감추기 (21) // mail merge(22) hchar_string MailMerge::GetString() @@ -582,9 +582,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 은 0부터 시작. 즉 1.1.1. 의 레벨은 2이다. + number는 값이 그대로 들어가 있다. 즉, 1.2.1에는 1,2,1이 들어가 있다. + style 은 1부터 값이 들어가 있다. hbox.h에 정의된 데로.. */ hchar_string Outline::GetUnicode() const { @@ -643,17 +643,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 은 0부터 시작. 즉 1.1.1. 의 레벨은 2이다. + number는 값이 그대로 들어가 있다. 즉, 1.2.1에는 1,2,1이 들어가 있다. + style 은 1부터 값이 들어가 있다. hbox.h에 정의된 데로.. */ switch( user_shape[i] ) { case 0: buffer[l++] = '1' + number[i] - 1; break; - case 1: /* 빮ڷθ */ - case 2: /* ҹڷθ */ + case 1: /* 대문자로마 */ + case 2: /* 소문자로마 */ num2roman(number[i], dest); if( user_shape[i] == 1 ){ char *ptr = dest; @@ -678,22 +678,22 @@ hchar_string Outline::GetUnicode() const case 6: buffer[l++] = olHanglJaso(number[i] -1, OL_HANGL_JASO); break; - case 7: /* : Ϲ ڷ ǥ */ + case 7: /* 한자 숫자 : 일반 숫자로 표현 */ buffer[l++] = '1' + number[i] -1; break; - case 8: /* */ + case 8: /* 원숫자 */ buffer[l++] = 0x2e00 + number[i]; break; - case 9: /* ĺ ҹ */ + case 9: /* 원 알파벳 소문자 */ buffer[l++] = 0x2c20 + number[i]; break; - case 10: /* */ + case 10: /* 원 가나다 */ buffer[l++] = 0x2c50 + number[i] -1; break; - case 11: /* */ + case 11: /* 원 ㄱ ㄴ */ buffer[l++] = 0x2c40 + number[i] -1; break; - case 12: /* ̾ . */ + case 12: /* 이어진 숫자. */ { char cur_num_str[10],buf[80]; int j; @@ -727,7 +727,7 @@ hchar_string Outline::GetUnicode() const } -/* ĭ(30) */ -/* ĭ(31) */ +/* 묶음 빈칸(30) */ +/* 고정폭 빈칸(31) */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h index 5bf64da321ad..8dbe2bbbb096 100644 --- a/hwpfilter/source/hbox.h +++ b/hwpfilter/source/hbox.h @@ -86,9 +86,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 - 계산식, 3/0-문서요약, 3/1-개인정보, 3/2-만든날짜, 4/0-누름틀 */ char *reserved1; - unsigned short location_info; /* 0 - ڵ, 1 - ڵ */ + unsigned short location_info; /* 0 - 끝코드, 1 - 시작코드 */ char *reserved2; hchar *str1; hchar *str2; @@ -213,7 +213,7 @@ enum struct CellLine { unsigned char key; - unsigned char top; // 0 - ξ, 1-single, 2-thick, 3-double + unsigned char top; // 0 - 라인없음, 1-single, 2-thick, 3-double unsigned char bottom; unsigned char left; unsigned char right; @@ -261,7 +261,7 @@ struct FBoxStyle /** * Kind of wrap */ - unsigned char txtflow; /* ׸. 0-2(ڸ,,︲) */ + unsigned char txtflow; /* 그림피함. 0-2(자리차지,투명,어울림) */ /** * Horizontal alignment */ @@ -279,12 +279,12 @@ struct FBoxStyle /** * Index of floating object */ - short boxnum; /* Ÿǽ Ÿ ̸ */ + short boxnum; /* 스타오피스에서 스타일 이름으로 사용될 숫자 */ /** * 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; /* 캡션의 길이 */ void *cell; @@ -310,8 +310,8 @@ struct FBox: public HBox char xpos_type, ypos_type; unsigned char smart_linesp; -/* ڷ tbox pic Ͽ ʰ ø , - line Ͽ Ѵ. +/* 이 자료는 tbox나 pic에서는 파일에 기록하지 않고 실행시만 있으며, + line에서는 파일에 기록한다. */ short boundsy, boundey; unsigned char boundx, draw; @@ -355,7 +355,7 @@ struct TxtBox: public FBox * The value of type indicates as the below: zero is table, one is * textbox, two is equalizer and three is button. */ - short type; // 0-table, 1-textbox, 2-, 3-button + short type; // 0-table, 1-textbox, 2-수식, 3-button /** * nCell is greater than one only for table, otherwise it is 1. */ @@ -544,7 +544,7 @@ struct Table TxtBox *box; }; -/* picture (11) ׸, OLE׸, Ա׸, ׸ */ +/* picture (11) 그림, OLE그림, 삽입그림, 그리기 */ enum pictype { PICTYPE_FILE, PICTYPE_OLE, PICTYPE_EMBED, @@ -623,7 +623,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. */ - ulong follow_block_size; /* ߰ . */ + ulong follow_block_size; /* 추가정보 길이. */ short dummy1; // to not change structure size */ short dummy2; // to not change structure size */ uchar reserved1; @@ -653,7 +653,7 @@ struct Picture: public FBox /** * It's for the Drawing object */ - unsigned char *follow; /* ׸ drawing϶, ߰. */ + unsigned char *follow; /* 그림종류가 drawing일때, 추가정보. */ bool ishyper; @@ -829,7 +829,7 @@ struct ShowPageNum: public HBox virtual bool Read(HWPFile &hwpf) SAL_OVERRIDE; }; -/* Ȧʽ (21) */ +/* 홀수쪽시작 (21) */ #define HIDE_HD 1 /* bit 0 */ #define HIDE_FT 2 /* bit 1 */ #define HIDE_PGNUM 4 /* bit 2 */ @@ -999,7 +999,7 @@ class Outline: public HBox /** * decoration character for the level type */ - hchar deco[MAX_OUTLINE_LEVEL][2]; /* ǽ յ */ + hchar deco[MAX_OUTLINE_LEVEL][2]; /* 사용자 정의시 앞뒤 문자 */ hchar dummy; Outline(); @@ -1008,7 +1008,7 @@ class Outline: public HBox hchar_string GetUnicode() const; }; -/* ĭ(30) */ +/* 묶음 빈칸(30) */ /** * The Special space to be treated non-space when a string is * cut at the end of line @@ -1023,7 +1023,7 @@ struct KeepSpace: public HBox virtual bool Read(HWPFile &hwpf) SAL_OVERRIDE; }; -/* ĭ(31) */ +/* 고정폭 빈칸(31) */ /** * @short Space with always same width not relation with fonts. */ diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx index 5949628c48a5..6ecd3544658e 100644 --- a/hwpfilter/source/hcode.cxx +++ b/hwpfilter/source/hcode.cxx @@ -523,7 +523,7 @@ static hchar cdkssm2ks_han(hchar kssm) unsigned int index; unsigned char lo, hi; -/* "" */ +/* "한" */ if (kssm == 0xd3c5) return 0xc7d1; @@ -585,7 +585,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 ٸ ڵ  ִ. ̺κп Ģ ̾ƶ. */ +/* 중성이 0과 1인 곳에는 다른 코드들이 들어가 있다. 이부분에 대한 법칙을 뽑아라. */ static const hchar joongseong_to_unicode[] = { 0, 0, 0, 0x1161, 0x1162, 0x1163, 0x1164, 0x1165, @@ -602,12 +602,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 ȴ. - * ڸ𿵿 Ϲ ̺ ü ̺ . +/* 중성이 0과 1인곳 */ +/* 처음 32개는 자모, 나머지 32개는 조합으로 구성. + * 0x8000 ~ 0xa413까지 32개 나오고, 0x0400더한 0x8400에서 다시 32개 나오는 식으로 진행된다. + * 자모영역은 일반 테이블로 나머지는 구조체 매핑테이블로 만든다. */ -/* 308.. 1152 308 844 ڸ̴. */ +/* 308개.. 1152개에서 308개를 제외한 나머지 844개는 자모조합이다. */ static const hchar jamo_to_unicode[] = { 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138, @@ -666,7 +666,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}, @@ -789,7 +789,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 ٲپ ־ . */ +/* -- 여기부터 숫자 안바꿈 즉, 3을 2로 바꾸어 주어야 함. */ {2, 0x1105, 0x1178, 0x0000}, {2, 0x1105, 0x117a, 0x0000}, {2, 0x1105, 0x117b, 0x0000}, {2, 0x1105, 0x1186, 0x0000}, {2, 0x1105, 0x1187, 0x0000}, {2, 0x1105, 0x118c, 0x0000}, @@ -914,13 +914,13 @@ int hcharconv(hchar ch, hchar *dest, int codeType) dest[0] = ch; return 1; } - /* ڴ 0x4000 4888 . */ + /* 한자는 0x4000부터 4888가지의 값을 가진다. */ else if (IsHanja(ch)) { unsigned int index; unsigned char hi; - /* 4888̿ Ʒѱۿ Ȯ̴. ̰Ϳ ؼ - ڵ峪 ϼڵ ȯ ̺ ̴. + /* 4888이외의 수는 아래한글에서 정의한 확장한자이다. 이것에 대해서는 + 유니코드나 완성형코드로의 변환을 위한 매핑테이블어 없는 실정이다. */ if ((index = ch - 0x4000) >= 4888) { @@ -932,8 +932,8 @@ int hcharconv(hchar ch, hchar *dest, int codeType) } if (codeType == KS) { - /* ڵ ڵ ڵ ڵ 0xA1 - 0xFE . - ڵ忡 üִ 0xFE - 0xA1 +1 ̴. + /* 한자코드는 상위코드와 하위코드로 나누어지며 하위코드는 0xA1 - 0xFE 까지의 값을 가진다. + 즉 하위코드에 올수있는 가지수는 0xFE - 0xA1 +1 가지수이다. */ hi = sal::static_int_cast(index / (0xFE - 0xA1 + 1) + 0xCA); lo = sal::static_int_cast(index % (0xFE - 0xA1 + 1) + 0xA1); @@ -997,8 +997,8 @@ int hcharconv(hchar ch, hchar *dest, int codeType) return 1 ; } /** - * Ư ڵ - * Ʒѱۿ 0x3400 Ưڰ ۵ȴ. 0xA1A0 + * 특수문자 코드 + * 아래한글에서는 0x3400부터 특수문자가 시작된다. 조합형은 0xA1A0 */ else { @@ -1013,7 +1013,7 @@ int hcharconv(hchar ch, hchar *dest, int codeType) dest[0] = ch; return 1; } - /* ѱ۰ǻ : 0x37c0 ~ 0x37c5 */ + /* 한글과컴퓨터 : 0x37c0 ~ 0x37c5 */ if( ch2 >= 0x37c0 && ch2 <= 0x37c5 ){ if( ch2 == 0x37c0 ) dest[0] = 0xd55c; else if( ch2 == 0x37c1 ) dest[0] = 0xae00; @@ -1059,7 +1059,7 @@ int hcharconv(hchar ch, hchar *dest, int codeType) } } -/* ѱ . */ +/* 한글일 경우. */ int kssm_hangul_to_ucs2(hchar ch, hchar *dest) { hchar choseong, joongseong, jongseong; @@ -1070,13 +1070,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 ){ /* 조합되지 않은 영역 중성=0,1 */ + if( joongseong == 0 && ch < 0xa414 ){ /* 고어포함 자모 */ int index = choseong * 32 + jongseong; dest[0] = jamo_to_unicode[index]; return 1; } - else{ /* ڸ : ̺ ̿ϼ */ + else{ /* 고어포함 자모조합 : 테이블 미완성 */ unsigned int index = choseong * 32 + jongseong - 308; if( index < SAL_N_ELEMENTS(jamocomp1_to_unicode) ){ dest[0] = jamocomp1_to_unicode[index].v1; @@ -1088,11 +1088,11 @@ int kssm_hangul_to_ucs2(hchar ch, hchar *dest) return 1; } } - else if ( choseong == 1 && jongseong == 1 ){ /* */ + else if ( choseong == 1 && jongseong == 1 ){ /* 모음 */ dest[0] = joongseong_to_unicode[joongseong]; return 1; } - else if ( joongseong == 2 && jongseong == 1 ){ /* */ + else if ( joongseong == 2 && jongseong == 1 ){ /* 자음 */ dest[0] = choseong_to_unicode[choseong]; return 1; } @@ -1101,8 +1101,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 /* 완성되지 않은 한글 */ + ) { /* 고어 */ int count = 0; if( choseong != 1 ){ dest[count] = choseong_to_unicode[choseong]; @@ -1182,7 +1182,7 @@ hchar_string hstr2ucsstr(hchar const* hstr) } /** - * ĽƮ ϼƮ ȯѴ + * 한컴스트링을 완성형스트링으로 변환한다 */ ::std::string hstr2ksstr(hchar const* hstr) { @@ -1212,8 +1212,8 @@ hchar_string hstr2ucsstr(hchar const* hstr) /* - * ѱۿ ڱ ִ kcharŸ ڿ - * ѱۿ ϴ hcharŸ ڿ ȯѴ. + * 한글에서 영문외의 문자까지 포함할 수 있는 kchar타입의 문자열을 + * 한글에서 사용하는 hchar타입의 문자열로 변환한다. */ hchar_string kstr2hstr(unsigned char const* src) { @@ -1244,7 +1244,7 @@ char* Int2Str(int value, const char *format, char *buf) } -/* colorε Ͽ Ÿǽ color ȯ */ +/* color인덱스 값과 음영값을 조합하여 스타오피스의 color로 변환 */ char *hcolor2str(uchar color, uchar shade, char *buf, bool bIsChar) { unsigned short red,green,blue; @@ -1448,11 +1448,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사분면 */ if( angle < 0. ) angle += 180.; } - else{ /* 3, 4 и */ + else{ /* 3, 4 사분면 */ if( angle > 0 ) angle += 180.; else diff --git a/hwpfilter/source/hinfo.cxx b/hwpfilter/source/hinfo.cxx index 7f261f053456..2b8136218ce8 100644 --- a/hwpfilter/source/hinfo.cxx +++ b/hwpfilter/source/hinfo.cxx @@ -54,42 +54,42 @@ HWPInfo::~HWPInfo(void) /** - * о̴ Լ ( 128 bytes ) - * ν( 30 bytes ) ġ ̴. + * 문서정보를 읽어들이는 함수 ( 128 bytes ) + * 문서정보는 파일인식정보( 30 bytes ) 다음에 위치한 정보이다. */ bool HWPInfo::Read(HWPFile & hwpf) { - hwpf.Read2b(&cur_col, 1); /* Ŀ ġ ܹȣ */ - hwpf.Read2b(&cur_row, 1); /* ĭ */ + hwpf.Read2b(&cur_col, 1); /* 문서를 저장할 당시의 커서가 위치한 문단번호 */ + hwpf.Read2b(&cur_row, 1); /* 문단 칸 */ - hwpf.Read1b(&paper.paper_kind, 1); /* */ - hwpf.Read1b(&paper.paper_direction, 1); /* */ + hwpf.Read1b(&paper.paper_kind, 1); /* 용지 종류 */ + hwpf.Read1b(&paper.paper_direction, 1); /* 용지 방향 */ // paper geometry information - paper.paper_height = (short) hwpf.Read2b(); /* */ - paper.paper_width = (short) hwpf.Read2b(); /* ʺ */ - paper.top_margin = (short) hwpf.Read2b(); /* */ - paper.bottom_margin = (short) hwpf.Read2b(); /* Ʒ */ - paper.left_margin = (short) hwpf.Read2b(); /* */ - paper.right_margin = (short) hwpf.Read2b(); /* */ - paper.header_length = (short) hwpf.Read2b(); /* Ӹ */ - paper.footer_length = (short) hwpf.Read2b(); /* */ - paper.gutter_length = (short) hwpf.Read2b(); /* */ - 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.paper_height = (short) hwpf.Read2b(); /* 용지 길이 */ + paper.paper_width = (short) hwpf.Read2b(); /* 용지 너비 */ + paper.top_margin = (short) hwpf.Read2b(); /* 위쪽 여백 */ + paper.bottom_margin = (short) hwpf.Read2b(); /* 아래쪽 여백 */ + paper.left_margin = (short) hwpf.Read2b(); /* 왼쪽 여백 */ + paper.right_margin = (short) hwpf.Read2b(); /* 오른쪽 여백 */ + paper.header_length = (short) hwpf.Read2b(); /* 머리말 길이 */ + paper.footer_length = (short) hwpf.Read2b(); /* 꼬리말 길이 */ + paper.gutter_length = (short) hwpf.Read2b(); /* 제본여백 */ + 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-새로시작 */ + /* 연결인쇄할 파일의 이름 */ 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); /* 덧붙이는 말 ( 파일 저장할 때 덧붙이는 말에 지정한 내용 ) */ + hwpf.Read2b(&encrypted, 1); /* 암호 여부 0-보통파일, 그외-암호걸린 파일 */ +//hwpf.Read1b(reserved2, 6); /* 아래 3개의값으로 바뀌었다. */ + hwpf.Read2b(&beginpagenum,1); /* 페이지시작번호 */ // footnote - hwpf.Read2b(&beginfnnum,1); /* ۹ȣ */ - hwpf.Read2b(&countfn,1); /* */ + hwpf.Read2b(&beginfnnum,1); /* 각주 시작번호 */ + hwpf.Read2b(&countfn,1); /* 각주 갯수 */ splinetext = (short) hwpf.Read2b(); splinefn = (short) hwpf.Read2b(); spfnfn = (short) hwpf.Read2b(); @@ -110,7 +110,7 @@ bool HWPInfo::Read(HWPFile & hwpf) if (hwpf.State()) return false; -/* д´. */ +/* 문서 요약을 읽는다. */ if (!summary.Read(hwpf)) return false; if (info_block_len > 0) @@ -122,7 +122,7 @@ bool HWPInfo::Read(HWPFile & hwpf) return false; } -/* hwpf 缳 Ѵ. */ +/* hwpf의 값을 재설정 한다. */ hwpf.compressed = compressed ? true : false; hwpf.encrypted = encrypted ? true : false; hwpf.info_block_len = info_block_len; diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx index ce53b0ca9c63..ba2e762ce790 100644 --- a/hwpfilter/source/hwpeq.cxx +++ b/hwpfilter/source/hwpeq.cxx @@ -32,7 +32,7 @@ using namespace std; #include #include -/* @Man: hwp LaTeX ٲٱ */ +/* @Man: hwp수식을 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 }, /* 세로로 가운데 */ { "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; } -/* ùڸ 빮̰ų 빮ڸ ҹڷ ٲ۴. */ +/* 첫자만 대문자이거나 전부 대문자면 소문자로 바꾼다. */ static char *make_keyword( char *keyword, const char *token) { @@ -462,7 +462,7 @@ void push_token(MzString &white, MzString &token, istream *strm) stk->strm = strm; } -/* ū ̸ ȯѴ. */ +/* 읽은 토큰의 길이를 반환한다. */ /* control char, control sequence, binary sequence, alphabet string, sigle character */ static int next_token(MzString &white, MzString &token, istream *strm) @@ -498,8 +498,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(ch)); - /* sub, sub, over, atop Ư ó - next_state() ġ ̴. + /* sub, sub, over, atop 특수 처리 + 그 이유는 next_state()에 영향을 미치기 때문이다. */ if( !STRICMP("sub", token) || !STRICMP("from", token) || !STRICMP("sup", token) || !STRICMP("to", token) || @@ -550,17 +550,17 @@ static int read_white_space(MzString& outs, istream *strm) return result; } -/* μ ʿ ׸ space brace +/* 인수가 필요하지 않은 경우 각 항목간의 구분은 space와 brace sqrt {ab}c = sqrt{ab} c - (, } grouping - ^, _ յڷ Ѵ. + (, }는 grouping + ^, _ 는 앞뒤로 결합한다. - sqrt μ ִ + sqrt 등과 같이 인수가 있는 형식 정리 sqrt a -> sqrt{a} sqrt {a} -> sqrt{a} - 1 ̻ μ ִ μ鰣 ش. + 1 이상의 인수가 있는 경우 인수들간의 역백은 없앤다. \frac a b -> frac{a}{b} - over + over의 형식 정리 a over b -> {a}over{b} */ @@ -591,7 +591,7 @@ static int eq_word(MzString& outs, istream *strm, int status) state << white << token; } else { - /* token */ + /* 정상적인 token */ int script_status = SCRIPT_NONE; while( true ) { state << white << token; diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index 2b5a1fec000e..dabca79d219e 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -374,7 +374,7 @@ ColumnDef *HWPFile::GetColumnDef(int num) else return 0; } -/* @return ε 1 Ѵ. */ +/* @return 인덱스는 1부터 시작한다. */ int HWPFile::GetPageMasterNum(int page) { std::list::iterator it = columnlist.begin(); diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx index 0facd76005e5..dd9bc917b522 100644 --- a/hwpfilter/source/hwpread.cxx +++ b/hwpfilter/source/hwpread.cxx @@ -63,10 +63,10 @@ bool FieldCode::Read(HWPFile & hwpf) { ulong size; hchar dummy; - ulong len1; /* hcharŸ ڿ #1 */ - ulong len2; /* hcharŸ ڿ #2 */ - ulong len3; /* hcharŸ ڿ #3 */ - ulong binlen; /* ̳ʸ Ÿ */ + ulong len1; /* hchar타입의 문자열 테이터 #1의 길이 */ + ulong len2; /* hchar타입의 문자열 테이터 #2의 길이 */ + ulong len3; /* hchar타입의 문자열 테이터 #3의 길이 */ + ulong binlen; /* 임의 형식의 바이너리 데이타 길이 */ 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 ){ /* 만든날짜로서 포맷을 생성해야 한다. */ DateCode *pDate = new DateCode; for (int i = 0 ; i < static_cast(len3_); i++) { if(str3[i] == 0 ) break; @@ -380,46 +380,46 @@ bool Picture::Read(HWPFile & hwpf) hwpf.AddBox(this); hwpf.Read4b(&follow_block_size, 1); - hwpf.Read2b(&dummy1, 1); /* 4Ʈ */ + hwpf.Read2b(&dummy1, 1); /* 예약 4바이트 */ 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); /* 기준위치 */ + 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(&xpos_type, 1); hwpf.Read1b(&ypos_type, 1); - hwpf.Read1b(&smart_linesp, 1); /* ٰ ȣ : 0 ̺ȣ, 1 ȣ */ + hwpf.Read1b(&smart_linesp, 1); /* 줄간격 보호 : 0 미보호, 1 보호 */ 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); /* 실제 계산된 박스 가로 */ + 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.Read1b(&pictype, 1); /* ׸ */ + hwpf.Read1b(&pictype, 1); /* 그림종류 */ - skip[0] = (short) hwpf.Read2b(); /* ׸ ǥø ġ */ - skip[1] = (short) hwpf.Read2b(); /* */ - scale[0] = (short) hwpf.Read2b(); /* Ȯ : 0 , ̿ ۼƮ */ - scale[1] = (short) hwpf.Read2b(); /* */ + skip[0] = (short) hwpf.Read2b(); /* 그림에서 실제 표시를 시작할 위치 가로 */ + skip[1] = (short) hwpf.Read2b(); /* 세로 */ + scale[0] = (short) hwpf.Read2b(); /* 확대비율 : 0 고정, 이외 퍼센트 단위 가로 */ + scale[1] = (short) hwpf.Read2b(); /* 세로 */ - hwpf.Read1b(picinfo.picun.path, 256); /* ׸ ̸ : Drawing ƴҶ. */ - hwpf.Read1b(reserved3, 9); /* //׸ȿ */ + hwpf.Read1b(picinfo.picun.path, 256); /* 그림파일 이름 : 종류가 Drawing이 아닐때. */ + hwpf.Read1b(reserved3, 9); /* 밝기/명암/그림효과 등 */ UpdateBBox(this); if( pictype != PICTYPE_DRAW ) @@ -677,7 +677,7 @@ bool ShowPageNum::Read(HWPFile & hwpf) return !hwpf.State(); } -/* Ȧʽ/߱ (21) */ +/* 홀수쪽시작/감추기 (21) */ PageNumCtrl::PageNumCtrl() : HBox(CH_PAGE_NUM_CTRL) , kind(0) @@ -823,7 +823,7 @@ bool Outline::Read(HWPFile & hwpf) } -/* ĭ(30) */ +/* 묶음 빈칸(30) */ KeepSpace::KeepSpace() : HBox(CH_KEEP_SPACE) , dummy(0) @@ -842,7 +842,7 @@ bool KeepSpace::Read(HWPFile & hwpf) } -/* ĭ(31) */ +/* 고정폭 빈칸(31) */ FixedSpace::FixedSpace() : HBox(CH_FIXED_SPACE) , dummy(0) -- cgit