Update ooo320-m1
[ooovba.git] / sd / source / core / annotations / AnnotationAccess.cxx
blobffcca97962e8f5069bc9d775dad0dc1c05005894
1 #include "sal/config.h"
2 #include "com/sun/star/uno/XComponentContext.hpp"
3 #include "cppuhelper/implbase1.hxx"
4 #include "com/sun/star/office/XAnnotationAccess.hpp"
6 namespace css = ::com::sun::star;
8 class AnnotationAccess:
9 public ::cppu::WeakImplHelper1<
10 css::office::XAnnotationAccess>
12 public:
13 explicit AnnotationAccess(css::uno::Reference< css::uno::XComponentContext > const & context);
15 // ::com::sun::star::office::XAnnotationAccess:
16 virtual css::uno::Reference< css::office::XAnnotation > SAL_CALL createAndInsertAnnotation() throw (css::uno::RuntimeException);
17 virtual void SAL_CALL removeAnnotation(const css::uno::Reference< css::office::XAnnotation > & annotation) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
18 virtual css::uno::Reference< css::office::XAnnotationEnumeration > SAL_CALL createAnnotationEnumeration() throw (css::uno::RuntimeException);
20 private:
21 AnnotationAccess(const AnnotationAccess &); // not defined
22 AnnotationAccess& operator=(const AnnotationAccess &); // not defined
24 // destructor is private and will be called indirectly by the release call virtual ~AnnotationAccess() {}
26 css::uno::Reference< css::uno::XComponentContext > m_xContext;
29 AnnotationAccess::AnnotationAccess(css::uno::Reference< css::uno::XComponentContext > const & context) :
30 m_xContext(context)
33 // ::com::sun::star::office::XAnnotationAccess:
34 css::uno::Reference< css::office::XAnnotation > SAL_CALL AnnotationAccess::createAndInsertAnnotation() throw (css::uno::RuntimeException)
36 // TODO: Exchange the default return implementation for "createAndInsertAnnotation" !!!
37 // Exchange the default return implementation.
38 // NOTE: Default initialized polymorphic structs can cause problems because of
39 // missing default initialization of primitive types of some C++ compilers or
40 // different Any initialization in Java and C++ polymorphic structs.
41 return css::uno::Reference< css::office::XAnnotation >();
44 void SAL_CALL AnnotationAccess::removeAnnotation(const css::uno::Reference< css::office::XAnnotation > & annotation) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException)
46 // TODO: Insert your implementation for "removeAnnotation" here.
49 css::uno::Reference< css::office::XAnnotationEnumeration > SAL_CALL AnnotationAccess::createAnnotationEnumeration() throw (css::uno::RuntimeException)
51 // TODO: Exchange the default return implementation for "createAnnotationEnumeration" !!!
52 // Exchange the default return implementation.
53 // NOTE: Default initialized polymorphic structs can cause problems because of
54 // missing default initialization of primitive types of some C++ compilers or
55 // different Any initialization in Java and C++ polymorphic structs.
56 return css::uno::Reference< css::office::XAnnotationEnumeration >();