LibreOffice Module reportdesign (master) 1
xmlTable.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#ifndef INCLUDED_REPORTDESIGN_SOURCE_FILTER_XML_XMLTABLE_HXX
20#define INCLUDED_REPORTDESIGN_SOURCE_FILTER_XML_XMLTABLE_HXX
21
22#include <xmloff/xmlictxt.hxx>
23#include <com/sun/star/report/XSection.hpp>
24#include <vector>
25
26namespace rptxml
27{
28 class ORptFilter;
30 {
31 public:
32 struct TCell
33 {
34 sal_Int32 nWidth;
35 sal_Int32 nHeight;
36 sal_Int32 nColSpan;
37 sal_Int32 nRowSpan;
39 ::std::vector< css::uno::Reference< css::report::XReportComponent> > xElements;
41 };
42 private:
43 ::std::vector< ::std::vector<TCell> > m_aGrid;
44 ::std::vector<sal_Int32> m_aHeight;
45 ::std::vector<bool> m_aAutoHeight;
46 ::std::vector<sal_Int32> m_aWidth;
47 css::uno::Reference< css::report::XSection > m_xSection;
48 OUString m_sStyleName;
49 sal_Int32 m_nColSpan;
50 sal_Int32 m_nRowSpan;
51 sal_Int32 m_nRowIndex;
52 sal_Int32 m_nColumnIndex;
54
55 OXMLTable(const OXMLTable&) = delete;
56 void operator =(const OXMLTable&) = delete;
57 public:
58
60 ,const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList
61 ,css::uno::Reference< css::report::XSection > _xSection
62 );
63 virtual ~OXMLTable() override;
64
65 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
66 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
67
68 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
69
70 void addHeight(sal_Int32 _nHeight) { m_aHeight.push_back(_nHeight); }
71 void addAutoHeight(bool _bAutoHeight) { m_aAutoHeight.push_back(_bAutoHeight); }
72 void addWidth(sal_Int32 _nWidth) { m_aWidth.push_back( _nWidth ); }
73
74 void setColumnSpanned(sal_Int32 _nColSpan) { m_nColSpan = _nColSpan; }
75 void setRowSpanned( sal_Int32 _nRowSpan) { m_nRowSpan = _nRowSpan; }
76
77 void incrementRowIndex();
79
80 void addCell(const css::uno::Reference< css::report::XReportComponent>& _xElement);
81
82 const css::uno::Reference< css::report::XSection >& getSection() const { return m_xSection; }
83 };
84
85} // namespace rptxml
86
87
88#endif // INCLUDED_REPORTDESIGN_SOURCE_FILTER_XML_XMLTABLE_HXX
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmlTable.cxx:152
sal_Int32 m_nRowIndex
Definition: xmlTable.hxx:51
::std::vector< sal_Int32 > m_aWidth
Definition: xmlTable.hxx:46
void setRowSpanned(sal_Int32 _nRowSpan)
Definition: xmlTable.hxx:75
void addCell(const css::uno::Reference< css::report::XReportComponent > &_xElement)
Definition: xmlTable.cxx:256
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
void addWidth(sal_Int32 _nWidth)
Definition: xmlTable.hxx:72
void operator=(const OXMLTable &)=delete
::std::vector< ::std::vector< TCell > > m_aGrid
Definition: xmlTable.hxx:43
OXMLTable(const OXMLTable &)=delete
void setColumnSpanned(sal_Int32 _nColSpan)
Definition: xmlTable.hxx:74
::std::vector< bool > m_aAutoHeight
Definition: xmlTable.hxx:45
void addHeight(sal_Int32 _nHeight)
Definition: xmlTable.hxx:70
sal_Int32 m_nColumnIndex
Definition: xmlTable.hxx:52
const css::uno::Reference< css::report::XSection > & getSection() const
Definition: xmlTable.hxx:82
::std::vector< sal_Int32 > m_aHeight
Definition: xmlTable.hxx:44
void incrementRowIndex()
Definition: xmlTable.cxx:280
void addAutoHeight(bool _bAutoHeight)
Definition: xmlTable.hxx:71
void incrementColumnIndex()
Definition: xmlTable.hxx:78
OXMLTable(ORptFilter &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::report::XSection > _xSection)
virtual ~OXMLTable() override
Definition: xmlTable.cxx:111
sal_Int32 m_nColSpan
Definition: xmlTable.hxx:49
OUString m_sStyleName
Definition: xmlTable.hxx:48
sal_Int32 m_nRowSpan
Definition: xmlTable.hxx:50
ORptFilter & GetOwnImport()
Definition: xmlTable.cxx:147
css::uno::Reference< css::report::XSection > m_xSection
Definition: xmlTable.hxx:47
::std::vector< css::uno::Reference< css::report::XReportComponent > > xElements
Definition: xmlTable.hxx:39