86 for (
auto const& elem :
m_aRows)
88 const XFRow *pRow = elem.second.get();
95 if (pSubTable == pTable)
97 if (pSubTable->ContainsTable(pTable))
112 for (sal_Int32
i = 0;
i < rRow->GetCellCount(); ++
i)
114 XFCell* pFirstCell = rRow->GetCell(
i + 1);
117 if (pSubTable ==
this || pSubTable->ContainsTable(
this))
118 throw std::runtime_error(
"table is a subtable of itself");
121 throw std::runtime_error(
"table is a subtable of itself");
125 int row = rRow->GetRow();
128 rRow->SetRow(
m_aRows.size()+1);
130 row = rRow->GetRow();
132 rRow->SetOwnerTable(
this);
157 sal_uInt16 rowMax = 0;
158 for (
auto const& row :
m_aRows)
160 if (row.first > rowMax)
177 if( column.first>colMax )
178 colMax = column.first;
210 sal_Int32
col = column.first;
216 if(
col > lastCol + 2 )
222 pAttrList->
AddAttribute(
"table:number-columns-repeated", OUString::number(
col-lastCol-1) );
228 if( !style.isEmpty() )
242 pStrm->
EndElement(
"table:table-header-rows" );
248 for (
auto const& elem :
m_aRows)
250 int row = elem.first;
251 XFRow *pRow = elem.second.get();
263 pNullRow->
ToXml(pStrm);
Attribute list interface for sax writer.
virtual void Clear()=0
@descr: Clear all the attributes in the attribute list.
virtual void AddAttribute(const OUString &name, const OUString &value)=0
@descr: Add an attribute to the attribute list.
Stream wrapper for sax writer.
virtual IXFAttrList * GetAttrList()=0
@descr return the Attribute list interface.
virtual void StartElement(const OUString &oustr)=0
@descr Wrap XDocumentHandler::startElement()
virtual void EndElement(const OUString &oustr)=0
@descr Wrap XDocumentHandler::endElement()
@descr Table cell object.
const XFTable * GetSubTable() const
OUString GetCellName()
@descr Return cell name.
bool HierarchyContains(const XFContent *pContent) const
const OUString & GetStyleName() const
: return the style name.
virtual void SetStyleName(const OUString &style)
: All content except XFTextContent can have a style.
static OUString GenTableName()
@descr Generate a name for a table.
void SetRepeated(sal_Int32 repeat)
XFCell * GetCell(sal_Int32 col) const
void AddCell(rtl::Reference< XFCell > const &rCell)
sal_Int32 GetCellCount() const
virtual void ToXml(IXFStream *pStrm) override
enumXFContent GetContentType() override
: return the content type.
std::map< sal_Int32, OUString > m_aColumns
OUString m_strDefRowStyle
OUString m_strDefColStyle
bool ContainsTable(const XFTable *pTable) const
void SetColumnStyle(sal_Int32 col, const OUString &style)
XFRow * GetRow(sal_Int32 row)
void AddRow(rtl::Reference< XFRow > const &rRow)
virtual void ToXml(IXFStream *pStrm) override
virtual ~XFTable() override
std::map< sal_uInt16, rtl::Reference< XFRow > > m_aRows
OUString m_strDefCellStyle
rtl::Reference< XFContentContainer > m_aHeaderRows
void AddHeaderRow(XFRow *pRow)
sal_Int32 GetColumnCount()
RttiCompleteObjectLocator col