1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_XMLSUBTI_HXX
20 #define INCLUDED_SC_SOURCE_FILTER_XML_XMLSUBTI_HXX
22 #include "XMLTableShapeResizer.hxx"
23 #include <formula/grammar.hxx>
24 #include <tabprotection.hxx>
25 #include <rangelst.hxx>
27 namespace com
{ namespace sun
{ namespace star
{ namespace drawing
{ class XDrawPage
; } } } }
28 namespace com
{ namespace sun
{ namespace star
{ namespace sheet
{ class XSpreadsheet
; } } } }
29 namespace com
{ namespace sun
{ namespace star
{ namespace table
{ class XCellRange
; } } } }
30 namespace com
{ namespace sun
{ namespace star
{ namespace drawing
{ class XShapes
; } } } }
34 struct ScXMLTabProtectionData
37 ScPasswordHash meHash1
;
38 ScPasswordHash meHash2
;
40 bool mbSelectProtectedCells
;
41 bool mbSelectUnprotectedCells
;
47 ScXMLTabProtectionData();
55 ScMyOLEFixer aFixupOLEs
;
57 css::uno::Reference
< css::sheet::XSpreadsheet
> xCurrentSheet
;
58 css::uno::Reference
< css::drawing::XDrawPage
> xDrawPage
;
59 css::uno::Reference
< css::drawing::XShapes
> xShapes
;
60 OUString sCurrentSheetName
;
61 ScAddress maCurrentCellPos
;
62 ScRangeList maMatrixRangeList
;
63 ScXMLTabProtectionData maProtectionData
;
64 sal_Int32 nCurrentColCount
;
65 sal_Int16 nCurrentDrawPage
;
66 sal_Int16 nCurrentXShapes
;
68 void SetTableStyle(const OUString
& sStyleName
);
70 explicit ScMyTables(ScXMLImport
& rImport
);
72 void NewSheet(const OUString
& sTableName
, const OUString
& sStyleName
,
73 const ScXMLTabProtectionData
& rProtectData
);
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
); }
81 const ScAddress
& GetCurrentCellPos() const { return maCurrentCellPos
; };
82 void AddColStyle(const sal_Int32 nRepeat
, const OUString
& rCellStyleName
);
83 ScXMLTabProtectionData
& GetCurrentProtectionData() { return maProtectionData
; }
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 &
91 GetCurrentXDrawPage();
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
);
99 void AddMatrixRange( const SCCOL nStartColumn
,
100 const SCROW nStartRow
,
101 const SCCOL nEndColumn
,
103 const OUString
& rFormula
,
104 const OUString
& rFormulaNmsp
,
105 const formula::FormulaGrammar::Grammar
);
106 bool IsPartOfMatrix( const ScAddress
& rScAddress
) const;
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */