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: scriptingconstants.hxx,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 ************************************************************************/
30 #ifndef _COM_SUN_STAR_SCRIPTING_UTIL_SCRIPTINGCONSTANTS_HXX_
31 #define _COM_SUN_STAR_SCRIPTING_UTIL_SCRIPTINGCONSTANTS_HXX_
33 namespace scripting_constants
36 class ScriptingConstantsPool
39 const ::rtl::OUString DOC_REF
;
40 const ::rtl::OUString DOC_STORAGE_ID
;
41 const ::rtl::OUString DOC_URI
;
42 const ::rtl::OUString RESOLVED_STORAGE_ID
;
43 const ::rtl::OUString SCRIPT_INFO
;
44 const ::rtl::OUString SCRIPTSTORAGEMANAGER_SERVICE
;
45 const sal_Int32 SHARED_STORAGE_ID
;
46 const sal_Int32 USER_STORAGE_ID
;
47 const sal_Int32 DOC_STORAGE_ID_NOT_SET
;
49 static ScriptingConstantsPool
& instance()
51 static ScriptingConstantsPool
*pPool
= 0;
54 ::osl::MutexGuard
guard( ::osl::Mutex::getGlobalMutex() );
57 static ScriptingConstantsPool pool
;
64 ScriptingConstantsPool( const ScriptingConstantsPool
& );
65 ScriptingConstantsPool
& operator = ( const ScriptingConstantsPool
& );
66 ScriptingConstantsPool()
67 : DOC_REF( RTL_CONSTASCII_USTRINGPARAM( "SCRIPTING_DOC_REF" ) ),
68 DOC_STORAGE_ID( RTL_CONSTASCII_USTRINGPARAM(
69 "SCRIPTING_DOC_STORAGE_ID" ) ),
70 DOC_URI( RTL_CONSTASCII_USTRINGPARAM( "SCRIPTING_DOC_URI" ) ),
71 RESOLVED_STORAGE_ID( RTL_CONSTASCII_USTRINGPARAM(
72 "SCRIPTING_RESOLVED_STORAGE_ID" ) ),
73 SCRIPT_INFO( RTL_CONSTASCII_USTRINGPARAM( "SCRIPT_INFO" ) ),
74 SCRIPTSTORAGEMANAGER_SERVICE( RTL_CONSTASCII_USTRINGPARAM(
75 "/singletons/com.sun.star.script.framework.storage.theScriptStorageManager" ) ),
76 SHARED_STORAGE_ID( 0 ), USER_STORAGE_ID( 1 ),
77 DOC_STORAGE_ID_NOT_SET( -1 )