|
LibreOffice Module hwpfilter (master) 1
|
#include <sal/config.h>#include "precompile.h"#include <comphelper/base64.hxx>#include <comphelper/sequence.hxx>#include <basegfx/numeric/ftools.hxx>#include <o3tl/safeint.hxx>#include <o3tl/sprintf.hxx>#include <rtl/strbuf.hxx>#include <rtl/ustrbuf.hxx>#include <sal/types.h>#include <sal/macros.h>#include <stdlib.h>#include <string.h>#include <cmath>#include "hcode.h"#include "ksc5601.h"Go to the source code of this file.
Macros | |
| #define | HCA_KSS 0x3400 |
| #define | HCA_TG 0x37C0 |
| #define | noneks 0xA1A1 |
| #define | UNI_HANGUL_FIRST 0xac00 |
| #define | NUM_JOONGSEONG 21 |
| #define | NUM_JONGSEONG 28 |
| #define | LINEBASE 0x3013 |
| #define | IsHangul(c) ((c) & 0x8000) |
| #define | IsHanja(c) (((c) & 0x4000)==0x4000) |
Functions | |
| static hchar | jaso2ks (hchar hh) |
| Rule : Hangule johap code => unicode Hanja johap code => ks code => unicode Special johap code => ks code => unicode. More... | |
| static char | LineCharDir (hchar ch) |
| static hchar | s_hh2ks (hchar hh) |
| Convert hwp's special character to ks. More... | |
| static hchar | s_hh2kssm (hchar hh) |
| Convert hwp's special character to kssm. More... | |
| static hchar | lineCharConv (hchar ch) |
| static int | KsSearch (hchar c) |
| static hchar | cdkssm2ks_han (hchar kssm) |
| int | hcharconv (hchar ch, hchar *dest, int codeType) |
| Transfer combination-code for internal using of hwp to ascii. More... | |
| int | kssm_hangul_to_ucs2 (hchar ch, hchar *dest) |
| hchar | ksc5601_sym_to_ucs2 (hchar input) |
| hchar | ksc5601_han_to_ucs2 (hchar input) |
| OUString | hstr2OUString (hchar const *hstr) |
| ::std::string | hstr2ksstr (hchar const *hstr) |
| Convert 'Hangul and Computer' strings to the completion code(KSC5601-87) More... | |
| hchar_string | kstr2hstr (uchar const *src) |
| 한글을 포함할 수 있는 char형스트링을 한컴스트링으로 변환한다. More... | |
| OUString | hcolor2str (uchar color, uchar shade, bool bIsChar) |
| hwp의 경로를 windows형태로 바꾼다. More... | |
| OUString | rgb2str (unsigned char red, unsigned char green, unsigned char blue) |
| OUString | rgb2str (int32_t rgb) |
| ::std::string | urltounix (const char *src) |
| hwp의 경로를 unix형태로 바꾼다. More... | |
| OUString | base64_encode_string (const uchar *buf, unsigned int len) |
| double | calcAngle (double x1, double y1, double x2, double y2) |
Variables | |
| const hchar | ksTbl [2350] |
| kssm code table matching with ks index More... | |
| const unsigned | tblhhtg_ks [] |
| ks symbols More... | |
| const unsigned | hhtg_tg [] |
| kssm symbols More... | |
| const hchar | jaso_hh_code [] |
| const hchar | choseong_to_unicode [] |
| const hchar | joongseong_to_unicode [] |
| const hchar | jongseong_to_unicode [] |
| const hchar | jamo_to_unicode [] |
| const JamoComp | jamocomp1_to_unicode [] |
Definition at line 1395 of file hcode.cxx.
References aBuf, and comphelper::Base64::encode().
Referenced by HwpReader::makeDrawMiscStyle(), HwpReader::makePageStyle(), and HwpReader::makePicture().
| double calcAngle | ( | double | x1, |
| double | y1, | ||
| double | x2, | ||
| double | y2 | ||
| ) |
Definition at line 1402 of file hcode.cxx.
References basegfx::rad2deg().
Referenced by HwpReader::makePictureDRAW().
Definition at line 524 of file hcode.cxx.
References index, jaso2ks(), KsSearch(), and ksTbl.
Referenced by hcharconv().
Transfer combination-code for internal using of hwp to ascii.
Definition at line 898 of file hcode.cxx.
References cdkssm2ks_han(), ch, index, IsHangul, IsHanja, KS, ksc5601_han_to_ucs2(), ksc5601_sym_to_ucs2(), KSSM, kssm_hangul_to_ucs2(), lineCharConv(), LineCharDir(), s_hh2ks(), s_hh2kssm(), and UNICODE.
Referenced by hstr2ksstr(), hstr2OUString(), HwpReader::make_text_p0(), HwpReader::make_text_p1(), HwpReader::make_text_p3(), HwpReader::makeFormula(), and HwpReader::makeHidden().
hwp의 경로를 windows형태로 바꾼다.
color인덱스 값과 음영값을 조합하여 스타오피스의 color로 변환
Definition at line 1241 of file hcode.cxx.
References rgb2str().
Referenced by HwpReader::makeCaptionStyle(), HwpReader::makeFStyle(), HwpReader::makeTableStyle(), HwpReader::parseCharShape(), and HwpReader::parseParaShape().
| ::std::string hstr2ksstr | ( | hchar const * | hstr | ) |
Convert 'Hangul and Computer' strings to the completion code(KSC5601-87)
한컴스트링을 완성형스트링으로 변환한다.
Definition at line 1186 of file hcode.cxx.
References hcharconv(), and KS.
Referenced by HwpReader::makeHyperText(), and HwpReader::parseCharShape().
| OUString hstr2OUString | ( | hchar const * | hstr | ) |
Definition at line 1171 of file hcode.cxx.
References hcharconv(), and UNICODE.
Referenced by Outline::GetUnicode(), HwpReader::makeBookmark(), HwpReader::makeDateCode(), HwpReader::makeDateFormat(), HwpReader::makeDrawMiscStyle(), HwpReader::makeFieldCode(), HwpReader::makeMailMerge(), HwpReader::makeMeta(), HwpReader::makePageStyle(), HwpReader::makePicture(), and HwpReader::makeStyles().
Rule : Hangule johap code => unicode Hanja johap code => ks code => unicode Special johap code => ks code => unicode.
Definition at line 570 of file hcode.cxx.
References i, jaso_hh_code, and SAL_N_ELEMENTS.
Referenced by cdkssm2ks_han().
Definition at line 1158 of file hcode.cxx.
References ch, idx, ksc5601_2uni_page21, o3tl::make_unsigned(), SAL_N_ELEMENTS, and value.
Referenced by hcharconv().
Definition at line 1146 of file hcode.cxx.
References ch, idx, ksc5601_2uni_page21, o3tl::make_unsigned(), SAL_N_ELEMENTS, and value.
Referenced by hcharconv().
Definition at line 1069 of file hcode.cxx.
References ch, choseong_to_unicode, count, index, jamo_to_unicode, jamocomp1_to_unicode, jongseong_to_unicode, joongseong_to_unicode, NUM_JONGSEONG, NUM_JOONGSEONG, SAL_N_ELEMENTS, and UNI_HANGUL_FIRST.
Referenced by hcharconv().
| hchar_string kstr2hstr | ( | uchar const * | src | ) |
한글을 포함할 수 있는 char형스트링을 한컴스트링으로 변환한다.
Definition at line 1217 of file hcode.cxx.
References i.
Referenced by HwpReader::makeDrawMiscStyle(), HwpReader::makeHyperText(), HwpReader::makePageStyle(), HwpReader::makePicture(), HwpReader::makeStyles(), and HwpReader::parseCharShape().
Definition at line 471 of file hcode.cxx.
References ch, and LineCharDir().
Referenced by hcharconv().
|
static |
Definition at line 393 of file hcode.cxx.
Referenced by hcharconv(), and lineCharConv().
| OUString rgb2str | ( | unsigned char | red, |
| unsigned char | green, | ||
| unsigned char | blue | ||
| ) |
Definition at line 1296 of file hcode.cxx.
References n, and o3tl::sprintf().
Referenced by hcolor2str(), HwpReader::makeDrawMiscStyle(), HwpReader::makeDrawStyle(), HwpReader::makePageStyle(), and rgb2str().
Convert hwp's special character to ks.
Definition at line 405 of file hcode.cxx.
References HCA_KSS, HCA_TG, i, idx, and tblhhtg_ks.
Referenced by hcharconv().
| ::std::string urltounix | ( | const char * | src | ) |
hwp의 경로를 unix형태로 바꾼다.
Definition at line 1307 of file hcode.cxx.
References i.
Referenced by HwpReader::makeDrawMiscStyle(), HwpReader::makeHyperText(), HwpReader::makePageStyle(), and HwpReader::makePicture().
| const hchar choseong_to_unicode[] |
Definition at line 582 of file hcode.cxx.
Referenced by kssm_hangul_to_ucs2().
| const unsigned hhtg_tg[] |
kssm symbols
Definition at line 378 of file hcode.cxx.
Referenced by s_hh2kssm().
| const hchar jamo_to_unicode[] |
Definition at line 612 of file hcode.cxx.
Referenced by kssm_hangul_to_ucs2().
| const JamoComp jamocomp1_to_unicode[] |
Definition at line 676 of file hcode.cxx.
Referenced by kssm_hangul_to_ucs2().
| const hchar jaso_hh_code[] |
Definition at line 545 of file hcode.cxx.
Referenced by jaso2ks().
| const hchar jongseong_to_unicode[] |
Definition at line 598 of file hcode.cxx.
Referenced by kssm_hangul_to_ucs2().
| const hchar joongseong_to_unicode[] |
Definition at line 590 of file hcode.cxx.
Referenced by kssm_hangul_to_ucs2().
| const hchar ksTbl[2350] |
kssm code table matching with ks index
Definition at line 62 of file hcode.cxx.
Referenced by cdkssm2ks_han(), and KsSearch().
| const unsigned tblhhtg_ks[] |
ks symbols
Definition at line 363 of file hcode.cxx.
Referenced by s_hh2ks().