Line data Source code
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_OOX_DRAWINGML_TABLE_TABLECELL_HXX
21 : #define INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX
22 :
23 : #include <oox/helper/propertymap.hxx>
24 : #include <oox/drawingml/color.hxx>
25 : #include <oox/drawingml/drawingmltypes.hxx>
26 : #include <oox/drawingml/lineproperties.hxx>
27 : #include <oox/drawingml/fillproperties.hxx>
28 : #include <drawingml/textliststyle.hxx>
29 : #include <com/sun/star/table/XCell.hpp>
30 :
31 : #include <boost/shared_ptr.hpp>
32 : #include <boost/optional.hpp>
33 : #include <vector>
34 : #include <map>
35 :
36 : namespace oox { namespace drawingml { namespace table {
37 :
38 : class TableCellContext;
39 : class TableProperties;
40 : class TableStyle;
41 :
42 119 : class TableCell
43 : {
44 : friend class TableCellContext;
45 :
46 : public:
47 :
48 : TableCell();
49 : ~TableCell();
50 :
51 77 : sal_Int32 getRowSpan() const { return mnRowSpan; };
52 0 : void setRowSpan( sal_Int32 nRowSpan ){ mnRowSpan = nRowSpan; };
53 77 : sal_Int32 getGridSpan() const { return mnGridSpan; };
54 0 : void setGridSpan( sal_Int32 nGridSpan ){ mnGridSpan = nGridSpan; };
55 77 : bool gethMerge() const { return mbhMerge; };
56 77 : void sethMerge( bool bhMerge ){ mbhMerge = bhMerge; };
57 77 : bool getvMerge() const { return mbvMerge; };
58 77 : void setvMerge( bool bvMerge ){ mbvMerge = bvMerge; };
59 77 : sal_Int32 getLeftMargin() const { return mnMarL; };
60 77 : void setLeftMargin( sal_Int32 nMargin ){ mnMarL = nMargin; };
61 77 : sal_Int32 getRightMargin() const { return mnMarR; };
62 77 : void setRightMargin( sal_Int32 nMargin ){ mnMarR = nMargin; };
63 77 : sal_Int32 getTopMargin() const { return mnMarT; };
64 77 : void setTopMargin( sal_Int32 nMargin ){ mnMarT = nMargin; };
65 77 : sal_Int32 getBottomMargin() const { return mnMarB; };
66 77 : void setBottomMargin( sal_Int32 nMargin ){ mnMarB = nMargin; };
67 77 : sal_Int32 getVertToken() const { return mnVertToken; };
68 77 : void setVertToken( sal_Int32 nToken ){ mnVertToken = nToken; };
69 77 : sal_Int32 getAnchorToken() const { return mnAnchorToken; };
70 77 : void setAnchorToken( sal_Int32 nToken ){ mnAnchorToken = nToken; };
71 : bool getAnchorCtr() const { return mbAnchorCtr; };
72 77 : void setAnchorCtr( bool bAnchorCtr ){ mbAnchorCtr = bAnchorCtr; };
73 : sal_Int32 getHorzOverflowToken() const { return mnHorzOverflowToken; };
74 77 : void setHorzOverflowToken( sal_Int32 nToken ){ mnHorzOverflowToken = nToken; };
75 :
76 73 : void setTextBody( const oox::drawingml::TextBodyPtr& pTextBody ){ mpTextBody = pTextBody; };
77 77 : oox::drawingml::TextBodyPtr getTextBody(){ return mpTextBody; };
78 :
79 : void pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, ::oox::drawingml::TextListStylePtr pMasterTextListStyle,
80 : const ::com::sun::star::uno::Reference < ::com::sun::star::table::XCell >& rxCell, const TableProperties& rTableProperties,
81 : const TableStyle& rTable, sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow );
82 :
83 : private:
84 :
85 : oox::drawingml::TextBodyPtr mpTextBody;
86 :
87 : oox::drawingml::LineProperties maLinePropertiesLeft;
88 : oox::drawingml::LineProperties maLinePropertiesRight;
89 : oox::drawingml::LineProperties maLinePropertiesTop;
90 : oox::drawingml::LineProperties maLinePropertiesBottom;
91 : oox::drawingml::LineProperties maLinePropertiesTopLeftToBottomRight;
92 : oox::drawingml::LineProperties maLinePropertiesBottomLeftToTopRight;
93 :
94 : oox::drawingml::FillProperties maFillProperties;
95 :
96 : sal_Int32 mnRowSpan;
97 : sal_Int32 mnGridSpan;
98 : bool mbhMerge;
99 : bool mbvMerge;
100 :
101 : sal_Int32 mnMarL;
102 : sal_Int32 mnMarR;
103 : sal_Int32 mnMarT;
104 : sal_Int32 mnMarB;
105 : sal_Int32 mnVertToken;
106 : sal_Int32 mnAnchorToken;
107 : bool mbAnchorCtr;
108 : sal_Int32 mnHorzOverflowToken;
109 : };
110 :
111 : } } }
112 :
113 : #endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX
114 :
115 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|