Kaydet (Commit) 188208d9 authored tarafından Jihui Choi's avatar Jihui Choi Kaydeden (comit) Adolfo Jayme Barrientos

tdf#91067: Translate Korean comments

Change-Id: Idbee9cb5a1745bb2cc3c4cb1238773da7ff2a0a3
Signed-off-by: 's avatarAndrea Gelmini <andrea.gelmini@gelma.net>
üst 43cf7b9a
......@@ -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;
......
......@@ -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);
......
......@@ -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: */
......@@ -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.
*/
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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);
......
......@@ -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.
*/
......
......@@ -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;
......
......@@ -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();
......
......@@ -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)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment