LCOV - code coverage report
Current view: top level - rsc/source/parser - rscibas.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 309 0.0 %
Date: 2014-04-14 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             : #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           0 : 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           0 :                          CONSTNAME, nVal ), nVal );
      55           0 : }
      56             : 
      57           0 : 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           0 :                          CONSTNAME, nVal ), nVal );
      64           0 : }
      65             : 
      66             : 
      67             : typedef boost::unordered_map< OString, sal_uInt32, OStringHash > langmap;
      68           0 : static langmap ULong_Iso_map;
      69             : 
      70           0 : sal_uInt32 GetLangId(const OString &rLang)
      71             : {
      72           0 :     langmap::iterator pIter = ULong_Iso_map.find( rLang );
      73           0 :     if ( pIter != ULong_Iso_map.end())
      74           0 :         return pIter->second;
      75           0 :     return 0;
      76             : }
      77             : 
      78           0 : void RscLangEnum::Init( RscNameTable& rNames )
      79             : {
      80           0 :     SetConstant( rNames.Put( "SYSTEM", CONSTNAME, (long)LANGUAGE_SYSTEM ), LANGUAGE_SYSTEM );
      81           0 :     SetConstant( rNames.Put( "DONTKNOW", CONSTNAME, LANGUAGE_DONTKNOW ), LANGUAGE_DONTKNOW );
      82             : 
      83           0 :     sal_Int32 nIndex = 0;
      84           0 :     mnLangId = 0x400; // stay away from selfdefined...
      85             : 
      86           0 :     const ::std::vector< MsLangId::LanguagetagMapping > aList( MsLangId::getDefinedLanguagetags());
      87           0 :     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           0 :         LanguageTag aLanguageTag( (*iTag).maBcp47);
      97           0 :         ::std::vector< OUString > aFallbacks( aLanguageTag.getFallbackStrings( true));
      98           0 :         for (::std::vector< OUString >::const_iterator it( aFallbacks.begin()); it != aFallbacks.end(); ++it)
      99             :         {
     100           0 :             OString aLang( OUStringToOString( *it, RTL_TEXTENCODING_ASCII_US));
     101           0 :             SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
     102           0 :             bool bAdd = (GetLangId( aLang ) == 0);
     103           0 :             if ( bAdd )
     104           0 :                 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           0 :             mnLangId++;
     109           0 :         }
     110             : #if OSL_DEBUG_LEVEL > 2
     111             :         fprintf( stderr, "\n");
     112             : #endif
     113           0 :         nIndex++;
     114           0 :     }
     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           0 :     SetConstant( rNames.Put( "x-comment", CONSTNAME, mnLangId ), mnLangId );
     119           0 :     mnLangId++;
     120             : 
     121           0 :     OString aEnvIsoTokens = getenv( "RSC_LANG_ISO" );
     122           0 :     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           0 :     }
     148           0 : }
     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           0 : RscEnum * RscTypCont::InitLangType()
     173             : {
     174           0 :     aLangType.Init( aNmTb );
     175           0 :     return &aLangType;
     176             : }
     177             : 
     178           0 : RscEnum * RscTypCont::InitFieldUnitsType()
     179             : {
     180             :     RscEnum * pFieldUnits;
     181           0 :     pFieldUnits = new RscEnum( pHS->getID( "EnumFieldUnit" ), RSC_NOTYPE );
     182             : 
     183           0 :     SETCONST( pFieldUnits, "FUNIT_NONE", FUNIT_NONE );
     184           0 :     SETCONST( pFieldUnits, "FUNIT_MM", FUNIT_MM );
     185           0 :     SETCONST( pFieldUnits, "FUNIT_CM", FUNIT_CM );
     186           0 :     SETCONST( pFieldUnits, "FUNIT_M", FUNIT_M );
     187           0 :     SETCONST( pFieldUnits, "FUNIT_KM", FUNIT_KM );
     188           0 :     SETCONST( pFieldUnits, "FUNIT_TWIP", FUNIT_TWIP );
     189           0 :     SETCONST( pFieldUnits, "FUNIT_POINT", FUNIT_POINT );
     190           0 :     SETCONST( pFieldUnits, "FUNIT_PICA", FUNIT_PICA );
     191           0 :     SETCONST( pFieldUnits, "FUNIT_INCH", FUNIT_INCH );
     192           0 :     SETCONST( pFieldUnits, "FUNIT_FOOT", FUNIT_FOOT );
     193           0 :     SETCONST( pFieldUnits, "FUNIT_MILE", FUNIT_MILE );
     194           0 :     SETCONST( pFieldUnits, "FUNIT_CUSTOM", FUNIT_CUSTOM );
     195           0 :     SETCONST( pFieldUnits, "FUNIT_CHAR", FUNIT_CHAR );
     196           0 :     SETCONST( pFieldUnits, "FUNIT_LINE", FUNIT_LINE );
     197           0 :     SETCONST( pFieldUnits, "FUNIT_PERCENT", FUNIT_PERCENT );
     198           0 :     SETCONST( pFieldUnits, "FUNIT_DEGREE",  FUNIT_DEGREE);
     199           0 :     SETCONST( pFieldUnits, "FUNIT_SECOND",  FUNIT_SECOND);
     200           0 :     SETCONST( pFieldUnits, "FUNIT_MILLISECOND",  FUNIT_MILLISECOND);
     201           0 :     SETCONST( pFieldUnits, "FUNIT_PIXEL",   FUNIT_PIXEL );
     202             : 
     203           0 :     return pFieldUnits;
     204             : }
     205             : 
     206           0 : RscEnum * RscTypCont::InitTimeFieldFormat()
     207             : {
     208             :     RscEnum * pTimeFieldFormat;
     209           0 :     pTimeFieldFormat = new RscEnum( pHS->getID( "EnumTimeFieldFormat" ),
     210           0 :                                     RSC_NOTYPE );
     211             : 
     212           0 :     SETCONST( pTimeFieldFormat, "TIMEF_NONE", TIMEF_NONE );
     213           0 :     SETCONST( pTimeFieldFormat, "TIMEF_SEC", TIMEF_SEC );
     214           0 :     SETCONST( pTimeFieldFormat, "TIMEF_100TH_SEC", TIMEF_100TH_SEC );
     215             : 
     216           0 :     return pTimeFieldFormat;
     217             : }
     218             : 
     219           0 : RscEnum * RscTypCont::InitColor()
     220             : {
     221             :     RscEnum * pColor;
     222           0 :     pColor = new RscEnum( pHS->getID( "EnumColor" ), RSC_NOTYPE );
     223             : 
     224           0 :     SETCONST( pColor, "COL_BLACK",                  COL_BLACK );
     225           0 :     SETCONST( pColor, "COL_BLUE",                   COL_BLUE );
     226           0 :     SETCONST( pColor, "COL_GREEN",                  COL_GREEN );
     227           0 :     SETCONST( pColor, "COL_CYAN",                   COL_CYAN );
     228           0 :     SETCONST( pColor, "COL_RED",                    COL_RED );
     229           0 :     SETCONST( pColor, "COL_MAGENTA",                COL_MAGENTA );
     230           0 :     SETCONST( pColor, "COL_BROWN",                  COL_BROWN );
     231           0 :     SETCONST( pColor, "COL_GRAY",                   COL_GRAY );
     232           0 :     SETCONST( pColor, "COL_LIGHTGRAY",              COL_LIGHTGRAY );
     233           0 :     SETCONST( pColor, "COL_LIGHTBLUE",              COL_LIGHTBLUE );
     234           0 :     SETCONST( pColor, "COL_LIGHTGREEN",             COL_LIGHTGREEN );
     235           0 :     SETCONST( pColor, "COL_LIGHTCYAN",              COL_LIGHTCYAN );
     236           0 :     SETCONST( pColor, "COL_LIGHTRED",               COL_LIGHTRED );
     237           0 :     SETCONST( pColor, "COL_LIGHTMAGENTA",           COL_LIGHTMAGENTA );
     238           0 :     SETCONST( pColor, "COL_YELLOW",                 COL_YELLOW );
     239           0 :     SETCONST( pColor, "COL_WHITE",                  COL_WHITE );
     240             : 
     241           0 :     return pColor;
     242             : }
     243             : 
     244           0 : RscEnum * RscTypCont::InitMapUnit()
     245             : {
     246             :     RscEnum * pMapUnit;
     247           0 :     pMapUnit = new RscEnum( pHS->getID( "EnumMapUnit" ), RSC_NOTYPE );
     248             : 
     249           0 :     SETCONST( pMapUnit, "MAP_PIXEL",                  MAP_PIXEL );
     250           0 :     SETCONST( pMapUnit, "MAP_SYSFONT",                MAP_SYSFONT );
     251           0 :     SETCONST( pMapUnit, "MAP_100TH_MM",               MAP_100TH_MM );
     252           0 :     SETCONST( pMapUnit, "MAP_10TH_MM",                MAP_10TH_MM );
     253           0 :     SETCONST( pMapUnit, "MAP_MM",                     MAP_MM );
     254           0 :     SETCONST( pMapUnit, "MAP_CM",                     MAP_CM );
     255           0 :     SETCONST( pMapUnit, "MAP_1000TH_INCH",            MAP_1000TH_INCH );
     256           0 :     SETCONST( pMapUnit, "MAP_100TH_INCH",             MAP_100TH_INCH );
     257           0 :     SETCONST( pMapUnit, "MAP_10TH_INCH",              MAP_10TH_INCH );
     258           0 :     SETCONST( pMapUnit, "MAP_INCH",                   MAP_INCH );
     259           0 :     SETCONST( pMapUnit, "MAP_POINT",                  MAP_POINT );
     260           0 :     SETCONST( pMapUnit, "MAP_TWIP",                   MAP_TWIP );
     261           0 :     SETCONST( pMapUnit, "MAP_APPFONT",                MAP_APPFONT );
     262           0 :     SETCONST( pMapUnit, "MAP_SV",                     RSC_EXTRAMAPUNIT );
     263           0 :     return pMapUnit;
     264             : }
     265             : 
     266           0 : RscEnum * RscTypCont::InitKey()
     267             : {
     268             :     RscEnum * pKey;
     269           0 :     pKey = new RscEnum( pHS->getID( "EnumKey" ), RSC_NOTYPE );
     270             : 
     271           0 :     SETCONST( pKey, "KEY_0",                    com::sun::star::awt::Key::NUM0 );
     272           0 :     SETCONST( pKey, "KEY_1",                    com::sun::star::awt::Key::NUM1 );
     273           0 :     SETCONST( pKey, "KEY_2",                    com::sun::star::awt::Key::NUM2 );
     274           0 :     SETCONST( pKey, "KEY_3",                    com::sun::star::awt::Key::NUM3 );
     275           0 :     SETCONST( pKey, "KEY_4",                    com::sun::star::awt::Key::NUM4 );
     276           0 :     SETCONST( pKey, "KEY_5",                    com::sun::star::awt::Key::NUM5 );
     277           0 :     SETCONST( pKey, "KEY_6",                    com::sun::star::awt::Key::NUM6 );
     278           0 :     SETCONST( pKey, "KEY_7",                    com::sun::star::awt::Key::NUM7 );
     279           0 :     SETCONST( pKey, "KEY_8",                    com::sun::star::awt::Key::NUM8 );
     280           0 :     SETCONST( pKey, "KEY_9",                    com::sun::star::awt::Key::NUM9 );
     281             : 
     282           0 :     SETCONST( pKey, "KEY_A",                    com::sun::star::awt::Key::A );
     283           0 :     SETCONST( pKey, "KEY_B",                    com::sun::star::awt::Key::B );
     284           0 :     SETCONST( pKey, "KEY_C",                    com::sun::star::awt::Key::C );
     285           0 :     SETCONST( pKey, "KEY_D",                    com::sun::star::awt::Key::D );
     286           0 :     SETCONST( pKey, "KEY_E",                    com::sun::star::awt::Key::E );
     287           0 :     SETCONST( pKey, "KEY_F",                    com::sun::star::awt::Key::F );
     288           0 :     SETCONST( pKey, "KEY_G",                    com::sun::star::awt::Key::G );
     289           0 :     SETCONST( pKey, "KEY_H",                    com::sun::star::awt::Key::H );
     290           0 :     SETCONST( pKey, "KEY_I",                    com::sun::star::awt::Key::I );
     291           0 :     SETCONST( pKey, "KEY_J",                    com::sun::star::awt::Key::J );
     292           0 :     SETCONST( pKey, "KEY_K",                    com::sun::star::awt::Key::K );
     293           0 :     SETCONST( pKey, "KEY_L",                    com::sun::star::awt::Key::L );
     294           0 :     SETCONST( pKey, "KEY_M",                    com::sun::star::awt::Key::M );
     295           0 :     SETCONST( pKey, "KEY_N",                    com::sun::star::awt::Key::N );
     296           0 :     SETCONST( pKey, "KEY_O",                    com::sun::star::awt::Key::O );
     297           0 :     SETCONST( pKey, "KEY_P",                    com::sun::star::awt::Key::P );
     298           0 :     SETCONST( pKey, "KEY_Q",                    com::sun::star::awt::Key::Q );
     299           0 :     SETCONST( pKey, "KEY_R",                    com::sun::star::awt::Key::R );
     300           0 :     SETCONST( pKey, "KEY_S",                    com::sun::star::awt::Key::S );
     301           0 :     SETCONST( pKey, "KEY_T",                    com::sun::star::awt::Key::T );
     302           0 :     SETCONST( pKey, "KEY_U",                    com::sun::star::awt::Key::U );
     303           0 :     SETCONST( pKey, "KEY_V",                    com::sun::star::awt::Key::V );
     304           0 :     SETCONST( pKey, "KEY_W",                    com::sun::star::awt::Key::W );
     305           0 :     SETCONST( pKey, "KEY_X",                    com::sun::star::awt::Key::X );
     306           0 :     SETCONST( pKey, "KEY_Y",                    com::sun::star::awt::Key::Y );
     307           0 :     SETCONST( pKey, "KEY_Z",                    com::sun::star::awt::Key::Z );
     308             : 
     309           0 :     SETCONST( pKey, "KEY_F1",                   com::sun::star::awt::Key::F1 );
     310           0 :     SETCONST( pKey, "KEY_F2",                   com::sun::star::awt::Key::F2 );
     311           0 :     SETCONST( pKey, "KEY_F3",                   com::sun::star::awt::Key::F3 );
     312           0 :     SETCONST( pKey, "KEY_F4",                   com::sun::star::awt::Key::F4 );
     313           0 :     SETCONST( pKey, "KEY_F5",                   com::sun::star::awt::Key::F5 );
     314           0 :     SETCONST( pKey, "KEY_F6",                   com::sun::star::awt::Key::F6 );
     315           0 :     SETCONST( pKey, "KEY_F7",                   com::sun::star::awt::Key::F7 );
     316           0 :     SETCONST( pKey, "KEY_F8",                   com::sun::star::awt::Key::F8 );
     317           0 :     SETCONST( pKey, "KEY_F9",                   com::sun::star::awt::Key::F9 );
     318           0 :     SETCONST( pKey, "KEY_F10",                  com::sun::star::awt::Key::F10 );
     319           0 :     SETCONST( pKey, "KEY_F11",                  com::sun::star::awt::Key::F11 );
     320           0 :     SETCONST( pKey, "KEY_F12",                  com::sun::star::awt::Key::F12 );
     321           0 :     SETCONST( pKey, "KEY_F13",                  com::sun::star::awt::Key::F13 );
     322           0 :     SETCONST( pKey, "KEY_F14",                  com::sun::star::awt::Key::F14 );
     323           0 :     SETCONST( pKey, "KEY_F15",                  com::sun::star::awt::Key::F15 );
     324           0 :     SETCONST( pKey, "KEY_F16",                  com::sun::star::awt::Key::F16 );
     325           0 :     SETCONST( pKey, "KEY_F17",                  com::sun::star::awt::Key::F17 );
     326           0 :     SETCONST( pKey, "KEY_F18",                  com::sun::star::awt::Key::F18 );
     327           0 :     SETCONST( pKey, "KEY_F19",                  com::sun::star::awt::Key::F19 );
     328           0 :     SETCONST( pKey, "KEY_F20",                  com::sun::star::awt::Key::F20 );
     329           0 :     SETCONST( pKey, "KEY_F21",                  com::sun::star::awt::Key::F21 );
     330           0 :     SETCONST( pKey, "KEY_F22",                  com::sun::star::awt::Key::F22 );
     331           0 :     SETCONST( pKey, "KEY_F23",                  com::sun::star::awt::Key::F23 );
     332           0 :     SETCONST( pKey, "KEY_F24",                  com::sun::star::awt::Key::F24 );
     333           0 :     SETCONST( pKey, "KEY_F25",                  com::sun::star::awt::Key::F25 );
     334           0 :     SETCONST( pKey, "KEY_F26",                  com::sun::star::awt::Key::F26 );
     335             : 
     336           0 :     SETCONST( pKey, "KEY_DOWN",                 com::sun::star::awt::Key::DOWN );
     337           0 :     SETCONST( pKey, "KEY_UP",                   com::sun::star::awt::Key::UP );
     338           0 :     SETCONST( pKey, "KEY_LEFT",                 com::sun::star::awt::Key::LEFT );
     339           0 :     SETCONST( pKey, "KEY_RIGHT",                com::sun::star::awt::Key::RIGHT );
     340           0 :     SETCONST( pKey, "KEY_HOME",                 com::sun::star::awt::Key::HOME );
     341           0 :     SETCONST( pKey, "KEY_END",                  com::sun::star::awt::Key::END );
     342           0 :     SETCONST( pKey, "KEY_PAGEUP",               com::sun::star::awt::Key::PAGEUP );
     343           0 :     SETCONST( pKey, "KEY_PAGEDOWN",             com::sun::star::awt::Key::PAGEDOWN );
     344             : 
     345           0 :     SETCONST( pKey, "KEY_RETURN",               com::sun::star::awt::Key::RETURN );
     346           0 :     SETCONST( pKey, "KEY_ESCAPE",               com::sun::star::awt::Key::ESCAPE );
     347           0 :     SETCONST( pKey, "KEY_TAB",                  com::sun::star::awt::Key::TAB );
     348           0 :     SETCONST( pKey, "KEY_BACKSPACE",            com::sun::star::awt::Key::BACKSPACE );
     349           0 :     SETCONST( pKey, "KEY_SPACE",                com::sun::star::awt::Key::SPACE );
     350           0 :     SETCONST( pKey, "KEY_INSERT",               com::sun::star::awt::Key::INSERT );
     351           0 :     SETCONST( pKey, "KEY_DELETE",               com::sun::star::awt::Key::DELETE );
     352             : 
     353           0 :     SETCONST( pKey, "KEY_ADD",                  com::sun::star::awt::Key::ADD );
     354           0 :     SETCONST( pKey, "KEY_SUBTRACT",             com::sun::star::awt::Key::SUBTRACT );
     355           0 :     SETCONST( pKey, "KEY_MULTIPLY",             com::sun::star::awt::Key::MULTIPLY );
     356           0 :     SETCONST( pKey, "KEY_DIVIDE",               com::sun::star::awt::Key::DIVIDE );
     357           0 :     SETCONST( pKey, "KEY_POINT",                com::sun::star::awt::Key::POINT );
     358           0 :     SETCONST( pKey, "KEY_COMMA",                com::sun::star::awt::Key::COMMA );
     359           0 :     SETCONST( pKey, "KEY_LESS",                 com::sun::star::awt::Key::LESS );
     360           0 :     SETCONST( pKey, "KEY_GREATER",              com::sun::star::awt::Key::GREATER );
     361           0 :     SETCONST( pKey, "KEY_EQUAL",                com::sun::star::awt::Key::EQUAL );
     362             : 
     363           0 :     SETCONST( pKey, "KEY_OPEN",                 com::sun::star::awt::Key::OPEN );
     364           0 :     SETCONST( pKey, "KEY_CUT",                  com::sun::star::awt::Key::CUT );
     365           0 :     SETCONST( pKey, "KEY_COPY",                 com::sun::star::awt::Key::COPY );
     366           0 :     SETCONST( pKey, "KEY_PASTE",                com::sun::star::awt::Key::PASTE );
     367           0 :     SETCONST( pKey, "KEY_UNDO",                 com::sun::star::awt::Key::UNDO );
     368           0 :     SETCONST( pKey, "KEY_REPEAT",               com::sun::star::awt::Key::REPEAT );
     369           0 :     SETCONST( pKey, "KEY_FIND",                 com::sun::star::awt::Key::FIND );
     370           0 :     SETCONST( pKey, "KEY_PROPERTIES",           com::sun::star::awt::Key::PROPERTIES );
     371           0 :     SETCONST( pKey, "KEY_FRONT",                com::sun::star::awt::Key::FRONT );
     372           0 :     SETCONST( pKey, "KEY_CONTEXTMENU",          com::sun::star::awt::Key::CONTEXTMENU );
     373           0 :     SETCONST( pKey, "KEY_HELP",                 com::sun::star::awt::Key::HELP );
     374           0 :     SETCONST( pKey, "KEY_HANGUL_HANJA",         com::sun::star::awt::Key::HANGUL_HANJA );
     375           0 :     SETCONST( pKey, "KEY_DECIMAL",              com::sun::star::awt::Key::DECIMAL );
     376           0 :     SETCONST( pKey, "KEY_TILDE",                com::sun::star::awt::Key::TILDE );
     377           0 :     SETCONST( pKey, "KEY_QUOTELEFT",            com::sun::star::awt::Key::QUOTELEFT );
     378             : 
     379           0 :     return pKey;
     380             : }
     381             : 
     382           0 : RscEnum * RscTypCont::InitTriState()
     383             : {
     384             :     RscEnum * pTriState;
     385           0 :     pTriState = new RscEnum( pHS->getID( "EnumTriState" ), RSC_NOTYPE );
     386             : 
     387           0 :     SETCONST( pTriState, "STATE_NOCHECK",      TRISTATE_FALSE  );
     388           0 :     SETCONST( pTriState, "STATE_CHECK",        TRISTATE_TRUE    );
     389           0 :     SETCONST( pTriState, "STATE_DONTKNOW",     TRISTATE_INDET );
     390             : 
     391           0 :     return pTriState;
     392             : }
     393             : 
     394           0 : RscEnum * RscTypCont::InitMessButtons()
     395             : {
     396             :     RscEnum * pMessButtons;
     397           0 :     pMessButtons = new RscEnum( pHS->getID( "EnumMessButtons" ), RSC_NOTYPE );
     398           0 :     SETCONST( pMessButtons, "WB_OK",                      sal::static_int_cast<sal_uInt32>(WB_OK) );
     399           0 :     SETCONST( pMessButtons, "WB_OK_CANCEL",               sal::static_int_cast<sal_uInt32>(WB_OK_CANCEL) );
     400           0 :     SETCONST( pMessButtons, "WB_YES_NO",                  sal::static_int_cast<sal_uInt32>(WB_YES_NO) );
     401           0 :     SETCONST( pMessButtons, "WB_YES_NO_CANCEL",           sal::static_int_cast<sal_uInt32>(WB_YES_NO_CANCEL) );
     402           0 :     SETCONST( pMessButtons, "WB_RETRY_CANCEL",            sal::static_int_cast<sal_uInt32>(WB_RETRY_CANCEL) );
     403           0 :     SETCONST( pMessButtons, "WB_ABORT_RETRY_IGNORE",      sal::static_int_cast<sal_uInt32>(WB_ABORT_RETRY_IGNORE) );
     404           0 :     return pMessButtons;
     405             : }
     406             : 
     407           0 : RscEnum * RscTypCont::InitMessDefButton()
     408             : {
     409             :     RscEnum * pMessDefButton;
     410           0 :     pMessDefButton = new RscEnum( pHS->getID( "EnumMessDefButton" ),
     411           0 :                                   RSC_NOTYPE );
     412             : 
     413           0 :     SETCONST( pMessDefButton, "WB_DEF_OK",                  sal::static_int_cast<sal_uInt32>(WB_DEF_OK) );
     414           0 :     SETCONST( pMessDefButton, "WB_DEF_CANCEL",              sal::static_int_cast<sal_uInt32>(WB_DEF_CANCEL) );
     415           0 :     SETCONST( pMessDefButton, "WB_DEF_RETRY",               sal::static_int_cast<sal_uInt32>(WB_DEF_RETRY) );
     416           0 :     SETCONST( pMessDefButton, "WB_DEF_YES",                 sal::static_int_cast<sal_uInt32>(WB_DEF_YES) );
     417           0 :     SETCONST( pMessDefButton, "WB_DEF_NO",                  sal::static_int_cast<sal_uInt32>(WB_DEF_NO) );
     418           0 :     SETCONST( pMessDefButton, "WB_DEF_IGNORE",              sal::static_int_cast<sal_uInt32>(WB_DEF_IGNORE) );
     419           0 :     return pMessDefButton;
     420             : }
     421             : 
     422           0 : RscTupel * RscTypCont::InitGeometry()
     423             : {
     424             :     RscTop *    pTupel;
     425             :     Atom        nId;
     426             : 
     427             :     // Clientvariablen einfuegen
     428           0 :     pTupel = new RscTupel( pHS->getID( "TupelDeltaSystem" ),
     429           0 :                                 RSC_NOTYPE, NULL );
     430           0 :     nId = aNmTb.Put( "X", VARNAME );
     431           0 :     pTupel->SetVariable( nId, &aShort );
     432           0 :     nId = aNmTb.Put( "Y", VARNAME );
     433           0 :     pTupel->SetVariable( nId, &aShort );
     434           0 :     nId = aNmTb.Put( "WIDTH", VARNAME );
     435           0 :     pTupel->SetVariable( nId, &aShort );
     436           0 :     nId = aNmTb.Put( "HEIGHT", VARNAME );
     437           0 :     pTupel->SetVariable( nId, &aShort );
     438             : 
     439           0 :     return (RscTupel *)pTupel;
     440             : }
     441             : 
     442           0 : RscArray * RscTypCont::InitLangGeometry( RscTupel * pGeo )
     443             : {
     444           0 :     return new RscArray( pHS->getID( "Lang_TupelGeometry" ), RSC_NOTYPE, pGeo, &aLangType );
     445             : }
     446             : 
     447           0 : RscCont * RscTypCont::InitStringList()
     448             : {
     449             :     RscCont * pCont;
     450             : 
     451           0 :     pCont = new RscCont( pHS->getID( "Chars[]" ), RSC_NOTYPE );
     452           0 :     pCont->SetTypeClass( &aString );
     453             : 
     454           0 :     return pCont;
     455             : }
     456             : 
     457           0 : RscArray * RscTypCont::InitLangStringList( RscCont * pStrLst )
     458             : {
     459           0 :     return new RscArray( pHS->getID( "Lang_CharsList" ),
     460           0 :                          RSC_NOTYPE, pStrLst, &aLangType );
     461             : }
     462             : 
     463           0 : RscTupel * RscTypCont::InitStringTupel()
     464             : {
     465             :     RscTop *    pTupel;
     466             :     Atom        nId;
     467             : 
     468             :     // Clientvariablen einfuegen
     469           0 :     pTupel = new RscTupel( pHS->getID( "CharsTupel" ), RSC_NOTYPE, NULL );
     470           0 :     nId = aNmTb.Put( "FILTER", VARNAME );
     471           0 :     pTupel->SetVariable( nId, &aString );
     472           0 :     nId = aNmTb.Put( "MASK", VARNAME );
     473           0 :     pTupel->SetVariable( nId, &aString );
     474             : 
     475           0 :     return (RscTupel *)pTupel;
     476             : }
     477             : 
     478           0 : RscTupel * RscTypCont::InitStringLongTupel()
     479             : {
     480             :     RscTop *    pTupel;
     481             :     Atom        nId;
     482             : 
     483             :     // Clientvariablen einfuegen
     484           0 :     pTupel = new RscTupel( pHS->getID( "CharsLongTupel" ), RSC_NOTYPE, NULL );
     485           0 :     nId = aNmTb.Put( "ItemText", VARNAME );
     486           0 :     pTupel->SetVariable( nId, &aString );
     487           0 :     nId = aNmTb.Put( "ItemId", VARNAME );
     488           0 :     pTupel->SetVariable( nId, &aEnumLong );
     489             : 
     490           0 :     return (RscTupel *)pTupel;
     491             : }
     492             : 
     493           0 : RscCont * RscTypCont::InitStringTupelList( RscTupel * pTupelString )
     494             : {
     495             :     RscCont * pCont;
     496             : 
     497           0 :     pCont = new RscCont( pHS->getID( "CharsCharsTupel[]" ), RSC_NOTYPE );
     498           0 :     pCont->SetTypeClass( pTupelString );
     499             : 
     500           0 :     return pCont;
     501             : }
     502             : 
     503           0 : RscCont * RscTypCont::InitStringLongTupelList( RscTupel * pStringLong )
     504             : {
     505             :     RscCont * pCont;
     506             : 
     507           0 :     pCont = new RscCont( pHS->getID( "CharsLongTupel[]" ), RSC_NOTYPE );
     508           0 :     pCont->SetTypeClass( pStringLong );
     509             : 
     510           0 :     return pCont;
     511             : }
     512             : 
     513           0 : RscArray * RscTypCont::InitLangStringTupelList( RscCont * pStrTupelLst )
     514             : {
     515           0 :     return new RscArray( pHS->getID( "Lang_CharsCharsTupel" ),
     516           0 :                          RSC_NOTYPE, pStrTupelLst, &aLangType );
     517             : }
     518             : 
     519           0 : RscArray * RscTypCont::InitLangStringLongTupelList( RscCont * pStrLongTupelLst )
     520             : {
     521           0 :     return new RscArray( pHS->getID( "Lang_CharsLongTupelList" ),
     522           0 :                          RSC_NOTYPE, pStrLongTupelLst, &aLangType );
     523           0 : }
     524             : 
     525             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10