coverity#1352253 Unchecked dynamic_cast

Change-Id: I7634fd735f3bdb729c06bcbca05ae31c930db930
This commit is contained in:
Caolán McNamara 2017-01-21 14:55:19 +00:00
parent 3b6c21594e
commit 95b42c9120

View File

@ -3372,6 +3372,7 @@ void SwUiWriterTest::testTdf89954()
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
pWrtShell->EndPara(); pWrtShell->EndPara();
SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument *>(mxComponent.get()); SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pXTextDocument);
pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 't', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 't', 0);
pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'e', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'e', 0);
pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 's', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 's', 0);