1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Astringconstants.hrc,v $
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 ADABASUI_STRINGCONSTANTS_HRC_
32 #define ADABASUI_STRINGCONSTANTS_HRC_
34 #ifndef STRINGCONSTANTS_INCLUDED_INDIRECT
35 #error "don't include this file directly! use adabasuistrings.hrc instead!"
39 #include <sal/types.h>
41 #ifndef _RTL_USTRING_HXX_
42 #include <rtl/ustring.hxx>
45 //============================================================
46 //= a helper for static ascii pseudo-unicode strings
47 //============================================================
49 struct _ConstAsciiString_
54 operator ::rtl::OUString () const { return ::rtl::OUString(str, length, RTL_TEXTENCODING_ASCII_US); }
55 operator const sal_Char* () const { return str; }
58 #define DECLARE_CONSTASCII_USTRING( name ) \
59 extern _ConstAsciiString_ const name
61 #define IMPLEMENT_CONSTASCII_USTRING( name, string ) \
62 _ConstAsciiString_ const name = { sizeof(string)-1, string }
64 //============================================================
66 //============================================================
68 #define PROPERTY_ID_CREATECATALOG 3
69 #define PROPERTY_ID_DATABASENAME 4
70 #define PROPERTY_ID_CONTROL_USER 5
71 #define PROPERTY_ID_CONTROL_PASSWORD 6
72 #define PROPERTY_ID_USER 7
73 #define PROPERTY_ID_PASSWORD 8
74 #define PROPERTY_ID_CACHESIZE 9
76 //============================================================
78 //============================================================
80 DECLARE_CONSTASCII_USTRING(PROPERTY_CREATECATALOG);
81 DECLARE_CONSTASCII_USTRING(PROPERTY_DATABASENAME);
82 DECLARE_CONSTASCII_USTRING(PROPERTY_USER);
83 DECLARE_CONSTASCII_USTRING(PROPERTY_CONTROL_USER);
84 DECLARE_CONSTASCII_USTRING(PROPERTY_CONTROL_PASSWORD);
85 DECLARE_CONSTASCII_USTRING(PROPERTY_SYSDEVSPACE);
86 DECLARE_CONSTASCII_USTRING(PROPERTY_TRANSACTION_LOG);
87 DECLARE_CONSTASCII_USTRING(PROPERTY_DATADEVSPACE);
88 DECLARE_CONSTASCII_USTRING(PROPERTY_BACKUPNAME);
89 DECLARE_CONSTASCII_USTRING(PROPERTY_PASSWORD);
90 DECLARE_CONSTASCII_USTRING(PROPERTY_CACHESIZE);
91 DECLARE_CONSTASCII_USTRING(PROPERTY_CACHESIZE_INCREMENT);
92 DECLARE_CONSTASCII_USTRING(PROPERTY_RESTOREDATABASE);
93 DECLARE_CONSTASCII_USTRING(PROPERTY_DOMAINPASSWORD);
94 DECLARE_CONSTASCII_USTRING(PROPERTY_LOGDEVSIZE);
95 DECLARE_CONSTASCII_USTRING(PROPERTY_DATADEVSIZE);
96 DECLARE_CONSTASCII_USTRING(PROPERTY_SHUTDOWN);
98 //============================================================
100 //============================================================
101 DECLARE_CONSTASCII_USTRING(SQLSTATE_GENERAL);
104 #endif // ADABASUI_STRINGCONSTANTS_HRC_