build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / include / drawinglayer / primitive2d / texthierarchyprimitive2d.hxx
blob093ccce65fa3988616caa1b8b6c1a332c1ac40d2
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_DRAWINGLAYER_PRIMITIVE2D_TEXTHIERARCHYPRIMITIVE2D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTHIERARCHYPRIMITIVE2D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
26 #include <rtl/ustring.hxx>
29 namespace drawinglayer
31 namespace primitive2d
33 /** TextHierarchyLinePrimitive2D class
35 Text format hierarchy helper class. It decomposes to its
36 content, so all direct renderers may ignore it. If You need
37 to know more about line hierarchies You may react on it and
38 also need to take care that the source of data uses it.
40 This primitive encapsulates text lines.
42 class DRAWINGLAYER_DLLPUBLIC TextHierarchyLinePrimitive2D : public GroupPrimitive2D
44 private:
45 public:
46 /// constructor
47 explicit TextHierarchyLinePrimitive2D(const Primitive2DContainer& rChildren);
49 /// provide unique ID
50 DeclPrimitive2DIDBlock()
52 } // end of namespace primitive2d
53 } // end of namespace drawinglayer
56 namespace drawinglayer
58 namespace primitive2d
60 /** TextHierarchyBulletPrimitive2D class
62 This primitive encapsulates text bullets.
64 class DRAWINGLAYER_DLLPUBLIC TextHierarchyBulletPrimitive2D : public GroupPrimitive2D
66 private:
67 public:
68 /// constructor
69 explicit TextHierarchyBulletPrimitive2D(const Primitive2DContainer& rChildren);
71 /// provide unique ID
72 DeclPrimitive2DIDBlock()
74 } // end of namespace primitive2d
75 } // end of namespace drawinglayer
78 namespace drawinglayer
80 namespace primitive2d
82 /** TextHierarchyParagraphPrimitive2D class
84 This primitive encapsulates text paragraphs.
86 class DRAWINGLAYER_DLLPUBLIC TextHierarchyParagraphPrimitive2D : public GroupPrimitive2D
88 private:
89 public:
90 /// constructor
91 explicit TextHierarchyParagraphPrimitive2D(const Primitive2DContainer& rChildren);
93 /// provide unique ID
94 DeclPrimitive2DIDBlock()
96 } // end of namespace primitive2d
97 } // end of namespace drawinglayer
100 namespace drawinglayer
102 namespace primitive2d
104 /** TextHierarchyBlockPrimitive2D class
106 This primitive encapsulates text blocks.
108 class DRAWINGLAYER_DLLPUBLIC TextHierarchyBlockPrimitive2D : public GroupPrimitive2D
110 private:
111 public:
112 /// constructor
113 explicit TextHierarchyBlockPrimitive2D(const Primitive2DContainer& rChildren);
115 /// provide unique ID
116 DeclPrimitive2DIDBlock()
118 } // end of namespace primitive2d
119 } // end of namespace drawinglayer
122 namespace drawinglayer
124 namespace primitive2d
126 /** FieldType definition */
127 enum FieldType
129 /** unspecified. If more info is needed for a FieldType,
130 create a new type and its handling
132 FIELD_TYPE_COMMON,
134 /** uses "FIELD_SEQ_BEGIN;PageField" -> special handling */
135 FIELD_TYPE_PAGE,
137 /** uses URL as string -> special handling */
138 FIELD_TYPE_URL
141 /** TextHierarchyFieldPrimitive2D class
143 This primitive encapsulates text fields.
144 Also: This type uses a type enum to transport the encapsulated field
145 type. Also added is a String which is type-dependent. E.g. for URL
146 fields, it contains the URL.
148 class DRAWINGLAYER_DLLPUBLIC TextHierarchyFieldPrimitive2D : public GroupPrimitive2D
150 private:
151 FieldType meType;
152 OUString maString;
154 public:
155 /// constructor
156 TextHierarchyFieldPrimitive2D(
157 const Primitive2DContainer& rChildren,
158 const FieldType& rFieldType,
159 const OUString& rString);
161 /// data read access
162 FieldType getType() const { return meType; }
163 const OUString& getString() const { return maString; }
165 /// compare operator
166 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
168 /// provide unique ID
169 DeclPrimitive2DIDBlock()
171 } // end of namespace primitive2d
172 } // end of namespace drawinglayer
175 namespace drawinglayer
177 namespace primitive2d
179 /** TextHierarchyEditPrimitive2D class
181 #i97628#
182 Primitive to encapsulate text from an active text edit; some
183 renderers need to suppress this output due to painting the
184 edited text in e.g. an OutlinerEditView. It's derived from
185 GroupPrimitive2D, so the implicit decomposition will use the
186 content. To suppress, this primitive needs to be parsed by
187 the renderer without taking any action.
189 class DRAWINGLAYER_DLLPUBLIC TextHierarchyEditPrimitive2D : public GroupPrimitive2D
191 private:
192 public:
193 /// constructor
194 explicit TextHierarchyEditPrimitive2D(const Primitive2DContainer& rChildren);
196 /// provide unique ID
197 DeclPrimitive2DIDBlock()
199 } // end of namespace primitive2d
200 } // end of namespace drawinglayer
203 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTHIERARCHYPRIMITIVE2D_HXX
205 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */