LCOV - code coverage report
Current view: top level - sc/source/filter/xml - XMLDDELinksContext.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 14 0.0 %
Date: 2014-04-11 Functions: 0 16 0.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10