Branch libreoffice-5-0-4
[LibreOffice.git] / include / vcl / metaact.hxx
blob18e73033b7b34cf7399fcc5f885f2dba4448d576
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 <vcl/dllapi.h>
24 #include <vcl/gradient.hxx>
25 #include <vcl/hatch.hxx>
26 #include <vcl/wall.hxx>
27 #include <vcl/font.hxx>
28 #include <tools/poly.hxx>
29 #include <vcl/bitmap.hxx>
30 #include <vcl/bitmapex.hxx>
31 #include <vcl/region.hxx>
32 #include <vcl/graph.hxx>
33 #include <vcl/outdev.hxx>
34 #include <vcl/gdimtf.hxx>
35 #include <vcl/gfxlink.hxx>
36 #include <vcl/lineinfo.hxx>
37 #include <vcl/metaactiontypes.hxx>
38 #include <vcl/outdevstate.hxx>
40 class SvStream;
41 enum class DrawTextFlags;
43 struct ImplMetaReadData
45 rtl_TextEncoding meActualCharSet;
47 ImplMetaReadData() :
48 meActualCharSet( RTL_TEXTENCODING_ASCII_US )
52 struct ImplMetaWriteData
54 rtl_TextEncoding meActualCharSet;
56 ImplMetaWriteData() :
57 meActualCharSet( RTL_TEXTENCODING_ASCII_US )
61 class VCL_DLLPUBLIC MetaAction
63 private:
64 sal_uLong mnRefCount;
65 MetaActionType mnType;
67 virtual bool Compare( const MetaAction& ) const;
69 protected:
70 virtual ~MetaAction();
72 public:
73 MetaAction();
74 explicit MetaAction( MetaActionType nType );
76 virtual void Execute( OutputDevice* pOut );
78 virtual MetaAction* Clone();
80 virtual void Move( long nHorzMove, long nVertMove );
81 virtual void Scale( double fScaleX, double fScaleY );
83 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
84 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
86 MetaActionType GetType() const { return mnType; }
87 sal_uLong GetRefCount() const { return mnRefCount; }
88 void ResetRefCount() { mnRefCount = 1; }
89 void Duplicate() { mnRefCount++; }
90 void Delete() { if ( 0 == --mnRefCount ) delete this; }
92 public:
93 static MetaAction* ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData );
96 class VCL_DLLPUBLIC MetaPixelAction : public MetaAction
98 private:
99 Point maPt;
100 Color maColor;
102 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
104 public:
105 MetaPixelAction();
106 protected:
107 virtual ~MetaPixelAction();
108 public:
109 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
110 virtual MetaAction* Clone() SAL_OVERRIDE;
111 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
112 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
114 MetaPixelAction( const Point& rPt, const Color& rColor );
116 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
117 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
119 const Point& GetPoint() const { return maPt; }
120 const Color& GetColor() const { return maColor; }
123 class VCL_DLLPUBLIC MetaPointAction : public MetaAction
125 private:
126 Point maPt;
128 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
130 public:
131 MetaPointAction();
132 protected:
133 virtual ~MetaPointAction();
134 public:
135 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
136 virtual MetaAction* Clone() SAL_OVERRIDE;
137 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
138 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
140 explicit MetaPointAction( const Point& );
142 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
143 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
145 const Point& GetPoint() const { return maPt; }
148 class VCL_DLLPUBLIC MetaLineAction : public MetaAction
150 private:
152 LineInfo maLineInfo;
153 Point maStartPt;
154 Point maEndPt;
156 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
158 public:
159 MetaLineAction();
160 protected:
161 virtual ~MetaLineAction();
162 public:
163 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
164 virtual MetaAction* Clone() SAL_OVERRIDE;
165 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
166 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
168 MetaLineAction( const Point& rStart, const Point& rEnd );
169 MetaLineAction( const Point& rStart, const Point& rEnd,
170 const LineInfo& rLineInfo );
172 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
173 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
175 const Point& GetStartPoint() const { return maStartPt; }
176 const Point& GetEndPoint() const { return maEndPt; }
177 const LineInfo& GetLineInfo() const { return maLineInfo; }
180 class VCL_DLLPUBLIC MetaRectAction : public MetaAction
182 private:
184 Rectangle maRect;
186 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
187 public:
188 MetaRectAction();
189 protected:
190 virtual ~MetaRectAction();
191 public:
192 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
193 virtual MetaAction* Clone() SAL_OVERRIDE;
194 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
195 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
197 explicit MetaRectAction( const Rectangle& );
199 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
200 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
202 const Rectangle& GetRect() const { return maRect; }
205 class VCL_DLLPUBLIC MetaRoundRectAction : public MetaAction
207 private:
209 Rectangle maRect;
210 sal_uInt32 mnHorzRound;
211 sal_uInt32 mnVertRound;
213 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
215 public:
216 MetaRoundRectAction();
217 protected:
218 virtual ~MetaRoundRectAction();
219 public:
220 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
221 virtual MetaAction* Clone() SAL_OVERRIDE;
222 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
223 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
225 MetaRoundRectAction( const Rectangle& rRect,
226 sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
228 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
229 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
231 const Rectangle& GetRect() const { return maRect; }
232 sal_uInt32 GetHorzRound() const { return mnHorzRound; }
233 sal_uInt32 GetVertRound() const { return mnVertRound; }
236 class VCL_DLLPUBLIC MetaEllipseAction : public MetaAction
238 private:
240 Rectangle maRect;
242 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
244 public:
245 MetaEllipseAction();
246 protected:
247 virtual ~MetaEllipseAction();
248 public:
249 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
250 virtual MetaAction* Clone() SAL_OVERRIDE;
251 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
252 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
254 explicit MetaEllipseAction( const Rectangle& );
256 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
257 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
259 const Rectangle& GetRect() const { return maRect; }
262 class VCL_DLLPUBLIC MetaArcAction : public MetaAction
264 private:
266 Rectangle maRect;
267 Point maStartPt;
268 Point maEndPt;
270 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
272 public:
273 MetaArcAction();
274 protected:
275 virtual ~MetaArcAction();
276 public:
277 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
278 virtual MetaAction* Clone() SAL_OVERRIDE;
279 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
280 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
282 MetaArcAction( const Rectangle& rRect,
283 const Point& rStart, const Point& rEnd );
285 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
286 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
288 const Rectangle& GetRect() const { return maRect; }
289 const Point& GetStartPoint() const { return maStartPt; }
290 const Point& GetEndPoint() const { return maEndPt; }
293 class VCL_DLLPUBLIC MetaPieAction : public MetaAction
295 private:
297 Rectangle maRect;
298 Point maStartPt;
299 Point maEndPt;
301 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
303 public:
304 MetaPieAction();
305 protected:
306 virtual ~MetaPieAction();
307 public:
308 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
309 virtual MetaAction* Clone() SAL_OVERRIDE;
310 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
311 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
313 MetaPieAction( const Rectangle& rRect,
314 const Point& rStart, const Point& rEnd );
316 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
317 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
319 const Rectangle& GetRect() const { return maRect; }
320 const Point& GetStartPoint() const { return maStartPt; }
321 const Point& GetEndPoint() const { return maEndPt; }
324 class VCL_DLLPUBLIC MetaChordAction : public MetaAction
326 private:
328 Rectangle maRect;
329 Point maStartPt;
330 Point maEndPt;
332 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
334 public:
335 MetaChordAction();
336 protected:
337 virtual ~MetaChordAction();
338 public:
339 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
340 virtual MetaAction* Clone() SAL_OVERRIDE;
341 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
342 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
344 MetaChordAction( const Rectangle& rRect,
345 const Point& rStart, const Point& rEnd );
347 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
348 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
350 const Rectangle& GetRect() const { return maRect; }
351 const Point& GetStartPoint() const { return maStartPt; }
352 const Point& GetEndPoint() const { return maEndPt; }
355 class VCL_DLLPUBLIC MetaPolyLineAction : public MetaAction
357 private:
359 LineInfo maLineInfo;
360 Polygon maPoly;
362 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
364 public:
365 MetaPolyLineAction();
366 protected:
367 virtual ~MetaPolyLineAction();
368 public:
369 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
370 virtual MetaAction* Clone() SAL_OVERRIDE;
371 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
372 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
374 explicit MetaPolyLineAction( const Polygon& );
375 explicit MetaPolyLineAction( const Polygon&, const LineInfo& );
377 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
378 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
380 const Polygon& GetPolygon() const { return maPoly; }
381 const LineInfo& GetLineInfo() const { return maLineInfo; }
384 class VCL_DLLPUBLIC MetaPolygonAction : public MetaAction
386 private:
388 Polygon maPoly;
390 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
392 public:
393 MetaPolygonAction();
394 protected:
395 virtual ~MetaPolygonAction();
396 public:
397 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
398 virtual MetaAction* Clone() SAL_OVERRIDE;
399 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
400 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
402 explicit MetaPolygonAction( const Polygon& );
404 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
405 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
407 const Polygon& GetPolygon() const { return maPoly; }
410 class VCL_DLLPUBLIC MetaPolyPolygonAction : public MetaAction
412 private:
414 tools::PolyPolygon maPolyPoly;
416 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
418 public:
419 MetaPolyPolygonAction();
420 protected:
421 virtual ~MetaPolyPolygonAction();
422 public:
423 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
424 virtual MetaAction* Clone() SAL_OVERRIDE;
425 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
426 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
428 explicit MetaPolyPolygonAction( const tools::PolyPolygon& );
430 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
431 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
433 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
436 class VCL_DLLPUBLIC MetaTextAction : public MetaAction
438 private:
440 Point maPt;
441 OUString maStr;
442 sal_Int32 mnIndex;
443 sal_Int32 mnLen;
445 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
447 public:
448 MetaTextAction();
449 protected:
450 virtual ~MetaTextAction();
451 public:
452 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
453 virtual MetaAction* Clone() SAL_OVERRIDE;
454 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
455 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
457 MetaTextAction( const Point& rPt, const OUString& rStr,
458 sal_Int32 nIndex, sal_Int32 nLen );
460 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
461 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
463 const Point& GetPoint() const { return maPt; }
464 const OUString& GetText() const { return maStr; }
465 sal_Int32 GetIndex() const { return mnIndex; }
466 sal_Int32 GetLen() const { return mnLen; }
469 class VCL_DLLPUBLIC MetaTextArrayAction : public MetaAction
471 private:
473 Point maStartPt;
474 OUString maStr;
475 long* mpDXAry;
476 sal_Int32 mnIndex;
477 sal_Int32 mnLen;
479 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
481 protected:
482 virtual ~MetaTextArrayAction();
484 public:
485 MetaTextArrayAction();
486 MetaTextArrayAction( const MetaTextArrayAction& rAction );
487 MetaTextArrayAction( const Point& rStartPt, const OUString& rStr,
488 const long* pDXAry, sal_Int32 nIndex,
489 sal_Int32 nLen );
491 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
493 virtual MetaAction* Clone() SAL_OVERRIDE;
495 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
496 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
498 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
499 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
501 const Point& GetPoint() const { return maStartPt; }
502 const OUString& GetText() const { return maStr; }
503 sal_Int32 GetIndex() const { return mnIndex; }
504 sal_Int32 GetLen() const { return mnLen; }
505 long* GetDXArray() const { return mpDXAry; }
508 class VCL_DLLPUBLIC MetaStretchTextAction : public MetaAction
510 private:
512 Point maPt;
513 OUString maStr;
514 sal_uInt32 mnWidth;
515 sal_Int32 mnIndex;
516 sal_Int32 mnLen;
518 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
520 public:
521 MetaStretchTextAction();
522 protected:
523 virtual ~MetaStretchTextAction();
524 public:
525 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
526 virtual MetaAction* Clone() SAL_OVERRIDE;
527 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
528 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
530 MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
531 const OUString& rStr,
532 sal_Int32 nIndex, sal_Int32 nLen );
534 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
535 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
537 const Point& GetPoint() const { return maPt; }
538 const OUString& GetText() const { return maStr; }
539 sal_uInt32 GetWidth() const { return mnWidth; }
540 sal_Int32 GetIndex() const { return mnIndex; }
541 sal_Int32 GetLen() const { return mnLen; }
544 class VCL_DLLPUBLIC MetaTextRectAction : public MetaAction
546 private:
548 Rectangle maRect;
549 OUString maStr;
550 DrawTextFlags mnStyle;
552 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
554 public:
555 MetaTextRectAction();
556 protected:
557 virtual ~MetaTextRectAction();
558 public:
559 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
560 virtual MetaAction* Clone() SAL_OVERRIDE;
561 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
562 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
564 MetaTextRectAction( const Rectangle& rRect,
565 const OUString& rStr, DrawTextFlags nStyle );
567 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
568 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
570 const Rectangle& GetRect() const { return maRect; }
571 const OUString& GetText() const { return maStr; }
572 DrawTextFlags GetStyle() const { return mnStyle; }
575 class VCL_DLLPUBLIC MetaTextLineAction : public MetaAction
577 private:
579 Point maPos;
580 long mnWidth;
581 FontStrikeout meStrikeout;
582 FontUnderline meUnderline;
583 FontUnderline meOverline;
585 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
587 public:
588 MetaTextLineAction();
589 protected:
590 virtual ~MetaTextLineAction();
591 public:
592 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
593 virtual MetaAction* Clone() SAL_OVERRIDE;
594 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
595 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
597 MetaTextLineAction( const Point& rPos, long nWidth,
598 FontStrikeout eStrikeout,
599 FontUnderline eUnderline,
600 FontUnderline eOverline );
601 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
602 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
604 const Point& GetStartPoint() const { return maPos; }
605 long GetWidth() const { return mnWidth; }
606 FontStrikeout GetStrikeout() const { return meStrikeout; }
607 FontUnderline GetUnderline() const { return meUnderline; }
608 FontUnderline GetOverline() const { return meOverline; }
611 class VCL_DLLPUBLIC MetaBmpAction : public MetaAction
613 private:
615 Bitmap maBmp;
616 Point maPt;
618 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
620 public:
621 MetaBmpAction();
622 protected:
623 virtual ~MetaBmpAction();
624 public:
625 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
626 virtual MetaAction* Clone() SAL_OVERRIDE;
627 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
628 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
630 MetaBmpAction( const Point& rPt, const Bitmap& rBmp );
632 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
633 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
635 const Bitmap& GetBitmap() const { return maBmp; }
636 const Point& GetPoint() const { return maPt; }
639 class VCL_DLLPUBLIC MetaBmpScaleAction : public MetaAction
641 private:
643 Bitmap maBmp;
644 Point maPt;
645 Size maSz;
647 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
649 public:
650 MetaBmpScaleAction();
651 protected:
652 virtual ~MetaBmpScaleAction();
653 public:
654 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
655 virtual MetaAction* Clone() SAL_OVERRIDE;
656 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
657 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
659 MetaBmpScaleAction( const Point& rPt, const Size& rSz,
660 const Bitmap& rBmp );
662 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
663 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
665 const Bitmap& GetBitmap() const { return maBmp; }
666 const Point& GetPoint() const { return maPt; }
667 const Size& GetSize() const { return maSz; }
670 class VCL_DLLPUBLIC MetaBmpScalePartAction : public MetaAction
672 private:
674 Bitmap maBmp;
675 Point maDstPt;
676 Size maDstSz;
677 Point maSrcPt;
678 Size maSrcSz;
680 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
682 public:
683 MetaBmpScalePartAction();
684 protected:
685 virtual ~MetaBmpScalePartAction();
686 public:
687 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
688 virtual MetaAction* Clone() SAL_OVERRIDE;
689 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
690 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
692 MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
693 const Point& rSrcPt, const Size& rSrcSz,
694 const Bitmap& rBmp );
696 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
697 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
699 const Bitmap& GetBitmap() const { return maBmp; }
700 const Point& GetDestPoint() const { return maDstPt; }
701 const Size& GetDestSize() const { return maDstSz; }
702 const Point& GetSrcPoint() const { return maSrcPt; }
703 const Size& GetSrcSize() const { return maSrcSz; }
706 class VCL_DLLPUBLIC MetaBmpExAction : public MetaAction
708 private:
710 BitmapEx maBmpEx;
711 Point maPt;
713 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
715 public:
716 MetaBmpExAction();
717 protected:
718 virtual ~MetaBmpExAction();
719 public:
720 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
721 virtual MetaAction* Clone() SAL_OVERRIDE;
722 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
723 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
725 MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx );
727 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
728 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
730 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
731 const Point& GetPoint() const { return maPt; }
734 class VCL_DLLPUBLIC MetaBmpExScaleAction : public MetaAction
736 private:
738 BitmapEx maBmpEx;
739 Point maPt;
740 Size maSz;
742 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
744 public:
745 MetaBmpExScaleAction();
746 protected:
747 virtual ~MetaBmpExScaleAction();
748 public:
749 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
750 virtual MetaAction* Clone() SAL_OVERRIDE;
751 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
752 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
754 MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
755 const BitmapEx& rBmpEx ) ;
757 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
758 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
760 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
761 const Point& GetPoint() const { return maPt; }
762 const Size& GetSize() const { return maSz; }
765 class VCL_DLLPUBLIC MetaBmpExScalePartAction : public MetaAction
767 private:
769 BitmapEx maBmpEx;
770 Point maDstPt;
771 Size maDstSz;
772 Point maSrcPt;
773 Size maSrcSz;
775 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
777 public:
778 MetaBmpExScalePartAction();
779 protected:
780 virtual ~MetaBmpExScalePartAction();
781 public:
782 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
783 virtual MetaAction* Clone() SAL_OVERRIDE;
784 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
785 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
787 MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
788 const Point& rSrcPt, const Size& rSrcSz,
789 const BitmapEx& rBmpEx );
791 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
792 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
794 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
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; }
801 class VCL_DLLPUBLIC MetaMaskAction : public MetaAction
803 private:
805 Bitmap maBmp;
806 Color maColor;
807 Point maPt;
809 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
811 public:
812 MetaMaskAction();
813 protected:
814 virtual ~MetaMaskAction();
815 public:
816 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
817 virtual MetaAction* Clone() SAL_OVERRIDE;
818 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
819 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
821 MetaMaskAction( const Point& rPt,
822 const Bitmap& rBmp,
823 const Color& rColor );
825 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
826 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
828 const Bitmap& GetBitmap() const { return maBmp; }
829 const Color& GetColor() const { return maColor; }
830 const Point& GetPoint() const { return maPt; }
833 class VCL_DLLPUBLIC MetaMaskScaleAction : public MetaAction
835 private:
837 Bitmap maBmp;
838 Color maColor;
839 Point maPt;
840 Size maSz;
842 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
844 public:
845 MetaMaskScaleAction();
846 protected:
847 virtual ~MetaMaskScaleAction();
848 public:
849 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
850 virtual MetaAction* Clone() SAL_OVERRIDE;
851 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
852 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
854 MetaMaskScaleAction( const Point& rPt, const Size& rSz,
855 const Bitmap& rBmp,
856 const Color& rColor );
858 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
859 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
861 const Bitmap& GetBitmap() const { return maBmp; }
862 const Color& GetColor() const { return maColor; }
863 const Point& GetPoint() const { return maPt; }
864 const Size& GetSize() const { return maSz; }
867 class VCL_DLLPUBLIC MetaMaskScalePartAction : public MetaAction
869 private:
871 Bitmap maBmp;
872 Color maColor;
873 Point maDstPt;
874 Size maDstSz;
875 Point maSrcPt;
876 Size maSrcSz;
878 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
880 public:
881 MetaMaskScalePartAction();
882 protected:
883 virtual ~MetaMaskScalePartAction();
884 public:
885 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
886 virtual MetaAction* Clone() SAL_OVERRIDE;
887 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
888 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
890 MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz,
891 const Point& rSrcPt, const Size& rSrcSz,
892 const Bitmap& rBmp,
893 const Color& rColor );
895 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
896 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
898 const Bitmap& GetBitmap() const { return maBmp; }
899 const Color& GetColor() const { return maColor; }
900 const Point& GetDestPoint() const { return maDstPt; }
901 const Size& GetDestSize() const { return maDstSz; }
902 const Point& GetSrcPoint() const { return maSrcPt; }
903 const Size& GetSrcSize() const { return maSrcSz; }
906 class VCL_DLLPUBLIC MetaGradientAction : public MetaAction
908 private:
910 Rectangle maRect;
911 Gradient maGradient;
913 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
915 public:
916 MetaGradientAction();
917 protected:
918 virtual ~MetaGradientAction();
919 public:
920 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
921 virtual MetaAction* Clone() SAL_OVERRIDE;
922 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
923 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
925 MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient );
927 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
928 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
930 const Rectangle& GetRect() const { return maRect; }
931 const Gradient& GetGradient() const { return maGradient; }
934 class VCL_DLLPUBLIC MetaGradientExAction : public MetaAction
936 private:
938 tools::PolyPolygon maPolyPoly;
939 Gradient maGradient;
941 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
943 public:
944 MetaGradientExAction();
945 protected:
946 virtual ~MetaGradientExAction();
947 public:
948 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
949 virtual MetaAction* Clone() SAL_OVERRIDE;
950 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
951 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
953 MetaGradientExAction( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
955 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
956 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
958 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
959 const Gradient& GetGradient() const { return maGradient; }
962 class VCL_DLLPUBLIC MetaHatchAction : public MetaAction
964 private:
966 tools::PolyPolygon maPolyPoly;
967 Hatch maHatch;
969 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
971 public:
972 MetaHatchAction();
973 protected:
974 virtual ~MetaHatchAction();
975 public:
976 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
977 virtual MetaAction* Clone() SAL_OVERRIDE;
978 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
979 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
981 MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
983 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
984 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
986 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
987 const Hatch& GetHatch() const { return maHatch; }
990 class VCL_DLLPUBLIC MetaWallpaperAction : public MetaAction
992 private:
994 Rectangle maRect;
995 Wallpaper maWallpaper;
997 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
999 public:
1000 MetaWallpaperAction();
1001 protected:
1002 virtual ~MetaWallpaperAction();
1003 public:
1004 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1005 virtual MetaAction* Clone() SAL_OVERRIDE;
1006 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1007 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1009 MetaWallpaperAction( const Rectangle& rRect,
1010 const Wallpaper& rPaper );
1012 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
1013 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1015 const Rectangle& GetRect() const { return maRect; }
1016 const Wallpaper& GetWallpaper() const { return maWallpaper; }
1019 class VCL_DLLPUBLIC MetaClipRegionAction : public MetaAction
1021 private:
1023 vcl::Region maRegion;
1024 bool mbClip;
1026 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1028 public:
1029 MetaClipRegionAction();
1030 protected:
1031 virtual ~MetaClipRegionAction();
1032 public:
1033 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1034 virtual MetaAction* Clone() SAL_OVERRIDE;
1035 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1036 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1038 MetaClipRegionAction( const vcl::Region& rRegion, bool bClip );
1040 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
1041 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1043 const vcl::Region& GetRegion() const { return maRegion; }
1044 bool IsClipping() const { return mbClip; }
1047 class VCL_DLLPUBLIC MetaISectRectClipRegionAction : public MetaAction
1049 private:
1051 Rectangle maRect;
1053 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1055 public:
1056 MetaISectRectClipRegionAction();
1057 protected:
1058 virtual ~MetaISectRectClipRegionAction();
1059 public:
1060 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1061 virtual MetaAction* Clone() SAL_OVERRIDE;
1062 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1063 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1065 explicit MetaISectRectClipRegionAction( const Rectangle& );
1067 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
1068 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1070 const Rectangle& GetRect() const { return maRect; }
1073 class VCL_DLLPUBLIC MetaISectRegionClipRegionAction : public MetaAction
1075 private:
1077 vcl::Region maRegion;
1079 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1081 public:
1082 MetaISectRegionClipRegionAction();
1083 protected:
1084 virtual ~MetaISectRegionClipRegionAction();
1085 public:
1086 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1087 virtual MetaAction* Clone() SAL_OVERRIDE;
1088 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1089 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1091 explicit MetaISectRegionClipRegionAction( const vcl::Region& );
1093 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
1094 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1096 const vcl::Region& GetRegion() const { return maRegion; }
1099 class VCL_DLLPUBLIC MetaMoveClipRegionAction : public MetaAction
1101 private:
1103 long mnHorzMove;
1104 long mnVertMove;
1106 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1108 public:
1109 MetaMoveClipRegionAction();
1110 protected:
1111 virtual ~MetaMoveClipRegionAction();
1112 public:
1113 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1114 virtual MetaAction* Clone() SAL_OVERRIDE;
1115 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1116 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1118 MetaMoveClipRegionAction( long nHorzMove, long nVertMove );
1120 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1122 long GetHorzMove() const { return mnHorzMove; }
1123 long GetVertMove() const { return mnVertMove; }
1126 class VCL_DLLPUBLIC MetaLineColorAction : public MetaAction
1128 private:
1130 Color maColor;
1131 bool mbSet;
1133 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1135 public:
1136 MetaLineColorAction();
1137 protected:
1138 virtual ~MetaLineColorAction();
1139 public:
1140 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1141 virtual MetaAction* Clone() SAL_OVERRIDE;
1142 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1143 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1145 MetaLineColorAction( const Color& rColor, bool bSet );
1147 const Color& GetColor() const { return maColor; }
1148 bool IsSetting() const { return mbSet; }
1151 class VCL_DLLPUBLIC MetaFillColorAction : public MetaAction
1153 private:
1155 Color maColor;
1156 bool mbSet;
1158 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1160 public:
1161 MetaFillColorAction();
1162 protected:
1163 virtual ~MetaFillColorAction();
1164 public:
1165 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1166 virtual MetaAction* Clone() SAL_OVERRIDE;
1167 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1168 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1170 MetaFillColorAction( const Color& rColor, bool bSet );
1172 const Color& GetColor() const { return maColor; }
1173 bool IsSetting() const { return mbSet; }
1176 class VCL_DLLPUBLIC MetaTextColorAction : public MetaAction
1178 private:
1180 Color maColor;
1182 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1184 public:
1185 MetaTextColorAction();
1186 protected:
1187 virtual ~MetaTextColorAction();
1188 public:
1189 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1190 virtual MetaAction* Clone() SAL_OVERRIDE;
1191 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1192 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1194 explicit MetaTextColorAction( const Color& );
1196 const Color& GetColor() const { return maColor; }
1199 class VCL_DLLPUBLIC MetaTextFillColorAction : public MetaAction
1201 private:
1203 Color maColor;
1204 bool mbSet;
1206 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1208 public:
1209 MetaTextFillColorAction();
1210 protected:
1211 virtual ~MetaTextFillColorAction();
1212 public:
1213 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1214 virtual MetaAction* Clone() SAL_OVERRIDE;
1215 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1216 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1218 MetaTextFillColorAction( const Color& rColor, bool bSet );
1220 const Color& GetColor() const { return maColor; }
1221 bool IsSetting() const { return mbSet; }
1224 class VCL_DLLPUBLIC MetaTextLineColorAction : public MetaAction
1226 private:
1228 Color maColor;
1229 bool mbSet;
1231 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1233 public:
1234 MetaTextLineColorAction();
1235 protected:
1236 virtual ~MetaTextLineColorAction();
1237 public:
1238 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1239 virtual MetaAction* Clone() SAL_OVERRIDE;
1240 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1241 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1243 MetaTextLineColorAction( const Color& rColor, bool bSet );
1245 const Color& GetColor() const { return maColor; }
1246 bool IsSetting() const { return mbSet; }
1249 class VCL_DLLPUBLIC MetaOverlineColorAction : public MetaAction
1251 private:
1253 Color maColor;
1254 bool mbSet;
1256 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1258 public:
1259 MetaOverlineColorAction();
1260 protected:
1261 virtual ~MetaOverlineColorAction();
1262 public:
1263 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1264 virtual MetaAction* Clone() SAL_OVERRIDE;
1265 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1266 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1268 MetaOverlineColorAction( const Color& rColor, bool bSet );
1270 const Color& GetColor() const { return maColor; }
1271 bool IsSetting() const { return mbSet; }
1274 class VCL_DLLPUBLIC MetaTextAlignAction : public MetaAction
1276 private:
1278 TextAlign maAlign;
1280 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1282 public:
1283 MetaTextAlignAction();
1284 protected:
1285 virtual ~MetaTextAlignAction();
1286 public:
1287 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1288 virtual MetaAction* Clone() SAL_OVERRIDE;
1289 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1290 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1292 explicit MetaTextAlignAction( TextAlign eAlign );
1294 TextAlign GetTextAlign() const { return maAlign; }
1297 class VCL_DLLPUBLIC MetaMapModeAction : public MetaAction
1299 private:
1301 MapMode maMapMode;
1303 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1305 public:
1306 MetaMapModeAction();
1307 protected:
1308 virtual ~MetaMapModeAction();
1309 public:
1310 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1311 virtual MetaAction* Clone() SAL_OVERRIDE;
1312 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1313 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1315 explicit MetaMapModeAction( const MapMode& );
1317 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1319 const MapMode& GetMapMode() const { return maMapMode; }
1322 class VCL_DLLPUBLIC MetaFontAction : public MetaAction
1324 private:
1326 vcl::Font maFont;
1328 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1330 public:
1331 MetaFontAction();
1332 protected:
1333 virtual ~MetaFontAction();
1334 public:
1335 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1336 virtual MetaAction* Clone() SAL_OVERRIDE;
1337 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1338 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1340 explicit MetaFontAction( const vcl::Font& );
1342 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1344 const vcl::Font& GetFont() const { return maFont; }
1347 class VCL_DLLPUBLIC MetaPushAction : public MetaAction
1349 private:
1351 PushFlags mnFlags;
1353 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1355 public:
1356 MetaPushAction();
1357 protected:
1358 virtual ~MetaPushAction();
1359 public:
1360 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1361 virtual MetaAction* Clone() SAL_OVERRIDE;
1362 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1363 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1365 explicit MetaPushAction( PushFlags nFlags );
1367 PushFlags GetFlags() const { return mnFlags; }
1370 class VCL_DLLPUBLIC MetaPopAction : public MetaAction
1372 public:
1374 MetaPopAction();
1375 protected:
1376 virtual ~MetaPopAction();
1377 public:
1378 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1379 virtual MetaAction* Clone() SAL_OVERRIDE;
1380 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1381 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1384 class VCL_DLLPUBLIC MetaRasterOpAction : public MetaAction
1386 private:
1388 RasterOp meRasterOp;
1390 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1392 public:
1393 MetaRasterOpAction();
1394 protected:
1395 virtual ~MetaRasterOpAction();
1396 public:
1397 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1398 virtual MetaAction* Clone() SAL_OVERRIDE;
1399 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1400 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1402 explicit MetaRasterOpAction( RasterOp eRasterOp );
1404 RasterOp GetRasterOp() const { return meRasterOp; }
1407 class VCL_DLLPUBLIC MetaTransparentAction : public MetaAction
1409 private:
1411 tools::PolyPolygon maPolyPoly;
1412 sal_uInt16 mnTransPercent;
1414 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1416 public:
1417 MetaTransparentAction();
1418 protected:
1419 virtual ~MetaTransparentAction();
1420 public:
1421 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1422 virtual MetaAction* Clone() SAL_OVERRIDE;
1423 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1424 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1426 MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent );
1428 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
1429 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1431 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
1432 sal_uInt16 GetTransparence() const { return mnTransPercent; }
1435 class VCL_DLLPUBLIC MetaFloatTransparentAction : public MetaAction
1437 private:
1439 GDIMetaFile maMtf;
1440 Point maPoint;
1441 Size maSize;
1442 Gradient maGradient;
1444 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1446 public:
1447 MetaFloatTransparentAction();
1448 protected:
1449 virtual ~MetaFloatTransparentAction();
1450 public:
1451 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1452 virtual MetaAction* Clone() SAL_OVERRIDE;
1453 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1454 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1456 MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
1457 const Size& rSize, const Gradient& rGradient );
1459 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
1460 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1462 const GDIMetaFile& GetGDIMetaFile() const { return maMtf; }
1463 const Point& GetPoint() const { return maPoint; }
1464 const Size& GetSize() const { return maSize; }
1465 const Gradient& GetGradient() const { return maGradient; }
1468 class VCL_DLLPUBLIC MetaEPSAction : public MetaAction
1470 private:
1472 GfxLink maGfxLink;
1473 GDIMetaFile maSubst;
1474 Point maPoint;
1475 Size maSize;
1477 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1479 public:
1480 MetaEPSAction();
1481 protected:
1482 virtual ~MetaEPSAction();
1483 public:
1484 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1485 virtual MetaAction* Clone() SAL_OVERRIDE;
1486 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1487 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1489 MetaEPSAction( const Point& rPoint, const Size& rSize,
1490 const GfxLink& rGfxLink, const GDIMetaFile& rSubst );
1492 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
1493 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1495 const GfxLink& GetLink() const { return maGfxLink; }
1496 const GDIMetaFile& GetSubstitute() const { return maSubst; }
1497 const Point& GetPoint() const { return maPoint; }
1498 const Size& GetSize() const { return maSize; }
1501 class VCL_DLLPUBLIC MetaRefPointAction : public MetaAction
1503 private:
1505 Point maRefPoint;
1506 bool mbSet;
1508 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1510 public:
1511 MetaRefPointAction();
1512 protected:
1513 virtual ~MetaRefPointAction();
1514 public:
1515 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1516 virtual MetaAction* Clone() SAL_OVERRIDE;
1517 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1518 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1520 MetaRefPointAction( const Point& rRefPoint, bool bSet );
1522 const Point& GetRefPoint() const { return maRefPoint; }
1523 bool IsSetting() const { return mbSet; }
1526 class VCL_DLLPUBLIC MetaCommentAction : public MetaAction
1528 private:
1530 OString maComment;
1531 sal_Int32 mnValue;
1532 sal_uInt32 mnDataSize;
1533 sal_uInt8* mpData;
1535 SAL_DLLPRIVATE void ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize );
1536 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1538 protected:
1539 virtual ~MetaCommentAction();
1541 public:
1542 explicit MetaCommentAction( sal_Int32 nValue = 0L );
1543 explicit MetaCommentAction( const MetaCommentAction& rAct );
1544 explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = NULL, sal_uInt32 nDataSize = 0UL );
1546 virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
1547 virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
1549 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1550 virtual MetaAction* Clone() SAL_OVERRIDE;
1551 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1552 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1554 const OString& GetComment() const { return maComment; }
1555 sal_Int32 GetValue() const { return mnValue; }
1556 sal_uInt32 GetDataSize() const { return mnDataSize; }
1557 const sal_uInt8* GetData() const { return mpData; }
1560 class VCL_DLLPUBLIC MetaLayoutModeAction : public MetaAction
1562 private:
1564 ComplexTextLayoutMode mnLayoutMode;
1565 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1567 public:
1568 MetaLayoutModeAction();
1569 protected:
1570 virtual ~MetaLayoutModeAction();
1571 public:
1572 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1573 virtual MetaAction* Clone() SAL_OVERRIDE;
1574 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1575 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1577 explicit MetaLayoutModeAction( ComplexTextLayoutMode nLayoutMode );
1579 ComplexTextLayoutMode GetLayoutMode() const { return mnLayoutMode; }
1582 class VCL_DLLPUBLIC MetaTextLanguageAction : public MetaAction
1584 private:
1586 LanguageType meTextLanguage;
1587 virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
1589 public:
1590 MetaTextLanguageAction();
1591 protected:
1592 virtual ~MetaTextLanguageAction();
1593 public:
1594 virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
1595 virtual MetaAction* Clone() SAL_OVERRIDE;
1596 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
1597 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
1599 explicit MetaTextLanguageAction( LanguageType );
1601 LanguageType GetTextLanguage() const { return meTextLanguage; }
1604 #endif // INCLUDED_VCL_METAACT_HXX
1606 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */