LCOV - code coverage report
Current view: top level - xmloff/source/text - XMLIndexBibliographySourceContext.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 13 16 81.2 %
Date: 2014-11-03 Functions: 5 11 45.5 %
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 "XMLIndexBibliographySourceContext.hxx"
      21             : #include <com/sun/star/beans/XPropertySet.hpp>
      22             : #include <com/sun/star/container/XIndexReplace.hpp>
      23             : #include "XMLIndexTemplateContext.hxx"
      24             : #include "XMLIndexTitleTemplateContext.hxx"
      25             : #include "XMLIndexTOCStylesContext.hxx"
      26             : #include <xmloff/xmlictxt.hxx>
      27             : #include <xmloff/xmlimp.hxx>
      28             : #include <xmloff/txtimp.hxx>
      29             : #include <xmloff/xmlnmspe.hxx>
      30             : #include <xmloff/nmspmap.hxx>
      31             : #include <xmloff/xmltoken.hxx>
      32             : #include <xmloff/xmluconv.hxx>
      33             : #include <rtl/ustring.hxx>
      34             : 
      35             : 
      36             : using namespace ::xmloff::token;
      37             : 
      38             : using ::com::sun::star::beans::XPropertySet;
      39             : using ::com::sun::star::uno::Reference;
      40             : using ::com::sun::star::uno::Any;
      41             : using ::com::sun::star::xml::sax::XAttributeList;
      42             : 
      43             : 
      44           0 : TYPEINIT1(XMLIndexBibliographySourceContext, XMLIndexSourceBaseContext);
      45             : 
      46             : 
      47           4 : XMLIndexBibliographySourceContext::XMLIndexBibliographySourceContext(
      48             :     SvXMLImport& rImport,
      49             :     sal_uInt16 nPrfx,
      50             :     const OUString& rLocalName,
      51             :     Reference<XPropertySet> & rPropSet) :
      52             :         XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName,
      53           4 :                                   rPropSet, false)
      54             : {
      55           4 : }
      56             : 
      57           8 : XMLIndexBibliographySourceContext::~XMLIndexBibliographySourceContext()
      58             : {
      59           8 : }
      60             : 
      61           0 : void XMLIndexBibliographySourceContext::ProcessAttribute(
      62             :     enum IndexSourceParamEnum,
      63             :     const OUString&)
      64             : {
      65             :     // We have no attributes. Who wants attributes, anyway?
      66           0 : }
      67             : 
      68             : 
      69           4 : void XMLIndexBibliographySourceContext::EndElement()
      70             : {
      71             :     // No attributes, no properties.
      72           4 : }
      73             : 
      74             : 
      75          92 : SvXMLImportContext* XMLIndexBibliographySourceContext::CreateChildContext(
      76             :     sal_uInt16 nPrefix,
      77             :     const OUString& rLocalName,
      78             :     const Reference<XAttributeList> & xAttrList )
      79             : {
      80         184 :     if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
      81          92 :          ( IsXMLToken( rLocalName, XML_BIBLIOGRAPHY_ENTRY_TEMPLATE ) ) )
      82             :     {
      83          88 :         return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
      84             :                                            nPrefix, rLocalName,
      85             :                                            aLevelNameBibliographyMap,
      86             :                                            XML_BIBLIOGRAPHY_TYPE,
      87             :                                            aLevelStylePropNameBibliographyMap,
      88          88 :                                            aAllowedTokenTypesBibliography);
      89             :     }
      90             :     else
      91             :     {
      92             :         return XMLIndexSourceBaseContext::CreateChildContext(nPrefix,
      93             :                                                              rLocalName,
      94           4 :                                                              xAttrList);
      95             :     }
      96             : 
      97             : }
      98             : 
      99             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10