LibreOffice Module sc (master)  1
xmlsubti.hxx
Go to the documentation of this file.
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 "XMLTableShapeResizer.hxx"
23 #include <formula/grammar.hxx>
24 #include <tabprotection.hxx>
25 #include <rangelst.hxx>
26 
27 namespace com::sun::star::drawing { class XDrawPage; }
28 namespace com::sun::star::sheet { class XSpreadsheet; }
29 namespace com::sun::star::table { class XCellRange; }
30 namespace com::sun::star::drawing { class XShapes; }
31 
32 class ScXMLImport;
33 
35 {
36  OUString maPassword;
46 
48 };
49 
51 {
52 private:
54 
56 
57  css::uno::Reference< css::sheet::XSpreadsheet > xCurrentSheet;
58  css::uno::Reference< css::drawing::XDrawPage > xDrawPage;
59  css::uno::Reference < css::drawing::XShapes > xShapes;
64  sal_Int32 nCurrentColCount;
65  sal_Int16 nCurrentDrawPage;
66  sal_Int16 nCurrentXShapes;
67 
68  void SetTableStyle(const OUString& sStyleName);
69 public:
70  explicit ScMyTables(ScXMLImport& rImport);
71  ~ScMyTables();
72  void NewSheet(const OUString& sTableName, const OUString& sStyleName,
73  const ScXMLTabProtectionData& rProtectData);
74  void AddRow();
75  void SetRowStyle(const OUString& rCellStyleName);
76  void AddColumn(bool bIsCovered);
77  void FixupOLEs() { aFixupOLEs.FixupOLEs(); }
78  static bool IsOLE(const css::uno::Reference< css::drawing::XShape >& rShape)
79  { return ScMyOLEFixer::IsOLE(rShape); }
80  void DeleteTable();
81  const ScAddress& GetCurrentCellPos() const { return maCurrentCellPos; };
82  void AddColStyle(const sal_Int32 nRepeat, const OUString& rCellStyleName);
84  const OUString& GetCurrentSheetName() const { return sCurrentSheetName; }
85  SCTAB GetCurrentSheet() const { return (maCurrentCellPos.Tab() >= 0) ? maCurrentCellPos.Tab() : 0; }
86  SCCOL GetCurrentColCount() const;
87  SCROW GetCurrentRow() const { return (maCurrentCellPos.Row() >= 0) ? maCurrentCellPos.Row() : 0; }
88  const css::uno::Reference< css::sheet::XSpreadsheet >&
89  GetCurrentXSheet() const { return xCurrentSheet; }
90  css::uno::Reference< css::drawing::XDrawPage > const &
92  css::uno::Reference< css::drawing::XShapes > const &
94  bool HasDrawPage() const;
95  bool HasXShapes() const;
96  void AddOLE(const css::uno::Reference <css::drawing::XShape>& rShape,
97  const OUString &rRangeList);
98 
99  void AddMatrixRange( const SCCOL nStartColumn,
100  const SCROW nStartRow,
101  const SCCOL nEndColumn,
102  const SCROW nEndRow,
103  const OUString& rFormula,
104  const OUString& rFormulaNmsp,
106  bool IsPartOfMatrix( const ScAddress& rScAddress) const;
107 };
108 
109 #endif
110 
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void NewSheet(const OUString &sTableName, const OUString &sStyleName, const ScXMLTabProtectionData &rProtectData)
Definition: xmlsubti.cxx:95
SCROW Row() const
Definition: address.hxx:262
void SetRowStyle(const OUString &rCellStyleName)
Definition: xmlsubti.cxx:170
SCTAB GetCurrentSheet() const
Definition: xmlsubti.hxx:85
bool HasDrawPage() const
Definition: xmlsubti.cxx:243
ScXMLTabProtectionData maProtectionData
Definition: xmlsubti.hxx:63
void SetTableStyle(const OUString &sStyleName)
Definition: xmlsubti.cxx:127
ScPasswordHash meHash1
Definition: xmlsubti.hxx:37
css::uno::Reference< css::drawing::XShapes > xShapes
Definition: xmlsubti.hxx:59
void AddColumn(bool bIsCovered)
Definition: xmlsubti.cxx:175
ScRangeList maMatrixRangeList
Definition: xmlsubti.hxx:62
SCCOL GetCurrentColCount() const
Definition: xmlsubti.cxx:287
SCTAB Tab() const
Definition: address.hxx:271
static bool IsOLE(const css::uno::Reference< css::drawing::XShape > &rShape)
Definition: xmlsubti.hxx:78
void FixupOLEs()
Definition: xmlsubti.hxx:77
ScPasswordHash
bool HasXShapes() const
Definition: xmlsubti.cxx:248
OUString sCurrentSheetName
Definition: xmlsubti.hxx:60
const OUString & GetCurrentSheetName() const
Definition: xmlsubti.hxx:84
ScMyOLEFixer aFixupOLEs
Definition: xmlsubti.hxx:55
sal_Int16 SCCOL
Definition: types.hxx:22
sal_Int32 nCurrentColCount
Definition: xmlsubti.hxx:64
css::uno::Reference< css::drawing::XDrawPage > xDrawPage
Definition: xmlsubti.hxx:58
bool IsPartOfMatrix(const ScAddress &rScAddress) const
Definition: xmlsubti.cxx:280
sal_Int16 nCurrentDrawPage
Definition: xmlsubti.hxx:65
void AddMatrixRange(const SCCOL nStartColumn, const SCROW nStartRow, const SCCOL nEndColumn, const SCROW nEndRow, const OUString &rFormula, const OUString &rFormulaNmsp, const formula::FormulaGrammar::Grammar)
Definition: xmlsubti.cxx:259
void AddColStyle(const sal_Int32 nRepeat, const OUString &rCellStyleName)
Definition: xmlsubti.cxx:211
SCROW GetCurrentRow() const
Definition: xmlsubti.hxx:87
void DeleteTable()
Definition: xmlsubti.cxx:184
const ScAddress & GetCurrentCellPos() const
Definition: xmlsubti.hxx:81
sal_Int32 SCROW
Definition: types.hxx:18
ScXMLImport & rImport
Definition: xmlsubti.hxx:53
ScMyTables(ScXMLImport &rImport)
Definition: xmlsubti.cxx:58
css::uno::Reference< css::drawing::XShapes > const & GetCurrentXShapes()
Definition: xmlsubti.cxx:231
ScAddress maCurrentCellPos
Definition: xmlsubti.hxx:61
static bool IsOLE(const css::uno::Reference< css::drawing::XShape > &rShape)
ScXMLTabProtectionData & GetCurrentProtectionData()
Definition: xmlsubti.hxx:83
const css::uno::Reference< css::sheet::XSpreadsheet > & GetCurrentXSheet() const
Definition: xmlsubti.hxx:89
css::uno::Reference< css::sheet::XSpreadsheet > xCurrentSheet
Definition: xmlsubti.hxx:57
sal_Int16 nCurrentXShapes
Definition: xmlsubti.hxx:66
void AddOLE(const css::uno::Reference< css::drawing::XShape > &rShape, const OUString &rRangeList)
Definition: xmlsubti.cxx:253
ScPasswordHash meHash2
Definition: xmlsubti.hxx:38
void AddRow()
Definition: xmlsubti.cxx:164
sal_Int16 SCTAB
Definition: types.hxx:23
css::uno::Reference< css::drawing::XDrawPage > const & GetCurrentXDrawPage()
Definition: xmlsubti.cxx:219