summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-14 10:34:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-14 12:02:49 +0000
commita4f39904dca51f86171508c08cfd00d35b7a3989 (patch)
tree73152bbb453fa732352912183900e90e786ad669 /sc/source/ui
parente5e13192f3ce677daf6edaaebcb50bad9e24e05a (diff)
coverity#1251587 Unchecked dynamic_cast
Change-Id: Ibde77906333699046357bec4ff392e5e08b4a426
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 5e003dfcb01e..14d2de5d00aa 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -763,13 +763,11 @@ const ScCalcConfig::OpenCLImplMatcher& ScCalcOptionsDialog::CurrentWhiteOrBlackL
void ScCalcOptionsDialog::EditFieldValueChanged(Control *pCtrl)
{
- Edit* pEdit(dynamic_cast<Edit*>(pCtrl));
+ Edit& rEdit(dynamic_cast<Edit&>(*pCtrl));
- assert(pEdit);
+ OUString sVal = rEdit.GetText();
- OUString sVal = pEdit->GetText();
-
- if (pEdit == mpEditField)
+ if (&rEdit == mpEditField)
{
// We know that the mpEditField is used for only one thing at the moment,
// the OpenCL subset list of opcodes
@@ -783,32 +781,32 @@ void ScCalcOptionsDialog::EditFieldValueChanged(Control *pCtrl)
const ScCalcConfig::OpenCLImplMatcher& impl(CurrentWhiteOrBlackListEntry());
ScCalcConfig::OpenCLImplMatcher newImpl(impl);
- if (pEdit == mpOS)
+ if (&rEdit == mpOS)
{
newImpl.maOS = sVal;
}
- else if (pEdit == mpOSVersion)
+ else if (&rEdit == mpOSVersion)
{
newImpl.maOSVersion = sVal;
}
- else if (pEdit == mpPlatformVendor)
+ else if (&rEdit == mpPlatformVendor)
{
newImpl.maPlatformVendor = sVal;
}
- else if (pEdit == mpDevice)
+ else if (&rEdit == mpDevice)
{
newImpl.maDevice = sVal;
}
- else if (pEdit == mpDriverVersionMin)
+ else if (&rEdit == mpDriverVersionMin)
{
newImpl.maDriverVersionMin = sVal;
}
- else if (pEdit == mpDriverVersionMax)
+ else if (&rEdit == mpDriverVersionMax)
{
newImpl.maDriverVersionMax = sVal;
}
else
- assert(false && "pEdit does not match any of the Edit fields");
+ assert(false && "rEdit does not match any of the Edit fields");
ScCalcConfig::OpenCLImplMatcherSet& rSet(CurrentWhiteOrBlackList());