LibreOffice Module sc (master)  1
XMLExportSharedData.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 
20 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_XMLEXPORTSHAREDDATA_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_XML_XMLEXPORTSHAREDDATA_HXX
22 
23 #include <address.hxx>
24 #include <com/sun/star/uno/Reference.hxx>
25 
26 #include <vector>
27 #include <list>
28 #include <memory>
29 
30 namespace com::sun::star::drawing { class XDrawPage; }
31 namespace com::sun::star::drawing { class XShape; }
32 
34 {
35  css::uno::Reference<css::drawing::XDrawPage> xDrawPage;
36  bool bHasForms;
37 
38  ScMyDrawPage() : bHasForms(false) {}
39 };
40 
41 typedef std::list< css::uno::Reference<css::drawing::XShape> > ScMyTableXShapes;
42 typedef std::vector<ScMyTableXShapes> ScMyTableShapes;
43 typedef std::vector<ScMyDrawPage> ScMyDrawPages;
44 
47 struct ScMyShape;
49 
51 {
52  std::vector<sal_Int32> nLastColumns;
53  std::vector<sal_Int32> nLastRows;
54  std::unique_ptr<ScMyTableShapes> pTableShapes;
55  std::unique_ptr<ScMyDrawPages> pDrawPages;
56  std::unique_ptr<ScMyShapesContainer> pShapesContainer;
57  std::unique_ptr<ScMyDetectiveObjContainer> pDetectiveObjContainer;
58  std::unique_ptr<ScMyNoteShapesContainer> pNoteShapes;
59  sal_Int32 nTableCount;
60 public:
61  explicit ScMySharedData(const sal_Int32 nTableCount);
63 
64  void SetLastColumn(const sal_Int32 nTable, const sal_Int32 nCol);
65  void SetLastRow(const sal_Int32 nTable, const sal_Int32 nRow);
66  sal_Int32 GetLastColumn(const sal_Int32 nTable) const;
67  sal_Int32 GetLastRow(const sal_Int32 nTable) const;
68  void AddDrawPage(const ScMyDrawPage& aDrawPage, const sal_Int32 nTable);
69  void SetDrawPageHasForms(const sal_Int32 nTable, bool bHasForms);
70  css::uno::Reference<css::drawing::XDrawPage> GetDrawPage(const sal_Int32 nTable);
71  bool HasDrawPage() const { return pDrawPages != nullptr; }
72  bool HasForm(const sal_Int32 nTable, css::uno::Reference<css::drawing::XDrawPage>& xDrawPage);
73  void AddNewShape(const ScMyShape& aMyShape);
74  void SortShapesContainer();
75  ScMyShapesContainer* GetShapesContainer() { return pShapesContainer.get(); }
76  bool HasShapes() const;
77  void AddTableShape(const sal_Int32 nTable, const css::uno::Reference<css::drawing::XShape>& xShape);
78  ScMyTableShapes* GetTableShapes() { return pTableShapes.get(); }
79  ScMyDetectiveObjContainer* GetDetectiveObjContainer() { return pDetectiveObjContainer.get(); }
80  void AddNoteObj(const css::uno::Reference<css::drawing::XShape>& xShape, const ScAddress& rPos);
81  void SortNoteShapes();
82  ScMyNoteShapesContainer* GetNoteShapes() { return pNoteShapes.get(); }
83 };
84 
85 #endif
86 
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScMyNoteShapesContainer * GetNoteShapes()
ScMyShapesContainer * GetShapesContainer()
std::vector< sal_Int32 > nLastRows
void AddNewShape(const ScMyShape &aMyShape)
bool HasShapes() const
void SetDrawPageHasForms(const sal_Int32 nTable, bool bHasForms)
css::uno::Reference< css::drawing::XDrawPage > xDrawPage
void AddTableShape(const sal_Int32 nTable, const css::uno::Reference< css::drawing::XShape > &xShape)
bool HasForm(const sal_Int32 nTable, css::uno::Reference< css::drawing::XDrawPage > &xDrawPage)
std::unique_ptr< ScMyDetectiveObjContainer > pDetectiveObjContainer
ScMySharedData(const sal_Int32 nTableCount)
std::vector< sal_Int32 > nLastColumns
void AddDrawPage(const ScMyDrawPage &aDrawPage, const sal_Int32 nTable)
std::unique_ptr< ScMyShapesContainer > pShapesContainer
std::unique_ptr< ScMyTableShapes > pTableShapes
css::uno::Reference< css::drawing::XDrawPage > GetDrawPage(const sal_Int32 nTable)
std::vector< ScMyDrawPage > ScMyDrawPages
sal_Int32 GetLastColumn(const sal_Int32 nTable) const
std::unique_ptr< ScMyDrawPages > pDrawPages
sal_Int32 GetLastRow(const sal_Int32 nTable) const
void SetLastRow(const sal_Int32 nTable, const sal_Int32 nRow)
void SetLastColumn(const sal_Int32 nTable, const sal_Int32 nCol)
std::vector< ScMyTableXShapes > ScMyTableShapes
std::unique_ptr< ScMyNoteShapesContainer > pNoteShapes
void AddNoteObj(const css::uno::Reference< css::drawing::XShape > &xShape, const ScAddress &rPos)
std::list< css::uno::Reference< css::drawing::XShape > > ScMyTableXShapes
ScMyTableShapes * GetTableShapes()
bool HasDrawPage() const
ScMyDetectiveObjContainer * GetDetectiveObjContainer()