[Libreoffice-commits] core.git: sc/source

Muhammet Kara (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 12 10:53:49 UTC 2020


 sc/source/ui/inc/viewdata.hxx  |    5 +++++
 sc/source/ui/unoobj/docuno.cxx |    3 +++
 2 files changed, 8 insertions(+)

New commits:
commit 7e199ce239dca603a0bf8aae1ff03b778e8273a0
Author:     Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Wed Feb 12 05:39:07 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Feb 12 11:53:16 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/+/88487
    Reviewed-by: Muhammet Kara <muhammet.kara at collabora.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Jenkins

diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index c691d2816814..e5833dec5d32 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -333,6 +333,7 @@ private:
     bool                bGrowing;
 
     long                m_nLOKPageUpDownOffset;
+    tools::Rectangle    maLOKVisibleArea;///< The visible area in the LibreOfficeKit client.
 
     DECL_DLLPRIVATE_LINK( EditEngineHdl, EditStatus&, void );
 
@@ -554,6 +555,10 @@ public:
     void ForcePageUpDownOffset(long nTwips) { m_nLOKPageUpDownOffset = nTwips; }
     long GetPageUpDownOffset() const { 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 8195d4e8f3ec..475cf5573aea 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -961,6 +961,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)


More information about the Libreoffice-commits mailing list