summaryrefslogtreecommitdiff
path: root/sc/inc/column.hxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-12-20 11:30:36 +0100
committerEike Rathke <erack@redhat.com>2018-01-23 00:46:19 +0100
commit3a2a430ae8e2c1647c18d8904477949f6e2e7941 (patch)
tree83b6deb61d9aa9fcec2f93aa204b4075f1ef1baa /sc/inc/column.hxx
parent3d30a39ee92678f6a4e71bd450fc044636adedab (diff)
tdf#98931 Consider cell-anchored images when sorting
This makes images/draw objects anchored to cells move as any other content when sorting cells. Works for sorting rows and columns. Also fixes a bug where notes attached to cells were not sorted when sorting columns. Change-Id: Id9a56a15f776d5adbe382a9bca167bff48b69a0c Reviewed-on: https://gerrit.libreoffice.org/46838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/inc/column.hxx')
-rw-r--r--sc/inc/column.hxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index ff65fbc3b3a0..67dbda8dc8dd 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -29,6 +29,7 @@
#include "mtvelements.hxx"
#include <formula/types.hxx>
#include <svl/zforlist.hxx>
+#include <svx/svdobj.hxx>
#include "attarray.hxx"
#include <set>
@@ -226,11 +227,13 @@ public:
// data only:
bool IsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
SCSIZE GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const;
- bool HasDataAt(SCROW nRow) const;
+ bool HasDataAt(SCROW nRow, bool bConsiderCellNotes=false,
+ bool bConsiderCellDrawObjects=false) const;
bool HasVisibleDataAt(SCROW nRow) const;
SCROW GetFirstDataPos() const;
SCROW GetLastDataPos() const;
- SCROW GetLastDataPos( SCROW nLastRow ) const;
+ SCROW GetLastDataPos( SCROW nLastRow, bool bConsiderCellNotes=false,
+ bool bConsiderCellDrawObjects=false ) const;
bool GetPrevDataPos(SCROW& rRow) const;
bool GetNextDataPos(SCROW& rRow) const;
void FindDataAreaPos(SCROW& rRow, bool bDown) const; // (without Broadcaster)
@@ -626,6 +629,10 @@ public:
void UpdateNoteCaptions( SCROW nRow1, SCROW nRow2 );
+ void UpdateDrawObjects( std::vector<std::vector<SdrObject*>>& pObjects, SCROW nRowStart, SCROW nRowEnd );
+ void UpdateDrawObjectsForRow( std::vector<SdrObject*>& pObjects, SCCOL nTargetCol, SCROW nTargetRow );
+ bool IsDrawObjectsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
+
void InterpretDirtyCells( SCROW nRow1, SCROW nRow2 );
static void JoinNewFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell );