Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / filter / xml / editattributemap.hxx
blob9bad09d3cc9538c93b4e5e0cbc5a47f021128a78
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 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_EDITATTRIBUTEMAP_HXX
11 #define INCLUDED_SC_SOURCE_FILTER_XML_EDITATTRIBUTEMAP_HXX
13 #include <rtl/ustring.hxx>
15 #include <unordered_map>
17 /**
18 * Provide mapping from ODF text formatting styles to EditEngine's, for
19 * rich-text cell content import.
21 class ScXMLEditAttributeMap
23 public:
24 struct Entry
26 sal_uInt16 const nmXMLNS;
27 const char* mpXMLName;
28 const char* mpAPIName;
29 sal_uInt16 const mnItemID;
30 sal_uInt8 const mnFlag;
33 ScXMLEditAttributeMap();
35 const Entry* getEntryByAPIName(const OUString& rAPIName) const;
36 const Entry* getEntryByItemID(sal_uInt16 nItemID) const;
38 private:
39 typedef std::unordered_map<OUString, const Entry*> StrToEntriesType;
40 typedef std::unordered_map<sal_uInt16, const Entry*> IndexToEntriesType;
41 StrToEntriesType maAPIEntries;
42 IndexToEntriesType maItemIDEntries;
45 #endif
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */