/src/libreoffice/include/svx/annotation/AnnotationObject.hxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | */ |
9 | | |
10 | | #pragma once |
11 | | |
12 | | #include <svx/svxdllapi.h> |
13 | | |
14 | | #include <svx/annotation/Annotation.hxx> |
15 | | #include <svx/svdorect.hxx> |
16 | | |
17 | | namespace sdr::annotation |
18 | | { |
19 | | /** Annotation data that contains the annotation unique ID and author's ID */ |
20 | | struct SVXCORE_DLLPUBLIC AnnotationViewData |
21 | | { |
22 | | sal_Int32 nIndex = -1; |
23 | | sal_uInt16 nAuthorIndex = 0; |
24 | | }; |
25 | | |
26 | | /** Annotation (sdr) object, which represents an annotation inside the document */ |
27 | | class SVXCORE_DLLPUBLIC AnnotationObject final : public SdrRectObj |
28 | | { |
29 | | private: |
30 | | virtual ~AnnotationObject() override; |
31 | | |
32 | | sdr::annotation::AnnotationViewData maViewData; |
33 | | |
34 | | public: |
35 | | AnnotationObject(SdrModel& rSdrModel, AnnotationObject const& rSource); |
36 | | AnnotationObject(SdrModel& rSdrModel, tools::Rectangle const& rRectangle, |
37 | | sdr::annotation::AnnotationViewData const& aAnnotationViewData); |
38 | | |
39 | | void setup(); |
40 | | |
41 | | rtl::Reference<SdrObject> CloneSdrObject(SdrModel& rTargetModel) const override; |
42 | | |
43 | | SdrObjKind GetObjIdentifier() const override; |
44 | | OUString TakeObjNameSingul() const override; |
45 | | OUString TakeObjNamePlural() const override; |
46 | | |
47 | | void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; |
48 | | |
49 | | void ApplyAnnotationName(); |
50 | | |
51 | | bool HasTextEdit() const override; |
52 | | |
53 | 0 | bool hasSpecialDrag() const override { return true; } |
54 | | |
55 | 0 | bool beginSpecialDrag(SdrDragStat& /*rDrag*/) const override { return false; } |
56 | | }; |
57 | | |
58 | | } // end sdr::annotation |
59 | | |
60 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |