diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-27 19:49:02 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-30 09:23:55 +0200 |
commit | 99394c8e09631280f9d76a790832133f5ef7b873 (patch) | |
tree | a0fe4223609d39fbde44afc61afd336ba5dcab9e /svx | |
parent | dc755a3f7581b915f1f278e87af04d164514061d (diff) |
Add SvxTableController::setCursorLogicPosition()
With this, it's possible to drag the start or end handle of an Impress
table selection and let it grow/shrink.
Change-Id: Icdee1207c1c3a6b1c4fb15d00008db6327d6e2de
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/selectioncontroller.cxx | 4 | ||||
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/svx/source/svdraw/selectioncontroller.cxx b/svx/source/svdraw/selectioncontroller.cxx index a2ff8758b009..6d8493436680 100644 --- a/svx/source/svdraw/selectioncontroller.cxx +++ b/svx/source/svdraw/selectioncontroller.cxx @@ -105,6 +105,10 @@ bool SelectionController::hasSelectedCells() const return false; } +void SelectionController::setCursorLogicPosition(const Point& /*rPosition*/, bool /*bPoint*/) +{ +} + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index fdd8481cff2c..e487b06585fc 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -3148,6 +3148,24 @@ bool SvxTableController::isColumnHeader() return aSettings.mbUseFirstColumn; } + +void SvxTableController::setCursorLogicPosition(const Point& rPosition, bool bPoint) +{ + if (mxTableObj->GetObjIdentifier() != OBJ_TABLE) + return; + + SdrTableObj* pTableObj = static_cast<SdrTableObj*>(mxTableObj.get()); + CellPos aCellPos; + if (pTableObj->CheckTableHit(rPosition, aCellPos.mnCol, aCellPos.mnRow, 0) != SDRTABLEHIT_NONE) + { + if (bPoint) + maCursorLastPos = aCellPos; + else + maCursorFirstPos = aCellPos; + mpView->MarkListHasChanged(); + } +} + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |