Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef INCLUDED_SC_SOURCE_UI_VBA_VBACOMMENT_HXX
20 : #define INCLUDED_SC_SOURCE_UI_VBA_VBACOMMENT_HXX
21 :
22 : #include <cppuhelper/implbase1.hxx>
23 :
24 : #include <ooo/vba/excel/XComment.hpp>
25 : #include <ooo/vba/excel/XApplication.hpp>
26 : #include <ooo/vba/msforms/XShape.hpp>
27 : #include <com/sun/star/sheet/XSheetAnnotations.hpp>
28 : #include <com/sun/star/sheet/XSheetAnnotation.hpp>
29 : #include <com/sun/star/table/XCellRange.hpp>
30 : #include <com/sun/star/uno/XComponentContext.hpp>
31 :
32 : #include <vbahelper/vbahelperinterface.hxx>
33 :
34 : typedef InheritedHelperInterfaceImpl1< ov::excel::XComment > ScVbaComment_BASE;
35 :
36 : class ScVbaComment : public ScVbaComment_BASE
37 : {
38 : css::uno::Reference< css::frame::XModel > mxModel;
39 : css::uno::Reference< css::table::XCellRange > mxRange;
40 :
41 : private:
42 : css::uno::Reference< css::sheet::XSheetAnnotation > SAL_CALL getAnnotation() throw (css::uno::RuntimeException);
43 : css::uno::Reference< css::sheet::XSheetAnnotations > SAL_CALL getAnnotations() throw (css::uno::RuntimeException);
44 : sal_Int32 SAL_CALL getAnnotationIndex() throw (css::uno::RuntimeException);
45 : css::uno::Reference< ov::excel::XComment > SAL_CALL getCommentByIndex( sal_Int32 Index ) throw (css::uno::RuntimeException);
46 : public:
47 : ScVbaComment(
48 : const css::uno::Reference< ov::XHelperInterface >& xParent,
49 : const css::uno::Reference< css::uno::XComponentContext >& xContext,
50 : const css::uno::Reference< css::frame::XModel >& xModel,
51 : const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException );
52 :
53 0 : virtual ~ScVbaComment() {}
54 :
55 : // Attributes
56 : virtual OUString SAL_CALL getAuthor() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
57 : virtual void SAL_CALL setAuthor( const OUString& _author ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
58 : virtual css::uno::Reference< ov::msforms::XShape > SAL_CALL getShape() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
59 : virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 : virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
61 :
62 : // Methods
63 : virtual void SAL_CALL Delete() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
64 : virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Next() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
65 : virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Previous() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
66 : virtual OUString SAL_CALL Text( const css::uno::Any& Text, const css::uno::Any& Start, const css::uno::Any& Overwrite ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
67 : // XHelperInterface
68 : virtual OUString getServiceImplName() SAL_OVERRIDE;
69 : virtual css::uno::Sequence<OUString> getServiceNames() SAL_OVERRIDE;
70 : };
71 :
72 : #endif // INCLUDED_SC_SOURCE_UI_VBA_VBACOMMENT_HXX
73 :
74 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|