Kaydet (Commit) 9d3c54c9 authored tarafından Caolán McNamara's avatar Caolán McNamara

OSL_ENSURE->assert where guaranteed deref follows

Change-Id: I241e13cbf440c1a7e208c2646ded7bf2628ca25b
üst 43d6da69
...@@ -688,10 +688,10 @@ void SwXMLTableCellContext_Impl::EndElement() ...@@ -688,10 +688,10 @@ void SwXMLTableCellContext_Impl::EndElement()
// Until we have an API for copying we have to use the core. // Until we have an API for copying we have to use the core.
Reference<XUnoTunnel> xSrcCrsrTunnel( xSrcTxtCursor, UNO_QUERY); Reference<XUnoTunnel> xSrcCrsrTunnel( xSrcTxtCursor, UNO_QUERY);
OSL_ENSURE( xSrcCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); assert(xSrcCrsrTunnel.is() && "missing XUnoTunnel for Cursor");
OTextCursorHelper *pSrcTxtCrsr = reinterpret_cast< OTextCursorHelper * >( OTextCursorHelper *pSrcTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xSrcCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); sal::static_int_cast< sal_IntPtr >( xSrcCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
OSL_ENSURE( pSrcTxtCrsr, "SwXTextCursor missing" ); assert(pSrcTxtCrsr && "SwXTextCursor missing");
SwDoc *pDoc = pSrcTxtCrsr->GetDoc(); SwDoc *pDoc = pSrcTxtCrsr->GetDoc();
const SwPaM *pSrcPaM = pSrcTxtCrsr->GetPaM(); const SwPaM *pSrcPaM = pSrcTxtCrsr->GetPaM();
...@@ -701,8 +701,7 @@ void SwXMLTableCellContext_Impl::EndElement() ...@@ -701,8 +701,7 @@ void SwXMLTableCellContext_Impl::EndElement()
Reference<XUnoTunnel> xDstCrsrTunnel( Reference<XUnoTunnel> xDstCrsrTunnel(
GetImport().GetTextImport()->GetCursor(), UNO_QUERY); GetImport().GetTextImport()->GetCursor(), UNO_QUERY);
OSL_ENSURE( xDstCrsrTunnel.is(), assert(xDstCrsrTunnel.is() && "missing XUnoTunnel for Cursor");
"missing XUnoTunnel for Cursor" );
OTextCursorHelper *pDstTxtCrsr = reinterpret_cast< OTextCursorHelper * >( OTextCursorHelper *pDstTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xDstCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )) ); sal::static_int_cast< sal_IntPtr >( xDstCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )) );
assert(pDstTxtCrsr && "SwXTextCursor missing"); assert(pDstTxtCrsr && "SwXTextCursor missing");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment