diff options
author | Kurt Zenker <kz@openoffice.org> | 2007-05-11 08:10:04 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2007-05-11 08:10:04 +0000 |
commit | 1b75dc486531a98a600491cd4863a769100d2139 (patch) | |
tree | 1bed4a2f8d51676d9a5328d65b637297a4e171e4 /transex3 | |
parent | INTEGRATION: CWS gh13 (1.1.2); FILE ADDED (diff) | |
download | core-1b75dc486531a98a600491cd4863a769100d2139.tar.gz core-1b75dc486531a98a600491cd4863a769100d2139.zip |
INTEGRATION: CWS gh13 (1.1.2); FILE ADDED
2007/03/09 14:36:29 gh 1.1.2.1: original version by Christian Schmidt
Diffstat (limited to 'transex3')
-rwxr-xr-x | transex3/java/l10nconv/java/com/sun/star/tooling/converter/ResTypeResolver.java | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/transex3/java/l10nconv/java/com/sun/star/tooling/converter/ResTypeResolver.java b/transex3/java/l10nconv/java/com/sun/star/tooling/converter/ResTypeResolver.java new file mode 100755 index 000000000000..6ec2316bba73 --- /dev/null +++ b/transex3/java/l10nconv/java/com/sun/star/tooling/converter/ResTypeResolver.java @@ -0,0 +1,76 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ResTypeResolver.java,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: kz $ $Date: 2007-05-11 09:10:04 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ +/* + * Created on 2005 + * by Christian Schmidt + */ +package com.sun.star.tooling.converter; + +import java.util.Map; + +/** + * Helps resolving restype descriptors used outside the tool to + * restype descriptors used by this tool + * + * @author Christian Schmidt 2005 + * + */ +public class ResTypeResolver { + final static String[] inFields={"Text","QText","HText","Title"}; + final static String[] outFields={"res","res-quickhelp","res-help","res-title"}; + final static Map internKeys=new ExtMap(inFields,outFields); + final static Map externKeys=new ExtMap(outFields,inFields); + + /** + * Get the intern key depending to the given extern key + * + * @param externKey the externKey {"res","res-quickhelp","res-help","title"} + * @return the depending intern key + */ + public static String getInternKey(String externKey){ + return (String)externKeys.get(externKey); + } + + /** + * Get the extern key to the given intern key + * + * @param internKey the internal key + * @return the external key + */ + public static String getExternKey(String internKey){ + return (String)internKeys.get(internKey); + } + +} |