LCOV - code coverage report
Current view: top level - xmloff/source/text - XMLIndexIllustrationSourceContext.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 11 12 91.7 %
Date: 2014-11-03 Functions: 4 9 44.4 %
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             : #include "XMLIndexIllustrationSourceContext.hxx"
      21             : #include <com/sun/star/beans/XPropertySet.hpp>
      22             : #include "XMLIndexTemplateContext.hxx"
      23             : #include <xmloff/xmlictxt.hxx>
      24             : #include <xmloff/xmlimp.hxx>
      25             : #include <xmloff/txtimp.hxx>
      26             : #include <xmloff/xmlnmspe.hxx>
      27             : #include <xmloff/nmspmap.hxx>
      28             : #include <xmloff/xmltoken.hxx>
      29             : #include <xmloff/xmluconv.hxx>
      30             : #include <rtl/ustring.hxx>
      31             : 
      32             : using ::com::sun::star::beans::XPropertySet;
      33             : using ::com::sun::star::uno::Reference;
      34             : using ::com::sun::star::uno::Any;
      35             : using ::com::sun::star::xml::sax::XAttributeList;
      36             : using ::xmloff::token::IsXMLToken;
      37             : using ::xmloff::token::XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE;
      38             : using ::xmloff::token::XML_TOKEN_INVALID;
      39             : 
      40           0 : TYPEINIT1(XMLIndexIllustrationSourceContext, XMLIndexTableSourceContext);
      41             : 
      42             : 
      43           6 : XMLIndexIllustrationSourceContext::XMLIndexIllustrationSourceContext(
      44             :     SvXMLImport& rImport,
      45             :     sal_uInt16 nPrfx,
      46             :     const OUString& rLocalName,
      47             :     Reference<XPropertySet> & rPropSet) :
      48           6 :         XMLIndexTableSourceContext(rImport, nPrfx, rLocalName, rPropSet)
      49             : {
      50           6 : }
      51             : 
      52          12 : XMLIndexIllustrationSourceContext::~XMLIndexIllustrationSourceContext()
      53             : {
      54          12 : }
      55             : 
      56          12 : SvXMLImportContext* XMLIndexIllustrationSourceContext::CreateChildContext(
      57             :     sal_uInt16 nPrefix,
      58             :     const OUString& rLocalName,
      59             :     const Reference<XAttributeList> & xAttrList )
      60             : {
      61          24 :     if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
      62          12 :          ( IsXMLToken( rLocalName, XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE ) ) )
      63             :     {
      64           6 :         return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
      65             :                                            nPrefix, rLocalName,
      66             :                                            aLevelNameTableMap,
      67             :                                            XML_TOKEN_INVALID, // no outline-level attr
      68             :                                            aLevelStylePropNameTableMap,
      69           6 :                                            aAllowedTokenTypesTable);
      70             :     }
      71             :     else
      72             :     {
      73             :         return XMLIndexSourceBaseContext::CreateChildContext(nPrefix,
      74             :                                                              rLocalName,
      75           6 :                                                              xAttrList);
      76             :     }
      77             : 
      78             : }
      79             : 
      80             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10