summaryrefslogtreecommitdiff
path: root/sc/inc/table.hxx
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2020-05-05 01:55:37 +0530
committerDennis Francis <dennis.francis@collabora.com>2020-06-22 19:08:25 +0200
commit9faf7b5e7abe39c287f28f83fd14a364e959c881 (patch)
tree5e9795d64c36d5900d10511e271e220c33a2eb81 /sc/inc/table.hxx
parent8cd6f7ae48f5795778de512b2867a8ed3374ef12 (diff)
Introduce ITiledRenderable::getSheetGeometryData()
ITiledRenderable::getSheetGeometryData(bool bColumns, bool bRows, bool bSizes, bool bHidden, bool bFiltered, bool bGroups) and implement it for the Calc derivation (ScModelObj). The aim is to use it actively in LOOL instead of the interface: ITiledRenderable::getRowColumnHeaders(const tools::Rectangle& /*rRectangle*/) This is used by the LOOL to fetch the sheet geometry data for just the current view-area in the clients, so LOOL queries this everytime some client's view-area changes. Like the existing interface, the new one will provide all 'kinds' of sheet geometry info [col/row sizes(twips), hidden/filtered and grouping]. But the difference is, it generates data for the whole sheet (not view-area specific). So the method need not be queried every time the view area changes in the LOOL clients, and more importantly it enables the clients to locate any cell at any zoom level without any further help from the core. This means core needn't send various client(zoom) specific positioning messages in pixel aligned twips. It just can send all positioning messages in print twips uniformly to all clients. Change-Id: Ib6aee9a0c92746b1576ed244e98cb54b572778c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96892 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'sc/inc/table.hxx')
-rw-r--r--sc/inc/table.hxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index a7d051663e2a..30c4b174b2ff 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -1078,6 +1078,15 @@ public:
SCCOL ClampToAllocatedColumns(SCCOL nCol) const { return std::min(nCol, static_cast<SCCOL>(aCol.size() - 1)); }
SCCOL GetAllocatedColumnsCount() const { return aCol.size(); }
+ /**
+ * Serializes the sheet's geometry data.
+ *
+ * @param bColumns - if true it dumps the data for columns, else it does for rows.
+ * @param eGeomType indicates the type of data to be dumped for rows/columns.
+ * @return the serialization of the sheet's geometry data as an OString.
+ */
+ OString dumpSheetGeomData(bool bColumns, SheetGeomType eGeomType);
+
private:
void FillFormulaVertical(
@@ -1237,6 +1246,13 @@ private:
void EndListeningGroup( sc::EndListeningContext& rCxt, const SCCOL nCol, SCROW nRow );
void SetNeedsListeningGroup( SCCOL nCol, SCROW nRow );
+ /// Returns list-of-spans representation of the column-widths/row-heights in twips encoded as an OString.
+ OString dumpColumnRowSizes(bool bColumns);
+ /// Returns list-of-spans representation of hidden/filtered states of columns/rows encoded as an OString.
+ OString dumpHiddenFiltered(bool bColumns, bool bHidden);
+ /// Returns list-of-spans representation of the column/row groupings encoded as an OString.
+ OString dumpColumnRowGroups(bool bColumns) const;
+
/**
* Use this to iterate through non-empty visible cells in a single column.
*/