diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2009-07-09 00:19:46 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2009-07-09 00:19:46 -0400 |
commit | 43e75a849e57225aa03a2396d0e39ee8b81b0615 (patch) | |
tree | 3a00f34125c366265c9e47c1b1100e25fcdf5a9d | |
parent | 7fa0bf86fa812dc30bbd48a679b0bb9a4afdfe4a (diff) |
Initial work on hierarchy.
-rw-r--r-- | cmake/CMakeLists.txt | 3 | ||||
-rw-r--r-- | inc/dphierarchy.hxx | 39 | ||||
-rw-r--r-- | source/dphierarchy.cxx | 36 |
3 files changed, 77 insertions, 1 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 4e51731..d2dfa18 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.6) -project(DP_SOURCE_EXTENSION) +project(CALC_DP_CONNECTOR) set(TARGET_NAME sapconnector.uno) set(SHARED_LIB_NAME lib${TARGET_NAME}.so) @@ -30,6 +30,7 @@ set(SRC_FILES ../source/dpdimensions.cxx ../source/dpdimension.cxx ../source/dphierarchies.cxx + ../source/dphierarchy.cxx ) add_library(${TARGET_NAME} SHARED ${SRC_FILES}) diff --git a/inc/dphierarchy.hxx b/inc/dphierarchy.hxx new file mode 100644 index 0000000..f324013 --- /dev/null +++ b/inc/dphierarchy.hxx @@ -0,0 +1,39 @@ +#ifndef __DPHIEARCHIES_HXX__ +#define __DPHIEARCHIES_HXX__ + +#include <cppuhelper/implbase2.hxx> + +#include <com/sun/star/container/XNamed.hpp> +#include <com/sun/star/sheet/XLevelsSupplier.hpp> + +namespace dpsource { + +class DPHierarchy : public ::cppu::WeakImplHelper2< + ::com::sun::star::container::XNamed, + ::com::sun::star::sheet::XLevelsSupplier > +{ +public: + DPHierarchy(); + ~DPHierarchy(); + + // XNamed + + ::rtl::OUString SAL_CALL getName() throw (::com::sun::star::uno::RuntimeException); + + void SAL_CALL setName(const ::rtl::OUString& aName) + throw (::com::sun::star::uno::RuntimeException); + + // XLevelsSupplier + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > + SAL_CALL getLevels() throw (::com::sun::star::uno::RuntimeException); + +private: + ::rtl::OUString maName; +}; + + +} + + +#endif diff --git a/source/dphierarchy.cxx b/source/dphierarchy.cxx new file mode 100644 index 0000000..fd30a5b --- /dev/null +++ b/source/dphierarchy.cxx @@ -0,0 +1,36 @@ + +#include "dphierarchy.hxx" + +using ::com::sun::star::container::XNameAccess; +using ::com::sun::star::uno::RuntimeException; +using ::com::sun::star::uno::Reference; +using ::rtl::OUString; + +namespace dpsource { + +DPHierarchy::DPHierarchy() +{ +} + +DPHierarchy::~DPHierarchy() +{ +} + +// XNamed + +OUString DPHierarchy::getName() throw (RuntimeException) +{ + return maName; +} + +void DPHierarchy::setName(const OUString& aName) throw (RuntimeException) +{ + maName = aName; +} + +Reference<XNameAccess> DPHierarchy::getLevels() throw (RuntimeException) +{ + return Reference<XNameAccess>(); +} + +} |