Avoid potential negative array index access to cached text.
[LibreOffice.git] / writerfilter / inc / dmapper / GraphicZOrderHelper.hxx
blobc6a308ddf81978586e2697174c5846a0d5742493
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
9 #pragma once
11 #include <com/sun/star/beans/XPropertySet.hpp>
12 #include <map>
14 namespace writerfilter::dmapper
16 class GraphicZOrderHelper
18 public:
19 void addItem(css::uno::Reference<css::beans::XPropertySet> const& props,
20 sal_Int32 relativeHeight);
21 sal_Int32 findZOrder(sal_Int32 relativeHeight, bool bOldStyle = false);
23 private:
24 using Items = std::map<sal_Int32, css::uno::Reference<css::beans::XPropertySet>>;
25 Items m_items;
28 } // namespace writerfilter::dmapper
30 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */