LCOV - code coverage report
Current view: top level - sc/source/filter/xml - XMLExportSharedData.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 7 7 100.0 %
Date: 2014-04-11 Functions: 9 9 100.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_XMLEXPORTSHAREDDATA_HXX
      21             : #define SC_XMLEXPORTSHAREDDATA_HXX
      22             : 
      23             : #include "global.hxx"
      24             : #include <com/sun/star/drawing/XDrawPage.hpp>
      25             : 
      26             : #include <vector>
      27             : #include <list>
      28             : 
      29         106 : struct ScMyDrawPage
      30             : {
      31             :     com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage> xDrawPage;
      32             :     bool bHasForms;
      33             : 
      34          40 :     ScMyDrawPage() : bHasForms(false) {}
      35             : };
      36             : 
      37             : typedef std::list< com::sun::star::uno::Reference<com::sun::star::drawing::XShape> > ScMyTableXShapes;
      38             : typedef std::vector<ScMyTableXShapes> ScMyTableShapes;
      39             : typedef std::vector<ScMyDrawPage> ScMyDrawPages;
      40             : 
      41             : class ScMyShapesContainer;
      42             : class ScMyDetectiveObjContainer;
      43             : struct ScMyShape;
      44             : class ScMyNoteShapesContainer;
      45             : 
      46             : class ScMySharedData
      47             : {
      48             :     std::vector<sal_Int32>      nLastColumns;
      49             :     std::vector<sal_Int32>      nLastRows;
      50             :     ScMyTableShapes*            pTableShapes;
      51             :     ScMyDrawPages*              pDrawPages;
      52             :     ScMyShapesContainer*        pShapesContainer;
      53             :     ScMyDetectiveObjContainer*  pDetectiveObjContainer;
      54             :     ScMyNoteShapesContainer*    pNoteShapes;
      55             :     sal_Int32                   nTableCount;
      56             : public:
      57             :     ScMySharedData(const sal_Int32 nTableCount);
      58             :     ~ScMySharedData();
      59             : 
      60             :     void SetLastColumn(const sal_Int32 nTable, const sal_Int32 nCol);
      61             :     void SetLastRow(const sal_Int32 nTable, const sal_Int32 nRow);
      62             :     sal_Int32 GetLastColumn(const sal_Int32 nTable) const;
      63             :     sal_Int32 GetLastRow(const sal_Int32 nTable) const;
      64             :     void AddDrawPage(const ScMyDrawPage& aDrawPage, const sal_Int32 nTable);
      65             :     void SetDrawPageHasForms(const sal_Int32 nTable, bool bHasForms);
      66             :     com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage> GetDrawPage(const sal_Int32 nTable);
      67          40 :     bool HasDrawPage() const { return pDrawPages != NULL; }
      68             :     bool HasForm(const sal_Int32 nTable, com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage>& xDrawPage);
      69             :     void AddNewShape(const ScMyShape& aMyShape);
      70             :     void SortShapesContainer();
      71          38 :     ScMyShapesContainer* GetShapesContainer() { return pShapesContainer; }
      72             :     bool HasShapes();
      73             :     void AddTableShape(const sal_Int32 nTable, const com::sun::star::uno::Reference<com::sun::star::drawing::XShape>& xShape);
      74          44 :     ScMyTableShapes* GetTableShapes() { return pTableShapes; }
      75          36 :     ScMyDetectiveObjContainer* GetDetectiveObjContainer() { return pDetectiveObjContainer; }
      76             :     void AddNoteObj(const com::sun::star::uno::Reference<com::sun::star::drawing::XShape>& xShape, const ScAddress& rPos);
      77             :     void SortNoteShapes();
      78          41 :     ScMyNoteShapesContainer* GetNoteShapes() { return pNoteShapes; }
      79             : };
      80             : 
      81             : #endif
      82             : 
      83             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10