LCOV - code coverage report
Current view: top level - framework/inc - properties.h (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 9 0.0 %
Date: 2014-04-14 Functions: 0 1 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             : #ifndef INCLUDED_FRAMEWORK_INC_PROPERTIES_H
      21             : #define INCLUDED_FRAMEWORK_INC_PROPERTIES_H
      22             : 
      23             : #include <macros/generic.hxx>
      24             : #include <general.h>
      25             : 
      26             : namespace framework{
      27             : 
      28             : /** properties for "Frame" class */
      29             : 
      30             : #define FRAME_PROPNAME_ASCII_DISPATCHRECORDERSUPPLIER   "DispatchRecorderSupplier"
      31             : #define FRAME_PROPNAME_ASCII_ISHIDDEN                   "IsHidden"
      32             : #define FRAME_PROPNAME_ASCII_LAYOUTMANAGER              "LayoutManager"
      33             : #define FRAME_PROPNAME_ASCII_TITLE                      "Title"
      34             : #define FRAME_PROPNAME_ASCII_INDICATORINTERCEPTION      "IndicatorInterception"
      35             : 
      36             : #define FRAME_PROPNAME_DISPATCHRECORDERSUPPLIER         DECLARE_ASCII(FRAME_PROPNAME_ASCII_DISPATCHRECORDERSUPPLIER)
      37             : #define FRAME_PROPNAME_ISHIDDEN                         DECLARE_ASCII(FRAME_PROPNAME_ASCII_ISHIDDEN                )
      38             : #define FRAME_PROPNAME_LAYOUTMANAGER                    DECLARE_ASCII(FRAME_PROPNAME_ASCII_LAYOUTMANAGER           )
      39             : #define FRAME_PROPNAME_TITLE                            DECLARE_ASCII(FRAME_PROPNAME_ASCII_TITLE                   )
      40             : #define FRAME_PROPNAME_INDICATORINTERCEPTION            DECLARE_ASCII(FRAME_PROPNAME_ASCII_INDICATORINTERCEPTION   )
      41             : 
      42             : // Please add new entries alphabetical sorted and correct all other handles!
      43             : // Start counting with 0, so it can be used as direct index into an array too.
      44             : // Don't forget updating of define FRAME_PROPCOUNT below!!!
      45             : #define FRAME_PROPHANDLE_DISPATCHRECORDERSUPPLIER       0
      46             : #define FRAME_PROPHANDLE_ISHIDDEN                       1
      47             : #define FRAME_PROPHANDLE_LAYOUTMANAGER                  2
      48             : #define FRAME_PROPHANDLE_TITLE                          3
      49             : #define FRAME_PROPHANDLE_INDICATORINTERCEPTION          4
      50             : 
      51             : #define FRAME_PROPCOUNT                                 5
      52             : 
      53             : /** properties for "Desktop" class */
      54             : 
      55             : #define DESKTOP_PROPNAME_ASCII_ACTIVEFRAME              "ActiveFrame"
      56             : #define DESKTOP_PROPNAME_ASCII_DISPATCHRECORDERSUPPLIER "DispatchRecorderSupplier"
      57             : #define DESKTOP_PROPNAME_ASCII_ISPLUGGED                "IsPlugged"
      58             : #define DESKTOP_PROPNAME_ASCII_SUSPENDQUICKSTARTVETO    "SuspendQuickstartVeto"
      59             : #define DESKTOP_PROPNAME_ASCII_TITLE                    "Title"
      60             : 
      61             : #define DESKTOP_PROPNAME_ACTIVEFRAME                    DECLARE_ASCII(DESKTOP_PROPNAME_ASCII_ACTIVEFRAME             )
      62             : #define DESKTOP_PROPNAME_DISPATCHRECORDERSUPPLIER       DECLARE_ASCII(DESKTOP_PROPNAME_ASCII_DISPATCHRECORDERSUPPLIER)
      63             : #define DESKTOP_PROPNAME_ISPLUGGED                      DECLARE_ASCII(DESKTOP_PROPNAME_ASCII_ISPLUGGED               )
      64             : #define DESKTOP_PROPNAME_SUSPENDQUICKSTARTVETO          DECLARE_ASCII(DESKTOP_PROPNAME_ASCII_SUSPENDQUICKSTARTVETO   )
      65             : #define DESKTOP_PROPNAME_TITLE                          DECLARE_ASCII(DESKTOP_PROPNAME_ASCII_TITLE                   )
      66             : 
      67             : // Please add new entries alphabetical sorted and correct all other handles!
      68             : // Start counting with 0, so it can be used as direct index into an array too.
      69             : // Don't forget updating of define DESKTOP_PROPCOUNT below!!!
      70             : #define DESKTOP_PROPHANDLE_ACTIVEFRAME                  0
      71             : #define DESKTOP_PROPHANDLE_DISPATCHRECORDERSUPPLIER     1
      72             : #define DESKTOP_PROPHANDLE_ISPLUGGED                    2
      73             : #define DESKTOP_PROPHANDLE_SUSPENDQUICKSTARTVETO        3
      74             : #define DESKTOP_PROPHANDLE_TITLE                        4
      75             : 
      76             : #define DESKTOP_PROPCOUNT                               5
      77             : 
      78             : /** properties for "PathSettings" class */
      79             : 
      80             : #define PATHSETTINGS_PROPNAME_ASCII_ADDIN               "Addin"
      81             : #define PATHSETTINGS_PROPNAME_ASCII_AUTOCORRECT         "AutoCorrect"
      82             : #define PATHSETTINGS_PROPNAME_ASCII_AUTOTEXT            "AutoText"
      83             : #define PATHSETTINGS_PROPNAME_ASCII_BACKUP              "Backup"
      84             : #define PATHSETTINGS_PROPNAME_ASCII_BASIC               "Basic"
      85             : #define PATHSETTINGS_PROPNAME_ASCII_BITMAP              "Bitmap"
      86             : #define PATHSETTINGS_PROPNAME_ASCII_CONFIG              "Config"
      87             : #define PATHSETTINGS_PROPNAME_ASCII_DICTIONARY          "Dictionary"
      88             : #define PATHSETTINGS_PROPNAME_ASCII_FAVORITE            "Favorite"
      89             : #define PATHSETTINGS_PROPNAME_ASCII_FILTER              "Filter"
      90             : #define PATHSETTINGS_PROPNAME_ASCII_GALLERY             "Gallery"
      91             : #define PATHSETTINGS_PROPNAME_ASCII_GRAPHIC             "Graphic"
      92             : #define PATHSETTINGS_PROPNAME_ASCII_HELP                "Help"
      93             : #define PATHSETTINGS_PROPNAME_ASCII_LINGUISTIC          "Linguistic"
      94             : #define PATHSETTINGS_PROPNAME_ASCII_MODULE              "Module"
      95             : #define PATHSETTINGS_PROPNAME_ASCII_PALETTE             "Palette"
      96             : #define PATHSETTINGS_PROPNAME_ASCII_PLUGIN              "Plugin"
      97             : #define PATHSETTINGS_PROPNAME_ASCII_STORAGE             "Storage"
      98             : #define PATHSETTINGS_PROPNAME_ASCII_TEMP                "Temp"
      99             : #define PATHSETTINGS_PROPNAME_ASCII_TEMPLATE            "Template"
     100             : #define PATHSETTINGS_PROPNAME_ASCII_UICONFIG            "UIConfig"
     101             : #define PATHSETTINGS_PROPNAME_ASCII_USERCONFIG          "UserConfig"
     102             : #define PATHSETTINGS_PROPNAME_ASCII_USERDICTIONARY      "UserDictionary"
     103             : #define PATHSETTINGS_PROPNAME_ASCII_WORK                "Work"
     104             : 
     105             : #define PATHSETTINGS_PROPNAME_ADDIN                     OUString(PATHSETTINGS_PROPNAME_ASCII_ADDIN)
     106             : #define PATHSETTINGS_PROPNAME_AUTOCORRECT               OUString(PATHSETTINGS_PROPNAME_ASCII_AUTOCORRECT)
     107             : #define PATHSETTINGS_PROPNAME_AUTOTEXT                  OUString(PATHSETTINGS_PROPNAME_ASCII_AUTOTEXT)
     108             : #define PATHSETTINGS_PROPNAME_BACKUP                    OUString(PATHSETTINGS_PROPNAME_ASCII_BACKUP)
     109             : #define PATHSETTINGS_PROPNAME_BASIC                     OUString(PATHSETTINGS_PROPNAME_ASCII_BASIC)
     110             : #define PATHSETTINGS_PROPNAME_BITMAP                    OUString(PATHSETTINGS_PROPNAME_ASCII_BITMAP)
     111             : #define PATHSETTINGS_PROPNAME_CONFIG                    OUString(PATHSETTINGS_PROPNAME_ASCII_CONFIG)
     112             : #define PATHSETTINGS_PROPNAME_DICTIONARY                OUString(PATHSETTINGS_PROPNAME_ASCII_DICTIONARY)
     113             : #define PATHSETTINGS_PROPNAME_FAVORITE                  OUString(PATHSETTINGS_PROPNAME_ASCII_FAVORITE)
     114             : #define PATHSETTINGS_PROPNAME_FILTER                    OUString(PATHSETTINGS_PROPNAME_ASCII_FILTER)
     115             : #define PATHSETTINGS_PROPNAME_GALLERY                   OUString(PATHSETTINGS_PROPNAME_ASCII_GALLERY)
     116             : #define PATHSETTINGS_PROPNAME_GRAPHIC                   OUString(PATHSETTINGS_PROPNAME_ASCII_GRAPHIC)
     117             : #define PATHSETTINGS_PROPNAME_HELP                      OUString(PATHSETTINGS_PROPNAME_ASCII_HELP)
     118             : #define PATHSETTINGS_PROPNAME_LINGUISTIC                OUString(PATHSETTINGS_PROPNAME_ASCII_LINGUISTIC)
     119             : #define PATHSETTINGS_PROPNAME_MODULE                    OUString(PATHSETTINGS_PROPNAME_ASCII_MODULE)
     120             : #define PATHSETTINGS_PROPNAME_PALETTE                   OUString(PATHSETTINGS_PROPNAME_ASCII_PALETTE)
     121             : #define PATHSETTINGS_PROPNAME_PLUGIN                    OUString(PATHSETTINGS_PROPNAME_ASCII_PLUGIN)
     122             : #define PATHSETTINGS_PROPNAME_STORAGE                   OUString(PATHSETTINGS_PROPNAME_ASCII_STORAGE)
     123             : #define PATHSETTINGS_PROPNAME_TEMP                      OUString(PATHSETTINGS_PROPNAME_ASCII_TEMP)
     124             : #define PATHSETTINGS_PROPNAME_TEMPLATE                  OUString(PATHSETTINGS_PROPNAME_ASCII_TEMPLATE)
     125             : #define PATHSETTINGS_PROPNAME_UICONFIG                  OUString(PATHSETTINGS_PROPNAME_ASCII_UICONFIG)
     126             : #define PATHSETTINGS_PROPNAME_USERCONFIG                OUString(PATHSETTINGS_PROPNAME_ASCII_USERCONFIG)
     127             : #define PATHSETTINGS_PROPNAME_USERDICTIONARY            OUString(PATHSETTINGS_PROPNAME_ASCII_USERDICTIONARY)
     128             : #define PATHSETTINGS_PROPNAME_WORK                      OUString(PATHSETTINGS_PROPNAME_ASCII_WORK)
     129             : 
     130             : // Please add new entries alphabetical sorted and correct all other handles!
     131             : // Start counting with 0, so it can be used as direct index into an array too.
     132             : // Don't forget updating of define PATHSETTINGS_PROPCOUNT below!!!
     133             : #define PATHSETTINGS_PROPHANDLE_ADDIN                    0
     134             : #define PATHSETTINGS_PROPHANDLE_AUTOCORRECT              1
     135             : #define PATHSETTINGS_PROPHANDLE_AUTOTEXT                 2
     136             : #define PATHSETTINGS_PROPHANDLE_BACKUP                   3
     137             : #define PATHSETTINGS_PROPHANDLE_BASIC                    4
     138             : #define PATHSETTINGS_PROPHANDLE_BITMAP                   5
     139             : #define PATHSETTINGS_PROPHANDLE_CONFIG                   6
     140             : #define PATHSETTINGS_PROPHANDLE_DICTIONARY               7
     141             : #define PATHSETTINGS_PROPHANDLE_FAVORITE                 8
     142             : #define PATHSETTINGS_PROPHANDLE_FILTER                   9
     143             : #define PATHSETTINGS_PROPHANDLE_GALLERY                 10
     144             : #define PATHSETTINGS_PROPHANDLE_GRAPHIC                 11
     145             : #define PATHSETTINGS_PROPHANDLE_HELP                    12
     146             : #define PATHSETTINGS_PROPHANDLE_LINGUISTIC              13
     147             : #define PATHSETTINGS_PROPHANDLE_MODULE                  14
     148             : #define PATHSETTINGS_PROPHANDLE_PALETTE                 15
     149             : #define PATHSETTINGS_PROPHANDLE_PLUGIN                  16
     150             : #define PATHSETTINGS_PROPHANDLE_STORAGE                 17
     151             : #define PATHSETTINGS_PROPHANDLE_TEMP                    18
     152             : #define PATHSETTINGS_PROPHANDLE_TEMPLATE                19
     153             : #define PATHSETTINGS_PROPHANDLE_UICONFIG                20
     154             : #define PATHSETTINGS_PROPHANDLE_USERCONFIG              21
     155             : #define PATHSETTINGS_PROPHANDLE_USERDICTIONARY          22
     156             : #define PATHSETTINGS_PROPHANDLE_WORK                    23
     157             : 
     158             : #define PATHSETTINGS_PROPCOUNT                          24
     159             : 
     160             : /** properties for "LayoutManager" class */
     161             : 
     162             : #define LAYOUTMANAGER_PROPNAME_ASCII_MENUBARCLOSER          "MenuBarCloser"
     163             : #define LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS      "AutomaticToolbars"
     164             : #define LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY      "RefreshContextToolbarVisibility"
     165             : #define LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI          "HideCurrentUI"
     166             : #define LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT              "LockCount"
     167             : #define LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE  "PreserveContentSize"
     168             : 
     169             : #define LAYOUTMANAGER_PROPNAME_MENUBARCLOSER            OUString( LAYOUTMANAGER_PROPNAME_ASCII_MENUBARCLOSER )
     170             : #define LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS        OUString( LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS )
     171             : #define LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY        OUString( LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY )
     172             : #define LAYOUTMANAGER_PROPNAME_HIDECURRENTUI            OUString( LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI )
     173             : #define LAYOUTMANAGER_PROPNAME_LOCKCOUNT                OUString( LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT )
     174             : #define LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE    OUString( LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE )
     175             : 
     176             : #define LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER          0
     177             : #define LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS      1
     178             : #define LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY      2
     179             : #define LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI          3
     180             : #define LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT              4
     181             : #define LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE  5
     182             : 
     183             : /** properties for "UICommandDescription" class */
     184             : #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDIMAGELIST        "private:resource/image/commandimagelist"
     185             : #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDROTATEIMAGELIST  "private:resource/image/commandrotateimagelist"
     186             : #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDMIRRORIMAGELIST  "private:resource/image/commandmirrorimagelist"
     187             : 
     188             : #define UICOMMANDDESCRIPTION_PROPNAME_PROPERTIES                "Properties"
     189             : #define UICOMMANDDESCRIPTION_PROPNAME_POPUP                     "Popup"
     190             : 
     191             : #define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE                   1
     192             : #define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE_MIRRORED          2
     193             : #define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE_ROTATED           4
     194             : #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON            8
     195             : 
     196             : /** properties for "AutoRecovery" class */
     197             : 
     198             : #define AUTORECOVERY_PROPNAME_ASCII_EXISTS_RECOVERYDATA "ExistsRecoveryData"
     199             : #define AUTORECOVERY_PROPNAME_ASCII_EXISTS_SESSIONDATA  "ExistsSessionData"
     200             : #define AUTORECOVERY_PROPNAME_ASCII_CRASHED             "Crashed"
     201             : 
     202             : #define AUTORECOVERY_PROPNAME_EXISTS_RECOVERYDATA       OUString( AUTORECOVERY_PROPNAME_ASCII_EXISTS_RECOVERYDATA )
     203             : #define AUTORECOVERY_PROPNAME_EXISTS_SESSIONDATA        OUString( AUTORECOVERY_PROPNAME_ASCII_EXISTS_SESSIONDATA )
     204             : #define AUTORECOVERY_PROPNAME_CRASHED                   OUString( AUTORECOVERY_PROPNAME_ASCII_CRASHED )
     205             : 
     206             : #define AUTORECOVERY_PROPHANDLE_EXISTS_RECOVERYDATA     0
     207             : #define AUTORECOVERY_PROPHANDLE_EXISTS_SESSIONDATA      1
     208             : #define AUTORECOVERY_PROPHANDLE_CRASHED                 2
     209             : 
     210             : #define AUTORECOVERY_PROPCOUNT                          3
     211             : 
     212             : /** properties for Filter config */
     213             : 
     214             : #define FILTER_PROPNAME_ASCII_DOCUMENTSERVICE           "DocumentService"
     215             : 
     216             : #define FILTER_PROPNAME_DOCUMENTSERVICE                 OUString( FILTER_PROPNAME_ASCII_DOCUMENTSERVICE )
     217             : 
     218             : /** properties for office module config (Setup.xcu) */
     219             : 
     220             : #define OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES   "ooSetupFactoryWindowAttributes"
     221             : #define OFFICEFACTORY_PROPNAME_ASCII_UINAME             "ooSetupFactoryUIName"
     222             : #define OFFICEFACTORY_PROPNAME_ASCII_ICON               "ooSetupFactoryIcon"
     223             : 
     224             : #define OFFICEFACTORY_PROPNAME_WINDOWATTRIBUTES         OUString( OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES )
     225             : #define OFFICEFACTORY_PROPNAME_UINAME                   OUString( OFFICEFACTORY_PROPNAME_ASCII_UINAME )
     226             : #define OFFICEFACTORY_PROPNAME_ICON                     OUString( OFFICEFACTORY_PROPNAME_ASCII_ICON )
     227             : 
     228             : /** properties for tab window (old) */
     229             : #define TABWINDOW_PROPNAME_ASCII_PARENTWINDOW           "ParentWindow"
     230             : #define TABWINDOW_PROPNAME_ASCII_TOPWINDOW              "TopWindow"
     231             : #define TABWINDOW_PROPNAME_PARENTWINDOW                 OUString( TABWINDOW_PROPNAME_ASCII_PARENTWINDOW )
     232             : #define TABWINDOW_PROPNAME_TOPWINDOW                    OUString( TABWINDOW_PROPNAME_ASCII_TOPWINDOW )
     233             : 
     234             : #define TABWINDOW_PROPHANDLE_PARENTWINDOW               0
     235             : #define TABWINDOW_PROPHANDLE_TOPWINDOW                  1
     236             : #define TABWINDOW_PROPCOUNT                             2
     237             : 
     238             : #define TABWINDOWSERVICE_PROPHANDLE_WINDOW              0
     239             : #define TABWINDOWSERVICE_PROPCOUNT                      1
     240             : 
     241             : /** provides some helper methods to implement property sets. */
     242             : 
     243             : class PropHelper
     244             : {
     245             :     public:
     246             : 
     247             :     /** checks if given property will be changed by this settings.
     248             :      *  We compare the content of the given any values. If they are different we return sal_True - sal_False otherwise.
     249             :      *
     250             :      *  @param  aCurrentValue   contains the current value for this property
     251             :      *  @param  aNewValue       contains the new value for this property
     252             :      *  @param  aOldValue       returns the current value, in case something will be changed
     253             :      *  @param  aChangedValue   returns the new value, in case something will be changed
     254             :      *
     255             :      *  @return <True/> if value of this property will be changed; <False/> otherwise.
     256             :      */
     257             : 
     258           0 :     static bool willPropertyBeChanged( const css::uno::Any& aCurrentValue ,
     259             :                                            const css::uno::Any& aNewValue     ,
     260             :                                                  css::uno::Any& aOldValue     ,
     261             :                                                  css::uno::Any& aChangedValue )
     262             :     {
     263           0 :         bool bChanged = sal_False;
     264             : 
     265             :         // clear return parameter to be shure, to put out only valid values ...
     266           0 :         aOldValue.clear();
     267           0 :         aChangedValue.clear();
     268             : 
     269             :         // if value change ...
     270           0 :         bChanged = !(aCurrentValue==aNewValue);
     271           0 :         if (bChanged)
     272             :         {
     273             :             // ... set information of change.
     274           0 :             aOldValue     = aCurrentValue;
     275           0 :             aChangedValue = aNewValue;
     276             :         }
     277             : 
     278           0 :         return bChanged;
     279             :     }
     280             : };
     281             : 
     282             : } // namespace framework
     283             : 
     284             : #endif // INCLUDED_FRAMEWORK_INC_PROPERTIES_H
     285             : 
     286             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10