11#ifndef OPENXLSX_XLROW_HPP
12#define OPENXLSX_XLROW_HPP
16# pragma warning(disable : 4251)
17# pragma warning(disable : 4275)
21#include "OpenXLSX-Exports.hpp"
98 explicit operator bool()
const;
203 {
return static_cast<T
>(
values()); }
224 XLRowDataRange cells(uint16_t firstCell, uint16_t lastCell)
const;
231 XLCell findCell(uint16_t columNumber);
254 static bool isEqual(
const XLRow& lhs,
const XLRow& rhs);
262 static bool isLessThan(
const XLRow& lhs,
const XLRow& rhs);
265 std::unique_ptr<XMLNode> m_rowNode;
323 static constexpr const bool XLCreateIfMissing =
true;
324 static constexpr const bool XLDoNotCreateIfMissing =
false;
329 void updateCurrentRow(
bool createIfMissing);
374 explicit operator bool()
const;
392 uint32_t
rowNumber()
const {
return m_endReached ? m_lastRow + 1 : m_currentRowNumber; }
395 std::unique_ptr<XMLNode> m_dataNode;
396 uint32_t m_firstRow{1};
397 uint32_t m_lastRow{1};
404 uint32_t m_hintRowNumber;
405 static constexpr const int XLNotLoaded = 0;
406 static constexpr const int XLNoSuchRow = 1;
407 static constexpr const int XLLoaded = 2;
408 int m_currentRowStatus;
409 uint32_t m_currentRowNumber;
487 std::unique_ptr<XMLNode> m_dataNode;
An implementation class encapsulating the properties and behaviours of a spreadsheet cell.
Definition XLCell.hpp:51
The XLRowDataProxy is used as a proxy object when getting or setting row data. The class facilitates ...
Definition XLRowData.hpp:241
This class encapsulates the concept of a contiguous range of cells in a row.
Definition XLRowData.hpp:141
std::forward_iterator_tag iterator_category
Definition XLRow.hpp:277
reference operator*()
Definition XLRow.cpp:454
XLRow & reference
Definition XLRow.hpp:281
XLRowIterator & operator=(XLRowIterator &&other) noexcept
pointer operator->()
Definition XLRow.cpp:460
XLRow value_type
Definition XLRow.hpp:278
XLRow * pointer
Definition XLRow.hpp:280
XLRowIterator & operator++()
Definition XLRow.cpp:433
bool rowExists()
determine whether the row that the iterator points to exists (m_currentRowNumber)
Definition XLRow.cpp:486
uint32_t rowNumber() const
get the row number corresponding to the current iterator position
Definition XLRow.hpp:392
XLRowIterator & operator=(const XLRowIterator &other)
Definition XLRow.cpp:361
XLRowIterator(XLRowIterator &&other) noexcept
bool operator!=(const XLRowIterator &rhs) const
Definition XLRow.cpp:482
bool endReached() const
determine whether iterator is at 1 beyond the last row in range
Definition XLRow.hpp:386
XLRowIterator(const XLRowRange &rowRange, XLIteratorLocation loc)
Definition XLRow.cpp:325
bool operator==(const XLRowIterator &rhs) const
Definition XLRow.cpp:466
int64_t difference_type
Definition XLRow.hpp:279
XLRowRange & operator=(XLRowRange &&other) noexcept
XLRowRange & operator=(const XLRowRange &other)
Definition XLRow.cpp:515
XLRowIterator end()
Definition XLRow.cpp:531
uint32_t rowCount() const
Definition XLRow.cpp:527
XLRowIterator begin()
Definition XLRow.cpp:529
friend class XLRowIterator
Definition XLRow.hpp:417
XLRowRange(XLRowRange &&other) noexcept
XLRowRange(const XMLNode &dataNode, uint32_t first, uint32_t last, const XLSharedStrings &sharedStrings)
Definition XLRow.cpp:497
The XLRow class represent a row in an Excel spreadsheet. Using XLRow objects, various row formatting ...
Definition XLRow.hpp:34
void setHeight(float height)
Set the height of the row.
Definition XLRow.cpp:99
uint8_t outlineLevel() const
Get the outline level of the row.
Definition XLRow.cpp:145
XLRow & operator=(const XLRow &other)
Copy assignment operator.
Definition XLRow.cpp:59
float descent() const
Get the descent of the row, which is the vertical distance in pixels from the bottom of the cells in ...
Definition XLRow.cpp:109
void setCollapsed(bool state)
Set the row to be collapsed or expanded.
Definition XLRow.cpp:186
friend bool operator>=(const XLRow &lhs, const XLRow &rhs)
Definition XLRow.hpp:543
double height() const
Get the height of the row.
Definition XLRow.cpp:90
XLRowDataProxy & values()
Definition XLRow.cpp:215
friend bool operator<(const XLRow &lhs, const XLRow &rhs)
Definition XLRow.hpp:519
T values() const
Definition XLRow.hpp:202
friend class XLRowIterator
Definition XLRow.hpp:35
uint16_t cellCount() const
Get the number of cells in the row.
Definition XLRow.cpp:207
friend bool operator<=(const XLRow &lhs, const XLRow &rhs)
Definition XLRow.hpp:535
bool isCollapsed() const
Is the row collapsed?
Definition XLRow.cpp:180
bool empty() const
test if row object has no (valid) content
Definition XLRow.cpp:83
void setDescent(float descent)
Set the descent of the row, which is he vertical distance in pixels from the bottom of the cells in t...
Definition XLRow.cpp:118
XLRowProperties properties() const
Get row properties as a value-semantic POD struct.
Definition XLRow.cpp:164
friend bool operator!=(const XLRow &lhs, const XLRow &rhs)
Definition XLRow.hpp:511
XLRow()
Default constructor.
Definition XLRow.cpp:26
void setHidden(bool state)
Set the row to be hidden or visible.
Definition XLRow.cpp:133
void setProperties(const XLRowProperties &props)
Set row properties from a value-semantic POD struct in a single pass.
Definition XLRow.cpp:170
friend bool operator>(const XLRow &lhs, const XLRow &rhs)
Definition XLRow.hpp:527
void setOutlineLevel(uint8_t level)
Set the outline level of the row.
Definition XLRow.cpp:154
friend bool operator==(const XLRow &lhs, const XLRow &rhs)
Definition XLRow.hpp:503
uint32_t rowNumber() const
Definition XLRow.cpp:202
friend class XLRowDataProxy
Definition XLRow.hpp:36
bool isHidden() const
Is the row hidden?
Definition XLRow.cpp:127
This class encapsulate the Excel concept of Shared Strings. In Excel, instead of havig individual str...
Definition XLSharedStrings.hpp:78
A class encapsulating an Excel worksheet. Access to XLWorksheet objects should be via the workbook ob...
Definition XLWorksheet.hpp:132
Definition IXLCellProvider.hpp:24
XLIteratorLocation
Definition XLIterator.hpp:17
bool operator==(const XLCell &lhs, const XLCell &rhs)
Definition XLCell.hpp:314
bool operator!=(const XLCell &lhs, const XLCell &rhs)
Definition XLCell.hpp:321
bool operator<=(const XLCellReference &lhs, const XLCellReference &rhs) noexcept
Asserts whether a cell sequentially precedes or occupies the exact same coordinate as another.
Definition XLCellReference.hpp:254
bool operator<(const XLCellReference &lhs, const XLCellReference &rhs) noexcept
Evaluates precedence primarily by row, then by column, allowing cell ranges to be sorted efficiently ...
Definition XLCellReference.hpp:243
OpenXLSX_xml_node XMLNode
Definition XLXmlParser.hpp:64
size_t XLStyleIndex
Definition XLStyles_Common.hpp:36
bool operator>=(const XLCellReference &lhs, const XLCellReference &rhs) noexcept
Asserts whether a cell sequentially follows or occupies the exact same coordinate as another.
Definition XLCellReference.hpp:259
bool operator>(const XLCellReference &lhs, const XLCellReference &rhs) noexcept
Inverts the less-than operator logic to verify strict left-to-right, top-to-bottom traversal dominanc...
Definition XLCellReference.hpp:249
std::reference_wrapper< const XLSharedStrings > XLSharedStringsRef
Definition XLSharedStrings.hpp:67
Plain POD properties describing an OOXML Row (<row> element).
Definition XLXmlSchema.hpp:168