fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / framework / inc / properties.h
blob15a162de61fb18deee0c8d206088684dd3fdbc5c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_FRAMEWORK_INC_PROPERTIES_H
21 #define INCLUDED_FRAMEWORK_INC_PROPERTIES_H
23 #include <macros/generic.hxx>
24 #include "general.h"
26 namespace framework{
28 /** properties for "Frame" class */
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"
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 )
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
51 #define FRAME_PROPCOUNT 5
53 /** properties for "Desktop" class */
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"
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 )
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
76 #define DESKTOP_PROPCOUNT 5
78 /** properties for "PathSettings" class */
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"
105 #define PATHSETTINGS_PROPCOUNT 24
107 /** properties for "LayoutManager" class */
109 #define LAYOUTMANAGER_PROPNAME_ASCII_MENUBARCLOSER "MenuBarCloser"
110 #define LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS "AutomaticToolbars"
111 #define LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY "RefreshContextToolbarVisibility"
112 #define LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI "HideCurrentUI"
113 #define LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT "LockCount"
114 #define LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE "PreserveContentSize"
116 #define LAYOUTMANAGER_PROPNAME_MENUBARCLOSER OUString( LAYOUTMANAGER_PROPNAME_ASCII_MENUBARCLOSER )
117 #define LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS OUString( LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS )
118 #define LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY OUString( LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY )
119 #define LAYOUTMANAGER_PROPNAME_HIDECURRENTUI OUString( LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI )
120 #define LAYOUTMANAGER_PROPNAME_LOCKCOUNT OUString( LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT )
121 #define LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE OUString( LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE )
123 #define LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER 0
124 #define LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS 1
125 #define LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY 2
126 #define LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI 3
127 #define LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT 4
128 #define LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE 5
130 /** properties for "UICommandDescription" class */
131 #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDIMAGELIST "private:resource/image/commandimagelist"
132 #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDROTATEIMAGELIST "private:resource/image/commandrotateimagelist"
133 #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDMIRRORIMAGELIST "private:resource/image/commandmirrorimagelist"
136 #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
138 /** properties for "AutoRecovery" class */
140 #define AUTORECOVERY_PROPNAME_ASCII_EXISTS_RECOVERYDATA "ExistsRecoveryData"
141 #define AUTORECOVERY_PROPNAME_ASCII_EXISTS_SESSIONDATA "ExistsSessionData"
142 #define AUTORECOVERY_PROPNAME_ASCII_CRASHED "Crashed"
144 #define AUTORECOVERY_PROPNAME_EXISTS_RECOVERYDATA OUString( AUTORECOVERY_PROPNAME_ASCII_EXISTS_RECOVERYDATA )
145 #define AUTORECOVERY_PROPNAME_EXISTS_SESSIONDATA OUString( AUTORECOVERY_PROPNAME_ASCII_EXISTS_SESSIONDATA )
146 #define AUTORECOVERY_PROPNAME_CRASHED OUString( AUTORECOVERY_PROPNAME_ASCII_CRASHED )
148 #define AUTORECOVERY_PROPHANDLE_EXISTS_RECOVERYDATA 0
149 #define AUTORECOVERY_PROPHANDLE_EXISTS_SESSIONDATA 1
150 #define AUTORECOVERY_PROPHANDLE_CRASHED 2
152 #define AUTORECOVERY_PROPCOUNT 3
154 /** properties for Filter config */
156 #define FILTER_PROPNAME_ASCII_DOCUMENTSERVICE "DocumentService"
158 #define FILTER_PROPNAME_DOCUMENTSERVICE OUString( FILTER_PROPNAME_ASCII_DOCUMENTSERVICE )
160 /** properties for office module config (Setup.xcu) */
162 #define OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES "ooSetupFactoryWindowAttributes"
163 #define OFFICEFACTORY_PROPNAME_ASCII_UINAME "ooSetupFactoryUIName"
164 #define OFFICEFACTORY_PROPNAME_ASCII_ICON "ooSetupFactoryIcon"
166 #define OFFICEFACTORY_PROPNAME_WINDOWATTRIBUTES OUString( OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES )
167 #define OFFICEFACTORY_PROPNAME_UINAME OUString( OFFICEFACTORY_PROPNAME_ASCII_UINAME )
168 #define OFFICEFACTORY_PROPNAME_ICON OUString( OFFICEFACTORY_PROPNAME_ASCII_ICON )
170 /** properties for tab window (old) */
171 #define TABWINDOW_PROPNAME_ASCII_PARENTWINDOW "ParentWindow"
172 #define TABWINDOW_PROPNAME_ASCII_TOPWINDOW "TopWindow"
173 #define TABWINDOW_PROPNAME_PARENTWINDOW OUString( TABWINDOW_PROPNAME_ASCII_PARENTWINDOW )
174 #define TABWINDOW_PROPNAME_TOPWINDOW OUString( TABWINDOW_PROPNAME_ASCII_TOPWINDOW )
176 #define TABWINDOW_PROPHANDLE_PARENTWINDOW 0
177 #define TABWINDOW_PROPHANDLE_TOPWINDOW 1
178 #define TABWINDOW_PROPCOUNT 2
180 #define TABWINDOWSERVICE_PROPHANDLE_WINDOW 0
182 /** provides some helper methods to implement property sets. */
184 class PropHelper
186 public:
188 /** checks if given property will be changed by this settings.
189 * We compare the content of the given any values. If they are different we return sal_True - sal_False otherwise.
191 * @param aCurrentValue contains the current value for this property
192 * @param aNewValue contains the new value for this property
193 * @param aOldValue returns the current value, in case something will be changed
194 * @param aChangedValue returns the new value, in case something will be changed
196 * @return <True/> if value of this property will be changed; <False/> otherwise.
199 static bool willPropertyBeChanged( const css::uno::Any& aCurrentValue ,
200 const css::uno::Any& aNewValue ,
201 css::uno::Any& aOldValue ,
202 css::uno::Any& aChangedValue )
204 bool bChanged = sal_False;
206 // clear return parameter to be sure, to put out only valid values ...
207 aOldValue.clear();
208 aChangedValue.clear();
210 // if value change ...
211 bChanged = !(aCurrentValue==aNewValue);
212 if (bChanged)
214 // ... set information of change.
215 aOldValue = aCurrentValue;
216 aChangedValue = aNewValue;
219 return bChanged;
223 } // namespace framework
225 #endif // INCLUDED_FRAMEWORK_INC_PROPERTIES_H
227 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */