summaryrefslogtreecommitdiff
path: root/svtools/source/uno/treecontrolpeer.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-05-05 13:49:53 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-05-05 13:49:53 +0200
commit6a909277d937b2d809d1baaee51f94795405d3a8 (patch)
treeca37e3e7f530eae54551919d0546999fafaa967a /svtools/source/uno/treecontrolpeer.cxx
parent69e661370538571d578552757bde5998c9d52fdf (diff)
os141: added XTreeControl::getNodeRect
Diffstat (limited to 'svtools/source/uno/treecontrolpeer.cxx')
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index 70ffe67b7759..7c202e3b2bdf 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/view/SelectionType.hpp>
#include <toolkit/helper/property.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
#include <com/sun/star/awt/tree/XMutableTreeNode.hpp>
#include <treecontrolpeer.hxx>
@@ -922,6 +923,19 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getClosestNodeForLocation( sal_
// -------------------------------------------------------------------
+awt::Rectangle SAL_CALL TreeControlPeer::getNodeRect( const Reference< XTreeNode >& i_Node ) throw (IllegalArgumentException, RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
+ UnoTreeListEntry* pEntry = getEntry( i_Node, true );
+
+ ::Rectangle aEntryRect( rTree.GetFocusRect( pEntry, rTree.GetEntryPosition( pEntry ).Y() ) );
+ return VCLUnoHelper::ConvertToAWTRect( aEntryRect );
+}
+
+// -------------------------------------------------------------------
+
sal_Bool SAL_CALL TreeControlPeer::isEditing( ) throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );