From 45bf9199f52c19f3302c25b799133027b4addcd1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 May 2010 22:26:58 +0200 Subject: [PATCH] slidecopy: set the WB_DIALOGCONTROL and WB_CHILDLDGCTRL bits both at the generic panel anchor window, and the panel window provided by the XToolPanel --- svtools/source/toolpanel/toolpaneldeck.cxx | 2 +- svtools/source/uno/treecontrolpeer.cxx | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) 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; }