diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-08-18 20:02:05 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-08-20 00:17:49 +0200 |
commit | be5511822416c27647fbdc8cd36a19bd8ccce488 (patch) | |
tree | 8a880c3cce9ba9f17a2a63484cc512a6e3e02f7c | |
parent | 881433b6a08a20e0a1a56d2fbdd72bfb722189ca (diff) |
get the ScDocument directly from the ScViewData
Change-Id: Id4b836bb334a208f83aeffed8ae932f4ce7437ec
Reviewed-on: https://gerrit.libreoffice.org/41338
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin2.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 7 |
3 files changed, 5 insertions, 7 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 23edbf1b28bb..a09477ba2b61 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -4473,8 +4473,7 @@ void ScGridWindow::UpdateFormulas() SCROW nPosY = nY1; - ScDocShell* pDocSh = pViewData->GetDocShell(); - ScDocument& rDoc = pDocSh->GetDocument(); + ScDocument& rDoc = *pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); rDoc.ExtendHidden( nX1, nY1, nX2, nY2, nTab ); diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 4e175365e6a3..5c6daf65c11d 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -600,7 +600,7 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu() bool ScGridWindow::UpdateVisibleRange() { - ScDocument& rDoc = pViewData->GetDocShell()->GetDocument(); + ScDocument& rDoc = *pViewData->GetDocument(); SCCOL nPosX = 0; SCROW nPosY = 0; diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index b7f319135f88..eb5f702c85bf 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -379,8 +379,7 @@ void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::R void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMode eMode ) { - ScDocShell* pDocSh = pViewData->GetDocShell(); - ScDocument& rDoc = pDocSh->GetDocument(); + ScDocument& rDoc = *pViewData->GetDocument(); // let's ignore the normal Draw() attempts when doing the tiled rendering, // all the rendering should go through PaintTile() in that case. @@ -523,8 +522,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI bool bLogicText) { ScModule* pScMod = SC_MOD(); - ScDocShell* pDocSh = pViewData->GetDocShell(); - ScDocument& rDoc = pDocSh->GetDocument(); + ScDocument& rDoc = *pViewData->GetDocument(); const ScViewOptions& rOpts = pViewData->GetOptions(); bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive(); @@ -840,6 +838,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() ); if (pHdl) { + ScDocShell* pDocSh = pViewData->GetDocShell(); ScRangeFindList* pRangeFinder = pHdl->GetRangeFindList(); if ( pRangeFinder && !pRangeFinder->IsHidden() && pRangeFinder->GetDocName() == pDocSh->GetTitle() ) |