xref: /trunk/main/vcl/inc/vcl/metaact.hxx (revision e1beba7d)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SV_METAACT_HXX
25 #define _SV_METAACT_HXX
26 
27 #include <vcl/dllapi.h>
28 #include <vcl/gradient.hxx>
29 #include <vcl/hatch.hxx>
30 #include <vcl/wall.hxx>
31 #include <vcl/font.hxx>
32 #include <tools/poly.hxx>
33 #include <vcl/bitmap.hxx>
34 #include <vcl/bitmapex.hxx>
35 #include <vcl/region.hxx>
36 #include <vcl/graph.hxx>
37 #include <vcl/outdev.hxx>
38 #include <vcl/gdimtf.hxx>
39 #include <vcl/gfxlink.hxx>
40 #include <vcl/lineinfo.hxx>
41 
42 class SvStream;
43 
44 // -----------
45 // - Defines -
46 // -----------
47 
48 #define META_NULL_ACTION					(0)
49 #define META_PIXEL_ACTION					(100)
50 #define META_POINT_ACTION					(101)
51 #define META_LINE_ACTION					(102)
52 #define META_RECT_ACTION					(103)
53 #define META_ROUNDRECT_ACTION				(104)
54 #define META_ELLIPSE_ACTION 				(105)
55 #define META_ARC_ACTION 					(106)
56 #define META_PIE_ACTION 					(107)
57 #define META_CHORD_ACTION					(108)
58 #define META_POLYLINE_ACTION				(109)
59 #define META_POLYGON_ACTION 				(110)
60 #define META_POLYPOLYGON_ACTION 			(111)
61 #define META_TEXT_ACTION					(112)
62 #define META_TEXTARRAY_ACTION				(113)
63 #define META_STRETCHTEXT_ACTION 			(114)
64 #define META_TEXTRECT_ACTION				(115)
65 #define META_BMP_ACTION 					(116)
66 #define META_BMPSCALE_ACTION				(117)
67 #define META_BMPSCALEPART_ACTION			(118)
68 #define META_BMPEX_ACTION					(119)
69 #define META_BMPEXSCALE_ACTION				(120)
70 #define META_BMPEXSCALEPART_ACTION			(121)
71 #define META_MASK_ACTION					(122)
72 #define META_MASKSCALE_ACTION				(123)
73 #define META_MASKSCALEPART_ACTION			(124)
74 #define META_GRADIENT_ACTION				(125)
75 #define META_HATCH_ACTION					(126)
76 #define META_WALLPAPER_ACTION				(127)
77 #define META_CLIPREGION_ACTION				(128)
78 #define META_ISECTRECTCLIPREGION_ACTION 	(129)
79 #define META_ISECTREGIONCLIPREGION_ACTION	(130)
80 #define META_MOVECLIPREGION_ACTION			(131)
81 #define META_LINECOLOR_ACTION				(132)
82 #define META_FILLCOLOR_ACTION				(133)
83 #define META_TEXTCOLOR_ACTION				(134)
84 #define META_TEXTFILLCOLOR_ACTION			(135)
85 #define META_TEXTALIGN_ACTION				(136)
86 #define META_MAPMODE_ACTION 				(137)
87 #define META_FONT_ACTION					(138)
88 #define META_PUSH_ACTION					(139)
89 #define META_POP_ACTION 					(140)
90 #define META_RASTEROP_ACTION				(141)
91 #define META_TRANSPARENT_ACTION 			(142)
92 #define META_EPS_ACTION 					(143)
93 #define META_REFPOINT_ACTION				(144)
94 #define META_TEXTLINECOLOR_ACTION			(145)
95 #define META_TEXTLINE_ACTION				(146)
96 #define META_FLOATTRANSPARENT_ACTION		(147)
97 #define META_GRADIENTEX_ACTION				(148)
98 #define META_LAYOUTMODE_ACTION 				(149)
99 #define META_TEXTLANGUAGE_ACTION 			(150)
100 #define META_OVERLINECOLOR_ACTION			(151)
101 
102 #define META_COMMENT_ACTION 				(512)
103 
104 // ------------------------------------------------------------------------
105 
106 struct ImplMetaReadData
107 {
108 	rtl_TextEncoding        meActualCharSet;
109 
ImplMetaReadDataImplMetaReadData110                             ImplMetaReadData() :
111                                 meActualCharSet( RTL_TEXTENCODING_ASCII_US )
112                             {
113                             }
114 };
115 
116 // ------------------------------------------------------------------------
117 
118 struct ImplMetaWriteData
119 {
120 	rtl_TextEncoding        meActualCharSet;
121 
ImplMetaWriteDataImplMetaWriteData122                             ImplMetaWriteData() :
123                                 meActualCharSet( RTL_TEXTENCODING_ASCII_US )
124                             {
125                             }
126 };
127 
128 // ------------------------------------------------------------------------
129 
130 #define DECL_META_ACTION( Name, nType ) 									\
131 						Meta##Name##Action();								\
132 protected:                                                                  \
133 	virtual 			~Meta##Name##Action();								\
134 public:                                                                     \
135 	virtual void		Execute( OutputDevice* pOut );						\
136 	virtual MetaAction* Clone();											\
137 	virtual void		Write( SvStream& rOStm, ImplMetaWriteData* pData ); \
138 	virtual void		Read( SvStream& rIStm, ImplMetaReadData* pData );
139 
140 #define IMPL_META_ACTION( Name, nType ) 								\
141 Meta##Name##Action::Meta##Name##Action() :								\
142 	MetaAction( nType ) {}												\
143 Meta##Name##Action::~Meta##Name##Action() {}
144 
145 // --------------
146 // - MetaAction -
147 // --------------
148 
149 class VCL_DLLPUBLIC MetaAction
150 {
151 private:
152 	sal_uLong				mnRefCount;
153 	sal_uInt16				mnType;
154 
155 	virtual	sal_Bool	Compare( const MetaAction& ) const;
156 
157 protected:
158 	virtual 			~MetaAction();
159 
160 public:
161 						MetaAction();
162 	explicit			MetaAction( sal_uInt16 nType );
163 
164 	virtual void		Execute( OutputDevice* pOut );
165 
166 	virtual MetaAction* Clone();
167 
168 	virtual void		Move( long nHorzMove, long nVertMove );
169 	virtual void		Scale( double fScaleX, double fScaleY );
170 
171 	virtual void		Write( SvStream& rOStm, ImplMetaWriteData* pData );
172 	virtual void		Read( SvStream& rIStm, ImplMetaReadData* pData );
173 
174 	sal_Bool			IsEqual( const MetaAction& ) const;
175 
GetType() const176 	sal_uInt16				GetType() const { return mnType; }
GetRefCount() const177 	sal_uLong				GetRefCount() const { return mnRefCount; }
ResetRefCount()178 	void				ResetRefCount() { mnRefCount = 1; }
Duplicate()179 	void				Duplicate()  { mnRefCount++; }
Delete()180 	void				Delete() { if ( 0 == --mnRefCount ) delete this; }
181 
182 public:
183 	static MetaAction*	ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData );
184 };
185 
186 // -------------------
187 // - MetaPixelAction -
188 // -------------------
189 
190 class VCL_DLLPUBLIC MetaPixelAction : public MetaAction
191 {
192 private:
193 	Point				maPt;
194 	Color				maColor;
195 
196 	virtual	sal_Bool	Compare( const MetaAction& ) const;
197 
198 public:
199 						DECL_META_ACTION( Pixel, META_PIXEL_ACTION )
200 
201 						MetaPixelAction( const Point& rPt, const Color& rColor );
202 
203 	virtual void		Move( long nHorzMove, long nVertMove );
204 	virtual void		Scale( double fScaleX, double fScaleY );
205 
GetPoint() const206 	const Point&		GetPoint() const { return maPt; }
GetColor() const207 	const Color&		GetColor() const { return maColor; }
208 };
209 
210 // -------------------
211 // - MetaPointAction -
212 // -------------------
213 
214 class VCL_DLLPUBLIC MetaPointAction : public MetaAction
215 {
216 private:
217 	Point				maPt;
218 
219 	virtual	sal_Bool	Compare( const MetaAction& ) const;
220 
221 public:
222 						DECL_META_ACTION( Point, META_POINT_ACTION )
223 
224 	explicit			MetaPointAction( const Point& );
225 
226 	virtual void		Move( long nHorzMove, long nVertMove );
227 	virtual void		Scale( double fScaleX, double fScaleY );
228 
GetPoint() const229 	const Point&		GetPoint() const { return maPt; }
230 };
231 
232 // ------------------
233 // - MetaLineAction -
234 // ------------------
235 
236 class VCL_DLLPUBLIC MetaLineAction : public MetaAction
237 {
238 private:
239 
240 	LineInfo			maLineInfo;
241 	Point				maStartPt;
242 	Point				maEndPt;
243 
244 	virtual	sal_Bool	Compare( const MetaAction& ) const;
245 
246 public:
247 						DECL_META_ACTION( Line, META_LINE_ACTION )
248 
249 						MetaLineAction( const Point& rStart, const Point& rEnd );
250 						MetaLineAction( const Point& rStart, const Point& rEnd,
251 										const LineInfo& rLineInfo );
252 
253 	virtual void		Move( long nHorzMove, long nVertMove );
254 	virtual void		Scale( double fScaleX, double fScaleY );
255 
GetStartPoint() const256 	const Point&		GetStartPoint() const { return maStartPt; }
GetEndPoint() const257 	const Point&		GetEndPoint() const { return maEndPt; }
GetLineInfo() const258 	const LineInfo& 	GetLineInfo() const { return maLineInfo; }
259 };
260 
261 // ------------------
262 // - MetaRectAction -
263 // ------------------
264 
265 class VCL_DLLPUBLIC MetaRectAction : public MetaAction
266 {
267 private:
268 
269 	Rectangle			maRect;
270 
271 	virtual	sal_Bool	Compare( const MetaAction& ) const;
272 public:
273 						DECL_META_ACTION( Rect, META_RECT_ACTION )
274 
275 	explicit			MetaRectAction( const Rectangle& );
276 
277 	virtual void		Move( long nHorzMove, long nVertMove );
278 	virtual void		Scale( double fScaleX, double fScaleY );
279 
GetRect() const280 	const Rectangle&	GetRect() const { return maRect; }
281 };
282 
283 // -----------------------
284 // - MetaRoundRectAction -
285 // -----------------------
286 
287 class VCL_DLLPUBLIC MetaRoundRectAction : public MetaAction
288 {
289 private:
290 
291 	Rectangle			maRect;
292 	sal_uInt32			mnHorzRound;
293 	sal_uInt32			mnVertRound;
294 
295 	virtual	sal_Bool	Compare( const MetaAction& ) const;
296 
297 public:
298 						DECL_META_ACTION( RoundRect, META_ROUNDRECT_ACTION )
299 
300 						MetaRoundRectAction( const Rectangle& rRect,
301 											 sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
302 
303 	virtual void		Move( long nHorzMove, long nVertMove );
304 	virtual void		Scale( double fScaleX, double fScaleY );
305 
GetRect() const306 	const Rectangle&	GetRect() const { return maRect; }
GetHorzRound() const307 	sal_uInt32			GetHorzRound() const { return mnHorzRound; }
GetVertRound() const308 	sal_uInt32			GetVertRound() const { return mnVertRound; }
309 };
310 
311 // ---------------------
312 // - MetaEllipseAction -
313 // ---------------------
314 
315 class VCL_DLLPUBLIC MetaEllipseAction : public MetaAction
316 {
317 private:
318 
319 	Rectangle			maRect;
320 
321 	virtual	sal_Bool	Compare( const MetaAction& ) const;
322 
323 public:
324 						DECL_META_ACTION( Ellipse, META_ELLIPSE_ACTION )
325 
326 	explicit			MetaEllipseAction( const Rectangle& );
327 
328 	virtual void		Move( long nHorzMove, long nVertMove );
329 	virtual void		Scale( double fScaleX, double fScaleY );
330 
GetRect() const331 	const Rectangle&	GetRect() const { return maRect; }
332 };
333 
334 // -----------------
335 // - MetaArcAction -
336 // -----------------
337 
338 class VCL_DLLPUBLIC MetaArcAction : public MetaAction
339 {
340 private:
341 
342 	Rectangle			maRect;
343 	Point				maStartPt;
344 	Point				maEndPt;
345 
346 	virtual	sal_Bool	Compare( const MetaAction& ) const;
347 
348 public:
349 						DECL_META_ACTION( Arc, META_ARC_ACTION )
350 
351 						MetaArcAction( const Rectangle& rRect,
352 									   const Point& rStart, const Point& rEnd );
353 
354 	virtual void		Move( long nHorzMove, long nVertMove );
355 	virtual void		Scale( double fScaleX, double fScaleY );
356 
GetRect() const357 	const Rectangle&	GetRect() const { return maRect; }
GetStartPoint() const358 	const Point&		GetStartPoint() const { return maStartPt; }
GetEndPoint() const359 	const Point&		GetEndPoint() const { return maEndPt; }
360 };
361 
362 // -----------------
363 // - MetaPieAction -
364 // -----------------
365 
366 class VCL_DLLPUBLIC MetaPieAction : public MetaAction
367 {
368 private:
369 
370 	Rectangle			maRect;
371 	Point				maStartPt;
372 	Point				maEndPt;
373 
374 	virtual	sal_Bool	Compare( const MetaAction& ) const;
375 
376 public:
377 						DECL_META_ACTION( Pie, META_PIE_ACTION )
378 
379 						MetaPieAction( const Rectangle& rRect,
380 									   const Point& rStart, const Point& rEnd );
381 
382 	virtual void		Move( long nHorzMove, long nVertMove );
383 	virtual void		Scale( double fScaleX, double fScaleY );
384 
GetRect() const385 	const Rectangle&	GetRect() const { return maRect; }
GetStartPoint() const386 	const Point&		GetStartPoint() const { return maStartPt; }
GetEndPoint() const387 	const Point&		GetEndPoint() const { return maEndPt; }
388 };
389 
390 // -------------------
391 // - MetaChordAction -
392 // -------------------
393 
394 class VCL_DLLPUBLIC MetaChordAction : public MetaAction
395 {
396 private:
397 
398 	Rectangle			maRect;
399 	Point				maStartPt;
400 	Point				maEndPt;
401 
402 	virtual	sal_Bool	Compare( const MetaAction& ) const;
403 
404 public:
405 						DECL_META_ACTION( Chord, META_CHORD_ACTION )
406 
407 						MetaChordAction( const Rectangle& rRect,
408 										 const Point& rStart, const Point& rEnd );
409 
410 	virtual void		Move( long nHorzMove, long nVertMove );
411 	virtual void		Scale( double fScaleX, double fScaleY );
412 
GetRect() const413 	const Rectangle&	GetRect() const { return maRect; }
GetStartPoint() const414 	const Point&		GetStartPoint() const { return maStartPt; }
GetEndPoint() const415 	const Point&		GetEndPoint() const { return maEndPt; }
416 };
417 
418 // ----------------------
419 // - MetaPolyLineAction -
420 // ----------------------
421 
422 class VCL_DLLPUBLIC MetaPolyLineAction : public MetaAction
423 {
424 private:
425 
426 	LineInfo			maLineInfo;
427 	Polygon 			maPoly;
428 
429 	virtual	sal_Bool	Compare( const MetaAction& ) const;
430 
431 public:
432 						DECL_META_ACTION( PolyLine, META_POLYLINE_ACTION )
433 
434 	explicit			MetaPolyLineAction( const Polygon& );
435 	explicit			MetaPolyLineAction( const Polygon&, const LineInfo& );
436 
437 	virtual void		Move( long nHorzMove, long nVertMove );
438 	virtual void		Scale( double fScaleX, double fScaleY );
439 
GetPolygon() const440 	const Polygon&		GetPolygon() const { return maPoly; }
GetLineInfo() const441 	const LineInfo& 	GetLineInfo() const { return maLineInfo; }
442 };
443 
444 // ---------------------
445 // - MetaPolygonAction -
446 // ---------------------
447 
448 class VCL_DLLPUBLIC MetaPolygonAction : public MetaAction
449 {
450 private:
451 
452 	Polygon 			maPoly;
453 
454 	virtual	sal_Bool	Compare( const MetaAction& ) const;
455 
456 public:
457 						DECL_META_ACTION( Polygon, META_POLYGON_ACTION )
458 
459 	explicit			MetaPolygonAction( const Polygon& );
460 
461 	virtual void		Move( long nHorzMove, long nVertMove );
462 	virtual void		Scale( double fScaleX, double fScaleY );
463 
GetPolygon() const464 	const Polygon&		GetPolygon() const { return maPoly; }
465 };
466 
467 // -------------------------
468 // - MetaPolyPolygonAction -
469 // -------------------------
470 
471 class VCL_DLLPUBLIC MetaPolyPolygonAction : public MetaAction
472 {
473 private:
474 
475 	PolyPolygon 		maPolyPoly;
476 
477 	virtual	sal_Bool	Compare( const MetaAction& ) const;
478 
479 public:
480 						DECL_META_ACTION( PolyPolygon, META_POLYPOLYGON_ACTION )
481 
482 	explicit			MetaPolyPolygonAction( const PolyPolygon& );
483 
484 	virtual void		Move( long nHorzMove, long nVertMove );
485 	virtual void		Scale( double fScaleX, double fScaleY );
486 
GetPolyPolygon() const487 	const PolyPolygon&	GetPolyPolygon() const { return maPolyPoly; }
488 };
489 
490 // ------------------
491 // - MetaTextAction -
492 // ------------------
493 
494 class VCL_DLLPUBLIC MetaTextAction : public MetaAction
495 {
496 private:
497 
498 	Point				maPt;
499 	XubString			maStr;
500 	sal_uInt16				mnIndex;
501 	sal_uInt16				mnLen;
502 
503 	virtual	sal_Bool	Compare( const MetaAction& ) const;
504 
505 public:
506 						DECL_META_ACTION( Text, META_TEXT_ACTION )
507 
508 						MetaTextAction( const Point& rPt, const XubString& rStr,
509 										sal_uInt16 nIndex, sal_uInt16 nLen );
510 
511 	virtual void		Move( long nHorzMove, long nVertMove );
512 	virtual void		Scale( double fScaleX, double fScaleY );
513 
GetPoint() const514 	const Point&		GetPoint() const { return maPt; }
GetText() const515 	const XubString&	GetText() const { return maStr; }
GetIndex() const516 	sal_uInt16				GetIndex() const { return mnIndex; }
GetLen() const517 	sal_uInt16				GetLen() const { return mnLen; }
518 };
519 
520 // -----------------------
521 // - MetaTextArrayAction -
522 // -----------------------
523 
524 class VCL_DLLPUBLIC MetaTextArrayAction : public MetaAction
525 {
526 private:
527 
528 	Point				maStartPt;
529 	XubString			maStr;
530 	sal_Int32*			mpDXAry;
531 	sal_uInt16				mnIndex;
532 	sal_uInt16				mnLen;
533 
534 	virtual	sal_Bool	Compare( const MetaAction& ) const;
535 
536 protected:
537 	virtual 			~MetaTextArrayAction();
538 
539 public:
540 						MetaTextArrayAction();
541 						MetaTextArrayAction( const MetaTextArrayAction& rAction );
542 						MetaTextArrayAction( const Point& rStartPt,
543 											 const XubString& rStr,
544 											 const sal_Int32* pDXAry,
545 											 sal_uInt16 nIndex,
546 											 sal_uInt16 nLen );
547 
548 	virtual void		Execute( OutputDevice* pOut );
549 
550 	virtual MetaAction* Clone();
551 
552 	virtual void		Move( long nHorzMove, long nVertMove );
553 	virtual void		Scale( double fScaleX, double fScaleY );
554 
555 	virtual void		Write( SvStream& rOStm, ImplMetaWriteData* pData );
556 	virtual void		Read( SvStream& rIStm, ImplMetaReadData* pData );
557 
GetPoint() const558 	const Point&		GetPoint() const { return maStartPt; }
GetText() const559 	const XubString&	GetText() const { return maStr; }
GetIndex() const560 	sal_uInt16				GetIndex() const { return mnIndex; }
GetLen() const561 	sal_uInt16				GetLen() const { return mnLen; }
GetDXArray() const562 	sal_Int32*			GetDXArray() const { return mpDXAry; }
563 };
564 
565 // -------------------------
566 // - MetaStretchTextAction -
567 // -------------------------
568 
569 class VCL_DLLPUBLIC MetaStretchTextAction : public MetaAction
570 {
571 private:
572 
573 	Point				maPt;
574 	XubString			maStr;
575 	sal_uInt32			mnWidth;
576 	sal_uInt16				mnIndex;
577 	sal_uInt16				mnLen;
578 
579 	virtual	sal_Bool	Compare( const MetaAction& ) const;
580 
581 public:
582 						DECL_META_ACTION( StretchText, META_STRETCHTEXT_ACTION )
583 
584 						MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
585 											   const XubString& rStr,
586 											   sal_uInt16 nIndex, sal_uInt16 nLen );
587 
588 	virtual void		Move( long nHorzMove, long nVertMove );
589 	virtual void		Scale( double fScaleX, double fScaleY );
590 
GetPoint() const591 	const Point&		GetPoint() const { return maPt; }
GetText() const592 	const XubString&	GetText() const { return maStr; }
GetWidth() const593 	sal_uInt32			GetWidth() const { return mnWidth; }
GetIndex() const594 	sal_uInt16				GetIndex() const { return mnIndex; }
GetLen() const595 	sal_uInt16				GetLen() const { return mnLen; }
596 };
597 
598 // ----------------------
599 // - MetaTextRectAction -
600 // ----------------------
601 
602 class VCL_DLLPUBLIC MetaTextRectAction : public MetaAction
603 {
604 private:
605 
606 	Rectangle			maRect;
607 	XubString			maStr;
608 	sal_uInt16				mnStyle;
609 
610 	virtual	sal_Bool	Compare( const MetaAction& ) const;
611 
612 public:
613 						DECL_META_ACTION( TextRect, META_TEXTRECT_ACTION )
614 
615 						MetaTextRectAction( const Rectangle& rRect,
616 											const XubString& rStr, sal_uInt16 nStyle );
617 
618 	virtual void		Move( long nHorzMove, long nVertMove );
619 	virtual void		Scale( double fScaleX, double fScaleY );
620 
GetRect() const621 	const Rectangle&	GetRect() const { return maRect; }
GetText() const622 	const XubString&	GetText() const { return maStr; }
GetStyle() const623 	sal_uInt16				GetStyle() const { return mnStyle; }
624 };
625 
626 // ----------------------
627 // - MetaTextLineAction -
628 // ----------------------
629 
630 class VCL_DLLPUBLIC MetaTextLineAction : public MetaAction
631 {
632 private:
633 
634 	Point				maPos;
635 	long				mnWidth;
636 	FontStrikeout		meStrikeout;
637 	FontUnderline		meUnderline;
638 	FontUnderline		meOverline;
639 
640 	virtual	sal_Bool	Compare( const MetaAction& ) const;
641 
642 public:
643 						DECL_META_ACTION( TextLine, META_TEXTLINE_ACTION )
644 
645 						MetaTextLineAction( const Point& rPos, long nWidth,
646 											FontStrikeout eStrikeout,
647 											FontUnderline eUnderline,
648 											FontUnderline eOverline );
649 	virtual void		Move( long nHorzMove, long nVertMove );
650 	virtual void		Scale( double fScaleX, double fScaleY );
651 
GetStartPoint() const652 	const Point&		GetStartPoint() const { return maPos; }
GetWidth() const653 	long				GetWidth() const { return mnWidth; }
GetStrikeout() const654 	FontStrikeout		GetStrikeout() const { return meStrikeout; }
GetUnderline() const655 	FontUnderline		GetUnderline() const { return meUnderline; }
GetOverline() const656 	FontUnderline		GetOverline()  const { return meOverline; }
657 };
658 
659 // -----------------
660 // - MetaBmpAction -
661 // -----------------
662 
663 class VCL_DLLPUBLIC MetaBmpAction : public MetaAction
664 {
665 private:
666 
667 	Bitmap				maBmp;
668 	Point				maPt;
669 
670 	virtual	sal_Bool	Compare( const MetaAction& ) const;
671 
672 public:
673 						DECL_META_ACTION( Bmp, META_BMP_ACTION )
674 
675 						MetaBmpAction( const Point& rPt, const Bitmap& rBmp );
676 
677 	virtual void		Move( long nHorzMove, long nVertMove );
678 	virtual void		Scale( double fScaleX, double fScaleY );
679 
GetBitmap() const680 	const Bitmap&		GetBitmap() const { return maBmp; }
GetPoint() const681 	const Point&		GetPoint() const { return maPt; }
682 };
683 
684 // ----------------------
685 // - MetaBmpScaleAction -
686 // ----------------------
687 
688 class VCL_DLLPUBLIC MetaBmpScaleAction : public MetaAction
689 {
690 private:
691 
692 	Bitmap				maBmp;
693 	Point				maPt;
694 	Size				maSz;
695 
696 	virtual	sal_Bool	Compare( const MetaAction& ) const;
697 
698 public:
699 						DECL_META_ACTION( BmpScale, META_BMPSCALE_ACTION )
700 
701 						MetaBmpScaleAction( const Point& rPt, const Size& rSz,
702 											const Bitmap& rBmp );
703 
704 	virtual void		Move( long nHorzMove, long nVertMove );
705 	virtual void		Scale( double fScaleX, double fScaleY );
706 
GetBitmap() const707 	const Bitmap&		GetBitmap() const { return maBmp; }
GetPoint() const708 	const Point&		GetPoint() const { return maPt; }
GetSize() const709 	const Size& 		GetSize() const { return maSz; }
710 };
711 
712 // --------------------------
713 // - MetaBmpScalePartAction -
714 // --------------------------
715 
716 class VCL_DLLPUBLIC MetaBmpScalePartAction : public MetaAction
717 {
718 private:
719 
720 	Bitmap				maBmp;
721 	Point				maDstPt;
722 	Size				maDstSz;
723 	Point				maSrcPt;
724 	Size				maSrcSz;
725 
726 	virtual	sal_Bool	Compare( const MetaAction& ) const;
727 
728 public:
729 						DECL_META_ACTION( BmpScalePart, META_BMPSCALEPART_ACTION )
730 
731 						MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
732 												const Point& rSrcPt, const Size& rSrcSz,
733 												const Bitmap& rBmp );
734 
735 	virtual void		Move( long nHorzMove, long nVertMove );
736 	virtual void		Scale( double fScaleX, double fScaleY );
737 
GetBitmap() const738 	const Bitmap&		GetBitmap() const { return maBmp; }
GetDestPoint() const739 	const Point&		GetDestPoint() const { return maDstPt; }
GetDestSize() const740 	const Size& 		GetDestSize() const { return maDstSz; }
GetSrcPoint() const741 	const Point&		GetSrcPoint() const { return maSrcPt; }
GetSrcSize() const742 	const Size& 		GetSrcSize() const { return maSrcSz; }
743 };
744 
745 // -----------------
746 // - MetaBmpExAction -
747 // -----------------
748 
749 class VCL_DLLPUBLIC MetaBmpExAction : public MetaAction
750 {
751 private:
752 
753 	BitmapEx			maBmpEx;
754 	Point				maPt;
755 
756 	virtual	sal_Bool	Compare( const MetaAction& ) const;
757 
758 public:
759 						DECL_META_ACTION( BmpEx, META_BMPEX_ACTION )
760 
761 						MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx );
762 
763 	virtual void		Move( long nHorzMove, long nVertMove );
764 	virtual void		Scale( double fScaleX, double fScaleY );
765 
GetBitmapEx() const766 	const BitmapEx& 	GetBitmapEx() const { return maBmpEx; }
GetPoint() const767 	const Point&		GetPoint() const { return maPt; }
768 };
769 
770 // ----------------------
771 // - MetaBmpExScaleAction -
772 // ----------------------
773 
774 class VCL_DLLPUBLIC MetaBmpExScaleAction : public MetaAction
775 {
776 private:
777 
778 	BitmapEx			maBmpEx;
779 	Point				maPt;
780 	Size				maSz;
781 
782 	virtual	sal_Bool	Compare( const MetaAction& ) const;
783 
784 public:
785 						DECL_META_ACTION( BmpExScale, META_BMPEXSCALE_ACTION )
786 
787 						MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
788 											  const BitmapEx& rBmpEx ) ;
789 
790 	virtual void		Move( long nHorzMove, long nVertMove );
791 	virtual void		Scale( double fScaleX, double fScaleY );
792 
GetBitmapEx() const793 	const BitmapEx& 	GetBitmapEx() const { return maBmpEx; }
GetPoint() const794 	const Point&		GetPoint() const { return maPt; }
GetSize() const795 	const Size& 		GetSize() const { return maSz; }
796 };
797 
798 // ----------------------------
799 // - MetaBmpExScalePartAction -
800 // ----------------------------
801 
802 class VCL_DLLPUBLIC MetaBmpExScalePartAction : public MetaAction
803 {
804 private:
805 
806 	BitmapEx			maBmpEx;
807 	Point				maDstPt;
808 	Size				maDstSz;
809 	Point				maSrcPt;
810 	Size				maSrcSz;
811 
812 	virtual	sal_Bool	Compare( const MetaAction& ) const;
813 
814 public:
815 						DECL_META_ACTION( BmpExScalePart, META_BMPEXSCALEPART_ACTION )
816 
817 						MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
818 												  const Point& rSrcPt, const Size& rSrcSz,
819 												  const BitmapEx& rBmpEx );
820 
821 	virtual void		Move( long nHorzMove, long nVertMove );
822 	virtual void		Scale( double fScaleX, double fScaleY );
823 
GetBitmapEx() const824 	const BitmapEx& 	GetBitmapEx() const { return maBmpEx; }
GetDestPoint() const825 	const Point&		GetDestPoint() const { return maDstPt; }
GetDestSize() const826 	const Size& 		GetDestSize() const { return maDstSz; }
GetSrcPoint() const827 	const Point&		GetSrcPoint() const { return maSrcPt; }
GetSrcSize() const828 	const Size& 		GetSrcSize() const { return maSrcSz; }
829 };
830 
831 // ------------------
832 // - MetaMaskAction -
833 // ------------------
834 
835 class VCL_DLLPUBLIC MetaMaskAction : public MetaAction
836 {
837 private:
838 
839 	Bitmap				maBmp;
840 	Color				maColor;
841 	Point				maPt;
842 
843 	virtual	sal_Bool	Compare( const MetaAction& ) const;
844 
845 public:
846 						DECL_META_ACTION( Mask, META_MASK_ACTION )
847 
848 						MetaMaskAction( const Point& rPt,
849 										const Bitmap& rBmp,
850 										const Color& rColor );
851 
852 	virtual void		Move( long nHorzMove, long nVertMove );
853 	virtual void		Scale( double fScaleX, double fScaleY );
854 
GetBitmap() const855 	const Bitmap&		GetBitmap() const { return maBmp; }
GetColor() const856 	const Color&		GetColor() const { return maColor; }
GetPoint() const857 	const Point&		GetPoint() const { return maPt; }
858 };
859 
860 // -----------------------
861 // - MetaMaskScaleAction -
862 // -----------------------
863 
864 class VCL_DLLPUBLIC MetaMaskScaleAction : public MetaAction
865 {
866 private:
867 
868 	Bitmap				maBmp;
869 	Color				maColor;
870 	Point				maPt;
871 	Size				maSz;
872 
873 	virtual	sal_Bool	Compare( const MetaAction& ) const;
874 
875 public:
876 						DECL_META_ACTION( MaskScale, META_MASKSCALE_ACTION )
877 
878 						MetaMaskScaleAction( const Point& rPt, const Size& rSz,
879 											 const Bitmap& rBmp,
880 											 const Color& rColor );
881 
882 	virtual void		Move( long nHorzMove, long nVertMove );
883 	virtual void		Scale( double fScaleX, double fScaleY );
884 
GetBitmap() const885 	const Bitmap&		GetBitmap() const { return maBmp; }
GetColor() const886 	const Color&		GetColor() const { return maColor; }
GetPoint() const887 	const Point&		GetPoint() const { return maPt; }
GetSize() const888 	const Size& 		GetSize() const { return maSz; }
889 };
890 
891 // ---------------------------
892 // - MetaMaskScalePartAction -
893 // ---------------------------
894 
895 class VCL_DLLPUBLIC MetaMaskScalePartAction : public MetaAction
896 {
897 private:
898 
899 	Bitmap				maBmp;
900 	Color				maColor;
901 	Point				maDstPt;
902 	Size				maDstSz;
903 	Point				maSrcPt;
904 	Size				maSrcSz;
905 
906 	virtual	sal_Bool	Compare( const MetaAction& ) const;
907 
908 public:
909 						DECL_META_ACTION( MaskScalePart, META_MASKSCALEPART_ACTION )
910 
911 						MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz,
912 												 const Point& rSrcPt, const Size& rSrcSz,
913 												 const Bitmap& rBmp,
914 												 const Color& rColor );
915 
916 	virtual void		Move( long nHorzMove, long nVertMove );
917 	virtual void		Scale( double fScaleX, double fScaleY );
918 
GetBitmap() const919 	const Bitmap&		GetBitmap() const { return maBmp; }
GetColor() const920 	const Color&		GetColor() const { return maColor; }
GetDestPoint() const921 	const Point&		GetDestPoint() const { return maDstPt; }
GetDestSize() const922 	const Size& 		GetDestSize() const { return maDstSz; }
GetSrcPoint() const923 	const Point&		GetSrcPoint() const { return maSrcPt; }
GetSrcSize() const924 	const Size& 		GetSrcSize() const { return maSrcSz; }
925 };
926 
927 // ----------------------
928 // - MetaGradientAction -
929 // ----------------------
930 
931 class VCL_DLLPUBLIC MetaGradientAction : public MetaAction
932 {
933 private:
934 
935 	Rectangle			maRect;
936 	Gradient			maGradient;
937 
938 	virtual	sal_Bool	Compare( const MetaAction& ) const;
939 
940 public:
941 						DECL_META_ACTION( Gradient, META_GRADIENT_ACTION )
942 
943 						MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient );
944 
945 	virtual void		Move( long nHorzMove, long nVertMove );
946 	virtual void		Scale( double fScaleX, double fScaleY );
947 
GetRect() const948 	const Rectangle&	GetRect() const { return maRect; }
GetGradient() const949 	const Gradient& 	GetGradient() const { return maGradient; }
950 };
951 
952 // ------------------------
953 // - MetaGradientExAction -
954 // ------------------------
955 
956 class VCL_DLLPUBLIC MetaGradientExAction : public MetaAction
957 {
958 private:
959 
960 	PolyPolygon 		maPolyPoly;
961 	Gradient			maGradient;
962 
963 	virtual	sal_Bool	Compare( const MetaAction& ) const;
964 
965 public:
966 						DECL_META_ACTION( GradientEx, META_GRADIENTEX_ACTION )
967 
968 						MetaGradientExAction( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
969 
970 	virtual void		Move( long nHorzMove, long nVertMove );
971 	virtual void		Scale( double fScaleX, double fScaleY );
972 
GetPolyPolygon() const973 	const PolyPolygon&	GetPolyPolygon() const { return maPolyPoly; }
GetGradient() const974 	const Gradient& 	GetGradient() const { return maGradient; }
975 };
976 
977 // -------------------
978 // - MetaHatchAction -
979 // -------------------
980 
981 class VCL_DLLPUBLIC MetaHatchAction : public MetaAction
982 {
983 private:
984 
985 	PolyPolygon 		maPolyPoly;
986 	Hatch				maHatch;
987 
988 	virtual	sal_Bool	Compare( const MetaAction& ) const;
989 
990 public:
991 						DECL_META_ACTION( Hatch, META_HATCH_ACTION )
992 
993 						MetaHatchAction( const PolyPolygon& rPolyPoly, const Hatch& rHatch );
994 
995 	virtual void		Move( long nHorzMove, long nVertMove );
996 	virtual void		Scale( double fScaleX, double fScaleY );
997 
GetPolyPolygon() const998 	const PolyPolygon&	GetPolyPolygon() const { return maPolyPoly; }
GetHatch() const999 	const Hatch&		GetHatch() const { return maHatch; }
1000 };
1001 
1002 // -----------------------
1003 // - MetaWallpaperAction -
1004 // -----------------------
1005 
1006 class VCL_DLLPUBLIC MetaWallpaperAction : public MetaAction
1007 {
1008 private:
1009 
1010 	Rectangle			maRect;
1011 	Wallpaper			maWallpaper;
1012 
1013 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1014 
1015 public:
1016 						DECL_META_ACTION( Wallpaper, META_WALLPAPER_ACTION )
1017 
1018 						MetaWallpaperAction( const Rectangle& rRect,
1019 											 const Wallpaper& rPaper );
1020 
1021 	virtual void		Move( long nHorzMove, long nVertMove );
1022 	virtual void		Scale( double fScaleX, double fScaleY );
1023 
GetRect() const1024 	const Rectangle&	GetRect() const { return maRect; }
GetWallpaper() const1025 	const Wallpaper&	GetWallpaper() const { return maWallpaper; }
1026 };
1027 
1028 // ------------------------
1029 // - MetaClipRegionAction -
1030 // ------------------------
1031 
1032 class VCL_DLLPUBLIC MetaClipRegionAction : public MetaAction
1033 {
1034 private:
1035 
1036 	Region				maRegion;
1037 	sal_Bool				mbClip;
1038 
1039 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1040 
1041 public:
1042 						DECL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION )
1043 
1044 						MetaClipRegionAction( const Region& rRegion, sal_Bool bClip );
1045 
1046 	virtual void		Move( long nHorzMove, long nVertMove );
1047 	virtual void		Scale( double fScaleX, double fScaleY );
1048 
GetRegion() const1049 	const Region&		GetRegion() const { return maRegion; }
IsClipping() const1050 	sal_Bool				IsClipping() const { return mbClip; }
1051 };
1052 
1053 // ---------------------------------
1054 // - MetaISectRectClipRegionAction -
1055 // ---------------------------------
1056 
1057 class VCL_DLLPUBLIC MetaISectRectClipRegionAction : public MetaAction
1058 {
1059 private:
1060 
1061 	Rectangle			maRect;
1062 
1063 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1064 
1065 public:
1066 						DECL_META_ACTION( ISectRectClipRegion, META_ISECTRECTCLIPREGION_ACTION )
1067 
1068 	explicit			MetaISectRectClipRegionAction( const Rectangle& );
1069 
1070 	virtual void		Move( long nHorzMove, long nVertMove );
1071 	virtual void		Scale( double fScaleX, double fScaleY );
1072 
GetRect() const1073 	const Rectangle&	GetRect() const { return maRect; }
1074 };
1075 
1076 // -----------------------------------
1077 // - MetaISectRegionClipRegionAction -
1078 // -----------------------------------
1079 
1080 class VCL_DLLPUBLIC MetaISectRegionClipRegionAction : public MetaAction
1081 {
1082 private:
1083 
1084 	Region				maRegion;
1085 
1086 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1087 
1088 public:
1089 						DECL_META_ACTION( ISectRegionClipRegion, META_ISECTREGIONCLIPREGION_ACTION )
1090 
1091 	explicit			MetaISectRegionClipRegionAction( const Region& );
1092 
1093 	virtual void		Move( long nHorzMove, long nVertMove );
1094 	virtual void		Scale( double fScaleX, double fScaleY );
1095 
GetRegion() const1096 	const Region&		GetRegion() const { return maRegion; }
1097 };
1098 
1099 // ----------------------------
1100 // - MetaMoveClipRegionAction -
1101 // ----------------------------
1102 
1103 class VCL_DLLPUBLIC MetaMoveClipRegionAction : public MetaAction
1104 {
1105 private:
1106 
1107 	long				mnHorzMove;
1108 	long				mnVertMove;
1109 
1110 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1111 
1112 public:
1113 						DECL_META_ACTION( MoveClipRegion, META_MOVECLIPREGION_ACTION )
1114 
1115 						MetaMoveClipRegionAction( long nHorzMove, long nVertMove );
1116 
1117 	virtual void		Scale( double fScaleX, double fScaleY );
1118 
GetHorzMove() const1119 	long				GetHorzMove() const { return mnHorzMove; }
GetVertMove() const1120 	long				GetVertMove() const { return mnVertMove; }
1121 };
1122 
1123 // -----------------------
1124 // - MetaLineColorAction -
1125 // -----------------------
1126 
1127 class VCL_DLLPUBLIC MetaLineColorAction : public MetaAction
1128 {
1129 private:
1130 
1131 	Color				maColor;
1132 	sal_Bool				mbSet;
1133 
1134 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1135 
1136 public:
1137 						DECL_META_ACTION( LineColor, META_LINECOLOR_ACTION )
1138 
1139 						MetaLineColorAction( const Color& rColor, sal_Bool bSet );
1140 
GetColor() const1141 	const Color&		GetColor() const { return maColor; }
IsSetting() const1142 	sal_Bool				IsSetting() const { return mbSet; }
1143 };
1144 
1145 // -----------------------
1146 // - MetaFillColorAction -
1147 // -----------------------
1148 
1149 class VCL_DLLPUBLIC MetaFillColorAction : public MetaAction
1150 {
1151 private:
1152 
1153 	Color				maColor;
1154 	sal_Bool				mbSet;
1155 
1156 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1157 
1158 public:
1159 						DECL_META_ACTION( FillColor, META_FILLCOLOR_ACTION )
1160 
1161 						MetaFillColorAction( const Color& rColor, sal_Bool bSet );
1162 
GetColor() const1163 	const Color&		GetColor() const { return maColor; }
IsSetting() const1164 	sal_Bool				IsSetting() const { return mbSet; }
1165 };
1166 
1167 // -----------------------
1168 // - MetaTextColorAction -
1169 // -----------------------
1170 
1171 class VCL_DLLPUBLIC MetaTextColorAction : public MetaAction
1172 {
1173 private:
1174 
1175 	Color				maColor;
1176 
1177 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1178 
1179 public:
1180 						DECL_META_ACTION( TextColor, META_TEXTCOLOR_ACTION )
1181 
1182 	explicit			MetaTextColorAction( const Color& );
1183 
GetColor() const1184 	const Color&		GetColor() const { return maColor; }
1185 };
1186 
1187 // ---------------------------
1188 // - MetaTextFillColorAction -
1189 // ---------------------------
1190 
1191 class VCL_DLLPUBLIC MetaTextFillColorAction : public MetaAction
1192 {
1193 private:
1194 
1195 	Color				maColor;
1196 	sal_Bool				mbSet;
1197 
1198 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1199 
1200 public:
1201 						DECL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION )
1202 
1203 						MetaTextFillColorAction( const Color& rColor, sal_Bool bSet );
1204 
GetColor() const1205 	const Color&		GetColor() const { return maColor; }
IsSetting() const1206 	sal_Bool				IsSetting() const { return mbSet; }
1207 };
1208 
1209 // ---------------------------
1210 // - MetaTextLineColorAction -
1211 // ---------------------------
1212 
1213 class VCL_DLLPUBLIC MetaTextLineColorAction : public MetaAction
1214 {
1215 private:
1216 
1217 	Color				maColor;
1218 	sal_Bool				mbSet;
1219 
1220 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1221 
1222 public:
1223 						DECL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION )
1224 
1225 						MetaTextLineColorAction( const Color& rColor, sal_Bool bSet );
1226 
GetColor() const1227 	const Color&		GetColor() const { return maColor; }
IsSetting() const1228 	sal_Bool				IsSetting() const { return mbSet; }
1229 };
1230 
1231 // ---------------------------
1232 // - MetaOverlineColorAction -
1233 // ---------------------------
1234 
1235 class VCL_DLLPUBLIC MetaOverlineColorAction : public MetaAction
1236 {
1237 private:
1238 
1239 	Color				maColor;
1240 	sal_Bool				mbSet;
1241 
1242 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1243 
1244 public:
1245 						DECL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION )
1246 
1247 						MetaOverlineColorAction( const Color& rColor, sal_Bool bSet );
1248 
GetColor() const1249 	const Color&		GetColor() const { return maColor; }
IsSetting() const1250 	sal_Bool				IsSetting() const { return mbSet; }
1251 };
1252 
1253 // -----------------------
1254 // - MetaTextAlignAction -
1255 // -----------------------
1256 
1257 class VCL_DLLPUBLIC MetaTextAlignAction : public MetaAction
1258 {
1259 private:
1260 
1261 	TextAlign			maAlign;
1262 
1263 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1264 
1265 public:
1266 						DECL_META_ACTION( TextAlign, META_TEXTALIGN_ACTION )
1267 
1268 	explicit			MetaTextAlignAction( TextAlign eAlign );
1269 
GetTextAlign() const1270 	TextAlign			GetTextAlign() const { return maAlign; }
1271 };
1272 
1273 // ---------------------
1274 // - MetaMapModeAction -
1275 // ---------------------
1276 
1277 class VCL_DLLPUBLIC MetaMapModeAction : public MetaAction
1278 {
1279 private:
1280 
1281 	MapMode 			maMapMode;
1282 
1283 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1284 
1285 public:
1286 						DECL_META_ACTION( MapMode, META_MAPMODE_ACTION )
1287 
1288 	explicit			MetaMapModeAction( const MapMode& );
1289 
1290 	virtual void		Scale( double fScaleX, double fScaleY );
1291 
GetMapMode() const1292 	const MapMode&		GetMapMode() const { return maMapMode; }
1293 };
1294 
1295 // ---------------------
1296 // - MetaFontAction -
1297 // ---------------------
1298 
1299 class VCL_DLLPUBLIC MetaFontAction : public MetaAction
1300 {
1301 private:
1302 
1303 	Font				maFont;
1304 
1305 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1306 
1307 public:
1308 						DECL_META_ACTION( Font, META_FONT_ACTION )
1309 
1310 	explicit			MetaFontAction( const Font& );
1311 
1312 	virtual void		Scale( double fScaleX, double fScaleY );
1313 
GetFont() const1314 	const Font& 		GetFont() const { return maFont; }
1315 };
1316 
1317 // ------------------
1318 // - MetaPushAction -
1319 // ------------------
1320 
1321 class VCL_DLLPUBLIC MetaPushAction : public MetaAction
1322 {
1323 private:
1324 
1325 	sal_uInt16				mnFlags;
1326 
1327 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1328 
1329 public:
1330 						DECL_META_ACTION( Push, META_PUSH_ACTION )
1331 
1332 	explicit			MetaPushAction( sal_uInt16 nFlags );
1333 
GetFlags() const1334 	sal_uInt16				GetFlags() const { return mnFlags; }
1335 };
1336 
1337 // -----------------
1338 // - MetaPopAction -
1339 // -----------------
1340 
1341 class VCL_DLLPUBLIC MetaPopAction : public MetaAction
1342 {
1343 public:
1344 
1345 		DECL_META_ACTION( Pop, META_POP_ACTION )
1346 };
1347 
1348 // ----------------------
1349 // - MetaRasterOpAction -
1350 // ----------------------
1351 
1352 class VCL_DLLPUBLIC MetaRasterOpAction : public MetaAction
1353 {
1354 private:
1355 
1356 	RasterOp			meRasterOp;
1357 
1358 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1359 
1360 public:
1361 						DECL_META_ACTION( RasterOp, META_RASTEROP_ACTION )
1362 
1363 	explicit			MetaRasterOpAction( RasterOp eRasterOp );
1364 
GetRasterOp() const1365 	RasterOp			GetRasterOp() const { return meRasterOp; }
1366 };
1367 
1368 // -------------------------
1369 // - MetaTransparentAction -
1370 // -------------------------
1371 
1372 class VCL_DLLPUBLIC MetaTransparentAction : public MetaAction
1373 {
1374 private:
1375 
1376 	PolyPolygon 		maPolyPoly;
1377 	sal_uInt16				mnTransPercent;
1378 
1379 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1380 
1381 public:
1382 						DECL_META_ACTION( Transparent, META_TRANSPARENT_ACTION )
1383 
1384 						MetaTransparentAction( const PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent );
1385 
1386 	virtual void		Move( long nHorzMove, long nVertMove );
1387 	virtual void		Scale( double fScaleX, double fScaleY );
1388 
GetPolyPolygon() const1389 	const PolyPolygon&	GetPolyPolygon() const { return maPolyPoly; }
GetTransparence() const1390 	sal_uInt16				GetTransparence() const { return mnTransPercent; }
1391 };
1392 
1393 // ------------------------------
1394 // - MetaFloatTransparentAction -
1395 // ------------------------------
1396 
1397 class VCL_DLLPUBLIC MetaFloatTransparentAction : public MetaAction
1398 {
1399 private:
1400 
1401 	GDIMetaFile 		maMtf;
1402 	Point				maPoint;
1403 	Size				maSize;
1404 	Gradient			maGradient;
1405 
1406 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1407 
1408 public:
1409 						DECL_META_ACTION( FloatTransparent, META_FLOATTRANSPARENT_ACTION )
1410 
1411 						MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
1412 													const Size& rSize, const Gradient& rGradient );
1413 
1414 	virtual void		Move( long nHorzMove, long nVertMove );
1415 	virtual void		Scale( double fScaleX, double fScaleY );
1416 
GetGDIMetaFile() const1417 	const GDIMetaFile&	GetGDIMetaFile() const { return maMtf; }
GetPoint() const1418 	const Point&		GetPoint() const { return maPoint; }
GetSize() const1419 	const Size& 		GetSize() const { return maSize; }
GetGradient() const1420 	const Gradient& 	GetGradient() const { return maGradient; }
1421 };
1422 
1423 // ---------------------
1424 // - MetaDrawEPSAction -
1425 // ---------------------
1426 
1427 class VCL_DLLPUBLIC MetaEPSAction : public MetaAction
1428 {
1429 private:
1430 
1431 	GfxLink 			maGfxLink;
1432 	GDIMetaFile 		maSubst;
1433 	Point				maPoint;
1434 	Size				maSize;
1435 
1436 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1437 
1438 public:
1439 						DECL_META_ACTION( EPS, META_EPS_ACTION )
1440 
1441 						MetaEPSAction( const Point& rPoint, const Size& rSize,
1442 									   const GfxLink& rGfxLink, const GDIMetaFile& rSubst );
1443 
1444 	virtual void		Move( long nHorzMove, long nVertMove );
1445 	virtual void		Scale( double fScaleX, double fScaleY );
1446 
GetLink() const1447 	const GfxLink&		GetLink() const { return maGfxLink; }
GetSubstitute() const1448 	const GDIMetaFile&	GetSubstitute() const { return maSubst; }
GetPoint() const1449 	const Point&		GetPoint() const { return maPoint; }
GetSize() const1450 	const Size& 		GetSize() const { return maSize; }
1451 };
1452 
1453 // ----------------------
1454 // - MetaRefPointAction -
1455 // ----------------------
1456 
1457 class VCL_DLLPUBLIC MetaRefPointAction : public MetaAction
1458 {
1459 private:
1460 
1461 	Point				maRefPoint;
1462 	sal_Bool				mbSet;
1463 
1464 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1465 
1466 public:
1467 						DECL_META_ACTION( RefPoint, META_REFPOINT_ACTION )
1468 
1469 						MetaRefPointAction( const Point& rRefPoint, sal_Bool bSet );
1470 
GetRefPoint() const1471 	const Point&		GetRefPoint() const { return maRefPoint; }
IsSetting() const1472 	sal_Bool				IsSetting() const { return mbSet; }
1473 };
1474 
1475 // ---------------------
1476 // - MetaCommentAction -
1477 // ---------------------
1478 
1479 class VCL_DLLPUBLIC MetaCommentAction : public MetaAction
1480 {
1481 private:
1482 
1483 	ByteString			maComment;
1484 	sal_Int32			mnValue;
1485 	sal_uInt32			mnDataSize;
1486 	sal_uInt8*				mpData;
1487 
1488 	SAL_DLLPRIVATE void	ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize );
1489 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1490 
1491 protected:
1492 	virtual				~MetaCommentAction();
1493 
1494 public:
1495 	explicit			MetaCommentAction( sal_Int32 nValue = 0L );
1496 	explicit			MetaCommentAction( const MetaCommentAction& );
1497 	explicit			MetaCommentAction( const ByteString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = NULL, sal_uInt32 nDataSize = 0UL );
1498 	explicit			MetaCommentAction( const sal_uInt8* pData, sal_uInt32 nDataSize );
1499 
1500 	virtual void		Move( long nHorzMove, long nVertMove );
1501 	virtual void		Scale( double fScaleX, double fScaleY );
1502 
1503 	virtual void		Execute( OutputDevice* pOut );
1504 	virtual MetaAction* Clone();
1505 	virtual void		Write( SvStream& rOStm, ImplMetaWriteData* pData );
1506 	virtual void		Read( SvStream& rIStm, ImplMetaReadData* pData );
1507 
GetComment() const1508 	const ByteString&	GetComment() const { return maComment; }
GetValue() const1509 	sal_Int32			GetValue() const { return mnValue; }
GetDataSize() const1510 	sal_uInt32			GetDataSize() const { return mnDataSize; }
GetData() const1511 	const sal_uInt8* 		GetData() const { return mpData; }
1512 };
1513 
1514 // ------------------------
1515 // - MetaLayoutModeAction -
1516 // ------------------------
1517 
1518 class VCL_DLLPUBLIC MetaLayoutModeAction : public MetaAction
1519 {
1520 private:
1521 
1522     sal_uInt32 			mnLayoutMode;
1523 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1524 
1525 public:
1526 						DECL_META_ACTION( LayoutMode, META_LAYOUTMODE_ACTION )
1527 
1528 	explicit			MetaLayoutModeAction( sal_uInt32 nLayoutMode );
1529 
GetLayoutMode() const1530     sal_uInt32			GetLayoutMode() const { return mnLayoutMode; }
1531 };
1532 
1533 // ------------------------
1534 // - MetaTextLanguageAction -
1535 // ------------------------
1536 
1537 class VCL_DLLPUBLIC MetaTextLanguageAction : public MetaAction
1538 {
1539 private:
1540 
1541     LanguageType		meTextLanguage;
1542 	virtual	sal_Bool	Compare( const MetaAction& ) const;
1543 
1544 public:
1545 						DECL_META_ACTION( TextLanguage, META_TEXTLANGUAGE_ACTION )
1546 
1547 	explicit			MetaTextLanguageAction( LanguageType );
1548 
GetTextLanguage() const1549     LanguageType		GetTextLanguage() const { return meTextLanguage; }
1550 };
1551 
1552 #endif // _SV_METAACT_HXX
1553 
1554