LCOV - code coverage report
Current view: top level - sc/source/filter/xml - XMLDDELinksContext.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 14 0.0 %
Date: 2012-08-25 Functions: 0 16 0.0 %
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                 :            : 
      29                 :            : #ifndef SC_XMLDDELINKSCONTEXT_HXX
      30                 :            : #define SC_XMLDDELINKSCONTEXT_HXX
      31                 :            : 
      32                 :            : #include <xmloff/xmlictxt.hxx>
      33                 :            : 
      34                 :            : #include <list>
      35                 :            : 
      36                 :            : class ScXMLImport;
      37                 :            : 
      38                 :            : class ScXMLDDELinksContext : public SvXMLImportContext
      39                 :            : {
      40                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
      41                 :          0 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
      42                 :            : public:
      43                 :            :     ScXMLDDELinksContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
      44                 :            :                         const ::rtl::OUString& rLName,
      45                 :            :                         const ::com::sun::star::uno::Reference<
      46                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
      47                 :            : 
      48                 :            :     virtual ~ScXMLDDELinksContext();
      49                 :            : 
      50                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
      51                 :            :                                      const ::rtl::OUString& rLocalName,
      52                 :            :                                      const ::com::sun::star::uno::Reference<
      53                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
      54                 :            : 
      55                 :            :     virtual void EndElement();
      56                 :            : };
      57                 :            : 
      58                 :          0 : struct ScDDELinkCell
      59                 :            : {
      60                 :            :     rtl::OUString sValue;
      61                 :            :     double fValue;
      62                 :            :     bool bString;
      63                 :            :     bool bEmpty;
      64                 :            : };
      65                 :            : 
      66                 :            : typedef std::list<ScDDELinkCell> ScDDELinkCells;
      67                 :            : 
      68                 :            : class ScXMLDDELinkContext : public SvXMLImportContext
      69                 :            : {
      70                 :            :     ScDDELinkCells  aDDELinkTable;
      71                 :            :     ScDDELinkCells  aDDELinkRow;
      72                 :            :     rtl::OUString   sApplication;
      73                 :            :     rtl::OUString   sTopic;
      74                 :            :     rtl::OUString   sItem;
      75                 :            :     sal_Int32       nPosition;
      76                 :            :     sal_Int32       nColumns;
      77                 :            :     sal_Int32       nRows;
      78                 :            :     sal_uInt8       nMode;
      79                 :            : 
      80                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
      81                 :          0 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
      82                 :            : public:
      83                 :            :     ScXMLDDELinkContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
      84                 :            :                         const ::rtl::OUString& rLName,
      85                 :            :                         const ::com::sun::star::uno::Reference<
      86                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
      87                 :            : 
      88                 :            :     virtual ~ScXMLDDELinkContext();
      89                 :            : 
      90                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
      91                 :            :                                      const ::rtl::OUString& rLocalName,
      92                 :            :                                      const ::com::sun::star::uno::Reference<
      93                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
      94                 :            : 
      95                 :          0 :     void SetApplication(const rtl::OUString& sValue) { sApplication = sValue; }
      96                 :          0 :     void SetTopic(const rtl::OUString& sValue) { sTopic = sValue; }
      97                 :          0 :     void SetItem(const rtl::OUString& sValue) { sItem = sValue; }
      98                 :          0 :     void SetMode(const sal_uInt8 nValue) { nMode = nValue; }
      99                 :            :     void CreateDDELink();
     100                 :          0 :     void AddColumns(const sal_Int32 nValue) { nColumns += nValue; }
     101                 :          0 :     void AddRows(const sal_Int32 nValue) { nRows += nValue; }
     102                 :            :     void AddCellToRow(const ScDDELinkCell& aCell);
     103                 :            :     void AddRowsToTable(const sal_Int32 nRows);
     104                 :            : 
     105                 :            :     virtual void EndElement();
     106                 :            : };
     107                 :            : 
     108                 :            : class ScXMLDDESourceContext : public SvXMLImportContext
     109                 :            : {
     110                 :            :     ScXMLDDELinkContext* pDDELink;
     111                 :            : 
     112                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
     113                 :          0 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
     114                 :            : public:
     115                 :            :     ScXMLDDESourceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
     116                 :            :                         const ::rtl::OUString& rLName,
     117                 :            :                         const ::com::sun::star::uno::Reference<
     118                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
     119                 :            :                         ScXMLDDELinkContext* pDDELink);
     120                 :            : 
     121                 :            :     virtual ~ScXMLDDESourceContext();
     122                 :            : 
     123                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
     124                 :            :                                      const ::rtl::OUString& rLocalName,
     125                 :            :                                      const ::com::sun::star::uno::Reference<
     126                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
     127                 :            : 
     128                 :            :     virtual void EndElement();
     129                 :            : };
     130                 :            : 
     131                 :            : class ScXMLDDETableContext : public SvXMLImportContext
     132                 :            : {
     133                 :            :     ScXMLDDELinkContext* pDDELink;
     134                 :            : 
     135                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
     136                 :          0 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
     137                 :            : public:
     138                 :            :     ScXMLDDETableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
     139                 :            :                         const ::rtl::OUString& rLName,
     140                 :            :                         const ::com::sun::star::uno::Reference<
     141                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
     142                 :            :                         ScXMLDDELinkContext* pDDELink);
     143                 :            : 
     144                 :            :     virtual ~ScXMLDDETableContext();
     145                 :            : 
     146                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
     147                 :            :                                      const ::rtl::OUString& rLocalName,
     148                 :            :                                      const ::com::sun::star::uno::Reference<
     149                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
     150                 :            : 
     151                 :            :     virtual void EndElement();
     152                 :            : };
     153                 :            : 
     154                 :            : class ScXMLDDEColumnContext : public SvXMLImportContext
     155                 :            : {
     156                 :            :     ScXMLDDELinkContext* pDDELink;
     157                 :            : 
     158                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
     159                 :          0 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
     160                 :            : public:
     161                 :            :     ScXMLDDEColumnContext( 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                 :            :                         ScXMLDDELinkContext* pDDELink);
     166                 :            : 
     167                 :            :     virtual ~ScXMLDDEColumnContext();
     168                 :            : 
     169                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
     170                 :            :                                      const ::rtl::OUString& rLocalName,
     171                 :            :                                      const ::com::sun::star::uno::Reference<
     172                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
     173                 :            : 
     174                 :            :     virtual void EndElement();
     175                 :            : };
     176                 :            : 
     177                 :            : class ScXMLDDERowContext : public SvXMLImportContext
     178                 :            : {
     179                 :            :     ScXMLDDELinkContext*    pDDELink;
     180                 :            :     sal_Int32               nRows;
     181                 :            : 
     182                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
     183                 :          0 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
     184                 :            : public:
     185                 :            :     ScXMLDDERowContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
     186                 :            :                         const ::rtl::OUString& rLName,
     187                 :            :                         const ::com::sun::star::uno::Reference<
     188                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
     189                 :            :                         ScXMLDDELinkContext* pDDELink);
     190                 :            : 
     191                 :            :     virtual ~ScXMLDDERowContext();
     192                 :            : 
     193                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
     194                 :            :                                      const ::rtl::OUString& rLocalName,
     195                 :            :                                      const ::com::sun::star::uno::Reference<
     196                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
     197                 :            : 
     198                 :            :     virtual void EndElement();
     199                 :            : };
     200                 :            : 
     201                 :            : class ScXMLDDECellContext : public SvXMLImportContext
     202                 :            : {
     203                 :            :     rtl::OUString   sValue;
     204                 :            :     double          fValue;
     205                 :            :     sal_Int32       nCells;
     206                 :            :     bool            bString;
     207                 :            :     bool            bString2;
     208                 :            :     bool            bEmpty;
     209                 :            : 
     210                 :            :     ScXMLDDELinkContext* pDDELink;
     211                 :            : 
     212                 :            :     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
     213                 :          0 :     ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
     214                 :            : public:
     215                 :            :     ScXMLDDECellContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
     216                 :            :                         const ::rtl::OUString& rLName,
     217                 :            :                         const ::com::sun::star::uno::Reference<
     218                 :            :                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
     219                 :            :                         ScXMLDDELinkContext* pDDELink);
     220                 :            : 
     221                 :            :     virtual ~ScXMLDDECellContext();
     222                 :            : 
     223                 :            :     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
     224                 :            :                                      const ::rtl::OUString& rLocalName,
     225                 :            :                                      const ::com::sun::star::uno::Reference<
     226                 :            :                                           ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
     227                 :            : 
     228                 :            :     virtual void EndElement();
     229                 :            : };
     230                 :            : 
     231                 :            : #endif
     232                 :            : 
     233                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10