fdo#54938 Convert toolkit to cppu::supportsService
Change-Id: I3a35a86d9ad9419011f0305fdc41c8484ae63a04 Reviewed-on: https://gerrit.libreoffice.org/7646 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
This commit is contained in:
committed by
Marcos Souza
parent
74c876e615
commit
03cc76aad3
@@ -18,10 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <toolkit/controls/roadmapentry.hxx>
|
#include <toolkit/controls/roadmapentry.hxx>
|
||||||
|
|
||||||
#include <rtl/ustring.hxx>
|
#include <rtl/ustring.hxx>
|
||||||
|
|
||||||
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
||||||
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
|
|
||||||
|
|
||||||
ORoadmapEntry::ORoadmapEntry() : ORoadmapEntry_Base( )
|
ORoadmapEntry::ORoadmapEntry() : ORoadmapEntry_Base( )
|
||||||
@@ -86,7 +85,7 @@ OUString SAL_CALL ORoadmapEntry::getImplementationName( ) throw (::com::sun::st
|
|||||||
|
|
||||||
sal_Bool SAL_CALL ORoadmapEntry::supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException)
|
sal_Bool SAL_CALL ORoadmapEntry::supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
return ServiceName == "com.sun.star.awt.RoadmapItem";
|
return cppu::supportsService(this, ServiceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
::com::sun::star::uno::Sequence< OUString > SAL_CALL ORoadmapEntry::getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException)
|
::com::sun::star::uno::Sequence< OUString > SAL_CALL ORoadmapEntry::getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException)
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#include <com/sun/star/lang/XUnoTunnel.hpp>
|
#include <com/sun/star/lang/XUnoTunnel.hpp>
|
||||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||||
#include <cppuhelper/implbase2.hxx>
|
#include <cppuhelper/implbase2.hxx>
|
||||||
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
#include <rtl/ref.hxx>
|
#include <rtl/ref.hxx>
|
||||||
#include <toolkit/helper/mutexandbroadcasthelper.hxx>
|
#include <toolkit/helper/mutexandbroadcasthelper.hxx>
|
||||||
#include <toolkit/helper/servicenames.hxx>
|
#include <toolkit/helper/servicenames.hxx>
|
||||||
@@ -141,23 +142,15 @@ private:
|
|||||||
bool mbIsInserted;
|
bool mbIsInserted;
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
|
||||||
// class MutableTreeDataModel
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
MutableTreeDataModel::MutableTreeDataModel()
|
MutableTreeDataModel::MutableTreeDataModel()
|
||||||
: mbDisposed( false )
|
: mbDisposed( false )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
MutableTreeDataModel::~MutableTreeDataModel()
|
MutableTreeDataModel::~MutableTreeDataModel()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void MutableTreeDataModel::broadcast( broadcast_type eType, const Reference< XTreeNode >& xParentNode, const Reference< XTreeNode >* pNodes, sal_Int32 nNodes )
|
void MutableTreeDataModel::broadcast( broadcast_type eType, const Reference< XTreeNode >& xParentNode, const Reference< XTreeNode >* pNodes, sal_Int32 nNodes )
|
||||||
{
|
{
|
||||||
::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( cppu::UnoType<XTreeDataModelListener>::get() );
|
::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( cppu::UnoType<XTreeDataModelListener>::get() );
|
||||||
@@ -182,17 +175,11 @@ void MutableTreeDataModel::broadcast( broadcast_type eType, const Reference< XTr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
// XMutableTreeDataModel
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
Reference< XMutableTreeNode > SAL_CALL MutableTreeDataModel::createNode( const Any& aValue, sal_Bool bChildrenOnDemand ) throw (RuntimeException)
|
Reference< XMutableTreeNode > SAL_CALL MutableTreeDataModel::createNode( const Any& aValue, sal_Bool bChildrenOnDemand ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
return new MutableTreeNode( this, aValue, bChildrenOnDemand );
|
return new MutableTreeNode( this, aValue, bChildrenOnDemand );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeDataModel::setRoot( const Reference< XMutableTreeNode >& xNode ) throw (IllegalArgumentException, RuntimeException)
|
void SAL_CALL MutableTreeDataModel::setRoot( const Reference< XMutableTreeNode >& xNode ) throw (IllegalArgumentException, RuntimeException)
|
||||||
{
|
{
|
||||||
if( !xNode.is() )
|
if( !xNode.is() )
|
||||||
@@ -220,34 +207,22 @@ void SAL_CALL MutableTreeDataModel::setRoot( const Reference< XMutableTreeNode >
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
// XTreeDataModel
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
Reference< XTreeNode > SAL_CALL MutableTreeDataModel::getRoot( ) throw (RuntimeException)
|
Reference< XTreeNode > SAL_CALL MutableTreeDataModel::getRoot( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||||
return mxRootNode;
|
return mxRootNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeDataModel::addTreeDataModelListener( const Reference< XTreeDataModelListener >& xListener ) throw (RuntimeException)
|
void SAL_CALL MutableTreeDataModel::addTreeDataModelListener( const Reference< XTreeDataModelListener >& xListener ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
BrdcstHelper.addListener( cppu::UnoType<XTreeDataModelListener>::get(), xListener );
|
BrdcstHelper.addListener( cppu::UnoType<XTreeDataModelListener>::get(), xListener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeDataModel::removeTreeDataModelListener( const Reference< XTreeDataModelListener >& xListener ) throw (RuntimeException)
|
void SAL_CALL MutableTreeDataModel::removeTreeDataModelListener( const Reference< XTreeDataModelListener >& xListener ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
BrdcstHelper.removeListener( cppu::UnoType<XTreeDataModelListener>::get(), xListener );
|
BrdcstHelper.removeListener( cppu::UnoType<XTreeDataModelListener>::get(), xListener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
// XComponent
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeDataModel::dispose() throw (RuntimeException)
|
void SAL_CALL MutableTreeDataModel::dispose() throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||||
@@ -261,24 +236,16 @@ void SAL_CALL MutableTreeDataModel::dispose() throw (RuntimeException)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeDataModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
|
void SAL_CALL MutableTreeDataModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
BrdcstHelper.addListener( cppu::UnoType<XEventListener>::get(), xListener );
|
BrdcstHelper.addListener( cppu::UnoType<XEventListener>::get(), xListener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeDataModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
|
void SAL_CALL MutableTreeDataModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
BrdcstHelper.removeListener( cppu::UnoType<XEventListener>::get(), xListener );
|
BrdcstHelper.removeListener( cppu::UnoType<XEventListener>::get(), xListener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
// XServiceInfo
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
OUString SAL_CALL MutableTreeDataModel::getImplementationName( ) throw (RuntimeException)
|
OUString SAL_CALL MutableTreeDataModel::getImplementationName( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||||
@@ -286,16 +253,11 @@ OUString SAL_CALL MutableTreeDataModel::getImplementationName( ) throw (Runtime
|
|||||||
return aImplName;
|
return aImplName;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
sal_Bool SAL_CALL MutableTreeDataModel::supportsService( const OUString& ServiceName ) throw (RuntimeException)
|
sal_Bool SAL_CALL MutableTreeDataModel::supportsService( const OUString& ServiceName ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
return cppu::supportsService(this, ServiceName);
|
||||||
return ServiceName.equalsAscii( szServiceName_MutableTreeDataModel );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
Sequence< OUString > SAL_CALL MutableTreeDataModel::getSupportedServiceNames( ) throw (RuntimeException)
|
Sequence< OUString > SAL_CALL MutableTreeDataModel::getSupportedServiceNames( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||||
@@ -304,10 +266,6 @@ Sequence< OUString > SAL_CALL MutableTreeDataModel::getSupportedServiceNames( )
|
|||||||
return aSeq;
|
return aSeq;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
|
||||||
// class MutabelTreeNode
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
MutableTreeNode::MutableTreeNode( const MutableTreeDataModelRef& xModel, const Any& rValue, sal_Bool bChildrenOnDemand )
|
MutableTreeNode::MutableTreeNode( const MutableTreeDataModelRef& xModel, const Any& rValue, sal_Bool bChildrenOnDemand )
|
||||||
: maDisplayValue( rValue )
|
: maDisplayValue( rValue )
|
||||||
, mbHasChildrenOnDemand( bChildrenOnDemand )
|
, mbHasChildrenOnDemand( bChildrenOnDemand )
|
||||||
@@ -317,8 +275,6 @@ MutableTreeNode::MutableTreeNode( const MutableTreeDataModelRef& xModel, const A
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
MutableTreeNode::~MutableTreeNode()
|
MutableTreeNode::~MutableTreeNode()
|
||||||
{
|
{
|
||||||
TreeNodeVector::iterator aIter( maChildren.begin() );
|
TreeNodeVector::iterator aIter( maChildren.begin() );
|
||||||
@@ -326,15 +282,11 @@ MutableTreeNode::~MutableTreeNode()
|
|||||||
(*aIter++)->setParent(0);
|
(*aIter++)->setParent(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void MutableTreeNode::setParent( MutableTreeNode* pParent )
|
void MutableTreeNode::setParent( MutableTreeNode* pParent )
|
||||||
{
|
{
|
||||||
mpParent = pParent;
|
mpParent = pParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
MutableTreeNode* MutableTreeNode::getImplementation( const Reference< XTreeNode >& xNode, bool bThrows ) throw (IllegalArgumentException)
|
MutableTreeNode* MutableTreeNode::getImplementation( const Reference< XTreeNode >& xNode, bool bThrows ) throw (IllegalArgumentException)
|
||||||
{
|
{
|
||||||
MutableTreeNode* pImpl = dynamic_cast< MutableTreeNode* >( xNode.get() );
|
MutableTreeNode* pImpl = dynamic_cast< MutableTreeNode* >( xNode.get() );
|
||||||
@@ -344,8 +296,6 @@ MutableTreeNode* MutableTreeNode::getImplementation( const Reference< XTreeNode
|
|||||||
return pImpl;
|
return pImpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void MutableTreeNode::broadcast_changes()
|
void MutableTreeNode::broadcast_changes()
|
||||||
{
|
{
|
||||||
if( mxModel.is() )
|
if( mxModel.is() )
|
||||||
@@ -356,8 +306,6 @@ void MutableTreeNode::broadcast_changes()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void MutableTreeNode::broadcast_changes(const Reference< XTreeNode >& xNode, bool bNew)
|
void MutableTreeNode::broadcast_changes(const Reference< XTreeNode >& xNode, bool bNew)
|
||||||
{
|
{
|
||||||
if( mxModel.is() )
|
if( mxModel.is() )
|
||||||
@@ -367,26 +315,18 @@ void MutableTreeNode::broadcast_changes(const Reference< XTreeNode >& xNode, boo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
// XMutableTreeNode
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
Any SAL_CALL MutableTreeNode::getDataValue() throw (RuntimeException)
|
Any SAL_CALL MutableTreeNode::getDataValue() throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
return maDataValue;
|
return maDataValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeNode::setDataValue( const Any& _datavalue ) throw (RuntimeException)
|
void SAL_CALL MutableTreeNode::setDataValue( const Any& _datavalue ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
maDataValue = _datavalue;
|
maDataValue = _datavalue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeNode::appendChild( const Reference< XMutableTreeNode >& xChildNode ) throw (IllegalArgumentException, RuntimeException)
|
void SAL_CALL MutableTreeNode::appendChild( const Reference< XMutableTreeNode >& xChildNode ) throw (IllegalArgumentException, RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
@@ -403,8 +343,6 @@ void SAL_CALL MutableTreeNode::appendChild( const Reference< XMutableTreeNode >&
|
|||||||
broadcast_changes( xNode, true );
|
broadcast_changes( xNode, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeNode::insertChildByIndex( sal_Int32 nChildIndex, const Reference< XMutableTreeNode >& xChildNode ) throw (IllegalArgumentException, IndexOutOfBoundsException, RuntimeException)
|
void SAL_CALL MutableTreeNode::insertChildByIndex( sal_Int32 nChildIndex, const Reference< XMutableTreeNode >& xChildNode ) throw (IllegalArgumentException, IndexOutOfBoundsException, RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
@@ -429,8 +367,6 @@ void SAL_CALL MutableTreeNode::insertChildByIndex( sal_Int32 nChildIndex, const
|
|||||||
broadcast_changes( xNode, true );
|
broadcast_changes( xNode, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeNode::removeChildByIndex( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
|
void SAL_CALL MutableTreeNode::removeChildByIndex( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
@@ -455,8 +391,6 @@ void SAL_CALL MutableTreeNode::removeChildByIndex( sal_Int32 nChildIndex ) throw
|
|||||||
broadcast_changes( getReference( xImpl.get() ), false );
|
broadcast_changes( getReference( xImpl.get() ), false );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeNode::setHasChildrenOnDemand( sal_Bool bChildrenOnDemand ) throw (RuntimeException)
|
void SAL_CALL MutableTreeNode::setHasChildrenOnDemand( sal_Bool bChildrenOnDemand ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
bool bChanged;
|
bool bChanged;
|
||||||
@@ -471,8 +405,6 @@ void SAL_CALL MutableTreeNode::setHasChildrenOnDemand( sal_Bool bChildrenOnDeman
|
|||||||
broadcast_changes();
|
broadcast_changes();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeNode::setDisplayValue( const Any& aValue ) throw (RuntimeException)
|
void SAL_CALL MutableTreeNode::setDisplayValue( const Any& aValue ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -483,8 +415,6 @@ void SAL_CALL MutableTreeNode::setDisplayValue( const Any& aValue ) throw (Runti
|
|||||||
broadcast_changes();
|
broadcast_changes();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeNode::setNodeGraphicURL( const OUString& rURL ) throw (RuntimeException)
|
void SAL_CALL MutableTreeNode::setNodeGraphicURL( const OUString& rURL ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
bool bChanged;
|
bool bChanged;
|
||||||
@@ -499,8 +429,6 @@ void SAL_CALL MutableTreeNode::setNodeGraphicURL( const OUString& rURL ) throw (
|
|||||||
broadcast_changes();
|
broadcast_changes();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeNode::setExpandedGraphicURL( const OUString& rURL ) throw (RuntimeException)
|
void SAL_CALL MutableTreeNode::setExpandedGraphicURL( const OUString& rURL ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
bool bChanged;
|
bool bChanged;
|
||||||
@@ -515,8 +443,6 @@ void SAL_CALL MutableTreeNode::setExpandedGraphicURL( const OUString& rURL ) thr
|
|||||||
broadcast_changes();
|
broadcast_changes();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
void SAL_CALL MutableTreeNode::setCollapsedGraphicURL( const OUString& rURL ) throw (RuntimeException)
|
void SAL_CALL MutableTreeNode::setCollapsedGraphicURL( const OUString& rURL ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
bool bChanged;
|
bool bChanged;
|
||||||
@@ -531,10 +457,6 @@ void SAL_CALL MutableTreeNode::setCollapsedGraphicURL( const OUString& rURL ) th
|
|||||||
broadcast_changes();
|
broadcast_changes();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
// XTreeNode
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
Reference< XTreeNode > SAL_CALL MutableTreeNode::getChildAt( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException,RuntimeException)
|
Reference< XTreeNode > SAL_CALL MutableTreeNode::getChildAt( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException,RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
@@ -544,24 +466,18 @@ Reference< XTreeNode > SAL_CALL MutableTreeNode::getChildAt( sal_Int32 nChildInd
|
|||||||
return getReference( maChildren[nChildIndex].get() );
|
return getReference( maChildren[nChildIndex].get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
sal_Int32 SAL_CALL MutableTreeNode::getChildCount( ) throw (RuntimeException)
|
sal_Int32 SAL_CALL MutableTreeNode::getChildCount( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
return (sal_Int32)maChildren.size();
|
return (sal_Int32)maChildren.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
Reference< XTreeNode > SAL_CALL MutableTreeNode::getParent( ) throw (RuntimeException)
|
Reference< XTreeNode > SAL_CALL MutableTreeNode::getParent( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
return getReference( mpParent );
|
return getReference( mpParent );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
sal_Int32 SAL_CALL MutableTreeNode::getIndex( const Reference< XTreeNode >& xNode ) throw (RuntimeException)
|
sal_Int32 SAL_CALL MutableTreeNode::getIndex( const Reference< XTreeNode >& xNode ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
@@ -580,50 +496,36 @@ sal_Int32 SAL_CALL MutableTreeNode::getIndex( const Reference< XTreeNode >& xNod
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
sal_Bool SAL_CALL MutableTreeNode::hasChildrenOnDemand( ) throw (RuntimeException)
|
sal_Bool SAL_CALL MutableTreeNode::hasChildrenOnDemand( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
return mbHasChildrenOnDemand;
|
return mbHasChildrenOnDemand;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
Any SAL_CALL MutableTreeNode::getDisplayValue( ) throw (RuntimeException)
|
Any SAL_CALL MutableTreeNode::getDisplayValue( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
return maDisplayValue;
|
return maDisplayValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
OUString SAL_CALL MutableTreeNode::getNodeGraphicURL( ) throw (RuntimeException)
|
OUString SAL_CALL MutableTreeNode::getNodeGraphicURL( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
return maNodeGraphicURL;
|
return maNodeGraphicURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
OUString SAL_CALL MutableTreeNode::getExpandedGraphicURL( ) throw (RuntimeException)
|
OUString SAL_CALL MutableTreeNode::getExpandedGraphicURL( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
return maExpandedGraphicURL;
|
return maExpandedGraphicURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
OUString SAL_CALL MutableTreeNode::getCollapsedGraphicURL( ) throw (RuntimeException)
|
OUString SAL_CALL MutableTreeNode::getCollapsedGraphicURL( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
return maCollapsedGraphicURL;
|
return maCollapsedGraphicURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
// XServiceInfo
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
OUString SAL_CALL MutableTreeNode::getImplementationName( ) throw (RuntimeException)
|
OUString SAL_CALL MutableTreeNode::getImplementationName( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
@@ -631,16 +533,11 @@ OUString SAL_CALL MutableTreeNode::getImplementationName( ) throw (RuntimeExcep
|
|||||||
return aImplName;
|
return aImplName;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
sal_Bool SAL_CALL MutableTreeNode::supportsService( const OUString& ServiceName ) throw (RuntimeException)
|
sal_Bool SAL_CALL MutableTreeNode::supportsService( const OUString& ServiceName ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
return cppu::supportsService(this, ServiceName);
|
||||||
return ServiceName == "com.sun.star.awt.tree.MutableTreeNode";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
|
||||||
|
|
||||||
Sequence< OUString > SAL_CALL MutableTreeNode::getSupportedServiceNames( ) throw (RuntimeException)
|
Sequence< OUString > SAL_CALL MutableTreeNode::getSupportedServiceNames( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
::osl::Guard< ::osl::Mutex > aGuard( maMutex );
|
||||||
|
Reference in New Issue
Block a user