Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : */
12 : #ifndef _FPS_OFFICE_RESMGR_HXX_
13 : #define _FPS_OFFICE_RESMGR_HXX_
14 :
15 : #include <rtl/instance.hxx>
16 : #include <tools/resmgr.hxx>
17 :
18 : namespace
19 : {
20 : struct ResMgrHolder
21 : {
22 0 : ResMgr * operator ()()
23 : {
24 0 : return ResMgr::CreateResMgr ("fps_office");
25 : }
26 :
27 0 : static ResMgr * getOrCreate()
28 : {
29 : return rtl_Instance<
30 : ResMgr, ResMgrHolder,
31 : osl::MutexGuard, osl::GetGlobalMutex >::create (
32 0 : ResMgrHolder(), osl::GetGlobalMutex());
33 : }
34 : };
35 :
36 : struct SvtResId : public ResId
37 : {
38 0 : SvtResId (sal_uInt16 nId) : ResId (nId, *ResMgrHolder::getOrCreate()) {}
39 : };
40 : }
41 :
42 : #define SVT_RESSTR(i) SvtResId(i).toString()
43 :
44 : #endif
45 :
46 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|