/src/libreoffice/oox/source/token/relationship.cxx
Line | Count | Source |
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 | | |
10 | | #include <oox/token/relationship.hxx> |
11 | | |
12 | | #include <sal/log.hxx> |
13 | | #include <frozen/bits/defines.h> |
14 | | #include <frozen/bits/elsa_std.h> |
15 | | #include <frozen/unordered_map.h> |
16 | | |
17 | | namespace oox |
18 | | { |
19 | | |
20 | | namespace |
21 | | { |
22 | | |
23 | | constexpr auto constRelationshipMap = frozen::make_unordered_map<Relationship, std::u16string_view> |
24 | | ({ |
25 | | #include "relationship.inc" |
26 | | }); |
27 | | |
28 | | } // end anonymous ns |
29 | | |
30 | | OUString getRelationship(Relationship eRelationship) |
31 | 0 | { |
32 | 0 | auto iterator = constRelationshipMap.find(eRelationship); |
33 | 0 | if (iterator != constRelationshipMap.end()) |
34 | 0 | return OUString(iterator->second); |
35 | 0 | SAL_WARN("oox", "could not find an entry for the relationship: " << static_cast<int>(eRelationship)); |
36 | 0 | return OUString(); |
37 | 0 | } |
38 | | |
39 | | } |
40 | | |
41 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |