update dev300-m58
[ooovba.git] / writerfilter / source / dmapper / DomainMapperTableManager.hxx
blobc183252ba0a4232dca8ca861def9a7ea0a917a14
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: DomainMapperTableManager.hxx,v $
10 * $Revision: 1.12 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef INCLUDED_DOMAIN_MAPPER_TABLE_MANAGER_HXX
31 #define INCLUDED_DOMAIN_MAPPER_TABLE_MANAGER_HXX
33 #include <resourcemodel/TableManager.hxx>
34 #include <PropertyMap.hxx>
35 #include <StyleSheetTable.hxx>
36 #include <com/sun/star/text/XTextRange.hpp>
37 #include <vector>
39 namespace writerfilter {
40 namespace dmapper {
41 typedef ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > Handle_t;
42 typedef TableManager<Handle_t , TablePropertyMapPtr > DomainMapperTableManager_Base_t;
43 class DomainMapperTableManager : public DomainMapperTableManager_Base_t
45 sal_uInt32 m_nRow;
46 sal_uInt32 m_nCell;
47 sal_uInt32 m_nCellBorderIndex; //borders are provided for all cells and need counting
48 sal_Int32 m_nHeaderRepeat; //counter of repeated headers - if == -1 then the repeating stops
49 sal_Int32 m_nTableWidth; //might be set directly or has to be calculated from the column positions
50 bool m_bOOXML;
51 ::rtl::OUString m_sTableStyleName;
52 PropertyMapPtr m_pTableStyleTextProperies;
54 ::std::vector<sal_Int32> m_aTableGrid;
55 ::std::vector<sal_Int32> m_aGridSpans;
57 virtual void clearData();
59 public:
61 DomainMapperTableManager(bool bOOXML);
62 virtual ~DomainMapperTableManager();
64 virtual bool sprm(Sprm & rSprm);
66 virtual void endOfCellAction();
67 virtual void endOfRowAction();
69 const ::rtl::OUString& getTableStyleName() const { return m_sTableStyleName; }
70 /// copy the text properties of the table style and its parent into pContext
71 void CopyTextProperties(PropertyMapPtr pContext, StyleSheetTablePtr pStyleSheetTable);
77 #endif // INCLUDED_DOMAIN_MAPPER_TABLE_MANAGER_HXX