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 : #ifndef INCLUDED_FPICKER_SOURCE_OFFICE_FPSOFFICERESMGR_HXX
10 : #define INCLUDED_FPICKER_SOURCE_OFFICE_FPSOFFICERESMGR_HXX
11 :
12 : #include <rtl/instance.hxx>
13 : #include <osl/getglobalmutex.hxx>
14 : #include <tools/resmgr.hxx>
15 :
16 : namespace
17 : {
18 : struct ResMgrHolder
19 : {
20 0 : ResMgr * operator ()()
21 : {
22 0 : return ResMgr::CreateResMgr ("fps_office");
23 : }
24 :
25 0 : static ResMgr * getOrCreate()
26 : {
27 : return rtl_Instance<
28 : ResMgr, ResMgrHolder,
29 : osl::MutexGuard, osl::GetGlobalMutex >::create (
30 0 : ResMgrHolder(), osl::GetGlobalMutex());
31 : }
32 : };
33 :
34 : struct SvtResId : public ResId
35 : {
36 0 : SvtResId (sal_uInt16 nId) : ResId (nId, *ResMgrHolder::getOrCreate()) {}
37 : };
38 : }
39 :
40 : #define SVT_RESSTR(i) SvtResId(i).toString()
41 :
42 : #endif
43 :
44 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|