LCOV - code coverage report
Current view: top level - libreoffice/rsc/source/parser - rscibas.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 316 0.0 %
Date: 2012-12-17 Functions: 0 26 0.0 %
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             : /****************** I N C L U D E S **************************************/
      22             : // C and C++ Includes.
      23             : #include <stdlib.h>
      24             : #include <stdio.h>
      25             : #include <string.h>
      26             : 
      27             : #include <i18npool/mslangid.hxx>
      28             : #include <i18npool/languagetag.hxx>
      29             : #include <comphelper/string.hxx>
      30             : #include <tools/rc.h>
      31             : #include <tools/color.hxx>
      32             : 
      33             : #include <vclrsc.hxx>
      34             : #include <rscconst.hxx>
      35             : #include <rscarray.hxx>
      36             : #include <rscclass.hxx>
      37             : #include <rsccont.hxx>
      38             : #include <rscdb.hxx>
      39             : 
      40             : 
      41             : #include <rsclex.hxx>
      42             : #include <rscyacc.hxx>
      43             : 
      44             : #include <boost/unordered_map.hpp>
      45             : 
      46             : /****************** M A C R O S ******************************************/
      47           0 : void RscTypCont::SETCONST( RscConst * pClass, const char * szString, sal_uInt32 nVal )
      48             : {
      49             : #if OSL_DEBUG_LEVEL > 2
      50             :     fprintf( stderr, "setconst : %s\n", szString );
      51             : #endif
      52             :     pClass->SetConstant( aNmTb.Put( szString,
      53           0 :                          CONSTNAME, nVal ), nVal );
      54           0 : }
      55             : 
      56           0 : void RscTypCont::SETCONST( RscConst * pClass, Atom nName, sal_uInt32 nVal )
      57             : {
      58             : #if OSL_DEBUG_LEVEL > 2
      59             :     fprintf( stderr, "setconst hash: %u\n", (unsigned int)nName );
      60             : #endif
      61             :     pClass->SetConstant( aNmTb.Put( nName,
      62           0 :                          CONSTNAME, nVal ), nVal );
      63           0 : }
      64             : 
      65             : /****************** C O D E **********************************************/
      66             : /*************************************************************************
      67             : |*    RscTypCont::InitLangType()
      68             : |*
      69             : |*    Beschreibung
      70             : *************************************************************************/
      71             : 
      72             : typedef boost::unordered_map< rtl::OString, sal_uInt32, rtl::OStringHash > langmap;
      73           0 : static langmap ULong_Iso_map;
      74             : 
      75           0 : sal_uInt32 GetLangId(const rtl::OString &rLang)
      76             : {
      77           0 :     langmap::iterator pIter = ULong_Iso_map.find( rLang );
      78           0 :     if ( pIter != ULong_Iso_map.end())
      79           0 :         return pIter->second;
      80           0 :     return 0;
      81             : }
      82             : 
      83           0 : void RscLangEnum::Init( RscNameTable& rNames )
      84             : {
      85           0 :     SetConstant( rNames.Put( "SYSTEM", CONSTNAME, (long)LANGUAGE_SYSTEM ), LANGUAGE_SYSTEM );
      86           0 :     SetConstant( rNames.Put( "DONTKNOW", CONSTNAME, LANGUAGE_DONTKNOW ), LANGUAGE_DONTKNOW );
      87             : 
      88           0 :     sal_Int32 nIndex = 0;
      89           0 :     mnLangId = 0x400; // stay away from selfdefined...
      90             :     const MsLangId::IsoLangEntry* pLangEntry;
      91             : 
      92           0 :     while ( NULL != ( pLangEntry = MsLangId::getIsoLangEntry( nIndex )) && ( pLangEntry->mnLang != LANGUAGE_DONTKNOW ))
      93             :     {
      94             : #if OSL_DEBUG_LEVEL > 2
      95             :         fprintf( stderr, "ISO Language in : %d\n",
      96             :                  (int)nIndex,
      97             :                  pLangEntry->mnLang,
      98             :                  OUStringToOString( LanguageTag( pLangEntry->mnLang ).getBcp47(), RTL_TEXTENCODING_ASCII_US).getStr() );
      99             : #endif
     100           0 :         rtl::OString aLang(pLangEntry->maLangStr, strlen(pLangEntry->maLangStr));
     101           0 :         rtl::OString aCountry(pLangEntry->maCountry, strlen(pLangEntry->maCountry));
     102           0 :         if ( aCountry.isEmpty() || aLang.equalsIgnoreAsciiCase(aCountry) )
     103             :         {
     104           0 :             SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
     105           0 :             if ( ! GetLangId( aLang ))
     106           0 :                 ULong_Iso_map[ aLang ] = mnLangId;
     107             : #if OSL_DEBUG_LEVEL > 2
     108             :             fprintf( stderr, "ISO Language out: %s 0x%lx\n", aLang.getStr(), mnLangId );
     109             : #endif
     110           0 :             mnLangId++;
     111             :         }
     112             :         else
     113             :         {
     114           0 :             SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
     115           0 :             if ( ! GetLangId( aLang ))
     116           0 :                 ULong_Iso_map[ aLang ] = mnLangId;
     117             : #if OSL_DEBUG_LEVEL > 2
     118             :             fprintf( stderr, "ISO Language out: %s 0x%lx", aLang.getStr(), mnLangId );
     119             : #endif
     120           0 :             mnLangId++;
     121           0 :             aLang = aLang + rtl::OString( '-' ) + aCountry.toAsciiUpperCase();
     122           0 :             SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
     123           0 :             if ( ! GetLangId( aLang ))
     124           0 :                 ULong_Iso_map[ aLang ] = mnLangId;
     125             : #if OSL_DEBUG_LEVEL > 2
     126             :             fprintf( stderr, " %s 0x%lx\n", aLang.getStr(), mnLangId );
     127             : #endif
     128           0 :             mnLangId++;
     129             : // hack - survive "x-no-translate"
     130           0 :             if (aLang.equalsL(RTL_CONSTASCII_STRINGPARAM("en-US")))
     131             :             {
     132           0 :                 SetConstant( rNames.Put( "x-comment", CONSTNAME, mnLangId ), mnLangId );
     133           0 :                 mnLangId++;
     134             :             }
     135             :         }
     136           0 :         nIndex++;
     137           0 :     }
     138             : 
     139           0 :     rtl::OString aEnvIsoTokens = getenv( "RSC_LANG_ISO" );
     140           0 :     if ( !aEnvIsoTokens.isEmpty() )
     141             :     {
     142           0 :         rtl::OString aIsoToken;
     143           0 :         sal_uInt16 nTokenCounter = 0;
     144           0 :         sal_Bool bOneMore = 1;
     145           0 :         while ( bOneMore )
     146             :         {
     147           0 :             aIsoToken = comphelper::string::getToken(aEnvIsoTokens, nTokenCounter, ' ');
     148           0 :             if ( !aIsoToken.isEmpty() )
     149             :             {
     150           0 :                 SetConstant( rNames.Put( aIsoToken.getStr(), CONSTNAME, mnLangId ), mnLangId );
     151           0 :                 if ( ! GetLangId( aIsoToken ))
     152           0 :                     ULong_Iso_map[ aIsoToken ] = mnLangId;
     153             : #if OSL_DEBUG_LEVEL > 2
     154             :                 fprintf( stderr, "Env ISO Language out: %s 0x%lx\n", aIsoToken.getStr(), mnLangId );
     155             : #endif
     156           0 :                 mnLangId++;
     157             :             }
     158             :             else
     159           0 :                 bOneMore = 0;
     160           0 :             nTokenCounter++;
     161           0 :         }
     162             :     }
     163             : 
     164           0 :     SetConstant( rNames.Put( "LANGUAGE_USER1", CONSTNAME, LANGUAGE_USER1 ), LANGUAGE_USER1 );
     165           0 :     SetConstant( rNames.Put( "LANGUAGE_USER2", CONSTNAME, LANGUAGE_USER2 ), LANGUAGE_USER2 );
     166           0 :     SetConstant( rNames.Put( "LANGUAGE_USER3", CONSTNAME, LANGUAGE_USER3 ), LANGUAGE_USER3 );
     167           0 :     SetConstant( rNames.Put( "LANGUAGE_USER4", CONSTNAME, LANGUAGE_USER4 ), LANGUAGE_USER4 );
     168           0 :     SetConstant( rNames.Put( "LANGUAGE_USER5", CONSTNAME, LANGUAGE_USER5 ), LANGUAGE_USER5 );
     169           0 :     SetConstant( rNames.Put( "LANGUAGE_USER6", CONSTNAME, LANGUAGE_USER6 ), LANGUAGE_USER6 );
     170           0 :     SetConstant( rNames.Put( "LANGUAGE_USER7", CONSTNAME, LANGUAGE_USER7 ), LANGUAGE_USER7 );
     171           0 :     SetConstant( rNames.Put( "LANGUAGE_USER8", CONSTNAME, LANGUAGE_USER8 ), LANGUAGE_USER8 );
     172           0 :     SetConstant( rNames.Put( "EXTERN", CONSTNAME, LANGUAGE_USER9 ), LANGUAGE_USER9 );
     173           0 : }
     174             : 
     175           0 : Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames )
     176             : {
     177           0 :     Atom nResult = 0;
     178             :     KEY_STRUCT aStruct;
     179           0 :     if( ! rNames.Get( nResult = pHS->getID( pLang ), &aStruct ) )
     180             :     {
     181           0 :         SetConstant( nResult = rNames.Put( pLang, CONSTNAME, mnLangId ), mnLangId );
     182             :         // insert new lang to ULong_Iso_map
     183           0 :         rtl::OString aLang( pLang );
     184           0 :         if ( ! GetLangId( aLang ))
     185           0 :             ULong_Iso_map[ aLang ] = mnLangId;
     186             :         // increase id counter
     187           0 :         mnLangId++;
     188             :     }
     189             :     #if OSL_DEBUG_LEVEL > 2
     190             :     fprintf( stderr, "AddLanguage( %s ) = %d\n", pLang, nResult );
     191             :     #endif
     192           0 :     return nResult;
     193             : }
     194             : 
     195           0 : RscEnum * RscTypCont::InitLangType()
     196             : {
     197           0 :     aLangType.Init( aNmTb );
     198           0 :     return( &aLangType );
     199             : }
     200             : 
     201             : /*************************************************************************
     202             : |*
     203             : |*    RscTypCont::InitFieldUnitsType()
     204             : |*
     205             : *************************************************************************/
     206           0 : RscEnum * RscTypCont::InitFieldUnitsType()
     207             : {
     208             :     RscEnum * pFieldUnits;
     209           0 :     pFieldUnits = new RscEnum( pHS->getID( "EnumFieldUnit" ), RSC_NOTYPE );
     210             : 
     211           0 :     SETCONST( pFieldUnits, "FUNIT_NONE", FUNIT_NONE );
     212           0 :     SETCONST( pFieldUnits, "FUNIT_MM", FUNIT_MM );
     213           0 :     SETCONST( pFieldUnits, "FUNIT_CM", FUNIT_CM );
     214           0 :     SETCONST( pFieldUnits, "FUNIT_M", FUNIT_M );
     215           0 :     SETCONST( pFieldUnits, "FUNIT_KM", FUNIT_KM );
     216           0 :     SETCONST( pFieldUnits, "FUNIT_TWIP", FUNIT_TWIP );
     217           0 :     SETCONST( pFieldUnits, "FUNIT_POINT", FUNIT_POINT );
     218           0 :     SETCONST( pFieldUnits, "FUNIT_PICA", FUNIT_PICA );
     219           0 :     SETCONST( pFieldUnits, "FUNIT_INCH", FUNIT_INCH );
     220           0 :     SETCONST( pFieldUnits, "FUNIT_FOOT", FUNIT_FOOT );
     221           0 :     SETCONST( pFieldUnits, "FUNIT_MILE", FUNIT_MILE );
     222           0 :     SETCONST( pFieldUnits, "FUNIT_CUSTOM", FUNIT_CUSTOM );
     223           0 :     SETCONST( pFieldUnits, "FUNIT_CHAR", FUNIT_CHAR );
     224           0 :     SETCONST( pFieldUnits, "FUNIT_LINE", FUNIT_LINE );
     225           0 :     SETCONST( pFieldUnits, "FUNIT_PERCENT", FUNIT_PERCENT );
     226             : 
     227           0 :     return pFieldUnits;
     228             : }
     229             : 
     230             : /*************************************************************************
     231             : |*
     232             : |*    RscTypCont::InitTimeFieldFormat()
     233             : |*
     234             : *************************************************************************/
     235           0 : RscEnum * RscTypCont::InitTimeFieldFormat()
     236             : {
     237             :     RscEnum * pTimeFieldFormat;
     238           0 :     pTimeFieldFormat = new RscEnum( pHS->getID( "EnumTimeFieldFormat" ),
     239           0 :                                     RSC_NOTYPE );
     240             : 
     241           0 :     SETCONST( pTimeFieldFormat, "TIMEF_NONE", TIMEF_NONE );
     242           0 :     SETCONST( pTimeFieldFormat, "TIMEF_SEC", TIMEF_SEC );
     243           0 :     SETCONST( pTimeFieldFormat, "TIMEF_100TH_SEC", TIMEF_100TH_SEC );
     244             : 
     245           0 :     return pTimeFieldFormat;
     246             : }
     247             : 
     248             : /*************************************************************************
     249             : |*
     250             : |*    RscTypCont::InitColor()
     251             : |*
     252             : *************************************************************************/
     253           0 : RscEnum * RscTypCont::InitColor(){
     254             :     RscEnum * pColor;
     255           0 :     pColor = new RscEnum( pHS->getID( "EnumColor" ), RSC_NOTYPE );
     256             : 
     257           0 :     SETCONST( pColor, "COL_BLACK",                  COL_BLACK );
     258           0 :     SETCONST( pColor, "COL_BLUE",                   COL_BLUE );
     259           0 :     SETCONST( pColor, "COL_GREEN",                  COL_GREEN );
     260           0 :     SETCONST( pColor, "COL_CYAN",                   COL_CYAN );
     261           0 :     SETCONST( pColor, "COL_RED",                    COL_RED );
     262           0 :     SETCONST( pColor, "COL_MAGENTA",                COL_MAGENTA );
     263           0 :     SETCONST( pColor, "COL_BROWN",                  COL_BROWN );
     264           0 :     SETCONST( pColor, "COL_GRAY",                   COL_GRAY );
     265           0 :     SETCONST( pColor, "COL_LIGHTGRAY",              COL_LIGHTGRAY );
     266           0 :     SETCONST( pColor, "COL_LIGHTBLUE",              COL_LIGHTBLUE );
     267           0 :     SETCONST( pColor, "COL_LIGHTGREEN",             COL_LIGHTGREEN );
     268           0 :     SETCONST( pColor, "COL_LIGHTCYAN",              COL_LIGHTCYAN );
     269           0 :     SETCONST( pColor, "COL_LIGHTRED",               COL_LIGHTRED );
     270           0 :     SETCONST( pColor, "COL_LIGHTMAGENTA",           COL_LIGHTMAGENTA );
     271           0 :     SETCONST( pColor, "COL_YELLOW",                 COL_YELLOW );
     272           0 :     SETCONST( pColor, "COL_WHITE",                  COL_WHITE );
     273             : 
     274           0 :     return( pColor );
     275             : }
     276             : 
     277             : /*************************************************************************
     278             : |*
     279             : |*    RscTypCont::InitMapUnit()
     280             : |*
     281             : *************************************************************************/
     282           0 : RscEnum * RscTypCont::InitMapUnit(){
     283             :     RscEnum * pMapUnit;
     284           0 :     pMapUnit = new RscEnum( pHS->getID( "EnumMapUnit" ), RSC_NOTYPE );
     285             : 
     286           0 :     SETCONST( pMapUnit, "MAP_PIXEL",                  MAP_PIXEL );
     287           0 :     SETCONST( pMapUnit, "MAP_SYSFONT",                MAP_SYSFONT );
     288           0 :     SETCONST( pMapUnit, "MAP_100TH_MM",               MAP_100TH_MM );
     289           0 :     SETCONST( pMapUnit, "MAP_10TH_MM",                MAP_10TH_MM );
     290           0 :     SETCONST( pMapUnit, "MAP_MM",                     MAP_MM );
     291           0 :     SETCONST( pMapUnit, "MAP_CM",                     MAP_CM );
     292           0 :     SETCONST( pMapUnit, "MAP_1000TH_INCH",            MAP_1000TH_INCH );
     293           0 :     SETCONST( pMapUnit, "MAP_100TH_INCH",             MAP_100TH_INCH );
     294           0 :     SETCONST( pMapUnit, "MAP_10TH_INCH",              MAP_10TH_INCH );
     295           0 :     SETCONST( pMapUnit, "MAP_INCH",                   MAP_INCH );
     296           0 :     SETCONST( pMapUnit, "MAP_POINT",                  MAP_POINT );
     297           0 :     SETCONST( pMapUnit, "MAP_TWIP",                   MAP_TWIP );
     298           0 :     SETCONST( pMapUnit, "MAP_APPFONT",                MAP_APPFONT );
     299           0 :     SETCONST( pMapUnit, "MAP_SV",                     RSC_EXTRAMAPUNIT );
     300           0 :     return( pMapUnit );
     301             : }
     302             : 
     303             : /*************************************************************************
     304             : |*
     305             : |*    RscTypCont::InitKey()
     306             : |*
     307             : *************************************************************************/
     308           0 : RscEnum * RscTypCont::InitKey(){
     309             :     RscEnum * pKey;
     310           0 :     pKey = new RscEnum( pHS->getID( "EnumKey" ), RSC_NOTYPE );
     311             : 
     312           0 :     SETCONST( pKey, "KEY_0",                    com::sun::star::awt::Key::NUM0 );
     313           0 :     SETCONST( pKey, "KEY_1",                    com::sun::star::awt::Key::NUM1 );
     314           0 :     SETCONST( pKey, "KEY_2",                    com::sun::star::awt::Key::NUM2 );
     315           0 :     SETCONST( pKey, "KEY_3",                    com::sun::star::awt::Key::NUM3 );
     316           0 :     SETCONST( pKey, "KEY_4",                    com::sun::star::awt::Key::NUM4 );
     317           0 :     SETCONST( pKey, "KEY_5",                    com::sun::star::awt::Key::NUM5 );
     318           0 :     SETCONST( pKey, "KEY_6",                    com::sun::star::awt::Key::NUM6 );
     319           0 :     SETCONST( pKey, "KEY_7",                    com::sun::star::awt::Key::NUM7 );
     320           0 :     SETCONST( pKey, "KEY_8",                    com::sun::star::awt::Key::NUM8 );
     321           0 :     SETCONST( pKey, "KEY_9",                    com::sun::star::awt::Key::NUM9 );
     322             : 
     323           0 :     SETCONST( pKey, "KEY_A",                    com::sun::star::awt::Key::A );
     324           0 :     SETCONST( pKey, "KEY_B",                    com::sun::star::awt::Key::B );
     325           0 :     SETCONST( pKey, "KEY_C",                    com::sun::star::awt::Key::C );
     326           0 :     SETCONST( pKey, "KEY_D",                    com::sun::star::awt::Key::D );
     327           0 :     SETCONST( pKey, "KEY_E",                    com::sun::star::awt::Key::E );
     328           0 :     SETCONST( pKey, "KEY_F",                    com::sun::star::awt::Key::F );
     329           0 :     SETCONST( pKey, "KEY_G",                    com::sun::star::awt::Key::G );
     330           0 :     SETCONST( pKey, "KEY_H",                    com::sun::star::awt::Key::H );
     331           0 :     SETCONST( pKey, "KEY_I",                    com::sun::star::awt::Key::I );
     332           0 :     SETCONST( pKey, "KEY_J",                    com::sun::star::awt::Key::J );
     333           0 :     SETCONST( pKey, "KEY_K",                    com::sun::star::awt::Key::K );
     334           0 :     SETCONST( pKey, "KEY_L",                    com::sun::star::awt::Key::L );
     335           0 :     SETCONST( pKey, "KEY_M",                    com::sun::star::awt::Key::M );
     336           0 :     SETCONST( pKey, "KEY_N",                    com::sun::star::awt::Key::N );
     337           0 :     SETCONST( pKey, "KEY_O",                    com::sun::star::awt::Key::O );
     338           0 :     SETCONST( pKey, "KEY_P",                    com::sun::star::awt::Key::P );
     339           0 :     SETCONST( pKey, "KEY_Q",                    com::sun::star::awt::Key::Q );
     340           0 :     SETCONST( pKey, "KEY_R",                    com::sun::star::awt::Key::R );
     341           0 :     SETCONST( pKey, "KEY_S",                    com::sun::star::awt::Key::S );
     342           0 :     SETCONST( pKey, "KEY_T",                    com::sun::star::awt::Key::T );
     343           0 :     SETCONST( pKey, "KEY_U",                    com::sun::star::awt::Key::U );
     344           0 :     SETCONST( pKey, "KEY_V",                    com::sun::star::awt::Key::V );
     345           0 :     SETCONST( pKey, "KEY_W",                    com::sun::star::awt::Key::W );
     346           0 :     SETCONST( pKey, "KEY_X",                    com::sun::star::awt::Key::X );
     347           0 :     SETCONST( pKey, "KEY_Y",                    com::sun::star::awt::Key::Y );
     348           0 :     SETCONST( pKey, "KEY_Z",                    com::sun::star::awt::Key::Z );
     349             : 
     350           0 :     SETCONST( pKey, "KEY_F1",                   com::sun::star::awt::Key::F1 );
     351           0 :     SETCONST( pKey, "KEY_F2",                   com::sun::star::awt::Key::F2 );
     352           0 :     SETCONST( pKey, "KEY_F3",                   com::sun::star::awt::Key::F3 );
     353           0 :     SETCONST( pKey, "KEY_F4",                   com::sun::star::awt::Key::F4 );
     354           0 :     SETCONST( pKey, "KEY_F5",                   com::sun::star::awt::Key::F5 );
     355           0 :     SETCONST( pKey, "KEY_F6",                   com::sun::star::awt::Key::F6 );
     356           0 :     SETCONST( pKey, "KEY_F7",                   com::sun::star::awt::Key::F7 );
     357           0 :     SETCONST( pKey, "KEY_F8",                   com::sun::star::awt::Key::F8 );
     358           0 :     SETCONST( pKey, "KEY_F9",                   com::sun::star::awt::Key::F9 );
     359           0 :     SETCONST( pKey, "KEY_F10",                  com::sun::star::awt::Key::F10 );
     360           0 :     SETCONST( pKey, "KEY_F11",                  com::sun::star::awt::Key::F11 );
     361           0 :     SETCONST( pKey, "KEY_F12",                  com::sun::star::awt::Key::F12 );
     362           0 :     SETCONST( pKey, "KEY_F13",                  com::sun::star::awt::Key::F13 );
     363           0 :     SETCONST( pKey, "KEY_F14",                  com::sun::star::awt::Key::F14 );
     364           0 :     SETCONST( pKey, "KEY_F15",                  com::sun::star::awt::Key::F15 );
     365           0 :     SETCONST( pKey, "KEY_F16",                  com::sun::star::awt::Key::F16 );
     366           0 :     SETCONST( pKey, "KEY_F17",                  com::sun::star::awt::Key::F17 );
     367           0 :     SETCONST( pKey, "KEY_F18",                  com::sun::star::awt::Key::F18 );
     368           0 :     SETCONST( pKey, "KEY_F19",                  com::sun::star::awt::Key::F19 );
     369           0 :     SETCONST( pKey, "KEY_F20",                  com::sun::star::awt::Key::F20 );
     370           0 :     SETCONST( pKey, "KEY_F21",                  com::sun::star::awt::Key::F21 );
     371           0 :     SETCONST( pKey, "KEY_F22",                  com::sun::star::awt::Key::F22 );
     372           0 :     SETCONST( pKey, "KEY_F23",                  com::sun::star::awt::Key::F23 );
     373           0 :     SETCONST( pKey, "KEY_F24",                  com::sun::star::awt::Key::F24 );
     374           0 :     SETCONST( pKey, "KEY_F25",                  com::sun::star::awt::Key::F25 );
     375           0 :     SETCONST( pKey, "KEY_F26",                  com::sun::star::awt::Key::F26 );
     376             : 
     377           0 :     SETCONST( pKey, "KEY_DOWN",                 com::sun::star::awt::Key::DOWN );
     378           0 :     SETCONST( pKey, "KEY_UP",                   com::sun::star::awt::Key::UP );
     379           0 :     SETCONST( pKey, "KEY_LEFT",                 com::sun::star::awt::Key::LEFT );
     380           0 :     SETCONST( pKey, "KEY_RIGHT",                com::sun::star::awt::Key::RIGHT );
     381           0 :     SETCONST( pKey, "KEY_HOME",                 com::sun::star::awt::Key::HOME );
     382           0 :     SETCONST( pKey, "KEY_END",                  com::sun::star::awt::Key::END );
     383           0 :     SETCONST( pKey, "KEY_PAGEUP",               com::sun::star::awt::Key::PAGEUP );
     384           0 :     SETCONST( pKey, "KEY_PAGEDOWN",             com::sun::star::awt::Key::PAGEDOWN );
     385             : 
     386           0 :     SETCONST( pKey, "KEY_RETURN",               com::sun::star::awt::Key::RETURN );
     387           0 :     SETCONST( pKey, "KEY_ESCAPE",               com::sun::star::awt::Key::ESCAPE );
     388           0 :     SETCONST( pKey, "KEY_TAB",                  com::sun::star::awt::Key::TAB );
     389           0 :     SETCONST( pKey, "KEY_BACKSPACE",            com::sun::star::awt::Key::BACKSPACE );
     390           0 :     SETCONST( pKey, "KEY_SPACE",                com::sun::star::awt::Key::SPACE );
     391           0 :     SETCONST( pKey, "KEY_INSERT",               com::sun::star::awt::Key::INSERT );
     392           0 :     SETCONST( pKey, "KEY_DELETE",               com::sun::star::awt::Key::DELETE );
     393             : 
     394           0 :     SETCONST( pKey, "KEY_ADD",                  com::sun::star::awt::Key::ADD );
     395           0 :     SETCONST( pKey, "KEY_SUBTRACT",             com::sun::star::awt::Key::SUBTRACT );
     396           0 :     SETCONST( pKey, "KEY_MULTIPLY",             com::sun::star::awt::Key::MULTIPLY );
     397           0 :     SETCONST( pKey, "KEY_DIVIDE",               com::sun::star::awt::Key::DIVIDE );
     398           0 :     SETCONST( pKey, "KEY_POINT",                com::sun::star::awt::Key::POINT );
     399           0 :     SETCONST( pKey, "KEY_COMMA",                com::sun::star::awt::Key::COMMA );
     400           0 :     SETCONST( pKey, "KEY_LESS",                 com::sun::star::awt::Key::LESS );
     401           0 :     SETCONST( pKey, "KEY_GREATER",              com::sun::star::awt::Key::GREATER );
     402           0 :     SETCONST( pKey, "KEY_EQUAL",                com::sun::star::awt::Key::EQUAL );
     403             : 
     404           0 :     SETCONST( pKey, "KEY_OPEN",                 com::sun::star::awt::Key::OPEN );
     405           0 :     SETCONST( pKey, "KEY_CUT",                  com::sun::star::awt::Key::CUT );
     406           0 :     SETCONST( pKey, "KEY_COPY",                 com::sun::star::awt::Key::COPY );
     407           0 :     SETCONST( pKey, "KEY_PASTE",                com::sun::star::awt::Key::PASTE );
     408           0 :     SETCONST( pKey, "KEY_UNDO",                 com::sun::star::awt::Key::UNDO );
     409           0 :     SETCONST( pKey, "KEY_REPEAT",               com::sun::star::awt::Key::REPEAT );
     410           0 :     SETCONST( pKey, "KEY_FIND",                 com::sun::star::awt::Key::FIND );
     411           0 :     SETCONST( pKey, "KEY_PROPERTIES",           com::sun::star::awt::Key::PROPERTIES );
     412           0 :     SETCONST( pKey, "KEY_FRONT",                com::sun::star::awt::Key::FRONT );
     413           0 :     SETCONST( pKey, "KEY_CONTEXTMENU",          com::sun::star::awt::Key::CONTEXTMENU );
     414           0 :     SETCONST( pKey, "KEY_HELP",                 com::sun::star::awt::Key::HELP );
     415           0 :     SETCONST( pKey, "KEY_HANGUL_HANJA",         com::sun::star::awt::Key::HANGUL_HANJA );
     416           0 :     SETCONST( pKey, "KEY_DECIMAL",              com::sun::star::awt::Key::DECIMAL );
     417           0 :     SETCONST( pKey, "KEY_TILDE",                com::sun::star::awt::Key::TILDE );
     418           0 :     SETCONST( pKey, "KEY_QUOTELEFT",            com::sun::star::awt::Key::QUOTELEFT );
     419             : 
     420           0 :     return( pKey );
     421             : }
     422             : 
     423             : /*************************************************************************
     424             : |*
     425             : |*    RscTypCont::InitTriState()
     426             : |*
     427             : *************************************************************************/
     428           0 : RscEnum * RscTypCont::InitTriState(){
     429             :     RscEnum * pTriState;
     430           0 :     pTriState = new RscEnum( pHS->getID( "EnumTriState" ), RSC_NOTYPE );
     431             : 
     432           0 :     SETCONST( pTriState, "STATE_NOCHECK",      STATE_NOCHECK  );
     433           0 :     SETCONST( pTriState, "STATE_CHECK",        STATE_CHECK    );
     434           0 :     SETCONST( pTriState, "STATE_DONTKNOW",     STATE_DONTKNOW );
     435             : 
     436           0 :     return( pTriState );
     437             : }
     438             : 
     439             : /*************************************************************************
     440             : |*
     441             : |*    RscTypCont::InitMessButtons()
     442             : |*
     443             : *************************************************************************/
     444           0 : RscEnum * RscTypCont::InitMessButtons()
     445             : {
     446             :     RscEnum * pMessButtons;
     447           0 :     pMessButtons = new RscEnum( pHS->getID( "EnumMessButtons" ), RSC_NOTYPE );
     448           0 :     SETCONST( pMessButtons, "WB_OK",                      sal::static_int_cast<sal_uInt32>(WB_OK) );
     449           0 :     SETCONST( pMessButtons, "WB_OK_CANCEL",               sal::static_int_cast<sal_uInt32>(WB_OK_CANCEL) );
     450           0 :     SETCONST( pMessButtons, "WB_YES_NO",                  sal::static_int_cast<sal_uInt32>(WB_YES_NO) );
     451           0 :     SETCONST( pMessButtons, "WB_YES_NO_CANCEL",           sal::static_int_cast<sal_uInt32>(WB_YES_NO_CANCEL) );
     452           0 :     SETCONST( pMessButtons, "WB_RETRY_CANCEL",            sal::static_int_cast<sal_uInt32>(WB_RETRY_CANCEL) );
     453           0 :     SETCONST( pMessButtons, "WB_ABORT_RETRY_IGNORE",      sal::static_int_cast<sal_uInt32>(WB_ABORT_RETRY_IGNORE) );
     454           0 :     return( pMessButtons );
     455             : }
     456             : 
     457             : /*************************************************************************
     458             : |*
     459             : |*    RscTypCont::InitMessDefButton()
     460             : |*
     461             : *************************************************************************/
     462           0 : RscEnum * RscTypCont::InitMessDefButton(){
     463             :     RscEnum * pMessDefButton;
     464           0 :     pMessDefButton = new RscEnum( pHS->getID( "EnumMessDefButton" ),
     465           0 :                                   RSC_NOTYPE );
     466             : 
     467           0 :     SETCONST( pMessDefButton, "WB_DEF_OK",                  sal::static_int_cast<sal_uInt32>(WB_DEF_OK) );
     468           0 :     SETCONST( pMessDefButton, "WB_DEF_CANCEL",              sal::static_int_cast<sal_uInt32>(WB_DEF_CANCEL) );
     469           0 :     SETCONST( pMessDefButton, "WB_DEF_RETRY",               sal::static_int_cast<sal_uInt32>(WB_DEF_RETRY) );
     470           0 :     SETCONST( pMessDefButton, "WB_DEF_YES",                 sal::static_int_cast<sal_uInt32>(WB_DEF_YES) );
     471           0 :     SETCONST( pMessDefButton, "WB_DEF_NO",                  sal::static_int_cast<sal_uInt32>(WB_DEF_NO) );
     472           0 :     SETCONST( pMessDefButton, "WB_DEF_IGNORE",              sal::static_int_cast<sal_uInt32>(WB_DEF_IGNORE) );
     473           0 :     return( pMessDefButton );
     474             : }
     475             : 
     476             : /*************************************************************************
     477             : |*
     478             : |*    RscTypCont::InitGeometry()
     479             : |*
     480             : *************************************************************************/
     481           0 : RscTupel * RscTypCont::InitGeometry()
     482             : {
     483             :     RscTop *    pTupel;
     484             :     Atom        nId;
     485             : 
     486             :     // Clientvariablen einfuegen
     487           0 :     pTupel = new RscTupel( pHS->getID( "TupelDeltaSystem" ),
     488           0 :                                 RSC_NOTYPE, NULL );
     489           0 :     nId = aNmTb.Put( "X", VARNAME );
     490           0 :     pTupel->SetVariable( nId, &aShort );
     491           0 :     nId = aNmTb.Put( "Y", VARNAME );
     492           0 :     pTupel->SetVariable( nId, &aShort );
     493           0 :     nId = aNmTb.Put( "WIDTH", VARNAME );
     494           0 :     pTupel->SetVariable( nId, &aShort );
     495           0 :     nId = aNmTb.Put( "HEIGHT", VARNAME );
     496           0 :     pTupel->SetVariable( nId, &aShort );
     497             : 
     498           0 :     return (RscTupel *)pTupel;
     499             : }
     500             : 
     501             : /*************************************************************************
     502             : |*
     503             : |*    RscTypCont::InitLangGeometry()
     504             : |*
     505             : *************************************************************************/
     506           0 : RscArray * RscTypCont::InitLangGeometry( RscTupel * pGeo )
     507             : {
     508           0 :     return new RscArray( pHS->getID( "Lang_TupelGeometry" ), RSC_NOTYPE, pGeo, &aLangType );
     509             : }
     510             : 
     511             : /*************************************************************************
     512             : |*
     513             : |*    RscTypCont::InitStringList()
     514             : |*
     515             : *************************************************************************/
     516           0 : RscCont * RscTypCont::InitStringList()
     517             : {
     518             :     RscCont * pCont;
     519             : 
     520           0 :     pCont = new RscCont( pHS->getID( "Chars[]" ), RSC_NOTYPE );
     521           0 :     pCont->SetTypeClass( &aString );
     522             : 
     523           0 :     return pCont;
     524             : }
     525             : 
     526             : /*************************************************************************
     527             : |*
     528             : |*    RscTypCont::InitLangStringList()
     529             : |*
     530             : *************************************************************************/
     531           0 : RscArray * RscTypCont::InitLangStringList( RscCont * pStrLst )
     532             : {
     533           0 :     return new RscArray( pHS->getID( "Lang_CharsList" ),
     534           0 :                          RSC_NOTYPE, pStrLst, &aLangType );
     535             : }
     536             : 
     537             : /*************************************************************************
     538             : |*
     539             : |*    RscTypCont::InitStringTupel()
     540             : |*
     541             : *************************************************************************/
     542           0 : RscTupel * RscTypCont::InitStringTupel()
     543             : {
     544             :     RscTop *    pTupel;
     545             :     Atom        nId;
     546             : 
     547             :     // Clientvariablen einfuegen
     548           0 :     pTupel = new RscTupel( pHS->getID( "CharsTupel" ), RSC_NOTYPE, NULL );
     549           0 :     nId = aNmTb.Put( "FILTER", VARNAME );
     550           0 :     pTupel->SetVariable( nId, &aString );
     551           0 :     nId = aNmTb.Put( "MASK", VARNAME );
     552           0 :     pTupel->SetVariable( nId, &aString );
     553             : 
     554           0 :     return (RscTupel *)pTupel;
     555             : }
     556             : 
     557             : /*************************************************************************
     558             : |*
     559             : |*    RscTypCont::InitStringLongTupel()
     560             : |*
     561             : *************************************************************************/
     562           0 : RscTupel * RscTypCont::InitStringLongTupel()
     563             : {
     564             :     RscTop *    pTupel;
     565             :     Atom        nId;
     566             : 
     567             :     // Clientvariablen einfuegen
     568           0 :     pTupel = new RscTupel( pHS->getID( "CharsLongTupel" ), RSC_NOTYPE, NULL );
     569           0 :     nId = aNmTb.Put( "ItemText", VARNAME );
     570           0 :     pTupel->SetVariable( nId, &aString );
     571           0 :     nId = aNmTb.Put( "ItemId", VARNAME );
     572           0 :     pTupel->SetVariable( nId, &aEnumLong );
     573             : 
     574           0 :     return (RscTupel *)pTupel;
     575             : }
     576             : 
     577             : /*************************************************************************
     578             : |*
     579             : |*    RscTypCont::InitStringTupelList()
     580             : |*
     581             : *************************************************************************/
     582           0 : RscCont * RscTypCont::InitStringTupelList( RscTupel * pTupelString )
     583             : {
     584             :     RscCont * pCont;
     585             : 
     586           0 :     pCont = new RscCont( pHS->getID( "CharsCharsTupel[]" ), RSC_NOTYPE );
     587           0 :     pCont->SetTypeClass( pTupelString );
     588             : 
     589           0 :     return pCont;
     590             : }
     591             : 
     592             : /*************************************************************************
     593             : |*
     594             : |*    RscTypCont::InitStringLongTupelList()
     595             : |*
     596             : *************************************************************************/
     597           0 : RscCont * RscTypCont::InitStringLongTupelList( RscTupel * pStringLong )
     598             : {
     599             :     RscCont * pCont;
     600             : 
     601           0 :     pCont = new RscCont( pHS->getID( "CharsLongTupel[]" ), RSC_NOTYPE );
     602           0 :     pCont->SetTypeClass( pStringLong );
     603             : 
     604           0 :     return pCont;
     605             : }
     606             : 
     607             : /*************************************************************************
     608             : |*
     609             : |*    RscTypCont::InitLangStringTupelList()
     610             : |*
     611             : *************************************************************************/
     612           0 : RscArray * RscTypCont::InitLangStringTupelList( RscCont * pStrTupelLst )
     613             : {
     614           0 :     return new RscArray( pHS->getID( "Lang_CharsCharsTupel" ),
     615           0 :                     RSC_NOTYPE, pStrTupelLst, &aLangType );
     616             : }
     617             : 
     618             : /*************************************************************************
     619             : |*
     620             : |*    RscTypCont::InitLangStringLongTupelList()
     621             : |*
     622             : *************************************************************************/
     623           0 : RscArray * RscTypCont::InitLangStringLongTupelList( RscCont * pStrLongTupelLst )
     624             : {
     625           0 :     return new RscArray( pHS->getID( "Lang_CharsLongTupelList" ),
     626           0 :                          RSC_NOTYPE, pStrLongTupelLst, &aLangType );
     627           0 : }
     628             : 
     629             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10