diff --git a/svtools/source/toolpanel/toolpaneldeck.cxx b/svtools/source/toolpanel/toolpaneldeck.cxx index e939eb027141..e157090bbf0e 100755 --- a/svtools/source/toolpanel/toolpaneldeck.cxx +++ b/svtools/source/toolpanel/toolpaneldeck.cxx @@ -79,7 +79,7 @@ namespace svt public: ToolPanelDeck_Impl( ToolPanelDeck& i_rDeck ) :m_rDeck( i_rDeck ) - ,m_aPanelAnchor( &i_rDeck ) + ,m_aPanelAnchor( &i_rDeck, WB_DIALOGCONTROL | WB_CHILDDLGCTRL ) ,m_aPanels() ,m_pDummyPanel( new DummyPanel ) ,m_pLayouter() diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index a46b9605a00d..e5a273bbbf6d 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -196,7 +196,9 @@ void TreeControlPeer::addEntry( UnoTreeListEntry* pEntry ) mpTreeNodeMap = new TreeNodeMap(); } - (*mpTreeNodeMap)[ pEntry->mxNode ] = pEntry; + const Reference< XTreeNode > xNormalizedNode( pEntry->mxNode, UNO_QUERY ); + (*mpTreeNodeMap)[ xNormalizedNode ] = pEntry; + OSL_TRACE( "tree: adding %p => %p", xNormalizedNode.get(), pEntry ); } } @@ -206,9 +208,13 @@ void TreeControlPeer::removeEntry( UnoTreeListEntry* pEntry ) { if( mpTreeNodeMap && pEntry && pEntry->mxNode.is() ) { - TreeNodeMap::iterator aIter( mpTreeNodeMap->find( pEntry->mxNode ) ); + const Reference< XTreeNode > xNormalizedNode( pEntry->mxNode, UNO_QUERY ); + TreeNodeMap::iterator aIter( mpTreeNodeMap->find( xNormalizedNode ) ); if( aIter != mpTreeNodeMap->end() ) + { + OSL_TRACE( "tree: removing %p => %p", xNormalizedNode.get(), pEntry ); mpTreeNodeMap->erase( aIter ); + } } } @@ -218,7 +224,8 @@ UnoTreeListEntry* TreeControlPeer::getEntry( const Reference< XTreeNode >& xNode { if( mpTreeNodeMap ) { - TreeNodeMap::iterator aIter( mpTreeNodeMap->find( xNode ) ); + const Reference< XTreeNode > xNormalizedNode( xNode, UNO_QUERY ); + TreeNodeMap::iterator aIter( mpTreeNodeMap->find( xNormalizedNode ) ); if( aIter != mpTreeNodeMap->end() ) return (*aIter).second; }