LibreOffice Module vcl (master)  1
metaact.hxx
Go to the documentation of this file.
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 <config_options.h>
24 #include <memory>
25 #include <vcl/dllapi.h>
26 #include <vcl/gradient.hxx>
27 #include <vcl/hatch.hxx>
28 #include <vcl/wall.hxx>
29 #include <vcl/font.hxx>
30 #include <tools/poly.hxx>
31 #include <vcl/bitmapex.hxx>
32 #include <vcl/region.hxx>
33 #include <vcl/outdevstate.hxx>
34 #include <vcl/gdimtf.hxx>
35 #include <vcl/gfxlink.hxx>
36 #include <vcl/lineinfo.hxx>
37 #include <vcl/metaactiontypes.hxx>
39 #include <rtl/ref.hxx>
40 
41 class OutputDevice;
42 class SvStream;
43 enum class DrawTextFlags;
44 
46 {
47  rtl_TextEncoding meActualCharSet;
49 
51  : meActualCharSet(RTL_TEXTENCODING_ASCII_US)
52  , mnParseDepth(0)
53  {}
54 };
55 
57 {
58  rtl_TextEncoding meActualCharSet;
59 
61  meActualCharSet( RTL_TEXTENCODING_ASCII_US )
62  {}
63 };
64 
66 {
67 private:
69 
70 protected:
71  virtual ~MetaAction() override;
72 
73 public:
74  MetaAction();
75  explicit MetaAction( MetaActionType nType );
76  MetaAction( MetaAction const & );
77 
78  virtual void Execute( OutputDevice* pOut );
79 
80  oslInterlockedCount GetRefCount() const { return m_nCount; }
81 
82  virtual rtl::Reference<MetaAction> Clone() const;
83 
84  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove );
85  virtual void Scale( double fScaleX, double fScaleY );
86 
87  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
88  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
89 
90  MetaActionType GetType() const { return mnType; }
94  virtual bool IsTransparent() const { return false; }
95 
96  static rtl::Reference<MetaAction> ReadMetaAction(SvStream& rIStm, ImplMetaReadData* pData);
97 
98 protected:
99  static void ReadColor(SvStream& rIStm, ::Color& rColor);
100  static void WriteColor(SvStream& rIStm, ::Color aColor);
101 };
102 
103 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaPixelAction final : public MetaAction
104 {
105 private:
106  Point maPt;
107  Color maColor;
108 
109 public:
110  MetaPixelAction();
111  MetaPixelAction(MetaPixelAction const &) = default;
112  MetaPixelAction(MetaPixelAction &&) = default;
113  MetaPixelAction & operator =(MetaPixelAction const &) = delete; // due to MetaAction
114  MetaPixelAction & operator =(MetaPixelAction &&) = delete; // due to MetaAction
115 private:
116  virtual ~MetaPixelAction() override;
117 public:
118  virtual void Execute( OutputDevice* pOut ) override;
119  virtual rtl::Reference<MetaAction> Clone() const override;
120  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
121  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
122 
123  MetaPixelAction( const Point& rPt, const Color& rColor );
124 
125  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
126  virtual void Scale( double fScaleX, double fScaleY ) override;
127 
128  const Point& GetPoint() const { return maPt; }
129  const Color& GetColor() const { return maColor; }
130  void SetPoint(Point& rPt) { maPt = rPt; }
131  void SetColor(Color& rColor) { maColor = rColor; }
132 };
133 
134 class SAL_DLLPUBLIC_RTTI MetaPointAction final : public MetaAction
135 {
136 private:
138 
139 public:
140  MetaPointAction();
141  MetaPointAction(MetaPointAction const &) = default;
142  MetaPointAction(MetaPointAction &&) = default;
143  MetaPointAction & operator =(MetaPointAction const &) = delete; // due to MetaAction
144  MetaPointAction & operator =(MetaPointAction &&) = delete; // due to MetaAction
145 private:
146  virtual ~MetaPointAction() override;
147 public:
148  virtual void Execute( OutputDevice* pOut ) override;
149  virtual rtl::Reference<MetaAction> Clone() const override;
150  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
151  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
152 
153  explicit MetaPointAction( const Point& );
154 
155  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
156  virtual void Scale( double fScaleX, double fScaleY ) override;
157 
158  const Point& GetPoint() const { return maPt; }
159  void SetPoint(Point& rPt) { maPt = rPt; }
160 };
161 
163 {
164 private:
165 
169 
170 public:
171  MetaLineAction();
172  MetaLineAction(MetaLineAction const &) = default;
173  MetaLineAction(MetaLineAction &&) = default;
174  MetaLineAction & operator =(MetaLineAction const &) = delete; // due to MetaAction
175  MetaLineAction & operator =(MetaLineAction &&) = delete; // due to MetaAction
176 private:
177  virtual ~MetaLineAction() override;
178 public:
179  virtual void Execute( OutputDevice* pOut ) override;
180  virtual rtl::Reference<MetaAction> Clone() const override;
181  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
182  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
183 
184  MetaLineAction( const Point& rStart, const Point& rEnd );
185  MetaLineAction( const Point& rStart, const Point& rEnd,
186  const LineInfo& rLineInfo );
187 
188  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
189  virtual void Scale( double fScaleX, double fScaleY ) override;
190 
191  const Point& GetStartPoint() const { return maStartPt; }
192  const Point& GetEndPoint() const { return maEndPt; }
193  const LineInfo& GetLineInfo() const { return maLineInfo; }
194  void SetStartPoint(Point& rPoint) { maStartPt = rPoint; }
195  void SetEndPoint(Point& rPoint) { maEndPt = rPoint; }
196  void SetLineInfo(LineInfo& rLineInfo) { maLineInfo = rLineInfo; }
197 };
198 
200 {
201 private:
202 
204 
205 public:
206  MetaRectAction();
207  MetaRectAction(MetaRectAction const &) = default;
208  MetaRectAction(MetaRectAction &&) = default;
209  MetaRectAction & operator =(MetaRectAction const &) = delete; // due to MetaAction
210  MetaRectAction & operator =(MetaRectAction &&) = delete; // due to MetaAction
211 private:
212  virtual ~MetaRectAction() override;
213 public:
214  virtual void Execute( OutputDevice* pOut ) override;
215  virtual rtl::Reference<MetaAction> Clone() const override;
216  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
217  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
218 
219  explicit MetaRectAction( const tools::Rectangle& );
220 
221  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
222  virtual void Scale( double fScaleX, double fScaleY ) override;
223 
224  const tools::Rectangle& GetRect() const { return maRect; }
225  void SetRect(tools::Rectangle& rRect) { maRect = rRect; }
226 };
227 
228 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaRoundRectAction final : public MetaAction
229 {
230 private:
231 
232  tools::Rectangle maRect;
233  sal_uInt32 mnHorzRound;
234  sal_uInt32 mnVertRound;
235 
236 public:
237  MetaRoundRectAction();
238  MetaRoundRectAction(MetaRoundRectAction const &) = default;
239  MetaRoundRectAction(MetaRoundRectAction &&) = default;
240  MetaRoundRectAction & operator =(MetaRoundRectAction const &) = delete; // due to MetaAction
241  MetaRoundRectAction & operator =(MetaRoundRectAction &&) = delete; // due to MetaAction
242 private:
243  virtual ~MetaRoundRectAction() override;
244 public:
245  virtual void Execute( OutputDevice* pOut ) override;
246  virtual rtl::Reference<MetaAction> Clone() const override;
247  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
248  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
249 
250  MetaRoundRectAction( const tools::Rectangle& rRect,
251  sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
252 
253  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
254  virtual void Scale( double fScaleX, double fScaleY ) override;
255 
256  const tools::Rectangle& GetRect() const { return maRect; }
257  sal_uInt32 GetHorzRound() const { return mnHorzRound; }
258  sal_uInt32 GetVertRound() const { return mnVertRound; }
259  void SetRect(const tools::Rectangle& rRect) { maRect = rRect; }
260  void SetHorzRound(sal_uInt32 rHorzRound) { mnHorzRound = rHorzRound; }
261  void SetVertRound(sal_uInt32 rVertRound) { mnVertRound = rVertRound; }
262 };
263 
264 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaEllipseAction final : public MetaAction
265 {
266 private:
267 
268  tools::Rectangle maRect;
269 
270 public:
271  MetaEllipseAction();
272  MetaEllipseAction(MetaEllipseAction const &) = default;
273  MetaEllipseAction(MetaEllipseAction &&) = default;
274  MetaEllipseAction & operator =(MetaEllipseAction const &) = delete; // due to MetaAction
275  MetaEllipseAction & operator =(MetaEllipseAction &&) = delete; // due to MetaAction
276 private:
277  virtual ~MetaEllipseAction() override;
278 public:
279  virtual void Execute( OutputDevice* pOut ) override;
280  virtual rtl::Reference<MetaAction> Clone() const override;
281  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
282  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
283 
284  explicit MetaEllipseAction( const tools::Rectangle& );
285 
286  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
287  virtual void Scale( double fScaleX, double fScaleY ) override;
288 
289  const tools::Rectangle& GetRect() const { return maRect; }
290  void SetRect(tools::Rectangle& rRect) { maRect = rRect; }
291 };
292 
293 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaArcAction final : public MetaAction
294 {
295 private:
296 
297  tools::Rectangle maRect;
298  Point maStartPt;
299  Point maEndPt;
300 
301 public:
302  MetaArcAction();
303  MetaArcAction(MetaArcAction const &) = default;
304  MetaArcAction(MetaArcAction &&) = default;
305  MetaArcAction & operator =(MetaArcAction const &) = delete; // due to MetaAction
306  MetaArcAction & operator =(MetaArcAction &&) = delete; // due to MetaAction
307 private:
308  virtual ~MetaArcAction() override;
309 public:
310  virtual void Execute( OutputDevice* pOut ) override;
311  virtual rtl::Reference<MetaAction> Clone() const override;
312  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
313  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
314 
315  MetaArcAction( const tools::Rectangle& rRect,
316  const Point& rStart, const Point& rEnd );
317 
318  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
319  virtual void Scale( double fScaleX, double fScaleY ) override;
320 
321  const tools::Rectangle& GetRect() const { return maRect; }
322  const Point& GetStartPoint() const { return maStartPt; }
323  const Point& GetEndPoint() const { return maEndPt; }
324  void SetRect(tools::Rectangle& rRect) { maRect = rRect; }
325  void SetStartPoint(Point& rPoint) { maStartPt = rPoint; }
326  void SetEndPoint(Point& rPoint) { maEndPt = rPoint; }
327 };
328 
329 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaPieAction final : public MetaAction
330 {
331 private:
332 
333  tools::Rectangle maRect;
334  Point maStartPt;
335  Point maEndPt;
336 
337 public:
338  MetaPieAction();
339  MetaPieAction(MetaPieAction const &) = default;
340  MetaPieAction(MetaPieAction &&) = default;
341  MetaPieAction & operator =(MetaPieAction const &) = delete; // due to MetaAction
342  MetaPieAction & operator =(MetaPieAction &&) = delete; // due to MetaAction
343 private:
344  virtual ~MetaPieAction() override;
345 public:
346  virtual void Execute( OutputDevice* pOut ) override;
347  virtual rtl::Reference<MetaAction> Clone() const override;
348  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
349  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
350 
351  MetaPieAction( const tools::Rectangle& rRect,
352  const Point& rStart, const Point& rEnd );
353 
354  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
355  virtual void Scale( double fScaleX, double fScaleY ) override;
356 
357  const tools::Rectangle& GetRect() const { return maRect; }
358  const Point& GetStartPoint() const { return maStartPt; }
359  const Point& GetEndPoint() const { return maEndPt; }
360  void SetRect(tools::Rectangle& rRect) { maRect = rRect; }
361  void SetStartPoint(Point& rPoint) { maStartPt = rPoint; }
362  void SetEndPoint(Point& rPoint) { maEndPt = rPoint; }
363 };
364 
365 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaChordAction final : public MetaAction
366 {
367 private:
368 
369  tools::Rectangle maRect;
370  Point maStartPt;
371  Point maEndPt;
372 
373 public:
374  MetaChordAction();
375  MetaChordAction(MetaChordAction const &) = default;
376  MetaChordAction(MetaChordAction &&) = default;
377  MetaChordAction & operator =(MetaChordAction const &) = delete; // due to MetaAction
378  MetaChordAction & operator =(MetaChordAction &&) = delete; // due to MetaAction
379 private:
380  virtual ~MetaChordAction() override;
381 public:
382  virtual void Execute( OutputDevice* pOut ) override;
383  virtual rtl::Reference<MetaAction> Clone() const override;
384  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
385  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
386 
387  MetaChordAction( const tools::Rectangle& rRect,
388  const Point& rStart, const Point& rEnd );
389 
390  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
391  virtual void Scale( double fScaleX, double fScaleY ) override;
392 
393  const tools::Rectangle& GetRect() const { return maRect; }
394  const Point& GetStartPoint() const { return maStartPt; }
395  const Point& GetEndPoint() const { return maEndPt; }
396  void SetRect(tools::Rectangle& rRect) { maRect = rRect; }
397  void SetStartPoint(Point& rPoint) { maStartPt = rPoint; }
398  void SetEndPoint(Point& rPoint) { maEndPt = rPoint; }
399 };
400 
401 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaPolyLineAction final : public MetaAction
402 {
403 private:
404 
405  LineInfo maLineInfo;
406  tools::Polygon maPoly;
407 
408 public:
409  MetaPolyLineAction();
410  MetaPolyLineAction(MetaPolyLineAction const &) = default;
411  MetaPolyLineAction(MetaPolyLineAction &&) = default;
412  MetaPolyLineAction & operator =(MetaPolyLineAction const &) = delete; // due to MetaAction
413  MetaPolyLineAction & operator =(MetaPolyLineAction &&) = delete; // due to MetaAction
414 private:
415  virtual ~MetaPolyLineAction() override;
416 public:
417  virtual void Execute( OutputDevice* pOut ) override;
418  virtual rtl::Reference<MetaAction> Clone() const override;
419  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
420  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
421 
422  explicit MetaPolyLineAction( const tools::Polygon& );
423  explicit MetaPolyLineAction( const tools::Polygon&, const LineInfo& );
424 
425  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
426  virtual void Scale( double fScaleX, double fScaleY ) override;
427 
428  const tools::Polygon& GetPolygon() const { return maPoly; }
429  const LineInfo& GetLineInfo() const { return maLineInfo; }
430  void SetLineInfo(LineInfo& rLineInfo) { maLineInfo = rLineInfo; }
431  void SetPolygon(tools::Polygon& rPoly) { maPoly = rPoly; }
432 };
433 
434 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaPolygonAction final : public MetaAction
435 {
436 private:
437 
438  tools::Polygon maPoly;
439 
440 public:
441  MetaPolygonAction();
442  MetaPolygonAction(MetaPolygonAction const &) = default;
443  MetaPolygonAction(MetaPolygonAction &&) = default;
444  MetaPolygonAction & operator =(MetaPolygonAction const &) = delete; // due to MetaAction
445  MetaPolygonAction & operator =(MetaPolygonAction &&) = delete; // due to MetaAction
446 private:
447  virtual ~MetaPolygonAction() override;
448 public:
449  virtual void Execute( OutputDevice* pOut ) override;
450  virtual rtl::Reference<MetaAction> Clone() const override;
451  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
452  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
453 
454  explicit MetaPolygonAction( const tools::Polygon& );
455 
456  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
457  virtual void Scale( double fScaleX, double fScaleY ) override;
458 
459  const tools::Polygon& GetPolygon() const { return maPoly; }
460  void SetPolygon(tools::Polygon& rPoly) { maPoly = rPoly; }
461 };
462 
463 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaPolyPolygonAction final : public MetaAction
464 {
465 private:
466 
467  tools::PolyPolygon maPolyPoly;
468 
469 public:
470  MetaPolyPolygonAction();
471  MetaPolyPolygonAction(MetaPolyPolygonAction const &) = default;
472  MetaPolyPolygonAction(MetaPolyPolygonAction &&) = default;
473  MetaPolyPolygonAction & operator =(MetaPolyPolygonAction const &) = delete; // due to MetaAction
474  MetaPolyPolygonAction & operator =(MetaPolyPolygonAction &&) = delete; // due to MetaAction
475 private:
476  virtual ~MetaPolyPolygonAction() override;
477 public:
478  virtual void Execute( OutputDevice* pOut ) override;
479  virtual rtl::Reference<MetaAction> Clone() const override;
480  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
481  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
482 
483  explicit MetaPolyPolygonAction( const tools::PolyPolygon& );
484 
485  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
486  virtual void Scale( double fScaleX, double fScaleY ) override;
487 
488  const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
489  void SetPolyPolygon(tools::PolyPolygon& rPolyPoly) { maPolyPoly = rPolyPoly; }
490 };
491 
492 class SAL_DLLPUBLIC_RTTI MetaTextAction final : public MetaAction
493 {
494 private:
495 
497  OUString maStr;
498  sal_Int32 mnIndex;
499  sal_Int32 mnLen;
500 
501 public:
502  MetaTextAction();
503  MetaTextAction(MetaTextAction const &) = default;
504  MetaTextAction(MetaTextAction &&) = default;
505  MetaTextAction & operator =(MetaTextAction const &) = delete; // due to MetaAction
506  MetaTextAction & operator =(MetaTextAction &&) = delete; // due to MetaAction
507 private:
508  virtual ~MetaTextAction() override;
509 public:
510  virtual void Execute( OutputDevice* pOut ) override;
511  virtual rtl::Reference<MetaAction> Clone() const override;
512  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
513  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
514 
515  MetaTextAction( const Point& rPt, const OUString& rStr,
516  sal_Int32 nIndex, sal_Int32 nLen );
517 
518  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
519  virtual void Scale( double fScaleX, double fScaleY ) override;
520 
521  const Point& GetPoint() const { return maPt; }
522  const OUString& GetText() const { return maStr; }
523  sal_Int32 GetIndex() const { return mnIndex; }
524  sal_Int32 GetLen() const { return mnLen; }
525  void SetPoint(Point& rPt) { maPt = rPt; }
526  void SetText(OUString& rStr) { maStr = rStr; }
527  void SetIndex(sal_Int32 rIndex) { mnIndex = rIndex; }
528  void SetLen(sal_Int32 rLen) { mnLen = rLen; }
529 };
530 
531 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaTextArrayAction final : public MetaAction
532 {
533 private:
534 
535  Point maStartPt;
536  OUString maStr;
537  std::unique_ptr<tools::Long[]>
538  mpDXAry;
539  sal_Int32 mnIndex;
540  sal_Int32 mnLen;
541 
542  virtual ~MetaTextArrayAction() override;
543 
544 public:
545  MetaTextArrayAction();
546  MetaTextArrayAction( const MetaTextArrayAction& rAction );
547  MetaTextArrayAction( const Point& rStartPt, const OUString& rStr,
548  const tools::Long* pDXAry, sal_Int32 nIndex,
549  sal_Int32 nLen );
550 
551  virtual void Execute( OutputDevice* pOut ) override;
552 
553  virtual rtl::Reference<MetaAction> Clone() const override;
554 
555  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
556  virtual void Scale( double fScaleX, double fScaleY ) override;
557 
558  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
559  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
560 
561  const Point& GetPoint() const { return maStartPt; }
562  const OUString& GetText() const { return maStr; }
563  sal_Int32 GetIndex() const { return mnIndex; }
564  sal_Int32 GetLen() const { return mnLen; }
565  tools::Long* GetDXArray() const { return mpDXAry.get(); }
566  void SetPoint(Point& rPt) { maStartPt = rPt; }
567  void SetText(OUString& rStr) { maStr = rStr; }
568  void SetIndex(sal_Int32 rIndex) { mnIndex = rIndex; }
569  void SetLen(sal_Int32 rLen) { mnLen = rLen; }
570  void SetDXArray(std::unique_ptr<tools::Long[]> aArray);
571 };
572 
573 class SAL_DLLPUBLIC_RTTI MetaStretchTextAction final : public MetaAction
574 {
575 private:
576 
578  OUString maStr;
579  sal_uInt32 mnWidth;
580  sal_Int32 mnIndex;
581  sal_Int32 mnLen;
582 
583 public:
585  MetaStretchTextAction(MetaStretchTextAction const &) = default;
587  MetaStretchTextAction & operator =(MetaStretchTextAction const &) = delete; // due to MetaAction
588  MetaStretchTextAction & operator =(MetaStretchTextAction &&) = delete; // due to MetaAction
589 private:
590  virtual ~MetaStretchTextAction() override;
591 public:
592  virtual void Execute( OutputDevice* pOut ) override;
593  virtual rtl::Reference<MetaAction> Clone() const override;
594  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
595  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
596 
597  MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
598  const OUString& rStr,
599  sal_Int32 nIndex, sal_Int32 nLen );
600 
601  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
602  virtual void Scale( double fScaleX, double fScaleY ) override;
603 
604  const Point& GetPoint() const { return maPt; }
605  const OUString& GetText() const { return maStr; }
606  sal_uInt32 GetWidth() const { return mnWidth; }
607  sal_Int32 GetIndex() const { return mnIndex; }
608  sal_Int32 GetLen() const { return mnLen; }
609  void SetPoint(Point& rPt) { maPt = rPt; }
610  void SetText(OUString& rStr) { maStr = rStr; }
611  void SetWidth(sal_uInt32 rWidth) { mnWidth = rWidth; }
612  void SetIndex(sal_uInt32 rIndex) { mnIndex = rIndex; }
613  void SetLen(sal_uInt32 rLen) { mnLen = rLen; }
614 };
615 
616 class SAL_DLLPUBLIC_RTTI MetaTextRectAction final : public MetaAction
617 {
618 private:
619 
621  OUString maStr;
623 
624 public:
626  MetaTextRectAction(MetaTextRectAction const &) = default;
628  MetaTextRectAction & operator =(MetaTextRectAction const &) = delete; // due to MetaAction
629  MetaTextRectAction & operator =(MetaTextRectAction &&) = delete; // due to MetaAction
630 private:
631  virtual ~MetaTextRectAction() override;
632 public:
633  virtual void Execute( OutputDevice* pOut ) override;
634  virtual rtl::Reference<MetaAction> Clone() const override;
635  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
636  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
637 
638  MetaTextRectAction( const tools::Rectangle& rRect,
639  const OUString& rStr, DrawTextFlags nStyle );
640 
641  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
642  virtual void Scale( double fScaleX, double fScaleY ) override;
643 
644  const tools::Rectangle& GetRect() const { return maRect; }
645  const OUString& GetText() const { return maStr; }
646  DrawTextFlags GetStyle() const { return mnStyle; }
647  void SetRect(tools::Rectangle& rRect) { maRect = rRect; }
648  void SetText(OUString& rStr) { maStr = rStr; }
649  void SetStyle(DrawTextFlags rStyle) { mnStyle = rStyle; }
650 };
651 
652 class SAL_DLLPUBLIC_RTTI MetaTextLineAction final : public MetaAction
653 {
654 private:
655 
661 
662 public:
664  MetaTextLineAction(MetaTextLineAction const &) = default;
666  MetaTextLineAction & operator =(MetaTextLineAction const &) = delete; // due to MetaAction
667  MetaTextLineAction & operator =(MetaTextLineAction &&) = delete; // due to MetaAction
668 private:
669  virtual ~MetaTextLineAction() override;
670 public:
671  virtual void Execute( OutputDevice* pOut ) override;
672  virtual rtl::Reference<MetaAction> Clone() const override;
673  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
674  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
675 
676  MetaTextLineAction( const Point& rPos, tools::Long nWidth,
677  FontStrikeout eStrikeout,
678  FontLineStyle eUnderline,
679  FontLineStyle eOverline );
680  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
681  virtual void Scale( double fScaleX, double fScaleY ) override;
682 
683  const Point& GetStartPoint() const { return maPos; }
684  tools::Long GetWidth() const { return mnWidth; }
685  FontStrikeout GetStrikeout() const { return meStrikeout; }
686  FontLineStyle GetUnderline() const { return meUnderline; }
687  FontLineStyle GetOverline() const { return meOverline; }
688  void SetStartPoint(Point& rPos) { maPos = rPos; }
689  void SetWidth(tools::Long rWidth) { mnWidth = rWidth; }
690  void SetStrikeout(FontStrikeout eStrikeout) { meStrikeout = eStrikeout; }
691  void SetUnderline(FontLineStyle eUnderline) { meUnderline = eUnderline; }
692  void SetOverline(FontLineStyle eOverline) { meOverline = eOverline; }
693 };
694 
696 {
697 private:
698 
701 
702 public:
703  MetaBmpAction();
704  MetaBmpAction(MetaBmpAction const &) = default;
705  MetaBmpAction(MetaBmpAction &&) = default;
706  MetaBmpAction & operator =(MetaBmpAction const &) = delete; // due to MetaAction
707  MetaBmpAction & operator =(MetaBmpAction &&) = delete; // due to MetaAction
708 private:
709  virtual ~MetaBmpAction() override;
710 public:
711  virtual void Execute( OutputDevice* pOut ) override;
712  virtual rtl::Reference<MetaAction> Clone() const override;
713  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
714  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
715 
716  MetaBmpAction( const Point& rPt, const Bitmap& rBmp );
717 
718  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
719  virtual void Scale( double fScaleX, double fScaleY ) override;
720 
721  const Bitmap& GetBitmap() const { return maBmp; }
722  const Point& GetPoint() const { return maPt; }
723  void SetBitmap(Bitmap& rBmp) { maBmp = rBmp; }
724  void SetPoint(Point& rPt) { maPt = rPt; }
725 };
726 
728 {
729 private:
730 
734 
735 public:
737  MetaBmpScaleAction(MetaBmpScaleAction const &) = default;
739  MetaBmpScaleAction & operator =(MetaBmpScaleAction const &) = delete; // due to MetaAction
740  MetaBmpScaleAction & operator =(MetaBmpScaleAction &&) = delete; // due to MetaAction
741 private:
742  virtual ~MetaBmpScaleAction() override;
743 public:
744  virtual void Execute( OutputDevice* pOut ) override;
745  virtual rtl::Reference<MetaAction> Clone() const override;
746  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
747  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
748 
749  MetaBmpScaleAction( const Point& rPt, const Size& rSz,
750  const Bitmap& rBmp );
751 
752  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
753  virtual void Scale( double fScaleX, double fScaleY ) override;
754 
755  const Bitmap& GetBitmap() const { return maBmp; }
756  const Point& GetPoint() const { return maPt; }
757  const Size& GetSize() const { return maSz; }
758  void SetBitmap(Bitmap& rBmp) { maBmp = rBmp; }
759  void SetPoint(Point& rPt) { maPt = rPt; }
760  void SetSize(Size& rSz) { maSz = rSz; }
761 };
762 
763 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaBmpScalePartAction final : public MetaAction
764 {
765 private:
766 
767  Bitmap maBmp;
768  Point maDstPt;
769  Size maDstSz;
770  Point maSrcPt;
771  Size maSrcSz;
772 
773 public:
774  MetaBmpScalePartAction();
775  MetaBmpScalePartAction(MetaBmpScalePartAction const &) = default;
776  MetaBmpScalePartAction(MetaBmpScalePartAction &&) = default;
777  MetaBmpScalePartAction & operator =(MetaBmpScalePartAction const &) = delete; // due to MetaAction
778  MetaBmpScalePartAction & operator =(MetaBmpScalePartAction &&) = delete; // due to MetaAction
779 private:
780  virtual ~MetaBmpScalePartAction() override;
781 public:
782  virtual void Execute( OutputDevice* pOut ) override;
783  virtual rtl::Reference<MetaAction> Clone() const override;
784  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
785  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
786 
787  MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
788  const Point& rSrcPt, const Size& rSrcSz,
789  const Bitmap& rBmp );
790 
791  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
792  virtual void Scale( double fScaleX, double fScaleY ) override;
793 
794  const Bitmap& GetBitmap() const { return maBmp; }
795  const Point& GetDestPoint() const { return maDstPt; }
796  const Size& GetDestSize() const { return maDstSz; }
797  const Point& GetSrcPoint() const { return maSrcPt; }
798  const Size& GetSrcSize() const { return maSrcSz; }
799  void SetBitmap(Bitmap& rBmp) { maBmp = rBmp; }
800  void SetDestPoint(Point& rPt) { maDstPt = rPt; }
801  void SetDestSize(Size& rSz) { maDstSz = rSz; }
802  void SetSrcPoint(Point& rPt) { maSrcPt = rPt; }
803  void SetSrcSize(Size& rSz) { maSrcSz = rSz; }
804 };
805 
807 {
808 private:
809 
812 
813 public:
814  MetaBmpExAction();
815  MetaBmpExAction(MetaBmpExAction const &) = default;
816  MetaBmpExAction(MetaBmpExAction &&) = default;
817  MetaBmpExAction & operator =(MetaBmpExAction const &) = delete; // due to MetaAction
818  MetaBmpExAction & operator =(MetaBmpExAction &&) = delete; // due to MetaAction
819 private:
820  virtual ~MetaBmpExAction() override;
821 public:
822  virtual void Execute( OutputDevice* pOut ) override;
823  virtual rtl::Reference<MetaAction> Clone() const override;
824  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
825  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
826 
827  MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx );
828 
829  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
830  virtual void Scale( double fScaleX, double fScaleY ) override;
831 
832  const BitmapEx& GetBitmapEx() const { return maBmpEx; }
833  const Point& GetPoint() const { return maPt; }
834  void SetBitmapEx(BitmapEx rBmpEx) { maBmpEx = rBmpEx; }
835  void SetPoint(Point& rPt) { maPt = rPt; }
836  bool IsTransparent() const override { return GetBitmapEx().IsAlpha(); }
837 };
838 
840 {
841 private:
842 
846 
847 public:
849  MetaBmpExScaleAction(MetaBmpExScaleAction const &) = default;
851  MetaBmpExScaleAction & operator =(MetaBmpExScaleAction const &) = delete; // due to MetaAction
852  MetaBmpExScaleAction & operator =(MetaBmpExScaleAction &&) = delete; // due to MetaAction
853 private:
854  virtual ~MetaBmpExScaleAction() override;
855 public:
856  virtual void Execute( OutputDevice* pOut ) override;
857  virtual rtl::Reference<MetaAction> Clone() const override;
858  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
859  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
860 
861  MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
862  const BitmapEx& rBmpEx ) ;
863 
864  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
865  virtual void Scale( double fScaleX, double fScaleY ) override;
866 
867  const BitmapEx& GetBitmapEx() const { return maBmpEx; }
868  const Point& GetPoint() const { return maPt; }
869  const Size& GetSize() const { return maSz; }
870  void SetBitmapEx(BitmapEx& rBmpEx) { maBmpEx = rBmpEx; }
871  void SetPoint(Point& rPt) { maPt = rPt; }
872  void SetSize(Size& rSz) { maSz = rSz; }
873  bool IsTransparent() const override { return GetBitmapEx().IsAlpha(); }
874 };
875 
876 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaBmpExScalePartAction final : public MetaAction
877 {
878 private:
879 
880  BitmapEx maBmpEx;
881  Point maDstPt;
882  Size maDstSz;
883  Point maSrcPt;
884  Size maSrcSz;
885 
886 public:
887  MetaBmpExScalePartAction();
888  MetaBmpExScalePartAction(MetaBmpExScalePartAction const &) = default;
889  MetaBmpExScalePartAction(MetaBmpExScalePartAction &&) = default;
890  MetaBmpExScalePartAction & operator =(MetaBmpExScalePartAction const &) = delete; // due to MetaAction
891  MetaBmpExScalePartAction & operator =(MetaBmpExScalePartAction &&) = delete; // due to MetaAction
892 private:
893  virtual ~MetaBmpExScalePartAction() override;
894 public:
895  virtual void Execute( OutputDevice* pOut ) override;
896  virtual rtl::Reference<MetaAction> Clone() const override;
897  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
898  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
899 
900  MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
901  const Point& rSrcPt, const Size& rSrcSz,
902  const BitmapEx& rBmpEx );
903 
904  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
905  virtual void Scale( double fScaleX, double fScaleY ) override;
906 
907  const BitmapEx& GetBitmapEx() const { return maBmpEx; }
908  const Point& GetDestPoint() const { return maDstPt; }
909  const Size& GetDestSize() const { return maDstSz; }
910  const Point& GetSrcPoint() const { return maSrcPt; }
911  const Size& GetSrcSize() const { return maSrcSz; }
912  void SetBitmapEx(BitmapEx& rBmpEx) { maBmpEx = rBmpEx; }
913  void SetDestPoint(Point& rDstPt) { maDstPt = rDstPt; }
914  void SetDestSize(Size& rDstSz) { maDstSz = rDstSz; }
915  void SetSrcPoint(Point& rSrcPt) { maSrcPt = rSrcPt; }
916  void SetSrcSize(Size& rSrcSz) { maSrcSz = rSrcSz; }
917  bool IsTransparent() const override { return GetBitmapEx().IsAlpha(); }
918 };
919 
920 class SAL_DLLPUBLIC_RTTI MetaMaskAction final : public MetaAction
921 {
922 private:
923 
927 
928 public:
929  MetaMaskAction();
930  MetaMaskAction(MetaMaskAction const &) = default;
931  MetaMaskAction(MetaMaskAction &&) = default;
932  MetaMaskAction & operator =(MetaMaskAction const &) = delete; // due to MetaAction
933  MetaMaskAction & operator =(MetaMaskAction &&) = delete; // due to MetaAction
934 private:
935  virtual ~MetaMaskAction() override;
936 public:
937  virtual void Execute( OutputDevice* pOut ) override;
938  virtual rtl::Reference<MetaAction> Clone() const override;
939  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
940  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
941 
942  MetaMaskAction( const Point& rPt,
943  const Bitmap& rBmp,
944  const Color& rColor );
945 
946  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
947  virtual void Scale( double fScaleX, double fScaleY ) override;
948 
949  const Bitmap& GetBitmap() const { return maBmp; }
950  const Color& GetColor() const { return maColor; }
951  const Point& GetPoint() const { return maPt; }
952  void SetBitmap(Bitmap& rBmp) { maBmp = rBmp; }
953  void SetPoint(Point& rPt) { maPt = rPt; }
954 };
955 
956 class SAL_DLLPUBLIC_RTTI MetaMaskScaleAction final : public MetaAction
957 {
958 private:
959 
964 
965 public:
967  MetaMaskScaleAction(MetaMaskScaleAction const &) = default;
969  MetaMaskScaleAction & operator =(MetaMaskScaleAction const &) = delete; // due to MetaAction
970  MetaMaskScaleAction & operator =(MetaMaskScaleAction &&) = delete; // due to MetaAction
971 private:
972  virtual ~MetaMaskScaleAction() override;
973 public:
974  virtual void Execute( OutputDevice* pOut ) override;
975  virtual rtl::Reference<MetaAction> Clone() const override;
976  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
977  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
978 
979  MetaMaskScaleAction( const Point& rPt, const Size& rSz,
980  const Bitmap& rBmp,
981  const Color& rColor );
982 
983  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
984  virtual void Scale( double fScaleX, double fScaleY ) override;
985 
986  const Bitmap& GetBitmap() const { return maBmp; }
987  const Color& GetColor() const { return maColor; }
988  const Point& GetPoint() const { return maPt; }
989  const Size& GetSize() const { return maSz; }
990  void SetBitmap(Bitmap& rBmp) { maBmp = rBmp; }
991  void SetPoint(Point& rPt) { maPt = rPt; }
992  void SetSize(Size& rSz) { maSz = rSz; }
993 };
994 
995 class SAL_DLLPUBLIC_RTTI MetaMaskScalePartAction final : public MetaAction
996 {
997 private:
998 
1005 
1006 public:
1010  MetaMaskScalePartAction & operator =(MetaMaskScalePartAction const &) = delete; // due to MetaAction
1011  MetaMaskScalePartAction & operator =(MetaMaskScalePartAction &&) = delete; // due to MetaAction
1012 private:
1013  virtual ~MetaMaskScalePartAction() override;
1014 public:
1015  virtual void Execute( OutputDevice* pOut ) override;
1016  virtual rtl::Reference<MetaAction> Clone() const override;
1017  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1018  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1019 
1020  MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz,
1021  const Point& rSrcPt, const Size& rSrcSz,
1022  const Bitmap& rBmp,
1023  const Color& rColor );
1024 
1025  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1026  virtual void Scale( double fScaleX, double fScaleY ) override;
1027 
1028  const Bitmap& GetBitmap() const { return maBmp; }
1029  const Color& GetColor() const { return maColor; }
1030  const Point& GetDestPoint() const { return maDstPt; }
1031  const Size& GetDestSize() const { return maDstSz; }
1032  const Point& GetSrcPoint() const { return maSrcPt; }
1033  const Size& GetSrcSize() const { return maSrcSz; }
1034  void SetBitmap(Bitmap& rBmp) { maBmp = rBmp; }
1035  void SetColor(Color& rColor) { maColor = rColor; }
1036  void SetDestPoint(Point& rPt) { maDstPt = rPt; }
1037  void SetDestSize(Size& rSz) { maDstSz = rSz; }
1038  void SetSrcPoint(Point& rPt) { maSrcPt = rPt; }
1039  void SetSrcSize(Size& rSz) { maSrcSz = rSz; }
1040 };
1041 
1042 class SAL_DLLPUBLIC_RTTI MetaGradientAction final : public MetaAction
1043 {
1044 private:
1045 
1048 
1049 public:
1051  MetaGradientAction(MetaGradientAction const &) = default;
1052  MetaGradientAction(MetaGradientAction &&) = default;
1053  MetaGradientAction & operator =(MetaGradientAction const &) = delete; // due to MetaAction
1054  MetaGradientAction & operator =(MetaGradientAction &&) = delete; // due to MetaAction
1055 private:
1056  virtual ~MetaGradientAction() override;
1057 public:
1058  virtual void Execute( OutputDevice* pOut ) override;
1059  virtual rtl::Reference<MetaAction> Clone() const override;
1060  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1061  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1062 
1063  MetaGradientAction( const tools::Rectangle& rRect, const Gradient& rGradient );
1064 
1065  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1066  virtual void Scale( double fScaleX, double fScaleY ) override;
1067 
1068  const tools::Rectangle& GetRect() const { return maRect; }
1069  const Gradient& GetGradient() const { return maGradient; }
1070  void SetGradient(Gradient& rGradient) { maGradient = rGradient; }
1071  void SetRect(tools::Rectangle& rRect) { maRect = rRect; }
1072 };
1073 
1075 {
1076 private:
1077 
1080 
1081 public:
1083  MetaGradientExAction(MetaGradientExAction const &) = default;
1085  MetaGradientExAction & operator =(MetaGradientExAction const &) = delete; // due to MetaAction
1086  MetaGradientExAction & operator =(MetaGradientExAction &&) = delete; // due to MetaAction
1087 private:
1088  virtual ~MetaGradientExAction() override;
1089 public:
1090  virtual void Execute( OutputDevice* pOut ) override;
1091  virtual rtl::Reference<MetaAction> Clone() const override;
1092  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1093  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1094 
1095  MetaGradientExAction( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
1096 
1097  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1098  virtual void Scale( double fScaleX, double fScaleY ) override;
1099 
1100  const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
1101  const Gradient& GetGradient() const { return maGradient; }
1102  void SetPolyPolygon(tools::PolyPolygon& rPolyPoly) { maPolyPoly = rPolyPoly; }
1103  void SetGradient(Gradient& rGradient) { maGradient = rGradient; }
1104 };
1105 
1106 class SAL_DLLPUBLIC_RTTI MetaHatchAction final : public MetaAction
1107 {
1108 private:
1109 
1112 
1113 public:
1114  MetaHatchAction();
1115  MetaHatchAction(MetaHatchAction const &) = default;
1116  MetaHatchAction(MetaHatchAction &&) = default;
1117  MetaHatchAction & operator =(MetaHatchAction const &) = delete; // due to MetaAction
1118  MetaHatchAction & operator =(MetaHatchAction &&) = delete; // due to MetaAction
1119 private:
1120  virtual ~MetaHatchAction() override;
1121 public:
1122  virtual void Execute( OutputDevice* pOut ) override;
1123  virtual rtl::Reference<MetaAction> Clone() const override;
1124  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1125  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1126 
1127  MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
1128 
1129  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1130  virtual void Scale( double fScaleX, double fScaleY ) override;
1131 
1132  const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
1133  const Hatch& GetHatch() const { return maHatch; }
1134  void SetPolyPolygon(tools::PolyPolygon& rPolyPoly) { maPolyPoly = rPolyPoly; }
1135  void SetHatch(Hatch& rHatch) { maHatch = rHatch; }
1136 };
1137 
1138 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaWallpaperAction final : public MetaAction
1139 {
1140 private:
1141 
1142  tools::Rectangle maRect;
1143  Wallpaper maWallpaper;
1144 
1145 public:
1146  MetaWallpaperAction();
1147  MetaWallpaperAction(MetaWallpaperAction const &) = default;
1148  MetaWallpaperAction(MetaWallpaperAction &&) = default;
1149  MetaWallpaperAction & operator =(MetaWallpaperAction const &) = delete; // due to MetaAction
1150  MetaWallpaperAction & operator =(MetaWallpaperAction &&) = delete; // due to MetaAction
1151 private:
1152  virtual ~MetaWallpaperAction() override;
1153 public:
1154  virtual void Execute( OutputDevice* pOut ) override;
1155  virtual rtl::Reference<MetaAction> Clone() const override;
1156  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1157  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1158 
1159  MetaWallpaperAction( const tools::Rectangle& rRect,
1160  const Wallpaper& rPaper );
1161 
1162  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1163  virtual void Scale( double fScaleX, double fScaleY ) override;
1164 
1165  const tools::Rectangle& GetRect() const { return maRect; }
1166  const Wallpaper& GetWallpaper() const { return maWallpaper; }
1167  void SetWallpaper(Wallpaper& rWallpaper) { maWallpaper = rWallpaper; }
1168 };
1169 
1171 {
1172 private:
1173 
1175  bool mbClip;
1176 
1177 public:
1179  MetaClipRegionAction(MetaClipRegionAction const &) = default;
1181  MetaClipRegionAction & operator =(MetaClipRegionAction const &) = delete; // due to MetaAction
1182  MetaClipRegionAction & operator =(MetaClipRegionAction &&) = delete; // due to MetaAction
1183 private:
1184  virtual ~MetaClipRegionAction() override;
1185 public:
1186  virtual void Execute( OutputDevice* pOut ) override;
1187  virtual rtl::Reference<MetaAction> Clone() const override;
1188  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1189  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1190 
1191  MetaClipRegionAction( const vcl::Region& rRegion, bool bClip );
1192 
1193  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1194  virtual void Scale( double fScaleX, double fScaleY ) override;
1195 
1196  const vcl::Region& GetRegion() const { return maRegion; }
1197  bool IsClipping() const { return mbClip; }
1198  void SetRegion(vcl::Region& rRegion) { maRegion = rRegion; }
1199  void SetClipping(bool bClip) { mbClip = bClip; }
1200 };
1201 
1203 {
1204 private:
1205 
1207 
1208 public:
1212  MetaISectRectClipRegionAction & operator =(MetaISectRectClipRegionAction const &) = delete; // due to MetaAction
1213  MetaISectRectClipRegionAction & operator =(MetaISectRectClipRegionAction &&) = delete; // due to MetaAction
1214 private:
1215  virtual ~MetaISectRectClipRegionAction() override;
1216 public:
1217  virtual void Execute( OutputDevice* pOut ) override;
1218  virtual rtl::Reference<MetaAction> Clone() const override;
1219  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1220  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1221 
1223 
1224  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1225  virtual void Scale( double fScaleX, double fScaleY ) override;
1226 
1227  const tools::Rectangle& GetRect() const { return maRect; }
1228  void SetRect(tools::Rectangle& rRect) { maRect = rRect; }
1229 };
1230 
1232 {
1233 private:
1234 
1236 
1237 public:
1241  MetaISectRegionClipRegionAction & operator =(MetaISectRegionClipRegionAction const &) = delete; // due to MetaAction
1242  MetaISectRegionClipRegionAction & operator =(MetaISectRegionClipRegionAction &&) = delete; // due to MetaAction
1243 private:
1244  virtual ~MetaISectRegionClipRegionAction() override;
1245 public:
1246  virtual void Execute( OutputDevice* pOut ) override;
1247  virtual rtl::Reference<MetaAction> Clone() const override;
1248  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1249  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1250 
1251  explicit MetaISectRegionClipRegionAction( const vcl::Region& );
1252 
1253  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1254  virtual void Scale( double fScaleX, double fScaleY ) override;
1255 
1256  const vcl::Region& GetRegion() const { return maRegion; }
1257  void SetRegion(vcl::Region& rRegion) { maRegion = rRegion; }
1258 };
1259 
1261 {
1262 private:
1263 
1266 
1267 public:
1271  MetaMoveClipRegionAction & operator =(MetaMoveClipRegionAction const &) = delete; // due to MetaAction
1272  MetaMoveClipRegionAction & operator =(MetaMoveClipRegionAction &&) = delete; // due to MetaAction
1273 private:
1274  virtual ~MetaMoveClipRegionAction() override;
1275 public:
1276  virtual void Execute( OutputDevice* pOut ) override;
1277  virtual rtl::Reference<MetaAction> Clone() const override;
1278  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1279  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1280 
1281  MetaMoveClipRegionAction( tools::Long nHorzMove, tools::Long nVertMove );
1282 
1283  virtual void Scale( double fScaleX, double fScaleY ) override;
1284 
1285  tools::Long GetHorzMove() const { return mnHorzMove; }
1286  tools::Long GetVertMove() const { return mnVertMove; }
1287  void SetHorzMove(tools::Long nHorzMove) { mnHorzMove = nHorzMove; }
1288  void SetVertMove(tools::Long nVertMove) { mnVertMove = nVertMove; }
1289 };
1290 
1292 {
1293 private:
1294 
1296  bool mbSet;
1297 
1298 public:
1300  MetaLineColorAction(MetaLineColorAction const &) = default;
1302  MetaLineColorAction & operator =(MetaLineColorAction const &) = delete; // due to MetaAction
1303  MetaLineColorAction & operator =(MetaLineColorAction &&) = delete; // due to MetaAction
1304 private:
1305  virtual ~MetaLineColorAction() override;
1306 public:
1307  virtual void Execute( OutputDevice* pOut ) override;
1308  virtual rtl::Reference<MetaAction> Clone() const override;
1309  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1310  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1311 
1312  MetaLineColorAction( const Color& rColor, bool bSet );
1313 
1314  const Color& GetColor() const { return maColor; }
1315  bool IsSetting() const { return mbSet; }
1316  void SetColor(Color& rColor) { maColor = rColor; }
1317  void SetSetting(bool rSet) { mbSet = rSet; }
1318 };
1319 
1321 {
1322 private:
1323 
1325  bool mbSet;
1326 
1327 public:
1329  MetaFillColorAction(MetaFillColorAction const &) = default;
1331  MetaFillColorAction & operator =(MetaFillColorAction const &) = delete; // due to MetaAction
1332  MetaFillColorAction & operator =(MetaFillColorAction &&) = delete; // due to MetaAction
1333 private:
1334  virtual ~MetaFillColorAction() override;
1335 public:
1336  virtual void Execute( OutputDevice* pOut ) override;
1337  virtual rtl::Reference<MetaAction> Clone() const override;
1338  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1339  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1340 
1341  MetaFillColorAction( const Color& rColor, bool bSet );
1342 
1343  const Color& GetColor() const { return maColor; }
1344  bool IsSetting() const { return mbSet; }
1345  void SetSetting(bool rSet) { mbSet = rSet; }
1346  void SetColor(Color& rColor) { maColor = rColor; }
1347 
1348 };
1349 
1351 {
1352 private:
1353 
1355 
1356 public:
1358  MetaTextColorAction(MetaTextColorAction const &) = default;
1360  MetaTextColorAction & operator =(MetaTextColorAction const &) = delete; // due to MetaAction
1361  MetaTextColorAction & operator =(MetaTextColorAction &&) = delete; // due to MetaAction
1362 private:
1363  virtual ~MetaTextColorAction() override;
1364 public:
1365  virtual void Execute( OutputDevice* pOut ) override;
1366  virtual rtl::Reference<MetaAction> Clone() const override;
1367  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1368  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1369 
1370  explicit MetaTextColorAction( const Color& );
1371 
1372  const Color& GetColor() const { return maColor; }
1373  void SetColor(Color& rColor) { maColor = rColor; }
1374 };
1375 
1377 {
1378 private:
1379 
1381  bool mbSet;
1382 
1383 public:
1387  MetaTextFillColorAction & operator =(MetaTextFillColorAction const &) = delete; // due to MetaAction
1388  MetaTextFillColorAction & operator =(MetaTextFillColorAction &&) = delete; // due to MetaAction
1389 private:
1390  virtual ~MetaTextFillColorAction() override;
1391 public:
1392  virtual void Execute( OutputDevice* pOut ) override;
1393  virtual rtl::Reference<MetaAction> Clone() const override;
1394  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1395  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1396 
1397  MetaTextFillColorAction( const Color& rColor, bool bSet );
1398 
1399  const Color& GetColor() const { return maColor; }
1400  void SetColor(Color& rColor) { maColor = rColor; }
1401  void SetSetting(bool bSet) { mbSet = bSet; }
1402  bool IsSetting() const { return mbSet; }
1403 
1404 };
1405 
1407 {
1408 private:
1409 
1411  bool mbSet;
1412 
1413 public:
1417  MetaTextLineColorAction & operator =(MetaTextLineColorAction const &) = delete; // due to MetaAction
1418  MetaTextLineColorAction & operator =(MetaTextLineColorAction &&) = delete; // due to MetaAction
1419 private:
1420  virtual ~MetaTextLineColorAction() override;
1421 public:
1422  virtual void Execute( OutputDevice* pOut ) override;
1423  virtual rtl::Reference<MetaAction> Clone() const override;
1424  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1425  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1426 
1427  MetaTextLineColorAction( const Color& rColor, bool bSet );
1428 
1429  const Color& GetColor() const { return maColor; }
1430  void SetColor(const Color& rColor) { maColor = rColor; }
1431  void SetSetting(bool bSet) { mbSet = bSet; }
1432  bool IsSetting() const { return mbSet; }
1433 };
1434 
1436 {
1437 private:
1438 
1440  bool mbSet;
1441 
1442 public:
1446  MetaOverlineColorAction & operator =(MetaOverlineColorAction const &) = delete; // due to MetaAction
1447  MetaOverlineColorAction & operator =(MetaOverlineColorAction &&) = delete; // due to MetaAction
1448 private:
1449  virtual ~MetaOverlineColorAction() override;
1450 public:
1451  virtual void Execute( OutputDevice* pOut ) override;
1452  virtual rtl::Reference<MetaAction> Clone() const override;
1453  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1454  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1455 
1456  MetaOverlineColorAction( const Color& rColor, bool bSet );
1457 
1458  const Color& GetColor() const { return maColor; }
1459  void SetColor(const Color& rColor) { maColor = rColor; }
1460  void SetSetting(bool bSet) { mbSet = bSet; }
1461  bool IsSetting() const { return mbSet; }
1462 };
1463 
1465 {
1466 private:
1467 
1469 
1470 public:
1472  MetaTextAlignAction(MetaTextAlignAction const &) = default;
1474  MetaTextAlignAction & operator =(MetaTextAlignAction const &) = delete; // due to MetaAction
1475  MetaTextAlignAction & operator =(MetaTextAlignAction &&) = delete; // due to MetaAction
1476 private:
1477  virtual ~MetaTextAlignAction() override;
1478 public:
1479  virtual void Execute( OutputDevice* pOut ) override;
1480  virtual rtl::Reference<MetaAction> Clone() const override;
1481  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1482  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1483 
1484  explicit MetaTextAlignAction( TextAlign eAlign );
1485 
1486  TextAlign GetTextAlign() const { return maAlign; }
1487  void SetTextAlign(TextAlign eAlign) { maAlign = eAlign; }
1488 };
1489 
1491 {
1492 private:
1493 
1495 
1496 public:
1498  MetaMapModeAction(MetaMapModeAction const &) = default;
1499  MetaMapModeAction(MetaMapModeAction &&) = default;
1500  MetaMapModeAction & operator =(MetaMapModeAction const &) = delete; // due to MetaAction
1501  MetaMapModeAction & operator =(MetaMapModeAction &&) = delete; // due to MetaAction
1502 private:
1503  virtual ~MetaMapModeAction() override;
1504 public:
1505  virtual void Execute( OutputDevice* pOut ) override;
1506  virtual rtl::Reference<MetaAction> Clone() const override;
1507  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1508  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1509 
1510  explicit MetaMapModeAction( const MapMode& );
1511 
1512  virtual void Scale( double fScaleX, double fScaleY ) override;
1513 
1514  const MapMode& GetMapMode() const { return maMapMode; }
1515  void SetMapMode(const MapMode& rMapMode) { maMapMode = rMapMode; }
1516 };
1517 
1518 // tdf#127471 decl for friend below
1519 namespace emfio { class ScaledFontDetectCorrectHelper; }
1520 
1522 {
1523 private:
1524 
1526 
1527  // tdf#127471 for import correction of own wrong written EMF/WMF files allow correction
1528  // of FontScale after import. Only from there, so use a friend here and keep the method private
1530  void correctFontScale(tools::Long nNewFontScale) { maFont.SetAverageFontWidth(nNewFontScale); }
1531 
1532 public:
1533  MetaFontAction();
1534  MetaFontAction(MetaFontAction const &) = default;
1535  MetaFontAction(MetaFontAction &&) = default;
1536  MetaFontAction & operator =(MetaFontAction const &) = delete; // due to MetaAction
1537  MetaFontAction & operator =(MetaFontAction &&) = delete; // due to MetaAction
1538 private:
1539  virtual ~MetaFontAction() override;
1540 public:
1541  virtual void Execute( OutputDevice* pOut ) override;
1542  virtual rtl::Reference<MetaAction> Clone() const override;
1543  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1544  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1545 
1546  explicit MetaFontAction( const vcl::Font& );
1547 
1548  virtual void Scale( double fScaleX, double fScaleY ) override;
1549 
1550  const vcl::Font& GetFont() const { return maFont; }
1551  void SetFont(const vcl::Font& rFont) { maFont = rFont; }
1552 
1553 };
1554 
1556 {
1557 private:
1558 
1560 
1561 public:
1562  MetaPushAction();
1563  MetaPushAction(MetaPushAction const &) = default;
1564  MetaPushAction(MetaPushAction &&) = default;
1565  MetaPushAction & operator =(MetaPushAction const &) = delete; // due to MetaAction
1566  MetaPushAction & operator =(MetaPushAction &&) = delete; // due to MetaAction
1567 private:
1568  virtual ~MetaPushAction() override;
1569 public:
1570  virtual void Execute( OutputDevice* pOut ) override;
1571  virtual rtl::Reference<MetaAction> Clone() const override;
1572  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1573  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1574 
1575  explicit MetaPushAction( PushFlags nFlags );
1576 
1577  PushFlags GetFlags() const { return mnFlags; }
1578  void SetPushFlags(const PushFlags nFlags) { mnFlags = nFlags; }
1579 };
1580 
1582 {
1583 public:
1584 
1585  MetaPopAction();
1586  MetaPopAction(MetaPopAction const &) = default;
1587  MetaPopAction(MetaPopAction &&) = default;
1588  MetaPopAction & operator =(MetaPopAction const &) = delete; // due to MetaAction
1589  MetaPopAction & operator =(MetaPopAction &&) = delete; // due to MetaAction
1590 private:
1591  virtual ~MetaPopAction() override;
1592 public:
1593  virtual void Execute( OutputDevice* pOut ) override;
1594  virtual rtl::Reference<MetaAction> Clone() const override;
1595  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1596  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1597 };
1598 
1600 {
1601 private:
1602 
1604 
1605 public:
1607  MetaRasterOpAction(MetaRasterOpAction const &) = default;
1608  MetaRasterOpAction(MetaRasterOpAction &&) = default;
1609  MetaRasterOpAction & operator =(MetaRasterOpAction const &) = delete; // due to MetaAction
1610  MetaRasterOpAction & operator =(MetaRasterOpAction &&) = delete; // due to MetaAction
1611 private:
1612  virtual ~MetaRasterOpAction() override;
1613 public:
1614  virtual void Execute( OutputDevice* pOut ) override;
1615  virtual rtl::Reference<MetaAction> Clone() const override;
1616  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1617  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1618 
1619  explicit MetaRasterOpAction( RasterOp eRasterOp );
1620 
1621  RasterOp GetRasterOp() const { return meRasterOp; }
1622  void SetRasterOp(const RasterOp eRasterOp) { meRasterOp = eRasterOp; }
1623 };
1624 
1625 class SAL_DLLPUBLIC_RTTI MetaTransparentAction final : public MetaAction
1626 {
1627 private:
1628 
1630  sal_uInt16 mnTransPercent;
1631 
1632 public:
1634  MetaTransparentAction(MetaTransparentAction const &) = default;
1636  MetaTransparentAction & operator =(MetaTransparentAction const &) = delete; // due to MetaAction
1637  MetaTransparentAction & operator =(MetaTransparentAction &&) = delete; // due to MetaAction
1638 private:
1639  virtual ~MetaTransparentAction() override;
1640 public:
1641  virtual void Execute( OutputDevice* pOut ) override;
1642  virtual rtl::Reference<MetaAction> Clone() const override;
1643  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1644  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1645 
1646  MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent );
1647 
1648  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1649  virtual void Scale( double fScaleX, double fScaleY ) override;
1650 
1651  const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
1652  sal_uInt16 GetTransparence() const { return mnTransPercent; }
1653  void SetPolyPolygon(const tools::PolyPolygon& rPolyPoly) { maPolyPoly = rPolyPoly; }
1654  void SetTransparence(const sal_uInt16 nTransPercent) { mnTransPercent = nTransPercent; }
1655 
1656  bool IsTransparent() const override { return true; }
1657 };
1658 
1659 class SAL_DLLPUBLIC_RTTI MetaFloatTransparentAction final : public MetaAction
1660 {
1661 private:
1662 
1667 
1668 public:
1672  MetaFloatTransparentAction & operator =(MetaFloatTransparentAction const &) = delete; // due to MetaAction
1673  MetaFloatTransparentAction & operator =(MetaFloatTransparentAction &&) = delete; // due to MetaAction
1674 private:
1675  virtual ~MetaFloatTransparentAction() override;
1676 public:
1677  virtual void Execute( OutputDevice* pOut ) override;
1678  virtual rtl::Reference<MetaAction> Clone() const override;
1679  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1680  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1681 
1682  MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
1683  const Size& rSize, const Gradient& rGradient );
1684 
1685  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1686  virtual void Scale( double fScaleX, double fScaleY ) override;
1687 
1688  const GDIMetaFile& GetGDIMetaFile() const { return maMtf; }
1689  const Point& GetPoint() const { return maPoint; }
1690  const Size& GetSize() const { return maSize; }
1691  const Gradient& GetGradient() const { return maGradient; }
1692  void SetGDIMetaFile(const GDIMetaFile &rMtf) { maMtf = rMtf; }
1693  void SetPoint(const Point& rPoint) { maPoint = rPoint; }
1694  void SetSize(const Size& rSize) { maSize = rSize; }
1695  void SetGradient(const Gradient& rGradient) { maGradient = rGradient; }
1696  bool IsTransparent() const override { return true; }
1697 };
1698 
1700 {
1701 private:
1702 
1707 
1708 public:
1709  MetaEPSAction();
1710  MetaEPSAction(MetaEPSAction const &) = default;
1711  MetaEPSAction(MetaEPSAction &&) = default;
1712  MetaEPSAction & operator =(MetaEPSAction const &) = delete; // due to MetaAction
1713  MetaEPSAction & operator =(MetaEPSAction &&) = delete; // due to MetaAction
1714 private:
1715  virtual ~MetaEPSAction() override;
1716 public:
1717  virtual void Execute( OutputDevice* pOut ) override;
1718  virtual rtl::Reference<MetaAction> Clone() const override;
1719  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1720  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1721 
1722  MetaEPSAction( const Point& rPoint, const Size& rSize,
1723  const GfxLink& rGfxLink, const GDIMetaFile& rSubst );
1724 
1725  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1726  virtual void Scale( double fScaleX, double fScaleY ) override;
1727 
1728  const GfxLink& GetLink() const { return maGfxLink; }
1729  const GDIMetaFile& GetSubstitute() const { return maSubst; }
1730  const Point& GetPoint() const { return maPoint; }
1731  const Size& GetSize() const { return maSize; }
1732  void SetLink(const GfxLink& rGfxLink) { maGfxLink = rGfxLink; }
1733  void SetSubstitute(const GDIMetaFile& rSubst) { maSubst = rSubst; }
1734  void SetPoint(const Point& rPoint) { maPoint = rPoint; }
1735  void SetSize(const Size& rSize) { maSize = rSize; }
1736 };
1737 
1739 {
1740 private:
1741 
1743  bool mbSet;
1744 
1745 public:
1747  MetaRefPointAction(MetaRefPointAction const &) = default;
1748  MetaRefPointAction(MetaRefPointAction &&) = default;
1749  MetaRefPointAction & operator =(MetaRefPointAction const &) = delete; // due to MetaAction
1750  MetaRefPointAction & operator =(MetaRefPointAction &&) = delete; // due to MetaAction
1751 private:
1752  virtual ~MetaRefPointAction() override;
1753 public:
1754  virtual void Execute( OutputDevice* pOut ) override;
1755  virtual rtl::Reference<MetaAction> Clone() const override;
1756  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1757  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1758 
1759  MetaRefPointAction( const Point& rRefPoint, bool bSet );
1760 
1761  const Point& GetRefPoint() const { return maRefPoint; }
1762  void SetRefPoint(const Point& rRefPoint) { maRefPoint = rRefPoint; }
1763  void SetSetting(const bool bSet) { mbSet = bSet; }
1764  bool IsSetting() const { return mbSet; }
1765 };
1766 
1768 {
1769 private:
1770 
1771  OString maComment;
1772  sal_Int32 mnValue;
1773  sal_uInt32 mnDataSize;
1774  std::unique_ptr<sal_uInt8[]>
1776 
1777  SAL_DLLPRIVATE void ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize );
1778 
1779 private:
1780  virtual ~MetaCommentAction() override;
1781 
1782 public:
1783  explicit MetaCommentAction();
1784  explicit MetaCommentAction( const MetaCommentAction& rAct );
1785  explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0 );
1786 
1787  virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
1788  virtual void Scale( double fScaleX, double fScaleY ) override;
1789 
1790  virtual void Execute( OutputDevice* pOut ) override;
1791  virtual rtl::Reference<MetaAction> Clone() const override;
1792  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1793  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1794 
1795  const OString& GetComment() const { return maComment; }
1796  sal_Int32 GetValue() const { return mnValue; }
1797  sal_uInt32 GetDataSize() const { return mnDataSize; }
1798  const sal_uInt8* GetData() const { return mpData.get(); }
1799  void SetComment(const OString& rComment) { maComment = rComment; }
1800  void SetValue(const sal_Int32 nValue) { mnValue = nValue; }
1801  void SetDataSize(const sal_Int32 nDataSize) { mnDataSize = nDataSize; }
1802  void SetData(const sal_uInt8* pData, const sal_uInt32 nDataSize) { ImplInitDynamicData(pData, nDataSize); }
1803 };
1804 
1806 {
1807 private:
1808 
1810 
1811 public:
1813  MetaLayoutModeAction(MetaLayoutModeAction const &) = default;
1815  MetaLayoutModeAction & operator =(MetaLayoutModeAction const &) = delete; // due to MetaAction
1816  MetaLayoutModeAction & operator =(MetaLayoutModeAction &&) = delete; // due to MetaAction
1817 private:
1818  virtual ~MetaLayoutModeAction() override;
1819 public:
1820  virtual void Execute( OutputDevice* pOut ) override;
1821  virtual rtl::Reference<MetaAction> Clone() const override;
1822  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1823  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1824 
1825  explicit MetaLayoutModeAction( ComplexTextLayoutFlags nLayoutMode );
1826 
1827  ComplexTextLayoutFlags GetLayoutMode() const { return mnLayoutMode; }
1828  void SetLayoutMode(const ComplexTextLayoutFlags nLayoutMode) { mnLayoutMode = nLayoutMode; }
1829 };
1830 
1832 {
1833 private:
1834 
1836 
1837 public:
1841  MetaTextLanguageAction & operator =(MetaTextLanguageAction const &) = delete; // due to MetaAction
1842  MetaTextLanguageAction & operator =(MetaTextLanguageAction &&) = delete; // due to MetaAction
1843 private:
1844  virtual ~MetaTextLanguageAction() override;
1845 public:
1846  virtual void Execute( OutputDevice* pOut ) override;
1847  virtual rtl::Reference<MetaAction> Clone() const override;
1848  virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1849  virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1850 
1852 
1853  LanguageType GetTextLanguage() const { return meTextLanguage; }
1854  void SetTextLanguage(const LanguageType eTextLanguage) { meTextLanguage = eTextLanguage; }
1855 };
1856 
1857 #endif // INCLUDED_VCL_METAACT_HXX
1858 
1859 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetComment(const OString &rComment)
Definition: metaact.hxx:1799
void SetPoint(Point &rPt)
Definition: metaact.hxx:159
const Gradient & GetGradient() const
Definition: metaact.hxx:1691
MetaActionType mnType
Definition: metaact.hxx:68
virtual void Execute(OutputDevice *pOut)
Definition: metaact.cxx:168
const LineInfo & GetLineInfo() const
Definition: metaact.hxx:193
GfxLink maGfxLink
Definition: metaact.hxx:1703
DrawTextFlags GetStyle() const
Definition: metaact.hxx:646
const Size & GetDestSize() const
Definition: metaact.hxx:1031
Definition: hatch.hxx:46
bool IsTransparent() const override
#i10613# Extracted from Printer::GetPreparedMetaFile.
Definition: metaact.hxx:1696
GDIMetaFile maSubst
Definition: metaact.hxx:1704
void SetPoint(Point &rPt)
Definition: metaact.hxx:991
bool IsClipping() const
Definition: metaact.hxx:1197
void SetText(OUString &rStr)
Definition: metaact.hxx:610
const Color & GetColor() const
Definition: metaact.hxx:1458
sal_Int32 GetValue() const
Definition: metaact.hxx:1796
const Bitmap & GetBitmap() const
Definition: metaact.hxx:986
sal_Int32 GetLen() const
Definition: metaact.hxx:524
void SetPolyPolygon(const tools::PolyPolygon &rPolyPoly)
Definition: metaact.hxx:1653
void SetPushFlags(const PushFlags nFlags)
Definition: metaact.hxx:1578
void SetRefPoint(const Point &rRefPoint)
Definition: metaact.hxx:1762
const Point & GetPoint() const
Definition: metaact.hxx:756
LanguageType GetTextLanguage() const
Definition: metaact.hxx:1853
rtl_TextEncoding meActualCharSet
Definition: metaact.hxx:47
Bitmap maBmp
Definition: metaact.hxx:924
void SetStrikeout(FontStrikeout eStrikeout)
Definition: metaact.hxx:690
const GDIMetaFile & GetGDIMetaFile() const
Definition: metaact.hxx:1688
tools::Long GetVertMove() const
Definition: metaact.hxx:1286
void SetData(const sal_uInt8 *pData, const sal_uInt32 nDataSize)
Definition: metaact.hxx:1802
void SetGradient(Gradient &rGradient)
Definition: metaact.hxx:1070
void SetAverageFontWidth(tools::Long nWidth)
Definition: font/font.cxx:835
const tools::PolyPolygon & GetPolyPolygon() const
Definition: metaact.hxx:1100
std::unique_ptr< ContentProperties > pData
void SetPoint(Point &rPt)
Definition: metaact.hxx:835
void SetSize(const Size &rSize)
Definition: metaact.hxx:1694
bool IsSetting() const
Definition: metaact.hxx:1402
void SetPoint(const Point &rPoint)
Definition: metaact.hxx:1693
void SetSetting(bool rSet)
Definition: metaact.hxx:1345
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
void SetSize(const Size &rSize)
Definition: metaact.hxx:1735
void SetGDIMetaFile(const GDIMetaFile &rMtf)
Definition: metaact.hxx:1692
OUString maStr
Definition: metaact.hxx:497
long Long
void SetIndex(sal_uInt32 rIndex)
Definition: metaact.hxx:612
void SetSetting(const bool bSet)
Definition: metaact.hxx:1763
void SetVertMove(tools::Long nVertMove)
Definition: metaact.hxx:1288
const Point & GetPoint() const
Definition: metaact.hxx:1730
void SetText(OUString &rStr)
Definition: metaact.hxx:648
virtual bool IsTransparent() const
#i10613# Extracted from Printer::GetPreparedMetaFile.
Definition: metaact.hxx:94
sal_Int32 mnIndex
Definition: metaact.hxx:498
tools::Long GetLen(const Point &rPnt)
const Point & GetPoint() const
Definition: metaact.hxx:1689
DrawTextFlags mnStyle
Definition: metaact.hxx:622
void SetUnderline(FontLineStyle eUnderline)
Definition: metaact.hxx:691
const Size & GetSize() const
Definition: metaact.hxx:757
const tools::PolyPolygon & GetPolyPolygon() const
Definition: metaact.hxx:1651
void SetBitmap(Bitmap &rBmp)
Definition: metaact.hxx:758
const Point & GetEndPoint() const
Definition: metaact.hxx:192
basegfx::BColor maColor
const OUString & GetText() const
Definition: metaact.hxx:605
void SetColor(Color &rColor)
Definition: metaact.hxx:1316
void SetIndex(sal_Int32 rIndex)
Definition: metaact.hxx:527
const Point & GetPoint() const
Definition: metaact.hxx:988
DrawTextFlags
RasterOp GetRasterOp() const
Definition: metaact.hxx:1621
void SetLink(const GfxLink &rGfxLink)
Definition: metaact.hxx:1732
void SetPoint(Point &rPt)
Definition: metaact.hxx:953
const sal_uInt8 * GetData() const
Definition: metaact.hxx:1798
void SetLayoutMode(const ComplexTextLayoutFlags nLayoutMode)
Definition: metaact.hxx:1828
void SetStartPoint(Point &rPos)
Definition: metaact.hxx:688
void SetPoint(Point &rPt)
Definition: metaact.hxx:871
void SetRasterOp(const RasterOp eRasterOp)
Definition: metaact.hxx:1622
const Point & GetPoint() const
Definition: metaact.hxx:868
const OUString & GetText() const
Definition: metaact.hxx:522
const Color & GetColor() const
Definition: metaact.hxx:950
RasterOp
Definition: vclenum.hxx:192
const Bitmap & GetBitmap() const
Definition: metaact.hxx:721
const vcl::Region & GetRegion() const
Definition: metaact.hxx:1196
void SetColor(Color &rColor)
Definition: metaact.hxx:1346
oslInterlockedCount GetRefCount() const
Definition: metaact.hxx:80
oslFileHandle & pOut
ComplexTextLayoutFlags mnLayoutMode
Definition: metaact.hxx:1809
const Gradient & GetGradient() const
Definition: metaact.hxx:1069
const Color & GetColor() const
Definition: metaact.hxx:1314
PushFlags
Definition: outdevstate.hxx:38
MetaActionType
const tools::Rectangle & GetRect() const
Definition: metaact.hxx:1227
void SetSrcSize(Size &rSz)
Definition: metaact.hxx:1039
void SetGradient(Gradient &rGradient)
Definition: metaact.hxx:1103
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1629
void SetBitmap(Bitmap &rBmp)
Definition: metaact.hxx:952
const Size & GetSize() const
Definition: metaact.hxx:869
bool IsTransparent() const override
#i10613# Extracted from Printer::GetPreparedMetaFile.
Definition: metaact.hxx:873
void SetValue(const sal_Int32 nValue)
Definition: metaact.hxx:1800
void correctFontScale(tools::Long nNewFontScale)
Definition: metaact.hxx:1530
void SetStyle(DrawTextFlags rStyle)
Definition: metaact.hxx:649
void SetHorzMove(tools::Long nHorzMove)
Definition: metaact.hxx:1287
FontLineStyle GetUnderline() const
Definition: metaact.hxx:686
tools::Rectangle maRect
Definition: metaact.hxx:620
void SetWidth(tools::Long rWidth)
Definition: metaact.hxx:689
void SetClipping(bool bClip)
Definition: metaact.hxx:1199
const vcl::Region & GetRegion() const
Definition: metaact.hxx:1256
Gradient maGradient
Definition: metaact.hxx:1047
const Size & GetSrcSize() const
Definition: metaact.hxx:1033
void SetLen(sal_uInt32 rLen)
Definition: metaact.hxx:613
bool IsTransparent() const override
#i10613# Extracted from Printer::GetPreparedMetaFile.
Definition: metaact.hxx:836
FontStrikeout meStrikeout
Definition: metaact.hxx:658
void SetBitmapEx(BitmapEx rBmpEx)
Definition: metaact.hxx:834
sal_uInt32 mnDataSize
Definition: metaact.hxx:1773
bool IsTransparent() const override
#i10613# Extracted from Printer::GetPreparedMetaFile.
Definition: metaact.hxx:1656
void SetFont(const vcl::Font &rFont)
Definition: metaact.hxx:1551
void SetRegion(vcl::Region &rRegion)
Definition: metaact.hxx:1257
const tools::Rectangle & GetRect() const
Definition: metaact.hxx:224
FontLineStyle meOverline
Definition: metaact.hxx:660
void SetColor(Color &rColor)
Definition: metaact.hxx:1400
Bitmap maBmp
Definition: metaact.hxx:699
void SetPoint(Point &rPt)
Definition: metaact.hxx:724
void SetPoint(Point &rPt)
Definition: metaact.hxx:759
std::unique_ptr< sal_uInt8[]> mpData
Definition: metaact.hxx:1775
sal_Int32 mnValue
Definition: metaact.hxx:1772
tools::Long GetWidth() const
Definition: metaact.hxx:684
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
sal_Int32 mnLen
Definition: metaact.hxx:499
sal_uInt16 GetTransparence() const
Definition: metaact.hxx:1652
virtual void Scale(double fScaleX, double fScaleY)
Definition: metaact.cxx:181
Point maStartPt
Definition: metaact.hxx:167
const Size & GetSize() const
Definition: metaact.hxx:989
const MapMode & GetMapMode() const
Definition: metaact.hxx:1514
void SetRegion(vcl::Region &rRegion)
Definition: metaact.hxx:1198
const Point & GetPoint() const
Definition: metaact.hxx:521
bool IsSetting() const
Definition: metaact.hxx:1315
void SetSize(Size &rSz)
Definition: metaact.hxx:872
ComplexTextLayoutFlags
Definition: outdevstate.hxx:66
const BitmapEx & GetBitmapEx() const
Definition: metaact.hxx:832
const tools::Rectangle & GetRect() const
Definition: metaact.hxx:1068
void SetWidth(sal_uInt32 rWidth)
Definition: metaact.hxx:611
void SetBitmapEx(BitmapEx &rBmpEx)
Definition: metaact.hxx:870
const Color & GetColor() const
Definition: metaact.hxx:1399
const Size & GetSize() const
Definition: metaact.hxx:1690
sal_uInt32 GetWidth() const
Definition: metaact.hxx:606
void SetOverline(FontLineStyle eOverline)
Definition: metaact.hxx:692
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:162
rtl_TextEncoding meActualCharSet
Definition: metaact.hxx:58
const OUString & GetText() const
Definition: metaact.hxx:645
void SetColor(const Color &rColor)
Definition: metaact.hxx:1430
sal_Int32 GetLen() const
Definition: metaact.hxx:608
const Point & GetPoint() const
Definition: metaact.hxx:833
const Bitmap & GetBitmap() const
Definition: metaact.hxx:949
void SetRect(tools::Rectangle &rRect)
Definition: metaact.hxx:225
void SetHatch(Hatch &rHatch)
Definition: metaact.hxx:1135
void SetSetting(bool bSet)
Definition: metaact.hxx:1401
void SetEndPoint(Point &rPoint)
Definition: metaact.hxx:195
vcl::Region maRegion
Definition: metaact.hxx:1174
const ::avmedia::MediaItem * Execute(SdrMarkView *pSdrView, SfxRequest const &rReq)
void SetBitmap(Bitmap &rBmp)
Definition: metaact.hxx:990
void SetDestPoint(Point &rPt)
Definition: metaact.hxx:1036
void SetSetting(bool rSet)
Definition: metaact.hxx:1317
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove)
Definition: metaact.cxx:177
const Bitmap & GetBitmap() const
Definition: metaact.hxx:1028
const Point & GetPoint() const
Definition: metaact.hxx:951
FontStrikeout GetStrikeout() const
Definition: metaact.hxx:685
void operator=(SimpleReferenceObject) SAL_DELETED_FUNCTION
const Size & GetSize() const
Definition: metaact.hxx:1731
TextAlign
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData)
Definition: metaact.cxx:190
const Bitmap & GetBitmap() const
Definition: metaact.hxx:755
PushFlags GetFlags() const
Definition: metaact.hxx:1577
const tools::PolyPolygon & GetPolyPolygon() const
Definition: metaact.hxx:1132
const GfxLink & GetLink() const
Definition: metaact.hxx:1728
void SetTransparence(const sal_uInt16 nTransPercent)
Definition: metaact.hxx:1654
const Point & GetPoint() const
Definition: metaact.hxx:604
bool IsSetting() const
Definition: metaact.hxx:1461
bool IsSetting() const
Definition: metaact.hxx:1344
tools::Rectangle maRect
Definition: metaact.hxx:203
bool IsSetting() const
Definition: metaact.hxx:1432
const Color & GetColor() const
Definition: metaact.hxx:1372
const Color & GetColor() const
Definition: metaact.hxx:987
void SetSize(Size &rSz)
Definition: metaact.hxx:992
const Point & GetStartPoint() const
Definition: metaact.hxx:191
sal_uInt32 GetDataSize() const
Definition: metaact.hxx:1797
const BitmapEx & GetBitmapEx() const
Definition: metaact.hxx:867
bool IsSetting() const
Definition: metaact.hxx:1764
void SetTextAlign(TextAlign eAlign)
Definition: metaact.hxx:1487
void SetSrcPoint(Point &rPt)
Definition: metaact.hxx:1038
void SetColor(Color &rColor)
Definition: metaact.hxx:1035
void SetTextLanguage(const LanguageType eTextLanguage)
Definition: metaact.hxx:1854
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1078
void SetColor(const Color &rColor)
Definition: metaact.hxx:1459
BitmapEx maBmpEx
Definition: metaact.hxx:810
const Color & GetColor() const
Definition: metaact.hxx:1029
unsigned char sal_uInt8
void SetColor(Color &rColor)
Definition: metaact.hxx:1373
void SetPoint(Point &rPt)
Definition: metaact.hxx:525
void SetLen(sal_Int32 rLen)
Definition: metaact.hxx:528
vcl::Font maFont
Definition: metaact.hxx:1525
const Point & GetStartPoint() const
Definition: metaact.hxx:683
void SetStartPoint(Point &rPoint)
Definition: metaact.hxx:194
void SetSize(Size &rSz)
Definition: metaact.hxx:760
LineInfo maLineInfo
Definition: metaact.hxx:166
void SetPolyPolygon(tools::PolyPolygon &rPolyPoly)
Definition: metaact.hxx:1134
const Gradient & GetGradient() const
Definition: metaact.hxx:1101
void SetBitmap(Bitmap &rBmp)
Definition: metaact.hxx:723
const Point & GetPoint() const
Definition: metaact.hxx:158
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1110
const Point & GetPoint() const
Definition: metaact.hxx:722
void SetDataSize(const sal_Int32 nDataSize)
Definition: metaact.hxx:1801
const Point & GetDestPoint() const
Definition: metaact.hxx:1030
void SetMapMode(const MapMode &rMapMode)
Definition: metaact.hxx:1515
void SetRect(tools::Rectangle &rRect)
Definition: metaact.hxx:1071
oslInterlockedCount m_nCount
void SetSetting(bool bSet)
Definition: metaact.hxx:1460
PushFlags mnFlags
Definition: metaact.hxx:1559
tools::Rectangle maRect
Definition: metaact.hxx:1046
LanguageType meTextLanguage
Definition: metaact.hxx:1835
MetaActionType GetType() const
Definition: metaact.hxx:90
ComplexTextLayoutFlags GetLayoutMode() const
Definition: metaact.hxx:1827
const Color & GetColor() const
Definition: metaact.hxx:1429
virtual rtl::Reference< MetaAction > Clone() const
Definition: metaact.cxx:172
void SetPoint(Point &rPt)
Definition: metaact.hxx:609
const Hatch & GetHatch() const
Definition: metaact.hxx:1133
const Point & GetSrcPoint() const
Definition: metaact.hxx:1032
FontLineStyle GetOverline() const
Definition: metaact.hxx:687
sal_uInt16 mnTransPercent
Definition: metaact.hxx:1630
sal_uInt32 mnWidth
Definition: metaact.hxx:579
const Point & GetRefPoint() const
Definition: metaact.hxx:1761
RasterOp meRasterOp
Definition: metaact.hxx:1603
const OString & GetComment() const
Definition: metaact.hxx:1795
TextAlign GetTextAlign() const
Definition: metaact.hxx:1486
void SetBitmap(Bitmap &rBmp)
Definition: metaact.hxx:1034
void SetPoint(const Point &rPoint)
Definition: metaact.hxx:1734
void SetRect(tools::Rectangle &rRect)
Definition: metaact.hxx:647
void SetText(OUString &rStr)
Definition: metaact.hxx:526
void SetGradient(const Gradient &rGradient)
Definition: metaact.hxx:1695
int mnIndex
void SetPolyPolygon(tools::PolyPolygon &rPolyPoly)
Definition: metaact.hxx:1102
const Color & GetColor() const
Definition: metaact.hxx:1343
FontLineStyle
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData)
Definition: metaact.cxx:185
const GDIMetaFile & GetSubstitute() const
Definition: metaact.hxx:1729
void SetSubstitute(const GDIMetaFile &rSubst)
Definition: metaact.hxx:1733
void SetSetting(bool bSet)
Definition: metaact.hxx:1431
void SetLineInfo(LineInfo &rLineInfo)
Definition: metaact.hxx:196
const vcl::Font & GetFont() const
Definition: metaact.hxx:1550
const tools::Rectangle & GetRect() const
Definition: metaact.hxx:644
FontLineStyle meUnderline
Definition: metaact.hxx:659
sal_Int32 GetIndex() const
Definition: metaact.hxx:607
FontStrikeout
sal_Int32 GetIndex() const
Definition: metaact.hxx:523
void SetDestSize(Size &rSz)
Definition: metaact.hxx:1037
tools::Long GetHorzMove() const
Definition: metaact.hxx:1285
tools::Long mnWidth
Definition: metaact.hxx:657
void SetRect(tools::Rectangle &rRect)
Definition: metaact.hxx:1228