update emoji autocorrect entries from po-files
[LibreOffice.git] / sc / inc / notesuno.hxx
blobe11f3ad8f4fd532d6fb9a5a34c72fecc69c63ffb
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 .
20 #ifndef INCLUDED_SC_INC_NOTESUNO_HXX
21 #define INCLUDED_SC_INC_NOTESUNO_HXX
23 #include <com/sun/star/sheet/XSheetAnnotation.hpp>
24 #include <com/sun/star/sheet/XSheetAnnotationShapeSupplier.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <com/sun/star/container/XChild.hpp>
27 #include <com/sun/star/text/XSimpleText.hpp>
28 #include <cppuhelper/implbase5.hxx>
29 #include <svl/lstner.hxx>
30 #include "address.hxx"
32 class ScDocShell;
33 class SvxUnoText;
34 class ScPostIt;
36 class ScAnnotationObj : public cppu::WeakImplHelper5<
37 com::sun::star::container::XChild,
38 com::sun::star::text::XSimpleText,
39 com::sun::star::sheet::XSheetAnnotation,
40 com::sun::star::sheet::XSheetAnnotationShapeSupplier,
41 com::sun::star::lang::XServiceInfo >,
42 public SfxListener
44 public:
45 ScAnnotationObj(ScDocShell* pDocSh, const ScAddress& rPos);
46 virtual ~ScAnnotationObj();
48 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
50 /// XChild
51 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
52 getParent() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
53 virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference<
54 ::com::sun::star::uno::XInterface >& Parent )
55 throw(::com::sun::star::lang::NoSupportException,
56 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
58 /// XSimpleText
59 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL
60 createTextCursor() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
61 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL
62 createTextCursorByRange( const ::com::sun::star::uno::Reference<
63 ::com::sun::star::text::XTextRange >& aTextPosition )
64 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
65 virtual void SAL_CALL insertString( const ::com::sun::star::uno::Reference<
66 ::com::sun::star::text::XTextRange >& xRange,
67 const OUString& aString, sal_Bool bAbsorb )
68 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69 virtual void SAL_CALL insertControlCharacter( const ::com::sun::star::uno::Reference<
70 ::com::sun::star::text::XTextRange >& xRange,
71 sal_Int16 nControlCharacter, sal_Bool bAbsorb )
72 throw(::com::sun::star::lang::IllegalArgumentException,
73 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
75 /// XTextRange
76 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL
77 getText() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL
79 getStart() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL
81 getEnd() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
82 virtual OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
83 virtual void SAL_CALL setString( const OUString& aString )
84 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
86 /// XSheetAnnotation
87 virtual ::com::sun::star::table::CellAddress SAL_CALL getPosition()
88 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
89 virtual OUString SAL_CALL getAuthor()
90 throw(::com::sun::star::uno::RuntimeException,
91 std::exception) SAL_OVERRIDE;
92 virtual OUString SAL_CALL getDate()
93 throw(::com::sun::star::uno::RuntimeException,
94 std::exception) SAL_OVERRIDE;
95 virtual sal_Bool SAL_CALL getIsVisible()
96 throw(::com::sun::star::uno::RuntimeException,
97 std::exception) SAL_OVERRIDE;
98 virtual void SAL_CALL setIsVisible( sal_Bool bIsVisible )
99 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
101 /// XSheetAnnotationShapeSupplier
102 virtual ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > SAL_CALL
103 getAnnotationShape()
104 throw(::com::sun::star::uno::RuntimeException,
105 std::exception) SAL_OVERRIDE;
107 /// XServiceInfo
108 virtual OUString SAL_CALL getImplementationName()
109 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
110 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
111 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
112 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
113 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
115 private:
116 SvxUnoText& GetUnoText();
118 const ScPostIt* ImplGetNote() const;
120 private:
121 ScDocShell* pDocShell;
122 ScAddress aCellPos;
123 SvxUnoText* pUnoText;
126 #endif
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */