xref: /AOO41X/main/sc/source/filter/xml/XMLExportSharedData.hxx (revision 38d50f7b14e1cf975d8c6468d9633894cd59b523)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef SC_XMLEXPORTSHAREDDATA_HXX
25 #define SC_XMLEXPORTSHAREDDATA_HXX
26 
27 #include "global.hxx"
28 #include <com/sun/star/drawing/XDrawPage.hpp>
29 
30 #include <vector>
31 #include <list>
32 
33 struct ScMyDrawPage
34 {
35     com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage> xDrawPage;
36     sal_Bool bHasForms;
37 
ScMyDrawPageScMyDrawPage38     ScMyDrawPage() : bHasForms(sal_False) {}
39 };
40 
41 typedef std::list< com::sun::star::uno::Reference<com::sun::star::drawing::XShape> > ScMyTableXShapes;
42 typedef std::vector<ScMyTableXShapes> ScMyTableShapes;
43 typedef std::vector<ScMyDrawPage> ScMyDrawPages;
44 
45 class ScMyShapesContainer;
46 class ScMyDetectiveObjContainer;
47 struct ScMyShape;
48 class ScMyNoteShapesContainer;
49 
50 class ScMySharedData
51 {
52     std::vector<sal_Int32>      nLastColumns;
53     std::vector<sal_Int32>      nLastRows;
54     ScMyTableShapes*            pTableShapes;
55     ScMyDrawPages*              pDrawPages;
56     ScMyShapesContainer*        pShapesContainer;
57     ScMyDetectiveObjContainer*  pDetectiveObjContainer;
58     ScMyNoteShapesContainer*    pNoteShapes;
59     sal_Int32                   nTableCount;
60 public:
61     ScMySharedData(const sal_Int32 nTableCount);
62     ~ScMySharedData();
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);
67     sal_Int32 GetLastRow(const sal_Int32 nTable);
68     void AddDrawPage(const ScMyDrawPage& aDrawPage, const sal_Int32 nTable);
69     void SetDrawPageHasForms(const sal_Int32 nTable, sal_Bool bHasForms);
70     com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage> GetDrawPage(const sal_Int32 nTable);
HasDrawPage()71     sal_Bool HasDrawPage() { return pDrawPages != NULL; }
72     sal_Bool HasForm(const sal_Int32 nTable, com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage>& xDrawPage);
73     void AddNewShape(const ScMyShape& aMyShape);
74     void SortShapesContainer();
GetShapesContainer()75     ScMyShapesContainer* GetShapesContainer() { return pShapesContainer; }
76     sal_Bool HasShapes();
77     void AddTableShape(const sal_Int32 nTable, const com::sun::star::uno::Reference<com::sun::star::drawing::XShape>& xShape);
GetTableShapes()78     ScMyTableShapes* GetTableShapes() { return pTableShapes; }
GetDetectiveObjContainer()79     ScMyDetectiveObjContainer* GetDetectiveObjContainer() { return pDetectiveObjContainer; }
80     void AddNoteObj(const com::sun::star::uno::Reference<com::sun::star::drawing::XShape>& xShape, const ScAddress& rPos);
81     void SortNoteShapes();
GetNoteShapes()82     ScMyNoteShapesContainer* GetNoteShapes() { return pNoteShapes; }
83 };
84 
85 #endif
86 
87