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