Kaydet (Commit) d7b48d03 authored tarafından Honza Havlíček's avatar Honza Havlíček Kaydeden (comit) Luboš Luňák

fdo#43157 - Clean up OSL_ENSURE

Change-Id: I5ba15eaa82479aa68b98ce4dcd7827f31b239c98
Reviewed-on: https://gerrit.libreoffice.org/5139Reviewed-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
Tested-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
üst 5f7860bc
...@@ -108,9 +108,9 @@ class SwNoteProps: public utl::ConfigItem ...@@ -108,9 +108,9 @@ class SwNoteProps: public utl::ConfigItem
const ::com::sun::star::uno::Sequence< OUString >& rNames = GetPropertyNames(); const ::com::sun::star::uno::Sequence< OUString >& rNames = GetPropertyNames();
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aValues = GetProperties(rNames); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aValues = GetProperties(rNames);
const ::com::sun::star::uno::Any* pValues = aValues.getConstArray(); const ::com::sun::star::uno::Any* pValues = aValues.getConstArray();
OSL_ENSURE(aValues.getLength() == rNames.getLength(), "GetProperties failed"); SAL_WARN_IF(aValues.getLength() != rNames.getLength(), "sw", "GetProperties failed");
if (aValues.getLength()) if (aValues.getLength())
pValues[0]>>=bIsShowAnchor; pValues[0]>>=bIsShowAnchor;
} }
bool IsShowAnchor() bool IsShowAnchor()
......
...@@ -170,12 +170,12 @@ public: ...@@ -170,12 +170,12 @@ public:
// --- inlines ----------------------------------------------------------- // --- inlines -----------------------------------------------------------
inline OUString SwAuthEntry::GetAuthorField(ToxAuthorityField ePos) const inline OUString SwAuthEntry::GetAuthorField(ToxAuthorityField ePos) const
{ {
OSL_ENSURE(AUTH_FIELD_END > ePos, "wrong index"); SAL_WARN_IF(AUTH_FIELD_END <= ePos, "sw", "wrong index");
return aAuthFields[ePos]; return aAuthFields[ePos];
} }
inline void SwAuthEntry::SetAuthorField(ToxAuthorityField ePos, const OUString& rField) inline void SwAuthEntry::SetAuthorField(ToxAuthorityField ePos, const OUString& rField)
{ {
OSL_ENSURE(AUTH_FIELD_END > ePos, "wrong index"); SAL_WARN_IF(AUTH_FIELD_END <= ePos, "sw", "wrong index");
if(AUTH_FIELD_END > ePos) if(AUTH_FIELD_END > ePos)
aAuthFields[ePos] = rField; aAuthFields[ePos] = rField;
} }
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <assert.h> #include <assert.h>
#include <tools/solar.h> #include <tools/solar.h>
#include <osl/diagnose.h>
#include <swdllapi.h> #include <swdllapi.h>
struct BlockInfo; struct BlockInfo;
......
...@@ -152,8 +152,7 @@ public: ...@@ -152,8 +152,7 @@ public:
about the object (Writer fly frame resp. drawing object) */ about the object (Writer fly frame resp. drawing object) */
const SwFmtAnchor& GetAnchorFmt() const const SwFmtAnchor& GetAnchorFmt() const
{ {
OSL_ENSURE( GetFmt(), assert( GetFmt() );
"<SwContact::GetAnchorFmt()> - no frame format -> crash" );
return GetFmt()->GetAnchor(); return GetFmt()->GetAnchor();
} }
...@@ -167,9 +166,7 @@ public: ...@@ -167,9 +166,7 @@ public:
const SwPosition& GetCntntAnchor() const const SwPosition& GetCntntAnchor() const
{ {
OSL_ENSURE( GetAnchorFmt().GetCntntAnchor(), assert( GetAnchorFmt().GetCntntAnchor() );
"<SwContact::GetCntntAnchor()> - no content anchor -> crash" );
return *(GetAnchorFmt().GetCntntAnchor()); return *(GetAnchorFmt().GetCntntAnchor());
} }
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <modeltoviewhelper.hxx> #include <modeltoviewhelper.hxx>
#include <SwNumberTreeTypes.hxx> #include <SwNumberTreeTypes.hxx>
#include <IDocumentContentOperations.hxx> #include <IDocumentContentOperations.hxx>
#include <osl/diagnose.h>
#include <sfx2/Metadatable.hxx> #include <sfx2/Metadatable.hxx>
...@@ -818,12 +817,12 @@ public: ...@@ -818,12 +817,12 @@ public:
inline SwpHints & SwTxtNode::GetSwpHints() inline SwpHints & SwTxtNode::GetSwpHints()
{ {
OSL_ASSERT( m_pSwpHints ); assert( m_pSwpHints );
return *m_pSwpHints; return *m_pSwpHints;
} }
inline const SwpHints &SwTxtNode::GetSwpHints() const inline const SwpHints &SwTxtNode::GetSwpHints() const
{ {
OSL_ASSERT( m_pSwpHints ); assert( m_pSwpHints );
return *m_pSwpHints; return *m_pSwpHints;
} }
......
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
#define _SWITERATOR_HXX #define _SWITERATOR_HXX
#include <calbck.hxx> #include <calbck.hxx>
#include <osl/diagnose.h> #include <sal/log.hxx>
template< class TElementType, class TSource > class SwIterator template< class TElementType, class TSource > class SwIterator
{ {
SwClientIter aClientIter; SwClientIter aClientIter;
public: public:
SwIterator( const TSource& rSrc ) : aClientIter(rSrc) { OSL_ENSURE( TElementType::IsOf( TYPE(SwClient) ), "Incompatible types!" ); } SwIterator( const TSource& rSrc ) : aClientIter(rSrc) { SAL_WARN_IF( !TElementType::IsOf( TYPE(SwClient) ), "sw", "Incompatible types!" ); }
TElementType* First() { SwClient* p = aClientIter.First(TYPE(TElementType)); return PTR_CAST(TElementType,p); } TElementType* First() { SwClient* p = aClientIter.First(TYPE(TElementType)); return PTR_CAST(TElementType,p); }
TElementType* Last() { SwClient* p = aClientIter.Last( TYPE(TElementType)); return PTR_CAST(TElementType,p); } TElementType* Last() { SwClient* p = aClientIter.Last( TYPE(TElementType)); return PTR_CAST(TElementType,p); }
TElementType* Next() { SwClient* p = aClientIter.Next(); return PTR_CAST(TElementType,p); } TElementType* Next() { SwClient* p = aClientIter.Next(); return PTR_CAST(TElementType,p); }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
#ifndef _SWRECT_HXX #ifndef _SWRECT_HXX
#define _SWRECT_HXX #define _SWRECT_HXX
#include <osl/diagnose.h> #include <sal/log.hxx>
#include <tools/gen.hxx> #include <tools/gen.hxx>
class SvStream; class SvStream;
...@@ -296,7 +296,7 @@ inline SwRect &SwRect::operator-=( const Size &rSz ) ...@@ -296,7 +296,7 @@ inline SwRect &SwRect::operator-=( const Size &rSz )
// other // other
inline Rectangle SwRect::SVRect() const inline Rectangle SwRect::SVRect() const
{ {
OSL_ENSURE( !IsEmpty(), "SVRect() without Width or Height" ); SAL_WARN_IF( IsEmpty(), "sw", "SVRect() without Width or Height" );
return Rectangle( m_Point.getX(), m_Point.getY(), return Rectangle( m_Point.getX(), m_Point.getY(),
m_Point.getX() + m_Size.getWidth() - 1, //Right() m_Point.getX() + m_Size.getWidth() - 1, //Right()
m_Point.getY() + m_Size.getHeight() - 1 ); //Bottom() m_Point.getY() + m_Size.getHeight() - 1 ); //Bottom()
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <i18nlangtag/lang.h> #include <i18nlangtag/lang.h>
#include <svl/poolitem.hxx> #include <svl/poolitem.hxx>
#include <tools/string.hxx> #include <tools/string.hxx>
#include <osl/diagnose.h>
#include <editeng/svxenum.hxx> #include <editeng/svxenum.hxx>
#include <swtypes.hxx> #include <swtypes.hxx>
...@@ -525,12 +524,12 @@ public: ...@@ -525,12 +524,12 @@ public:
const String& GetStyleNames(sal_uInt16 nLevel) const const String& GetStyleNames(sal_uInt16 nLevel) const
{ {
OSL_ENSURE( nLevel < MAXLEVEL, "Which level?"); SAL_WARN_IF( nLevel >= MAXLEVEL, "sw", "Which level?");
return aStyleNames[nLevel]; return aStyleNames[nLevel];
} }
void SetStyleNames(const String& rSet, sal_uInt16 nLevel) void SetStyleNames(const String& rSet, sal_uInt16 nLevel)
{ {
OSL_ENSURE( nLevel < MAXLEVEL, "Which level?"); SAL_WARN_IF( nLevel >= MAXLEVEL, "sw", "Which level?");
aStyleNames[nLevel] = rSet; aStyleNames[nLevel] = rSet;
} }
sal_Bool IsFromChapter() const { return bFromChapter;} sal_Bool IsFromChapter() const { return bFromChapter;}
...@@ -591,73 +590,73 @@ inline void SwTOXMark::SetAlternativeText(const String& rAlt) ...@@ -591,73 +590,73 @@ inline void SwTOXMark::SetAlternativeText(const String& rAlt)
inline void SwTOXMark::SetLevel( sal_uInt16 nLvl ) inline void SwTOXMark::SetLevel( sal_uInt16 nLvl )
{ {
OSL_ENSURE( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX, "sw", "Wrong type");
nLevel = nLvl; nLevel = nLvl;
} }
inline void SwTOXMark::SetPrimaryKey( const String& rKey ) inline void SwTOXMark::SetPrimaryKey( const String& rKey )
{ {
OSL_ENSURE( GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF( GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aPrimaryKey = rKey; aPrimaryKey = rKey;
} }
inline void SwTOXMark::SetSecondaryKey( const String& rKey ) inline void SwTOXMark::SetSecondaryKey( const String& rKey )
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aSecondaryKey = rKey; aSecondaryKey = rKey;
} }
inline void SwTOXMark::SetTextReading( const String& rTxt ) inline void SwTOXMark::SetTextReading( const String& rTxt )
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aTextReading = rTxt; aTextReading = rTxt;
} }
inline void SwTOXMark::SetPrimaryKeyReading( const String& rKey ) inline void SwTOXMark::SetPrimaryKeyReading( const String& rKey )
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aPrimaryKeyReading = rKey; aPrimaryKeyReading = rKey;
} }
inline void SwTOXMark::SetSecondaryKeyReading( const String& rKey ) inline void SwTOXMark::SetSecondaryKeyReading( const String& rKey )
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aSecondaryKeyReading = rKey; aSecondaryKeyReading = rKey;
} }
inline sal_uInt16 SwTOXMark::GetLevel() const inline sal_uInt16 SwTOXMark::GetLevel() const
{ {
OSL_ENSURE( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX, "sw", "Wrong type");
return nLevel; return nLevel;
} }
inline const String& SwTOXMark::GetPrimaryKey() const inline const String& SwTOXMark::GetPrimaryKey() const
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aPrimaryKey; return aPrimaryKey;
} }
inline const String& SwTOXMark::GetSecondaryKey() const inline const String& SwTOXMark::GetSecondaryKey() const
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aSecondaryKey; return aSecondaryKey;
} }
inline const String& SwTOXMark::GetTextReading() const inline const String& SwTOXMark::GetTextReading() const
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aTextReading; return aTextReading;
} }
inline const String& SwTOXMark::GetPrimaryKeyReading() const inline const String& SwTOXMark::GetPrimaryKeyReading() const
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aPrimaryKeyReading; return aPrimaryKeyReading;
} }
inline const String& SwTOXMark::GetSecondaryKeyReading() const inline const String& SwTOXMark::GetSecondaryKeyReading() const
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aSecondaryKeyReading; return aSecondaryKeyReading;
} }
...@@ -666,13 +665,13 @@ inline const String& SwTOXMark::GetSecondaryKeyReading() const ...@@ -666,13 +665,13 @@ inline const String& SwTOXMark::GetSecondaryKeyReading() const
// //
inline void SwForm::SetTemplate(sal_uInt16 nLevel, const String& rTemplate) inline void SwForm::SetTemplate(sal_uInt16 nLevel, const String& rTemplate)
{ {
OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX"); SAL_WARN_IF(nLevel >= GetFormMax(), "sw", "Index >= GetFormMax()");
aTemplate[nLevel] = rTemplate; aTemplate[nLevel] = rTemplate;
} }
inline const String& SwForm::GetTemplate(sal_uInt16 nLevel) const inline const String& SwForm::GetTemplate(sal_uInt16 nLevel) const
{ {
OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX"); SAL_WARN_IF(nLevel >= GetFormMax(), "sw", "Index >= GetFormMax()");
return aTemplate[nLevel]; return aTemplate[nLevel];
} }
...@@ -730,31 +729,31 @@ inline TOXTypes SwTOXBase::GetType() const ...@@ -730,31 +729,31 @@ inline TOXTypes SwTOXBase::GetType() const
inline void SwTOXBase::SetLevel(sal_uInt16 nLev) inline void SwTOXBase::SetLevel(sal_uInt16 nLev)
{ {
OSL_ENSURE(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() == TOX_INDEX, "sw", "Wrong type");
aData.nLevel = nLev; aData.nLevel = nLev;
} }
inline sal_uInt16 SwTOXBase::GetLevel() const inline sal_uInt16 SwTOXBase::GetLevel() const
{ {
OSL_ENSURE(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() == TOX_INDEX, "sw", "Wrong type");
return aData.nLevel; return aData.nLevel;
} }
inline void SwTOXBase::SetTemplateName(const String& rName) inline void SwTOXBase::SetTemplateName(const String& rName)
{ {
OSL_FAIL("SwTOXBase::SetTemplateName obsolete"); SAL_WARN("sw", "SwTOXBase::SetTemplateName obsolete");
aStyleNames[0] = rName; aStyleNames[0] = rName;
} }
inline sal_uInt16 SwTOXBase::GetOptions() const inline sal_uInt16 SwTOXBase::GetOptions() const
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aData.nOptions; return aData.nOptions;
} }
inline void SwTOXBase::SetOptions(sal_uInt16 nOpt) inline void SwTOXBase::SetOptions(sal_uInt16 nOpt)
{ {
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aData.nOptions = nOpt; aData.nOptions = nOpt;
} }
......
...@@ -148,7 +148,7 @@ inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const ...@@ -148,7 +148,7 @@ inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const
inline const SfxPoolItem& SwTxtAttr::GetAttr() const inline const SfxPoolItem& SwTxtAttr::GetAttr() const
{ {
OSL_ENSURE( m_pAttr, "SwTxtAttr: where is my attribute?" ); assert( m_pAttr );
return *m_pAttr; return *m_pAttr;
} }
...@@ -170,71 +170,62 @@ inline void SwTxtAttr::SetDontExpand( bool bDontExpand ) ...@@ -170,71 +170,62 @@ inline void SwTxtAttr::SetDontExpand( bool bDontExpand )
inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const
{ {
OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT, assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT );
"Wrong attribute" );
return (const SwFmtCharFmt&)(*m_pAttr); return (const SwFmtCharFmt&)(*m_pAttr);
} }
inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const
{ {
OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT, assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT );
"Wrong attribute" );
return (const SwFmtAutoFmt&)(*m_pAttr); return (const SwFmtAutoFmt&)(*m_pAttr);
} }
inline const SwFmtFld& SwTxtAttr::GetFld() const inline const SwFmtFld& SwTxtAttr::GetFld() const
{ {
OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD, assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD );
"Wrong attribute" );
return (const SwFmtFld&)(*m_pAttr); return (const SwFmtFld&)(*m_pAttr);
} }
inline const SwFmtFtn& SwTxtAttr::GetFtn() const inline const SwFmtFtn& SwTxtAttr::GetFtn() const
{ {
OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN, "Wrong attribute" ); assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN );
return (const SwFmtFtn&)(*m_pAttr); return (const SwFmtFtn&)(*m_pAttr);
} }
inline const SwFmtFlyCnt& SwTxtAttr::GetFlyCnt() const inline const SwFmtFlyCnt& SwTxtAttr::GetFlyCnt() const
{ {
OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT, assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT );
"Wrong attribute" );
return (const SwFmtFlyCnt&)(*m_pAttr); return (const SwFmtFlyCnt&)(*m_pAttr);
} }
inline const SwTOXMark& SwTxtAttr::GetTOXMark() const inline const SwTOXMark& SwTxtAttr::GetTOXMark() const
{ {
OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK, assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK );
"Wrong attribute" );
return (const SwTOXMark&)(*m_pAttr); return (const SwTOXMark&)(*m_pAttr);
} }
inline const SwFmtRefMark& SwTxtAttr::GetRefMark() const inline const SwFmtRefMark& SwTxtAttr::GetRefMark() const
{ {
OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK, assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK );
"Wrong attribute" );
return (const SwFmtRefMark&)(*m_pAttr); return (const SwFmtRefMark&)(*m_pAttr);
} }
inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const
{ {
OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT, assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT );
"Wrong attribute" );
return (const SwFmtINetFmt&)(*m_pAttr); return (const SwFmtINetFmt&)(*m_pAttr);
} }
inline const SwFmtRuby& SwTxtAttr::GetRuby() const inline const SwFmtRuby& SwTxtAttr::GetRuby() const
{ {
OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY, assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY );
"Wrong attribute" );
return (const SwFmtRuby&)(*m_pAttr); return (const SwFmtRuby&)(*m_pAttr);
} }
inline const SwFmtMeta& SwTxtAttr::GetMeta() const inline const SwFmtMeta& SwTxtAttr::GetMeta() const
{ {
OSL_ENSURE( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META || assert( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META ||
m_pAttr->Which() == RES_TXTATR_METAFIELD), m_pAttr->Which() == RES_TXTATR_METAFIELD) );
"Wrong attribute" );
return (const SwFmtMeta&)(*m_pAttr); return (const SwFmtMeta&)(*m_pAttr);
} }
......
...@@ -113,7 +113,7 @@ public: ...@@ -113,7 +113,7 @@ public:
inline const SwTxtNode& SwTxtRuby::GetTxtNode() const inline const SwTxtNode& SwTxtRuby::GetTxtNode() const
{ {
OSL_ENSURE( m_pTxtNode, "SwTxtRuby: where is my TxtNode?" ); assert( m_pTxtNode );
return *m_pTxtNode; return *m_pTxtNode;
} }
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
inline SwTxtNode& SwTxtFld::GetTxtNode() const inline SwTxtNode& SwTxtFld::GetTxtNode() const
{ {
OSL_ENSURE( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" ); assert( m_pTxtNode );
return *m_pTxtNode; return *m_pTxtNode;
} }
......
...@@ -68,7 +68,7 @@ public: ...@@ -68,7 +68,7 @@ public:
inline const SwTxtNode& SwTxtFtn::GetTxtNode() const inline const SwTxtNode& SwTxtFtn::GetTxtNode() const
{ {
OSL_ENSURE( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" ); assert( m_pTxtNode );
return *m_pTxtNode; return *m_pTxtNode;
} }
......
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const
{ {
OSL_ENSURE( m_pTxtNode, "SwTxtINetFmt: where is my TxtNode?" ); assert( m_pTxtNode );
return *m_pTxtNode; return *m_pTxtNode;
} }
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const
{ {
OSL_ENSURE( m_pTxtNode, "SwTxtRefMark: where is my TxtNode?" ); assert( m_pTxtNode );
return *m_pTxtNode; return *m_pTxtNode;
} }
......
...@@ -50,7 +50,7 @@ public: ...@@ -50,7 +50,7 @@ public:
inline const SwTxtNode& SwTxtTOXMark::GetTxtNode() const inline const SwTxtNode& SwTxtTOXMark::GetTxtNode() const
{ {
OSL_ENSURE( m_pTxtNode, "SwTxtTOXMark: where is my TxtNode?" ); assert( m_pTxtNode );
return *m_pTxtNode; return *m_pTxtNode;
} }
......
...@@ -87,7 +87,6 @@ void ClientModify(SwClient* pClient, const SfxPoolItem *pOld, const SfxPoolItem ...@@ -87,7 +87,6 @@ void ClientModify(SwClient* pClient, const SfxPoolItem *pOld, const SfxPoolItem
#include <boost/utility.hpp> #include <boost/utility.hpp>
#include <osl/diagnose.h>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
...@@ -103,7 +102,7 @@ namespace sw { ...@@ -103,7 +102,7 @@ namespace sw {
UnoImplPtr(T *const i_p) UnoImplPtr(T *const i_p)
: m_p(i_p) : m_p(i_p)
{ {
OSL_ENSURE(i_p, "UnoImplPtr: null"); SAL_WARN_IF(!i_p, "sw", "UnoImplPtr: null");
} }
~UnoImplPtr() ~UnoImplPtr()
......
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