slideshow/source/engine/animationnodes/basecontainernode.cxx | 4 +-- slideshow/source/engine/animationnodes/basenode.cxx | 6 ++-- slideshow/source/engine/animationnodes/nodetools.cxx | 14 +++++++---- slideshow/source/engine/animationnodes/nodetools.hxx | 4 +-- 4 files changed, 16 insertions(+), 12 deletions(-)
New commits: commit 5b0f53f8f215062a131ec0498a72fb7619e5156d Author: Michael Meeks <michael.me...@collabora.com> Date: Tue Feb 9 13:41:27 2016 +0000 slideshow: Don't de-reference Nodes cast to const char *. This crept in with a conversion in: 7bdc6be9c23517eec02ce7139edd7003abbee1f8 Change-Id: Ic1c62122934d5857326258565e4b54ef6e81b884 Reviewed-on: https://gerrit.libreoffice.org/22237 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/slideshow/source/engine/animationnodes/basecontainernode.cxx b/slideshow/source/engine/animationnodes/basecontainernode.cxx index cd4aa9b..17769f7 100644 --- a/slideshow/source/engine/animationnodes/basecontainernode.cxx +++ b/slideshow/source/engine/animationnodes/basecontainernode.cxx @@ -180,9 +180,9 @@ void BaseContainerNode::showState() const boost::dynamic_pointer_cast<BaseNode>(maChildren[i]); SAL_INFO("slideshow.verbose", "Node connection: n" << - reinterpret_cast<const char*>(this)+debugGetCurrentOffset() << + debugGetNodeName(this) << " -> n" << - reinterpret_cast<const char*>(pNode.get())+debugGetCurrentOffset() ); + debugGetNodeName(pNode.get())); pNode->showState(); } diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx index d7af870..fd6c750 100644 --- a/slideshow/source/engine/animationnodes/basenode.cxx +++ b/slideshow/source/engine/animationnodes/basenode.cxx @@ -677,13 +677,13 @@ void BaseNode::showState() const if( eNodeState == AnimationNode::INVALID ) SAL_INFO("slideshow.verbose", "Node state: n" << - reinterpret_cast<const char*>(this)+debugGetCurrentOffset() << + debugGetNodeName(this) << " [label=\"" << getDescription() << "\",style=filled, fillcolor=\"0.5,0.2,0.5\"]"); else SAL_INFO("slideshow.verbose", "Node state: n" << - reinterpret_cast<const char*>(this)+debugGetCurrentOffset() << + debugGetNodeName(this) << " [label=\"" << getDescription() << "fillcolor=\"" << @@ -717,7 +717,7 @@ void BaseNode::showState() const if( xPropSet->getPropertyValue("Name") >>= aName ) { SAL_INFO("slideshow.verbose", "Node info: n" << - reinterpret_cast<const char*>(this)+debugGetCurrentOffset() << + debugGetNodeName(this) << ", name \"" << aName << "\""); diff --git a/slideshow/source/engine/animationnodes/nodetools.cxx b/slideshow/source/engine/animationnodes/nodetools.cxx index 1d0b122..e38445b 100644 --- a/slideshow/source/engine/animationnodes/nodetools.cxx +++ b/slideshow/source/engine/animationnodes/nodetools.cxx @@ -31,11 +31,15 @@ namespace slideshow namespace internal { #if defined(DBG_UTIL) - int& debugGetCurrentOffset() - { - static int lcl_nOffset = 0; // to make each tree output distinct + static sal_Int32 lcl_nOffset = 0; - return lcl_nOffset; + OUString debugGetNodeName( const BaseNode *pNode ) + { + OUStringBuffer aBuf; + aBuf.append(lcl_nOffset); + aBuf.append(" - 0x"); + aBuf.append(reinterpret_cast<sal_Int64>(pNode), 16); + return aBuf.makeStringAndClear(); } void debugNodesShowTree( const BaseNode* pNode ) @@ -43,7 +47,7 @@ namespace slideshow if( pNode ) pNode->showState(); - ++debugGetCurrentOffset(); + ++lcl_nOffset; } #endif diff --git a/slideshow/source/engine/animationnodes/nodetools.hxx b/slideshow/source/engine/animationnodes/nodetools.hxx index cf25d79..55a4c4f 100644 --- a/slideshow/source/engine/animationnodes/nodetools.hxx +++ b/slideshow/source/engine/animationnodes/nodetools.hxx @@ -45,8 +45,8 @@ namespace slideshow #if defined(DBG_UTIL) - int& debugGetCurrentOffset(); - void debugNodesShowTree( const BaseNode* ); + OUString debugGetNodeName( const BaseNode *pNode ); + void debugNodesShowTree( const BaseNode* ); #endif /** Look up an AttributableShape from ShapeManager. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits