1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <rtl/ustring.hxx>
23 #include "dbadllapi.hxx"
24 #include <unotools/resmgr.hxx>
26 #define DBA_RES( id ) ::dbaccess::ResourceManager::loadString( id )
27 #define DBA_RES_PLURAL( id, number ) ::dbaccess::ResourceManager::loadString( id, number )
28 #define DBA_RES_PARAM( id, ascii, replace ) ::dbaccess::ResourceManager::loadString( id, ascii, replace )
33 // handling resources within the DBA-Core library
34 class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_DBA
) ResourceManager
37 // no instantiation allowed
38 ResourceManager() = delete;
39 ~ResourceManager() { }
42 /** loads the string with the specified resource id
44 static OUString
loadString(TranslateId pResId
);
45 static OUString
loadString(TranslateNId aContextSingularPlural
, int nCardinality
);
47 /** loads a string from the resource file, substituting two placeholders with given strings
50 the resource ID of the string to load
51 @param _pPlaceholderAscii1
52 the ASCII representation of the first placeholder string
54 the string which should substitute the first placeholder
55 @param _pPlaceholderAscii2
56 the ASCII representation of the second placeholder string
58 the string which should substitute the second placeholder
60 static OUString
loadString(
62 std::u16string_view _rPlaceholderAscii1
,
63 std::u16string_view _rReplace1
,
64 std::u16string_view _rPlaceholderAscii2
,
65 std::u16string_view _rReplace2
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */