LCOV - code coverage report
Current view: top level - xmloff/source/text - XMLTextMasterStylesContext.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 13 18 72.2 %
Date: 2012-08-25 Functions: 3 11 27.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 9 22 40.9 %

           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 <xmloff/xmlimp.hxx>
      21                 :            : #include "xmloff/xmlnmspe.hxx"
      22                 :            : #include <xmloff/xmltoken.hxx>
      23                 :            : #include <xmloff/nmspmap.hxx>
      24                 :            : 
      25                 :            : #include <xmloff/XMLTextMasterPageContext.hxx>
      26                 :            : #include <xmloff/XMLTextMasterStylesContext.hxx>
      27                 :            : 
      28                 :            : using ::rtl::OUString;
      29                 :            : using ::rtl::OUStringBuffer;
      30                 :            : 
      31                 :            : using namespace ::com::sun::star::uno;
      32                 :            : using namespace ::com::sun::star::xml::sax;
      33                 :            : 
      34                 :            : using ::xmloff::token::IsXMLToken;
      35                 :            : using ::xmloff::token::XML_MASTER_PAGE;
      36                 :            : 
      37                 :            : // ------------------------------------------------------------------------
      38                 :            : 
      39 [ #  # ][ #  # ]:          0 : TYPEINIT1( XMLTextMasterStylesContext, SvXMLStylesContext );
      40                 :            : 
      41                 :          0 : sal_Bool XMLTextMasterStylesContext::InsertStyleFamily( sal_uInt16 ) const
      42                 :            : {
      43                 :          0 :     return sal_True;
      44                 :            : }
      45                 :            : 
      46                 :         63 : XMLTextMasterStylesContext::XMLTextMasterStylesContext(
      47                 :            :         SvXMLImport& rImport,
      48                 :            :         sal_uInt16 nPrfx, const OUString& rLName,
      49                 :            :         const Reference< XAttributeList > & xAttrList ) :
      50                 :         63 :     SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList )
      51                 :            : {
      52                 :         63 : }
      53                 :            : 
      54                 :         63 : XMLTextMasterStylesContext::~XMLTextMasterStylesContext()
      55                 :            : {
      56         [ -  + ]:         63 : }
      57                 :            : 
      58                 :        119 : SvXMLStyleContext *XMLTextMasterStylesContext::CreateStyleChildContext(
      59                 :            :         sal_uInt16 nPrefix,
      60                 :            :         const OUString& rLocalName,
      61                 :            :         const Reference< XAttributeList > & xAttrList )
      62                 :            : {
      63                 :        119 :     SvXMLStyleContext *pContext = 0;
      64                 :            : 
      65   [ +  -  +  -  :        357 :     if( XML_NAMESPACE_STYLE == nPrefix &&
           +  - ][ +  - ]
      66                 :        119 :         IsXMLToken( rLocalName, XML_MASTER_PAGE ) &&
      67                 :        119 :          InsertStyleFamily( XML_STYLE_FAMILY_MASTER_PAGE ) )
      68                 :            :         pContext = new XMLTextMasterPageContext(
      69                 :        119 :                         GetImport(), nPrefix, rLocalName,
      70                 :            :                           xAttrList,
      71 [ +  - ][ +  - ]:        119 :                         !GetImport().GetTextImport()->IsInsertMode() );
         [ +  - ][ +  - ]
      72                 :            : 
      73                 :            :     // any other style will be ignored here!
      74                 :            : 
      75                 :        119 :     return pContext;
      76                 :            : }
      77                 :            : 
      78                 :          0 : SvXMLStyleContext *XMLTextMasterStylesContext::CreateStyleStyleChildContext(
      79                 :            :         sal_uInt16 /*nFamily*/,
      80                 :            :         sal_uInt16 /*nPrefix*/,
      81                 :            :         const OUString& /*rLocalName*/,
      82                 :            :         const Reference< XAttributeList > & /*xAttrList*/ )
      83                 :            : {
      84                 :          0 :     return 0;
      85                 :            : }
      86                 :            : 
      87                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10