Update ooo320-m1
[ooovba.git] / xmloff / source / forms / strings.hxx
blob8c78b45e22e5815dad43be78f4d788982ac75ac3
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: strings.hxx,v $
10 * $Revision: 1.18 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _XMLOFF_FORMS_STRINGS_HXX_
32 #define _XMLOFF_FORMS_STRINGS_HXX_
34 #include <sal/types.h>
35 #include <rtl/ustring.hxx>
37 //.........................................................................
38 namespace xmloff
40 //.........................................................................
42 //============================================================
43 //= a helper for static ascii pseudo-unicode strings
44 //============================================================
45 struct ConstAsciiString
47 const sal_Char* ascii;
48 sal_Int32 length;
50 inline operator const ConstAsciiString* () const { return this; }
51 inline const ::rtl::OUString* operator& () const;
52 inline operator const ::rtl::OUString& () const { return *(&(*this)); }
53 inline operator const sal_Char* () const { return ascii; }
55 inline ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength);
56 inline ~ConstAsciiString();
58 private:
59 mutable ::rtl::OUString* m_pString;
61 private:
62 ConstAsciiString(); // never implemented
65 //------------------------------------------------------------
66 inline ConstAsciiString::ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength)
67 :ascii( _pAsciiZeroTerminated )
68 ,length( _nLength )
69 ,m_pString( NULL )
73 //------------------------------------------------------------
74 inline ConstAsciiString::~ConstAsciiString()
76 if ( m_pString )
78 delete m_pString;
79 m_pString = NULL;
83 //------------------------------------------------------------
84 inline const ::rtl::OUString* ConstAsciiString::operator& () const
86 if ( !m_pString )
87 m_pString = new ::rtl::OUString( ascii, length, RTL_TEXTENCODING_ASCII_US );
88 return m_pString;
91 #ifndef XMLFORM_IMPLEMENT_STRINGS
92 #define XMLFORM_CONSTASCII_STRING(ident, string) extern const ConstAsciiString ident
93 #else
94 #define XMLFORM_CONSTASCII_STRING(ident, string) extern const ConstAsciiString ident(string, sizeof(string)-1)
95 #endif
97 //============================================================
98 //= string constants
99 //============================================================
101 // properties
102 XMLFORM_CONSTASCII_STRING( PROPERTY_CLASSID, "ClassId" );
103 XMLFORM_CONSTASCII_STRING( PROPERTY_ECHOCHAR, "EchoChar" );
104 XMLFORM_CONSTASCII_STRING( PROPERTY_MULTILINE, "MultiLine" );
105 XMLFORM_CONSTASCII_STRING( PROPERTY_NAME, "Name" );
106 XMLFORM_CONSTASCII_STRING( PROPERTY_IMAGEURL, "ImageURL" );
107 XMLFORM_CONSTASCII_STRING( PROPERTY_LABEL, "Label" );
108 XMLFORM_CONSTASCII_STRING( PROPERTY_TARGETFRAME, "TargetFrame" );
109 XMLFORM_CONSTASCII_STRING( PROPERTY_TARGETURL, "TargetURL" );
110 XMLFORM_CONSTASCII_STRING( PROPERTY_TITLE, "Tag" );
111 XMLFORM_CONSTASCII_STRING( PROPERTY_DROPDOWN, "Dropdown" );
112 XMLFORM_CONSTASCII_STRING( PROPERTY_PRINTABLE, "Printable" );
113 XMLFORM_CONSTASCII_STRING( PROPERTY_READONLY, "ReadOnly" );
114 XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_STATE, "DefaultState" );
115 XMLFORM_CONSTASCII_STRING( PROPERTY_TABSTOP, "Tabstop" );
116 XMLFORM_CONSTASCII_STRING( PROPERTY_STATE, "State" );
117 XMLFORM_CONSTASCII_STRING( PROPERTY_ENABLED, "Enabled" );
118 XMLFORM_CONSTASCII_STRING( PROPERTY_ENABLEVISIBLE, "EnableVisible" );
119 XMLFORM_CONSTASCII_STRING( PROPERTY_MAXTEXTLENGTH, "MaxTextLen" );
120 XMLFORM_CONSTASCII_STRING( PROPERTY_LINECOUNT, "LineCount" );
121 XMLFORM_CONSTASCII_STRING( PROPERTY_TABINDEX, "TabIndex" );
122 XMLFORM_CONSTASCII_STRING( PROPERTY_COMMAND, "Command" );
123 XMLFORM_CONSTASCII_STRING( PROPERTY_DATASOURCENAME, "DataSourceName" );
124 XMLFORM_CONSTASCII_STRING( PROPERTY_FILTER, "Filter" );
125 XMLFORM_CONSTASCII_STRING( PROPERTY_ORDER, "Order" );
126 XMLFORM_CONSTASCII_STRING( PROPERTY_ALLOWDELETES, "AllowDeletes" );
127 XMLFORM_CONSTASCII_STRING( PROPERTY_ALLOWINSERTS, "AllowInserts" );
128 XMLFORM_CONSTASCII_STRING( PROPERTY_ALLOWUPDATES, "AllowUpdates" );
129 XMLFORM_CONSTASCII_STRING( PROPERTY_APPLYFILTER, "ApplyFilter" );
130 XMLFORM_CONSTASCII_STRING( PROPERTY_ESCAPEPROCESSING, "EscapeProcessing" );
131 XMLFORM_CONSTASCII_STRING( PROPERTY_IGNORERESULT, "IgnoreResult" );
132 XMLFORM_CONSTASCII_STRING( PROPERTY_SUBMIT_ENCODING, "SubmitEncoding" );
133 XMLFORM_CONSTASCII_STRING( PROPERTY_SUBMIT_METHOD, "SubmitMethod" );
134 XMLFORM_CONSTASCII_STRING( PROPERTY_COMMAND_TYPE, "CommandType" );
135 XMLFORM_CONSTASCII_STRING( PROPERTY_NAVIGATION, "NavigationBarMode" );
136 XMLFORM_CONSTASCII_STRING( PROPERTY_CYCLE, "Cycle" );
137 XMLFORM_CONSTASCII_STRING( PROPERTY_BUTTONTYPE, "ButtonType" );
138 XMLFORM_CONSTASCII_STRING( PROPERTY_DATAFIELD, "DataField" );
139 XMLFORM_CONSTASCII_STRING( PROPERTY_BOUNDCOLUMN, "BoundColumn");
140 XMLFORM_CONSTASCII_STRING( PROPERTY_EMPTY_IS_NULL, "ConvertEmptyToNull");
141 XMLFORM_CONSTASCII_STRING( PROPERTY_INPUT_REQUIRED, "InputRequired");
142 XMLFORM_CONSTASCII_STRING( PROPERTY_LISTSOURCE, "ListSource");
143 XMLFORM_CONSTASCII_STRING( PROPERTY_LISTSOURCETYPE, "ListSourceType");
144 XMLFORM_CONSTASCII_STRING( PROPERTY_ECHO_CHAR, "EchoChar");
145 XMLFORM_CONSTASCII_STRING( PROPERTY_STRICTFORMAT, "StrictFormat");
146 XMLFORM_CONSTASCII_STRING( PROPERTY_AUTOCOMPLETE, "Autocomplete");
147 XMLFORM_CONSTASCII_STRING( PROPERTY_MULTISELECTION, "MultiSelection");
148 XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULTBUTTON, "DefaultButton");
149 XMLFORM_CONSTASCII_STRING( PROPERTY_TRISTATE, "TriState");
150 XMLFORM_CONSTASCII_STRING( PROPERTY_CONTROLLABEL, "LabelControl");
151 XMLFORM_CONSTASCII_STRING( PROPERTY_STRING_ITEM_LIST, "StringItemList");
152 XMLFORM_CONSTASCII_STRING( PROPERTY_VALUE_SEQ, "ValueItemList");
153 XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_SELECT_SEQ, "DefaultSelection");
154 XMLFORM_CONSTASCII_STRING( PROPERTY_SELECT_SEQ, "SelectedItems");
155 XMLFORM_CONSTASCII_STRING( PROPERTY_DATE_MIN, "DateMin");
156 XMLFORM_CONSTASCII_STRING( PROPERTY_DATE_MAX, "DateMax");
157 XMLFORM_CONSTASCII_STRING( PROPERTY_TIME_MIN, "TimeMin");
158 XMLFORM_CONSTASCII_STRING( PROPERTY_TIME_MAX, "TimeMax");
159 XMLFORM_CONSTASCII_STRING( PROPERTY_VALUE_MIN, "ValueMin");
160 XMLFORM_CONSTASCII_STRING( PROPERTY_VALUE_MAX, "ValueMax");
161 XMLFORM_CONSTASCII_STRING( PROPERTY_EFFECTIVE_MIN, "EffectiveMin");
162 XMLFORM_CONSTASCII_STRING( PROPERTY_EFFECTIVE_MAX, "EffectiveMax");
163 XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_DATE, "DefaultDate");
164 XMLFORM_CONSTASCII_STRING( PROPERTY_DATE, "Date");
165 XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_TIME, "DefaultTime");
166 XMLFORM_CONSTASCII_STRING( PROPERTY_TIME, "Time");
167 XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_VALUE, "DefaultValue");
168 XMLFORM_CONSTASCII_STRING( PROPERTY_VALUE, "Value");
169 XMLFORM_CONSTASCII_STRING( PROPERTY_HIDDEN_VALUE, "HiddenValue");
170 XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_TEXT, "DefaultText");
171 XMLFORM_CONSTASCII_STRING( PROPERTY_TEXT, "Text");
172 XMLFORM_CONSTASCII_STRING( PROPERTY_EFFECTIVE_VALUE, "EffectiveValue");
173 XMLFORM_CONSTASCII_STRING( PROPERTY_EFFECTIVE_DEFAULT, "EffectiveDefault");
174 XMLFORM_CONSTASCII_STRING( PROPERTY_REFVALUE, "RefValue");
175 XMLFORM_CONSTASCII_STRING( PROPERTY_URL, "URL");
176 XMLFORM_CONSTASCII_STRING( PROPERTY_FONT, "FontDescriptor");
177 XMLFORM_CONSTASCII_STRING( PROPERTY_BACKGROUNDCOLOR, "BackgroundColor");
178 XMLFORM_CONSTASCII_STRING( PROPERTY_MASTERFIELDS, "MasterFields");
179 XMLFORM_CONSTASCII_STRING( PROPERTY_DETAILFIELDS, "DetailFields");
180 XMLFORM_CONSTASCII_STRING( PROPERTY_COLUMNSERVICENAME, "ColumnServiceName");
181 XMLFORM_CONSTASCII_STRING( PROPERTY_FORMATKEY, "FormatKey");
182 XMLFORM_CONSTASCII_STRING( PROPERTY_ALIGN, "Align");
183 XMLFORM_CONSTASCII_STRING( PROPERTY_BORDER, "Border");
184 XMLFORM_CONSTASCII_STRING( PROPERTY_AUTOCONTROLFOCUS, "AutomaticControlFocus");
185 XMLFORM_CONSTASCII_STRING( PROPERTY_APPLYDESIGNMODE, "ApplyFormDesignMode");
186 XMLFORM_CONSTASCII_STRING( PROPERTY_FORMATSSUPPLIER, "FormatsSupplier");
187 XMLFORM_CONSTASCII_STRING( PROPERTY_LOCALE, "Locale");
188 XMLFORM_CONSTASCII_STRING( PROPERTY_FORMATSTRING, "FormatString");
189 XMLFORM_CONSTASCII_STRING( PROPERTY_DATEFORMAT, "DateFormat");
190 XMLFORM_CONSTASCII_STRING( PROPERTY_TIMEFORMAT, "TimeFormat");
191 XMLFORM_CONSTASCII_STRING( PROPERTY_PERSISTENCE_MAXTEXTLENGTH, "PersistenceMaxTextLength");
192 XMLFORM_CONSTASCII_STRING( PROPERTY_SCROLLVALUE_MIN, "ScrollValueMin");
193 XMLFORM_CONSTASCII_STRING( PROPERTY_SCROLLVALUE_MAX, "ScrollValueMax");
194 XMLFORM_CONSTASCII_STRING( PROPERTY_SCROLLVALUE, "ScrollValue");
195 XMLFORM_CONSTASCII_STRING( PROPERTY_SCROLLVALUE_DEFAULT,"DefaultScrollValue");
196 XMLFORM_CONSTASCII_STRING( PROPERTY_LINE_INCREMENT, "LineIncrement");
197 XMLFORM_CONSTASCII_STRING( PROPERTY_BLOCK_INCREMENT, "BlockIncrement");
198 XMLFORM_CONSTASCII_STRING( PROPERTY_REPEAT_DELAY, "RepeatDelay");
199 XMLFORM_CONSTASCII_STRING( PROPERTY_SPINVALUE, "SpinValue");
200 XMLFORM_CONSTASCII_STRING( PROPERTY_SPINVALUE_MIN, "SpinValueMin");
201 XMLFORM_CONSTASCII_STRING( PROPERTY_SPINVALUE_MAX, "SpinValueMax");
202 XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_SPINVALUE, "DefaultSpinValue");
203 XMLFORM_CONSTASCII_STRING( PROPERTY_SPIN_INCREMENT, "SpinIncrement");
204 XMLFORM_CONSTASCII_STRING( PROPERTY_ORIENTATION, "Orientation");
205 XMLFORM_CONSTASCII_STRING( PROPERTY_TOGGLE, "Toggle");
206 XMLFORM_CONSTASCII_STRING( PROPERTY_FOCUS_ON_CLICK, "FocusOnClick");
207 XMLFORM_CONSTASCII_STRING( PROPERTY_VISUAL_EFFECT, "VisualEffect");
208 XMLFORM_CONSTASCII_STRING( PROPERTY_IMAGE_POSITION, "ImagePosition");
209 XMLFORM_CONSTASCII_STRING( PROPERTY_IMAGE_ALIGN, "ImageAlign");
210 XMLFORM_CONSTASCII_STRING( PROPERTY_SCALE_IMAGE, "ScaleImage");
211 XMLFORM_CONSTASCII_STRING( PROPERTY_GROUP_NAME, "GroupName");
213 XMLFORM_CONSTASCII_STRING( PROPERTY_BOUND_CELL, "BoundCell");
214 XMLFORM_CONSTASCII_STRING( PROPERTY_LIST_CELL_RANGE, "CellRange");
215 XMLFORM_CONSTASCII_STRING( PROPERTY_ADDRESS, "Address");
216 XMLFORM_CONSTASCII_STRING( PROPERTY_FILE_REPRESENTATION,"PersistentRepresentation");
217 XMLFORM_CONSTASCII_STRING( PROPERTY_RICH_TEXT, "RichText");
219 // services
220 XMLFORM_CONSTASCII_STRING( SERVICE_FORMSCOLLECTION, "com.sun.star.form.Forms" );
221 XMLFORM_CONSTASCII_STRING( SERVICE_NUMBERFORMATSSUPPLIER, "com.sun.star.util.NumberFormatsSupplier" );
222 XMLFORM_CONSTASCII_STRING( SERVICE_SPREADSHEET_DOCUMENT, "com.sun.star.sheet.SpreadsheetDocument");
223 XMLFORM_CONSTASCII_STRING( SERVICE_CELLVALUEBINDING, "com.sun.star.table.CellValueBinding" );
224 XMLFORM_CONSTASCII_STRING( SERVICE_LISTINDEXCELLBINDING, "com.sun.star.table.ListPositionCellBinding" );
225 XMLFORM_CONSTASCII_STRING( SERVICE_CELLRANGELISTSOURCE, "com.sun.star.table.CellRangeListSource" );
226 XMLFORM_CONSTASCII_STRING( SERVICE_ADDRESS_CONVERSION, "com.sun.star.table.CellAddressConversion");
227 XMLFORM_CONSTASCII_STRING( SERVICE_RANGEADDRESS_CONVERSION, "com.sun.star.table.CellRangeAddressConversion");
229 // old service names (compatibility)
230 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_FORM, "stardiv.one.form.component.Form");
231 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_EDIT, "stardiv.one.form.component.Edit");
232 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_LISTBOX, "stardiv.one.form.component.ListBox");
233 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_COMBOBOX, "stardiv.one.form.component.ComboBox");
234 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_RADIOBUTTON, "stardiv.one.form.component.RadioButton");
235 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_GROUPBOX, "stardiv.one.form.component.GroupBox");
236 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_FIXEDTEXT, "stardiv.one.form.component.FixedText");
237 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_COMMANDBUTTON, "stardiv.one.form.component.CommandButton");
238 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_CHECKBOX, "stardiv.one.form.component.CheckBox");
239 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_GRID, "stardiv.one.form.component.Grid");
240 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_IMAGEBUTTON, "stardiv.one.form.component.ImageButton");
241 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_FILECONTROL, "stardiv.one.form.component.FileControl");
242 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_TIMEFIELD, "stardiv.one.form.component.TimeField");
243 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_DATEFIELD, "stardiv.one.form.component.DateField");
244 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_NUMERICFIELD, "stardiv.one.form.component.NumericField");
245 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_CURRENCYFIELD, "stardiv.one.form.component.CurrencyField");
246 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_PATTERNFIELD, "stardiv.one.form.component.PatternField");
247 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_HIDDENCONTROL, "stardiv.one.form.component.Hidden");
248 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_IMAGECONTROL, "stardiv.one.form.component.ImageControl");
249 XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_FORMATTEDFIELD, "stardiv.one.form.component.FormattedField");
251 // new service names, the old ones are translated into this new ones
252 XMLFORM_CONSTASCII_STRING( SERVICE_FORM, "com.sun.star.form.component.Form");
253 XMLFORM_CONSTASCII_STRING( SERVICE_EDIT, "com.sun.star.form.component.TextField");
254 XMLFORM_CONSTASCII_STRING( SERVICE_LISTBOX, "com.sun.star.form.component.ListBox");
255 XMLFORM_CONSTASCII_STRING( SERVICE_COMBOBOX, "com.sun.star.form.component.ComboBox");
256 XMLFORM_CONSTASCII_STRING( SERVICE_RADIOBUTTON, "com.sun.star.form.component.RadioButton");
257 XMLFORM_CONSTASCII_STRING( SERVICE_GROUPBOX, "com.sun.star.form.component.GroupBox");
258 XMLFORM_CONSTASCII_STRING( SERVICE_FIXEDTEXT, "com.sun.star.form.component.FixedText");
259 XMLFORM_CONSTASCII_STRING( SERVICE_COMMANDBUTTON, "com.sun.star.form.component.CommandButton");
260 XMLFORM_CONSTASCII_STRING( SERVICE_CHECKBOX, "com.sun.star.form.component.CheckBox");
261 XMLFORM_CONSTASCII_STRING( SERVICE_GRID, "com.sun.star.form.component.GridControl");
262 XMLFORM_CONSTASCII_STRING( SERVICE_IMAGEBUTTON, "com.sun.star.form.component.ImageButton");
263 XMLFORM_CONSTASCII_STRING( SERVICE_FILECONTROL, "com.sun.star.form.component.FileControl");
264 XMLFORM_CONSTASCII_STRING( SERVICE_TIMEFIELD, "com.sun.star.form.component.TimeField");
265 XMLFORM_CONSTASCII_STRING( SERVICE_DATEFIELD, "com.sun.star.form.component.DateField");
266 XMLFORM_CONSTASCII_STRING( SERVICE_NUMERICFIELD, "com.sun.star.form.component.NumericField");
267 XMLFORM_CONSTASCII_STRING( SERVICE_CURRENCYFIELD, "com.sun.star.form.component.CurrencyField");
268 XMLFORM_CONSTASCII_STRING( SERVICE_PATTERNFIELD, "com.sun.star.form.component.PatternField");
269 XMLFORM_CONSTASCII_STRING( SERVICE_HIDDENCONTROL, "com.sun.star.form.component.HiddenControl");
270 XMLFORM_CONSTASCII_STRING( SERVICE_IMAGECONTROL, "com.sun.star.form.component.DatabaseImageControl");
271 XMLFORM_CONSTASCII_STRING( SERVICE_FORMATTEDFIELD, "com.sun.star.form.component.FormattedField" );
273 // various strings
274 XMLFORM_CONSTASCII_STRING( EVENT_NAME_SEPARATOR, "::" );
275 XMLFORM_CONSTASCII_STRING( EVENT_TYPE, "EventType" );
276 XMLFORM_CONSTASCII_STRING( EVENT_LIBRARY, "Library" );
277 XMLFORM_CONSTASCII_STRING( EVENT_LOCALMACRONAME, "MacroName" );
278 XMLFORM_CONSTASCII_STRING( EVENT_SCRIPTURL, "Script" );
279 XMLFORM_CONSTASCII_STRING( EVENT_STAROFFICE, "StarOffice" );
280 XMLFORM_CONSTASCII_STRING( EVENT_STARBASIC, "StarBasic" );
281 XMLFORM_CONSTASCII_STRING( EVENT_APPLICATION, "application" );
283 //.........................................................................
284 } // namespace xmloff
285 //.........................................................................
287 #endif // _XMLOFF_FORMS_STRINGS_HXX_