LCOV - code coverage report
Current view: top level - include/xmloff - XMLFontStylesContext.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 7 7 100.0 %
Date: 2014-04-11 Functions: 6 6 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             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : #ifndef INCLUDED_XMLOFF_XMLFONTSTYLESCONTEXT_HXX
      20             : #define INCLUDED_XMLOFF_XMLFONTSTYLESCONTEXT_HXX
      21             : 
      22             : #include <sal/config.h>
      23             : #include <xmloff/dllapi.h>
      24             : 
      25             : #include <vector>
      26             : 
      27             : #include <xmloff/xmlstyle.hxx>
      28             : 
      29             : struct XMLPropertyState;
      30             : class SvXMLTokenMap;
      31             : class XMLFontFamilyNamePropHdl;
      32             : class XMLFontFamilyPropHdl;
      33             : class XMLFontPitchPropHdl;
      34             : class XMLFontEncodingPropHdl;
      35             : 
      36             : class XMLOFF_DLLPUBLIC XMLFontStylesContext : public SvXMLStylesContext
      37             : {
      38             :     XMLFontFamilyNamePropHdl    *pFamilyNameHdl;
      39             :     XMLFontFamilyPropHdl        *pFamilyHdl;
      40             :     XMLFontPitchPropHdl         *pPitchHdl;
      41             :     XMLFontEncodingPropHdl      *pEncHdl;
      42             : 
      43             :     SvXMLTokenMap           *pFontStyleAttrTokenMap;
      44             : 
      45             :     rtl_TextEncoding        eDfltEncoding;
      46             : 
      47             : protected:
      48             : 
      49             :     virtual SvXMLStyleContext *CreateStyleChildContext( sal_uInt16 nPrefix,
      50             :         const OUString& rLocalName,
      51             :         const ::com::sun::star::uno::Reference<
      52             :             ::com::sun::star::xml::sax::XAttributeList > & xAttrList ) SAL_OVERRIDE;
      53             : 
      54             : public:
      55             : 
      56             :     TYPEINFO_OVERRIDE();
      57             : 
      58             :     XMLFontStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
      59             :             const OUString& rLName,
      60             :             const ::com::sun::star::uno::Reference<
      61             :                 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
      62             :             rtl_TextEncoding eDfltEnc );
      63             :     virtual ~XMLFontStylesContext();
      64             : 
      65        9560 :     const SvXMLTokenMap& GetFontStyleAttrTokenMap() const
      66             :     {
      67        9560 :         return *pFontStyleAttrTokenMap;
      68             :     }
      69             : 
      70             :     bool FillProperties( const OUString& rName,
      71             :                          ::std::vector< XMLPropertyState > &rProps,
      72             :                          sal_Int32 nFamilyNameIdx,
      73             :                          sal_Int32 nStyleNameIdx,
      74             :                          sal_Int32 nFamilyIdx,
      75             :                          sal_Int32 nPitchIdx,
      76             :                          sal_Int32 nCharsetIdx ) const;
      77             : 
      78        2544 :     rtl_TextEncoding GetDfltCharset() const { return eDfltEncoding; }
      79             : 
      80        2544 :     XMLFontFamilyNamePropHdl& GetFamilyNameHdl() const { return *pFamilyNameHdl; }
      81        2247 :     XMLFontFamilyPropHdl& GetFamilyHdl() const { return *pFamilyHdl; }
      82        2131 :     XMLFontPitchPropHdl& GetPitchHdl() const { return *pPitchHdl; }
      83          68 :     XMLFontEncodingPropHdl& GetEncodingHdl() const { return *pEncHdl; }
      84             : 
      85             : };
      86             : 
      87             : #endif
      88             : 
      89             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10