diff options
Diffstat (limited to 'source/dpmember.cxx')
-rw-r--r-- | source/dpmember.cxx | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/source/dpmember.cxx b/source/dpmember.cxx index 541b21a..6d2096b 100644 --- a/source/dpmember.cxx +++ b/source/dpmember.cxx @@ -1,9 +1,54 @@ #include "dpmember.hxx" +using ::com::sun::star::beans::PropertyVetoException; +using ::com::sun::star::beans::UnknownPropertyException; +using ::com::sun::star::beans::XPropertyChangeListener; +using ::com::sun::star::beans::XPropertySetInfo; +using ::com::sun::star::beans::XVetoableChangeListener; +using ::com::sun::star::lang::IllegalArgumentException; +using ::com::sun::star::lang::WrappedTargetException; +using ::com::sun::star::uno::Any; +using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::RuntimeException; using ::rtl::OUString; +#include <stdio.h> +#include <string> +#include <sys/time.h> + +namespace { + +class StackPrinter +{ +public: + explicit StackPrinter(const char* msg) : + msMsg(msg) + { + fprintf(stdout, "%s: --begin\n", msMsg.c_str()); + mfStartTime = getTime(); + } + + ~StackPrinter() + { + double fEndTime = getTime(); + fprintf(stdout, "%s: --end (duration: %g sec)\n", msMsg.c_str(), (fEndTime-mfStartTime)); + } + +private: + double getTime() const + { + timeval tv; + gettimeofday(&tv, NULL); + return tv.tv_sec + tv.tv_usec / 1000000.0; + } + + ::std::string msMsg; + double mfStartTime; +}; + +} + namespace dpsource { DPMember::DPMember() @@ -25,4 +70,48 @@ void DPMember::setName(const OUString& aName) throw (RuntimeException) maName = aName; } +// XPropertySet + +Reference<XPropertySetInfo> DPMember::getPropertySetInfo() throw (RuntimeException) +{ + return Reference<XPropertySetInfo>(); +} + +void DPMember::setPropertyValue(const OUString& aPropertyName, const Any& aValue) + throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) +{ + fprintf(stdout, "DPMember::setPropertyValue: prop name = '%s'\n", rtl::OUStringToOString(aPropertyName, RTL_TEXTENCODING_UTF8).getStr()); +} + +Any DPMember::getPropertyValue(const OUString& aPropertyName) + throw (UnknownPropertyException, WrappedTargetException, RuntimeException) +{ + fprintf(stdout, "DPMember::getPropertyValue: prop name = '%s'\n", rtl::OUStringToOString(aPropertyName, RTL_TEXTENCODING_UTF8).getStr()); + return Any(); +} + +void DPMember::addPropertyChangeListener( + const OUString& aPropertyName, const Reference<XPropertyChangeListener>& xListener) + throw (UnknownPropertyException, WrappedTargetException, RuntimeException) +{ +} + +void DPMember::removePropertyChangeListener( + const OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) + throw (UnknownPropertyException, WrappedTargetException, RuntimeException) +{ +} + +void DPMember::addVetoableChangeListener( + const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener) + throw (UnknownPropertyException, WrappedTargetException, RuntimeException) +{ +} + +void DPMember::removeVetoableChangeListener( + const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener) + throw (UnknownPropertyException, WrappedTargetException, RuntimeException) +{ +} + } |