summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-06 13:27:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-07 07:56:49 +0100
commit83241dba8fbf2004c48d87cb7221fd354589b28c (patch)
treec7f94b07d2c4cf2a5f49c1372c2970424ac7b2ea /sc/source/ui/docshell/docsh.cxx
parent2e2d736ccbb21daae91603732c87d5375ede1b47 (diff)
loplugin:collapseif in sc
Change-Id: I06bcf6b33af5c6eddb614f1f0ce1b2713876b162 Reviewed-on: https://gerrit.libreoffice.org/62954 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/docshell/docsh.cxx')
-rw-r--r--sc/source/ui/docshell/docsh.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 0a2a3525e11e..6e6589068747 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -225,9 +225,8 @@ std::set<Color> ScDocShell::GetDocColors()
void ScDocShell::DoEnterHandler()
{
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
- if (pViewSh)
- if (pViewSh->GetViewData().GetDocShell() == this)
- SC_MOD()->InputEnterHandler();
+ if (pViewSh && pViewSh->GetViewData().GetDocShell() == this)
+ SC_MOD()->InputEnterHandler();
}
SCTAB ScDocShell::GetSaveTab()
@@ -2938,13 +2937,10 @@ void ScDocShell::SetDrawModified()
SetModified();
SfxBindings* pBindings = GetViewBindings();
- if (bUpdate)
+ if (bUpdate && pBindings)
{
- if (pBindings)
- {
- pBindings->Invalidate( SID_SAVEDOC );
- pBindings->Invalidate( SID_DOC_MODIFIED );
- }
+ pBindings->Invalidate( SID_SAVEDOC );
+ pBindings->Invalidate( SID_DOC_MODIFIED );
}
if (pBindings)