Bump version to 6.4-15
[LibreOffice.git] / include / vcl / metaact.hxx
blob2666edb5f334f34af2852ad9320a15c535d5ba8f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_METAACT_HXX
21 #define INCLUDED_VCL_METAACT_HXX
23 #include <memory>
24 #include <vcl/dllapi.h>
25 #include <vcl/gradient.hxx>
26 #include <vcl/hatch.hxx>
27 #include <vcl/wall.hxx>
28 #include <vcl/font.hxx>
29 #include <tools/poly.hxx>
30 #include <vcl/bitmapex.hxx>
31 #include <vcl/region.hxx>
32 #include <vcl/outdevstate.hxx>
33 #include <vcl/gdimtf.hxx>
34 #include <vcl/gfxlink.hxx>
35 #include <vcl/lineinfo.hxx>
36 #include <vcl/metaactiontypes.hxx>
37 #include <salhelper/simplereferenceobject.hxx>
38 #include <rtl/ref.hxx>
40 class OutputDevice;
41 class SvStream;
42 enum class DrawTextFlags;
44 struct ImplMetaReadData
46 rtl_TextEncoding meActualCharSet;
47 int mnParseDepth;
49 ImplMetaReadData()
50 : meActualCharSet(RTL_TEXTENCODING_ASCII_US)
51 , mnParseDepth(0)
55 struct ImplMetaWriteData
57 rtl_TextEncoding meActualCharSet;
59 ImplMetaWriteData() :
60 meActualCharSet( RTL_TEXTENCODING_ASCII_US )
64 class VCL_DLLPUBLIC MetaAction : public salhelper::SimpleReferenceObject
66 private:
67 MetaActionType const mnType;
69 protected:
70 virtual ~MetaAction() override;
72 public:
73 MetaAction();
74 explicit MetaAction( MetaActionType nType );
75 MetaAction( MetaAction const & );
77 virtual void Execute( OutputDevice* pOut );
79 oslInterlockedCount GetRefCount() const { return m_nCount; }
81 virtual rtl::Reference<MetaAction> Clone();
83 virtual void Move( long nHorzMove, long nVertMove );
84 virtual void Scale( double fScaleX, double fScaleY );
86 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
87 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
89 MetaActionType GetType() const { return mnType; }
91 public:
92 static MetaAction* ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData );
95 class VCL_DLLPUBLIC MetaPixelAction final : public MetaAction
97 private:
98 Point maPt;
99 Color maColor;
101 public:
102 MetaPixelAction();
103 MetaPixelAction(MetaPixelAction const &) = default;
104 MetaPixelAction(MetaPixelAction &&) = default;
105 MetaPixelAction & operator =(MetaPixelAction const &) = delete; // due to MetaAction
106 MetaPixelAction & operator =(MetaPixelAction &&) = delete; // due to MetaAction
107 private:
108 virtual ~MetaPixelAction() override;
109 public:
110 virtual void Execute( OutputDevice* pOut ) override;
111 virtual rtl::Reference<MetaAction> Clone() override;
112 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
113 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
115 MetaPixelAction( const Point& rPt, const Color& rColor );
117 virtual void Move( long nHorzMove, long nVertMove ) override;
118 virtual void Scale( double fScaleX, double fScaleY ) override;
120 const Point& GetPoint() const { return maPt; }
121 const Color& GetColor() const { return maColor; }
124 class VCL_DLLPUBLIC MetaPointAction final : public MetaAction
126 private:
127 Point maPt;
129 public:
130 MetaPointAction();
131 MetaPointAction(MetaPointAction const &) = default;
132 MetaPointAction(MetaPointAction &&) = default;
133 MetaPointAction & operator =(MetaPointAction const &) = delete; // due to MetaAction
134 MetaPointAction & operator =(MetaPointAction &&) = delete; // due to MetaAction
135 private:
136 virtual ~MetaPointAction() override;
137 public:
138 virtual void Execute( OutputDevice* pOut ) override;
139 virtual rtl::Reference<MetaAction> Clone() override;
140 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
141 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
143 explicit MetaPointAction( const Point& );
145 virtual void Move( long nHorzMove, long nVertMove ) override;
146 virtual void Scale( double fScaleX, double fScaleY ) override;
148 const Point& GetPoint() const { return maPt; }
151 class VCL_DLLPUBLIC MetaLineAction final : public MetaAction
153 private:
155 LineInfo maLineInfo;
156 Point maStartPt;
157 Point maEndPt;
159 public:
160 MetaLineAction();
161 MetaLineAction(MetaLineAction const &) = default;
162 MetaLineAction(MetaLineAction &&) = default;
163 MetaLineAction & operator =(MetaLineAction const &) = delete; // due to MetaAction
164 MetaLineAction & operator =(MetaLineAction &&) = delete; // due to MetaAction
165 private:
166 virtual ~MetaLineAction() override;
167 public:
168 virtual void Execute( OutputDevice* pOut ) override;
169 virtual rtl::Reference<MetaAction> Clone() override;
170 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
171 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
173 MetaLineAction( const Point& rStart, const Point& rEnd );
174 MetaLineAction( const Point& rStart, const Point& rEnd,
175 const LineInfo& rLineInfo );
177 virtual void Move( long nHorzMove, long nVertMove ) override;
178 virtual void Scale( double fScaleX, double fScaleY ) override;
180 const Point& GetStartPoint() const { return maStartPt; }
181 const Point& GetEndPoint() const { return maEndPt; }
182 const LineInfo& GetLineInfo() const { return maLineInfo; }
185 class VCL_DLLPUBLIC MetaRectAction final : public MetaAction
187 private:
189 tools::Rectangle maRect;
191 public:
192 MetaRectAction();
193 MetaRectAction(MetaRectAction const &) = default;
194 MetaRectAction(MetaRectAction &&) = default;
195 MetaRectAction & operator =(MetaRectAction const &) = delete; // due to MetaAction
196 MetaRectAction & operator =(MetaRectAction &&) = delete; // due to MetaAction
197 private:
198 virtual ~MetaRectAction() override;
199 public:
200 virtual void Execute( OutputDevice* pOut ) override;
201 virtual rtl::Reference<MetaAction> Clone() override;
202 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
203 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
205 explicit MetaRectAction( const tools::Rectangle& );
207 virtual void Move( long nHorzMove, long nVertMove ) override;
208 virtual void Scale( double fScaleX, double fScaleY ) override;
210 const tools::Rectangle& GetRect() const { return maRect; }
213 class VCL_DLLPUBLIC MetaRoundRectAction final : public MetaAction
215 private:
217 tools::Rectangle maRect;
218 sal_uInt32 mnHorzRound;
219 sal_uInt32 mnVertRound;
221 public:
222 MetaRoundRectAction();
223 MetaRoundRectAction(MetaRoundRectAction const &) = default;
224 MetaRoundRectAction(MetaRoundRectAction &&) = default;
225 MetaRoundRectAction & operator =(MetaRoundRectAction const &) = delete; // due to MetaAction
226 MetaRoundRectAction & operator =(MetaRoundRectAction &&) = delete; // due to MetaAction
227 private:
228 virtual ~MetaRoundRectAction() override;
229 public:
230 virtual void Execute( OutputDevice* pOut ) override;
231 virtual rtl::Reference<MetaAction> Clone() override;
232 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
233 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
235 MetaRoundRectAction( const tools::Rectangle& rRect,
236 sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
238 virtual void Move( long nHorzMove, long nVertMove ) override;
239 virtual void Scale( double fScaleX, double fScaleY ) override;
241 const tools::Rectangle& GetRect() const { return maRect; }
242 sal_uInt32 GetHorzRound() const { return mnHorzRound; }
243 sal_uInt32 GetVertRound() const { return mnVertRound; }
246 class VCL_DLLPUBLIC MetaEllipseAction final : public MetaAction
248 private:
250 tools::Rectangle maRect;
252 public:
253 MetaEllipseAction();
254 MetaEllipseAction(MetaEllipseAction const &) = default;
255 MetaEllipseAction(MetaEllipseAction &&) = default;
256 MetaEllipseAction & operator =(MetaEllipseAction const &) = delete; // due to MetaAction
257 MetaEllipseAction & operator =(MetaEllipseAction &&) = delete; // due to MetaAction
258 private:
259 virtual ~MetaEllipseAction() override;
260 public:
261 virtual void Execute( OutputDevice* pOut ) override;
262 virtual rtl::Reference<MetaAction> Clone() override;
263 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
264 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
266 explicit MetaEllipseAction( const tools::Rectangle& );
268 virtual void Move( long nHorzMove, long nVertMove ) override;
269 virtual void Scale( double fScaleX, double fScaleY ) override;
271 const tools::Rectangle& GetRect() const { return maRect; }
274 class VCL_DLLPUBLIC MetaArcAction final : public MetaAction
276 private:
278 tools::Rectangle maRect;
279 Point maStartPt;
280 Point maEndPt;
282 public:
283 MetaArcAction();
284 MetaArcAction(MetaArcAction const &) = default;
285 MetaArcAction(MetaArcAction &&) = default;
286 MetaArcAction & operator =(MetaArcAction const &) = delete; // due to MetaAction
287 MetaArcAction & operator =(MetaArcAction &&) = delete; // due to MetaAction
288 private:
289 virtual ~MetaArcAction() override;
290 public:
291 virtual void Execute( OutputDevice* pOut ) override;
292 virtual rtl::Reference<MetaAction> Clone() override;
293 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
294 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
296 MetaArcAction( const tools::Rectangle& rRect,
297 const Point& rStart, const Point& rEnd );
299 virtual void Move( long nHorzMove, long nVertMove ) override;
300 virtual void Scale( double fScaleX, double fScaleY ) override;
302 const tools::Rectangle& GetRect() const { return maRect; }
303 const Point& GetStartPoint() const { return maStartPt; }
304 const Point& GetEndPoint() const { return maEndPt; }
307 class VCL_DLLPUBLIC MetaPieAction final : public MetaAction
309 private:
311 tools::Rectangle maRect;
312 Point maStartPt;
313 Point maEndPt;
315 public:
316 MetaPieAction();
317 MetaPieAction(MetaPieAction const &) = default;
318 MetaPieAction(MetaPieAction &&) = default;
319 MetaPieAction & operator =(MetaPieAction const &) = delete; // due to MetaAction
320 MetaPieAction & operator =(MetaPieAction &&) = delete; // due to MetaAction
321 private:
322 virtual ~MetaPieAction() override;
323 public:
324 virtual void Execute( OutputDevice* pOut ) override;
325 virtual rtl::Reference<MetaAction> Clone() override;
326 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
327 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
329 MetaPieAction( const tools::Rectangle& rRect,
330 const Point& rStart, const Point& rEnd );
332 virtual void Move( long nHorzMove, long nVertMove ) override;
333 virtual void Scale( double fScaleX, double fScaleY ) override;
335 const tools::Rectangle& GetRect() const { return maRect; }
336 const Point& GetStartPoint() const { return maStartPt; }
337 const Point& GetEndPoint() const { return maEndPt; }
340 class VCL_DLLPUBLIC MetaChordAction final : public MetaAction
342 private:
344 tools::Rectangle maRect;
345 Point maStartPt;
346 Point maEndPt;
348 public:
349 MetaChordAction();
350 MetaChordAction(MetaChordAction const &) = default;
351 MetaChordAction(MetaChordAction &&) = default;
352 MetaChordAction & operator =(MetaChordAction const &) = delete; // due to MetaAction
353 MetaChordAction & operator =(MetaChordAction &&) = delete; // due to MetaAction
354 private:
355 virtual ~MetaChordAction() override;
356 public:
357 virtual void Execute( OutputDevice* pOut ) override;
358 virtual rtl::Reference<MetaAction> Clone() override;
359 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
360 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
362 MetaChordAction( const tools::Rectangle& rRect,
363 const Point& rStart, const Point& rEnd );
365 virtual void Move( long nHorzMove, long nVertMove ) override;
366 virtual void Scale( double fScaleX, double fScaleY ) override;
368 const tools::Rectangle& GetRect() const { return maRect; }
369 const Point& GetStartPoint() const { return maStartPt; }
370 const Point& GetEndPoint() const { return maEndPt; }
373 class VCL_DLLPUBLIC MetaPolyLineAction final : public MetaAction
375 private:
377 LineInfo maLineInfo;
378 tools::Polygon maPoly;
380 public:
381 MetaPolyLineAction();
382 MetaPolyLineAction(MetaPolyLineAction const &) = default;
383 MetaPolyLineAction(MetaPolyLineAction &&) = default;
384 MetaPolyLineAction & operator =(MetaPolyLineAction const &) = delete; // due to MetaAction
385 MetaPolyLineAction & operator =(MetaPolyLineAction &&) = delete; // due to MetaAction
386 private:
387 virtual ~MetaPolyLineAction() override;
388 public:
389 virtual void Execute( OutputDevice* pOut ) override;
390 virtual rtl::Reference<MetaAction> Clone() override;
391 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
392 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
394 explicit MetaPolyLineAction( const tools::Polygon& );
395 explicit MetaPolyLineAction( const tools::Polygon&, const LineInfo& );
397 virtual void Move( long nHorzMove, long nVertMove ) override;
398 virtual void Scale( double fScaleX, double fScaleY ) override;
400 const tools::Polygon& GetPolygon() const { return maPoly; }
401 const LineInfo& GetLineInfo() const { return maLineInfo; }
404 class VCL_DLLPUBLIC MetaPolygonAction final : public MetaAction
406 private:
408 tools::Polygon maPoly;
410 public:
411 MetaPolygonAction();
412 MetaPolygonAction(MetaPolygonAction const &) = default;
413 MetaPolygonAction(MetaPolygonAction &&) = default;
414 MetaPolygonAction & operator =(MetaPolygonAction const &) = delete; // due to MetaAction
415 MetaPolygonAction & operator =(MetaPolygonAction &&) = delete; // due to MetaAction
416 private:
417 virtual ~MetaPolygonAction() override;
418 public:
419 virtual void Execute( OutputDevice* pOut ) override;
420 virtual rtl::Reference<MetaAction> Clone() override;
421 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
422 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
424 explicit MetaPolygonAction( const tools::Polygon& );
426 virtual void Move( long nHorzMove, long nVertMove ) override;
427 virtual void Scale( double fScaleX, double fScaleY ) override;
429 const tools::Polygon& GetPolygon() const { return maPoly; }
432 class VCL_DLLPUBLIC MetaPolyPolygonAction final : public MetaAction
434 private:
436 tools::PolyPolygon maPolyPoly;
438 public:
439 MetaPolyPolygonAction();
440 MetaPolyPolygonAction(MetaPolyPolygonAction const &) = default;
441 MetaPolyPolygonAction(MetaPolyPolygonAction &&) = default;
442 MetaPolyPolygonAction & operator =(MetaPolyPolygonAction const &) = delete; // due to MetaAction
443 MetaPolyPolygonAction & operator =(MetaPolyPolygonAction &&) = delete; // due to MetaAction
444 private:
445 virtual ~MetaPolyPolygonAction() override;
446 public:
447 virtual void Execute( OutputDevice* pOut ) override;
448 virtual rtl::Reference<MetaAction> Clone() override;
449 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
450 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
452 explicit MetaPolyPolygonAction( const tools::PolyPolygon& );
454 virtual void Move( long nHorzMove, long nVertMove ) override;
455 virtual void Scale( double fScaleX, double fScaleY ) override;
457 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
460 class VCL_DLLPUBLIC MetaTextAction final : public MetaAction
462 private:
464 Point maPt;
465 OUString maStr;
466 sal_Int32 mnIndex;
467 sal_Int32 mnLen;
469 public:
470 MetaTextAction();
471 MetaTextAction(MetaTextAction const &) = default;
472 MetaTextAction(MetaTextAction &&) = default;
473 MetaTextAction & operator =(MetaTextAction const &) = delete; // due to MetaAction
474 MetaTextAction & operator =(MetaTextAction &&) = delete; // due to MetaAction
475 private:
476 virtual ~MetaTextAction() override;
477 public:
478 virtual void Execute( OutputDevice* pOut ) override;
479 virtual rtl::Reference<MetaAction> Clone() override;
480 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
481 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
483 MetaTextAction( const Point& rPt, const OUString& rStr,
484 sal_Int32 nIndex, sal_Int32 nLen );
486 virtual void Move( long nHorzMove, long nVertMove ) override;
487 virtual void Scale( double fScaleX, double fScaleY ) override;
489 const Point& GetPoint() const { return maPt; }
490 const OUString& GetText() const { return maStr; }
491 sal_Int32 GetIndex() const { return mnIndex; }
492 sal_Int32 GetLen() const { return mnLen; }
495 class VCL_DLLPUBLIC MetaTextArrayAction final : public MetaAction
497 private:
499 Point maStartPt;
500 OUString maStr;
501 std::unique_ptr<long[]>
502 mpDXAry;
503 sal_Int32 mnIndex;
504 sal_Int32 mnLen;
506 virtual ~MetaTextArrayAction() override;
508 public:
509 MetaTextArrayAction();
510 MetaTextArrayAction( const MetaTextArrayAction& rAction );
511 MetaTextArrayAction( const Point& rStartPt, const OUString& rStr,
512 const long* pDXAry, sal_Int32 nIndex,
513 sal_Int32 nLen );
515 virtual void Execute( OutputDevice* pOut ) override;
517 virtual rtl::Reference<MetaAction> Clone() override;
519 virtual void Move( long nHorzMove, long nVertMove ) override;
520 virtual void Scale( double fScaleX, double fScaleY ) override;
522 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
523 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
525 const Point& GetPoint() const { return maStartPt; }
526 const OUString& GetText() const { return maStr; }
527 sal_Int32 GetIndex() const { return mnIndex; }
528 sal_Int32 GetLen() const { return mnLen; }
529 long* GetDXArray() const { return mpDXAry.get(); }
532 class VCL_DLLPUBLIC MetaStretchTextAction final : public MetaAction
534 private:
536 Point maPt;
537 OUString maStr;
538 sal_uInt32 mnWidth;
539 sal_Int32 mnIndex;
540 sal_Int32 mnLen;
542 public:
543 MetaStretchTextAction();
544 MetaStretchTextAction(MetaStretchTextAction const &) = default;
545 MetaStretchTextAction(MetaStretchTextAction &&) = default;
546 MetaStretchTextAction & operator =(MetaStretchTextAction const &) = delete; // due to MetaAction
547 MetaStretchTextAction & operator =(MetaStretchTextAction &&) = delete; // due to MetaAction
548 private:
549 virtual ~MetaStretchTextAction() override;
550 public:
551 virtual void Execute( OutputDevice* pOut ) override;
552 virtual rtl::Reference<MetaAction> Clone() override;
553 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
554 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
556 MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
557 const OUString& rStr,
558 sal_Int32 nIndex, sal_Int32 nLen );
560 virtual void Move( long nHorzMove, long nVertMove ) override;
561 virtual void Scale( double fScaleX, double fScaleY ) override;
563 const Point& GetPoint() const { return maPt; }
564 const OUString& GetText() const { return maStr; }
565 sal_uInt32 GetWidth() const { return mnWidth; }
566 sal_Int32 GetIndex() const { return mnIndex; }
567 sal_Int32 GetLen() const { return mnLen; }
570 class VCL_DLLPUBLIC MetaTextRectAction final : public MetaAction
572 private:
574 tools::Rectangle maRect;
575 OUString maStr;
576 DrawTextFlags mnStyle;
578 public:
579 MetaTextRectAction();
580 MetaTextRectAction(MetaTextRectAction const &) = default;
581 MetaTextRectAction(MetaTextRectAction &&) = default;
582 MetaTextRectAction & operator =(MetaTextRectAction const &) = delete; // due to MetaAction
583 MetaTextRectAction & operator =(MetaTextRectAction &&) = delete; // due to MetaAction
584 private:
585 virtual ~MetaTextRectAction() override;
586 public:
587 virtual void Execute( OutputDevice* pOut ) override;
588 virtual rtl::Reference<MetaAction> Clone() override;
589 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
590 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
592 MetaTextRectAction( const tools::Rectangle& rRect,
593 const OUString& rStr, DrawTextFlags nStyle );
595 virtual void Move( long nHorzMove, long nVertMove ) override;
596 virtual void Scale( double fScaleX, double fScaleY ) override;
598 const tools::Rectangle& GetRect() const { return maRect; }
599 const OUString& GetText() const { return maStr; }
600 DrawTextFlags GetStyle() const { return mnStyle; }
603 class VCL_DLLPUBLIC MetaTextLineAction final : public MetaAction
605 private:
607 Point maPos;
608 long mnWidth;
609 FontStrikeout meStrikeout;
610 FontLineStyle meUnderline;
611 FontLineStyle meOverline;
613 public:
614 MetaTextLineAction();
615 MetaTextLineAction(MetaTextLineAction const &) = default;
616 MetaTextLineAction(MetaTextLineAction &&) = default;
617 MetaTextLineAction & operator =(MetaTextLineAction const &) = delete; // due to MetaAction
618 MetaTextLineAction & operator =(MetaTextLineAction &&) = delete; // due to MetaAction
619 private:
620 virtual ~MetaTextLineAction() override;
621 public:
622 virtual void Execute( OutputDevice* pOut ) override;
623 virtual rtl::Reference<MetaAction> Clone() override;
624 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
625 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
627 MetaTextLineAction( const Point& rPos, long nWidth,
628 FontStrikeout eStrikeout,
629 FontLineStyle eUnderline,
630 FontLineStyle eOverline );
631 virtual void Move( long nHorzMove, long nVertMove ) override;
632 virtual void Scale( double fScaleX, double fScaleY ) override;
634 const Point& GetStartPoint() const { return maPos; }
635 long GetWidth() const { return mnWidth; }
636 FontStrikeout GetStrikeout() const { return meStrikeout; }
637 FontLineStyle GetUnderline() const { return meUnderline; }
638 FontLineStyle GetOverline() const { return meOverline; }
641 class VCL_DLLPUBLIC MetaBmpAction final : public MetaAction
643 private:
645 Bitmap maBmp;
646 Point maPt;
648 public:
649 MetaBmpAction();
650 MetaBmpAction(MetaBmpAction const &) = default;
651 MetaBmpAction(MetaBmpAction &&) = default;
652 MetaBmpAction & operator =(MetaBmpAction const &) = delete; // due to MetaAction
653 MetaBmpAction & operator =(MetaBmpAction &&) = delete; // due to MetaAction
654 private:
655 virtual ~MetaBmpAction() override;
656 public:
657 virtual void Execute( OutputDevice* pOut ) override;
658 virtual rtl::Reference<MetaAction> Clone() override;
659 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
660 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
662 MetaBmpAction( const Point& rPt, const Bitmap& rBmp );
664 virtual void Move( long nHorzMove, long nVertMove ) override;
665 virtual void Scale( double fScaleX, double fScaleY ) override;
667 const Bitmap& GetBitmap() const { return maBmp; }
668 const Point& GetPoint() const { return maPt; }
671 class VCL_DLLPUBLIC MetaBmpScaleAction final : public MetaAction
673 private:
675 Bitmap maBmp;
676 Point maPt;
677 Size maSz;
679 public:
680 MetaBmpScaleAction();
681 MetaBmpScaleAction(MetaBmpScaleAction const &) = default;
682 MetaBmpScaleAction(MetaBmpScaleAction &&) = default;
683 MetaBmpScaleAction & operator =(MetaBmpScaleAction const &) = delete; // due to MetaAction
684 MetaBmpScaleAction & operator =(MetaBmpScaleAction &&) = delete; // due to MetaAction
685 private:
686 virtual ~MetaBmpScaleAction() override;
687 public:
688 virtual void Execute( OutputDevice* pOut ) override;
689 virtual rtl::Reference<MetaAction> Clone() override;
690 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
691 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
693 MetaBmpScaleAction( const Point& rPt, const Size& rSz,
694 const Bitmap& rBmp );
696 virtual void Move( long nHorzMove, long nVertMove ) override;
697 virtual void Scale( double fScaleX, double fScaleY ) override;
699 const Bitmap& GetBitmap() const { return maBmp; }
700 const Point& GetPoint() const { return maPt; }
701 const Size& GetSize() const { return maSz; }
704 class VCL_DLLPUBLIC MetaBmpScalePartAction final : public MetaAction
706 private:
708 Bitmap maBmp;
709 Point maDstPt;
710 Size maDstSz;
711 Point maSrcPt;
712 Size maSrcSz;
714 public:
715 MetaBmpScalePartAction();
716 MetaBmpScalePartAction(MetaBmpScalePartAction const &) = default;
717 MetaBmpScalePartAction(MetaBmpScalePartAction &&) = default;
718 MetaBmpScalePartAction & operator =(MetaBmpScalePartAction const &) = delete; // due to MetaAction
719 MetaBmpScalePartAction & operator =(MetaBmpScalePartAction &&) = delete; // due to MetaAction
720 private:
721 virtual ~MetaBmpScalePartAction() override;
722 public:
723 virtual void Execute( OutputDevice* pOut ) override;
724 virtual rtl::Reference<MetaAction> Clone() override;
725 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
726 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
728 MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
729 const Point& rSrcPt, const Size& rSrcSz,
730 const Bitmap& rBmp );
732 virtual void Move( long nHorzMove, long nVertMove ) override;
733 virtual void Scale( double fScaleX, double fScaleY ) override;
735 const Bitmap& GetBitmap() const { return maBmp; }
736 const Point& GetDestPoint() const { return maDstPt; }
737 const Size& GetDestSize() const { return maDstSz; }
738 const Point& GetSrcPoint() const { return maSrcPt; }
739 const Size& GetSrcSize() const { return maSrcSz; }
742 class VCL_DLLPUBLIC MetaBmpExAction final : public MetaAction
744 private:
746 BitmapEx maBmpEx;
747 Point maPt;
749 public:
750 MetaBmpExAction();
751 MetaBmpExAction(MetaBmpExAction const &) = default;
752 MetaBmpExAction(MetaBmpExAction &&) = default;
753 MetaBmpExAction & operator =(MetaBmpExAction const &) = delete; // due to MetaAction
754 MetaBmpExAction & operator =(MetaBmpExAction &&) = delete; // due to MetaAction
755 private:
756 virtual ~MetaBmpExAction() override;
757 public:
758 virtual void Execute( OutputDevice* pOut ) override;
759 virtual rtl::Reference<MetaAction> Clone() override;
760 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
761 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
763 MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx );
765 virtual void Move( long nHorzMove, long nVertMove ) override;
766 virtual void Scale( double fScaleX, double fScaleY ) override;
768 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
769 const Point& GetPoint() const { return maPt; }
772 class VCL_DLLPUBLIC MetaBmpExScaleAction final : public MetaAction
774 private:
776 BitmapEx maBmpEx;
777 Point maPt;
778 Size maSz;
780 public:
781 MetaBmpExScaleAction();
782 MetaBmpExScaleAction(MetaBmpExScaleAction const &) = default;
783 MetaBmpExScaleAction(MetaBmpExScaleAction &&) = default;
784 MetaBmpExScaleAction & operator =(MetaBmpExScaleAction const &) = delete; // due to MetaAction
785 MetaBmpExScaleAction & operator =(MetaBmpExScaleAction &&) = delete; // due to MetaAction
786 private:
787 virtual ~MetaBmpExScaleAction() override;
788 public:
789 virtual void Execute( OutputDevice* pOut ) override;
790 virtual rtl::Reference<MetaAction> Clone() override;
791 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
792 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
794 MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
795 const BitmapEx& rBmpEx ) ;
797 virtual void Move( long nHorzMove, long nVertMove ) override;
798 virtual void Scale( double fScaleX, double fScaleY ) override;
800 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
801 const Point& GetPoint() const { return maPt; }
802 const Size& GetSize() const { return maSz; }
805 class VCL_DLLPUBLIC MetaBmpExScalePartAction final : public MetaAction
807 private:
809 BitmapEx maBmpEx;
810 Point maDstPt;
811 Size maDstSz;
812 Point maSrcPt;
813 Size maSrcSz;
815 public:
816 MetaBmpExScalePartAction();
817 MetaBmpExScalePartAction(MetaBmpExScalePartAction const &) = default;
818 MetaBmpExScalePartAction(MetaBmpExScalePartAction &&) = default;
819 MetaBmpExScalePartAction & operator =(MetaBmpExScalePartAction const &) = delete; // due to MetaAction
820 MetaBmpExScalePartAction & operator =(MetaBmpExScalePartAction &&) = delete; // due to MetaAction
821 private:
822 virtual ~MetaBmpExScalePartAction() override;
823 public:
824 virtual void Execute( OutputDevice* pOut ) override;
825 virtual rtl::Reference<MetaAction> Clone() override;
826 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
827 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
829 MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
830 const Point& rSrcPt, const Size& rSrcSz,
831 const BitmapEx& rBmpEx );
833 virtual void Move( long nHorzMove, long nVertMove ) override;
834 virtual void Scale( double fScaleX, double fScaleY ) override;
836 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
837 const Point& GetDestPoint() const { return maDstPt; }
838 const Size& GetDestSize() const { return maDstSz; }
839 const Point& GetSrcPoint() const { return maSrcPt; }
840 const Size& GetSrcSize() const { return maSrcSz; }
843 class VCL_DLLPUBLIC MetaMaskAction final : public MetaAction
845 private:
847 Bitmap maBmp;
848 Color const maColor;
849 Point maPt;
851 public:
852 MetaMaskAction();
853 MetaMaskAction(MetaMaskAction const &) = default;
854 MetaMaskAction(MetaMaskAction &&) = default;
855 MetaMaskAction & operator =(MetaMaskAction const &) = delete; // due to MetaAction
856 MetaMaskAction & operator =(MetaMaskAction &&) = delete; // due to MetaAction
857 private:
858 virtual ~MetaMaskAction() override;
859 public:
860 virtual void Execute( OutputDevice* pOut ) override;
861 virtual rtl::Reference<MetaAction> Clone() override;
862 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
863 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
865 MetaMaskAction( const Point& rPt,
866 const Bitmap& rBmp,
867 const Color& rColor );
869 virtual void Move( long nHorzMove, long nVertMove ) override;
870 virtual void Scale( double fScaleX, double fScaleY ) override;
872 const Bitmap& GetBitmap() const { return maBmp; }
873 const Color& GetColor() const { return maColor; }
874 const Point& GetPoint() const { return maPt; }
877 class VCL_DLLPUBLIC MetaMaskScaleAction final : public MetaAction
879 private:
881 Bitmap maBmp;
882 Color const maColor;
883 Point maPt;
884 Size maSz;
886 public:
887 MetaMaskScaleAction();
888 MetaMaskScaleAction(MetaMaskScaleAction const &) = default;
889 MetaMaskScaleAction(MetaMaskScaleAction &&) = default;
890 MetaMaskScaleAction & operator =(MetaMaskScaleAction const &) = delete; // due to MetaAction
891 MetaMaskScaleAction & operator =(MetaMaskScaleAction &&) = delete; // due to MetaAction
892 private:
893 virtual ~MetaMaskScaleAction() override;
894 public:
895 virtual void Execute( OutputDevice* pOut ) override;
896 virtual rtl::Reference<MetaAction> Clone() override;
897 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
898 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
900 MetaMaskScaleAction( const Point& rPt, const Size& rSz,
901 const Bitmap& rBmp,
902 const Color& rColor );
904 virtual void Move( long nHorzMove, long nVertMove ) override;
905 virtual void Scale( double fScaleX, double fScaleY ) override;
907 const Bitmap& GetBitmap() const { return maBmp; }
908 const Color& GetColor() const { return maColor; }
909 const Point& GetPoint() const { return maPt; }
910 const Size& GetSize() const { return maSz; }
913 class VCL_DLLPUBLIC MetaMaskScalePartAction final : public MetaAction
915 private:
917 Bitmap maBmp;
918 Color maColor;
919 Point maDstPt;
920 Size maDstSz;
921 Point maSrcPt;
922 Size maSrcSz;
924 public:
925 MetaMaskScalePartAction();
926 MetaMaskScalePartAction(MetaMaskScalePartAction const &) = default;
927 MetaMaskScalePartAction(MetaMaskScalePartAction &&) = default;
928 MetaMaskScalePartAction & operator =(MetaMaskScalePartAction const &) = delete; // due to MetaAction
929 MetaMaskScalePartAction & operator =(MetaMaskScalePartAction &&) = delete; // due to MetaAction
930 private:
931 virtual ~MetaMaskScalePartAction() override;
932 public:
933 virtual void Execute( OutputDevice* pOut ) override;
934 virtual rtl::Reference<MetaAction> Clone() override;
935 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
936 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
938 MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz,
939 const Point& rSrcPt, const Size& rSrcSz,
940 const Bitmap& rBmp,
941 const Color& rColor );
943 virtual void Move( long nHorzMove, long nVertMove ) override;
944 virtual void Scale( double fScaleX, double fScaleY ) override;
946 const Bitmap& GetBitmap() const { return maBmp; }
947 const Color& GetColor() const { return maColor; }
948 const Point& GetDestPoint() const { return maDstPt; }
949 const Size& GetDestSize() const { return maDstSz; }
950 const Point& GetSrcPoint() const { return maSrcPt; }
951 const Size& GetSrcSize() const { return maSrcSz; }
954 class VCL_DLLPUBLIC MetaGradientAction final : public MetaAction
956 private:
958 tools::Rectangle maRect;
959 Gradient maGradient;
961 public:
962 MetaGradientAction();
963 MetaGradientAction(MetaGradientAction const &) = default;
964 MetaGradientAction(MetaGradientAction &&) = default;
965 MetaGradientAction & operator =(MetaGradientAction const &) = delete; // due to MetaAction
966 MetaGradientAction & operator =(MetaGradientAction &&) = delete; // due to MetaAction
967 private:
968 virtual ~MetaGradientAction() override;
969 public:
970 virtual void Execute( OutputDevice* pOut ) override;
971 virtual rtl::Reference<MetaAction> Clone() override;
972 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
973 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
975 MetaGradientAction( const tools::Rectangle& rRect, const Gradient& rGradient );
977 virtual void Move( long nHorzMove, long nVertMove ) override;
978 virtual void Scale( double fScaleX, double fScaleY ) override;
980 const tools::Rectangle& GetRect() const { return maRect; }
981 const Gradient& GetGradient() const { return maGradient; }
984 class VCL_DLLPUBLIC MetaGradientExAction final : public MetaAction
986 private:
988 tools::PolyPolygon maPolyPoly;
989 Gradient maGradient;
991 public:
992 MetaGradientExAction();
993 MetaGradientExAction(MetaGradientExAction const &) = default;
994 MetaGradientExAction(MetaGradientExAction &&) = default;
995 MetaGradientExAction & operator =(MetaGradientExAction const &) = delete; // due to MetaAction
996 MetaGradientExAction & operator =(MetaGradientExAction &&) = delete; // due to MetaAction
997 private:
998 virtual ~MetaGradientExAction() override;
999 public:
1000 virtual void Execute( OutputDevice* pOut ) override;
1001 virtual rtl::Reference<MetaAction> Clone() override;
1002 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1003 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1005 MetaGradientExAction( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
1007 virtual void Move( long nHorzMove, long nVertMove ) override;
1008 virtual void Scale( double fScaleX, double fScaleY ) override;
1010 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
1011 const Gradient& GetGradient() const { return maGradient; }
1014 class VCL_DLLPUBLIC MetaHatchAction final : public MetaAction
1016 private:
1018 tools::PolyPolygon maPolyPoly;
1019 Hatch maHatch;
1021 public:
1022 MetaHatchAction();
1023 MetaHatchAction(MetaHatchAction const &) = default;
1024 MetaHatchAction(MetaHatchAction &&) = default;
1025 MetaHatchAction & operator =(MetaHatchAction const &) = delete; // due to MetaAction
1026 MetaHatchAction & operator =(MetaHatchAction &&) = delete; // due to MetaAction
1027 private:
1028 virtual ~MetaHatchAction() override;
1029 public:
1030 virtual void Execute( OutputDevice* pOut ) override;
1031 virtual rtl::Reference<MetaAction> Clone() override;
1032 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1033 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1035 MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
1037 virtual void Move( long nHorzMove, long nVertMove ) override;
1038 virtual void Scale( double fScaleX, double fScaleY ) override;
1040 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
1041 const Hatch& GetHatch() const { return maHatch; }
1044 class VCL_DLLPUBLIC MetaWallpaperAction final : public MetaAction
1046 private:
1048 tools::Rectangle maRect;
1049 Wallpaper maWallpaper;
1051 public:
1052 MetaWallpaperAction();
1053 MetaWallpaperAction(MetaWallpaperAction const &) = default;
1054 MetaWallpaperAction(MetaWallpaperAction &&) = default;
1055 MetaWallpaperAction & operator =(MetaWallpaperAction const &) = delete; // due to MetaAction
1056 MetaWallpaperAction & operator =(MetaWallpaperAction &&) = delete; // due to MetaAction
1057 private:
1058 virtual ~MetaWallpaperAction() override;
1059 public:
1060 virtual void Execute( OutputDevice* pOut ) override;
1061 virtual rtl::Reference<MetaAction> Clone() override;
1062 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1063 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1065 MetaWallpaperAction( const tools::Rectangle& rRect,
1066 const Wallpaper& rPaper );
1068 virtual void Move( long nHorzMove, long nVertMove ) override;
1069 virtual void Scale( double fScaleX, double fScaleY ) override;
1071 const tools::Rectangle& GetRect() const { return maRect; }
1072 const Wallpaper& GetWallpaper() const { return maWallpaper; }
1075 class VCL_DLLPUBLIC MetaClipRegionAction final : public MetaAction
1077 private:
1079 vcl::Region maRegion;
1080 bool mbClip;
1082 public:
1083 MetaClipRegionAction();
1084 MetaClipRegionAction(MetaClipRegionAction const &) = default;
1085 MetaClipRegionAction(MetaClipRegionAction &&) = default;
1086 MetaClipRegionAction & operator =(MetaClipRegionAction const &) = delete; // due to MetaAction
1087 MetaClipRegionAction & operator =(MetaClipRegionAction &&) = delete; // due to MetaAction
1088 private:
1089 virtual ~MetaClipRegionAction() override;
1090 public:
1091 virtual void Execute( OutputDevice* pOut ) override;
1092 virtual rtl::Reference<MetaAction> Clone() override;
1093 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1094 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1096 MetaClipRegionAction( const vcl::Region& rRegion, bool bClip );
1098 virtual void Move( long nHorzMove, long nVertMove ) override;
1099 virtual void Scale( double fScaleX, double fScaleY ) override;
1101 const vcl::Region& GetRegion() const { return maRegion; }
1102 bool IsClipping() const { return mbClip; }
1105 class VCL_DLLPUBLIC MetaISectRectClipRegionAction final : public MetaAction
1107 private:
1109 tools::Rectangle maRect;
1111 public:
1112 MetaISectRectClipRegionAction();
1113 MetaISectRectClipRegionAction(MetaISectRectClipRegionAction const &) = default;
1114 MetaISectRectClipRegionAction(MetaISectRectClipRegionAction &&) = default;
1115 MetaISectRectClipRegionAction & operator =(MetaISectRectClipRegionAction const &) = delete; // due to MetaAction
1116 MetaISectRectClipRegionAction & operator =(MetaISectRectClipRegionAction &&) = delete; // due to MetaAction
1117 private:
1118 virtual ~MetaISectRectClipRegionAction() override;
1119 public:
1120 virtual void Execute( OutputDevice* pOut ) override;
1121 virtual rtl::Reference<MetaAction> Clone() override;
1122 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1123 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1125 explicit MetaISectRectClipRegionAction( const tools::Rectangle& );
1127 virtual void Move( long nHorzMove, long nVertMove ) override;
1128 virtual void Scale( double fScaleX, double fScaleY ) override;
1130 const tools::Rectangle& GetRect() const { return maRect; }
1133 class VCL_DLLPUBLIC MetaISectRegionClipRegionAction final : public MetaAction
1135 private:
1137 vcl::Region maRegion;
1139 public:
1140 MetaISectRegionClipRegionAction();
1141 MetaISectRegionClipRegionAction(MetaISectRegionClipRegionAction const &) = default;
1142 MetaISectRegionClipRegionAction(MetaISectRegionClipRegionAction &&) = default;
1143 MetaISectRegionClipRegionAction & operator =(MetaISectRegionClipRegionAction const &) = delete; // due to MetaAction
1144 MetaISectRegionClipRegionAction & operator =(MetaISectRegionClipRegionAction &&) = delete; // due to MetaAction
1145 private:
1146 virtual ~MetaISectRegionClipRegionAction() override;
1147 public:
1148 virtual void Execute( OutputDevice* pOut ) override;
1149 virtual rtl::Reference<MetaAction> Clone() override;
1150 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1151 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1153 explicit MetaISectRegionClipRegionAction( const vcl::Region& );
1155 virtual void Move( long nHorzMove, long nVertMove ) override;
1156 virtual void Scale( double fScaleX, double fScaleY ) override;
1158 const vcl::Region& GetRegion() const { return maRegion; }
1161 class VCL_DLLPUBLIC MetaMoveClipRegionAction final : public MetaAction
1163 private:
1165 long mnHorzMove;
1166 long mnVertMove;
1168 public:
1169 MetaMoveClipRegionAction();
1170 MetaMoveClipRegionAction(MetaMoveClipRegionAction const &) = default;
1171 MetaMoveClipRegionAction(MetaMoveClipRegionAction &&) = default;
1172 MetaMoveClipRegionAction & operator =(MetaMoveClipRegionAction const &) = delete; // due to MetaAction
1173 MetaMoveClipRegionAction & operator =(MetaMoveClipRegionAction &&) = delete; // due to MetaAction
1174 private:
1175 virtual ~MetaMoveClipRegionAction() override;
1176 public:
1177 virtual void Execute( OutputDevice* pOut ) override;
1178 virtual rtl::Reference<MetaAction> Clone() override;
1179 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1180 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1182 MetaMoveClipRegionAction( long nHorzMove, long nVertMove );
1184 virtual void Scale( double fScaleX, double fScaleY ) override;
1186 long GetHorzMove() const { return mnHorzMove; }
1187 long GetVertMove() const { return mnVertMove; }
1190 class VCL_DLLPUBLIC MetaLineColorAction final : public MetaAction
1192 private:
1194 Color maColor;
1195 bool mbSet;
1197 public:
1198 MetaLineColorAction();
1199 MetaLineColorAction(MetaLineColorAction const &) = default;
1200 MetaLineColorAction(MetaLineColorAction &&) = default;
1201 MetaLineColorAction & operator =(MetaLineColorAction const &) = delete; // due to MetaAction
1202 MetaLineColorAction & operator =(MetaLineColorAction &&) = delete; // due to MetaAction
1203 private:
1204 virtual ~MetaLineColorAction() override;
1205 public:
1206 virtual void Execute( OutputDevice* pOut ) override;
1207 virtual rtl::Reference<MetaAction> Clone() override;
1208 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1209 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1211 MetaLineColorAction( const Color& rColor, bool bSet );
1213 const Color& GetColor() const { return maColor; }
1214 bool IsSetting() const { return mbSet; }
1217 class VCL_DLLPUBLIC MetaFillColorAction final : public MetaAction
1219 private:
1221 Color maColor;
1222 bool mbSet;
1224 public:
1225 MetaFillColorAction();
1226 MetaFillColorAction(MetaFillColorAction const &) = default;
1227 MetaFillColorAction(MetaFillColorAction &&) = default;
1228 MetaFillColorAction & operator =(MetaFillColorAction const &) = delete; // due to MetaAction
1229 MetaFillColorAction & operator =(MetaFillColorAction &&) = delete; // due to MetaAction
1230 private:
1231 virtual ~MetaFillColorAction() override;
1232 public:
1233 virtual void Execute( OutputDevice* pOut ) override;
1234 virtual rtl::Reference<MetaAction> Clone() override;
1235 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1236 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1238 MetaFillColorAction( const Color& rColor, bool bSet );
1240 const Color& GetColor() const { return maColor; }
1241 bool IsSetting() const { return mbSet; }
1244 class VCL_DLLPUBLIC MetaTextColorAction final : public MetaAction
1246 private:
1248 Color maColor;
1250 public:
1251 MetaTextColorAction();
1252 MetaTextColorAction(MetaTextColorAction const &) = default;
1253 MetaTextColorAction(MetaTextColorAction &&) = default;
1254 MetaTextColorAction & operator =(MetaTextColorAction const &) = delete; // due to MetaAction
1255 MetaTextColorAction & operator =(MetaTextColorAction &&) = delete; // due to MetaAction
1256 private:
1257 virtual ~MetaTextColorAction() override;
1258 public:
1259 virtual void Execute( OutputDevice* pOut ) override;
1260 virtual rtl::Reference<MetaAction> Clone() override;
1261 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1262 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1264 explicit MetaTextColorAction( const Color& );
1266 const Color& GetColor() const { return maColor; }
1269 class VCL_DLLPUBLIC MetaTextFillColorAction final : public MetaAction
1271 private:
1273 Color maColor;
1274 bool mbSet;
1276 public:
1277 MetaTextFillColorAction();
1278 MetaTextFillColorAction(MetaTextFillColorAction const &) = default;
1279 MetaTextFillColorAction(MetaTextFillColorAction &&) = default;
1280 MetaTextFillColorAction & operator =(MetaTextFillColorAction const &) = delete; // due to MetaAction
1281 MetaTextFillColorAction & operator =(MetaTextFillColorAction &&) = delete; // due to MetaAction
1282 private:
1283 virtual ~MetaTextFillColorAction() override;
1284 public:
1285 virtual void Execute( OutputDevice* pOut ) override;
1286 virtual rtl::Reference<MetaAction> Clone() override;
1287 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1288 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1290 MetaTextFillColorAction( const Color& rColor, bool bSet );
1292 const Color& GetColor() const { return maColor; }
1293 bool IsSetting() const { return mbSet; }
1296 class VCL_DLLPUBLIC MetaTextLineColorAction final : public MetaAction
1298 private:
1300 Color maColor;
1301 bool mbSet;
1303 public:
1304 MetaTextLineColorAction();
1305 MetaTextLineColorAction(MetaTextLineColorAction const &) = default;
1306 MetaTextLineColorAction(MetaTextLineColorAction &&) = default;
1307 MetaTextLineColorAction & operator =(MetaTextLineColorAction const &) = delete; // due to MetaAction
1308 MetaTextLineColorAction & operator =(MetaTextLineColorAction &&) = delete; // due to MetaAction
1309 private:
1310 virtual ~MetaTextLineColorAction() override;
1311 public:
1312 virtual void Execute( OutputDevice* pOut ) override;
1313 virtual rtl::Reference<MetaAction> Clone() override;
1314 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1315 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1317 MetaTextLineColorAction( const Color& rColor, bool bSet );
1319 const Color& GetColor() const { return maColor; }
1320 bool IsSetting() const { return mbSet; }
1323 class VCL_DLLPUBLIC MetaOverlineColorAction final : public MetaAction
1325 private:
1327 Color maColor;
1328 bool mbSet;
1330 public:
1331 MetaOverlineColorAction();
1332 MetaOverlineColorAction(MetaOverlineColorAction const &) = default;
1333 MetaOverlineColorAction(MetaOverlineColorAction &&) = default;
1334 MetaOverlineColorAction & operator =(MetaOverlineColorAction const &) = delete; // due to MetaAction
1335 MetaOverlineColorAction & operator =(MetaOverlineColorAction &&) = delete; // due to MetaAction
1336 private:
1337 virtual ~MetaOverlineColorAction() override;
1338 public:
1339 virtual void Execute( OutputDevice* pOut ) override;
1340 virtual rtl::Reference<MetaAction> Clone() override;
1341 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1342 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1344 MetaOverlineColorAction( const Color& rColor, bool bSet );
1346 const Color& GetColor() const { return maColor; }
1347 bool IsSetting() const { return mbSet; }
1350 class VCL_DLLPUBLIC MetaTextAlignAction final : public MetaAction
1352 private:
1354 TextAlign maAlign;
1356 public:
1357 MetaTextAlignAction();
1358 MetaTextAlignAction(MetaTextAlignAction const &) = default;
1359 MetaTextAlignAction(MetaTextAlignAction &&) = default;
1360 MetaTextAlignAction & operator =(MetaTextAlignAction const &) = delete; // due to MetaAction
1361 MetaTextAlignAction & operator =(MetaTextAlignAction &&) = delete; // due to MetaAction
1362 private:
1363 virtual ~MetaTextAlignAction() override;
1364 public:
1365 virtual void Execute( OutputDevice* pOut ) override;
1366 virtual rtl::Reference<MetaAction> Clone() override;
1367 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1368 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1370 explicit MetaTextAlignAction( TextAlign eAlign );
1372 TextAlign GetTextAlign() const { return maAlign; }
1375 class VCL_DLLPUBLIC MetaMapModeAction final : public MetaAction
1377 private:
1379 MapMode maMapMode;
1381 public:
1382 MetaMapModeAction();
1383 MetaMapModeAction(MetaMapModeAction const &) = default;
1384 MetaMapModeAction(MetaMapModeAction &&) = default;
1385 MetaMapModeAction & operator =(MetaMapModeAction const &) = delete; // due to MetaAction
1386 MetaMapModeAction & operator =(MetaMapModeAction &&) = delete; // due to MetaAction
1387 private:
1388 virtual ~MetaMapModeAction() override;
1389 public:
1390 virtual void Execute( OutputDevice* pOut ) override;
1391 virtual rtl::Reference<MetaAction> Clone() override;
1392 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1393 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1395 explicit MetaMapModeAction( const MapMode& );
1397 virtual void Scale( double fScaleX, double fScaleY ) override;
1399 const MapMode& GetMapMode() const { return maMapMode; }
1402 class VCL_DLLPUBLIC MetaFontAction final : public MetaAction
1404 private:
1406 vcl::Font maFont;
1408 public:
1409 MetaFontAction();
1410 MetaFontAction(MetaFontAction const &) = default;
1411 MetaFontAction(MetaFontAction &&) = default;
1412 MetaFontAction & operator =(MetaFontAction const &) = delete; // due to MetaAction
1413 MetaFontAction & operator =(MetaFontAction &&) = delete; // due to MetaAction
1414 private:
1415 virtual ~MetaFontAction() override;
1416 public:
1417 virtual void Execute( OutputDevice* pOut ) override;
1418 virtual rtl::Reference<MetaAction> Clone() override;
1419 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1420 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1422 explicit MetaFontAction( const vcl::Font& );
1424 virtual void Scale( double fScaleX, double fScaleY ) override;
1426 const vcl::Font& GetFont() const { return maFont; }
1429 class VCL_DLLPUBLIC MetaPushAction final : public MetaAction
1431 private:
1433 PushFlags mnFlags;
1435 public:
1436 MetaPushAction();
1437 MetaPushAction(MetaPushAction const &) = default;
1438 MetaPushAction(MetaPushAction &&) = default;
1439 MetaPushAction & operator =(MetaPushAction const &) = delete; // due to MetaAction
1440 MetaPushAction & operator =(MetaPushAction &&) = delete; // due to MetaAction
1441 private:
1442 virtual ~MetaPushAction() override;
1443 public:
1444 virtual void Execute( OutputDevice* pOut ) override;
1445 virtual rtl::Reference<MetaAction> Clone() override;
1446 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1447 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1449 explicit MetaPushAction( PushFlags nFlags );
1451 PushFlags GetFlags() const { return mnFlags; }
1454 class VCL_DLLPUBLIC MetaPopAction final : public MetaAction
1456 public:
1458 MetaPopAction();
1459 MetaPopAction(MetaPopAction const &) = default;
1460 MetaPopAction(MetaPopAction &&) = default;
1461 MetaPopAction & operator =(MetaPopAction const &) = delete; // due to MetaAction
1462 MetaPopAction & operator =(MetaPopAction &&) = delete; // due to MetaAction
1463 private:
1464 virtual ~MetaPopAction() override;
1465 public:
1466 virtual void Execute( OutputDevice* pOut ) override;
1467 virtual rtl::Reference<MetaAction> Clone() override;
1468 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1469 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1472 class VCL_DLLPUBLIC MetaRasterOpAction final : public MetaAction
1474 private:
1476 RasterOp meRasterOp;
1478 public:
1479 MetaRasterOpAction();
1480 MetaRasterOpAction(MetaRasterOpAction const &) = default;
1481 MetaRasterOpAction(MetaRasterOpAction &&) = default;
1482 MetaRasterOpAction & operator =(MetaRasterOpAction const &) = delete; // due to MetaAction
1483 MetaRasterOpAction & operator =(MetaRasterOpAction &&) = delete; // due to MetaAction
1484 private:
1485 virtual ~MetaRasterOpAction() override;
1486 public:
1487 virtual void Execute( OutputDevice* pOut ) override;
1488 virtual rtl::Reference<MetaAction> Clone() override;
1489 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1490 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1492 explicit MetaRasterOpAction( RasterOp eRasterOp );
1494 RasterOp GetRasterOp() const { return meRasterOp; }
1497 class VCL_DLLPUBLIC MetaTransparentAction final : public MetaAction
1499 private:
1501 tools::PolyPolygon maPolyPoly;
1502 sal_uInt16 mnTransPercent;
1504 public:
1505 MetaTransparentAction();
1506 MetaTransparentAction(MetaTransparentAction const &) = default;
1507 MetaTransparentAction(MetaTransparentAction &&) = default;
1508 MetaTransparentAction & operator =(MetaTransparentAction const &) = delete; // due to MetaAction
1509 MetaTransparentAction & operator =(MetaTransparentAction &&) = delete; // due to MetaAction
1510 private:
1511 virtual ~MetaTransparentAction() override;
1512 public:
1513 virtual void Execute( OutputDevice* pOut ) override;
1514 virtual rtl::Reference<MetaAction> Clone() override;
1515 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1516 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1518 MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent );
1520 virtual void Move( long nHorzMove, long nVertMove ) override;
1521 virtual void Scale( double fScaleX, double fScaleY ) override;
1523 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
1524 sal_uInt16 GetTransparence() const { return mnTransPercent; }
1527 class VCL_DLLPUBLIC MetaFloatTransparentAction final : public MetaAction
1529 private:
1531 GDIMetaFile maMtf;
1532 Point maPoint;
1533 Size maSize;
1534 Gradient maGradient;
1536 public:
1537 MetaFloatTransparentAction();
1538 MetaFloatTransparentAction(MetaFloatTransparentAction const &) = default;
1539 MetaFloatTransparentAction(MetaFloatTransparentAction &&) = default;
1540 MetaFloatTransparentAction & operator =(MetaFloatTransparentAction const &) = delete; // due to MetaAction
1541 MetaFloatTransparentAction & operator =(MetaFloatTransparentAction &&) = delete; // due to MetaAction
1542 private:
1543 virtual ~MetaFloatTransparentAction() override;
1544 public:
1545 virtual void Execute( OutputDevice* pOut ) override;
1546 virtual rtl::Reference<MetaAction> Clone() override;
1547 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1548 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1550 MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
1551 const Size& rSize, const Gradient& rGradient );
1553 virtual void Move( long nHorzMove, long nVertMove ) override;
1554 virtual void Scale( double fScaleX, double fScaleY ) override;
1556 const GDIMetaFile& GetGDIMetaFile() const { return maMtf; }
1557 const Point& GetPoint() const { return maPoint; }
1558 const Size& GetSize() const { return maSize; }
1559 const Gradient& GetGradient() const { return maGradient; }
1562 class VCL_DLLPUBLIC MetaEPSAction final : public MetaAction
1564 private:
1566 GfxLink maGfxLink;
1567 GDIMetaFile maSubst;
1568 Point maPoint;
1569 Size maSize;
1571 public:
1572 MetaEPSAction();
1573 MetaEPSAction(MetaEPSAction const &) = default;
1574 MetaEPSAction(MetaEPSAction &&) = default;
1575 MetaEPSAction & operator =(MetaEPSAction const &) = delete; // due to MetaAction
1576 MetaEPSAction & operator =(MetaEPSAction &&) = delete; // due to MetaAction
1577 private:
1578 virtual ~MetaEPSAction() override;
1579 public:
1580 virtual void Execute( OutputDevice* pOut ) override;
1581 virtual rtl::Reference<MetaAction> Clone() override;
1582 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1583 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1585 MetaEPSAction( const Point& rPoint, const Size& rSize,
1586 const GfxLink& rGfxLink, const GDIMetaFile& rSubst );
1588 virtual void Move( long nHorzMove, long nVertMove ) override;
1589 virtual void Scale( double fScaleX, double fScaleY ) override;
1591 const GfxLink& GetLink() const { return maGfxLink; }
1592 const GDIMetaFile& GetSubstitute() const { return maSubst; }
1593 const Point& GetPoint() const { return maPoint; }
1594 const Size& GetSize() const { return maSize; }
1597 class VCL_DLLPUBLIC MetaRefPointAction final : public MetaAction
1599 private:
1601 Point maRefPoint;
1602 bool mbSet;
1604 public:
1605 MetaRefPointAction();
1606 MetaRefPointAction(MetaRefPointAction const &) = default;
1607 MetaRefPointAction(MetaRefPointAction &&) = default;
1608 MetaRefPointAction & operator =(MetaRefPointAction const &) = delete; // due to MetaAction
1609 MetaRefPointAction & operator =(MetaRefPointAction &&) = delete; // due to MetaAction
1610 private:
1611 virtual ~MetaRefPointAction() override;
1612 public:
1613 virtual void Execute( OutputDevice* pOut ) override;
1614 virtual rtl::Reference<MetaAction> Clone() override;
1615 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1616 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1618 MetaRefPointAction( const Point& rRefPoint, bool bSet );
1620 const Point& GetRefPoint() const { return maRefPoint; }
1621 bool IsSetting() const { return mbSet; }
1624 class VCL_DLLPUBLIC MetaCommentAction final : public MetaAction
1626 private:
1628 OString maComment;
1629 sal_Int32 mnValue;
1630 sal_uInt32 mnDataSize;
1631 std::unique_ptr<sal_uInt8[]>
1632 mpData;
1634 SAL_DLLPRIVATE void ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize );
1636 private:
1637 virtual ~MetaCommentAction() override;
1639 public:
1640 explicit MetaCommentAction();
1641 explicit MetaCommentAction( const MetaCommentAction& rAct );
1642 explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0 );
1644 virtual void Move( long nHorzMove, long nVertMove ) override;
1645 virtual void Scale( double fScaleX, double fScaleY ) override;
1647 virtual void Execute( OutputDevice* pOut ) override;
1648 virtual rtl::Reference<MetaAction> Clone() override;
1649 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1650 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1652 const OString& GetComment() const { return maComment; }
1653 sal_Int32 GetValue() const { return mnValue; }
1654 sal_uInt32 GetDataSize() const { return mnDataSize; }
1655 const sal_uInt8* GetData() const { return mpData.get(); }
1658 class VCL_DLLPUBLIC MetaLayoutModeAction final : public MetaAction
1660 private:
1662 ComplexTextLayoutFlags mnLayoutMode;
1664 public:
1665 MetaLayoutModeAction();
1666 MetaLayoutModeAction(MetaLayoutModeAction const &) = default;
1667 MetaLayoutModeAction(MetaLayoutModeAction &&) = default;
1668 MetaLayoutModeAction & operator =(MetaLayoutModeAction const &) = delete; // due to MetaAction
1669 MetaLayoutModeAction & operator =(MetaLayoutModeAction &&) = delete; // due to MetaAction
1670 private:
1671 virtual ~MetaLayoutModeAction() override;
1672 public:
1673 virtual void Execute( OutputDevice* pOut ) override;
1674 virtual rtl::Reference<MetaAction> Clone() override;
1675 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1676 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1678 explicit MetaLayoutModeAction( ComplexTextLayoutFlags nLayoutMode );
1680 ComplexTextLayoutFlags GetLayoutMode() const { return mnLayoutMode; }
1683 class VCL_DLLPUBLIC MetaTextLanguageAction final : public MetaAction
1685 private:
1687 LanguageType meTextLanguage;
1689 public:
1690 MetaTextLanguageAction();
1691 MetaTextLanguageAction(MetaTextLanguageAction const &) = default;
1692 MetaTextLanguageAction(MetaTextLanguageAction &&) = default;
1693 MetaTextLanguageAction & operator =(MetaTextLanguageAction const &) = delete; // due to MetaAction
1694 MetaTextLanguageAction & operator =(MetaTextLanguageAction &&) = delete; // due to MetaAction
1695 private:
1696 virtual ~MetaTextLanguageAction() override;
1697 public:
1698 virtual void Execute( OutputDevice* pOut ) override;
1699 virtual rtl::Reference<MetaAction> Clone() override;
1700 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1701 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1703 explicit MetaTextLanguageAction( LanguageType );
1705 LanguageType GetTextLanguage() const { return meTextLanguage; }
1708 #endif // INCLUDED_VCL_METAACT_HXX
1710 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */