Kaydet (Commit) 3afe0c79 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

--enable-dbgutil --disable-assert-always-abort fixes

...which <https://ci.libreoffice.org/job/lo_tb_random_config_linux/>
occasionally stumbles across; plus some related loplugin:staticmethods fixes

Change-Id: If6998c302cfbabfcad626d9c68d94d3368548a41
Reviewed-on: https://gerrit.libreoffice.org/63808
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst f19dfaf8
......@@ -170,7 +170,7 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
assert(aAny.hasValue());
OUString aCID;
aAny >>= aCID;
#ifdef DBG_UTIL
#if defined DBG_UTIL && !defined NDEBUG
ObjectType eType = ObjectIdentifier::getObjectType(aCID);
assert(eType == OBJECTTYPE_AXIS);
#endif
......
......@@ -227,7 +227,7 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
assert(aAny.hasValue());
OUString aCID;
aAny >>= aCID;
#ifdef DBG_UTIL
#if defined DBG_UTIL && !defined NDEBUG
ObjectType eType = ObjectIdentifier::getObjectType(aCID);
assert(eType == OBJECTTYPE_DATA_ERRORS_X ||
eType == OBJECTTYPE_DATA_ERRORS_Y ||
......
......@@ -272,7 +272,7 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
if (aCID.isEmpty())
return OUString();
#ifdef DBG_UTIL
#if defined DBG_UTIL && !defined NDEBUG
ObjectType eType = ObjectIdentifier::getObjectType(aCID);
assert(eType == OBJECTTYPE_DATA_SERIES);
#endif
......
......@@ -65,7 +65,7 @@ using namespace com::sun::star::xml::dom;
using namespace xforms;
#if OSL_DEBUG_LEVEL > 0
#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
#define DBG_INVARIANT_TYPE(TYPE) class DBG_##TYPE { const TYPE* mpT; void check() { mpT->dbg_assertInvariant(); } public: DBG_##TYPE(const TYPE* pT) : mpT(pT) { check(); } ~DBG_##TYPE() { check(); } } _DBG_##TYPE(this);
#define DBG_INVARIANT() DBG_INVARIANT_TYPE(Model)
......@@ -177,7 +177,7 @@ void Model::setExternalData( bool _bData )
mbExternalData = _bData;
}
#if OSL_DEBUG_LEVEL > 0
#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
void Model::dbg_assertInvariant() const
{
assert(mxInstances && "no instances found");
......
......@@ -139,7 +139,7 @@ public:
void setExternalData( bool _bData );
#if OSL_DEBUG_LEVEL > 0
#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
void dbg_assertInvariant() const;
#endif
......
......@@ -1457,13 +1457,13 @@ class RecursionCounter
{
ScRecursionHelper& rRec;
bool bStackedInIteration;
#ifdef DBG_UTIL
#if defined DBG_UTIL && !defined NDEBUG
const ScFormulaCell* cell;
#endif
public:
RecursionCounter( ScRecursionHelper& r, ScFormulaCell* p )
: rRec(r)
#ifdef DBG_UTIL
#if defined DBG_UTIL && !defined NDEBUG
, cell(p)
#endif
{
......@@ -1477,7 +1477,7 @@ public:
rRec.DecRecursionCount();
if (bStackedInIteration)
{
#ifdef DBG_UTIL
#if defined DBG_UTIL && !defined NDEBUG
assert(rRec.GetRecursionInIterationStack().top() == cell);
#endif
rRec.GetRecursionInIterationStack().pop();
......
......@@ -58,7 +58,7 @@ void SwCache::Check()
assert(pObj == m_pLast);
}
pObj = pObj->GetNext();
assert(pObj != pOldRealFirst);
assert(pObj != pOldRealFirst); (void) pOldRealFirst;
}
assert(bFirstFound);
SAL_WARN_IF( nCnt + m_aFreePositions.size() != size(), "sw.core", "Lost Chain." );
......
......@@ -1573,7 +1573,7 @@ SwRect SwTextFrame::SmartTagScan(SwTextNode & rNode)
void SwTextFrame::CollectAutoCmplWrds(SwTextNode & rNode, sal_Int32 nActPos)
{
assert(sw::FrameContainsNode(*this, rNode.GetIndex()));
assert(sw::FrameContainsNode(*this, rNode.GetIndex())); (void) this;
SwTextNode *const pNode(&rNode);
if (!nActPos)
nActPos = COMPLETE_STRING;
......
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