tdf#125181 maxY is 50000 in prstGeom for star24 and star32
[LibreOffice.git] / sc / inc / notesuno.hxx
blob59af4726022af1f67f92fd573091d73c7d6ad045
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/implbase.hxx>
29 #include <svl/lstner.hxx>
30 #include <rtl/ref.hxx>
31 #include "address.hxx"
33 class ScDocShell;
34 class SvxUnoText;
35 class ScPostIt;
37 class ScAnnotationObj : public cppu::WeakImplHelper<
38 css::container::XChild,
39 css::text::XSimpleText,
40 css::sheet::XSheetAnnotation,
41 css::sheet::XSheetAnnotationShapeSupplier,
42 css::lang::XServiceInfo >,
43 public SfxListener
45 public:
46 ScAnnotationObj(ScDocShell* pDocSh, const ScAddress& rPos);
47 virtual ~ScAnnotationObj() override;
49 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
51 /// XChild
52 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
53 getParent() override;
54 virtual void SAL_CALL setParent( const css::uno::Reference<
55 css::uno::XInterface >& Parent ) override;
57 /// XSimpleText
58 virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL
59 createTextCursor() override;
60 virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL
61 createTextCursorByRange( const css::uno::Reference< css::text::XTextRange >& aTextPosition ) override;
62 virtual void SAL_CALL insertString( const css::uno::Reference<
63 css::text::XTextRange >& xRange,
64 const OUString& aString, sal_Bool bAbsorb ) override;
65 virtual void SAL_CALL insertControlCharacter( const css::uno::Reference< css::text::XTextRange >& xRange,
66 sal_Int16 nControlCharacter, sal_Bool bAbsorb ) override;
68 /// XTextRange
69 virtual css::uno::Reference< css::text::XText > SAL_CALL
70 getText() override;
71 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL
72 getStart() override;
73 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL
74 getEnd() override;
75 virtual OUString SAL_CALL getString() override;
76 virtual void SAL_CALL setString( const OUString& aString ) override;
78 /// XSheetAnnotation
79 virtual css::table::CellAddress SAL_CALL getPosition() override;
80 virtual OUString SAL_CALL getAuthor() override;
81 virtual OUString SAL_CALL getDate() override;
82 virtual sal_Bool SAL_CALL getIsVisible() override;
83 virtual void SAL_CALL setIsVisible( sal_Bool bIsVisible ) override;
85 /// XSheetAnnotationShapeSupplier
86 virtual css::uno::Reference < css::drawing::XShape > SAL_CALL
87 getAnnotationShape() override;
89 /// XServiceInfo
90 virtual OUString SAL_CALL getImplementationName() override;
91 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
92 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
94 private:
95 SvxUnoText& GetUnoText();
97 const ScPostIt* ImplGetNote() const;
99 private:
100 ScDocShell* pDocShell;
101 ScAddress const aCellPos;
102 rtl::Reference<SvxUnoText> pUnoText;
105 #endif
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */