Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef SC_XMLEXPORTSHAREDDATA_HXX
30 : : #define SC_XMLEXPORTSHAREDDATA_HXX
31 : :
32 : : #include "global.hxx"
33 : : #include <com/sun/star/drawing/XDrawPage.hpp>
34 : :
35 : : #include <vector>
36 : : #include <list>
37 : :
38 : 20 : struct ScMyDrawPage
39 : : {
40 : : com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage> xDrawPage;
41 : : bool bHasForms;
42 : :
43 : 8 : ScMyDrawPage() : bHasForms(false) {}
44 : : };
45 : :
46 : : typedef std::list< com::sun::star::uno::Reference<com::sun::star::drawing::XShape> > ScMyTableXShapes;
47 : : typedef std::vector<ScMyTableXShapes> ScMyTableShapes;
48 : : typedef std::vector<ScMyDrawPage> ScMyDrawPages;
49 : :
50 : : class ScMyShapesContainer;
51 : : class ScMyDetectiveObjContainer;
52 : : struct ScMyShape;
53 : : class ScMyNoteShapesContainer;
54 : :
55 : : class ScMySharedData
56 : : {
57 : : std::vector<sal_Int32> nLastColumns;
58 : : std::vector<sal_Int32> nLastRows;
59 : : ScMyTableShapes* pTableShapes;
60 : : ScMyDrawPages* pDrawPages;
61 : : ScMyShapesContainer* pShapesContainer;
62 : : ScMyDetectiveObjContainer* pDetectiveObjContainer;
63 : : ScMyNoteShapesContainer* pNoteShapes;
64 : : sal_Int32 nTableCount;
65 : : public:
66 : : ScMySharedData(const sal_Int32 nTableCount);
67 : : ~ScMySharedData();
68 : :
69 : : void SetLastColumn(const sal_Int32 nTable, const sal_Int32 nCol);
70 : : void SetLastRow(const sal_Int32 nTable, const sal_Int32 nRow);
71 : : sal_Int32 GetLastColumn(const sal_Int32 nTable) const;
72 : : sal_Int32 GetLastRow(const sal_Int32 nTable) const;
73 : : void AddDrawPage(const ScMyDrawPage& aDrawPage, const sal_Int32 nTable);
74 : : void SetDrawPageHasForms(const sal_Int32 nTable, bool bHasForms);
75 : : com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage> GetDrawPage(const sal_Int32 nTable);
76 : 8 : bool HasDrawPage() const { return pDrawPages != NULL; }
77 : : bool HasForm(const sal_Int32 nTable, com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage>& xDrawPage);
78 : : void AddNewShape(const ScMyShape& aMyShape);
79 : : void SortShapesContainer();
80 : 8 : ScMyShapesContainer* GetShapesContainer() { return pShapesContainer; }
81 : : bool HasShapes();
82 : : void AddTableShape(const sal_Int32 nTable, const com::sun::star::uno::Reference<com::sun::star::drawing::XShape>& xShape);
83 : 8 : ScMyTableShapes* GetTableShapes() { return pTableShapes; }
84 : 8 : ScMyDetectiveObjContainer* GetDetectiveObjContainer() { return pDetectiveObjContainer; }
85 : : void AddNoteObj(const com::sun::star::uno::Reference<com::sun::star::drawing::XShape>& xShape, const ScAddress& rPos);
86 : : void SortNoteShapes();
87 : 8 : ScMyNoteShapesContainer* GetNoteShapes() { return pNoteShapes; }
88 : : };
89 : :
90 : : #endif
91 : :
92 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|