1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _GLOBALS_HXX 29 #define _GLOBALS_HXX 30 31 #ifdef IDL_COMPILER 32 #include <hash.hxx> 33 34 #ifdef ICC 35 #undef _Export 36 #endif 37 38 class SvIdlWorkingBase; 39 class SvClassManager; 40 struct SvGlobalHashNames 41 { 42 SvStringHashEntryRef MM_Name; 43 SvStringHashEntryRef MM_module; 44 SvStringHashEntryRef MM_interface; 45 SvStringHashEntryRef MM_in; 46 SvStringHashEntryRef MM_out; 47 SvStringHashEntryRef MM_inout; 48 SvStringHashEntryRef MM_String; 49 SvStringHashEntryRef MM_UCHAR; 50 SvStringHashEntryRef MM_USHORT; 51 SvStringHashEntryRef MM_uuid; 52 SvStringHashEntryRef MM_HelpContext; 53 SvStringHashEntryRef MM_HelpText; 54 SvStringHashEntryRef MM_void; 55 SvStringHashEntryRef MM_shell; 56 SvStringHashEntryRef MM_Get; 57 SvStringHashEntryRef MM_Set; 58 SvStringHashEntryRef MM_SlotId; 59 SvStringHashEntryRef MM_HasCoreId; 60 SvStringHashEntryRef MM_Cachable; 61 SvStringHashEntryRef MM_Volatile; 62 SvStringHashEntryRef MM_Toggle; 63 SvStringHashEntryRef MM_AutoUpdate; 64 SvStringHashEntryRef MM_Synchron; 65 SvStringHashEntryRef MM_Asynchron; 66 SvStringHashEntryRef MM_RecordPerSet; 67 SvStringHashEntryRef MM_RecordPerItem; 68 SvStringHashEntryRef MM_RecordManual; 69 SvStringHashEntryRef MM_NoRecord; 70 SvStringHashEntryRef MM_RecordAbsolute; 71 SvStringHashEntryRef MM_enum; 72 SvStringHashEntryRef MM_UINT16; 73 SvStringHashEntryRef MM_INT16; 74 SvStringHashEntryRef MM_UINT32; 75 SvStringHashEntryRef MM_INT32; 76 SvStringHashEntryRef MM_int; 77 SvStringHashEntryRef MM_BOOL; 78 SvStringHashEntryRef MM_char; 79 SvStringHashEntryRef MM_BYTE; 80 SvStringHashEntryRef MM_float; 81 SvStringHashEntryRef MM_double; 82 SvStringHashEntryRef MM_item; 83 SvStringHashEntryRef MM_PseudoSlots; 84 SvStringHashEntryRef MM_map; 85 SvStringHashEntryRef MM_Default; 86 SvStringHashEntryRef MM_HelpFile; 87 SvStringHashEntryRef MM_Version; 88 SvStringHashEntryRef MM_import; 89 SvStringHashEntryRef MM_SlotIdFile; 90 SvStringHashEntryRef MM_SvName; 91 SvStringHashEntryRef MM_SbxName; 92 SvStringHashEntryRef MM_ItemName; 93 SvStringHashEntryRef MM_OdlName; 94 SvStringHashEntryRef MM_include; 95 SvStringHashEntryRef MM_ExecMethod; 96 SvStringHashEntryRef MM_StateMethod; 97 SvStringHashEntryRef MM_GroupId; 98 SvStringHashEntryRef MM_HasDialog; 99 SvStringHashEntryRef MM_TypeLibFile; 100 SvStringHashEntryRef MM_Export; 101 SvStringHashEntryRef MM_Automation; 102 SvStringHashEntryRef MM_PseudoPrefix; 103 SvStringHashEntryRef MM_define; 104 SvStringHashEntryRef MM_MenuConfig; 105 SvStringHashEntryRef MM_ToolBoxConfig; 106 SvStringHashEntryRef MM_StatusBarConfig; 107 SvStringHashEntryRef MM_AccelConfig; 108 SvStringHashEntryRef MM_AllConfig; 109 SvStringHashEntryRef MM_FastCall; 110 SvStringHashEntryRef MM_SbxObject; 111 SvStringHashEntryRef MM_Container; 112 SvStringHashEntryRef MM_ImageRotation; 113 SvStringHashEntryRef MM_ImageReflection; 114 SvStringHashEntryRef MM_IsCollection; 115 SvStringHashEntryRef MM_ReadOnlyDoc; 116 SvStringHashEntryRef MM_ConfigName; 117 SvStringHashEntryRef MM_union; 118 SvStringHashEntryRef MM_struct; 119 SvStringHashEntryRef MM_typedef; 120 SvStringHashEntryRef MM_Readonly; 121 SvStringHashEntryRef MM_SlotType; 122 SvStringHashEntryRef MM_ModulePrefix; 123 SvStringHashEntryRef MM_DisableFlags; 124 SvStringHashEntryRef MM_Hidden; 125 SvStringHashEntryRef MM_Description; 126 SvStringHashEntryRef MM_UnoName; 127 128 SvGlobalHashNames(); 129 }; 130 131 class IdlDll 132 { 133 public: 134 SvStringHashTable * pHashTable; 135 SvClassManager * pClassMgr; 136 SvGlobalHashNames * pGlobalNames; 137 138 IdlDll(); 139 ~IdlDll(); 140 }; 141 142 IdlDll * GetIdlApp(); 143 #define IDLAPP GetIdlApp() 144 145 #define SV_GLOBAL_HASH_ACCESS( Name ) \ 146 if( !IDLAPP->pGlobalNames ) \ 147 IDLAPP->pGlobalNames = new SvGlobalHashNames(); \ 148 return IDLAPP->pGlobalNames->MM_##Name; 149 150 #define HASH_INLINE( Name ) \ 151 inline SvStringHashEntry * SvHash_##Name() { SV_GLOBAL_HASH_ACCESS( Name ) } 152 153 HASH_INLINE(Name) 154 HASH_INLINE(module) 155 HASH_INLINE(interface) 156 HASH_INLINE(in) 157 HASH_INLINE(out) 158 HASH_INLINE(inout) 159 HASH_INLINE(String) 160 HASH_INLINE(UCHAR) 161 HASH_INLINE(USHORT) 162 HASH_INLINE(uuid) 163 HASH_INLINE(HelpContext) 164 HASH_INLINE(HelpText) 165 HASH_INLINE(void) 166 HASH_INLINE(shell) 167 HASH_INLINE(Get) 168 HASH_INLINE(Set) 169 HASH_INLINE(SlotId) 170 HASH_INLINE(HasCoreId) 171 HASH_INLINE(Cachable) 172 HASH_INLINE(Volatile) 173 HASH_INLINE(Toggle) 174 HASH_INLINE(AutoUpdate) 175 HASH_INLINE(Synchron) 176 HASH_INLINE(Asynchron) 177 HASH_INLINE(RecordPerItem) 178 HASH_INLINE(RecordPerSet) 179 HASH_INLINE(RecordManual) 180 HASH_INLINE(NoRecord) 181 HASH_INLINE(RecordAbsolute) 182 HASH_INLINE(enum) 183 HASH_INLINE(UINT16) 184 HASH_INLINE(INT16) 185 HASH_INLINE(UINT32) 186 HASH_INLINE(INT32) 187 HASH_INLINE(int) 188 HASH_INLINE(BOOL) 189 HASH_INLINE(char) 190 HASH_INLINE(BYTE) 191 HASH_INLINE(item) 192 HASH_INLINE(PseudoSlots) 193 HASH_INLINE(map) 194 HASH_INLINE(Default) 195 HASH_INLINE(HelpFile) 196 HASH_INLINE(Version) 197 HASH_INLINE(import) 198 HASH_INLINE(SlotIdFile) 199 HASH_INLINE(SvName) 200 HASH_INLINE(SbxName) 201 HASH_INLINE(ItemName) 202 HASH_INLINE(OdlName) 203 HASH_INLINE(include) 204 HASH_INLINE(ExecMethod) 205 HASH_INLINE(StateMethod) 206 HASH_INLINE(GroupId) 207 HASH_INLINE(float) 208 HASH_INLINE(double) 209 HASH_INLINE(HasDialog) 210 HASH_INLINE(TypeLibFile) 211 HASH_INLINE(Export) 212 HASH_INLINE(Automation) 213 HASH_INLINE(PseudoPrefix) 214 HASH_INLINE(define) 215 HASH_INLINE(MenuConfig) 216 HASH_INLINE(ToolBoxConfig) 217 HASH_INLINE(StatusBarConfig) 218 HASH_INLINE(AccelConfig) 219 HASH_INLINE(AllConfig) 220 HASH_INLINE(FastCall) 221 HASH_INLINE(SbxObject) 222 HASH_INLINE(Container) 223 HASH_INLINE(ImageRotation) 224 HASH_INLINE(ImageReflection) 225 HASH_INLINE(IsCollection) 226 HASH_INLINE(ReadOnlyDoc) 227 HASH_INLINE(ConfigName) 228 HASH_INLINE(union) 229 HASH_INLINE(struct) 230 HASH_INLINE(typedef) 231 HASH_INLINE(Readonly) 232 HASH_INLINE(SlotType) 233 HASH_INLINE(ModulePrefix) 234 HASH_INLINE(DisableFlags) 235 HASH_INLINE(Hidden) 236 HASH_INLINE(Description) 237 HASH_INLINE(UnoName) 238 239 240 #endif // IDL_COMPILER 241 #endif // _GLOBALS_HXX 242 243