xref: /trunk/main/basic/source/sbx/sbxres.cxx (revision e1f63238)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_basic.hxx"
26 
27 #include "sbxres.hxx"
28 
29 static const char* pSbxRes[] = {
30 	"Empty",
31 	"Null",
32 	"Integer",
33 	"Long",
34 	"Single",
35 	"Double",
36 	"Currency",
37 	"Date",
38 	"String",
39 	"Object",
40 	"Error",
41 	"Boolean",
42 	"Variant",
43 	"Any",
44 	"Type14",
45 	"Type15",
46 	"Char",
47 	"Byte",
48 	"UShort",
49 	"ULong",
50 	"Long64",
51 	"ULong64",
52 	"Int",
53 	"UInt",
54 	"Void",
55 	"HResult",
56 	"Pointer",
57 	"DimArray",
58 	"CArray",
59 	"Any",
60 	"LpStr",
61 	"LpWStr",
62 	" As ",
63 	"Optional ",
64 	"Byref ",
65 
66 	"Name",
67 	"Parent",
68 	"Application",
69 	"Count",
70 	"Add",
71 	"Item",
72 	"Remove",
73 
74 	"Error ",	// mit Blank!
75 	"False",
76 	"True"
77 };
78 
GetSbxRes(sal_uInt16 nId)79 const char* GetSbxRes( sal_uInt16 nId )
80 {
81 	return ( ( nId > SBXRES_MAX ) ? "???" : pSbxRes[ nId ] );
82 }
83 
SbxRes(sal_uInt16 nId)84 SbxRes::SbxRes( sal_uInt16 nId )
85 	: ::rtl::OUString( ::rtl::OUString::createFromAscii( GetSbxRes( nId ) ) )
86 {}
87 
88