[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/source

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 29 12:16:06 UTC 2020


 sc/source/ui/unoobj/docuno.cxx |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit a656916acd2feb2c4663e97c536d254c68d69eeb
Author:     Tor Lillqvist <tml at iki.fi>
AuthorDate: Thu Jun 25 16:20:45 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Jun 29 14:15:34 2020 +0200

    Let's not run on hope
    
    Change-Id: If2fb2c55d53321ec2e5beff0ade9974c02811f7f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97120
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97402

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index e3918f38b165..b1e0bcc9d902 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -498,15 +498,14 @@ void ScModelObj::paintTile( VirtualDevice& rDevice,
                             int nTilePosX, int nTilePosY,
                             long nTileWidth, long nTileHeight )
 {
-    // There seems to be no clear way of getting the grid window for this
-    // particular document, hence we need to hope we get the right window.
-    // FIXME: "hope"? Are you kidding me?
-    ScViewData* pViewData = ScDocShell::GetViewData();
+    ScTabViewShell* pViewShell = pDocShell->GetBestViewShell(false);
 
-    // FIXME
-    if (!pViewData)
+    // FIXME: Can this happen? What should we do?
+    if (!pViewShell)
         return;
 
+    ScViewData* pViewData = &pViewShell->GetViewData();
+
     ScGridWindow* pGridWindow = pViewData->GetActiveWin();
 
     // update the size of the area we are painting


More information about the Libreoffice-commits mailing list