summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-21 15:04:57 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-22 12:43:56 +0200
commit78490b45c771a4c9632b324922f2c8e83f06153b (patch)
tree0e74de3a28bce5a7300f39aa36378d35eedc0afe /svx
parent5c147fc5fe0e77838b8e9bebd4ff215a80946980 (diff)
pvs-studio: V668 no sense testing against null as memory was allocated by new
category V668 complete Change-Id: I986d4cb89a7c72d54d71ea01fc598a9958deee24 Reviewed-on: https://gerrit.libreoffice.org/62138 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx7
-rw-r--r--svx/source/engine3d/view3d.cxx13
-rw-r--r--svx/source/form/fmscriptingenv.cxx5
-rw-r--r--svx/source/svdraw/svdhdl.cxx7
4 files changed, 10 insertions, 22 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 307f5de5a364..20e2da61d404 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2040,11 +2040,8 @@ void EnhancedCustomShape2d::CreateSubPath(
aTempSet.Put(XLineStyleItem(drawing::LineStyle_NONE));
}
- if(pObj)
- {
- pObj->SetMergedItemSet(aTempSet);
- rObjectList.push_back(std::pair< SdrPathObj*, double >(pObj, dBrightness));
- }
+ pObj->SetMergedItemSet(aTempSet);
+ rObjectList.push_back(std::pair< SdrPathObj*, double >(pObj, dBrightness));
}
}
}
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index e88ff0116f24..7b0bcc451b10 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -764,17 +764,14 @@ void E3dView::ImpCreateSingle3DObjectFlat(E3dScene* pScene, SdrObject* pObj, boo
}
// Set attribute
- if(p3DObj)
- {
- p3DObj->NbcSetLayer(pObj->GetLayer());
+ p3DObj->NbcSetLayer(pObj->GetLayer());
- p3DObj->SetMergedItemSet(aSet);
+ p3DObj->SetMergedItemSet(aSet);
- p3DObj->NbcSetStyleSheet(pObj->GetStyleSheet(), true);
+ p3DObj->NbcSetStyleSheet(pObj->GetStyleSheet(), true);
- // Insert a new extrude object
- pScene->InsertObject(p3DObj);
- }
+ // Insert a new extrude object
+ pScene->InsertObject(p3DObj);
}
}
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 2a6ed612c658..edc281665a95 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -1044,10 +1044,7 @@ namespace svxform
pScript.reset( new NewStyleUNOScript( *xObjectShell, sScriptURI ) );
}
- OSL_ENSURE( pScript.get(), "FormScriptingEnvironment::doFireScriptEvent: no script to execute!" );
- if ( !pScript.get() )
- // this is an internal error in the above code
- throw RuntimeException();
+ assert(pScript && "FormScriptingEnvironment::doFireScriptEvent: no script to execute!");
aGuard.clear();
aSolarGuard.clear();
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 69ecdbcf63d6..dd2057ccacb7 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -2402,11 +2402,8 @@ void SdrCropHdl::CreateB2dIAObject()
}
// OVERLAYMANAGER
- if(pOverlayObject)
- {
- xManager->add(*pOverlayObject);
- maOverlayGroup.append(std::move(pOverlayObject));
- }
+ xManager->add(*pOverlayObject);
+ maOverlayGroup.append(std::move(pOverlayObject));
}
}
}