LCOV - code coverage report
Current view: top level - extensions/source/propctrlr - formmetadata.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 178 0.0 %
Date: 2014-04-14 Functions: 0 25 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             : #include "formmetadata.hxx"
      21             : #include "formstrings.hxx"
      22             : #include "formresid.hrc"
      23             : #include "propctrlr.hrc"
      24             : #include <svtools/localresaccess.hxx>
      25             : #include <tools/debug.hxx>
      26             : #include <comphelper/extract.hxx>
      27             : #include <sal/macros.h>
      28             : #include <algorithm>
      29             : #include <functional>
      30             : 
      31             : 
      32             : namespace pcr
      33             : {
      34             : 
      35             : 
      36             :     using namespace ::com::sun::star::uno;
      37             : 
      38             : 
      39             :     //= OPropertyInfoImpl
      40             : 
      41           0 :     struct OPropertyInfoImpl
      42             :     {
      43             :         OUString        sName;
      44             :         OUString        sTranslation;
      45             :         OString         sHelpId;
      46             :         sal_Int32       nId;
      47             :         sal_uInt16      nPos;
      48             :         sal_uInt32      nUIFlags;
      49             : 
      50             :         OPropertyInfoImpl(
      51             :                         const OUString&            rName,
      52             :                         sal_Int32                   _nId,
      53             :                         const OUString&             aTranslation,
      54             :                         sal_uInt16                  nPosId,
      55             :                         const OString&,
      56             :                         sal_uInt32                  _nUIFlags);
      57             :     };
      58             : 
      59             : 
      60           0 :     OPropertyInfoImpl::OPropertyInfoImpl(const OUString& _rName, sal_Int32 _nId,
      61             :                                    const OUString& aString, sal_uInt16 nP, const OString& sHid, sal_uInt32 _nUIFlags)
      62             :        :sName(_rName)
      63             :        ,sTranslation(aString)
      64             :        ,sHelpId(sHid)
      65             :        ,nId(_nId)
      66             :        ,nPos(nP)
      67           0 :        ,nUIFlags(_nUIFlags)
      68             :     {
      69           0 :     }
      70             : 
      71             : 
      72             :     // Compare PropertyInfo
      73             :     struct PropertyInfoLessByName : public ::std::binary_function< OPropertyInfoImpl, OPropertyInfoImpl, bool >
      74             :     {
      75           0 :         bool operator()( const OPropertyInfoImpl& _rLHS, const OPropertyInfoImpl& _rRHS )
      76             :         {
      77           0 :             return _rLHS.sName.compareTo( _rRHS.sName ) < 0;
      78             :         }
      79             :     };
      80             : 
      81             : 
      82             :     //= OPropertyInfoService
      83             : 
      84             : #define DEF_INFO( ident, uinameres, pos, helpid, flags )       \
      85             :     OPropertyInfoImpl( PROPERTY_##ident, PROPERTY_ID_##ident, \
      86             :             PcrRes( RID_STR_##uinameres ).toString(), pos, HID_PROP_##helpid, flags )
      87             : 
      88             : #define DEF_INFO_1( ident, uinameres, pos, helpid, flag1 )   \
      89             :     DEF_INFO( ident, uinameres, pos, helpid, PROP_FLAG_##flag1 )
      90             : 
      91             : #define DEF_INFO_2( ident, uinameres, pos, helpid, flag1, flag2 )        \
      92             :     DEF_INFO( ident, uinameres, pos, helpid, PROP_FLAG_##flag1 | PROP_FLAG_##flag2 )
      93             : 
      94             : #define DEF_INFO_3( ident, uinameres, pos, helpid, flag1, flag2, flag3 ) \
      95             :     DEF_INFO( ident, uinameres, pos, helpid, PROP_FLAG_##flag1 | PROP_FLAG_##flag2 | PROP_FLAG_##flag3 )
      96             : 
      97             : #define DEF_INFO_4( ident, uinameres, pos, helpid, flag1, flag2, flag3, flag4 ) \
      98             :     DEF_INFO( ident, uinameres, pos, helpid, PROP_FLAG_##flag1 | PROP_FLAG_##flag2 | PROP_FLAG_##flag3 | PROP_FLAG_##flag4 )
      99             : 
     100             :     sal_uInt16              OPropertyInfoService::s_nCount = 0;
     101             :     OPropertyInfoImpl*      OPropertyInfoService::s_pPropertyInfos = NULL;
     102             : 
     103           0 :     const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo()
     104             :     {
     105           0 :         if ( s_pPropertyInfos )
     106           0 :             return s_pPropertyInfos;
     107             : 
     108           0 :         PcrClient aResourceAccess;
     109             :         // this ensures that we have our resource file loaded
     110             : 
     111             :         static OPropertyInfoImpl aPropertyInfos[] =
     112             :         {
     113             :         /*
     114             :         DEF_INFO_?( propname and id,   resoure id,         pos, help id,           flags ),
     115             :         */
     116             :         DEF_INFO_3( NAME,              NAME,                 0, NAME,              FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     117             :         DEF_INFO_2( TITLE,             TITLE,                1, TITLE,             FORM_VISIBLE, DIALOG_VISIBLE ),
     118             :         DEF_INFO_3( LABEL,             LABEL,                2, LABEL,             FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     119             :         DEF_INFO_2( CONTROLLABEL,      LABELCONTROL,         3, CONTROLLABEL,      FORM_VISIBLE, COMPOSEABLE ),
     120             :         DEF_INFO_3( WRITING_MODE,      WRITING_MODE,         4, WRITING_MODE,      FORM_VISIBLE, ENUM, COMPOSEABLE ),
     121             :         DEF_INFO_3( GROUP_NAME,        GROUP_NAME,           5, GROUP_NAME,        FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     122             :         DEF_INFO_2( TEXT,              TEXT,                 6, TEXT,              DIALOG_VISIBLE, COMPOSEABLE ),
     123             :         DEF_INFO_3( MAXTEXTLEN,        MAXTEXTLEN,           7, MAXTEXTLEN,        FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     124             :         DEF_INFO_3( EDITMASK,          EDITMASK,             8, EDITMASK,          FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     125             :         DEF_INFO_3( LITERALMASK,       LITERALMASK,          9, LITERALMASK,       FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     126             :         DEF_INFO_3( STRICTFORMAT,      STRICTFORMAT,        10, STRICTFORMAT,      FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     127             :         DEF_INFO_3( ENABLED,           ENABLED,             11, ENABLED,           FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     128             :         DEF_INFO_3( ENABLE_VISIBLE,    ENABLE_VISIBLE,      12, ENABLE_VISIBLE,    FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     129             :         DEF_INFO_3( READONLY,          READONLY,            13, READONLY,          FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     130             :         DEF_INFO_3( PRINTABLE,         PRINTABLE,           14, PRINTABLE,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     131             :         DEF_INFO_3( STEP,              STEP,                15, STEP,              FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     132             :         DEF_INFO_3( WHEEL_BEHAVIOR,    WHEEL_BEHAVIOR,      16, WHEEL_BEHAVIOR,    FORM_VISIBLE, ENUM, COMPOSEABLE ),
     133             :         DEF_INFO_3( TABSTOP,           TABSTOP,             17, TABSTOP,           FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     134             :         DEF_INFO_2( TABINDEX,          TABINDEX,            18, TABINDEX,          FORM_VISIBLE, DIALOG_VISIBLE ),
     135             : 
     136             :         DEF_INFO_2( BOUND_CELL,        BOUND_CELL,          19, BOUND_CELL,        FORM_VISIBLE, DATA_PROPERTY ),
     137             :         DEF_INFO_3( CELL_EXCHANGE_TYPE,CELL_EXCHANGE_TYPE,  20, CELL_EXCHANGE_TYPE,FORM_VISIBLE, DATA_PROPERTY, ENUM ),
     138             :         DEF_INFO_2( LIST_CELL_RANGE,   LIST_CELL_RANGE,     21, LIST_CELL_RANGE,   FORM_VISIBLE, DATA_PROPERTY ),
     139             :         DEF_INFO_3( CONTROLSOURCE,     CONTROLSOURCE,       22, CONTROLSOURCE,     FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     140             :         DEF_INFO_3( EMPTY_IS_NULL,     EMPTY_IS_NULL,       23, EMPTY_IS_NULL,     FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     141             :         DEF_INFO_3( INPUT_REQUIRED,    INPUT_REQUIRED,      24, INPUT_REQUIRED,    FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     142             :         DEF_INFO_3( REFVALUE,          REFVALUE,            25, REFVALUE,          FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     143             :         DEF_INFO_3( UNCHECKEDREFVALUE, UNCHECKEDREFVALUE,   26, UNCHECKEDREFVALUE, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     144             :         DEF_INFO_3( DATASOURCE,        DATASOURCE,          27, DATASOURCE,        FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     145             :         DEF_INFO_4( COMMANDTYPE,       CURSORSOURCETYPE,    28, CURSORSOURCETYPE,  FORM_VISIBLE, DATA_PROPERTY, ENUM, COMPOSEABLE ),
     146             :         DEF_INFO_3( COMMAND,           CURSORSOURCE,        29, CURSORSOURCE,      FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     147             :         DEF_INFO_3( ESCAPE_PROCESSING, ESCAPE_PROCESSING,   30, ESCAPE_PROCESSING, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     148             :         DEF_INFO_3( FILTER,            FILTER,              31, FILTER,            FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     149             :         DEF_INFO_3( SORT,              SORT_CRITERIA,       32, SORT_CRITERIA,     FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     150             :         DEF_INFO_2( MASTERFIELDS,      MASTERFIELDS,        33, MASTERFIELDS,      FORM_VISIBLE, DATA_PROPERTY ),
     151             :         DEF_INFO_2( DETAILFIELDS,      SLAVEFIELDS,         34, SLAVEFIELDS,       FORM_VISIBLE, DATA_PROPERTY ),
     152             :         DEF_INFO_3( ALLOWADDITIONS,    ALLOW_ADDITIONS,     35, ALLOW_ADDITIONS,   FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     153             :         DEF_INFO_3( ALLOWEDITS,        ALLOW_EDITS,         36, ALLOW_EDITS,       FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     154             :         DEF_INFO_3( ALLOWDELETIONS,    ALLOW_DELETIONS,     37, ALLOW_DELETIONS,   FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     155             :         DEF_INFO_3( INSERTONLY,        DATAENTRY,           38, DATAENTRY,         FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     156             :         DEF_INFO_4( NAVIGATION,        NAVIGATION,          39, NAVIGATION,        FORM_VISIBLE, DATA_PROPERTY, ENUM, COMPOSEABLE ),
     157             :         DEF_INFO_4( CYCLE,             CYCLE,               40, CYCLE,             FORM_VISIBLE, DATA_PROPERTY, ENUM, COMPOSEABLE ),
     158             :         DEF_INFO_3( FILTERPROPOSAL,    FILTERPROPOSAL,      41, FILTERPROPOSAL,    FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     159             :         DEF_INFO_4( LISTSOURCETYPE,    LISTSOURCETYPE,      42, LISTSOURCETYPE,    FORM_VISIBLE, DATA_PROPERTY, ENUM, COMPOSEABLE ),
     160             :         DEF_INFO_3( LISTSOURCE,        LISTSOURCE,          43, LISTSOURCE,        FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     161             :         DEF_INFO_3( BOUNDCOLUMN,       BOUNDCOLUMN,         44, BOUNDCOLUMN,       FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
     162             : 
     163             :         // <!----------------->
     164             :         // XML node binding
     165             :         DEF_INFO_2( LIST_BINDING,      LIST_BINDING,        45, LIST_BINDING,      FORM_VISIBLE, DATA_PROPERTY ),
     166             :         DEF_INFO_2( XML_DATA_MODEL,    XML_DATA_MODEL,      46, XML_DATA_MODEL,    FORM_VISIBLE, DATA_PROPERTY ),
     167             :         DEF_INFO_2( BINDING_NAME,      BINDING_NAME,        47, BINDING_NAME,      FORM_VISIBLE, DATA_PROPERTY ),
     168             :         DEF_INFO_2( BIND_EXPRESSION,   BIND_EXPRESSION,     48, BIND_EXPRESSION,   FORM_VISIBLE, DATA_PROPERTY ),
     169             :         DEF_INFO_2( XSD_REQUIRED,      XSD_REQUIRED,        49, XSD_REQUIRED,      FORM_VISIBLE, DATA_PROPERTY ),
     170             :         DEF_INFO_2( XSD_RELEVANT,      XSD_RELEVANT,        50, XSD_RELEVANT,      FORM_VISIBLE, DATA_PROPERTY ),
     171             :         DEF_INFO_2( XSD_READONLY,      XSD_READONLY,        51, XSD_READONLY,      FORM_VISIBLE, DATA_PROPERTY ),
     172             :         DEF_INFO_2( XSD_CONSTRAINT,    XSD_CONSTRAINT,      52, XSD_CONSTRAINT,    FORM_VISIBLE, DATA_PROPERTY ),
     173             :         DEF_INFO_2( XSD_CALCULATION,   XSD_CALCULATION,     53, XSD_CALCULATION,   FORM_VISIBLE, DATA_PROPERTY ),
     174             : 
     175             :         // data type
     176             :         DEF_INFO_2( XSD_DATA_TYPE,     XSD_DATA_TYPE,       54, XSD_DATA_TYPE,     FORM_VISIBLE, DATA_PROPERTY ),
     177             :         // data types facets
     178             :         //  common
     179             :         DEF_INFO_3( XSD_WHITESPACES,   XSD_WHITESPACES,     55, XSD_WHITESPACES,   FORM_VISIBLE, DATA_PROPERTY, ENUM ),
     180             :         DEF_INFO_2( XSD_PATTERN,       XSD_PATTERN,         56, XSD_PATTERN,       FORM_VISIBLE, DATA_PROPERTY ),
     181             :         //  string
     182             :         DEF_INFO_2( XSD_LENGTH,        XSD_LENGTH,          57, XSD_LENGTH,        FORM_VISIBLE, DATA_PROPERTY ),
     183             :         DEF_INFO_2( XSD_MIN_LENGTH,    XSD_MIN_LENGTH,      58, XSD_MIN_LENGTH,    FORM_VISIBLE, DATA_PROPERTY ),
     184             :         DEF_INFO_2( XSD_MAX_LENGTH,    XSD_MAX_LENGTH,      59, XSD_MAX_LENGTH,    FORM_VISIBLE, DATA_PROPERTY ),
     185             :         //  decimal
     186             :         DEF_INFO_2( XSD_TOTAL_DIGITS,   XSD_TOTAL_DIGITS,   60, XSD_TOTAL_DIGITS,   FORM_VISIBLE, DATA_PROPERTY ),
     187             :         DEF_INFO_2( XSD_FRACTION_DIGITS,XSD_FRACTION_DIGITS,61,XSD_FRACTION_DIGITS,FORM_VISIBLE, DATA_PROPERTY ),
     188             :         //  int value types (year, month, day)
     189             :         DEF_INFO_2( XSD_MAX_INCLUSIVE_INT, XSD_MAX_INCLUSIVE, 62, XSD_MAX_INCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     190             :         DEF_INFO_2( XSD_MAX_EXCLUSIVE_INT, XSD_MAX_EXCLUSIVE, 63, XSD_MAX_EXCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     191             :         DEF_INFO_2( XSD_MIN_INCLUSIVE_INT, XSD_MIN_INCLUSIVE, 64, XSD_MIN_INCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     192             :         DEF_INFO_2( XSD_MIN_EXCLUSIVE_INT, XSD_MIN_EXCLUSIVE, 65, XSD_MIN_EXCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     193             :         //  double value types (double, float, decimal)
     194             :         DEF_INFO_2( XSD_MAX_INCLUSIVE_DOUBLE, XSD_MAX_INCLUSIVE, 66, XSD_MAX_INCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     195             :         DEF_INFO_2( XSD_MAX_EXCLUSIVE_DOUBLE, XSD_MAX_EXCLUSIVE, 67, XSD_MAX_EXCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     196             :         DEF_INFO_2( XSD_MIN_INCLUSIVE_DOUBLE, XSD_MIN_INCLUSIVE, 68, XSD_MIN_INCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     197             :         DEF_INFO_2( XSD_MIN_EXCLUSIVE_DOUBLE, XSD_MIN_EXCLUSIVE, 69, XSD_MIN_EXCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     198             :         // date value type
     199             :         DEF_INFO_2( XSD_MAX_INCLUSIVE_DATE, XSD_MAX_INCLUSIVE, 70, XSD_MAX_INCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     200             :         DEF_INFO_2( XSD_MAX_EXCLUSIVE_DATE, XSD_MAX_EXCLUSIVE, 71, XSD_MAX_EXCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     201             :         DEF_INFO_2( XSD_MIN_INCLUSIVE_DATE, XSD_MIN_INCLUSIVE, 72, XSD_MIN_INCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     202             :         DEF_INFO_2( XSD_MIN_EXCLUSIVE_DATE, XSD_MIN_EXCLUSIVE, 73, XSD_MIN_EXCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     203             :         // time value type
     204             :         DEF_INFO_2( XSD_MAX_INCLUSIVE_TIME, XSD_MAX_INCLUSIVE, 74, XSD_MAX_INCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     205             :         DEF_INFO_2( XSD_MAX_EXCLUSIVE_TIME, XSD_MAX_EXCLUSIVE, 75, XSD_MAX_EXCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     206             :         DEF_INFO_2( XSD_MIN_INCLUSIVE_TIME, XSD_MIN_INCLUSIVE, 76, XSD_MIN_INCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     207             :         DEF_INFO_2( XSD_MIN_EXCLUSIVE_TIME, XSD_MIN_EXCLUSIVE, 77, XSD_MIN_EXCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     208             :         // dateTime value type
     209             :         DEF_INFO_2( XSD_MAX_INCLUSIVE_DATE_TIME, XSD_MAX_INCLUSIVE, 78, XSD_MAX_INCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     210             :         DEF_INFO_2( XSD_MAX_EXCLUSIVE_DATE_TIME, XSD_MAX_EXCLUSIVE, 79, XSD_MAX_EXCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     211             :         DEF_INFO_2( XSD_MIN_INCLUSIVE_DATE_TIME, XSD_MIN_INCLUSIVE, 80, XSD_MIN_INCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     212             :         DEF_INFO_2( XSD_MIN_EXCLUSIVE_DATE_TIME, XSD_MIN_EXCLUSIVE, 81, XSD_MIN_EXCLUSIVE, FORM_VISIBLE, DATA_PROPERTY ),
     213             :         // <!----------------->
     214             : 
     215             :         DEF_INFO_2( HIDDEN_VALUE,      VALUE,               82, HIDDEN_VALUE,      FORM_VISIBLE, COMPOSEABLE ),
     216             :         DEF_INFO_2( VALUE,             VALUE,               83, VALUE,             DIALOG_VISIBLE, COMPOSEABLE ),
     217             :         DEF_INFO_3( VALUEMIN,          VALUEMIN,            84, VALUEMIN,          FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     218             :         DEF_INFO_3( VALUEMAX,          VALUEMAX,            85, VALUEMAX,          FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     219             :         DEF_INFO_3( VALUESTEP,         VALUESTEP,           86, VALUESTEP,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     220             :         DEF_INFO_2( DEFAULT_VALUE,     DEFAULTVALUE,        87, DEFAULT_LONG_VALUE,FORM_VISIBLE, COMPOSEABLE ),
     221             :         DEF_INFO_3( DECIMAL_ACCURACY,  DECIMAL_ACCURACY,    88, DECIMAL_ACCURACY,  FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     222             :         DEF_INFO_3( SHOWTHOUSANDSEP,   SHOWTHOUSANDSEP,     89, SHOWTHOUSANDSEP,   FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     223             : 
     224             :         DEF_INFO_3( CURRENCYSYMBOL,    CURRENCYSYMBOL,      90, CURRENCYSYMBOL,    FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     225             :         DEF_INFO_3( CURRSYM_POSITION,  CURRSYM_POSITION,    91, CURRSYM_POSITION,  FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     226             : 
     227             :         DEF_INFO_2( DATE,              DATE,                92, DATE,              DIALOG_VISIBLE, COMPOSEABLE ),
     228             :         DEF_INFO_3( DATEMIN,           DATEMIN,             93, DATEMIN,           FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     229             :         DEF_INFO_3( DATEMAX,           DATEMAX,             94, DATEMAX,           FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     230             :         DEF_INFO_4( DATEFORMAT,        DATEFORMAT,          95, DATEFORMAT,        FORM_VISIBLE, DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
     231             :         DEF_INFO_2( DEFAULT_DATE,      DEFAULTDATE,         96, DEFAULT_DATE,      FORM_VISIBLE, COMPOSEABLE ),
     232             : 
     233             :         DEF_INFO_2( TIME,              TIME,                97, TIME,              DIALOG_VISIBLE, COMPOSEABLE ),
     234             :         DEF_INFO_3( TIMEMIN,           TIMEMIN,             98, TIMEMIN,           FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     235             :         DEF_INFO_3( TIMEMAX,           TIMEMAX,             99, TIMEMAX,           FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     236             :         DEF_INFO_4( TIMEFORMAT,        TIMEFORMAT,         100, TIMEFORMAT,        FORM_VISIBLE, DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
     237             :         DEF_INFO_2( DEFAULT_TIME,      DEFAULTTIME,        101, DEFAULT_TIME,      FORM_VISIBLE, COMPOSEABLE ),
     238             : 
     239             :         DEF_INFO_1( EFFECTIVE_VALUE,   VALUE,              102, VALUE,             DIALOG_VISIBLE ),
     240             :         DEF_INFO_3( EFFECTIVE_MIN,     VALUEMIN,           103, EFFECTIVEMIN,      FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     241             :         DEF_INFO_3( EFFECTIVE_MAX,     VALUEMAX,           104, EFFECTIVEMAX,      FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     242             :         DEF_INFO_2( EFFECTIVE_DEFAULT, DEFAULTVALUE,       105, EFFECTIVEDEFAULT,  FORM_VISIBLE, COMPOSEABLE ),
     243             :         DEF_INFO_3( FORMATKEY,         FORMATKEY,          106, FORMATKEY,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     244             : 
     245             :         DEF_INFO_3( PROGRESSVALUE,     PROGRESSVALUE,      107, PROGRESSVALUE,     FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     246             :         DEF_INFO_3( PROGRESSVALUE_MIN, PROGRESSVALUE_MIN,  108, PROGRESSVALUE_MIN, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     247             :         DEF_INFO_3( PROGRESSVALUE_MAX, PROGRESSVALUE_MAX,  109, PROGRESSVALUE_MAX, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     248             : 
     249             :         DEF_INFO_2( SCROLLVALUE,       SCROLLVALUE,        110, SCROLLVALUE,       DIALOG_VISIBLE, COMPOSEABLE ),
     250             :         DEF_INFO_3( SCROLLVALUE_MIN,   SCROLLVALUE_MIN,    111, SCROLLVALUE_MIN,   FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     251             :         DEF_INFO_3( SCROLLVALUE_MAX,   SCROLLVALUE_MAX,    112, SCROLLVALUE_MAX,   FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     252             :         DEF_INFO_3( SCROLL_WIDTH,      SCROLL_WIDTH,       113, SCROLL_WIDTH,      FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     253             :         DEF_INFO_2( SCROLL_HEIGHT,     SCROLL_HEIGHT,      114, SCROLL_HEIGHT,     DIALOG_VISIBLE, COMPOSEABLE ),
     254             :         DEF_INFO_2( SCROLL_TOP,        SCROLL_TOP,         115, SCROLL_TOP,        DIALOG_VISIBLE, COMPOSEABLE ),
     255             :         DEF_INFO_2( SCROLL_LEFT,       SCROLL_LEFT,        116, SCROLL_LEFT,       DIALOG_VISIBLE, COMPOSEABLE ),
     256             :         DEF_INFO_2( DEFAULT_SCROLLVALUE,DEFAULT_SCROLLVALUE,117,DEFAULT_SCROLLVALUE,FORM_VISIBLE, COMPOSEABLE ),
     257             :         DEF_INFO_3( LINEINCREMENT,     LINEINCREMENT,      118, LINEINCREMENT,     FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     258             :         DEF_INFO_3( BLOCKINCREMENT,    BLOCKINCREMENT,     119, BLOCKINCREMENT,    FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     259             : 
     260             :         DEF_INFO_2( SPINVALUE,        VALUE,               120, SPINVALUE,         DIALOG_VISIBLE, COMPOSEABLE ),
     261             :         DEF_INFO_3( SPINVALUE_MIN,    VALUEMIN,            121, SPINVALUE_MIN,     FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     262             :         DEF_INFO_3( SPINVALUE_MAX,    VALUEMAX,            122, SPINVALUE_MAX,     FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     263             :         DEF_INFO_2( DEFAULT_SPINVALUE,DEFAULTVALUE,        123, DEFAULT_SPINVALUE, FORM_VISIBLE, COMPOSEABLE ),
     264             :         DEF_INFO_3( SPININCREMENT,    VALUESTEP,           124, SPININCREMENT,     FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     265             : 
     266             :         DEF_INFO_3( SPIN,              SPIN,               125, SPIN,              FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     267             :         DEF_INFO_3( REPEAT,            REPEAT,             126, REPEAT,            FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     268             :         DEF_INFO_3( REPEAT_DELAY,      REPEAT_DELAY,       127, REPEAT_DELAY,      FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     269             :         DEF_INFO_3( VISIBLESIZE,       VISIBLESIZE,        128, VISIBLESIZE,       FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     270             :         DEF_INFO_4( ORIENTATION,       ORIENTATION,        129, ORIENTATION,       FORM_VISIBLE, DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
     271             :         DEF_INFO_3( FOCUSONCLICK,      FOCUSONCLICK,       130, FOCUSONCLICK,      FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     272             :         DEF_INFO_3( TOGGLE,            TOGGLE,             131, TOGGLE,            FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     273             :         DEF_INFO_3( DEFAULT_STATE,     DEFAULT_STATE,      132, DEFAULT_STATE,     FORM_VISIBLE, ENUM, COMPOSEABLE ),
     274             : 
     275             :         DEF_INFO_3( TEXT_ANCHOR_TYPE,  ANCHOR_TYPE,        133, ANCHOR_TYPE,       FORM_VISIBLE, ENUM, COMPOSEABLE ),
     276             :         DEF_INFO_3( SHEET_ANCHOR_TYPE, ANCHOR_TYPE,        134, ANCHOR_TYPE,       FORM_VISIBLE, ENUM, COMPOSEABLE ),
     277             :         DEF_INFO_3( POSITIONX,         POSITIONX,          135, POSITIONX,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     278             :         DEF_INFO_3( POSITIONY,         POSITIONY,          136, POSITIONY,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     279             :         DEF_INFO_3( WIDTH,             WIDTH,              137, WIDTH,             FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     280             :         DEF_INFO_3( HEIGHT,            HEIGHT,             138, HEIGHT,            FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     281             : 
     282             :         DEF_INFO_1( LISTINDEX,         LISTINDEX,          139, LISTINDEX,         FORM_VISIBLE ),
     283             :         DEF_INFO_3( STRINGITEMLIST,    STRINGITEMLIST,     140, STRINGITEMLIST,    FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     284             :         DEF_INFO_2( DEFAULT_TEXT,      DEFAULTTEXT,        141, DEFAULTVALUE,      FORM_VISIBLE, COMPOSEABLE ),
     285             :         DEF_INFO_3( FONT,              FONT,               142, FONT,              FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     286             :         DEF_INFO_4( VISUALEFFECT,      VISUALEFFECT,       143, VISUALEFFECT,      FORM_VISIBLE, DIALOG_VISIBLE, ENUM_ONE, COMPOSEABLE ),
     287             :         DEF_INFO_4( ALIGN,             ALIGN,              144, ALIGN,             FORM_VISIBLE, DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
     288             :         DEF_INFO_3( VERTICAL_ALIGN,    VERTICAL_ALIGN,     145, VERTICAL_ALIGN,    FORM_VISIBLE, ENUM, COMPOSEABLE ),
     289             :         DEF_INFO_3( ROWHEIGHT,         ROWHEIGHT,          146, ROWHEIGHT,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     290             :         DEF_INFO_3( BACKGROUNDCOLOR,   BACKGROUNDCOLOR,    147, BACKGROUNDCOLOR,   FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     291             :         DEF_INFO_3( SYMBOLCOLOR,       SYMBOLCOLOR,        148, SYMBOLCOLOR,       FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     292             :         DEF_INFO_3( FILLCOLOR,         FILLCOLOR,          149, FILLCOLOR,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     293             :         DEF_INFO_3( LINECOLOR,         LINECOLOR,          150, LINECOLOR,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     294             :         DEF_INFO_4( BORDER,            BORDER,             151, BORDER,            FORM_VISIBLE, DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
     295             :         DEF_INFO_3( BORDERCOLOR,       BORDERCOLOR,        152, BORDERCOLOR,       FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     296             :         DEF_INFO_3( ICONSIZE,          ICONSIZE,           153, ICONSIZE,          FORM_VISIBLE, ENUM, COMPOSEABLE ),
     297             :         DEF_INFO_2( SHOW_POSITION,     SHOW_POSITION,      154, SHOW_POSITION,     FORM_VISIBLE, COMPOSEABLE ),
     298             :         DEF_INFO_2( SHOW_NAVIGATION,   SHOW_NAVIGATION,    155, SHOW_NAVIGATION,   FORM_VISIBLE, COMPOSEABLE ),
     299             :         DEF_INFO_2( SHOW_RECORDACTIONS,SHOW_RECORDACTIONS, 156, SHOW_RECORDACTIONS,FORM_VISIBLE, COMPOSEABLE ),
     300             :         DEF_INFO_2( SHOW_FILTERSORT,   SHOW_FILTERSORT,    157, SHOW_FILTERSORT,   FORM_VISIBLE, COMPOSEABLE ),
     301             : 
     302             :         DEF_INFO_3( DROPDOWN,          DROPDOWN,           158, DROPDOWN,          FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     303             :         DEF_INFO_3( LINECOUNT,         LINECOUNT,          159, LINECOUNT,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     304             :         DEF_INFO_3( AUTOCOMPLETE,      AUTOCOMPLETE,       160, AUTOCOMPLETE,      FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     305             :         DEF_INFO_3( MULTILINE,         MULTILINE,          161, MULTILINE,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     306             :         DEF_INFO_3( WORDBREAK,         WORDBREAK,          162, WORDBREAK,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     307             :         DEF_INFO_3( TEXTTYPE,          TEXTTYPE,           163, TEXTTYPE,          FORM_VISIBLE, ENUM, COMPOSEABLE ),
     308             :         DEF_INFO_3( LINEEND_FORMAT,    LINEEND_FORMAT,     164, LINEEND_FORMAT,    FORM_VISIBLE, ENUM_ONE, COMPOSEABLE ),
     309             :         DEF_INFO_3( MULTISELECTION,    MULTISELECTION,     165, MULTISELECTION,    FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     310             :         DEF_INFO_4( SHOW_SCROLLBARS,   SHOW_SCROLLBARS,    166, SHOW_SCROLLBARS,   FORM_VISIBLE, DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
     311             :         DEF_INFO_3( HSCROLL,           HSCROLL,            167, HSCROLL,           FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     312             :         DEF_INFO_3( VSCROLL,           VSCROLL,            168, VSCROLL,           FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     313             :         DEF_INFO_3( BUTTONTYPE,        BUTTONTYPE,         169, BUTTONTYPE,        FORM_VISIBLE, ENUM, COMPOSEABLE ),
     314             :         DEF_INFO_2( XFORMS_BUTTONTYPE, BUTTONTYPE,         170, BUTTONTYPE,        FORM_VISIBLE, ENUM ),
     315             :         DEF_INFO_1( SUBMISSION_ID,     SUBMISSION_ID,      171, SUBMISSION_ID,     FORM_VISIBLE ),
     316             :         DEF_INFO_2( PUSHBUTTONTYPE,    PUSHBUTTONTYPE,     172, PUSHBUTTONTYPE,    DIALOG_VISIBLE, ENUM ),
     317             :         DEF_INFO_2( TARGET_URL,        TARGET_URL,         173, TARGET_URL,        FORM_VISIBLE, COMPOSEABLE ),
     318             :         DEF_INFO_1( TARGET_FRAME,      TARGET_FRAME,       174, TARGET_FRAME,      FORM_VISIBLE ),
     319             :         DEF_INFO_2( SUBMIT_ACTION,     SUBMIT_ACTION,      175, SUBMIT_ACTION,     FORM_VISIBLE, COMPOSEABLE ),
     320             :         DEF_INFO_2( SUBMIT_TARGET,     SUBMIT_TARGET,      176, SUBMIT_TARGET,     FORM_VISIBLE, COMPOSEABLE ),
     321             :         DEF_INFO_3( SUBMIT_ENCODING,   SUBMIT_ENCODING,    177, SUBMIT_ENCODING,   FORM_VISIBLE, ENUM, COMPOSEABLE ),
     322             :         DEF_INFO_3( SUBMIT_METHOD,     SUBMIT_METHOD,      178, SUBMIT_METHOD,     FORM_VISIBLE, ENUM, COMPOSEABLE ),
     323             :         DEF_INFO_3( STATE,             STATE,              179, STATE,             DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
     324             :         DEF_INFO_3( DEFAULTBUTTON,     DEFAULT_BUTTON,     180, DEFAULT_BUTTON,    FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     325             :         DEF_INFO_3( IMAGE_URL,         IMAGE_URL,          181, IMAGE_URL,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     326             :         DEF_INFO_4( IMAGEPOSITION,     IMAGEPOSITION,      182, IMAGEPOSITION,     FORM_VISIBLE, DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
     327             :         DEF_INFO_3( SCALEIMAGE,        SCALEIMAGE,         183, SCALEIMAGE,        FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     328             :         DEF_INFO_4( SCALE_MODE,        SCALEIMAGE,         184, SCALEIMAGE,        FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE, ENUM ),
     329             :         DEF_INFO_2( DEFAULT_SELECT_SEQ,DEFAULT_SELECT_SEQ, 185, DEFAULT_SELECT_SEQ,FORM_VISIBLE, COMPOSEABLE ),
     330             :         DEF_INFO_2( SELECTEDITEMS,     SELECTEDITEMS,      186, SELECTEDITEMS,     DIALOG_VISIBLE, COMPOSEABLE ),
     331             :         DEF_INFO_3( ECHO_CHAR,         ECHO_CHAR,          187, ECHO_CHAR,         FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     332             :         DEF_INFO_3( HIDEINACTIVESELECTION, HIDEINACTIVESELECTION, 188, HIDEINACTIVESELECTION, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     333             :         DEF_INFO_3( TRISTATE,          TRISTATE,           189, TRISTATE,          FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     334             :         DEF_INFO_2( HASNAVIGATION,     NAVIGATION,         190, NAVIGATIONBAR,     FORM_VISIBLE, COMPOSEABLE ),
     335             :         DEF_INFO_2( RECORDMARKER,      RECORDMARKER,       191, RECORDMARKER,      FORM_VISIBLE, COMPOSEABLE ),
     336             :         DEF_INFO_3( TAG,               TAG,                192, TAG,               FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     337             :         DEF_INFO_3( HELPTEXT,          HELPTEXT,           193, HELPTEXT,          FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     338             :         DEF_INFO_3( HELPURL,           HELPURL,            194, HELPURL,           FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
     339             :         DEF_INFO_3( SELECTION_TYPE,    SELECTION_TYPE,     195, SELECTION_TYPE,                  DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
     340             :         DEF_INFO_2( ROOT_DISPLAYED,    ROOT_DISPLAYED,     196, ROOT_DISPLAYED,                  DIALOG_VISIBLE, COMPOSEABLE ),
     341             :         DEF_INFO_2( SHOWS_HANDLES,     SHOWS_HANDLES,      197, SHOWS_HANDLES,                   DIALOG_VISIBLE, COMPOSEABLE ),
     342             :         DEF_INFO_2( SHOWS_ROOT_HANDLES, SHOWS_ROOT_HANDLES, 198, SHOWS_ROOT_HANDLES,             DIALOG_VISIBLE, COMPOSEABLE ),
     343             :         DEF_INFO_2( EDITABLE,          EDITABLE,           199, EDITABLE,                        DIALOG_VISIBLE, COMPOSEABLE ),
     344             :         DEF_INFO_2( INVOKES_STOP_NOT_EDITING, INVOKES_STOP_NOT_EDITING, 200, INVOKES_STOP_NOT_EDITING, DIALOG_VISIBLE, COMPOSEABLE ),
     345             :         DEF_INFO_2( DECORATION,        DECORATION,         201, DECORATION,                      DIALOG_VISIBLE, COMPOSEABLE ),
     346             :         DEF_INFO_2( NOLABEL,           NOLABEL,            202, NOLABEL,                         DIALOG_VISIBLE, COMPOSEABLE )
     347           0 :         };
     348             : 
     349           0 :         s_pPropertyInfos = aPropertyInfos;
     350           0 :         s_nCount = SAL_N_ELEMENTS(aPropertyInfos);
     351             : 
     352             :         // sort
     353           0 :         ::std::sort( s_pPropertyInfos, s_pPropertyInfos + s_nCount, PropertyInfoLessByName() );
     354             : 
     355             : #if OSL_DEBUG_LEVEL > 0
     356             :         for ( const OPropertyInfoImpl* pCheck = s_pPropertyInfos; pCheck != s_pPropertyInfos + s_nCount - 1; ++pCheck )
     357             :         {
     358             :             OSL_ENSURE( pCheck->sName != ( pCheck + 1 )->sName, "OPropertyInfoService::getPropertyInfo: duplicate entry in the table!" );
     359             :         }
     360             : #endif
     361             : 
     362           0 :         return s_pPropertyInfos;
     363             :     }
     364             : 
     365             : 
     366           0 :     sal_Int32 OPropertyInfoService::getPropertyId(const OUString& _rName) const
     367             :     {
     368           0 :         const OPropertyInfoImpl* pInfo = getPropertyInfo(_rName);
     369           0 :         return pInfo ? pInfo->nId : -1;
     370             :     }
     371             : 
     372             : 
     373           0 :     OUString OPropertyInfoService::getPropertyName( sal_Int32 _nPropId )
     374             :     {
     375           0 :         const OPropertyInfoImpl* pInfo = getPropertyInfo(_nPropId);
     376           0 :         return pInfo ? pInfo->sName : OUString();
     377             :     }
     378             : 
     379             : 
     380           0 :     OUString OPropertyInfoService::getPropertyTranslation(sal_Int32 _nId) const
     381             :     {
     382           0 :         const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId);
     383           0 :         return (pInfo) ? pInfo->sTranslation : OUString();
     384             :     }
     385             : 
     386             : 
     387           0 :     OString OPropertyInfoService::getPropertyHelpId(sal_Int32 _nId) const
     388             :     {
     389           0 :         const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId);
     390           0 :         return (pInfo) ? pInfo->sHelpId : OString();
     391             :     }
     392             : 
     393             : 
     394           0 :     sal_Int16 OPropertyInfoService::getPropertyPos(sal_Int32 _nId) const
     395             :     {
     396           0 :         const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId);
     397           0 :         return (pInfo) ? pInfo->nPos : 0xFFFF;
     398             :     }
     399             : 
     400             : 
     401           0 :     sal_uInt32 OPropertyInfoService::getPropertyUIFlags(sal_Int32 _nId) const
     402             :     {
     403           0 :         const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId);
     404           0 :         return (pInfo) ? pInfo->nUIFlags : 0;
     405             :     }
     406             : 
     407             : 
     408           0 :     ::std::vector< OUString > OPropertyInfoService::getPropertyEnumRepresentations(sal_Int32 _nId) const
     409             :     {
     410             :         OSL_ENSURE( ( ( getPropertyUIFlags( _nId ) & PROP_FLAG_ENUM ) != 0 ) || ( _nId == PROPERTY_ID_TARGET_FRAME ),
     411             :             "OPropertyInfoService::getPropertyEnumRepresentations: this is no enum property!" );
     412             : 
     413           0 :         sal_Int16 nStringItemsResId = 0;
     414           0 :         switch ( _nId )
     415             :         {
     416             :             case PROPERTY_ID_IMAGEPOSITION:
     417           0 :                 nStringItemsResId = RID_RSC_ENUM_IMAGE_POSITION;
     418           0 :                 break;
     419             :             case PROPERTY_ID_BORDER:
     420           0 :                 nStringItemsResId = RID_RSC_ENUM_BORDER_TYPE;
     421           0 :                 break;
     422             :             case PROPERTY_ID_ICONSIZE:
     423           0 :                 nStringItemsResId = RID_RSC_ENUM_ICONSIZE_TYPE;
     424           0 :                 break;
     425             :             case PROPERTY_ID_COMMANDTYPE:
     426           0 :                 nStringItemsResId = RID_RSC_ENUM_COMMAND_TYPE;
     427           0 :                 break;
     428             :             case PROPERTY_ID_LISTSOURCETYPE:
     429           0 :                 nStringItemsResId = RID_RSC_ENUM_LISTSOURCE_TYPE;
     430           0 :                 break;
     431             :             case PROPERTY_ID_ALIGN:
     432           0 :                 nStringItemsResId = RID_RSC_ENUM_ALIGNMENT;
     433           0 :                 break;
     434             :             case PROPERTY_ID_VERTICAL_ALIGN:
     435           0 :                 nStringItemsResId = RID_RSC_ENUM_VERTICAL_ALIGN;
     436           0 :                 break;
     437             :             case PROPERTY_ID_BUTTONTYPE:
     438           0 :                 nStringItemsResId = RID_RSC_ENUM_BUTTONTYPE;
     439           0 :                 break;
     440             :             case PROPERTY_ID_PUSHBUTTONTYPE:
     441           0 :                 nStringItemsResId = RID_RSC_ENUM_PUSHBUTTONTYPE;
     442           0 :                 break;
     443             :             case PROPERTY_ID_SUBMIT_METHOD:
     444           0 :                 nStringItemsResId = RID_RSC_ENUM_SUBMIT_METHOD;
     445           0 :                 break;
     446             :             case PROPERTY_ID_SUBMIT_ENCODING:
     447           0 :                 nStringItemsResId = RID_RSC_ENUM_SUBMIT_ENCODING;
     448           0 :                 break;
     449             :             case PROPERTY_ID_DATEFORMAT:
     450           0 :                 nStringItemsResId = RID_RSC_ENUM_DATEFORMAT_LIST;
     451           0 :                 break;
     452             :             case PROPERTY_ID_TIMEFORMAT:
     453           0 :                 nStringItemsResId = RID_RSC_ENUM_TIMEFORMAT_LIST;
     454           0 :                 break;
     455             :             case PROPERTY_ID_DEFAULT_STATE:
     456             :             case PROPERTY_ID_STATE:
     457           0 :                 nStringItemsResId = RID_RSC_ENUM_CHECKED;
     458           0 :                 break;
     459             :             case PROPERTY_ID_CYCLE:
     460           0 :                 nStringItemsResId = RID_RSC_ENUM_CYCLE;
     461           0 :                 break;
     462             :             case PROPERTY_ID_NAVIGATION:
     463           0 :                 nStringItemsResId = RID_RSC_ENUM_NAVIGATION;
     464           0 :                 break;
     465             :             case PROPERTY_ID_TARGET_FRAME:
     466           0 :                 nStringItemsResId = RID_RSC_ENUM_SUBMIT_TARGET;
     467           0 :                 break;
     468             :             case PROPERTY_ID_ORIENTATION:
     469           0 :                 nStringItemsResId = RID_RSC_ENUM_ORIENTATION;
     470           0 :                 break;
     471             :             case PROPERTY_ID_CELL_EXCHANGE_TYPE:
     472           0 :                 nStringItemsResId = RID_RSC_ENUM_CELL_EXCHANGE_TYPE;
     473           0 :                 break;
     474             :             case PROPERTY_ID_SHOW_SCROLLBARS:
     475           0 :                 nStringItemsResId = RID_RSC_ENUM_SCROLLBARS;
     476           0 :                 break;
     477             :             case PROPERTY_ID_VISUALEFFECT:
     478           0 :                 nStringItemsResId = RID_RSC_ENUM_VISUALEFFECT;
     479           0 :                 break;
     480             :             case PROPERTY_ID_TEXTTYPE:
     481           0 :                 nStringItemsResId = RID_RSC_ENUM_TEXTTYPE;
     482           0 :                 break;
     483             :             case PROPERTY_ID_LINEEND_FORMAT:
     484           0 :                 nStringItemsResId = RID_RSC_ENUM_LINEEND_FORMAT;
     485           0 :                 break;
     486             :             case PROPERTY_ID_XSD_WHITESPACES:
     487           0 :                 nStringItemsResId = RID_RSC_ENUM_WHITESPACE_HANDLING;
     488           0 :                 break;
     489             :             case PROPERTY_ID_SELECTION_TYPE:
     490           0 :                 nStringItemsResId = RID_RSC_ENUM_SELECTION_TYPE;
     491           0 :                 break;
     492             :             case PROPERTY_ID_SCALE_MODE:
     493           0 :                 nStringItemsResId = RID_RSC_ENUM_SCALE_MODE;
     494           0 :                 break;
     495             :             case PROPERTY_ID_WRITING_MODE:
     496           0 :                 nStringItemsResId = RID_RSC_ENUM_WRITING_MODE;
     497           0 :                 break;
     498             :             case PROPERTY_ID_WHEEL_BEHAVIOR:
     499           0 :                 nStringItemsResId = RID_RSC_ENUM_WHEEL_BEHAVIOR;
     500           0 :                 break;
     501             :             case PROPERTY_ID_TEXT_ANCHOR_TYPE:
     502           0 :                 nStringItemsResId = RID_RSC_ENUM_TEXT_ANCHOR_TYPE;
     503           0 :                 break;
     504             :             case PROPERTY_ID_SHEET_ANCHOR_TYPE:
     505           0 :                 nStringItemsResId = RID_RSC_ENUM_SHEET_ANCHOR_TYPE;
     506           0 :                 break;
     507             :             default:
     508             :                 OSL_FAIL( "OPropertyInfoService::getPropertyEnumRepresentations: unknown enum property!" );
     509           0 :                 break;
     510             :         }
     511             : 
     512           0 :         ::std::vector< OUString > aReturn;
     513             : 
     514           0 :         if ( nStringItemsResId )
     515             :         {
     516           0 :             PcrRes aResId( nStringItemsResId );
     517           0 :             ::svt::OLocalResourceAccess aEnumStrings( aResId, RSC_RESOURCE );
     518             : 
     519           0 :             sal_Int16 i = 1;
     520           0 :             PcrRes aLocalId( i );
     521           0 :             while ( aEnumStrings.IsAvailableRes( aLocalId.SetRT( RSC_STRING ) ) )
     522             :             {
     523           0 :                 aReturn.push_back( aLocalId.toString() );
     524           0 :                 aLocalId = PcrRes( ++i );
     525           0 :             }
     526             :         }
     527             : 
     528           0 :         return aReturn;
     529             :     }
     530             : 
     531             : 
     532           0 :     sal_Bool OPropertyInfoService::isComposeable( const OUString& _rPropertyName ) const
     533             :     {
     534           0 :         sal_Int32 nId = getPropertyId( _rPropertyName );
     535           0 :         if ( nId == -1 )
     536           0 :             return sal_False;
     537             : 
     538           0 :         sal_uInt32 nFlags = getPropertyUIFlags( nId );
     539           0 :         return ( nFlags & PROP_FLAG_COMPOSEABLE ) != 0;
     540             :     }
     541             : 
     542             : 
     543           0 :     const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo(const OUString& _rName)
     544             :     {
     545             :         // Initialization
     546           0 :         if(!s_pPropertyInfos)
     547           0 :             getPropertyInfo();
     548           0 :         OPropertyInfoImpl  aSearch(_rName, 0L, OUString(), 0, "", 0);
     549             : 
     550             :         const OPropertyInfoImpl* pInfo = ::std::lower_bound(
     551           0 :             s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, PropertyInfoLessByName() );
     552             : 
     553           0 :         if ( pInfo == s_pPropertyInfos + s_nCount )
     554           0 :             return NULL;
     555             : 
     556           0 :         if ( pInfo->sName != _rName )
     557           0 :             return NULL;
     558             : 
     559           0 :         return pInfo;
     560             :     }
     561             : 
     562             : 
     563             : 
     564           0 :     const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo(sal_Int32 _nId)
     565             :     {
     566             :         // Initialization
     567           0 :         if(!s_pPropertyInfos)
     568           0 :             getPropertyInfo();
     569             : 
     570             :         // TODO: a real structure which allows quick access by name as well as by id
     571           0 :         for (sal_uInt16 i = 0; i < s_nCount; i++)
     572           0 :             if (s_pPropertyInfos[i].nId == _nId)
     573           0 :                 return &s_pPropertyInfos[i];
     574             : 
     575           0 :         return NULL;
     576             :     }
     577             : 
     578             : 
     579             :     //= DefaultEnumRepresentation
     580             : 
     581             : 
     582           0 :     DefaultEnumRepresentation::DefaultEnumRepresentation( const IPropertyInfoService& _rInfo, const Type& _rType, sal_Int32 _nPropertyId )
     583             :         :m_refCount( 0 )
     584             :         ,m_rMetaData( _rInfo )
     585             :         ,m_aType( _rType )
     586           0 :         ,m_nPropertyId( _nPropertyId )
     587             :     {
     588           0 :     }
     589             : 
     590             : 
     591           0 :     DefaultEnumRepresentation::~DefaultEnumRepresentation()
     592             :     {
     593           0 :     }
     594             : 
     595             : 
     596           0 :     ::std::vector< OUString > SAL_CALL DefaultEnumRepresentation::getDescriptions() const
     597             :     {
     598           0 :         return m_rMetaData.getPropertyEnumRepresentations( m_nPropertyId );
     599             :     }
     600             : 
     601             : 
     602           0 :     void SAL_CALL DefaultEnumRepresentation::getValueFromDescription( const OUString& _rDescription, Any& _out_rValue ) const
     603             :     {
     604           0 :         sal_uInt32  nPropertyUIFlags = m_rMetaData.getPropertyUIFlags( m_nPropertyId );
     605           0 :         ::std::vector< OUString > aEnumStrings = m_rMetaData.getPropertyEnumRepresentations( m_nPropertyId );
     606           0 :         ::std::vector< OUString >::const_iterator pos = ::std::find( aEnumStrings.begin(), aEnumStrings.end(), _rDescription );
     607           0 :         if ( pos != aEnumStrings.end() )
     608             :         {
     609           0 :             sal_Int32 nPos = pos - aEnumStrings.begin();
     610           0 :             if ( ( nPropertyUIFlags & PROP_FLAG_ENUM_ONE ) == PROP_FLAG_ENUM_ONE )
     611             :                 // enum value starting with 1
     612           0 :                 ++nPos;
     613             : 
     614           0 :             switch ( m_aType.getTypeClass() )
     615             :             {
     616             :                 case TypeClass_ENUM:
     617           0 :                     _out_rValue = ::cppu::int2enum( nPos, m_aType );
     618           0 :                     break;
     619             : 
     620             :                 case TypeClass_SHORT:
     621           0 :                     _out_rValue <<= (sal_Int16)nPos;
     622           0 :                     break;
     623             : 
     624             :                 case TypeClass_UNSIGNED_SHORT:
     625           0 :                     _out_rValue <<= (sal_uInt16)nPos;
     626           0 :                     break;
     627             : 
     628             :                 case TypeClass_UNSIGNED_LONG:
     629           0 :                     _out_rValue <<= (sal_uInt32)nPos;
     630           0 :                     break;
     631             : 
     632             :                 default:
     633           0 :                     _out_rValue <<= (sal_Int32)nPos;
     634           0 :                     break;
     635             :             }
     636             :         }
     637             :         else
     638             :         {
     639             :             OSL_FAIL( "DefaultEnumRepresentation::getValueFromDescription: could not translate the enum string!" );
     640           0 :             _out_rValue.clear();
     641           0 :         }
     642           0 :     }
     643             : 
     644             : 
     645           0 :     OUString SAL_CALL DefaultEnumRepresentation::getDescriptionForValue( const Any& _rEnumValue ) const
     646             :     {
     647           0 :         OUString sReturn;
     648           0 :         sal_Int32 nIntValue = -1;
     649           0 :         OSL_VERIFY( ::cppu::enum2int( nIntValue, _rEnumValue ) );
     650             : 
     651           0 :         sal_uInt32 nUIFlags = m_rMetaData.getPropertyUIFlags( m_nPropertyId );
     652           0 :         if ( ( nUIFlags & PROP_FLAG_ENUM_ONE ) == PROP_FLAG_ENUM_ONE )
     653             :             // enum value starting with 1
     654           0 :             --nIntValue;
     655             : 
     656           0 :         ::std::vector< OUString > aEnumStrings = m_rMetaData.getPropertyEnumRepresentations( m_nPropertyId );
     657           0 :         if ( ( nIntValue >= 0 ) && ( nIntValue < (sal_Int32)aEnumStrings.size() ) )
     658             :         {
     659           0 :             sReturn = aEnumStrings[ nIntValue ];
     660             :         }
     661             :         else
     662             :         {
     663             :             OSL_FAIL( "DefaultEnumRepresentation::getDescriptionForValue: could not translate an enum value" );
     664             :         }
     665           0 :         return sReturn;
     666             :     }
     667             : 
     668             : 
     669           0 :     oslInterlockedCount SAL_CALL DefaultEnumRepresentation::acquire()
     670             :     {
     671           0 :         return osl_atomic_increment( &m_refCount );
     672             :     }
     673             : 
     674             : 
     675           0 :     oslInterlockedCount SAL_CALL DefaultEnumRepresentation::release()
     676             :     {
     677           0 :         if ( 0 == osl_atomic_decrement( &m_refCount ) )
     678             :         {
     679           0 :            delete this;
     680           0 :            return 0;
     681             :         }
     682           0 :         return m_refCount;
     683             :     }
     684             : 
     685             : 
     686             : } // namespace pcr
     687             : 
     688             : 
     689             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10