sw/source/filter/xml/xmltexti.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
New commits: commit f1cf63c223fd7b4771df687ae9fe37faeccdb8fe Author: Caolán McNamara <[email protected]> Date: Tue Jan 20 15:56:17 2015 +0000 OSL_ENSURE->SAL_WARN_IF where conditional deref follows Change-Id: I2648b0357c13699df2693968db4e57c81028c962 diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index d4d648d..ef9ed0c 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -188,7 +188,7 @@ bool SwXMLTextImportHelper::IsInHeaderFooter() const assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); + SAL_WARN_IF(!pTxtCrsr, "sw.uno", "SwXTextCursor missing"); SwDoc *pDoc = pTxtCrsr ? pTxtCrsr->GetDoc() : NULL; return pDoc && pDoc->IsInHeaderFooter( pTxtCrsr->GetPaM()->GetPoint()->nNode ); commit 0f297e20d1382d6ed652471adf4163677f8fe1be Author: Caolán McNamara <[email protected]> Date: Tue Jan 20 15:55:55 2015 +0000 OSL_ENSURE->assert where unconditionally deref follows Change-Id: I0cb2400e7ebb28cad2c98f9e69d68d312efb03ca diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index f048eff..d4d648d 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -185,7 +185,7 @@ bool SwXMLTextImportHelper::IsInHeaderFooter() const { uno::Reference<XUnoTunnel> xCrsrTunnel( ((SwXMLTextImportHelper *)this)->GetCursor(), UNO_QUERY ); - OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); + assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); @@ -229,7 +229,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( return xPropSet; uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); - OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); + assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); @@ -539,7 +539,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( uno::Reference < XPropertySet > xPropSet; uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); - OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); + assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); @@ -627,7 +627,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet( uno::Reference < XPropertySet > xPropSet; uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); - OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); + assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); @@ -674,7 +674,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( { uno::Reference < XPropertySet > xPropSet; uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); - OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); + assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); @@ -757,7 +757,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra uno::Reference < XPropertySet > xPropSet; uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); - OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); + assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); @@ -909,7 +909,7 @@ void SwXMLTextImportHelper::endAppletOrPlugin( SolarMutexGuard aGuard; uno::Reference<XUnoTunnel> xCrsrTunnel( rPropSet, UNO_QUERY ); - OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for embedded" ); + assert(xCrsrTunnel.is() && "missing XUnoTunnel for embedded"); SwXFrame *pFrame = reinterpret_cast< SwXFrame * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( SwXFrame::getUnoTunnelId() ))); OSL_ENSURE( pFrame, "SwXFrame missing" );
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
