[Libreoffice-commits] core.git: svx/source
Caolán McNamara
caolanm at redhat.com
Sat Sep 23 14:48:15 UTC 2017
svx/source/dialog/ClassificationDialog.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 0656bcf98abfda155df0d318a943459d152333a2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 23 00:05:53 2017 +0100
coverity#1418337 Unchecked dynamic_cast
Change-Id: Ic7c7030687d39e35610f7aa14555d8b19b11acea
Reviewed-on: https://gerrit.libreoffice.org/42681
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index 43e5260aae53..478c6469a6ce 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -155,10 +155,10 @@ std::vector<ClassificationResult> ClassificationDialog::getResult()
ESelection aSelection(rSection.mnParagraph, rSection.mnStart, rSection.mnParagraph, rSection.mnEnd);
OUString sString = m_pEditWindow->pEdEngine->GetText(aSelection);
+ const ClassificationField* pClassificationField = pFieldItem ? dynamic_cast<const ClassificationField*>(pFieldItem->GetField()) : nullptr;
- if (pFieldItem)
+ if (pClassificationField)
{
- const ClassificationField* pClassificationField = dynamic_cast<const ClassificationField*>(pFieldItem->GetField());
aClassificationResults.push_back({ pClassificationField->meType , sString, rSection.mnParagraph });
}
else
More information about the Libreoffice-commits
mailing list