fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / xml / xmlsubti.hxx
blob2e4e98a3234aa1f985d454af69d34e593870c516
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 <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>
31 #include "XMLTableShapeResizer.hxx"
32 #include <formula/grammar.hxx>
33 #include "tabprotection.hxx"
34 #include "rangelst.hxx"
36 class ScXMLImport;
38 struct ScXMLTabProtectionData
40 OUString maPassword;
41 ScPasswordHash meHash1;
42 ScPasswordHash meHash2;
43 bool mbProtected;
44 bool mbSelectProtectedCells;
45 bool mbSelectUnprotectedCells;
47 ScXMLTabProtectionData();
50 class ScMyTables
52 private:
53 ScXMLImport& rImport;
55 ScMyOLEFixer aFixupOLEs;
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;
69 void NewRow();
70 void NewColumn(bool bIsCovered);
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 void FixupOLEs() { aFixupOLEs.FixupOLEs(); }
82 static bool IsOLE(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape)
83 { return ScMyOLEFixer::IsOLE(rShape); }
84 void DeleteTable();
85 ScAddress GetCurrentCellPos() const { return maCurrentCellPos; };
86 void AddColStyle(const sal_Int32 nRepeat, const OUString& rCellStyleName);
87 ScXMLTabProtectionData& GetCurrentProtectionData() { return maProtectionData; }
88 OUString GetCurrentSheetName() const { return sCurrentSheetName; }
89 SCTAB GetCurrentSheet() const { return (maCurrentCellPos.Tab() >= 0) ? maCurrentCellPos.Tab() : 0; }
90 SCCOL GetCurrentColCount() const { return std::min<sal_Int32>(nCurrentColCount, MAXCOL); }
91 SCROW GetCurrentRow() const { return (maCurrentCellPos.Row() >= 0) ? maCurrentCellPos.Row() : 0; }
92 ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet >
93 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);
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;
115 #endif
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */