nss: upgrade to release 3.73
[LibreOffice.git] / sc / source / ui / vba / vbacomment.hxx
blobf93fb76e41e2d7315460ac9e986a4e6fe96403de
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SC_SOURCE_UI_VBA_VBACOMMENT_HXX
20 #define INCLUDED_SC_SOURCE_UI_VBA_VBACOMMENT_HXX
22 #include <ooo/vba/excel/XComment.hpp>
23 #include <ooo/vba/msforms/XShape.hpp>
24 #include <com/sun/star/sheet/XSheetAnnotations.hpp>
25 #include <com/sun/star/sheet/XSheetAnnotation.hpp>
26 #include <com/sun/star/table/XCellRange.hpp>
27 #include <com/sun/star/uno/XComponentContext.hpp>
29 #include <vbahelper/vbahelperinterface.hxx>
31 typedef InheritedHelperInterfaceWeakImpl< ov::excel::XComment > ScVbaComment_BASE;
33 class ScVbaComment : public ScVbaComment_BASE
35 css::uno::Reference< css::frame::XModel > mxModel;
36 css::uno::Reference< css::table::XCellRange > mxRange;
38 private:
39 /// @throws css::uno::RuntimeException
40 css::uno::Reference< css::sheet::XSheetAnnotation > getAnnotation();
41 /// @throws css::uno::RuntimeException
42 css::uno::Reference< css::sheet::XSheetAnnotations > getAnnotations() const;
43 /// @throws css::uno::RuntimeException
44 sal_Int32 getAnnotationIndex();
45 /// @throws css::uno::RuntimeException
46 css::uno::Reference< ov::excel::XComment > getCommentByIndex( sal_Int32 Index );
47 public:
48 /// @throws css::lang::IllegalArgumentException
49 /// @throws css::uno::RuntimeException
50 ScVbaComment(
51 const css::uno::Reference< ov::XHelperInterface >& xParent,
52 const css::uno::Reference< css::uno::XComponentContext >& xContext,
53 const css::uno::Reference< css::frame::XModel >& xModel,
54 const css::uno::Reference< css::table::XCellRange >& xRange );
56 // Attributes
57 virtual OUString SAL_CALL getAuthor() override;
58 virtual void SAL_CALL setAuthor( const OUString& _author ) override;
59 virtual css::uno::Reference< ov::msforms::XShape > SAL_CALL getShape() override;
60 virtual sal_Bool SAL_CALL getVisible() override;
61 virtual void SAL_CALL setVisible( sal_Bool _visible ) override;
63 // Methods
64 virtual void SAL_CALL Delete() override;
65 virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Next() override;
66 virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Previous() override;
67 virtual OUString SAL_CALL Text( const css::uno::Any& Text, const css::uno::Any& Start, const css::uno::Any& Overwrite ) override;
68 // XHelperInterface
69 virtual OUString getServiceImplName() override;
70 virtual css::uno::Sequence<OUString> getServiceNames() override;
73 #endif // INCLUDED_SC_SOURCE_UI_VBA_VBACOMMENT_HXX
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */