[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Fri Oct 24 01:23:23 PDT 2014


 sw/source/filter/xml/xmlimp.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 1ff8fbba36e00170c65572fbe21e8e51925ac8ae
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Oct 24 10:22:49 2014 +0200

    Some OSL_ENSURE -> assert
    
    Change-Id: Idd165c4a3083e1d4d8d1d16c663c31653c108702

diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index b1384c0..ab2e643 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <cassert>
+
 #include <com/sun/star/container/XIndexAccess.hpp>
 #include <com/sun/star/document/PrinterIndependentLayout.hpp>
 #include <com/sun/star/drawing/XDrawPage.hpp>
@@ -1598,8 +1602,8 @@ SwDoc* SwImport::GetDocFromXMLImport( SvXMLImport& rImport )
     uno::Reference<lang::XUnoTunnel> xModelTunnel( rImport.GetModel(), uno::UNO_QUERY );
     SwXTextDocument *pTxtDoc = reinterpret_cast< SwXTextDocument *>(
             sal::static_int_cast< sal_IntPtr >(  xModelTunnel->getSomething(SwXTextDocument::getUnoTunnelId() )));
-    OSL_ENSURE( pTxtDoc, "Where is my model?" );
-    OSL_ENSURE( pTxtDoc->GetDocShell(), "Where is my shell?" );
+    assert( pTxtDoc );
+    assert( pTxtDoc->GetDocShell() );
     SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc();
     OSL_ENSURE( pDoc, "Where is my document?" );
     return pDoc;


More information about the Libreoffice-commits mailing list