bump product version to 5.0.4.1
[LibreOffice.git] / scripting / source / inc / util / scriptingconstants.hxx
blobea0e4371d916a3ee988f80406bd41fec3823c951
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SCRIPTING_SOURCE_INC_UTIL_SCRIPTINGCONSTANTS_HXX
20 #define INCLUDED_SCRIPTING_SOURCE_INC_UTIL_SCRIPTINGCONSTANTS_HXX
22 namespace scripting_constants
25 class ScriptingConstantsPool
27 public:
28 const OUString DOC_REF;
29 const OUString DOC_STORAGE_ID;
30 const OUString DOC_URI;
31 const OUString RESOLVED_STORAGE_ID;
32 const OUString SCRIPT_INFO;
33 const OUString SCRIPTSTORAGEMANAGER_SERVICE;
34 const sal_Int32 SHARED_STORAGE_ID;
35 const sal_Int32 USER_STORAGE_ID;
36 const sal_Int32 DOC_STORAGE_ID_NOT_SET;
38 static ScriptingConstantsPool& instance()
40 static ScriptingConstantsPool *pPool = 0;
41 if( ! pPool )
43 ::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() );
44 if( ! pPool )
46 static ScriptingConstantsPool pool;
47 pPool = &pool;
50 return *pPool;
52 private:
53 ScriptingConstantsPool( const ScriptingConstantsPool & ) SAL_DELETED_FUNCTION;
54 ScriptingConstantsPool& operator = ( const ScriptingConstantsPool & ) SAL_DELETED_FUNCTION;
55 ScriptingConstantsPool()
56 : DOC_REF( "SCRIPTING_DOC_REF" ),
57 DOC_STORAGE_ID( "SCRIPTING_DOC_STORAGE_ID" ),
58 DOC_URI( "SCRIPTING_DOC_URI" ),
59 RESOLVED_STORAGE_ID( "SCRIPTING_RESOLVED_STORAGE_ID" ),
60 SCRIPT_INFO( "SCRIPT_INFO" ),
61 SCRIPTSTORAGEMANAGER_SERVICE(
62 "/singletons/com.sun.star.script.framework.storage.theScriptStorageManager" ),
63 SHARED_STORAGE_ID( 0 ), USER_STORAGE_ID( 1 ),
64 DOC_STORAGE_ID_NOT_SET( -1 )
69 #endif
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */