LCOV - code coverage report
Current view: top level - reportdesign/source/ui/inc - metadata.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 2 2 100.0 %
Date: 2015-06-13 12:38:46 Functions: 3 3 100.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             : #ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_METADATA_HXX
      20             : #define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_METADATA_HXX
      21             : 
      22             : #include "ModuleHelper.hxx"
      23             : 
      24             : #include <com/sun/star/beans/Property.hpp>
      25             : #include <com/sun/star/inspection/XPropertyHandler.hpp>
      26             : 
      27             : 
      28             : namespace rptui
      29             : {
      30             : 
      31             : 
      32             :     struct OPropertyInfoImpl;
      33             : 
      34             : 
      35             :     //= OPropertyInfoService
      36             : 
      37             :     class OPropertyInfoService
      38             :         :public OModuleClient
      39             :     {
      40             :         OPropertyInfoService(const OPropertyInfoService&) SAL_DELETED_FUNCTION;
      41             :         void operator =(const OPropertyInfoService&) SAL_DELETED_FUNCTION;
      42             :     protected:
      43             :         static sal_uInt16               s_nCount;
      44             :         static OPropertyInfoImpl*       s_pPropertyInfos;
      45             :         // TODO: a real structure which allows quick access by name as well as by id
      46             : 
      47             :     public:
      48           3 :         OPropertyInfoService(){}
      49           6 :         virtual ~OPropertyInfoService(){}
      50             :         // IPropertyInfoService
      51             :         static sal_Int32                    getPropertyId(const OUString& _rName);
      52             :         static OUString                     getPropertyTranslation(sal_Int32 _nId);
      53             :         static OString                      getPropertyHelpId(sal_Int32 _nId);
      54             :         static sal_uInt32                   getPropertyUIFlags(sal_Int32 _nId);
      55             :         static void                         getExcludeProperties(::std::vector< com::sun::star::beans::Property >& _rExcludeProperties,const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler);
      56             : 
      57             :         static bool                         isComposable(
      58             :                                                 const OUString& _rPropertyName,
      59             :                                                 const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler
      60             :                                             );
      61             : 
      62             :     protected:
      63             :         static const OPropertyInfoImpl* getPropertyInfo();
      64             : 
      65             :         static const OPropertyInfoImpl* getPropertyInfo(const OUString& _rName);
      66             :         static const OPropertyInfoImpl* getPropertyInfo(sal_Int32 _nId);
      67             :     };
      68             : 
      69             : 
      70             :     //= HelpIdUrl
      71             : 
      72             :     /// small helper to translate help ids into help urls
      73             :     class HelpIdUrl
      74             :     {
      75             :     public:
      76             :         static OUString getHelpURL( const OString& _sHelpId );
      77             :     };
      78             : 
      79             : 
      80             :     //= UI flags (for all browseable properties)
      81             : 
      82             : 
      83             : #define PROP_FLAG_NONE              0x00000001  // no special flag
      84             : #define PROP_FLAG_ENUM              0x00000002  // the property is some kind of enum property, i.e. its
      85             :                                                 // value is chosen from a fixed list of possible values
      86             : #define PROP_FLAG_ENUM_ONE          0x00000004  // the property is an enum property starting with 1
      87             :                                                 //  (note that this includes PROP_FLAG_ENUM)
      88             : #define PROP_FLAG_COMPOSEABLE       0x00000008  // the property is "composeable", i.e. an intersection of property
      89             :                                                 //  sets should expose it, if all elements do
      90             : #define PROP_FLAG_EXPERIMENTAL      0x00000010  // the property is experimental, i.e. should not appear in the
      91             :                                                 // UI, unless experimental properties are enabled by a configuraiton
      92             :                                                 // option
      93             : #define PROP_FLAG_DATA_PROPERTY     0x00000020  // the property is to appear on the "Data" page
      94             : 
      95             : 
      96             :     //= property ids (for all browseable properties)
      97             :     //= The ID is used for the view order in the property browser.
      98             : 
      99             : 
     100             :     #define PROPERTY_ID_FORCENEWPAGE                    1
     101             :     #define PROPERTY_ID_NEWROWORCOL                     2
     102             :     #define PROPERTY_ID_KEEPTOGETHER                    3
     103             :     #define PROPERTY_ID_CANGROW                         4
     104             :     #define PROPERTY_ID_CANSHRINK                       5
     105             :     #define PROPERTY_ID_REPEATSECTION                   6
     106             :     #define PROPERTY_ID_PRESERVEIRI                     7
     107             :     #define PROPERTY_ID_VISIBLE                         8
     108             :     #define PROPERTY_ID_GROUPKEEPTOGETHER               9
     109             :     #define PROPERTY_ID_PAGEHEADEROPTION                10
     110             :     #define PROPERTY_ID_PAGEFOOTEROPTION                11
     111             :     #define PROPERTY_ID_POSITIONX                       12
     112             :     #define PROPERTY_ID_POSITIONY                       13
     113             :     #define PROPERTY_ID_WIDTH                           14
     114             :     #define PROPERTY_ID_HEIGHT                          15
     115             :     #define PROPERTY_ID_FORMULA                         16
     116             :     #define PROPERTY_ID_CONDITIONALPRINTEXPRESSION      17
     117             :     #define PROPERTY_ID_PRINTREPEATEDVALUES             18
     118             :     #define PROPERTY_ID_PRINTWHENGROUPCHANGE            19
     119             :     #define PROPERTY_ID_INITIALFORMULA                  20
     120             :     #define PROPERTY_ID_STARTNEWCOLUMN                  21
     121             :     #define PROPERTY_ID_TYPE                            22
     122             :     #define PROPERTY_ID_DATAFIELD                       23
     123             :     #define PROPERTY_ID_CHARFONTNAME                    24
     124             :     #define PROPERTY_ID_DEEPTRAVERSING                  25
     125             :     #define PROPERTY_ID_PREEVALUATED                    26
     126             : 
     127             :     #define PROPERTY_ID_BACKTRANSPARENT                 27
     128             :     #define PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT    28
     129             :     #define PROPERTY_ID_BACKCOLOR                       29
     130             :     #define PROPERTY_ID_CONTROLBACKGROUND               30
     131             : 
     132             :     #define PROPERTY_ID_FORMULALIST                     31
     133             :     #define PROPERTY_ID_SCOPE                           32
     134             :     #define PROPERTY_ID_RESETPAGENUMBER                 33
     135             :     #define PROPERTY_ID_CHARTTYPE                       34
     136             :     #define PROPERTY_ID_MASTERFIELDS                    35
     137             :     #define PROPERTY_ID_DETAILFIELDS                    36
     138             :     #define PROPERTY_ID_PREVIEW_COUNT                   37
     139             :     #define PROPERTY_ID_AREA                            38
     140             :     #define PROPERTY_ID_MIMETYPE                        39
     141             : 
     142             :     #define PROPERTY_ID_FONT                            40
     143             :     #define PROPERTY_ID_PARAADJUST                      41
     144             :     #define PROPERTY_ID_VERTICALALIGN                   42
     145             : 
     146             : 
     147             : 
     148             : } // namespace rptui
     149             : 
     150             : 
     151             : #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_METADATA_HXX
     152             : 
     153             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11