11#include <document.hxx>
29 switch (mdds::mtv::get_block_type(*block))
44 switch (mdds::mtv::get_block_type(*block))
75 TablesType::iterator itTab =
maTables.find(nTab);
78 std::pair<TablesType::iterator,bool> r =
89 ColumnsType::iterator it = rCols.find(nCol);
90 if (it != rCols.end())
94 std::pair<ColumnsType::iterator,bool> r =
117 typedef std::unordered_map<SCCOL, ColumnBlockPosition>
ColumnsType;
126 mpImpl(
std::make_unique<
Impl>())
132 std::ostringstream os;
133 os <<
"Passed table index " << nTab <<
" is invalid.";
134 throw std::invalid_argument(os.str());
139 mpImpl(std::move(rOther.mpImpl)) {}
147 ColumnsType::iterator it =
mpImpl->maColumns.find(nCol);
149 if (it !=
mpImpl->maColumns.end())
153 std::pair<ColumnsType::iterator,bool> r =
162 if (!
mpImpl->mpTab->InitColumnBlockPosition(it->second, nCol))
170 mpImpl->maColumns.clear();
179 return ScRefCellValue(sc::numeric_block::get_value(*itPos->data, nOffset));
182 return ScRefCellValue(&sc::string_block::at(*itPos->data, nOffset));
185 return ScRefCellValue(sc::edittext_block::get_value(*itPos->data, nOffset));
188 return ScRefCellValue(sc::formula_block::get_value(*itPos->data, nOffset));
SC_DLLPUBLIC ScTable * FetchTable(SCTAB nTab)
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
const ScColumn * getColumn() const
void element_block_released(const mdds::mtv::base_element_block *block)
void swap(CellStoreEvent &other)
void stop()
Stop processing events.
void element_block_acquired(const mdds::mtv::base_element_block *block)
ColumnBlockPosition * getBlockPosition(SCTAB nTab, SCCOL nCol)
std::unordered_map< SCCOL, ColumnBlockPosition > ColumnsType
ColumnBlockPositionSet(ScDocument &rDoc)
Set of column block positions only for one table.
ColumnBlockPosition * getBlockPosition(SCCOL nCol)
~TableColumnBlockPositionSet()
std::unique_ptr< Impl > mpImpl
TableColumnBlockPositionSet(ScDocument &rDoc, SCTAB nTab)
CAUTION! The following defines must be in the same namespace as the respective type.
const mdds::mtv::element_t element_type_edittext
const mdds::mtv::element_t element_type_formula
ScRefCellValue toRefCell(const sc::CellStoreType::const_iterator &itPos, size_t nOffset)
const mdds::mtv::element_t element_type_numeric
Mapped standard element types (for convenience).
const mdds::mtv::element_t element_type_string
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Store position data for column array storage.
std::unordered_map< SCCOL, ColumnBlockPosition > ColumnsType