[Libreoffice-commits] core.git: sw/qa
Caolán McNamara
caolanm at redhat.com
Thu Feb 19 07:55:51 PST 2015
sw/qa/core/macros-test.cxx | 1 +
1 file changed, 1 insertion(+)
New commits:
commit d74f5f8633d6fe39011d5a613e1dc62402e7a4e7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Feb 19 15:55:03 2015 +0000
coverity#1270937 Unchecked dynamic_cast
Change-Id: Ibc6e54bf7f907ae1c500be5c67995419c91aa089
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index d0c9e6d..c266d71 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -405,6 +405,7 @@ void SwMacrosTest::testFindReplace()
Reference<lang::XComponent> const xComponent =
loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
SwXTextDocument *const pTxtDoc = dynamic_cast<SwXTextDocument *>(xComponent.get());
+ CPPUNIT_ASSERT(pTxtDoc);
SwDoc *const pDoc = pTxtDoc->GetDocShell()->GetDoc();
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
// use a UnoCrsr so it will be corrected when deleting nodes
More information about the Libreoffice-commits
mailing list