Kaydet (Commit) be551182 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

get the ScDocument directly from the ScViewData

Change-Id: Id4b836bb334a208f83aeffed8ae932f4ce7437ec
Reviewed-on: https://gerrit.libreoffice.org/41338Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 881433b6
...@@ -4473,8 +4473,7 @@ void ScGridWindow::UpdateFormulas() ...@@ -4473,8 +4473,7 @@ void ScGridWindow::UpdateFormulas()
SCROW nPosY = nY1; SCROW nPosY = nY1;
ScDocShell* pDocSh = pViewData->GetDocShell(); ScDocument& rDoc = *pViewData->GetDocument();
ScDocument& rDoc = pDocSh->GetDocument();
SCTAB nTab = pViewData->GetTabNo(); SCTAB nTab = pViewData->GetTabNo();
rDoc.ExtendHidden( nX1, nY1, nX2, nY2, nTab ); rDoc.ExtendHidden( nX1, nY1, nX2, nY2, nTab );
......
...@@ -600,7 +600,7 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu() ...@@ -600,7 +600,7 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu()
bool ScGridWindow::UpdateVisibleRange() bool ScGridWindow::UpdateVisibleRange()
{ {
ScDocument& rDoc = pViewData->GetDocShell()->GetDocument(); ScDocument& rDoc = *pViewData->GetDocument();
SCCOL nPosX = 0; SCCOL nPosX = 0;
SCROW nPosY = 0; SCROW nPosY = 0;
......
...@@ -379,8 +379,7 @@ void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::R ...@@ -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 ) void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMode eMode )
{ {
ScDocShell* pDocSh = pViewData->GetDocShell(); ScDocument& rDoc = *pViewData->GetDocument();
ScDocument& rDoc = pDocSh->GetDocument();
// let's ignore the normal Draw() attempts when doing the tiled rendering, // let's ignore the normal Draw() attempts when doing the tiled rendering,
// all the rendering should go through PaintTile() in that case. // all the rendering should go through PaintTile() in that case.
...@@ -523,8 +522,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI ...@@ -523,8 +522,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
bool bLogicText) bool bLogicText)
{ {
ScModule* pScMod = SC_MOD(); ScModule* pScMod = SC_MOD();
ScDocShell* pDocSh = pViewData->GetDocShell(); ScDocument& rDoc = *pViewData->GetDocument();
ScDocument& rDoc = pDocSh->GetDocument();
const ScViewOptions& rOpts = pViewData->GetOptions(); const ScViewOptions& rOpts = pViewData->GetOptions();
bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive(); bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
...@@ -840,6 +838,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI ...@@ -840,6 +838,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() ); ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
if (pHdl) if (pHdl)
{ {
ScDocShell* pDocSh = pViewData->GetDocShell();
ScRangeFindList* pRangeFinder = pHdl->GetRangeFindList(); ScRangeFindList* pRangeFinder = pHdl->GetRangeFindList();
if ( pRangeFinder && !pRangeFinder->IsHidden() && if ( pRangeFinder && !pRangeFinder->IsHidden() &&
pRangeFinder->GetDocName() == pDocSh->GetTitle() ) pRangeFinder->GetDocName() == pDocSh->GetTitle() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment