LCOV - code coverage report
Current view: top level - xmloff/source/text - XMLIndexBibliographySourceContext.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 13 16 81.2 %
Date: 2012-08-25 Functions: 5 11 45.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 7 14 50.0 %

           Branch data     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 ::rtl::OUString;
      39                 :            : using ::com::sun::star::beans::XPropertySet;
      40                 :            : using ::com::sun::star::uno::Reference;
      41                 :            : using ::com::sun::star::uno::Any;
      42                 :            : using ::com::sun::star::xml::sax::XAttributeList;
      43                 :            : 
      44                 :            : 
      45 [ #  # ][ #  # ]:          0 : TYPEINIT1(XMLIndexBibliographySourceContext, XMLIndexSourceBaseContext);
      46                 :            : 
      47                 :            : 
      48                 :          4 : XMLIndexBibliographySourceContext::XMLIndexBibliographySourceContext(
      49                 :            :     SvXMLImport& rImport,
      50                 :            :     sal_uInt16 nPrfx,
      51                 :            :     const OUString& rLocalName,
      52                 :            :     Reference<XPropertySet> & rPropSet) :
      53                 :            :         XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName,
      54                 :          4 :                                   rPropSet, sal_False)
      55                 :            : {
      56                 :          4 : }
      57                 :            : 
      58                 :          4 : XMLIndexBibliographySourceContext::~XMLIndexBibliographySourceContext()
      59                 :            : {
      60         [ -  + ]:          8 : }
      61                 :            : 
      62                 :          0 : void XMLIndexBibliographySourceContext::ProcessAttribute(
      63                 :            :     enum IndexSourceParamEnum,
      64                 :            :     const OUString&)
      65                 :            : {
      66                 :            :     // We have no attributes. Who wants attributes, anyway?
      67                 :          0 : }
      68                 :            : 
      69                 :            : 
      70                 :          4 : void XMLIndexBibliographySourceContext::EndElement()
      71                 :            : {
      72                 :            :     // No attributes, no properties.
      73                 :          4 : }
      74                 :            : 
      75                 :            : 
      76                 :         92 : SvXMLImportContext* XMLIndexBibliographySourceContext::CreateChildContext(
      77                 :            :     sal_uInt16 nPrefix,
      78                 :            :     const OUString& rLocalName,
      79                 :            :     const Reference<XAttributeList> & xAttrList )
      80                 :            : {
      81   [ +  -  +  + ]:        184 :     if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
                 [ +  + ]
      82                 :         92 :          ( IsXMLToken( rLocalName, XML_BIBLIOGRAPHY_ENTRY_TEMPLATE ) ) )
      83                 :            :     {
      84                 :         88 :         return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
      85                 :            :                                            nPrefix, rLocalName,
      86                 :            :                                            aLevelNameBibliographyMap,
      87                 :            :                                            XML_BIBLIOGRAPHY_TYPE,
      88                 :            :                                            aLevelStylePropNameBibliographyMap,
      89         [ +  - ]:         88 :                                            aAllowedTokenTypesBibliography);
      90                 :            :     }
      91                 :            :     else
      92                 :            :     {
      93                 :            :         return XMLIndexSourceBaseContext::CreateChildContext(nPrefix,
      94                 :            :                                                              rLocalName,
      95                 :         92 :                                                              xAttrList);
      96                 :            :     }
      97                 :            : 
      98                 :            : }
      99                 :            : 
     100                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10