/src/libreoffice/include/vcl/metaact.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 | | * This file incorporates work covered by the following license notice: |
10 | | * |
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 . |
18 | | */ |
19 | | |
20 | | #ifndef INCLUDED_VCL_METAACT_HXX |
21 | | #define INCLUDED_VCL_METAACT_HXX |
22 | | |
23 | | #include <sal/config.h> |
24 | | |
25 | | #include <salhelper/simplereferenceobject.hxx> |
26 | | #include <tools/poly.hxx> |
27 | | |
28 | | #include <vcl/dllapi.h> |
29 | | #include <vcl/bitmap.hxx> |
30 | | #include <vcl/font.hxx> |
31 | | #include <vcl/gdimtf.hxx> |
32 | | #include <vcl/gfxlink.hxx> |
33 | | #include <vcl/gradient.hxx> |
34 | | #include <vcl/hatch.hxx> |
35 | | #include <vcl/kernarray.hxx> |
36 | | #include <vcl/lineinfo.hxx> |
37 | | #include <vcl/region.hxx> |
38 | | #include <vcl/wall.hxx> |
39 | | #include <basegfx/utils/bgradient.hxx> |
40 | | |
41 | | #include <memory> |
42 | | #include <span> |
43 | | |
44 | | class OutputDevice; |
45 | | enum class DrawTextFlags; |
46 | | enum class MetaActionType; |
47 | | enum class RasterOp; |
48 | | namespace rtl { template <class reference_type> class Reference; } |
49 | | namespace vcl { enum class PushFlags; } |
50 | | namespace vcl::text { enum class ComplexTextLayoutFlags : sal_uInt8; } |
51 | | |
52 | | class VCL_DLLPUBLIC MetaAction : public salhelper::SimpleReferenceObject |
53 | | { |
54 | | private: |
55 | | MetaActionType mnType; |
56 | | |
57 | | protected: |
58 | | SAL_DLLPRIVATE virtual ~MetaAction() override; |
59 | | |
60 | | public: |
61 | | SAL_DLLPRIVATE MetaAction(); |
62 | | SAL_DLLPRIVATE explicit MetaAction( MetaActionType nType ); |
63 | | SAL_DLLPRIVATE MetaAction( MetaAction const & ); |
64 | | |
65 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ); |
66 | | |
67 | 7.84M | oslInterlockedCount GetRefCount() const { return m_nCount; } |
68 | | |
69 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const; |
70 | | |
71 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ); |
72 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ); |
73 | | |
74 | 19.9M | MetaActionType GetType() const { return mnType; } |
75 | | /** \#i10613# Extracted from Printer::GetPreparedMetaFile. Returns true |
76 | | if given action requires special transparency handling |
77 | | */ |
78 | 0 | virtual bool IsTransparent() const { return false; } |
79 | | }; |
80 | | |
81 | | class VCL_DLLPUBLIC MetaPixelAction final : public MetaAction |
82 | | { |
83 | | private: |
84 | | Point maPt; |
85 | | Color maColor; |
86 | | |
87 | | public: |
88 | 0 | MetaPixelAction(MetaPixelAction const &) = default; |
89 | | MetaPixelAction(MetaPixelAction &&) = default; |
90 | | MetaPixelAction & operator =(MetaPixelAction const &) = delete; // due to MetaAction |
91 | | MetaPixelAction & operator =(MetaPixelAction &&) = delete; // due to MetaAction |
92 | | private: |
93 | | SAL_DLLPRIVATE virtual ~MetaPixelAction() override; |
94 | | public: |
95 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
96 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
97 | | |
98 | | MetaPixelAction( const Point& rPt, const Color& rColor ); |
99 | | |
100 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
101 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
102 | | |
103 | 1.04k | const Point& GetPoint() const { return maPt; } |
104 | 1.46k | const Color& GetColor() const { return maColor; } |
105 | | }; |
106 | | |
107 | | class VCL_DLLPUBLIC MetaPointAction final : public MetaAction |
108 | | { |
109 | | private: |
110 | | Point maPt; |
111 | | |
112 | | public: |
113 | 0 | MetaPointAction(MetaPointAction const &) = default; |
114 | | MetaPointAction(MetaPointAction &&) = default; |
115 | | MetaPointAction & operator =(MetaPointAction const &) = delete; // due to MetaAction |
116 | | MetaPointAction & operator =(MetaPointAction &&) = delete; // due to MetaAction |
117 | | private: |
118 | | SAL_DLLPRIVATE virtual ~MetaPointAction() override; |
119 | | public: |
120 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
121 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
122 | | |
123 | | SAL_DLLPRIVATE explicit MetaPointAction( const Point& ); |
124 | | |
125 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
126 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
127 | | |
128 | 0 | const Point& GetPoint() const { return maPt; } |
129 | | }; |
130 | | |
131 | | class VCL_DLLPUBLIC MetaLineAction final : public MetaAction |
132 | | { |
133 | | private: |
134 | | |
135 | | LineInfo maLineInfo; |
136 | | Point maStartPt; |
137 | | Point maEndPt; |
138 | | |
139 | | public: |
140 | 0 | MetaLineAction(MetaLineAction const &) = default; |
141 | | MetaLineAction(MetaLineAction &&) = default; |
142 | | MetaLineAction & operator =(MetaLineAction const &) = delete; // due to MetaAction |
143 | | MetaLineAction & operator =(MetaLineAction &&) = delete; // due to MetaAction |
144 | | private: |
145 | | SAL_DLLPRIVATE virtual ~MetaLineAction() override; |
146 | | public: |
147 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
148 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
149 | | |
150 | | SAL_DLLPRIVATE MetaLineAction( const Point& rStart, const Point& rEnd ); |
151 | | MetaLineAction( const Point& rStart, const Point& rEnd, |
152 | | LineInfo aLineInfo ); |
153 | | |
154 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
155 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
156 | | |
157 | 2.98k | const Point& GetStartPoint() const { return maStartPt; } |
158 | 2.98k | const Point& GetEndPoint() const { return maEndPt; } |
159 | 3.00k | const LineInfo& GetLineInfo() const { return maLineInfo; } |
160 | | }; |
161 | | |
162 | | class VCL_DLLPUBLIC MetaRectAction final : public MetaAction |
163 | | { |
164 | | private: |
165 | | |
166 | | tools::Rectangle maRect; |
167 | | |
168 | | public: |
169 | 0 | MetaRectAction(MetaRectAction const &) = default; |
170 | | MetaRectAction(MetaRectAction &&) = default; |
171 | | MetaRectAction & operator =(MetaRectAction const &) = delete; // due to MetaAction |
172 | | MetaRectAction & operator =(MetaRectAction &&) = delete; // due to MetaAction |
173 | | private: |
174 | | SAL_DLLPRIVATE virtual ~MetaRectAction() override; |
175 | | public: |
176 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
177 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
178 | | |
179 | | explicit MetaRectAction( const tools::Rectangle& ); |
180 | | |
181 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
182 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
183 | | |
184 | 98.9k | const tools::Rectangle& GetRect() const { return maRect; } |
185 | | }; |
186 | | |
187 | | class VCL_DLLPUBLIC MetaRoundRectAction final : public MetaAction |
188 | | { |
189 | | private: |
190 | | |
191 | | tools::Rectangle maRect; |
192 | | sal_uInt32 mnHorzRound; |
193 | | sal_uInt32 mnVertRound; |
194 | | |
195 | | public: |
196 | 0 | MetaRoundRectAction(MetaRoundRectAction const &) = default; |
197 | | MetaRoundRectAction(MetaRoundRectAction &&) = default; |
198 | | MetaRoundRectAction & operator =(MetaRoundRectAction const &) = delete; // due to MetaAction |
199 | | MetaRoundRectAction & operator =(MetaRoundRectAction &&) = delete; // due to MetaAction |
200 | | private: |
201 | | SAL_DLLPRIVATE virtual ~MetaRoundRectAction() override; |
202 | | public: |
203 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
204 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
205 | | |
206 | | MetaRoundRectAction( const tools::Rectangle& rRect, |
207 | | sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); |
208 | | |
209 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
210 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
211 | | |
212 | 1.11k | const tools::Rectangle& GetRect() const { return maRect; } |
213 | 787 | sal_uInt32 GetHorzRound() const { return mnHorzRound; } |
214 | 787 | sal_uInt32 GetVertRound() const { return mnVertRound; } |
215 | | }; |
216 | | |
217 | | class VCL_DLLPUBLIC MetaEllipseAction final : public MetaAction |
218 | | { |
219 | | private: |
220 | | |
221 | | tools::Rectangle maRect; |
222 | | |
223 | | public: |
224 | 0 | MetaEllipseAction(MetaEllipseAction const &) = default; |
225 | | MetaEllipseAction(MetaEllipseAction &&) = default; |
226 | | MetaEllipseAction & operator =(MetaEllipseAction const &) = delete; // due to MetaAction |
227 | | MetaEllipseAction & operator =(MetaEllipseAction &&) = delete; // due to MetaAction |
228 | | private: |
229 | | SAL_DLLPRIVATE virtual ~MetaEllipseAction() override; |
230 | | public: |
231 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
232 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
233 | | |
234 | | explicit MetaEllipseAction( const tools::Rectangle& ); |
235 | | |
236 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
237 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
238 | | |
239 | 2.77k | const tools::Rectangle& GetRect() const { return maRect; } |
240 | | }; |
241 | | |
242 | | class VCL_DLLPUBLIC MetaArcAction final : public MetaAction |
243 | | { |
244 | | private: |
245 | | |
246 | | tools::Rectangle maRect; |
247 | | Point maStartPt; |
248 | | Point maEndPt; |
249 | | |
250 | | public: |
251 | 0 | MetaArcAction(MetaArcAction const &) = default; |
252 | | MetaArcAction(MetaArcAction &&) = default; |
253 | | MetaArcAction & operator =(MetaArcAction const &) = delete; // due to MetaAction |
254 | | MetaArcAction & operator =(MetaArcAction &&) = delete; // due to MetaAction |
255 | | private: |
256 | | SAL_DLLPRIVATE virtual ~MetaArcAction() override; |
257 | | public: |
258 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
259 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
260 | | |
261 | | MetaArcAction( const tools::Rectangle& rRect, |
262 | | const Point& rStart, const Point& rEnd ); |
263 | | |
264 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
265 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
266 | | |
267 | 432 | const tools::Rectangle& GetRect() const { return maRect; } |
268 | 432 | const Point& GetStartPoint() const { return maStartPt; } |
269 | 432 | const Point& GetEndPoint() const { return maEndPt; } |
270 | | }; |
271 | | |
272 | | class VCL_DLLPUBLIC MetaPieAction final : public MetaAction |
273 | | { |
274 | | private: |
275 | | |
276 | | tools::Rectangle maRect; |
277 | | Point maStartPt; |
278 | | Point maEndPt; |
279 | | |
280 | | public: |
281 | 0 | MetaPieAction(MetaPieAction const &) = default; |
282 | | MetaPieAction(MetaPieAction &&) = default; |
283 | | MetaPieAction & operator =(MetaPieAction const &) = delete; // due to MetaAction |
284 | | MetaPieAction & operator =(MetaPieAction &&) = delete; // due to MetaAction |
285 | | private: |
286 | | SAL_DLLPRIVATE virtual ~MetaPieAction() override; |
287 | | public: |
288 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
289 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
290 | | |
291 | | MetaPieAction( const tools::Rectangle& rRect, |
292 | | const Point& rStart, const Point& rEnd ); |
293 | | |
294 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
295 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
296 | | |
297 | 917 | const tools::Rectangle& GetRect() const { return maRect; } |
298 | 917 | const Point& GetStartPoint() const { return maStartPt; } |
299 | 917 | const Point& GetEndPoint() const { return maEndPt; } |
300 | | }; |
301 | | |
302 | | class VCL_DLLPUBLIC MetaChordAction final : public MetaAction |
303 | | { |
304 | | private: |
305 | | |
306 | | tools::Rectangle maRect; |
307 | | Point maStartPt; |
308 | | Point maEndPt; |
309 | | |
310 | | public: |
311 | 0 | MetaChordAction(MetaChordAction const &) = default; |
312 | | MetaChordAction(MetaChordAction &&) = default; |
313 | | MetaChordAction & operator =(MetaChordAction const &) = delete; // due to MetaAction |
314 | | MetaChordAction & operator =(MetaChordAction &&) = delete; // due to MetaAction |
315 | | private: |
316 | | SAL_DLLPRIVATE virtual ~MetaChordAction() override; |
317 | | public: |
318 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
319 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
320 | | |
321 | | MetaChordAction( const tools::Rectangle& rRect, |
322 | | const Point& rStart, const Point& rEnd ); |
323 | | |
324 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
325 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
326 | | |
327 | 607 | const tools::Rectangle& GetRect() const { return maRect; } |
328 | 607 | const Point& GetStartPoint() const { return maStartPt; } |
329 | 607 | const Point& GetEndPoint() const { return maEndPt; } |
330 | | }; |
331 | | |
332 | | class VCL_DLLPUBLIC MetaPolyLineAction final : public MetaAction |
333 | | { |
334 | | private: |
335 | | |
336 | | LineInfo maLineInfo; |
337 | | tools::Polygon maPoly; |
338 | | |
339 | | public: |
340 | 70 | MetaPolyLineAction(MetaPolyLineAction const &) = default; |
341 | | MetaPolyLineAction(MetaPolyLineAction &&) = default; |
342 | | MetaPolyLineAction & operator =(MetaPolyLineAction const &) = delete; // due to MetaAction |
343 | | MetaPolyLineAction & operator =(MetaPolyLineAction &&) = delete; // due to MetaAction |
344 | | private: |
345 | | SAL_DLLPRIVATE virtual ~MetaPolyLineAction() override; |
346 | | public: |
347 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
348 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
349 | | |
350 | | SAL_DLLPRIVATE explicit MetaPolyLineAction( tools::Polygon ); |
351 | | explicit MetaPolyLineAction( tools::Polygon , LineInfo ); |
352 | | |
353 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
354 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
355 | | |
356 | 332k | const tools::Polygon& GetPolygon() const { return maPoly; } |
357 | 332k | const LineInfo& GetLineInfo() const { return maLineInfo; } |
358 | | }; |
359 | | |
360 | | class VCL_DLLPUBLIC MetaPolygonAction final : public MetaAction |
361 | | { |
362 | | private: |
363 | | |
364 | | tools::Polygon maPoly; |
365 | | |
366 | | public: |
367 | 0 | MetaPolygonAction(MetaPolygonAction const &) = default; |
368 | | MetaPolygonAction(MetaPolygonAction &&) = default; |
369 | | MetaPolygonAction & operator =(MetaPolygonAction const &) = delete; // due to MetaAction |
370 | | MetaPolygonAction & operator =(MetaPolygonAction &&) = delete; // due to MetaAction |
371 | | private: |
372 | | SAL_DLLPRIVATE virtual ~MetaPolygonAction() override; |
373 | | public: |
374 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
375 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
376 | | |
377 | | explicit MetaPolygonAction( tools::Polygon ); |
378 | | |
379 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
380 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
381 | | |
382 | 5.33k | const tools::Polygon& GetPolygon() const { return maPoly; } |
383 | | }; |
384 | | |
385 | | class VCL_DLLPUBLIC MetaPolyPolygonAction final : public MetaAction |
386 | | { |
387 | | private: |
388 | | |
389 | | tools::PolyPolygon maPolyPoly; |
390 | | |
391 | | public: |
392 | 0 | MetaPolyPolygonAction(MetaPolyPolygonAction const &) = default; |
393 | | MetaPolyPolygonAction(MetaPolyPolygonAction &&) = default; |
394 | | MetaPolyPolygonAction & operator =(MetaPolyPolygonAction const &) = delete; // due to MetaAction |
395 | | MetaPolyPolygonAction & operator =(MetaPolyPolygonAction &&) = delete; // due to MetaAction |
396 | | private: |
397 | | SAL_DLLPRIVATE virtual ~MetaPolyPolygonAction() override; |
398 | | public: |
399 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
400 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
401 | | |
402 | | explicit MetaPolyPolygonAction( tools::PolyPolygon ); |
403 | | |
404 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
405 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
406 | | |
407 | 15.6k | const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; } |
408 | | }; |
409 | | |
410 | | class SAL_DLLPUBLIC_RTTI MetaTextAction final : public MetaAction |
411 | | { |
412 | | private: |
413 | | |
414 | | Point maPt; |
415 | | OUString maStr; |
416 | | sal_Int32 mnIndex; |
417 | | sal_Int32 mnLen; |
418 | | |
419 | | public: |
420 | 0 | MetaTextAction(MetaTextAction const &) = default; |
421 | | MetaTextAction(MetaTextAction &&) = default; |
422 | | MetaTextAction & operator =(MetaTextAction const &) = delete; // due to MetaAction |
423 | | MetaTextAction & operator =(MetaTextAction &&) = delete; // due to MetaAction |
424 | | private: |
425 | | virtual ~MetaTextAction() override; |
426 | | public: |
427 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
428 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
429 | | |
430 | | MetaTextAction( const Point& rPt, OUString aStr, |
431 | | sal_Int32 nIndex, sal_Int32 nLen ); |
432 | | |
433 | | virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
434 | | virtual void Scale( double fScaleX, double fScaleY ) override; |
435 | | |
436 | 0 | const Point& GetPoint() const { return maPt; } |
437 | 13 | const OUString& GetText() const { return maStr; } |
438 | 0 | sal_Int32 GetIndex() const { return mnIndex; } |
439 | 0 | sal_Int32 GetLen() const { return mnLen; } |
440 | | }; |
441 | | |
442 | | class VCL_DLLPUBLIC MetaTextArrayAction final : public MetaAction |
443 | | { |
444 | | private: |
445 | | |
446 | | Point maStartPt; |
447 | | OUString maStr; |
448 | | KernArray maDXAry; |
449 | | std::vector<sal_Bool> maKashidaAry; |
450 | | sal_Int32 mnIndex; |
451 | | sal_Int32 mnLen; |
452 | | sal_Int32 mnLayoutContextIndex = -1; |
453 | | sal_Int32 mnLayoutContextLen = -1; |
454 | | |
455 | | SAL_DLLPRIVATE virtual ~MetaTextArrayAction() override; |
456 | | |
457 | | public: |
458 | | SAL_DLLPRIVATE MetaTextArrayAction( const MetaTextArrayAction& rAction ); |
459 | | SAL_DLLPRIVATE MetaTextArrayAction( const Point& rStartPt, OUString aStr, |
460 | | KernArray rDXAry, |
461 | | std::vector<sal_Bool> pKashidaAry, |
462 | | sal_Int32 nIndex, |
463 | | sal_Int32 nLen ); |
464 | | MetaTextArrayAction( const Point& rStartPt, OUString aStr, |
465 | | KernArraySpan pDXAry, |
466 | | std::span<const sal_Bool> pKashidaAry, |
467 | | sal_Int32 nIndex, |
468 | | sal_Int32 nLen ); |
469 | | MetaTextArrayAction(const Point& rStartPt, OUString aStr, KernArraySpan pDXAry, |
470 | | std::span<const sal_Bool> pKashidaAry, sal_Int32 nIndex, sal_Int32 nLen, |
471 | | sal_Int32 nLayoutContextIndex, sal_Int32 nLayoutContextLen); |
472 | | |
473 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
474 | | |
475 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
476 | | |
477 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
478 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
479 | | |
480 | 708k | const Point& GetPoint() const { return maStartPt; } |
481 | 727k | const OUString& GetText() const { return maStr; } |
482 | 709k | sal_Int32 GetIndex() const { return mnIndex; } |
483 | 712k | sal_Int32 GetLen() const { return mnLen; } |
484 | 694k | sal_Int32 GetLayoutContextIndex() const { return mnLayoutContextIndex; } |
485 | 693k | sal_Int32 GetLayoutContextLen() const { return mnLayoutContextLen; } |
486 | 711k | const KernArray& GetDXArray() const { return maDXAry; } |
487 | 708k | const std::vector<sal_Bool> & GetKashidaArray() const { return maKashidaAry; } |
488 | | }; |
489 | | |
490 | | class SAL_DLLPUBLIC_RTTI MetaStretchTextAction final : public MetaAction |
491 | | { |
492 | | private: |
493 | | |
494 | | Point maPt; |
495 | | OUString maStr; |
496 | | sal_uInt32 mnWidth; |
497 | | sal_Int32 mnIndex; |
498 | | sal_Int32 mnLen; |
499 | | |
500 | | public: |
501 | 0 | MetaStretchTextAction(MetaStretchTextAction const &) = default; |
502 | | MetaStretchTextAction(MetaStretchTextAction &&) = default; |
503 | | MetaStretchTextAction & operator =(MetaStretchTextAction const &) = delete; // due to MetaAction |
504 | | MetaStretchTextAction & operator =(MetaStretchTextAction &&) = delete; // due to MetaAction |
505 | | private: |
506 | | virtual ~MetaStretchTextAction() override; |
507 | | public: |
508 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
509 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
510 | | |
511 | | MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth, |
512 | | OUString aStr, |
513 | | sal_Int32 nIndex, sal_Int32 nLen ); |
514 | | |
515 | | virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
516 | | virtual void Scale( double fScaleX, double fScaleY ) override; |
517 | | |
518 | 1.87k | const Point& GetPoint() const { return maPt; } |
519 | 1.87k | const OUString& GetText() const { return maStr; } |
520 | 1.87k | sal_uInt32 GetWidth() const { return mnWidth; } |
521 | 1.87k | sal_Int32 GetIndex() const { return mnIndex; } |
522 | 1.87k | sal_Int32 GetLen() const { return mnLen; } |
523 | | }; |
524 | | |
525 | | class SAL_DLLPUBLIC_RTTI MetaTextRectAction final : public MetaAction |
526 | | { |
527 | | private: |
528 | | |
529 | | tools::Rectangle maRect; |
530 | | OUString maStr; |
531 | | DrawTextFlags mnStyle; |
532 | | |
533 | | public: |
534 | 0 | MetaTextRectAction(MetaTextRectAction const &) = default; |
535 | | MetaTextRectAction(MetaTextRectAction &&) = default; |
536 | | MetaTextRectAction & operator =(MetaTextRectAction const &) = delete; // due to MetaAction |
537 | | MetaTextRectAction & operator =(MetaTextRectAction &&) = delete; // due to MetaAction |
538 | | private: |
539 | | virtual ~MetaTextRectAction() override; |
540 | | public: |
541 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
542 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
543 | | |
544 | | MetaTextRectAction( const tools::Rectangle& rRect, |
545 | | OUString aStr, DrawTextFlags nStyle ); |
546 | | |
547 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
548 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
549 | | |
550 | 0 | const tools::Rectangle& GetRect() const { return maRect; } |
551 | 847 | const OUString& GetText() const { return maStr; } |
552 | 0 | DrawTextFlags GetStyle() const { return mnStyle; } |
553 | | }; |
554 | | |
555 | | class SAL_DLLPUBLIC_RTTI MetaTextLineAction final : public MetaAction |
556 | | { |
557 | | private: |
558 | | |
559 | | Point maPos; |
560 | | tools::Long mnWidth; |
561 | | FontStrikeout meStrikeout; |
562 | | FontLineStyle meUnderline; |
563 | | FontLineStyle meOverline; |
564 | | |
565 | | public: |
566 | 0 | MetaTextLineAction(MetaTextLineAction const &) = default; |
567 | | MetaTextLineAction(MetaTextLineAction &&) = default; |
568 | | MetaTextLineAction & operator =(MetaTextLineAction const &) = delete; // due to MetaAction |
569 | | MetaTextLineAction & operator =(MetaTextLineAction &&) = delete; // due to MetaAction |
570 | | private: |
571 | | virtual ~MetaTextLineAction() override; |
572 | | public: |
573 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
574 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
575 | | |
576 | | MetaTextLineAction( const Point& rPos, tools::Long nWidth, |
577 | | FontStrikeout eStrikeout, |
578 | | FontLineStyle eUnderline, |
579 | | FontLineStyle eOverline ); |
580 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
581 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
582 | | |
583 | 0 | const Point& GetStartPoint() const { return maPos; } |
584 | 0 | tools::Long GetWidth() const { return mnWidth; } |
585 | 0 | FontStrikeout GetStrikeout() const { return meStrikeout; } |
586 | 0 | FontLineStyle GetUnderline() const { return meUnderline; } |
587 | 0 | FontLineStyle GetOverline() const { return meOverline; } |
588 | | }; |
589 | | |
590 | | class VCL_DLLPUBLIC MetaBmpAction final : public MetaAction |
591 | | { |
592 | | private: |
593 | | |
594 | | Bitmap maBmp; |
595 | | Point maPt; |
596 | | |
597 | | public: |
598 | 0 | MetaBmpAction(MetaBmpAction const &) = default; |
599 | | MetaBmpAction(MetaBmpAction &&) = default; |
600 | | MetaBmpAction & operator =(MetaBmpAction const &) = delete; // due to MetaAction |
601 | | MetaBmpAction & operator =(MetaBmpAction &&) = delete; // due to MetaAction |
602 | | private: |
603 | | SAL_DLLPRIVATE virtual ~MetaBmpAction() override; |
604 | | public: |
605 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
606 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
607 | | |
608 | | MetaBmpAction( const Point& rPt, const Bitmap& rBmp ); |
609 | | |
610 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
611 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
612 | | |
613 | 0 | const Bitmap& GetBitmap() const { return maBmp; } |
614 | 0 | const Point& GetPoint() const { return maPt; } |
615 | | }; |
616 | | |
617 | | class VCL_DLLPUBLIC MetaBmpScaleAction final : public MetaAction |
618 | | { |
619 | | private: |
620 | | |
621 | | Bitmap maBmp; |
622 | | Point maPt; |
623 | | Size maSz; |
624 | | |
625 | | public: |
626 | 0 | MetaBmpScaleAction(MetaBmpScaleAction const &) = default; |
627 | | MetaBmpScaleAction(MetaBmpScaleAction &&) = default; |
628 | | MetaBmpScaleAction & operator =(MetaBmpScaleAction const &) = delete; // due to MetaAction |
629 | | MetaBmpScaleAction & operator =(MetaBmpScaleAction &&) = delete; // due to MetaAction |
630 | | private: |
631 | | SAL_DLLPRIVATE virtual ~MetaBmpScaleAction() override; |
632 | | public: |
633 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
634 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
635 | | |
636 | | MetaBmpScaleAction( const Point& rPt, const Size& rSz, |
637 | | const Bitmap& rBmp ); |
638 | | |
639 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
640 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
641 | | |
642 | 22.8k | const Bitmap& GetBitmap() const { return maBmp; } |
643 | 22.4k | const Point& GetPoint() const { return maPt; } |
644 | 22.4k | const Size& GetSize() const { return maSz; } |
645 | | }; |
646 | | |
647 | | class VCL_DLLPUBLIC MetaBmpScalePartAction final : public MetaAction |
648 | | { |
649 | | private: |
650 | | |
651 | | Bitmap maBmp; |
652 | | Point maDstPt; |
653 | | Size maDstSz; |
654 | | Point maSrcPt; |
655 | | Size maSrcSz; |
656 | | |
657 | | public: |
658 | 0 | MetaBmpScalePartAction(MetaBmpScalePartAction const &) = default; |
659 | | MetaBmpScalePartAction(MetaBmpScalePartAction &&) = default; |
660 | | MetaBmpScalePartAction & operator =(MetaBmpScalePartAction const &) = delete; // due to MetaAction |
661 | | MetaBmpScalePartAction & operator =(MetaBmpScalePartAction &&) = delete; // due to MetaAction |
662 | | private: |
663 | | SAL_DLLPRIVATE virtual ~MetaBmpScalePartAction() override; |
664 | | public: |
665 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
666 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
667 | | |
668 | | MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz, |
669 | | const Point& rSrcPt, const Size& rSrcSz, |
670 | | const Bitmap& rBmp ); |
671 | | |
672 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
673 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
674 | | |
675 | 0 | const Bitmap& GetBitmap() const { return maBmp; } |
676 | 0 | const Point& GetDestPoint() const { return maDstPt; } |
677 | 0 | const Size& GetDestSize() const { return maDstSz; } |
678 | 0 | const Point& GetSrcPoint() const { return maSrcPt; } |
679 | 0 | const Size& GetSrcSize() const { return maSrcSz; } |
680 | | }; |
681 | | |
682 | | class VCL_DLLPUBLIC MetaBmpExAction final : public MetaAction |
683 | | { |
684 | | private: |
685 | | |
686 | | Bitmap maBmp; |
687 | | Point maPt; |
688 | | |
689 | | public: |
690 | 0 | MetaBmpExAction(MetaBmpExAction const &) = default; |
691 | | MetaBmpExAction(MetaBmpExAction &&) = default; |
692 | | MetaBmpExAction & operator =(MetaBmpExAction const &) = delete; // due to MetaAction |
693 | | MetaBmpExAction & operator =(MetaBmpExAction &&) = delete; // due to MetaAction |
694 | | private: |
695 | | SAL_DLLPRIVATE virtual ~MetaBmpExAction() override; |
696 | | public: |
697 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
698 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
699 | | |
700 | | MetaBmpExAction( const Point& rPt, const Bitmap& rBmp ); |
701 | | |
702 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
703 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
704 | | |
705 | 0 | const Bitmap& GetBitmap() const { return maBmp; } |
706 | 0 | const Point& GetPoint() const { return maPt; } |
707 | 0 | bool IsTransparent() const override { return GetBitmap().HasAlpha(); } |
708 | | }; |
709 | | |
710 | | class VCL_DLLPUBLIC MetaBmpExScaleAction final : public MetaAction |
711 | | { |
712 | | private: |
713 | | |
714 | | Bitmap maBmp; |
715 | | Point maPt; |
716 | | Size maSz; |
717 | | |
718 | | public: |
719 | 0 | MetaBmpExScaleAction(MetaBmpExScaleAction const &) = default; |
720 | | MetaBmpExScaleAction(MetaBmpExScaleAction &&) = default; |
721 | | MetaBmpExScaleAction & operator =(MetaBmpExScaleAction const &) = delete; // due to MetaAction |
722 | | MetaBmpExScaleAction & operator =(MetaBmpExScaleAction &&) = delete; // due to MetaAction |
723 | | private: |
724 | | SAL_DLLPRIVATE virtual ~MetaBmpExScaleAction() override; |
725 | | public: |
726 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
727 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
728 | | |
729 | | MetaBmpExScaleAction( const Point& rPt, const Size& rSz, |
730 | | const Bitmap& rBmp ) ; |
731 | | |
732 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
733 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
734 | | |
735 | 4.76k | const Bitmap& GetBitmap() const { return maBmp; } |
736 | 4.76k | const Point& GetPoint() const { return maPt; } |
737 | 4.76k | const Size& GetSize() const { return maSz; } |
738 | 0 | bool IsTransparent() const override { return GetBitmap().HasAlpha(); } |
739 | | }; |
740 | | |
741 | | class VCL_DLLPUBLIC MetaBmpExScalePartAction final : public MetaAction |
742 | | { |
743 | | private: |
744 | | |
745 | | Bitmap maBmp; |
746 | | Point maDstPt; |
747 | | Size maDstSz; |
748 | | Point maSrcPt; |
749 | | Size maSrcSz; |
750 | | |
751 | | public: |
752 | 0 | MetaBmpExScalePartAction(MetaBmpExScalePartAction const &) = default; |
753 | | MetaBmpExScalePartAction(MetaBmpExScalePartAction &&) = default; |
754 | | MetaBmpExScalePartAction & operator =(MetaBmpExScalePartAction const &) = delete; // due to MetaAction |
755 | | MetaBmpExScalePartAction & operator =(MetaBmpExScalePartAction &&) = delete; // due to MetaAction |
756 | | private: |
757 | | SAL_DLLPRIVATE virtual ~MetaBmpExScalePartAction() override; |
758 | | public: |
759 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
760 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
761 | | |
762 | | MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz, |
763 | | const Point& rSrcPt, const Size& rSrcSz, |
764 | | const Bitmap& rBmp ); |
765 | | |
766 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
767 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
768 | | |
769 | 0 | const Bitmap& GetBitmap() const { return maBmp; } |
770 | 0 | const Point& GetDestPoint() const { return maDstPt; } |
771 | 0 | const Size& GetDestSize() const { return maDstSz; } |
772 | 0 | const Point& GetSrcPoint() const { return maSrcPt; } |
773 | 0 | const Size& GetSrcSize() const { return maSrcSz; } |
774 | 0 | bool IsTransparent() const override { return GetBitmap().HasAlpha(); } |
775 | | }; |
776 | | |
777 | | class SAL_DLLPUBLIC_RTTI MetaMaskAction final : public MetaAction |
778 | | { |
779 | | private: |
780 | | |
781 | | Bitmap maBmp; |
782 | | Color maColor; |
783 | | Point maPt; |
784 | | |
785 | | public: |
786 | 0 | MetaMaskAction(MetaMaskAction const &) = default; |
787 | | MetaMaskAction(MetaMaskAction &&) = default; |
788 | | MetaMaskAction & operator =(MetaMaskAction const &) = delete; // due to MetaAction |
789 | | MetaMaskAction & operator =(MetaMaskAction &&) = delete; // due to MetaAction |
790 | | private: |
791 | | virtual ~MetaMaskAction() override; |
792 | | public: |
793 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
794 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
795 | | |
796 | | MetaMaskAction( const Point& rPt, |
797 | | const Bitmap& rBmp, |
798 | | const Color& rColor ); |
799 | | |
800 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
801 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
802 | | |
803 | 0 | const Bitmap& GetBitmap() const { return maBmp; } |
804 | 0 | const Color& GetColor() const { return maColor; } |
805 | 0 | const Point& GetPoint() const { return maPt; } |
806 | | }; |
807 | | |
808 | | class SAL_DLLPUBLIC_RTTI MetaMaskScaleAction final : public MetaAction |
809 | | { |
810 | | private: |
811 | | |
812 | | Bitmap maBmp; |
813 | | Color maColor; |
814 | | Point maPt; |
815 | | Size maSz; |
816 | | |
817 | | public: |
818 | 0 | MetaMaskScaleAction(MetaMaskScaleAction const &) = default; |
819 | | MetaMaskScaleAction(MetaMaskScaleAction &&) = default; |
820 | | MetaMaskScaleAction & operator =(MetaMaskScaleAction const &) = delete; // due to MetaAction |
821 | | MetaMaskScaleAction & operator =(MetaMaskScaleAction &&) = delete; // due to MetaAction |
822 | | private: |
823 | | virtual ~MetaMaskScaleAction() override; |
824 | | public: |
825 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
826 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
827 | | |
828 | | MetaMaskScaleAction( const Point& rPt, const Size& rSz, |
829 | | const Bitmap& rBmp, |
830 | | const Color& rColor ); |
831 | | |
832 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
833 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
834 | | |
835 | 0 | const Bitmap& GetBitmap() const { return maBmp; } |
836 | 0 | const Color& GetColor() const { return maColor; } |
837 | 0 | const Point& GetPoint() const { return maPt; } |
838 | 0 | const Size& GetSize() const { return maSz; } |
839 | | }; |
840 | | |
841 | | class SAL_DLLPUBLIC_RTTI MetaMaskScalePartAction final : public MetaAction |
842 | | { |
843 | | private: |
844 | | |
845 | | Bitmap maBmp; |
846 | | Color maColor; |
847 | | Point maDstPt; |
848 | | Size maDstSz; |
849 | | Point maSrcPt; |
850 | | Size maSrcSz; |
851 | | |
852 | | public: |
853 | 0 | MetaMaskScalePartAction(MetaMaskScalePartAction const &) = default; |
854 | | MetaMaskScalePartAction(MetaMaskScalePartAction &&) = default; |
855 | | MetaMaskScalePartAction & operator =(MetaMaskScalePartAction const &) = delete; // due to MetaAction |
856 | | MetaMaskScalePartAction & operator =(MetaMaskScalePartAction &&) = delete; // due to MetaAction |
857 | | private: |
858 | | virtual ~MetaMaskScalePartAction() override; |
859 | | public: |
860 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
861 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
862 | | |
863 | | MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz, |
864 | | const Point& rSrcPt, const Size& rSrcSz, |
865 | | const Bitmap& rBmp, |
866 | | const Color& rColor ); |
867 | | |
868 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
869 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
870 | | |
871 | 0 | const Bitmap& GetBitmap() const { return maBmp; } |
872 | 0 | const Color& GetColor() const { return maColor; } |
873 | 0 | const Point& GetDestPoint() const { return maDstPt; } |
874 | 0 | const Size& GetDestSize() const { return maDstSz; } |
875 | 0 | const Point& GetSrcPoint() const { return maSrcPt; } |
876 | 0 | const Size& GetSrcSize() const { return maSrcSz; } |
877 | | }; |
878 | | |
879 | | class SAL_DLLPUBLIC_RTTI MetaGradientAction final : public MetaAction |
880 | | { |
881 | | private: |
882 | | |
883 | | tools::Rectangle maRect; |
884 | | Gradient maGradient; |
885 | | |
886 | | public: |
887 | 0 | MetaGradientAction(MetaGradientAction const &) = default; |
888 | | MetaGradientAction(MetaGradientAction &&) = default; |
889 | | MetaGradientAction & operator =(MetaGradientAction const &) = delete; // due to MetaAction |
890 | | MetaGradientAction & operator =(MetaGradientAction &&) = delete; // due to MetaAction |
891 | | private: |
892 | | virtual ~MetaGradientAction() override; |
893 | | public: |
894 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
895 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
896 | | |
897 | | VCL_DLLPUBLIC MetaGradientAction( const tools::Rectangle& rRect, Gradient aGradient ); |
898 | | |
899 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
900 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
901 | | |
902 | 533 | const tools::Rectangle& GetRect() const { return maRect; } |
903 | 318 | const Gradient& GetGradient() const { return maGradient; } |
904 | | }; |
905 | | |
906 | | class VCL_DLLPUBLIC MetaGradientExAction final : public MetaAction |
907 | | { |
908 | | private: |
909 | | |
910 | | tools::PolyPolygon maPolyPoly; |
911 | | Gradient maGradient; |
912 | | |
913 | | public: |
914 | 0 | MetaGradientExAction(MetaGradientExAction const &) = default; |
915 | | MetaGradientExAction(MetaGradientExAction &&) = default; |
916 | | MetaGradientExAction & operator =(MetaGradientExAction const &) = delete; // due to MetaAction |
917 | | MetaGradientExAction & operator =(MetaGradientExAction &&) = delete; // due to MetaAction |
918 | | private: |
919 | | SAL_DLLPRIVATE virtual ~MetaGradientExAction() override; |
920 | | public: |
921 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
922 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
923 | | |
924 | | SAL_DLLPRIVATE MetaGradientExAction( tools::PolyPolygon rPolyPoly, Gradient aGradient ); |
925 | | |
926 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
927 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
928 | | |
929 | 0 | const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; } |
930 | 0 | const Gradient& GetGradient() const { return maGradient; } |
931 | | }; |
932 | | |
933 | | class SAL_DLLPUBLIC_RTTI MetaHatchAction final : public MetaAction |
934 | | { |
935 | | private: |
936 | | |
937 | | tools::PolyPolygon maPolyPoly; |
938 | | Hatch maHatch; |
939 | | |
940 | | public: |
941 | 0 | MetaHatchAction(MetaHatchAction const &) = default; |
942 | | MetaHatchAction(MetaHatchAction &&) = default; |
943 | | MetaHatchAction & operator =(MetaHatchAction const &) = delete; // due to MetaAction |
944 | | MetaHatchAction & operator =(MetaHatchAction &&) = delete; // due to MetaAction |
945 | | private: |
946 | | virtual ~MetaHatchAction() override; |
947 | | public: |
948 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
949 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
950 | | |
951 | | VCL_DLLPUBLIC MetaHatchAction( tools::PolyPolygon aPolyPoly, const Hatch& rHatch ); |
952 | | |
953 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
954 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
955 | | |
956 | 3.40k | const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; } |
957 | 3.14k | const Hatch& GetHatch() const { return maHatch; } |
958 | | }; |
959 | | |
960 | | class VCL_DLLPUBLIC MetaWallpaperAction final : public MetaAction |
961 | | { |
962 | | private: |
963 | | |
964 | | tools::Rectangle maRect; |
965 | | Wallpaper maWallpaper; |
966 | | |
967 | | public: |
968 | 0 | MetaWallpaperAction(MetaWallpaperAction const &) = default; |
969 | | MetaWallpaperAction(MetaWallpaperAction &&) = default; |
970 | | MetaWallpaperAction & operator =(MetaWallpaperAction const &) = delete; // due to MetaAction |
971 | | MetaWallpaperAction & operator =(MetaWallpaperAction &&) = delete; // due to MetaAction |
972 | | private: |
973 | | SAL_DLLPRIVATE virtual ~MetaWallpaperAction() override; |
974 | | public: |
975 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
976 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
977 | | |
978 | | MetaWallpaperAction( const tools::Rectangle& rRect, |
979 | | const Wallpaper& rPaper ); |
980 | | |
981 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
982 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
983 | | |
984 | 751 | const tools::Rectangle& GetRect() const { return maRect; } |
985 | 751 | const Wallpaper& GetWallpaper() const { return maWallpaper; } |
986 | | }; |
987 | | |
988 | | class VCL_DLLPUBLIC MetaClipRegionAction final : public MetaAction |
989 | | { |
990 | | private: |
991 | | |
992 | | vcl::Region maRegion; |
993 | | bool mbClip; |
994 | | |
995 | | public: |
996 | 0 | MetaClipRegionAction(MetaClipRegionAction const &) = default; |
997 | | MetaClipRegionAction(MetaClipRegionAction &&) = default; |
998 | | MetaClipRegionAction & operator =(MetaClipRegionAction const &) = delete; // due to MetaAction |
999 | | MetaClipRegionAction & operator =(MetaClipRegionAction &&) = delete; // due to MetaAction |
1000 | | private: |
1001 | | SAL_DLLPRIVATE virtual ~MetaClipRegionAction() override; |
1002 | | public: |
1003 | | virtual void Execute( OutputDevice* pOut ) override; |
1004 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1005 | | |
1006 | | SAL_DLLPRIVATE MetaClipRegionAction( vcl::Region aRegion, bool bClip ); |
1007 | | |
1008 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
1009 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
1010 | | |
1011 | 155k | const vcl::Region& GetRegion() const { return maRegion; } |
1012 | 79.2k | bool IsClipping() const { return mbClip; } |
1013 | | }; |
1014 | | |
1015 | | class VCL_DLLPUBLIC MetaISectRectClipRegionAction final : public MetaAction |
1016 | | { |
1017 | | private: |
1018 | | |
1019 | | tools::Rectangle maRect; |
1020 | | |
1021 | | public: |
1022 | 0 | MetaISectRectClipRegionAction(MetaISectRectClipRegionAction const &) = default; |
1023 | | MetaISectRectClipRegionAction(MetaISectRectClipRegionAction &&) = default; |
1024 | | MetaISectRectClipRegionAction & operator =(MetaISectRectClipRegionAction const &) = delete; // due to MetaAction |
1025 | | MetaISectRectClipRegionAction & operator =(MetaISectRectClipRegionAction &&) = delete; // due to MetaAction |
1026 | | private: |
1027 | | SAL_DLLPRIVATE virtual ~MetaISectRectClipRegionAction() override; |
1028 | | public: |
1029 | | virtual void Execute( OutputDevice* pOut ) override; |
1030 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1031 | | |
1032 | | explicit MetaISectRectClipRegionAction( const tools::Rectangle& ); |
1033 | | |
1034 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
1035 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
1036 | | |
1037 | 199 | const tools::Rectangle& GetRect() const { return maRect; } |
1038 | | }; |
1039 | | |
1040 | | class VCL_DLLPUBLIC MetaISectRegionClipRegionAction final : public MetaAction |
1041 | | { |
1042 | | private: |
1043 | | |
1044 | | vcl::Region maRegion; |
1045 | | |
1046 | | public: |
1047 | 0 | MetaISectRegionClipRegionAction(MetaISectRegionClipRegionAction const &) = default; |
1048 | | MetaISectRegionClipRegionAction(MetaISectRegionClipRegionAction &&) = default; |
1049 | | MetaISectRegionClipRegionAction & operator =(MetaISectRegionClipRegionAction const &) = delete; // due to MetaAction |
1050 | | MetaISectRegionClipRegionAction & operator =(MetaISectRegionClipRegionAction &&) = delete; // due to MetaAction |
1051 | | private: |
1052 | | SAL_DLLPRIVATE virtual ~MetaISectRegionClipRegionAction() override; |
1053 | | public: |
1054 | | virtual void Execute( OutputDevice* pOut ) override; |
1055 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1056 | | |
1057 | | explicit MetaISectRegionClipRegionAction( vcl::Region ); |
1058 | | |
1059 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
1060 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
1061 | | |
1062 | 255k | const vcl::Region& GetRegion() const { return maRegion; } |
1063 | | }; |
1064 | | |
1065 | | class VCL_DLLPUBLIC MetaMoveClipRegionAction final : public MetaAction |
1066 | | { |
1067 | | private: |
1068 | | |
1069 | | tools::Long mnHorzMove; |
1070 | | tools::Long mnVertMove; |
1071 | | |
1072 | | public: |
1073 | 0 | MetaMoveClipRegionAction(MetaMoveClipRegionAction const &) = default; |
1074 | | MetaMoveClipRegionAction(MetaMoveClipRegionAction &&) = default; |
1075 | | MetaMoveClipRegionAction & operator =(MetaMoveClipRegionAction const &) = delete; // due to MetaAction |
1076 | | MetaMoveClipRegionAction & operator =(MetaMoveClipRegionAction &&) = delete; // due to MetaAction |
1077 | | private: |
1078 | | SAL_DLLPRIVATE virtual ~MetaMoveClipRegionAction() override; |
1079 | | public: |
1080 | | virtual void Execute( OutputDevice* pOut ) override; |
1081 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1082 | | |
1083 | | SAL_DLLPRIVATE MetaMoveClipRegionAction( tools::Long nHorzMove, tools::Long nVertMove ); |
1084 | | |
1085 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
1086 | | |
1087 | 0 | tools::Long GetHorzMove() const { return mnHorzMove; } |
1088 | 0 | tools::Long GetVertMove() const { return mnVertMove; } |
1089 | | }; |
1090 | | |
1091 | | class VCL_DLLPUBLIC MetaLineColorAction final : public MetaAction |
1092 | | { |
1093 | | private: |
1094 | | |
1095 | | Color maColor; |
1096 | | bool mbSet; |
1097 | | |
1098 | | public: |
1099 | 140 | MetaLineColorAction(MetaLineColorAction const &) = default; |
1100 | | MetaLineColorAction(MetaLineColorAction &&) = default; |
1101 | | MetaLineColorAction & operator =(MetaLineColorAction const &) = delete; // due to MetaAction |
1102 | | MetaLineColorAction & operator =(MetaLineColorAction &&) = delete; // due to MetaAction |
1103 | | private: |
1104 | | SAL_DLLPRIVATE virtual ~MetaLineColorAction() override; |
1105 | | public: |
1106 | | virtual void Execute( OutputDevice* pOut ) override; |
1107 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1108 | | |
1109 | | MetaLineColorAction( const Color& rColor, bool bSet ); |
1110 | | |
1111 | 29.3k | const Color& GetColor() const { return maColor; } |
1112 | 380k | bool IsSetting() const { return mbSet; } |
1113 | | }; |
1114 | | |
1115 | | class VCL_DLLPUBLIC MetaFillColorAction final : public MetaAction |
1116 | | { |
1117 | | private: |
1118 | | |
1119 | | Color maColor; |
1120 | | bool mbSet; |
1121 | | |
1122 | | public: |
1123 | 70 | MetaFillColorAction(MetaFillColorAction const &) = default; |
1124 | | MetaFillColorAction(MetaFillColorAction &&) = default; |
1125 | | MetaFillColorAction & operator =(MetaFillColorAction const &) = delete; // due to MetaAction |
1126 | | MetaFillColorAction & operator =(MetaFillColorAction &&) = delete; // due to MetaAction |
1127 | | private: |
1128 | | virtual ~MetaFillColorAction() override; |
1129 | | public: |
1130 | | virtual void Execute( OutputDevice* pOut ) override; |
1131 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1132 | | |
1133 | | MetaFillColorAction( const Color& rColor, bool bSet ); |
1134 | | |
1135 | 19.0k | const Color& GetColor() const { return maColor; } |
1136 | 200k | bool IsSetting() const { return mbSet; } |
1137 | | |
1138 | | }; |
1139 | | |
1140 | | class VCL_DLLPUBLIC MetaTextColorAction final : public MetaAction |
1141 | | { |
1142 | | private: |
1143 | | |
1144 | | Color maColor; |
1145 | | |
1146 | | public: |
1147 | 861 | MetaTextColorAction(MetaTextColorAction const &) = default; |
1148 | | MetaTextColorAction(MetaTextColorAction &&) = default; |
1149 | | MetaTextColorAction & operator =(MetaTextColorAction const &) = delete; // due to MetaAction |
1150 | | MetaTextColorAction & operator =(MetaTextColorAction &&) = delete; // due to MetaAction |
1151 | | private: |
1152 | | SAL_DLLPRIVATE virtual ~MetaTextColorAction() override; |
1153 | | public: |
1154 | | virtual void Execute( OutputDevice* pOut ) override; |
1155 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1156 | | |
1157 | | explicit MetaTextColorAction( const Color& ); |
1158 | | |
1159 | 672k | const Color& GetColor() const { return maColor; } |
1160 | | }; |
1161 | | |
1162 | | class VCL_DLLPUBLIC MetaTextFillColorAction final : public MetaAction |
1163 | | { |
1164 | | private: |
1165 | | |
1166 | | Color maColor; |
1167 | | bool mbSet; |
1168 | | |
1169 | | public: |
1170 | 861 | MetaTextFillColorAction(MetaTextFillColorAction const &) = default; |
1171 | | MetaTextFillColorAction(MetaTextFillColorAction &&) = default; |
1172 | | MetaTextFillColorAction & operator =(MetaTextFillColorAction const &) = delete; // due to MetaAction |
1173 | | MetaTextFillColorAction & operator =(MetaTextFillColorAction &&) = delete; // due to MetaAction |
1174 | | private: |
1175 | | SAL_DLLPRIVATE virtual ~MetaTextFillColorAction() override; |
1176 | | public: |
1177 | | virtual void Execute( OutputDevice* pOut ) override; |
1178 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1179 | | |
1180 | | MetaTextFillColorAction( const Color& rColor, bool bSet ); |
1181 | | |
1182 | 8.63k | const Color& GetColor() const { return maColor; } |
1183 | 1.50M | bool IsSetting() const { return mbSet; } |
1184 | | |
1185 | | }; |
1186 | | |
1187 | | class VCL_DLLPUBLIC MetaTextLineColorAction final : public MetaAction |
1188 | | { |
1189 | | private: |
1190 | | |
1191 | | Color maColor; |
1192 | | bool mbSet; |
1193 | | |
1194 | | public: |
1195 | 0 | MetaTextLineColorAction(MetaTextLineColorAction const &) = default; |
1196 | | MetaTextLineColorAction(MetaTextLineColorAction &&) = default; |
1197 | | MetaTextLineColorAction & operator =(MetaTextLineColorAction const &) = delete; // due to MetaAction |
1198 | | MetaTextLineColorAction & operator =(MetaTextLineColorAction &&) = delete; // due to MetaAction |
1199 | | private: |
1200 | | SAL_DLLPRIVATE virtual ~MetaTextLineColorAction() override; |
1201 | | public: |
1202 | | virtual void Execute( OutputDevice* pOut ) override; |
1203 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1204 | | |
1205 | | SAL_DLLPRIVATE MetaTextLineColorAction( const Color& rColor, bool bSet ); |
1206 | | |
1207 | 4 | const Color& GetColor() const { return maColor; } |
1208 | 4 | bool IsSetting() const { return mbSet; } |
1209 | | }; |
1210 | | |
1211 | | class VCL_DLLPUBLIC MetaOverlineColorAction final : public MetaAction |
1212 | | { |
1213 | | private: |
1214 | | |
1215 | | Color maColor; |
1216 | | bool mbSet; |
1217 | | |
1218 | | public: |
1219 | 0 | MetaOverlineColorAction(MetaOverlineColorAction const &) = default; |
1220 | | MetaOverlineColorAction(MetaOverlineColorAction &&) = default; |
1221 | | MetaOverlineColorAction & operator =(MetaOverlineColorAction const &) = delete; // due to MetaAction |
1222 | | MetaOverlineColorAction & operator =(MetaOverlineColorAction &&) = delete; // due to MetaAction |
1223 | | private: |
1224 | | SAL_DLLPRIVATE virtual ~MetaOverlineColorAction() override; |
1225 | | public: |
1226 | | virtual void Execute( OutputDevice* pOut ) override; |
1227 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1228 | | |
1229 | | SAL_DLLPRIVATE MetaOverlineColorAction( const Color& rColor, bool bSet ); |
1230 | | |
1231 | 4 | const Color& GetColor() const { return maColor; } |
1232 | 4 | bool IsSetting() const { return mbSet; } |
1233 | | }; |
1234 | | |
1235 | | class VCL_DLLPUBLIC MetaTextAlignAction final : public MetaAction |
1236 | | { |
1237 | | private: |
1238 | | |
1239 | | TextAlign maAlign; |
1240 | | |
1241 | | public: |
1242 | 861 | MetaTextAlignAction(MetaTextAlignAction const &) = default; |
1243 | | MetaTextAlignAction(MetaTextAlignAction &&) = default; |
1244 | | MetaTextAlignAction & operator =(MetaTextAlignAction const &) = delete; // due to MetaAction |
1245 | | MetaTextAlignAction & operator =(MetaTextAlignAction &&) = delete; // due to MetaAction |
1246 | | private: |
1247 | | SAL_DLLPRIVATE virtual ~MetaTextAlignAction() override; |
1248 | | public: |
1249 | | virtual void Execute( OutputDevice* pOut ) override; |
1250 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1251 | | |
1252 | | explicit MetaTextAlignAction( TextAlign eAlign ); |
1253 | | |
1254 | 1.50M | TextAlign GetTextAlign() const { return maAlign; } |
1255 | | }; |
1256 | | |
1257 | | class VCL_DLLPUBLIC MetaMapModeAction final : public MetaAction |
1258 | | { |
1259 | | private: |
1260 | | |
1261 | | MapMode maMapMode; |
1262 | | |
1263 | | public: |
1264 | | SAL_DLLPRIVATE MetaMapModeAction(); |
1265 | 162 | MetaMapModeAction(MetaMapModeAction const &) = default; |
1266 | | MetaMapModeAction(MetaMapModeAction &&) = default; |
1267 | | MetaMapModeAction & operator =(MetaMapModeAction const &) = delete; // due to MetaAction |
1268 | | MetaMapModeAction & operator =(MetaMapModeAction &&) = delete; // due to MetaAction |
1269 | | private: |
1270 | | SAL_DLLPRIVATE virtual ~MetaMapModeAction() override; |
1271 | | public: |
1272 | | virtual void Execute( OutputDevice* pOut ) override; |
1273 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1274 | | |
1275 | | SAL_DLLPRIVATE explicit MetaMapModeAction( const MapMode& ); |
1276 | | |
1277 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
1278 | | |
1279 | 332 | const MapMode& GetMapMode() const { return maMapMode; } |
1280 | | }; |
1281 | | |
1282 | | // tdf#127471 decl for friend below |
1283 | | namespace emfio { class ScaledFontDetectCorrectHelper; } |
1284 | | |
1285 | | class VCL_DLLPUBLIC MetaFontAction final : public MetaAction |
1286 | | { |
1287 | | private: |
1288 | | |
1289 | | vcl::Font maFont; |
1290 | | |
1291 | | // tdf#127471 for import correction of own wrong written EMF/WMF files allow correction |
1292 | | // of FontScale after import. Only from there, so use a friend here and keep the method private |
1293 | | friend class emfio::ScaledFontDetectCorrectHelper; |
1294 | 753 | void correctFontScale(tools::Long nNewFontScale) { maFont.SetFontWidth(nNewFontScale); } |
1295 | | |
1296 | | public: |
1297 | 861 | MetaFontAction(MetaFontAction const &) = default; |
1298 | | MetaFontAction(MetaFontAction &&) = default; |
1299 | | MetaFontAction & operator =(MetaFontAction const &) = delete; // due to MetaAction |
1300 | | MetaFontAction & operator =(MetaFontAction &&) = delete; // due to MetaAction |
1301 | | private: |
1302 | | SAL_DLLPRIVATE virtual ~MetaFontAction() override; |
1303 | | public: |
1304 | | virtual void Execute( OutputDevice* pOut ) override; |
1305 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1306 | | |
1307 | | explicit MetaFontAction( vcl::Font ); |
1308 | | |
1309 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
1310 | | |
1311 | 1.54M | const vcl::Font& GetFont() const { return maFont; } |
1312 | | |
1313 | | }; |
1314 | | |
1315 | | class VCL_DLLPUBLIC MetaPushAction final : public MetaAction |
1316 | | { |
1317 | | private: |
1318 | | |
1319 | | vcl::PushFlags mnFlags; |
1320 | | |
1321 | | public: |
1322 | 70 | MetaPushAction(MetaPushAction const &) = default; |
1323 | | MetaPushAction(MetaPushAction &&) = default; |
1324 | | MetaPushAction & operator =(MetaPushAction const &) = delete; // due to MetaAction |
1325 | | MetaPushAction & operator =(MetaPushAction &&) = delete; // due to MetaAction |
1326 | | private: |
1327 | | SAL_DLLPRIVATE virtual ~MetaPushAction() override; |
1328 | | public: |
1329 | | virtual void Execute( OutputDevice* pOut ) override; |
1330 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1331 | | |
1332 | | explicit MetaPushAction( vcl::PushFlags nFlags ); |
1333 | | |
1334 | 1.59M | vcl::PushFlags GetFlags() const { return mnFlags; } |
1335 | | }; |
1336 | | |
1337 | | class VCL_DLLPUBLIC MetaPopAction final : public MetaAction |
1338 | | { |
1339 | | public: |
1340 | | |
1341 | | MetaPopAction(); |
1342 | 70 | MetaPopAction(MetaPopAction const &) = default; |
1343 | | MetaPopAction(MetaPopAction &&) = default; |
1344 | | MetaPopAction & operator =(MetaPopAction const &) = delete; // due to MetaAction |
1345 | | MetaPopAction & operator =(MetaPopAction &&) = delete; // due to MetaAction |
1346 | | private: |
1347 | | SAL_DLLPRIVATE virtual ~MetaPopAction() override; |
1348 | | public: |
1349 | | virtual void Execute( OutputDevice* pOut ) override; |
1350 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1351 | | }; |
1352 | | |
1353 | | class VCL_DLLPUBLIC MetaRasterOpAction final : public MetaAction |
1354 | | { |
1355 | | private: |
1356 | | |
1357 | | RasterOp meRasterOp; |
1358 | | |
1359 | | public: |
1360 | 0 | MetaRasterOpAction(MetaRasterOpAction const &) = default; |
1361 | | MetaRasterOpAction(MetaRasterOpAction &&) = default; |
1362 | | MetaRasterOpAction & operator =(MetaRasterOpAction const &) = delete; // due to MetaAction |
1363 | | MetaRasterOpAction & operator =(MetaRasterOpAction &&) = delete; // due to MetaAction |
1364 | | private: |
1365 | | SAL_DLLPRIVATE virtual ~MetaRasterOpAction() override; |
1366 | | public: |
1367 | | virtual void Execute( OutputDevice* pOut ) override; |
1368 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1369 | | |
1370 | | explicit MetaRasterOpAction( RasterOp eRasterOp ); |
1371 | | |
1372 | 56.8k | RasterOp GetRasterOp() const { return meRasterOp; } |
1373 | | }; |
1374 | | |
1375 | | class SAL_DLLPUBLIC_RTTI MetaTransparentAction final : public MetaAction |
1376 | | { |
1377 | | private: |
1378 | | |
1379 | | tools::PolyPolygon maPolyPoly; |
1380 | | sal_uInt16 mnTransPercent; |
1381 | | |
1382 | | public: |
1383 | 0 | MetaTransparentAction(MetaTransparentAction const &) = default; |
1384 | | MetaTransparentAction(MetaTransparentAction &&) = default; |
1385 | | MetaTransparentAction & operator =(MetaTransparentAction const &) = delete; // due to MetaAction |
1386 | | MetaTransparentAction & operator =(MetaTransparentAction &&) = delete; // due to MetaAction |
1387 | | private: |
1388 | | virtual ~MetaTransparentAction() override; |
1389 | | public: |
1390 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
1391 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1392 | | |
1393 | | MetaTransparentAction( tools::PolyPolygon aPolyPoly, sal_uInt16 nTransPercent ); |
1394 | | |
1395 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
1396 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
1397 | | |
1398 | 0 | const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; } |
1399 | 0 | sal_uInt16 GetTransparence() const { return mnTransPercent; } |
1400 | | |
1401 | 0 | bool IsTransparent() const override { return true; } |
1402 | | }; |
1403 | | |
1404 | | class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaFloatTransparentAction final : public MetaAction |
1405 | | { |
1406 | | private: |
1407 | | |
1408 | | GDIMetaFile maMtf; |
1409 | | Point maPoint; |
1410 | | Size maSize; |
1411 | | Gradient maGradient; |
1412 | | |
1413 | | // tdf#155479 allow holding MCGR infos |
1414 | | std::optional<basegfx::BColorStops> maSVGTransparencyColorStops; |
1415 | | |
1416 | | public: |
1417 | 0 | MetaFloatTransparentAction(MetaFloatTransparentAction const &) = default; |
1418 | | MetaFloatTransparentAction(MetaFloatTransparentAction &&) = default; |
1419 | | MetaFloatTransparentAction & operator =(MetaFloatTransparentAction const &) = delete; // due to MetaAction |
1420 | | MetaFloatTransparentAction & operator =(MetaFloatTransparentAction &&) = delete; // due to MetaAction |
1421 | | private: |
1422 | | virtual ~MetaFloatTransparentAction() override; |
1423 | | public: |
1424 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
1425 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1426 | | |
1427 | | MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos, |
1428 | | const Size& rSize, Gradient aGradient, |
1429 | | std::optional<basegfx::BColorStops> oStops = std::nullopt); |
1430 | | |
1431 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
1432 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
1433 | | |
1434 | 6 | const GDIMetaFile& GetGDIMetaFile() const { return maMtf; } |
1435 | 6 | const Point& GetPoint() const { return maPoint; } |
1436 | 6 | const Size& GetSize() const { return maSize; } |
1437 | 6 | const Gradient& GetGradient() const { return maGradient; } |
1438 | 0 | bool IsTransparent() const override { return true; } |
1439 | | |
1440 | | // tdf#155479 allow holding MCGR infos |
1441 | | const basegfx::BColorStops* getSVGTransparencyColorStops() const |
1442 | 0 | { return !maSVGTransparencyColorStops ? nullptr : &(*maSVGTransparencyColorStops); } |
1443 | | }; |
1444 | | |
1445 | | class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaEPSAction final : public MetaAction |
1446 | | { |
1447 | | private: |
1448 | | |
1449 | | GfxLink maGfxLink; |
1450 | | GDIMetaFile maSubst; |
1451 | | Point maPoint; |
1452 | | Size maSize; |
1453 | | |
1454 | | public: |
1455 | 0 | MetaEPSAction(MetaEPSAction const &) = default; |
1456 | | MetaEPSAction(MetaEPSAction &&) = default; |
1457 | | MetaEPSAction & operator =(MetaEPSAction const &) = delete; // due to MetaAction |
1458 | | MetaEPSAction & operator =(MetaEPSAction &&) = delete; // due to MetaAction |
1459 | | private: |
1460 | | virtual ~MetaEPSAction() override; |
1461 | | public: |
1462 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
1463 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1464 | | |
1465 | | MetaEPSAction( const Point& rPoint, const Size& rSize, |
1466 | | GfxLink aGfxLink, const GDIMetaFile& rSubst ); |
1467 | | |
1468 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
1469 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
1470 | | |
1471 | 0 | const GfxLink& GetLink() const { return maGfxLink; } |
1472 | 0 | const GDIMetaFile& GetSubstitute() const { return maSubst; } |
1473 | 0 | const Point& GetPoint() const { return maPoint; } |
1474 | 0 | const Size& GetSize() const { return maSize; } |
1475 | | }; |
1476 | | |
1477 | | class VCL_DLLPUBLIC MetaRefPointAction final : public MetaAction |
1478 | | { |
1479 | | private: |
1480 | | |
1481 | | Point maRefPoint; |
1482 | | bool mbSet; |
1483 | | |
1484 | | public: |
1485 | 0 | MetaRefPointAction(MetaRefPointAction const &) = default; |
1486 | | MetaRefPointAction(MetaRefPointAction &&) = default; |
1487 | | MetaRefPointAction & operator =(MetaRefPointAction const &) = delete; // due to MetaAction |
1488 | | MetaRefPointAction & operator =(MetaRefPointAction &&) = delete; // due to MetaAction |
1489 | | private: |
1490 | | SAL_DLLPRIVATE virtual ~MetaRefPointAction() override; |
1491 | | public: |
1492 | | virtual void Execute( OutputDevice* pOut ) override; |
1493 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1494 | | |
1495 | | SAL_DLLPRIVATE MetaRefPointAction( const Point& rRefPoint, bool bSet ); |
1496 | | |
1497 | 0 | const Point& GetRefPoint() const { return maRefPoint; } |
1498 | 0 | bool IsSetting() const { return mbSet; } |
1499 | | }; |
1500 | | |
1501 | | class VCL_DLLPUBLIC MetaCommentAction final : public MetaAction |
1502 | | { |
1503 | | private: |
1504 | | |
1505 | | OString maComment; |
1506 | | sal_Int32 mnValue; |
1507 | | sal_uInt32 mnDataSize; |
1508 | | std::unique_ptr<sal_uInt8[]> |
1509 | | mpData; |
1510 | | |
1511 | | SAL_DLLPRIVATE void ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize ); |
1512 | | |
1513 | | private: |
1514 | | SAL_DLLPRIVATE virtual ~MetaCommentAction() override; |
1515 | | |
1516 | | public: |
1517 | | SAL_DLLPRIVATE explicit MetaCommentAction( const MetaCommentAction& rAct ); |
1518 | | explicit MetaCommentAction( OString aComment, sal_Int32 nValue = 0, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0 ); |
1519 | | |
1520 | | SAL_DLLPRIVATE virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; |
1521 | | SAL_DLLPRIVATE virtual void Scale( double fScaleX, double fScaleY ) override; |
1522 | | |
1523 | | SAL_DLLPRIVATE virtual void Execute( OutputDevice* pOut ) override; |
1524 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1525 | | |
1526 | 75.7k | const OString& GetComment() const { return maComment; } |
1527 | 6.31k | sal_Int32 GetValue() const { return mnValue; } |
1528 | 33.8k | sal_uInt32 GetDataSize() const { return mnDataSize; } |
1529 | 22.5k | const sal_uInt8* GetData() const { return mpData.get(); } |
1530 | | }; |
1531 | | |
1532 | | class VCL_DLLPUBLIC MetaLayoutModeAction final : public MetaAction |
1533 | | { |
1534 | | private: |
1535 | | |
1536 | | vcl::text::ComplexTextLayoutFlags mnLayoutMode; |
1537 | | |
1538 | | public: |
1539 | 1.72k | MetaLayoutModeAction(MetaLayoutModeAction const &) = default; |
1540 | | MetaLayoutModeAction(MetaLayoutModeAction &&) = default; |
1541 | | MetaLayoutModeAction & operator =(MetaLayoutModeAction const &) = delete; // due to MetaAction |
1542 | | MetaLayoutModeAction & operator =(MetaLayoutModeAction &&) = delete; // due to MetaAction |
1543 | | private: |
1544 | | SAL_DLLPRIVATE virtual ~MetaLayoutModeAction() override; |
1545 | | public: |
1546 | | virtual void Execute( OutputDevice* pOut ) override; |
1547 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1548 | | |
1549 | | explicit MetaLayoutModeAction( vcl::text::ComplexTextLayoutFlags nLayoutMode ); |
1550 | | |
1551 | 1.13M | vcl::text::ComplexTextLayoutFlags GetLayoutMode() const { return mnLayoutMode; } |
1552 | | }; |
1553 | | |
1554 | | class VCL_DLLPUBLIC MetaTextLanguageAction final : public MetaAction |
1555 | | { |
1556 | | private: |
1557 | | |
1558 | | LanguageType meTextLanguage; |
1559 | | |
1560 | | public: |
1561 | 147 | MetaTextLanguageAction(MetaTextLanguageAction const &) = default; |
1562 | | MetaTextLanguageAction(MetaTextLanguageAction &&) = default; |
1563 | | MetaTextLanguageAction & operator =(MetaTextLanguageAction const &) = delete; // due to MetaAction |
1564 | | MetaTextLanguageAction & operator =(MetaTextLanguageAction &&) = delete; // due to MetaAction |
1565 | | private: |
1566 | | SAL_DLLPRIVATE virtual ~MetaTextLanguageAction() override; |
1567 | | public: |
1568 | | virtual void Execute( OutputDevice* pOut ) override; |
1569 | | SAL_DLLPRIVATE virtual rtl::Reference<MetaAction> Clone() const override; |
1570 | | |
1571 | | SAL_DLLPRIVATE explicit MetaTextLanguageAction( LanguageType ); |
1572 | | |
1573 | 1.48M | LanguageType GetTextLanguage() const { return meTextLanguage; } |
1574 | | }; |
1575 | | |
1576 | | #endif // INCLUDED_VCL_METAACT_HXX |
1577 | | |
1578 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |