LCOV - code coverage report
Current view: top level - rsc/source/parser - rscibas.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 265 290 91.4 %
Date: 2014-11-03 Functions: 23 24 95.8 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : 
      21             : #include <stdlib.h>
      22             : #include <stdio.h>
      23             : #include <string.h>
      24             : 
      25             : #include <comphelper/string.hxx>
      26             : #include <i18nlangtag/mslangid.hxx>
      27             : #include <i18nlangtag/languagetag.hxx>
      28             : #include <tools/color.hxx>
      29             : #include <tools/fldunit.hxx>
      30             : #include <tools/gen.hxx>
      31             : #include <tools/mapunit.hxx>
      32             : #include <tools/rc.h>
      33             : #include <tools/wintypes.hxx>
      34             : #include <rsc/rsc-vcl-shared-types.hxx>
      35             : 
      36             : #include <com/sun/star/awt/Key.hpp>
      37             : 
      38             : #include <rscconst.hxx>
      39             : #include <rscarray.hxx>
      40             : #include <rscclass.hxx>
      41             : #include <rsccont.hxx>
      42             : #include <rscdb.hxx>
      43             : #include <rsclex.hxx>
      44             : #include <rscyacc.hxx>
      45             : 
      46             : #include <boost/unordered_map.hpp>
      47             : 
      48       91342 : void RscTypCont::SETCONST( RscConst * pClass, const char * szString, sal_uInt32 nVal )
      49             : {
      50             : #if OSL_DEBUG_LEVEL > 2
      51             :     fprintf( stderr, "setconst : %s\n", szString );
      52             : #endif
      53             :     pClass->SetConstant( aNmTb.Put( szString,
      54       91342 :                          CONSTNAME, nVal ), nVal );
      55       91342 : }
      56             : 
      57        8380 : void RscTypCont::SETCONST( RscConst * pClass, Atom nName, sal_uInt32 nVal )
      58             : {
      59             : #if OSL_DEBUG_LEVEL > 2
      60             :     fprintf( stderr, "setconst hash: %u\n", (unsigned int)nName );
      61             : #endif
      62             :     pClass->SetConstant( aNmTb.Put( nName,
      63        8380 :                          CONSTNAME, nVal ), nVal );
      64        8380 : }
      65             : 
      66             : 
      67             : typedef boost::unordered_map< OString, sal_uInt32, OStringHash > langmap;
      68         419 : static langmap ULong_Iso_map;
      69             : 
      70      524700 : sal_uInt32 GetLangId(const OString &rLang)
      71             : {
      72      524700 :     langmap::iterator pIter = ULong_Iso_map.find( rLang );
      73      524700 :     if ( pIter != ULong_Iso_map.end())
      74      212545 :         return pIter->second;
      75      312155 :     return 0;
      76             : }
      77             : 
      78         419 : void RscLangEnum::Init( RscNameTable& rNames )
      79             : {
      80         419 :     SetConstant( rNames.Put( "SYSTEM", CONSTNAME, (long)LANGUAGE_SYSTEM ), LANGUAGE_SYSTEM );
      81         419 :     SetConstant( rNames.Put( "DONTKNOW", CONSTNAME, LANGUAGE_DONTKNOW ), LANGUAGE_DONTKNOW );
      82             : 
      83         419 :     sal_Int32 nIndex = 0;
      84         419 :     mnLangId = 0x400; // stay away from selfdefined...
      85             : 
      86         419 :     const ::std::vector< MsLangId::LanguagetagMapping > aList( MsLangId::getDefinedLanguagetags());
      87      232126 :     for (::std::vector< MsLangId::LanguagetagMapping >::const_iterator iTag( aList.begin()); iTag != aList.end(); ++iTag)
      88             :     {
      89             : #if OSL_DEBUG_LEVEL > 2
      90             :         fprintf( stderr, "ISO Language in : %d, 0x%04x, %s\n",
      91             :                 (int)nIndex,
      92             :                 (unsigned)(*iTag).mnLang,
      93             :                 OUStringToOString( (*iTag).maBcp47, RTL_TEXTENCODING_ASCII_US).getStr());
      94             :         fprintf( stderr, "ISO Language out:");
      95             : #endif
      96      231707 :         LanguageTag aLanguageTag( (*iTag).maBcp47);
      97      463414 :         ::std::vector< OUString > aFallbacks( aLanguageTag.getFallbackStrings( true));
      98      756295 :         for (::std::vector< OUString >::const_iterator it( aFallbacks.begin()); it != aFallbacks.end(); ++it)
      99             :         {
     100      524588 :             OString aLang( OUStringToOString( *it, RTL_TEXTENCODING_ASCII_US));
     101      524588 :             SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
     102      524588 :             bool bAdd = (GetLangId( aLang ) == 0);
     103      524588 :             if ( bAdd )
     104      312155 :                 ULong_Iso_map[ aLang ] = mnLangId;
     105             : #if OSL_DEBUG_LEVEL > 2
     106             :             fprintf( stderr, " %s 0x%lx (%s)", aLang.getStr(), mnLangId, (bAdd ? "added" : "exists") );
     107             : #endif
     108      524588 :             mnLangId++;
     109      524588 :         }
     110             : #if OSL_DEBUG_LEVEL > 2
     111             :         fprintf( stderr, "\n");
     112             : #endif
     113      231707 :         nIndex++;
     114      231707 :     }
     115             :     // hack - survive "x-no-translate"
     116             :     /* XXX: that ^^^ was the original comment, but we're adding "x-comment"
     117             :      * here? Which is good anyway. */
     118         419 :     SetConstant( rNames.Put( "x-comment", CONSTNAME, mnLangId ), mnLangId );
     119         419 :     mnLangId++;
     120             : 
     121         838 :     OString aEnvIsoTokens = getenv( "RSC_LANG_ISO" );
     122         419 :     if ( !aEnvIsoTokens.isEmpty() )
     123             :     {
     124           0 :         OString aIsoToken;
     125           0 :         sal_uInt16 nTokenCounter = 0;
     126           0 :         bool bOneMore = true;
     127           0 :         while ( bOneMore )
     128             :         {
     129           0 :             aIsoToken = comphelper::string::getToken(aEnvIsoTokens, nTokenCounter, ' ');
     130           0 :             if ( !aIsoToken.isEmpty() )
     131             :             {
     132           0 :                 SetConstant( rNames.Put( aIsoToken.getStr(), CONSTNAME, mnLangId ), mnLangId );
     133           0 :                 bool bAdd = (GetLangId( aIsoToken ) == 0);
     134           0 :                 if ( bAdd )
     135           0 :                     ULong_Iso_map[ aIsoToken ] = mnLangId;
     136             : #if OSL_DEBUG_LEVEL > 2
     137             :                 fprintf( stderr, "Env ISO Language out: %s 0x%lx (%s)\n",
     138             :                         aIsoToken.getStr(), mnLangId, (bAdd ? "added" : "exists") );
     139             : #endif
     140           0 :                 mnLangId++;
     141             :             }
     142             :             else
     143           0 :                 bOneMore = false;
     144             : 
     145           0 :             nTokenCounter++;
     146           0 :         }
     147         419 :     }
     148         419 : }
     149             : 
     150           0 : Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames )
     151             : {
     152           0 :     Atom nResult = 0;
     153           0 :     bool bAdd = false;
     154             :     KEY_STRUCT aStruct;
     155           0 :     if( ! rNames.Get( nResult = pHS->getID( pLang ), &aStruct ) )
     156             :     {
     157           0 :         SetConstant( nResult = rNames.Put( pLang, CONSTNAME, mnLangId ), mnLangId );
     158             :         // insert new lang to ULong_Iso_map
     159           0 :         OString aLang( pLang );
     160           0 :         bAdd = (GetLangId( aLang ) == 0);
     161           0 :         if ( bAdd )
     162           0 :             ULong_Iso_map[ aLang ] = mnLangId;
     163             :         // increase id counter
     164           0 :         mnLangId++;
     165             :     }
     166             : #if OSL_DEBUG_LEVEL > 2
     167             :     fprintf( stderr, "AddLanguage( '%s' ) = %d (%s)\n", pLang, nResult, (bAdd ? "added" : "exists") );
     168             : #endif
     169           0 :     return nResult;
     170             : }
     171             : 
     172         419 : RscEnum * RscTypCont::InitLangType()
     173             : {
     174         419 :     aLangType.Init( aNmTb );
     175         419 :     return &aLangType;
     176             : }
     177             : 
     178         419 : RscEnum * RscTypCont::InitFieldUnitsType()
     179             : {
     180             :     RscEnum * pFieldUnits;
     181         419 :     pFieldUnits = new RscEnum( pHS->getID( "EnumFieldUnit" ), RSC_NOTYPE );
     182             : 
     183         419 :     SETCONST( pFieldUnits, "FUNIT_NONE", FUNIT_NONE );
     184         419 :     SETCONST( pFieldUnits, "FUNIT_MM", FUNIT_MM );
     185         419 :     SETCONST( pFieldUnits, "FUNIT_CM", FUNIT_CM );
     186         419 :     SETCONST( pFieldUnits, "FUNIT_M", FUNIT_M );
     187         419 :     SETCONST( pFieldUnits, "FUNIT_KM", FUNIT_KM );
     188         419 :     SETCONST( pFieldUnits, "FUNIT_TWIP", FUNIT_TWIP );
     189         419 :     SETCONST( pFieldUnits, "FUNIT_POINT", FUNIT_POINT );
     190         419 :     SETCONST( pFieldUnits, "FUNIT_PICA", FUNIT_PICA );
     191         419 :     SETCONST( pFieldUnits, "FUNIT_INCH", FUNIT_INCH );
     192         419 :     SETCONST( pFieldUnits, "FUNIT_FOOT", FUNIT_FOOT );
     193         419 :     SETCONST( pFieldUnits, "FUNIT_MILE", FUNIT_MILE );
     194         419 :     SETCONST( pFieldUnits, "FUNIT_CUSTOM", FUNIT_CUSTOM );
     195         419 :     SETCONST( pFieldUnits, "FUNIT_CHAR", FUNIT_CHAR );
     196         419 :     SETCONST( pFieldUnits, "FUNIT_LINE", FUNIT_LINE );
     197         419 :     SETCONST( pFieldUnits, "FUNIT_PERCENT", FUNIT_PERCENT );
     198         419 :     SETCONST( pFieldUnits, "FUNIT_DEGREE",  FUNIT_DEGREE);
     199         419 :     SETCONST( pFieldUnits, "FUNIT_SECOND",  FUNIT_SECOND);
     200         419 :     SETCONST( pFieldUnits, "FUNIT_MILLISECOND",  FUNIT_MILLISECOND);
     201         419 :     SETCONST( pFieldUnits, "FUNIT_PIXEL",   FUNIT_PIXEL );
     202             : 
     203         419 :     return pFieldUnits;
     204             : }
     205             : 
     206         419 : RscEnum * RscTypCont::InitTimeFieldFormat()
     207             : {
     208             :     RscEnum * pTimeFieldFormat;
     209         838 :     pTimeFieldFormat = new RscEnum( pHS->getID( "EnumTimeFieldFormat" ),
     210         419 :                                     RSC_NOTYPE );
     211             : 
     212         419 :     SETCONST( pTimeFieldFormat, "TIMEF_NONE", TimeFieldFormat::F_NONE );
     213         419 :     SETCONST( pTimeFieldFormat, "TIMEF_SEC", TimeFieldFormat::F_SEC );
     214         419 :     SETCONST( pTimeFieldFormat, "TIMEF_100TH_SEC", TimeFieldFormat::F_100TH_SEC );
     215             : 
     216         419 :     return pTimeFieldFormat;
     217             : }
     218             : 
     219         419 : RscEnum * RscTypCont::InitColor()
     220             : {
     221             :     RscEnum * pColor;
     222         419 :     pColor = new RscEnum( pHS->getID( "EnumColor" ), RSC_NOTYPE );
     223             : 
     224         419 :     SETCONST( pColor, "COL_BLACK",                  COL_BLACK );
     225         419 :     SETCONST( pColor, "COL_BLUE",                   COL_BLUE );
     226         419 :     SETCONST( pColor, "COL_GREEN",                  COL_GREEN );
     227         419 :     SETCONST( pColor, "COL_CYAN",                   COL_CYAN );
     228         419 :     SETCONST( pColor, "COL_RED",                    COL_RED );
     229         419 :     SETCONST( pColor, "COL_MAGENTA",                COL_MAGENTA );
     230         419 :     SETCONST( pColor, "COL_BROWN",                  COL_BROWN );
     231         419 :     SETCONST( pColor, "COL_GRAY",                   COL_GRAY );
     232         419 :     SETCONST( pColor, "COL_LIGHTGRAY",              COL_LIGHTGRAY );
     233         419 :     SETCONST( pColor, "COL_LIGHTBLUE",              COL_LIGHTBLUE );
     234         419 :     SETCONST( pColor, "COL_LIGHTGREEN",             COL_LIGHTGREEN );
     235         419 :     SETCONST( pColor, "COL_LIGHTCYAN",              COL_LIGHTCYAN );
     236         419 :     SETCONST( pColor, "COL_LIGHTRED",               COL_LIGHTRED );
     237         419 :     SETCONST( pColor, "COL_LIGHTMAGENTA",           COL_LIGHTMAGENTA );
     238         419 :     SETCONST( pColor, "COL_YELLOW",                 COL_YELLOW );
     239         419 :     SETCONST( pColor, "COL_WHITE",                  COL_WHITE );
     240             : 
     241         419 :     return pColor;
     242             : }
     243             : 
     244         419 : RscEnum * RscTypCont::InitMapUnit()
     245             : {
     246             :     RscEnum * pMapUnit;
     247         419 :     pMapUnit = new RscEnum( pHS->getID( "EnumMapUnit" ), RSC_NOTYPE );
     248             : 
     249         419 :     SETCONST( pMapUnit, "MAP_PIXEL",                  MAP_PIXEL );
     250         419 :     SETCONST( pMapUnit, "MAP_SYSFONT",                MAP_SYSFONT );
     251         419 :     SETCONST( pMapUnit, "MAP_100TH_MM",               MAP_100TH_MM );
     252         419 :     SETCONST( pMapUnit, "MAP_10TH_MM",                MAP_10TH_MM );
     253         419 :     SETCONST( pMapUnit, "MAP_MM",                     MAP_MM );
     254         419 :     SETCONST( pMapUnit, "MAP_CM",                     MAP_CM );
     255         419 :     SETCONST( pMapUnit, "MAP_1000TH_INCH",            MAP_1000TH_INCH );
     256         419 :     SETCONST( pMapUnit, "MAP_100TH_INCH",             MAP_100TH_INCH );
     257         419 :     SETCONST( pMapUnit, "MAP_10TH_INCH",              MAP_10TH_INCH );
     258         419 :     SETCONST( pMapUnit, "MAP_INCH",                   MAP_INCH );
     259         419 :     SETCONST( pMapUnit, "MAP_POINT",                  MAP_POINT );
     260         419 :     SETCONST( pMapUnit, "MAP_TWIP",                   MAP_TWIP );
     261         419 :     SETCONST( pMapUnit, "MAP_APPFONT",                MAP_APPFONT );
     262         419 :     SETCONST( pMapUnit, "MAP_SV",                     RSC_EXTRAMAPUNIT );
     263         419 :     return pMapUnit;
     264             : }
     265             : 
     266         419 : RscEnum * RscTypCont::InitKey()
     267             : {
     268             :     RscEnum * pKey;
     269         419 :     pKey = new RscEnum( pHS->getID( "EnumKey" ), RSC_NOTYPE );
     270             : 
     271         419 :     SETCONST( pKey, "KEY_0",                    com::sun::star::awt::Key::NUM0 );
     272         419 :     SETCONST( pKey, "KEY_1",                    com::sun::star::awt::Key::NUM1 );
     273         419 :     SETCONST( pKey, "KEY_2",                    com::sun::star::awt::Key::NUM2 );
     274         419 :     SETCONST( pKey, "KEY_3",                    com::sun::star::awt::Key::NUM3 );
     275         419 :     SETCONST( pKey, "KEY_4",                    com::sun::star::awt::Key::NUM4 );
     276         419 :     SETCONST( pKey, "KEY_5",                    com::sun::star::awt::Key::NUM5 );
     277         419 :     SETCONST( pKey, "KEY_6",                    com::sun::star::awt::Key::NUM6 );
     278         419 :     SETCONST( pKey, "KEY_7",                    com::sun::star::awt::Key::NUM7 );
     279         419 :     SETCONST( pKey, "KEY_8",                    com::sun::star::awt::Key::NUM8 );
     280         419 :     SETCONST( pKey, "KEY_9",                    com::sun::star::awt::Key::NUM9 );
     281             : 
     282         419 :     SETCONST( pKey, "KEY_A",                    com::sun::star::awt::Key::A );
     283         419 :     SETCONST( pKey, "KEY_B",                    com::sun::star::awt::Key::B );
     284         419 :     SETCONST( pKey, "KEY_C",                    com::sun::star::awt::Key::C );
     285         419 :     SETCONST( pKey, "KEY_D",                    com::sun::star::awt::Key::D );
     286         419 :     SETCONST( pKey, "KEY_E",                    com::sun::star::awt::Key::E );
     287         419 :     SETCONST( pKey, "KEY_F",                    com::sun::star::awt::Key::F );
     288         419 :     SETCONST( pKey, "KEY_G",                    com::sun::star::awt::Key::G );
     289         419 :     SETCONST( pKey, "KEY_H",                    com::sun::star::awt::Key::H );
     290         419 :     SETCONST( pKey, "KEY_I",                    com::sun::star::awt::Key::I );
     291         419 :     SETCONST( pKey, "KEY_J",                    com::sun::star::awt::Key::J );
     292         419 :     SETCONST( pKey, "KEY_K",                    com::sun::star::awt::Key::K );
     293         419 :     SETCONST( pKey, "KEY_L",                    com::sun::star::awt::Key::L );
     294         419 :     SETCONST( pKey, "KEY_M",                    com::sun::star::awt::Key::M );
     295         419 :     SETCONST( pKey, "KEY_N",                    com::sun::star::awt::Key::N );
     296         419 :     SETCONST( pKey, "KEY_O",                    com::sun::star::awt::Key::O );
     297         419 :     SETCONST( pKey, "KEY_P",                    com::sun::star::awt::Key::P );
     298         419 :     SETCONST( pKey, "KEY_Q",                    com::sun::star::awt::Key::Q );
     299         419 :     SETCONST( pKey, "KEY_R",                    com::sun::star::awt::Key::R );
     300         419 :     SETCONST( pKey, "KEY_S",                    com::sun::star::awt::Key::S );
     301         419 :     SETCONST( pKey, "KEY_T",                    com::sun::star::awt::Key::T );
     302         419 :     SETCONST( pKey, "KEY_U",                    com::sun::star::awt::Key::U );
     303         419 :     SETCONST( pKey, "KEY_V",                    com::sun::star::awt::Key::V );
     304         419 :     SETCONST( pKey, "KEY_W",                    com::sun::star::awt::Key::W );
     305         419 :     SETCONST( pKey, "KEY_X",                    com::sun::star::awt::Key::X );
     306         419 :     SETCONST( pKey, "KEY_Y",                    com::sun::star::awt::Key::Y );
     307         419 :     SETCONST( pKey, "KEY_Z",                    com::sun::star::awt::Key::Z );
     308             : 
     309         419 :     SETCONST( pKey, "KEY_F1",                   com::sun::star::awt::Key::F1 );
     310         419 :     SETCONST( pKey, "KEY_F2",                   com::sun::star::awt::Key::F2 );
     311         419 :     SETCONST( pKey, "KEY_F3",                   com::sun::star::awt::Key::F3 );
     312         419 :     SETCONST( pKey, "KEY_F4",                   com::sun::star::awt::Key::F4 );
     313         419 :     SETCONST( pKey, "KEY_F5",                   com::sun::star::awt::Key::F5 );
     314         419 :     SETCONST( pKey, "KEY_F6",                   com::sun::star::awt::Key::F6 );
     315         419 :     SETCONST( pKey, "KEY_F7",                   com::sun::star::awt::Key::F7 );
     316         419 :     SETCONST( pKey, "KEY_F8",                   com::sun::star::awt::Key::F8 );
     317         419 :     SETCONST( pKey, "KEY_F9",                   com::sun::star::awt::Key::F9 );
     318         419 :     SETCONST( pKey, "KEY_F10",                  com::sun::star::awt::Key::F10 );
     319         419 :     SETCONST( pKey, "KEY_F11",                  com::sun::star::awt::Key::F11 );
     320         419 :     SETCONST( pKey, "KEY_F12",                  com::sun::star::awt::Key::F12 );
     321         419 :     SETCONST( pKey, "KEY_F13",                  com::sun::star::awt::Key::F13 );
     322         419 :     SETCONST( pKey, "KEY_F14",                  com::sun::star::awt::Key::F14 );
     323         419 :     SETCONST( pKey, "KEY_F15",                  com::sun::star::awt::Key::F15 );
     324         419 :     SETCONST( pKey, "KEY_F16",                  com::sun::star::awt::Key::F16 );
     325         419 :     SETCONST( pKey, "KEY_F17",                  com::sun::star::awt::Key::F17 );
     326         419 :     SETCONST( pKey, "KEY_F18",                  com::sun::star::awt::Key::F18 );
     327         419 :     SETCONST( pKey, "KEY_F19",                  com::sun::star::awt::Key::F19 );
     328         419 :     SETCONST( pKey, "KEY_F20",                  com::sun::star::awt::Key::F20 );
     329         419 :     SETCONST( pKey, "KEY_F21",                  com::sun::star::awt::Key::F21 );
     330         419 :     SETCONST( pKey, "KEY_F22",                  com::sun::star::awt::Key::F22 );
     331         419 :     SETCONST( pKey, "KEY_F23",                  com::sun::star::awt::Key::F23 );
     332         419 :     SETCONST( pKey, "KEY_F24",                  com::sun::star::awt::Key::F24 );
     333         419 :     SETCONST( pKey, "KEY_F25",                  com::sun::star::awt::Key::F25 );
     334         419 :     SETCONST( pKey, "KEY_F26",                  com::sun::star::awt::Key::F26 );
     335             : 
     336         419 :     SETCONST( pKey, "KEY_DOWN",                 com::sun::star::awt::Key::DOWN );
     337         419 :     SETCONST( pKey, "KEY_UP",                   com::sun::star::awt::Key::UP );
     338         419 :     SETCONST( pKey, "KEY_LEFT",                 com::sun::star::awt::Key::LEFT );
     339         419 :     SETCONST( pKey, "KEY_RIGHT",                com::sun::star::awt::Key::RIGHT );
     340         419 :     SETCONST( pKey, "KEY_HOME",                 com::sun::star::awt::Key::HOME );
     341         419 :     SETCONST( pKey, "KEY_END",                  com::sun::star::awt::Key::END );
     342         419 :     SETCONST( pKey, "KEY_PAGEUP",               com::sun::star::awt::Key::PAGEUP );
     343         419 :     SETCONST( pKey, "KEY_PAGEDOWN",             com::sun::star::awt::Key::PAGEDOWN );
     344             : 
     345         419 :     SETCONST( pKey, "KEY_RETURN",               com::sun::star::awt::Key::RETURN );
     346         419 :     SETCONST( pKey, "KEY_ESCAPE",               com::sun::star::awt::Key::ESCAPE );
     347         419 :     SETCONST( pKey, "KEY_TAB",                  com::sun::star::awt::Key::TAB );
     348         419 :     SETCONST( pKey, "KEY_BACKSPACE",            com::sun::star::awt::Key::BACKSPACE );
     349         419 :     SETCONST( pKey, "KEY_SPACE",                com::sun::star::awt::Key::SPACE );
     350         419 :     SETCONST( pKey, "KEY_INSERT",               com::sun::star::awt::Key::INSERT );
     351         419 :     SETCONST( pKey, "KEY_DELETE",               com::sun::star::awt::Key::DELETE );
     352             : 
     353         419 :     SETCONST( pKey, "KEY_ADD",                  com::sun::star::awt::Key::ADD );
     354         419 :     SETCONST( pKey, "KEY_SUBTRACT",             com::sun::star::awt::Key::SUBTRACT );
     355         419 :     SETCONST( pKey, "KEY_MULTIPLY",             com::sun::star::awt::Key::MULTIPLY );
     356         419 :     SETCONST( pKey, "KEY_DIVIDE",               com::sun::star::awt::Key::DIVIDE );
     357         419 :     SETCONST( pKey, "KEY_POINT",                com::sun::star::awt::Key::POINT );
     358         419 :     SETCONST( pKey, "KEY_COMMA",                com::sun::star::awt::Key::COMMA );
     359         419 :     SETCONST( pKey, "KEY_LESS",                 com::sun::star::awt::Key::LESS );
     360         419 :     SETCONST( pKey, "KEY_GREATER",              com::sun::star::awt::Key::GREATER );
     361         419 :     SETCONST( pKey, "KEY_EQUAL",                com::sun::star::awt::Key::EQUAL );
     362             : 
     363         419 :     SETCONST( pKey, "KEY_OPEN",                 com::sun::star::awt::Key::OPEN );
     364         419 :     SETCONST( pKey, "KEY_CUT",                  com::sun::star::awt::Key::CUT );
     365         419 :     SETCONST( pKey, "KEY_COPY",                 com::sun::star::awt::Key::COPY );
     366         419 :     SETCONST( pKey, "KEY_PASTE",                com::sun::star::awt::Key::PASTE );
     367         419 :     SETCONST( pKey, "KEY_UNDO",                 com::sun::star::awt::Key::UNDO );
     368         419 :     SETCONST( pKey, "KEY_REPEAT",               com::sun::star::awt::Key::REPEAT );
     369         419 :     SETCONST( pKey, "KEY_FIND",                 com::sun::star::awt::Key::FIND );
     370         419 :     SETCONST( pKey, "KEY_PROPERTIES",           com::sun::star::awt::Key::PROPERTIES );
     371         419 :     SETCONST( pKey, "KEY_FRONT",                com::sun::star::awt::Key::FRONT );
     372         419 :     SETCONST( pKey, "KEY_CONTEXTMENU",          com::sun::star::awt::Key::CONTEXTMENU );
     373         419 :     SETCONST( pKey, "KEY_HELP",                 com::sun::star::awt::Key::HELP );
     374         419 :     SETCONST( pKey, "KEY_HANGUL_HANJA",         com::sun::star::awt::Key::HANGUL_HANJA );
     375         419 :     SETCONST( pKey, "KEY_DECIMAL",              com::sun::star::awt::Key::DECIMAL );
     376         419 :     SETCONST( pKey, "KEY_TILDE",                com::sun::star::awt::Key::TILDE );
     377         419 :     SETCONST( pKey, "KEY_QUOTELEFT",            com::sun::star::awt::Key::QUOTELEFT );
     378             : 
     379         419 :     return pKey;
     380             : }
     381             : 
     382         419 : RscEnum * RscTypCont::InitTriState()
     383             : {
     384             :     RscEnum * pTriState;
     385         419 :     pTriState = new RscEnum( pHS->getID( "EnumTriState" ), RSC_NOTYPE );
     386             : 
     387         419 :     SETCONST( pTriState, "STATE_NOCHECK",      TRISTATE_FALSE  );
     388         419 :     SETCONST( pTriState, "STATE_CHECK",        TRISTATE_TRUE    );
     389         419 :     SETCONST( pTriState, "STATE_DONTKNOW",     TRISTATE_INDET );
     390             : 
     391         419 :     return pTriState;
     392             : }
     393             : 
     394         419 : RscTupel * RscTypCont::InitGeometry()
     395             : {
     396             :     RscTop *    pTupel;
     397             :     Atom        nId;
     398             : 
     399             :     // Clientvariablen einfuegen
     400         838 :     pTupel = new RscTupel( pHS->getID( "TupelDeltaSystem" ),
     401         419 :                                 RSC_NOTYPE, NULL );
     402         419 :     nId = aNmTb.Put( "X", VARNAME );
     403         419 :     pTupel->SetVariable( nId, &aShort );
     404         419 :     nId = aNmTb.Put( "Y", VARNAME );
     405         419 :     pTupel->SetVariable( nId, &aShort );
     406         419 :     nId = aNmTb.Put( "WIDTH", VARNAME );
     407         419 :     pTupel->SetVariable( nId, &aShort );
     408         419 :     nId = aNmTb.Put( "HEIGHT", VARNAME );
     409         419 :     pTupel->SetVariable( nId, &aShort );
     410             : 
     411         419 :     return static_cast<RscTupel *>(pTupel);
     412             : }
     413             : 
     414         419 : RscArray * RscTypCont::InitLangGeometry( RscTupel * pGeo )
     415             : {
     416         419 :     return new RscArray( pHS->getID( "Lang_TupelGeometry" ), RSC_NOTYPE, pGeo, &aLangType );
     417             : }
     418             : 
     419         419 : RscCont * RscTypCont::InitStringList()
     420             : {
     421             :     RscCont * pCont;
     422             : 
     423         419 :     pCont = new RscCont( pHS->getID( "Chars[]" ), RSC_NOTYPE );
     424         419 :     pCont->SetTypeClass( &aString );
     425             : 
     426         419 :     return pCont;
     427             : }
     428             : 
     429         419 : RscArray * RscTypCont::InitLangStringList( RscCont * pStrLst )
     430             : {
     431         838 :     return new RscArray( pHS->getID( "Lang_CharsList" ),
     432         838 :                          RSC_NOTYPE, pStrLst, &aLangType );
     433             : }
     434             : 
     435         419 : RscTupel * RscTypCont::InitStringTupel()
     436             : {
     437             :     RscTop *    pTupel;
     438             :     Atom        nId;
     439             : 
     440             :     // Clientvariablen einfuegen
     441         419 :     pTupel = new RscTupel( pHS->getID( "CharsTupel" ), RSC_NOTYPE, NULL );
     442         419 :     nId = aNmTb.Put( "FILTER", VARNAME );
     443         419 :     pTupel->SetVariable( nId, &aString );
     444         419 :     nId = aNmTb.Put( "MASK", VARNAME );
     445         419 :     pTupel->SetVariable( nId, &aString );
     446             : 
     447         419 :     return static_cast<RscTupel *>(pTupel);
     448             : }
     449             : 
     450         419 : RscTupel * RscTypCont::InitStringLongTupel()
     451             : {
     452             :     RscTop *    pTupel;
     453             :     Atom        nId;
     454             : 
     455             :     // Clientvariablen einfuegen
     456         419 :     pTupel = new RscTupel( pHS->getID( "CharsLongTupel" ), RSC_NOTYPE, NULL );
     457         419 :     nId = aNmTb.Put( "ItemText", VARNAME );
     458         419 :     pTupel->SetVariable( nId, &aString );
     459         419 :     nId = aNmTb.Put( "ItemId", VARNAME );
     460         419 :     pTupel->SetVariable( nId, &aEnumLong );
     461             : 
     462         419 :     return static_cast<RscTupel *>(pTupel);
     463             : }
     464             : 
     465         419 : RscCont * RscTypCont::InitStringTupelList( RscTupel * pTupelString )
     466             : {
     467             :     RscCont * pCont;
     468             : 
     469         419 :     pCont = new RscCont( pHS->getID( "CharsCharsTupel[]" ), RSC_NOTYPE );
     470         419 :     pCont->SetTypeClass( pTupelString );
     471             : 
     472         419 :     return pCont;
     473             : }
     474             : 
     475         419 : RscCont * RscTypCont::InitStringLongTupelList( RscTupel * pStringLong )
     476             : {
     477             :     RscCont * pCont;
     478             : 
     479         419 :     pCont = new RscCont( pHS->getID( "CharsLongTupel[]" ), RSC_NOTYPE );
     480         419 :     pCont->SetTypeClass( pStringLong );
     481             : 
     482         419 :     return pCont;
     483             : }
     484             : 
     485         419 : RscArray * RscTypCont::InitLangStringTupelList( RscCont * pStrTupelLst )
     486             : {
     487         838 :     return new RscArray( pHS->getID( "Lang_CharsCharsTupel" ),
     488         838 :                          RSC_NOTYPE, pStrTupelLst, &aLangType );
     489             : }
     490             : 
     491         419 : RscArray * RscTypCont::InitLangStringLongTupelList( RscCont * pStrLongTupelLst )
     492             : {
     493         838 :     return new RscArray( pHS->getID( "Lang_CharsLongTupelList" ),
     494         838 :                          RSC_NOTYPE, pStrLongTupelLst, &aLangType );
     495        1257 : }
     496             : 
     497             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10