From 4d6bcb340d250205b0008cfa9b822f79bd5537c0 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Mon, 24 Jan 2011 17:16:29 +0100 Subject: Remove FS_PRIV_DEBUG directive. --- .../source/property/propertystatecontainer.cxx | 144 --------------------- 1 file changed, 144 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx index 7722e4302aa6..f1611efd77f4 100644 --- a/comphelper/source/property/propertystatecontainer.cxx +++ b/comphelper/source/property/propertystatecontainer.cxx @@ -194,148 +194,4 @@ namespace comphelper } // namespace comphelper //......................................................................... -#ifdef FS_PRIV_DEBUG -#define STATECONTAINER_TEST -#endif - -#ifdef STATECONTAINER_TEST -#include -#include -#include - -//......................................................................... -namespace comphelper -{ -//......................................................................... - - using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::beans; - - //===================================================================== - //= Test - compiler test - //===================================================================== - typedef ::cppu::OWeakAggObject Test_RefCountBase; - class Test :public OMutexAndBroadcastHelper - ,public OPropertyStateContainer - ,public OPropertyArrayUsageHelper< Test > - ,public Test_RefCountBase - { - private: - ::rtl::OUString m_sStringProperty; - Reference< XInterface > m_xInterfaceProperty; - Any m_aMayBeVoidProperty; - - protected: - Test( ); - - DECLARE_XINTERFACE( ) - - public: - static Test* Create( ); - - protected: - virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(RuntimeException); - virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; - - protected: - // OPropertyStateContainer overridables - virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const; - }; - - //--------------------------------------------------------------------- - Test::Test( ) - :OPropertyStateContainer( GetBroadcastHelper() ) - { - registerProperty( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringProperty" )), - 1, - PropertyAttribute::BOUND, - &m_sStringProperty, - ::getCppuType( &m_sStringProperty ) - ); - - registerProperty( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InterfaceProperty" )), - 2, - PropertyAttribute::BOUND, - &m_xInterfaceProperty, - ::getCppuType( &m_xInterfaceProperty ) - ); - - registerMayBeVoidProperty( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IntProperty" )), - 3, - PropertyAttribute::BOUND, - &m_aMayBeVoidProperty, - ::getCppuType( static_cast< sal_Int32* >( NULL ) ) - ); - - registerPropertyNoMember( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OtherInterfaceProperty" )), - 4, - PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID, - ::getCppuType( static_cast< Reference< XInterface >* >( NULL ) ), - NULL - ); - } - - //--------------------------------------------------------------------- - IMPLEMENT_FORWARD_XINTERFACE2( Test, Test_RefCountBase, OPropertyStateContainer ) - - //--------------------------------------------------------------------- - void Test::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const - { - switch ( _nHandle ) - { - case 1: - _rDefault = makeAny( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringPropertyDefault" ) ) ); - break; - case 2: - _rDefault = makeAny( Reference< XInterface >( ) ); - break; - case 3: - // void - break; - case 4: - _rDefault = makeAny( Reference< XInterface >( ) ); - break; - default: - OSL_ENSURE( sal_False, "Test::getPropertyDefaultByHandle: invalid handle!" ); - } - } - - //--------------------------------------------------------------------- - Reference< XPropertySetInfo > SAL_CALL Test::getPropertySetInfo( ) throw(RuntimeException) - { - return createPropertySetInfo( getInfoHelper() ); - } - - //--------------------------------------------------------------------- - ::cppu::IPropertyArrayHelper& SAL_CALL Test::getInfoHelper() - { - return *getArrayHelper(); - } - - //--------------------------------------------------------------------- - ::cppu::IPropertyArrayHelper* Test::createArrayHelper( ) const - { - Sequence< Property > aProps; - describeProperties( aProps ); - return new ::cppu::OPropertyArrayHelper( aProps ); - } - - //--------------------------------------------------------------------- - Test* Test::Create( ) - { - Test* pInstance = new Test; - return pInstance; - } - -//......................................................................... -} // namespace comphelper -//......................................................................... - -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit