merge the formfield patch from ooo-build
[ooovba.git] / hwpfilter / source / hcode.h
blob5a609c6d4302244a24091930648100cf6e6f6bae
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: hcode.h,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 /* $Id: hcode.h,v 1.3 2008-04-10 12:03:17 rt Exp $ */
33 #ifndef _HCODE_H_
34 #define _HCODE_H_
36 #include "hwplib.h"
38 /**
39 * Codetype of Korean
40 * KSSM - Johap, KS - Wansung
42 enum { KSSM, KS, UNICODE };
43 /**
44 * Transfer combination-code for internal using of hwp to ascii
46 DLLEXPORT int hcharconv(hchar ch, hchar *dest, int codeType) ;
48 DLLEXPORT int kssm_hangul_to_ucs2(hchar ch, hchar *dest) ;
49 DLLEXPORT hchar ksc5601_han_to_ucs2 (hchar);
50 DLLEXPORT hchar ksc5601_sym_to_ucs2 (hchar);
51 DLLEXPORT hchar* hstr2ucsstr(hchar* hstr, hchar* ubuf);
52 /**
53 * ÇÑÄĽºÆ®¸µÀ» ¿Ï¼ºÇü½ºÆ®¸µÀ¸·Î º¯È¯ÇÑ´Ù.
55 DLLEXPORT int hstr2ksstr(hchar* hstr, char* buf);
57 /**
58 * ÇѱÛÀ» Æ÷ÇÔÇÒ ¼ö ÀÖ´Â charÇü½ºÆ®¸µÀ» ÇÑÄĽºÆ®¸µÀ¸·Î º¯È¯ÇÑ´Ù.
60 DLLEXPORT hchar *kstr2hstr( uchar *src, hchar *dest );
62 /**
63 * hwpÀÇ °æ·Î¸¦ unixÇüÅ·Π¹Ù²Û´Ù.
65 DLLEXPORT char *urltounix(const char *src, char *buf );
67 /**
68 * hwpÀÇ °æ·Î¸¦ windowsÇüÅ·Π¹Ù²Û´Ù.
70 #ifdef _WIN32
71 DLLEXPORT char *urltowin(const char *src, char *buf );
72 #endif
73 /**
74 * Transfer interger to string following format
76 DLLEXPORT char* Int2Str(int value, const char *format, char *buf);
78 /**
79 * colorÀ妽º °ª°ú À½¿µ°ªÀ» Á¶ÇÕÇÏ¿© ½ºÅ¸¿ÀÇǽºÀÇ color·Î º¯È¯
81 DLLEXPORT char *hcolor2str(uchar color, uchar shade, char *buf, bool bIsChar = false);
83 DLLEXPORT char *base64_encode_string( const uchar *buf, unsigned int len );
84 DLLEXPORT double calcAngle(int x1, int y1, int x2, int y2);
87 #endif /* _HCODE_H_ */