Avoid potential negative array index access to cached text.
[LibreOffice.git] / writerfilter / source / rtftok / rtfreferencetable.hxx
blob76cbaacf2371c7b875c728598a85086f16cc5924
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #pragma once
12 #include <map>
13 #include <dmapper/resourcemodel.hxx>
15 namespace writerfilter::rtftok
17 /// Sends tables (e.g. font table) to the domain mapper.
18 class RTFReferenceTable : public writerfilter::Reference<Table>
20 public:
21 using Entries_t = std::map<int, writerfilter::Reference<Properties>::Pointer_t>;
22 using Entry_t = std::pair<int, writerfilter::Reference<Properties>::Pointer_t>;
23 explicit RTFReferenceTable(Entries_t aEntries);
24 ~RTFReferenceTable() override;
25 void resolve(Table& rHandler) override;
27 private:
28 Entries_t m_aEntries;
30 } // namespace writerfilter::rtftok
32 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */