LibreOffice Module oox (master) 1
relationship.cxx
Go to the documentation of this file.
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
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
17namespace oox
18{
19
20namespace
21{
22
23constexpr frozen::unordered_map<Relationship, std::u16string_view, 48> constRelationshipMap
24{
25#include "relationship.inc"
26};
27
28} // end anonymous ns
29
30OUString getRelationship(Relationship eRelationship)
31{
32 auto iterator = constRelationshipMap.find(eRelationship);
33 if (iterator != constRelationshipMap.end())
34 return OUString(iterator->second);
35 SAL_WARN("oox", "could not find an entry for the relationship: " << static_cast<int>(eRelationship));
36 return OUString();
37}
38
39}
40
41/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SAL_WARN(area, stream)
Relationship
OUString getRelationship(Relationship eRelationship)