sc/source/ui/inc/viewdata.hxx | 5 +++++ sc/source/ui/unoobj/docuno.cxx | 3 +++ 2 files changed, 8 insertions(+)
New commits: commit 539505e5af68297813a3a00f5f42715bde3eae5e Author: Muhammet Kara <muhammet.k...@collabora.com> AuthorDate: Wed Feb 12 05:39:07 2020 +0300 Commit: Muhammet Kara <muhammet.k...@collabora.com> CommitDate: Wed Feb 12 09:12:27 2020 +0100 Store and retrieve client visible area on ScViewData So that core will be aware of the visible area on the client side, and act accordingly when needed. Change-Id: Ieca9b23deb36f3e713704304672dd7037154e904 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88506 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Muhammet Kara <muhammet.k...@collabora.com> diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 14ec8584b86f..bf7350c46ae5 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -331,6 +331,7 @@ private: bool bGrowing; long m_nLOKPageUpDownOffset; + tools::Rectangle maLOKVisibleArea;///< The visible area in the LibreOfficeKit client. DECL_DLLPRIVATE_LINK( EditEngineHdl, EditStatus&, void ); @@ -551,6 +552,10 @@ public: void ForcePageUpDownOffset(long nTwips) { m_nLOKPageUpDownOffset = nTwips; } long GetPageUpDownOffset() { return m_nLOKPageUpDownOffset; } + /// The visible area in the client (set by setClientVisibleArea). + const tools::Rectangle getLOKVisibleArea() const { return maLOKVisibleArea; } + void setLOKVisibleArea(const tools::Rectangle& rArea) { maLOKVisibleArea = rArea; } + void KillEditView(); void ResetEditView(); void SetEditEngine( ScSplitPos eWhich, diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index abee12a7def1..89fa194c4770 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -966,6 +966,9 @@ void ScModelObj::setClientVisibleArea(const tools::Rectangle& rRectangle) // set the PgUp/PgDown offset pViewData->ForcePageUpDownOffset(rRectangle.GetHeight()); + + // Store the visible area so that we can use at places like shape insertion + pViewData->setLOKVisibleArea(rRectangle); } void ScModelObj::setOutlineState(bool bColumn, int nLevel, int nIndex, bool bHidden) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits