summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-11-01 13:32:03 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-11-01 21:34:07 +0100
commitfccbd1211ca5c620482591e7916f0f262d9f86bc (patch)
tree601f7d445c49b392e968c85504ea1c38b595fb2c
parentd3a9db6310204247a3bd8f23a984c5a04afbeef1 (diff)
move UpdateAttr sanity check to DBG_UTIL
Change-Id: I9a6fd1ef8ea704a0ea3f8182d06cbbe938fd1937 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105137 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
-rw-r--r--sw/source/core/docnode/node.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index abfc0d13e827..c13ffe5620ed 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -69,7 +69,9 @@
#include <swcrsr.hxx>
#include <hints.hxx>
#include <frameformats.hxx>
+#ifdef DBG_UTIL
#include <sal/backtrace.hxx>
+#endif
using namespace ::com::sun::star::i18n;
@@ -1169,11 +1171,13 @@ void SwContentNode::SwClientNotify( const SwModify&, const SfxHint& rHint)
// This makes the crude "WhichId" type divert from the true type, which is bad.
// Thus we are asserting here, but falling back to an proper
// hint instead. so that we at least will not spread such poison further.
+#ifdef DBG_UTIL
if(pLegacyHint->m_pNew != pLegacyHint->m_pOld)
{
auto pBT = sal::backtrace_get(20);
SAL_WARN("sw.core", "UpdateAttr not matching! " << sal::backtrace_to_string(pBT.get()));
}
+#endif
assert(pLegacyHint->m_pNew == pLegacyHint->m_pOld);
assert(dynamic_cast<const SwUpdateAttr*>(pLegacyHint->m_pNew));
const SwUpdateAttr aFallbackHint(0,0,0);