LCOV - code coverage report
Current view: top level - sc/source/filter/xml - xmlcondformat.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 8 14 57.1 %
Date: 2012-08-25 Functions: 12 21 57.1 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 5 16 31.2 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*
       3                 :            :  * Version: MPL 1.1 / GPLv3+ / LGPLv3+
       4                 :            :  *
       5                 :            :  * The contents of this file are subject to the Mozilla Public License Version
       6                 :            :  * 1.1 (the "License"); you may not use this file except in compliance with
       7                 :            :  * the License or as specified alternatively below. You may obtain a copy of
       8                 :            :  * the License at http://www.mozilla.org/MPL/
       9                 :            :  *
      10                 :            :  * Software distributed under the License is distributed on an "AS IS" basis,
      11                 :            :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12                 :            :  * for the specific language governing rights and limitations under the
      13                 :            :  * License.
      14                 :            :  *
      15                 :            :  * Major Contributor(s):
      16                 :            :  * Copyright (C) 2012 Markus Mohrhard <markus.mohrhard@googlemail.com> (initial developer)
      17                 :            :  *
      18                 :            :  * All Rights Reserved.
      19                 :            :  *
      20                 :            :  * For minor contributions see the git repository.
      21                 :            :  *
      22                 :            :  * Alternatively, the contents of this file may be used under the terms of
      23                 :            :  * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
      24                 :            :  * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
      25                 :            :  * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
      26                 :            :  * instead of those above.
      27                 :            :  */
      28                 :            : 
      29                 :            : #include <xmloff/xmlictxt.hxx>
      30                 :            : #include "xmlimprt.hxx"
      31                 :            : #include "rangelst.hxx"
      32                 :            : 
      33                 :            : class ScColorScaleFormat;
      34                 :            : class ScColorScaleEntry;
      35                 :            : class ScDataBarFormat;
      36                 :            : struct ScDataBarFormatData;
      37                 :            : class ScConditionalFormat;
      38                 :            : 
      39                 :            : class ScXMLConditionalFormatsContext : public SvXMLImportContext
      40                 :            : {
      41                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
      42                 :         33 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
      43                 :            : public:
      44                 :            :     ScXMLConditionalFormatsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
      45                 :            :                         const ::rtl::OUString& rLName );
      46                 :            : 
      47         [ -  + ]:          6 :     virtual ~ScXMLConditionalFormatsContext() {}
      48                 :            : 
      49                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
      50                 :            :                                      const ::rtl::OUString& rLocalName,
      51                 :            :                                      const ::com::sun::star::uno::Reference<
      52                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
      53                 :            : 
      54                 :            :     virtual void EndElement();
      55                 :            : };
      56                 :            : 
      57                 :            : class ScXMLConditionalFormatContext : public SvXMLImportContext
      58                 :            : {
      59                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
      60                 :         96 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
      61                 :            : public:
      62                 :            :     ScXMLConditionalFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
      63                 :            :                         const ::rtl::OUString& rLName,
      64                 :            :                         const ::com::sun::star::uno::Reference<
      65                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
      66                 :            : 
      67 [ +  - ][ -  + ]:         24 :     virtual ~ScXMLConditionalFormatContext() {}
      68                 :            : 
      69                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
      70                 :            :                                      const ::rtl::OUString& rLocalName,
      71                 :            :                                      const ::com::sun::star::uno::Reference<
      72                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
      73                 :            : 
      74                 :            :     virtual void EndElement();
      75                 :            : 
      76                 :            : private:
      77                 :            : 
      78                 :            :     ScConditionalFormat* mpFormat;
      79                 :            :     ScRangeList maRange;
      80                 :            : };
      81                 :            : 
      82                 :            : class ScXMLColorScaleFormatContext : public SvXMLImportContext
      83                 :            : {
      84                 :            : private:
      85                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
      86                 :         66 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
      87                 :            : 
      88                 :            : public:
      89                 :            :     ScXMLColorScaleFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
      90                 :            :                         const ::rtl::OUString& rLName, ScConditionalFormat* pFormat);
      91                 :            : 
      92         [ -  + ]:         24 :     virtual ~ScXMLColorScaleFormatContext() {}
      93                 :            : 
      94                 :            : 
      95                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
      96                 :            :                                      const ::rtl::OUString& rLocalName,
      97                 :            :                                      const ::com::sun::star::uno::Reference<
      98                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
      99                 :            : 
     100                 :            :     virtual void EndElement();
     101                 :            : 
     102                 :            : private:
     103                 :            : 
     104                 :            :     ScColorScaleFormat* pColorScaleFormat;
     105                 :            : };
     106                 :            : 
     107                 :            : class ScXMLDataBarFormatContext : public SvXMLImportContext
     108                 :            : {
     109                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
     110                 :          0 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
     111                 :            : public:
     112                 :            :     ScXMLDataBarFormatContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
     113                 :            :                         const ::rtl::OUString& rLName,
     114                 :            :                         const ::com::sun::star::uno::Reference<
     115                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
     116                 :            :                         ScConditionalFormat* pFormat);
     117                 :            : 
     118         [ #  # ]:          0 :     virtual ~ScXMLDataBarFormatContext() {}
     119                 :            : 
     120                 :            : 
     121                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
     122                 :            :                                      const ::rtl::OUString& rLocalName,
     123                 :            :                                      const ::com::sun::star::uno::Reference<
     124                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
     125                 :            : 
     126                 :            :     virtual void EndElement();
     127                 :            : 
     128                 :            : private:
     129                 :            : 
     130                 :            :     ScDataBarFormat* mpDataBarFormat;
     131                 :            :     ScDataBarFormatData* mpFormatData;
     132                 :            : 
     133                 :            : };
     134                 :            : 
     135                 :            : class ScXMLColorScaleFormatEntryContext : public SvXMLImportContext
     136                 :            : {
     137                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
     138                 :        135 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
     139                 :            : public:
     140                 :            :     ScXMLColorScaleFormatEntryContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
     141                 :            :                         const ::rtl::OUString& rLName,
     142                 :            :                         const ::com::sun::star::uno::Reference<
     143                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
     144                 :            :                         ScColorScaleFormat* pFormat);
     145                 :            : 
     146         [ -  + ]:         54 :     virtual ~ScXMLColorScaleFormatEntryContext() {}
     147                 :            : 
     148                 :            :     virtual void EndElement();
     149                 :            : 
     150                 :            : private:
     151                 :            : 
     152                 :            :     ScColorScaleFormat* mpFormat;
     153                 :            :     ScColorScaleEntry* mpFormatEntry;
     154                 :            : };
     155                 :            : 
     156                 :            : class ScXMLDataBarFormatEntryContext : public SvXMLImportContext
     157                 :            : {
     158                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
     159                 :          0 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
     160                 :            : public:
     161                 :            :     ScXMLDataBarFormatEntryContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
     162                 :            :                         const ::rtl::OUString& rLName,
     163                 :            :                         const ::com::sun::star::uno::Reference<
     164                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
     165                 :            :                         ScDataBarFormatData* pData);
     166                 :            : 
     167         [ #  # ]:          0 :     virtual ~ScXMLDataBarFormatEntryContext() {}
     168                 :            : 
     169                 :            :     virtual void EndElement();
     170                 :            : };
     171                 :            : 
     172                 :            : class ScXMLCondContext : public SvXMLImportContext
     173                 :            : {
     174                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
     175                 :          0 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
     176                 :            : public:
     177                 :            :     ScXMLCondContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
     178                 :            :                         const ::rtl::OUString& rLName,
     179                 :            :                         const ::com::sun::star::uno::Reference<
     180                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
     181                 :            :                         ScConditionalFormat* pFormat);
     182                 :            : 
     183         [ #  # ]:          0 :     virtual ~ScXMLCondContext() {}
     184                 :            : 
     185                 :            :     virtual void EndElement();
     186                 :            : };
     187                 :            : 
     188                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10