LibreOffice Module oox (master)  1
tablecell.hxx
Go to the documentation of this file.
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 
24 #include <drawingml/textfont.hxx>
25 #include <com/sun/star/table/XCell.hpp>
26 
29 
30 namespace oox::drawingml::table {
31 
32 class TableCellContext;
33 class TableProperties;
34 class TableStyle;
35 
36 class TableCell
37 {
38  friend class TableCellContext;
39 
40 public:
41 
42  TableCell();
43 
44  sal_Int32 getRowSpan() const { return mnRowSpan; };
45  void setRowSpan( sal_Int32 nRowSpan ){ mnRowSpan = nRowSpan; };
46  sal_Int32 getGridSpan() const { return mnGridSpan; };
47  void setGridSpan( sal_Int32 nGridSpan ){ mnGridSpan = nGridSpan; };
48  bool gethMerge() const { return mbhMerge; };
49  void sethMerge( bool bhMerge ){ mbhMerge = bhMerge; };
50  bool getvMerge() const { return mbvMerge; };
51  void setvMerge( bool bvMerge ){ mbvMerge = bvMerge; };
52  sal_Int32 getLeftMargin() const { return mnMarL; };
53  void setLeftMargin( sal_Int32 nMargin ){ mnMarL = nMargin; };
54  sal_Int32 getRightMargin() const { return mnMarR; };
55  void setRightMargin( sal_Int32 nMargin ){ mnMarR = nMargin; };
56  sal_Int32 getTopMargin() const { return mnMarT; };
57  void setTopMargin( sal_Int32 nMargin ){ mnMarT = nMargin; };
58  sal_Int32 getBottomMargin() const { return mnMarB; };
59  void setBottomMargin( sal_Int32 nMargin ){ mnMarB = nMargin; };
60  sal_Int32 getVertToken() const { return mnVertToken; };
61  void setVertToken( sal_Int32 nToken ){ mnVertToken = nToken; };
62  sal_Int32 getAnchorToken() const { return mnAnchorToken; };
63  void setAnchorToken( sal_Int32 nToken ){ mnAnchorToken = nToken; };
64  void setAnchorCtr( bool bAnchorCtr ){ mbAnchorCtr = bAnchorCtr; };
65  void setHorzOverflowToken( sal_Int32 nToken ){ mnHorzOverflowToken = nToken; };
66 
67  void setTextBody( const oox::drawingml::TextBodyPtr& pTextBody ){ mpTextBody = pTextBody; };
69 
70  void pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase,
71  const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle,
72  const css::uno::Reference < css::table::XCell >& rxCell,
73  const TableProperties& rTableProperties,
74  const TableStyle& rTable,
75  sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow );
76 
77 private:
78 
80 
87 
89 
90  sal_Int32 mnRowSpan;
91  sal_Int32 mnGridSpan;
92  bool mbhMerge;
93  bool mbvMerge;
94 
95  sal_Int32 mnMarL;
96  sal_Int32 mnMarR;
97  sal_Int32 mnMarT;
98  sal_Int32 mnMarB;
99  sal_Int32 mnVertToken;
100  sal_Int32 mnAnchorToken;
103 };
104 
105 }
106 
107 #endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX
108 
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 getRowSpan() const
Definition: tablecell.hxx:44
void setHorzOverflowToken(sal_Int32 nToken)
Definition: tablecell.hxx:65
oox::drawingml::LineProperties maLinePropertiesTopLeftToBottomRight
Definition: tablecell.hxx:85
sal_Int32 getAnchorToken() const
Definition: tablecell.hxx:62
oox::drawingml::LineProperties maLinePropertiesTop
Definition: tablecell.hxx:83
oox::drawingml::LineProperties maLinePropertiesBottomLeftToTopRight
Definition: tablecell.hxx:86
oox::drawingml::TextBodyPtr mpTextBody
Definition: tablecell.hxx:79
sal_Int32 getTopMargin() const
Definition: tablecell.hxx:56
void setBottomMargin(sal_Int32 nMargin)
Definition: tablecell.hxx:59
void setTextBody(const oox::drawingml::TextBodyPtr &pTextBody)
Definition: tablecell.hxx:67
oox::drawingml::LineProperties maLinePropertiesRight
Definition: tablecell.hxx:82
void setRowSpan(sal_Int32 nRowSpan)
Definition: tablecell.hxx:45
oox::drawingml::LineProperties maLinePropertiesBottom
Definition: tablecell.hxx:84
sal_Int32 getVertToken() const
Definition: tablecell.hxx:60
void setRightMargin(sal_Int32 nMargin)
Definition: tablecell.hxx:55
void sethMerge(bool bhMerge)
Definition: tablecell.hxx:49
sal_Int32 getLeftMargin() const
Definition: tablecell.hxx:52
void setLeftMargin(sal_Int32 nMargin)
Definition: tablecell.hxx:53
std::shared_ptr< TextBody > TextBodyPtr
oox::drawingml::LineProperties maLinePropertiesLeft
Definition: tablecell.hxx:81
sal_Int32 getBottomMargin() const
Definition: tablecell.hxx:58
void setVertToken(sal_Int32 nToken)
Definition: tablecell.hxx:61
std::shared_ptr< TextListStyle > TextListStylePtr
const oox::drawingml::TextBodyPtr & getTextBody() const
Definition: tablecell.hxx:68
void setAnchorCtr(bool bAnchorCtr)
Definition: tablecell.hxx:64
void setGridSpan(sal_Int32 nGridSpan)
Definition: tablecell.hxx:47
sal_Int32 getRightMargin() const
Definition: tablecell.hxx:54
sal_Int32 getGridSpan() const
Definition: tablecell.hxx:46
oox::drawingml::FillProperties maFillProperties
Definition: tablecell.hxx:88
void setvMerge(bool bvMerge)
Definition: tablecell.hxx:51
void setTopMargin(sal_Int32 nMargin)
Definition: tablecell.hxx:57
void pushToXCell(const ::oox::core::XmlFilterBase &rFilterBase, const ::oox::drawingml::TextListStylePtr &pMasterTextListStyle, const css::uno::Reference< css::table::XCell > &rxCell, const TableProperties &rTableProperties, const TableStyle &rTable, sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow)
Definition: tablecell.cxx:215
void setAnchorToken(sal_Int32 nToken)
Definition: tablecell.hxx:63