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