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