LCOV - code coverage report
Current view: top level - xmloff/source/style - XMLFontStylesContext_impl.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 5 0.0 %
Date: 2014-04-14 Functions: 0 7 0.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             : 
      20             : #ifndef INCLUDED_XMLOFF_SOURCE_STYLE_XMLFONTSTYLESCONTEXT_IMPL_HXX
      21             : #define INCLUDED_XMLOFF_SOURCE_STYLE_XMLFONTSTYLESCONTEXT_IMPL_HXX
      22             : 
      23             : #include <xmloff/xmlstyle.hxx>
      24             : 
      25             : /// Handles <style:font-face>
      26             : class XMLFontStyleContextFontFace : public SvXMLStyleContext
      27             : {
      28             :     ::com::sun::star::uno::Any aFamilyName;
      29             :     ::com::sun::star::uno::Any aStyleName;
      30             :     ::com::sun::star::uno::Any aFamily;
      31             :     ::com::sun::star::uno::Any aPitch;
      32             :     ::com::sun::star::uno::Any aEnc;
      33             : 
      34             :     SvXMLImportContextRef xStyles;
      35             : 
      36           0 :     XMLFontStylesContext *GetStyles()
      37             :     {
      38           0 :         return ((XMLFontStylesContext *)&xStyles);
      39             :     }
      40             : 
      41             : public:
      42             : 
      43             :     TYPEINFO_OVERRIDE();
      44             : 
      45             :     XMLFontStyleContextFontFace( SvXMLImport& rImport, sal_uInt16 nPrfx,
      46             :             const OUString& rLName,
      47             :             const ::com::sun::star::uno::Reference<
      48             :                 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
      49             :             XMLFontStylesContext& rStyles );
      50             :     virtual ~XMLFontStyleContextFontFace();
      51             : 
      52             :     void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName,
      53             :                        const OUString& rValue ) SAL_OVERRIDE;
      54             : 
      55             :     void FillProperties( ::std::vector< XMLPropertyState > &rProps,
      56             :                          sal_Int32 nFamilyNameIdx,
      57             :                          sal_Int32 nStyleNameIdx,
      58             :                          sal_Int32 nFamilyIdx,
      59             :                          sal_Int32 nPitchIdx,
      60             :                          sal_Int32 nCharsetIdx ) const;
      61             : 
      62             :     OUString familyName() const;
      63             : 
      64             :     SvXMLImportContext * CreateChildContext(
      65             :         sal_uInt16 nPrefix,
      66             :         const OUString& rLocalName,
      67             :         const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ) SAL_OVERRIDE;
      68             : };
      69             : 
      70             : /// Handles <style:font-face-src>
      71           0 : class XMLFontStyleContextFontFaceSrc : public SvXMLImportContext
      72             : {
      73             :     const XMLFontStyleContextFontFace& font;
      74             : public:
      75             : 
      76             :     TYPEINFO_OVERRIDE();
      77             : 
      78             :     XMLFontStyleContextFontFaceSrc( SvXMLImport& rImport, sal_uInt16 nPrfx,
      79             :             const OUString& rLName,
      80             :             const XMLFontStyleContextFontFace& font );
      81             : 
      82             :     virtual SvXMLImportContext * CreateChildContext(
      83             :         sal_uInt16 nPrefix,
      84             :         const OUString& rLocalName,
      85             :         const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ) SAL_OVERRIDE;
      86             : };
      87             : 
      88             : /// Handles <style:font-face-uri>
      89           0 : class XMLFontStyleContextFontFaceUri : public SvXMLStyleContext
      90             : {
      91             :     const XMLFontStyleContextFontFace& font;
      92             :     OUString format;
      93             :     OUString linkPath;
      94             :     void handleEmbeddedFont( const OUString& url, bool eot );
      95             : public:
      96             : 
      97             :     TYPEINFO_OVERRIDE();
      98             : 
      99             :     XMLFontStyleContextFontFaceUri( SvXMLImport& rImport, sal_uInt16 nPrfx,
     100             :             const OUString& rLName,
     101             :             const ::com::sun::star::uno::Reference<
     102             :                 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
     103             :             const XMLFontStyleContextFontFace& font );
     104             : 
     105             :     virtual void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName,
     106             :         const OUString& rValue ) SAL_OVERRIDE;
     107             :     void SetFormat( const OUString& rFormat );
     108             :     void EndElement() SAL_OVERRIDE;
     109             :     SvXMLImportContext * CreateChildContext(
     110             :         sal_uInt16 nPrefix,
     111             :         const OUString& rLocalName,
     112             :         const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ) SAL_OVERRIDE;
     113             : };
     114             : 
     115             : /// Handles <svg:font-face-format>
     116           0 : class XMLFontStyleContextFontFaceFormat : public SvXMLStyleContext
     117             : {
     118             :     XMLFontStyleContextFontFaceUri& uri;
     119             : public:
     120             :     TYPEINFO_OVERRIDE();
     121             : 
     122             :     XMLFontStyleContextFontFaceFormat( SvXMLImport& rImport, sal_uInt16 nPrfx,
     123             :             const OUString& rLName,
     124             :             const ::com::sun::star::uno::Reference<
     125             :                 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
     126             :             XMLFontStyleContextFontFaceUri& uri );
     127             : 
     128             :     void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName,
     129             :         const OUString& rValue ) SAL_OVERRIDE;
     130             : };
     131             : 
     132             : #endif
     133             : 
     134             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10