LCOV - code coverage report
Current view: top level - sc/source/filter/xml - editattributemap.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 1 1 100.0 %
Date: 2014-04-11 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #ifndef __SC_XML_EDITATTRIBUTEMAP_HXX__
      11             : #define __SC_XML_EDITATTRIBUTEMAP_HXX__
      12             : 
      13             : #include "rtl/ustring.hxx"
      14             : 
      15             : #include <boost/unordered_map.hpp>
      16             : 
      17             : /**
      18             :  * Provide mapping from ODF text formatting styles to EditEngine's, for
      19             :  * rich-text cell content import.
      20             :  */
      21          28 : class ScXMLEditAttributeMap
      22             : {
      23             : public:
      24             :     struct Entry
      25             :     {
      26             :         sal_uInt16 nmXMLNS;
      27             :         const char* mpXMLName;
      28             :         const char* mpAPIName;
      29             :         sal_uInt16 mnItemID;
      30             :         sal_uInt8 mnFlag;
      31             :     };
      32             : 
      33             :     ScXMLEditAttributeMap();
      34             : 
      35             :     const Entry* getEntryByAPIName(const OUString& rAPIName) const;
      36             :     const Entry* getEntryByItemID(sal_uInt16 nItemID) const;
      37             : 
      38             : private:
      39             :     typedef boost::unordered_map<OUString, const Entry*, OUStringHash> StrToEntriesType;
      40             :     typedef boost::unordered_map<sal_uInt16, const Entry*> IndexToEntriesType;
      41             :     StrToEntriesType maAPIEntries;
      42             :     IndexToEntriesType maItemIDEntries;
      43             : };
      44             : 
      45             : #endif
      46             : 
      47             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10