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

Generated by: LCOV version 1.10