summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Araminowicz <g.araminowicz@gmail.com>2017-08-23 23:00:00 +0200
committerJan Holesovsky <kendy@collabora.com>2017-08-30 13:51:21 +0200
commit8ff306d81be73cedec940ae996d73f4e3a4a6422 (patch)
treefd7637cfd8a4c0bc318abd2ed65504e7cde8ddff
parent546915797286b0e1744c25b1b0d7e13fb1bbe94e (diff)
tdf#43157 Clean up OSL_ENSURE in oox/drawingml/diagram
Change-Id: I9e3b80c365d6f43cd6f6f42ccdd0a8920f4ace14 Reviewed-on: https://gerrit.libreoffice.org/41513 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--oox/source/drawingml/diagram/constraintlistcontext.cxx3
-rw-r--r--oox/source/drawingml/diagram/datamodelcontext.cxx5
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx5
-rw-r--r--oox/source/drawingml/diagram/layoutnodecontext.cxx3
4 files changed, 6 insertions, 10 deletions
diff --git a/oox/source/drawingml/diagram/constraintlistcontext.cxx b/oox/source/drawingml/diagram/constraintlistcontext.cxx
index 1e67f12b6615..0056b280cf7a 100644
--- a/oox/source/drawingml/diagram/constraintlistcontext.cxx
+++ b/oox/source/drawingml/diagram/constraintlistcontext.cxx
@@ -21,7 +21,6 @@
#include "oox/helper/attributelist.hxx"
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
-#include <osl/diagnose.h>
using namespace ::oox::core;
using namespace ::com::sun::star::uno;
@@ -35,7 +34,7 @@ ConstraintListContext::ConstraintListContext( ContextHandler2Helper const & rPar
: ContextHandler2( rParent )
, mpNode( pNode )
{
- OSL_ENSURE( pNode, "Node must NOT be NULL" );
+ assert( pNode && "Node must NOT be NULL" );
}
ConstraintListContext::~ConstraintListContext()
diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx b/oox/source/drawingml/diagram/datamodelcontext.cxx
index ce0608a666b3..2c5f8f97784f 100644
--- a/oox/source/drawingml/diagram/datamodelcontext.cxx
+++ b/oox/source/drawingml/diagram/datamodelcontext.cxx
@@ -24,7 +24,6 @@
#include "drawingml/textbodycontext.hxx"
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
-#include <osl/diagnose.h>
using namespace ::oox::core;
using namespace ::com::sun::star::xml::sax;
@@ -289,7 +288,7 @@ public:
: ContextHandler2( rParent )
, mpDataModel( pModel )
{
- OSL_ENSURE( pModel, "the data model MUST NOT be NULL" );
+ assert( pModel && "the data model MUST NOT be NULL" );
}
virtual ContextHandlerRef
@@ -326,7 +325,7 @@ DataModelContext::DataModelContext( ContextHandler2Helper const & rParent,
: ContextHandler2( rParent )
, mpDataModel( pDataModel )
{
- OSL_ENSURE( pDataModel, "Data Model must not be NULL" );
+ assert( pDataModel && "Data Model must not be NULL" );
}
DataModelContext::~DataModelContext()
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index e0a8256e997d..5d060799caab 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -22,7 +22,6 @@
#include <com/sun/star/xml/dom/XDocument.hpp>
#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
#include <rtl/ustrbuf.hxx>
-#include <osl/diagnose.h>
#include <editeng/unoprnms.hxx>
#include "drawingml/textbody.hxx"
#include "drawingml/textparagraph.hxx"
@@ -205,7 +204,7 @@ void Diagram::build( )
const bool bInserted1=getData()->getPointNameMap().insert(
std::make_pair(aCurrPoint->msModelId,&(*aCurrPoint))).second;
- OSL_ENSURE(bInserted1,"Diagram::build(): non-unique point model id");
+ SAL_WARN_IF(!bInserted1, "oox.drawingml", "Diagram::build(): non-unique point model id");
if( !aCurrPoint->msPresentationLayoutName.isEmpty() )
{
@@ -273,7 +272,7 @@ void Diagram::build( )
const bool bInserted1=getData()->getConnectionNameMap().insert(
std::make_pair(aCurrCxn->msModelId,&(*aCurrCxn))).second;
- OSL_ENSURE(bInserted1,"Diagram::build(): non-unique connection model id");
+ SAL_WARN_IF(!bInserted1, "oox.drawingml", "Diagram::build(): non-unique connection model id");
if( aCurrCxn->mnType == XML_presOf )
{
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx
index 6fc38a5608a0..1d36aeccebb1 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.cxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -27,7 +27,6 @@
#include "constraintlistcontext.hxx"
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
-#include <osl/diagnose.h>
using namespace ::oox::core;
using namespace ::com::sun::star::uno;
@@ -174,7 +173,7 @@ LayoutNodeContext::LayoutNodeContext( ContextHandler2Helper const & rParent,
: ContextHandler2( rParent )
, mpNode( pAtom )
{
- OSL_ENSURE( pAtom, "Node must NOT be NULL" );
+ assert( pAtom && "Node must NOT be NULL" );
mpNode->setName( rAttribs.getString( XML_name ).get() );
}