merge the formfield patch from ooo-build
[ooovba.git] / sc / source / ui / vba / vbacomment.hxx
blob4261ee9b18e5865ee3229a77765b73de1b1b36e5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: vbacomment.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SC_VBA_COMMENT_HXX
31 #define SC_VBA_COMMENT_HXX
33 #include <cppuhelper/implbase1.hxx>
35 #include <ooo/vba/excel/XComment.hpp>
36 #include <ooo/vba/excel/XApplication.hpp>
37 #include <com/sun/star/sheet/XSheetAnnotations.hpp>
38 #include <com/sun/star/sheet/XSheetAnnotation.hpp>
39 #include <com/sun/star/table/XCellRange.hpp>
40 #include <com/sun/star/uno/XComponentContext.hpp>
42 #include <vbahelper/vbahelperinterface.hxx>
44 typedef InheritedHelperInterfaceImpl1< ov::excel::XComment > ScVbaComment_BASE;
46 class ScVbaComment : public ScVbaComment_BASE
48 css::uno::Reference< css::table::XCellRange > mxRange;
50 private:
51 css::uno::Reference< css::sheet::XSheetAnnotation > SAL_CALL getAnnotation() throw (css::uno::RuntimeException);
52 css::uno::Reference< css::sheet::XSheetAnnotations > SAL_CALL getAnnotations() throw (css::uno::RuntimeException);
53 sal_Int32 SAL_CALL getAnnotationIndex() throw (css::uno::RuntimeException);
54 css::uno::Reference< ov::excel::XComment > SAL_CALL getCommentByIndex( sal_Int32 Index ) throw (css::uno::RuntimeException);
55 public:
56 ScVbaComment( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::lang::IllegalArgumentException );
58 virtual ~ScVbaComment() {}
60 // Attributes
61 virtual rtl::OUString SAL_CALL getAuthor() throw (css::uno::RuntimeException);
62 virtual void SAL_CALL setAuthor( const rtl::OUString& _author ) throw (css::uno::RuntimeException);
63 virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
64 virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
66 // Methods
67 virtual void SAL_CALL Delete() throw (css::uno::RuntimeException);
68 virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Next() throw (css::uno::RuntimeException);
69 virtual css::uno::Reference< ov::excel::XComment > SAL_CALL Previous() throw (css::uno::RuntimeException);
70 virtual rtl::OUString SAL_CALL Text( const css::uno::Any& Text, const css::uno::Any& Start, const css::uno::Any& Overwrite ) throw (css::uno::RuntimeException);
71 // XHelperInterface
72 virtual rtl::OUString& getServiceImplName();
73 virtual css::uno::Sequence<rtl::OUString> getServiceNames();
76 #endif /* SC_VBA_COMMENT_HXX */