tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / vba / vbacomment.hxx
blobfe801899ca5d01e0fc31844f4256d7deb6d6d980
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 #pragma once
21 #include <ooo/vba/excel/XComment.hpp>
22 #include <ooo/vba/msforms/XShape.hpp>
23 #include <com/sun/star/sheet/XSheetAnnotations.hpp>
24 #include <com/sun/star/sheet/XSheetAnnotation.hpp>
25 #include <com/sun/star/table/XCellRange.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <vbahelper/vbahelperinterface.hxx>
30 typedef InheritedHelperInterfaceWeakImpl< ov::excel::XComment > ScVbaComment_BASE;
32 class ScVbaComment : public ScVbaComment_BASE
34 css::uno::Reference< css::frame::XModel > mxModel;
35 css::uno::Reference< css::table::XCellRange > mxRange;
37 private:
38 /// @throws css::uno::RuntimeException
39 css::uno::Reference< css::sheet::XSheetAnnotation > getAnnotation();
40 /// @throws css::uno::RuntimeException
41 css::uno::Reference< css::sheet::XSheetAnnotations > getAnnotations() const;
42 /// @throws css::uno::RuntimeException
43 sal_Int32 getAnnotationIndex();
44 /// @throws css::uno::RuntimeException
45 css::uno::Reference< ov::excel::XComment > getCommentByIndex( sal_Int32 Index );
46 public:
47 /// @throws css::lang::IllegalArgumentException
48 /// @throws css::uno::RuntimeException
49 ScVbaComment(
50 const css::uno::Reference< ov::XHelperInterface >& xParent,
51 const css::uno::Reference< css::uno::XComponentContext >& xContext,
52 const css::uno::Reference< css::frame::XModel >& xModel,
53 const css::uno::Reference< css::table::XCellRange >& xRange );
55 // Attributes
56 virtual OUString SAL_CALL getAuthor() override;
57 virtual void SAL_CALL setAuthor( const OUString& _author ) override;
58 virtual css::uno::Reference< ov::msforms::XShape > SAL_CALL getShape() override;
59 virtual sal_Bool SAL_CALL getVisible() override;
60 virtual void SAL_CALL setVisible( sal_Bool _visible ) override;
62 // Methods
63 virtual void SAL_CALL Delete() override;
64 virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Next() override;
65 virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Previous() override;
66 virtual OUString SAL_CALL Text( const css::uno::Any& Text, const css::uno::Any& Start, const css::uno::Any& Overwrite ) override;
67 // XHelperInterface
68 virtual OUString getServiceImplName() override;
69 virtual css::uno::Sequence<OUString> getServiceNames() override;
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */