summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-14 13:58:14 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-14 14:14:36 +0200
commit0869895063bd528893707cb74c6cf4c461fef066 (patch)
treebf47ccc71145f3ee387a5dafbaab9bc86b47a008 /sc
parent4acae16f9252ada89fd530f1ca86edafc046bc07 (diff)
tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie4bc74a734a6d5a73838a27e0d80cc8e51595839 Reviewed-on: https://gerrit.libreoffice.org/70730 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/scmod.cxx3
-rw-r--r--sc/source/ui/vba/vbarange.cxx1
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx1
3 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 09c7bbd63027..381c27501d07 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1050,7 +1050,8 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
aNewViewOpt.SetGridOptions( aNewGridOpt );
rViewData.SetOptions( aNewViewOpt );
rViewData.GetDocument()->SetViewOptions( aNewViewOpt );
- pDocSh->SetDocumentModified();
+ if (pDocSh)
+ pDocSh->SetDocumentModified();
bRepaint = true;
}
}
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index f1500352d4fd..747dbf4b24cd 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1777,6 +1777,7 @@ ScVbaRange::HasFormula()
{
uno::Reference<uno::XInterface> xRanges( pThisRanges->queryFormulaCells( sheet::FormulaResult::ERROR | sheet::FormulaResult::VALUE | sheet::FormulaResult::STRING ), uno::UNO_QUERY_THROW );
ScCellRangesBase* pFormulaRanges = dynamic_cast< ScCellRangesBase * > ( xRanges.get() );
+ assert(pFormulaRanges);
// check if there are no formula cell, return false
if ( pFormulaRanges->GetRangeList().empty() )
return uno::makeAny(false);
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 18bf7326a1b4..0c40536f534b 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1727,6 +1727,7 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
if (pViewShell2 && pViewShell2 == this)
{
ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell);
+ assert(pTabViewShell);
ScInputHandler* pInputHdl = pTabViewShell->GetInputHandler();
if (pInputHdl && pInputHdl->IsFormulaMode())
{