LCOV - code coverage report
Current view: top level - sc/source/filter/xml - xmlsubti.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 8 12 66.7 %
Date: 2012-08-25 Functions: 9 12 75.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 3 4 75.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 SC_XMLSUBTI_HXX
      29                 :            : #define SC_XMLSUBTI_HXX
      30                 :            : 
      31                 :            : #include <xmloff/xmlictxt.hxx>
      32                 :            : #include <xmloff/xmlimp.hxx>
      33                 :            : #include <com/sun/star/sheet/XSpreadsheet.hpp>
      34                 :            : #include <com/sun/star/drawing/XDrawPage.hpp>
      35                 :            : #include <com/sun/star/table/CellAddress.hpp>
      36                 :            : #include <com/sun/star/table/XCellRange.hpp>
      37                 :            : #include <com/sun/star/table/CellRangeAddress.hpp>
      38                 :            : #include <com/sun/star/frame/XModel.hpp>
      39                 :            : 
      40                 :            : #include "XMLTableShapeResizer.hxx"
      41                 :            : #include "formula/grammar.hxx"
      42                 :            : #include "tabprotection.hxx"
      43                 :            : #include "rangelst.hxx"
      44                 :            : 
      45                 :            : class ScXMLImport;
      46                 :            : 
      47                 :        826 : struct ScXMLTabProtectionData
      48                 :            : {
      49                 :            :     ::rtl::OUString maPassword;
      50                 :            :     ScPasswordHash  meHash1;
      51                 :            :     ScPasswordHash  meHash2;
      52                 :            :     bool            mbProtected;
      53                 :            :     bool            mbSelectProtectedCells;
      54                 :            :     bool            mbSelectUnprotectedCells;
      55                 :            : 
      56                 :            :     ScXMLTabProtectionData();
      57                 :            : };
      58                 :            : 
      59                 :            : class ScMyTables
      60                 :            : {
      61                 :            : private:
      62                 :            :     ScXMLImport&                        rImport;
      63                 :            : 
      64                 :            :     ScMyOLEFixer                        aFixupOLEs;
      65                 :            : 
      66                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > xCurrentSheet;
      67                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > xCurrentCellRange;
      68                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > xDrawPage;
      69                 :            :     ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShapes > xShapes;
      70                 :            :     rtl::OUString                       sCurrentSheetName;
      71                 :            :     ScAddress                           maCurrentCellPos;
      72                 :            :     ScRangeList                         maMatrixRangeList;
      73                 :            :     ScXMLTabProtectionData              maProtectionData;
      74                 :            :     sal_Int32                           nCurrentColCount;
      75                 :            :     sal_Int16                           nCurrentDrawPage;
      76                 :            :     sal_Int16                           nCurrentXShapes;
      77                 :            : 
      78                 :            :     void                                NewRow();
      79                 :            :     void                                NewColumn(bool bIsCovered);
      80                 :            : 
      81                 :            :     void                                SetTableStyle(const rtl::OUString& sStyleName);
      82                 :            : public:
      83                 :            :                                         ScMyTables(ScXMLImport& rImport);
      84                 :            :                                         ~ScMyTables();
      85                 :            :     void                                NewSheet(const rtl::OUString& sTableName, const rtl::OUString& sStyleName,
      86                 :            :                                                  const ScXMLTabProtectionData& rProtectData);
      87                 :            :     void                                AddRow();
      88                 :            :     void                                SetRowStyle(const rtl::OUString& rCellStyleName);
      89                 :            :     void                                AddColumn(bool bIsCovered);
      90                 :         93 :     void                                FixupOLEs() { aFixupOLEs.FixupOLEs(); }
      91                 :          0 :     bool                                IsOLE(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape) const
      92                 :          0 :                                             { return ScMyOLEFixer::IsOLE(rShape); }
      93                 :            :     void                                DeleteTable();
      94                 :      16419 :     ScAddress                           GetCurrentCellPos() const { return maCurrentCellPos; };
      95                 :            :     void                                AddColStyle(const sal_Int32 nRepeat, const rtl::OUString& rCellStyleName);
      96                 :          0 :     ScXMLTabProtectionData&             GetCurrentProtectionData() { return maProtectionData; }
      97                 :          0 :     rtl::OUString                       GetCurrentSheetName() const { return sCurrentSheetName; }
      98         [ +  + ]:       5624 :     SCTAB                               GetCurrentSheet() const { return (maCurrentCellPos.Tab() >= 0) ? maCurrentCellPos.Tab() : 0; }
      99                 :        329 :     SCCOL                               GetCurrentColCount() const { return nCurrentColCount; }
     100         [ +  - ]:       4404 :     SCROW                               GetCurrentRow() const { return (maCurrentCellPos.Row() >= 0) ? maCurrentCellPos.Row() : 0; }
     101                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet >
     102                 :       4733 :                                         GetCurrentXSheet() const { return xCurrentSheet; }
     103                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange >
     104                 :          6 :                                         GetCurrentXCellRange() const { return xCurrentCellRange; }
     105                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >
     106                 :            :                                         GetCurrentXDrawPage();
     107                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
     108                 :            :                                         GetCurrentXShapes();
     109                 :            :     bool                                HasDrawPage();
     110                 :            :     bool                                HasXShapes();
     111                 :            :     void                                AddOLE(com::sun::star::uno::Reference <com::sun::star::drawing::XShape>& rShape,
     112                 :            :                                                const rtl::OUString &rRangeList);
     113                 :            : 
     114                 :            :     void                                AddMatrixRange( const SCCOL nStartColumn,
     115                 :            :                                             const SCROW nStartRow,
     116                 :            :                                             const SCCOL nEndColumn,
     117                 :            :                                             const SCROW nEndRow,
     118                 :            :                                             const rtl::OUString& rFormula,
     119                 :            :                                             const rtl::OUString& rFormulaNmsp,
     120                 :            :                                             const formula::FormulaGrammar::Grammar );
     121                 :            :     bool                                IsPartOfMatrix( const ScAddress& rScAddress) const;
     122                 :            : };
     123                 :            : 
     124                 :            : #endif
     125                 :            : 
     126                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10