diff options
author | Malte Timmermann <mt@openoffice.org> | 2002-11-01 11:32:47 +0000 |
---|---|---|
committer | Malte Timmermann <mt@openoffice.org> | 2002-11-01 11:32:47 +0000 |
commit | 46936e223a9f8a221895d8bce880b4d268c97a91 (patch) | |
tree | 10777a62c2642fa96ae11f1ae653ac43fcb7ff9d /svx/source/items | |
parent | 784c44fec827bc51f53aa44e12a6d043791f49bc (diff) |
#104631# GetI18NScriptTypeOfLanguage and more
Diffstat (limited to 'svx/source/items')
-rw-r--r-- | svx/source/items/textitem.cxx | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/svx/source/items/textitem.cxx b/svx/source/items/textitem.cxx index 12788879713f..479dc25ed91d 100644 --- a/svx/source/items/textitem.cxx +++ b/svx/source/items/textitem.cxx @@ -2,9 +2,9 @@ * * $RCSfile: textitem.cxx,v $ * - * $Revision: 1.47 $ + * $Revision: 1.48 $ * - * last change: $Author: pb $ $Date: 2002-08-15 13:30:30 $ + * last change: $Author: mt $ $Date: 2002-11-01 12:32:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -193,6 +193,9 @@ #ifndef _COM_SUN_STAR_TEXT_FONTEMPHASIS_HPP_ #include <com/sun/star/text/FontEmphasis.hpp> #endif +#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HPP_ +#include <com/sun/star/i18n/ScriptType.hpp> +#endif #ifndef _SVX_UNOMID_HXX #include <unomid.hxx> @@ -3813,3 +3816,29 @@ USHORT GetScriptTypeOfLanguage( USHORT nLang ) return nScript; } +USHORT GetI18NScriptTypeOfLanguage( USHORT nLang ) +{ + return GetI18NScriptType( GetScriptTypeOfLanguage( nLang ) ); +} + +USHORT GetItemScriptType( short nI18NType ) +{ + switch ( nI18NType ) + { + case i18n::ScriptType::LATIN: return SCRIPTTYPE_LATIN; + case i18n::ScriptType::ASIAN: return SCRIPTTYPE_ASIAN; + case i18n::ScriptType::COMPLEX: return SCRIPTTYPE_COMPLEX; + } + return 0; +} + +short GetI18NScriptType( USHORT nItemType ) +{ + switch ( nItemType ) + { + case SCRIPTTYPE_LATIN: return i18n::ScriptType::LATIN; + case SCRIPTTYPE_ASIAN: return i18n::ScriptType::ASIAN; + case SCRIPTTYPE_COMPLEX: return i18n::ScriptType::COMPLEX; + } + return 0; +} |