LibreOffice Module lotuswordpro (master) 1
xfcell.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*************************************************************************
3 *
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
6 *
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
9 *
10 * Sun Microsystems Inc., October, 2000
11 *
12 * GNU Lesser General Public License Version 2.1
13 * =============================================
14 * Copyright 2000 by Sun Microsystems, Inc.
15 * 901 San Antonio Road, Palo Alto, CA 94303, USA
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License version 2.1, as published by the Free Software Foundation.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 * MA 02111-1307 USA
30 *
31 *
32 * Sun Industry Standards Source License Version 1.1
33 * =================================================
34 * The contents of this file are subject to the Sun Industry Standards
35 * Source License Version 1.1 (the "License"); You may not use this file
36 * except in compliance with the License. You may obtain a copy of the
37 * License at http://www.openoffice.org/license.html.
38 *
39 * Software provided under this License is provided on an "AS IS" basis,
40 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
41 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
42 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
43 * See the License for the specific provisions governing your rights and
44 * obligations concerning the Software.
45 *
46 * The Initial Developer of the Original Code is: IBM Corporation
47 *
48 * Copyright: 2008 by IBM Corporation
49 *
50 * All Rights Reserved.
51 *
52 * Contributor(s): _______________________________________
53 *
54 *
55 ************************************************************************/
56/*************************************************************************
57 * @file
58 * Table cell.
59 ************************************************************************/
60
61#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCELL_HXX
62#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCELL_HXX
63
64#include <xfilter/xfcontent.hxx>
67
68class XFTable;
69class XFRow;
70
75 , public SfxBroadcaster
76{
77public:
78 XFCell();
79
80 virtual ~XFCell() override;
81
82public:
84
88 void Add(XFContent *pContent) override;
89
93 void SetColumnSpaned(sal_Int32 num);
94
98 void SetRepeated(sal_Int32 num);
99
103 void SetValue(double value);
104
108 void SetValue(const OUString& value);
109
113 void SetFormula(const OUString& formula);
114
118 void SetProtect(bool protect);
119
123 void SetCol(sal_Int32 col);
124
128 void SetOwnerRow(XFRow *pRow);
129
133 OUString GetCellName();
134
138 sal_Int32 GetColSpaned() const;
139
143 virtual void ToXml(IXFStream *pStrm) override;
144
145 const XFTable* GetSubTable() const { return m_pSubTable.get(); }
146
147private:
151 sal_Int32 m_nCol;
152 sal_Int32 m_nColSpaned;
153 sal_Int32 m_nRepeated;
155 OUString m_strValue;
156 OUString m_strFormula;
158};
159
160inline void XFCell::SetColumnSpaned(sal_Int32 num)
161{
162 m_nColSpaned = num;
163}
164
165inline void XFCell::SetRepeated(sal_Int32 repeated)
166{
167 m_nRepeated = repeated;
168}
169
170inline void XFCell::SetFormula(const OUString& formula)
171{
173}
174
175inline void XFCell::SetProtect(bool protect/* =sal_True */)
176{
177 m_bProtect = protect;
178}
179
180inline void XFCell::SetCol(sal_Int32 col)
181{
182 m_nCol = col;
183}
184
185inline void XFCell::SetOwnerRow(XFRow *pRow)
186{
187 m_pOwnerRow = pRow;
188}
189
190inline sal_Int32 XFCell::GetColSpaned() const
191{
192 return m_nColSpaned;
193}
194
195#endif
196/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Stream wrapper for sax writer.
Definition: ixfstream.hxx:72
@descr Table cell object.
Definition: xfcell.hxx:76
void Add(XFContent *pContent) override
@descr Add content for table cell.
Definition: xfcell.cxx:83
rtl::Reference< XFTable > m_pSubTable
Definition: xfcell.hxx:150
bool m_bProtect
Definition: xfcell.hxx:157
const XFTable * GetSubTable() const
Definition: xfcell.hxx:145
OUString m_strValue
Definition: xfcell.hxx:155
virtual ~XFCell() override
Definition: xfcell.cxx:79
sal_Int32 m_nRepeated
Definition: xfcell.hxx:153
void SetCol(sal_Int32 col)
@descr Set cell column id.
Definition: xfcell.hxx:180
void SetOwnerRow(XFRow *pRow)
@descr Set cell owner row.
Definition: xfcell.hxx:185
enumXFValueType m_eValueType
Definition: xfcell.hxx:154
sal_Int32 m_nColSpaned
Definition: xfcell.hxx:152
void SetProtect(bool protect)
@descr Set cell protected.
Definition: xfcell.hxx:175
void SetValue(double value)
@descr Set cell number value.
Definition: xfcell.cxx:125
virtual void ToXml(IXFStream *pStrm) override
@descr Output cell as xml element.
Definition: xfcell.cxx:160
XFRow * m_pOwnerRow
Definition: xfcell.hxx:148
sal_Int32 GetColSpaned() const
@descr return cell column span property.
Definition: xfcell.hxx:190
XFCell()
Definition: xfcell.cxx:70
void SetColumnSpaned(sal_Int32 num)
@descr If cell spans more the one column, then set column span.
Definition: xfcell.hxx:160
void SetFormula(const OUString &formula)
@descr Set cell formula.
Definition: xfcell.hxx:170
sal_Int32 m_nCol
Definition: xfcell.hxx:151
OUString m_strFormula
Definition: xfcell.hxx:156
void SetRepeated(sal_Int32 num)
@descr Set whether the following cells use the same style and content.
Definition: xfcell.hxx:165
OUString GetCellName()
@descr Return cell name.
Definition: xfcell.cxx:136
A container for content.
virtual void Add(XFContent *pContent)
@descr Add content.
@descr Base class for all content object.
Definition: xfcontent.hxx:80
Definition: xfrow.hxx:69
Any value
RttiCompleteObjectLocator col
enumXFValueType
Definition: xfdefs.hxx:405