diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-01-24 17:16:29 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-01-24 22:20:45 +0100 |
commit | 4d6bcb340d250205b0008cfa9b822f79bd5537c0 (patch) | |
tree | a1143cd85248dfabc788cb75964e1d1b505ca889 /comphelper/source | |
parent | 8918fd30abdab38a6292e04d5e9d3953be25b074 (diff) |
Remove FS_PRIV_DEBUG directive.
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/property/propertystatecontainer.cxx | 144 |
1 files changed, 0 insertions, 144 deletions
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 <com/sun/star/beans/PropertyAttribute.hpp> -#include <comphelper/proparrhlp.hxx> -#include <comphelper/broadcasthelper.hxx> - -//......................................................................... -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: */ |