summaryrefslogtreecommitdiffstats
path: root/hwpfilter/source/hcode.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-06-22 15:19:32 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-06-22 16:31:32 +0100
commitae9dae720b2e2e5ef370d99a7387e31d9e2f5eb4 (patch)
tree17d1d5313f920fc8ade3bfaad3801f8600820c4b /hwpfilter/source/hcode.cxx
parentadd stock re-based code headers. (diff)
downloadcore-ae9dae720b2e2e5ef370d99a7387e31d9e2f5eb4.tar.gz
core-ae9dae720b2e2e5ef370d99a7387e31d9e2f5eb4.zip
re-base on ALv2 code. Includes:
Use ksc5601.h header from XFree86 Project Inc. Patch contributed by Oliver-Rainer Wittmann with minor changes from Pedro Giffuni http://svn.apache.org/viewvc?view=revision&revision=1179296
Diffstat (limited to 'hwpfilter/source/hcode.cxx')
-rw-r--r--hwpfilter/source/hcode.cxx45
1 files changed, 16 insertions, 29 deletions
diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx
index 260d5648ba32..cc7579796419 100644
--- a/hwpfilter/source/hcode.cxx
+++ b/hwpfilter/source/hcode.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
+/*
+ * This file is part of the LibreOffice project.
*
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
+ * This file incorporates work covered by the following license notice:
*
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
/**
* Rule :
@@ -50,10 +41,6 @@
static hchar jaso2ks(hchar hh);
-/* Conversion table. */
-#define KSC5601_HANJA 4888
-#define KSC5601_SYMBOL 986
-
// ccvHH2ASC code convert HWP20 to ASC(KSSM)
#define HCA_HALFCH 0x3000
@@ -1169,7 +1156,7 @@ hchar ksc5601_sym_to_ucs2 (hchar input)
ch2 = sal::static_int_cast<unsigned char>(input & 0xff);
idx = (ch - 0xA1) * 94 + (ch2 - 0xA1);
if (idx <= 1114 && idx >= 0){
- hchar value = ksc5601_sym_to_ucs[idx];
+ hchar value = ksc5601_2uni_page21[idx];
return value ? value : 0x25a1;
}
return 0x25a1;
@@ -1185,7 +1172,7 @@ hchar ksc5601_han_to_ucs2 (hchar input)
idx = (ch - 0xA1) * 94 + (ch2 - 0xA1);
if (idx >= 3854){
// Hanja : row 42 - row 93 : 3854 = 94 * (42-1)
- hchar value = ksc5601_hanja_to_ucs[idx - 3854];
+ hchar value = ksc5601_2uni_page21[idx - 3854];
return value ? value : '?';
}
return '?';