LCOV - code coverage report
Current view: top level - xmloff/inc/xmloff - txtstyli.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 7 9 77.8 %
Date: 2012-08-25 Functions: 5 7 71.4 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _XMLOFF_TXTSTYLI_HXX_
      29                 :            : #define _XMLOFF_TXTSTYLI_HXX_
      30                 :            : 
      31                 :            : #include "sal/config.h"
      32                 :            : #include "xmloff/dllapi.h"
      33                 :            : #include <xmloff/prstylei.hxx>
      34                 :            : 
      35                 :            : class SvXMLTokenMap;
      36                 :            : class XMLEventsImportContext;
      37                 :            : 
      38                 :            : class XMLOFF_DLLPUBLIC XMLTextStyleContext : public XMLPropStyleContext
      39                 :            : {
      40                 :            :     ::rtl::OUString             sListStyleName;
      41                 :            :     ::rtl::OUString             sCategoryVal;
      42                 :            :     ::rtl::OUString             sDropCapTextStyleName;
      43                 :            :     ::rtl::OUString             sMasterPageName;
      44                 :            :     ::rtl::OUString             sDataStyleName; // for grid columns only
      45                 :            :     const ::rtl::OUString       sIsAutoUpdate;
      46                 :            :     const ::rtl::OUString       sCategory;
      47                 :            :     const ::rtl::OUString       sNumberingStyleName;
      48                 :            :     const ::rtl::OUString       sOutlineLevel;
      49                 :            : 
      50                 :            : public:
      51                 :            :     const ::rtl::OUString       sDropCapCharStyleName;
      52                 :            : private:
      53                 :            :     const ::rtl::OUString       sPageDescName;
      54                 :            : 
      55                 :            :     sal_Int8    nOutlineLevel;
      56                 :            : 
      57                 :            :     sal_Bool    bAutoUpdate : 1;
      58                 :            :     sal_Bool    bHasMasterPageName : 1;
      59                 :            : 
      60                 :            :     sal_Bool bHasCombinedCharactersLetter : 1;
      61                 :            : 
      62                 :            :     // Introduce import of empty list style (#i69523#)
      63                 :            :     sal_Bool mbListStyleSet : 1;
      64                 :            : 
      65                 :            :     XMLEventsImportContext* pEventContext;
      66                 :            : 
      67                 :            : protected:
      68                 :            : 
      69                 :            :     virtual void SetAttribute( sal_uInt16 nPrefixKey,
      70                 :            :                                const ::rtl::OUString& rLocalName,
      71                 :            :                                const ::rtl::OUString& rValue );
      72                 :            : 
      73                 :            : public:
      74                 :            : 
      75                 :            :     TYPEINFO();
      76                 :            : 
      77                 :            :     XMLTextStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
      78                 :            :             const ::rtl::OUString& rLName,
      79                 :            :             const ::com::sun::star::uno::Reference<
      80                 :            :                 ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
      81                 :            :             SvXMLStylesContext& rStyles, sal_uInt16 nFamily,
      82                 :            :             sal_Bool bDefaultStyle = sal_False );
      83                 :            :     virtual ~XMLTextStyleContext();
      84                 :            : 
      85                 :            :     virtual SvXMLImportContext *CreateChildContext(
      86                 :            :             sal_uInt16 nPrefix,
      87                 :            :             const ::rtl::OUString& rLocalName,
      88                 :            :             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
      89                 :            : 
      90                 :            :     sal_Bool IsAutoUpdate() const { return bAutoUpdate; }
      91                 :            : 
      92                 :            :     const ::rtl::OUString& GetListStyle() const { return sListStyleName; }
      93                 :            :     // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#)
      94                 :        127 :     sal_Bool IsListStyleSet() const
      95                 :            :     {
      96                 :        127 :         return mbListStyleSet;
      97                 :            :     }
      98                 :            : 
      99                 :         18 :     const ::rtl::OUString& GetMasterPageName() const { return sMasterPageName; }
     100                 :        331 :     sal_Bool HasMasterPageName() const { return bHasMasterPageName; }
     101                 :        331 :     const ::rtl::OUString& GetDropCapStyleName() const { return sDropCapTextStyleName; }
     102                 :          0 :     const ::rtl::OUString& GetDataStyleName() const { return sDataStyleName; }
     103                 :            : 
     104                 :            :     virtual void CreateAndInsert( sal_Bool bOverwrite );
     105                 :            :     virtual void Finish( sal_Bool bOverwrite );
     106                 :            :     virtual void SetDefaults();
     107                 :            : 
     108                 :            :     // overload FillPropertySet, so we can get at the combined characters
     109                 :            :     virtual void FillPropertySet(
     110                 :            :             const ::com::sun::star::uno::Reference<
     111                 :            :                 ::com::sun::star::beans::XPropertySet > & rPropSet );
     112                 :            : 
     113                 :         91 :     inline sal_Bool HasCombinedCharactersLetter()
     114                 :         91 :         { return bHasCombinedCharactersLetter; }
     115                 :            : 
     116                 :          0 :     const ::std::vector< XMLPropertyState > & _GetProperties() { return GetProperties(); }
     117                 :            : };
     118                 :            : 
     119                 :            : #endif
     120                 :            : 
     121                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10