Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / vcl / metaact.hxx
blob8fe4f1d43845e13097ba90d33ef05360ec5b028c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_METAACT_HXX
21 #define INCLUDED_VCL_METAACT_HXX
23 #include <memory>
24 #include <vcl/dllapi.h>
25 #include <vcl/gradient.hxx>
26 #include <vcl/hatch.hxx>
27 #include <vcl/wall.hxx>
28 #include <vcl/font.hxx>
29 #include <tools/poly.hxx>
30 #include <vcl/bitmap.hxx>
31 #include <vcl/bitmapex.hxx>
32 #include <vcl/region.hxx>
33 #include <vcl/graph.hxx>
34 #include <vcl/outdev.hxx>
35 #include <vcl/gdimtf.hxx>
36 #include <vcl/gfxlink.hxx>
37 #include <vcl/lineinfo.hxx>
38 #include <vcl/metaactiontypes.hxx>
39 #include <vcl/outdevstate.hxx>
41 class SvStream;
42 enum class DrawTextFlags;
44 struct ImplMetaReadData
46 rtl_TextEncoding meActualCharSet;
48 ImplMetaReadData() :
49 meActualCharSet( RTL_TEXTENCODING_ASCII_US )
53 struct ImplMetaWriteData
55 rtl_TextEncoding meActualCharSet;
57 ImplMetaWriteData() :
58 meActualCharSet( RTL_TEXTENCODING_ASCII_US )
62 class VCL_DLLPUBLIC MetaAction
64 private:
65 sal_uLong mnRefCount;
66 MetaActionType mnType;
68 protected:
69 virtual ~MetaAction();
71 public:
72 MetaAction();
73 explicit MetaAction( MetaActionType nType );
75 virtual void Execute( OutputDevice* pOut );
77 virtual MetaAction* Clone();
79 virtual void Move( long nHorzMove, long nVertMove );
80 virtual void Scale( double fScaleX, double fScaleY );
82 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
83 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
85 MetaActionType GetType() const { return mnType; }
86 sal_uLong GetRefCount() const { return mnRefCount; }
87 void ResetRefCount() { mnRefCount = 1; }
88 void Duplicate() { mnRefCount++; }
89 void Delete() { if ( 0 == --mnRefCount ) delete this; }
91 public:
92 static MetaAction* ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData );
95 class VCL_DLLPUBLIC MetaPixelAction : public MetaAction
97 private:
98 Point maPt;
99 Color maColor;
101 public:
102 MetaPixelAction();
103 protected:
104 virtual ~MetaPixelAction() override;
105 public:
106 virtual void Execute( OutputDevice* pOut ) override;
107 virtual MetaAction* Clone() override;
108 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
109 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
111 MetaPixelAction( const Point& rPt, const Color& rColor );
113 virtual void Move( long nHorzMove, long nVertMove ) override;
114 virtual void Scale( double fScaleX, double fScaleY ) override;
116 const Point& GetPoint() const { return maPt; }
117 const Color& GetColor() const { return maColor; }
120 class VCL_DLLPUBLIC MetaPointAction : public MetaAction
122 private:
123 Point maPt;
125 public:
126 MetaPointAction();
127 protected:
128 virtual ~MetaPointAction() override;
129 public:
130 virtual void Execute( OutputDevice* pOut ) override;
131 virtual MetaAction* Clone() override;
132 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
133 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
135 explicit MetaPointAction( const Point& );
137 virtual void Move( long nHorzMove, long nVertMove ) override;
138 virtual void Scale( double fScaleX, double fScaleY ) override;
140 const Point& GetPoint() const { return maPt; }
143 class VCL_DLLPUBLIC MetaLineAction : public MetaAction
145 private:
147 LineInfo maLineInfo;
148 Point maStartPt;
149 Point maEndPt;
151 public:
152 MetaLineAction();
153 protected:
154 virtual ~MetaLineAction() override;
155 public:
156 virtual void Execute( OutputDevice* pOut ) override;
157 virtual MetaAction* Clone() override;
158 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
159 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
161 MetaLineAction( const Point& rStart, const Point& rEnd );
162 MetaLineAction( const Point& rStart, const Point& rEnd,
163 const LineInfo& rLineInfo );
165 virtual void Move( long nHorzMove, long nVertMove ) override;
166 virtual void Scale( double fScaleX, double fScaleY ) override;
168 const Point& GetStartPoint() const { return maStartPt; }
169 const Point& GetEndPoint() const { return maEndPt; }
170 const LineInfo& GetLineInfo() const { return maLineInfo; }
173 class VCL_DLLPUBLIC MetaRectAction : public MetaAction
175 private:
177 tools::Rectangle maRect;
179 public:
180 MetaRectAction();
181 protected:
182 virtual ~MetaRectAction() override;
183 public:
184 virtual void Execute( OutputDevice* pOut ) override;
185 virtual MetaAction* Clone() override;
186 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
187 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
189 explicit MetaRectAction( const tools::Rectangle& );
191 virtual void Move( long nHorzMove, long nVertMove ) override;
192 virtual void Scale( double fScaleX, double fScaleY ) override;
194 const tools::Rectangle& GetRect() const { return maRect; }
197 class VCL_DLLPUBLIC MetaRoundRectAction : public MetaAction
199 private:
201 tools::Rectangle maRect;
202 sal_uInt32 mnHorzRound;
203 sal_uInt32 mnVertRound;
205 public:
206 MetaRoundRectAction();
207 protected:
208 virtual ~MetaRoundRectAction() override;
209 public:
210 virtual void Execute( OutputDevice* pOut ) override;
211 virtual MetaAction* Clone() override;
212 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
213 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
215 MetaRoundRectAction( const tools::Rectangle& rRect,
216 sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
218 virtual void Move( long nHorzMove, long nVertMove ) override;
219 virtual void Scale( double fScaleX, double fScaleY ) override;
221 const tools::Rectangle& GetRect() const { return maRect; }
222 sal_uInt32 GetHorzRound() const { return mnHorzRound; }
223 sal_uInt32 GetVertRound() const { return mnVertRound; }
226 class VCL_DLLPUBLIC MetaEllipseAction : public MetaAction
228 private:
230 tools::Rectangle maRect;
232 public:
233 MetaEllipseAction();
234 protected:
235 virtual ~MetaEllipseAction() override;
236 public:
237 virtual void Execute( OutputDevice* pOut ) override;
238 virtual MetaAction* Clone() override;
239 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
240 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
242 explicit MetaEllipseAction( const tools::Rectangle& );
244 virtual void Move( long nHorzMove, long nVertMove ) override;
245 virtual void Scale( double fScaleX, double fScaleY ) override;
247 const tools::Rectangle& GetRect() const { return maRect; }
250 class VCL_DLLPUBLIC MetaArcAction : public MetaAction
252 private:
254 tools::Rectangle maRect;
255 Point maStartPt;
256 Point maEndPt;
258 public:
259 MetaArcAction();
260 protected:
261 virtual ~MetaArcAction() override;
262 public:
263 virtual void Execute( OutputDevice* pOut ) override;
264 virtual MetaAction* Clone() override;
265 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
266 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
268 MetaArcAction( const tools::Rectangle& rRect,
269 const Point& rStart, const Point& rEnd );
271 virtual void Move( long nHorzMove, long nVertMove ) override;
272 virtual void Scale( double fScaleX, double fScaleY ) override;
274 const tools::Rectangle& GetRect() const { return maRect; }
275 const Point& GetStartPoint() const { return maStartPt; }
276 const Point& GetEndPoint() const { return maEndPt; }
279 class VCL_DLLPUBLIC MetaPieAction : public MetaAction
281 private:
283 tools::Rectangle maRect;
284 Point maStartPt;
285 Point maEndPt;
287 public:
288 MetaPieAction();
289 protected:
290 virtual ~MetaPieAction() override;
291 public:
292 virtual void Execute( OutputDevice* pOut ) override;
293 virtual MetaAction* Clone() override;
294 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
295 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
297 MetaPieAction( const tools::Rectangle& rRect,
298 const Point& rStart, const Point& rEnd );
300 virtual void Move( long nHorzMove, long nVertMove ) override;
301 virtual void Scale( double fScaleX, double fScaleY ) override;
303 const tools::Rectangle& GetRect() const { return maRect; }
304 const Point& GetStartPoint() const { return maStartPt; }
305 const Point& GetEndPoint() const { return maEndPt; }
308 class VCL_DLLPUBLIC MetaChordAction : public MetaAction
310 private:
312 tools::Rectangle maRect;
313 Point maStartPt;
314 Point maEndPt;
316 public:
317 MetaChordAction();
318 protected:
319 virtual ~MetaChordAction() override;
320 public:
321 virtual void Execute( OutputDevice* pOut ) override;
322 virtual MetaAction* Clone() override;
323 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
324 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
326 MetaChordAction( const tools::Rectangle& rRect,
327 const Point& rStart, const Point& rEnd );
329 virtual void Move( long nHorzMove, long nVertMove ) override;
330 virtual void Scale( double fScaleX, double fScaleY ) override;
332 const tools::Rectangle& GetRect() const { return maRect; }
333 const Point& GetStartPoint() const { return maStartPt; }
334 const Point& GetEndPoint() const { return maEndPt; }
337 class VCL_DLLPUBLIC MetaPolyLineAction : public MetaAction
339 private:
341 LineInfo maLineInfo;
342 tools::Polygon maPoly;
344 public:
345 MetaPolyLineAction();
346 protected:
347 virtual ~MetaPolyLineAction() override;
348 public:
349 virtual void Execute( OutputDevice* pOut ) override;
350 virtual MetaAction* Clone() override;
351 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
352 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
354 explicit MetaPolyLineAction( const tools::Polygon& );
355 explicit MetaPolyLineAction( const tools::Polygon&, const LineInfo& );
357 virtual void Move( long nHorzMove, long nVertMove ) override;
358 virtual void Scale( double fScaleX, double fScaleY ) override;
360 const tools::Polygon& GetPolygon() const { return maPoly; }
361 const LineInfo& GetLineInfo() const { return maLineInfo; }
364 class VCL_DLLPUBLIC MetaPolygonAction : public MetaAction
366 private:
368 tools::Polygon maPoly;
370 public:
371 MetaPolygonAction();
372 protected:
373 virtual ~MetaPolygonAction() override;
374 public:
375 virtual void Execute( OutputDevice* pOut ) override;
376 virtual MetaAction* Clone() override;
377 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
378 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
380 explicit MetaPolygonAction( const tools::Polygon& );
382 virtual void Move( long nHorzMove, long nVertMove ) override;
383 virtual void Scale( double fScaleX, double fScaleY ) override;
385 const tools::Polygon& GetPolygon() const { return maPoly; }
388 class VCL_DLLPUBLIC MetaPolyPolygonAction : public MetaAction
390 private:
392 tools::PolyPolygon maPolyPoly;
394 public:
395 MetaPolyPolygonAction();
396 protected:
397 virtual ~MetaPolyPolygonAction() override;
398 public:
399 virtual void Execute( OutputDevice* pOut ) override;
400 virtual MetaAction* Clone() override;
401 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
402 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
404 explicit MetaPolyPolygonAction( const tools::PolyPolygon& );
406 virtual void Move( long nHorzMove, long nVertMove ) override;
407 virtual void Scale( double fScaleX, double fScaleY ) override;
409 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
412 class VCL_DLLPUBLIC MetaTextAction : public MetaAction
414 private:
416 Point maPt;
417 OUString maStr;
418 sal_Int32 mnIndex;
419 sal_Int32 mnLen;
421 public:
422 MetaTextAction();
423 protected:
424 virtual ~MetaTextAction() override;
425 public:
426 virtual void Execute( OutputDevice* pOut ) override;
427 virtual MetaAction* Clone() override;
428 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
429 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
431 MetaTextAction( const Point& rPt, const OUString& rStr,
432 sal_Int32 nIndex, sal_Int32 nLen );
434 virtual void Move( long nHorzMove, long nVertMove ) override;
435 virtual void Scale( double fScaleX, double fScaleY ) override;
437 const Point& GetPoint() const { return maPt; }
438 const OUString& GetText() const { return maStr; }
439 sal_Int32 GetIndex() const { return mnIndex; }
440 sal_Int32 GetLen() const { return mnLen; }
443 class VCL_DLLPUBLIC MetaTextArrayAction : public MetaAction
445 private:
447 Point maStartPt;
448 OUString maStr;
449 std::unique_ptr<long[]>
450 mpDXAry;
451 sal_Int32 mnIndex;
452 sal_Int32 mnLen;
454 protected:
455 virtual ~MetaTextArrayAction() override;
457 public:
458 MetaTextArrayAction();
459 MetaTextArrayAction( const MetaTextArrayAction& rAction );
460 MetaTextArrayAction( const Point& rStartPt, const OUString& rStr,
461 const long* pDXAry, sal_Int32 nIndex,
462 sal_Int32 nLen );
464 virtual void Execute( OutputDevice* pOut ) override;
466 virtual MetaAction* Clone() override;
468 virtual void Move( long nHorzMove, long nVertMove ) override;
469 virtual void Scale( double fScaleX, double fScaleY ) override;
471 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
472 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
474 const Point& GetPoint() const { return maStartPt; }
475 const OUString& GetText() const { return maStr; }
476 sal_Int32 GetIndex() const { return mnIndex; }
477 sal_Int32 GetLen() const { return mnLen; }
478 long* GetDXArray() const { return mpDXAry.get(); }
481 class VCL_DLLPUBLIC MetaStretchTextAction : public MetaAction
483 private:
485 Point maPt;
486 OUString maStr;
487 sal_uInt32 mnWidth;
488 sal_Int32 mnIndex;
489 sal_Int32 mnLen;
491 public:
492 MetaStretchTextAction();
493 protected:
494 virtual ~MetaStretchTextAction() override;
495 public:
496 virtual void Execute( OutputDevice* pOut ) override;
497 virtual MetaAction* Clone() override;
498 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
499 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
501 MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
502 const OUString& rStr,
503 sal_Int32 nIndex, sal_Int32 nLen );
505 virtual void Move( long nHorzMove, long nVertMove ) override;
506 virtual void Scale( double fScaleX, double fScaleY ) override;
508 const Point& GetPoint() const { return maPt; }
509 const OUString& GetText() const { return maStr; }
510 sal_uInt32 GetWidth() const { return mnWidth; }
511 sal_Int32 GetIndex() const { return mnIndex; }
512 sal_Int32 GetLen() const { return mnLen; }
515 class VCL_DLLPUBLIC MetaTextRectAction : public MetaAction
517 private:
519 tools::Rectangle maRect;
520 OUString maStr;
521 DrawTextFlags mnStyle;
523 public:
524 MetaTextRectAction();
525 protected:
526 virtual ~MetaTextRectAction() override;
527 public:
528 virtual void Execute( OutputDevice* pOut ) override;
529 virtual MetaAction* Clone() override;
530 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
531 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
533 MetaTextRectAction( const tools::Rectangle& rRect,
534 const OUString& rStr, DrawTextFlags nStyle );
536 virtual void Move( long nHorzMove, long nVertMove ) override;
537 virtual void Scale( double fScaleX, double fScaleY ) override;
539 const tools::Rectangle& GetRect() const { return maRect; }
540 const OUString& GetText() const { return maStr; }
541 DrawTextFlags GetStyle() const { return mnStyle; }
544 class VCL_DLLPUBLIC MetaTextLineAction : public MetaAction
546 private:
548 Point maPos;
549 long mnWidth;
550 FontStrikeout meStrikeout;
551 FontLineStyle meUnderline;
552 FontLineStyle meOverline;
554 public:
555 MetaTextLineAction();
556 protected:
557 virtual ~MetaTextLineAction() override;
558 public:
559 virtual void Execute( OutputDevice* pOut ) override;
560 virtual MetaAction* Clone() override;
561 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
562 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
564 MetaTextLineAction( const Point& rPos, long nWidth,
565 FontStrikeout eStrikeout,
566 FontLineStyle eUnderline,
567 FontLineStyle eOverline );
568 virtual void Move( long nHorzMove, long nVertMove ) override;
569 virtual void Scale( double fScaleX, double fScaleY ) override;
571 const Point& GetStartPoint() const { return maPos; }
572 long GetWidth() const { return mnWidth; }
573 FontStrikeout GetStrikeout() const { return meStrikeout; }
574 FontLineStyle GetUnderline() const { return meUnderline; }
575 FontLineStyle GetOverline() const { return meOverline; }
578 class VCL_DLLPUBLIC MetaBmpAction : public MetaAction
580 private:
582 Bitmap maBmp;
583 Point maPt;
585 public:
586 MetaBmpAction();
587 protected:
588 virtual ~MetaBmpAction() override;
589 public:
590 virtual void Execute( OutputDevice* pOut ) override;
591 virtual MetaAction* Clone() override;
592 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
593 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
595 MetaBmpAction( const Point& rPt, const Bitmap& rBmp );
597 virtual void Move( long nHorzMove, long nVertMove ) override;
598 virtual void Scale( double fScaleX, double fScaleY ) override;
600 const Bitmap& GetBitmap() const { return maBmp; }
601 const Point& GetPoint() const { return maPt; }
604 class VCL_DLLPUBLIC MetaBmpScaleAction : public MetaAction
606 private:
608 Bitmap maBmp;
609 Point maPt;
610 Size maSz;
612 public:
613 MetaBmpScaleAction();
614 protected:
615 virtual ~MetaBmpScaleAction() override;
616 public:
617 virtual void Execute( OutputDevice* pOut ) override;
618 virtual MetaAction* Clone() override;
619 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
620 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
622 MetaBmpScaleAction( const Point& rPt, const Size& rSz,
623 const Bitmap& rBmp );
625 virtual void Move( long nHorzMove, long nVertMove ) override;
626 virtual void Scale( double fScaleX, double fScaleY ) override;
628 const Bitmap& GetBitmap() const { return maBmp; }
629 const Point& GetPoint() const { return maPt; }
630 const Size& GetSize() const { return maSz; }
633 class VCL_DLLPUBLIC MetaBmpScalePartAction : public MetaAction
635 private:
637 Bitmap maBmp;
638 Point maDstPt;
639 Size maDstSz;
640 Point maSrcPt;
641 Size maSrcSz;
643 public:
644 MetaBmpScalePartAction();
645 protected:
646 virtual ~MetaBmpScalePartAction() override;
647 public:
648 virtual void Execute( OutputDevice* pOut ) override;
649 virtual MetaAction* Clone() override;
650 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
651 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
653 MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
654 const Point& rSrcPt, const Size& rSrcSz,
655 const Bitmap& rBmp );
657 virtual void Move( long nHorzMove, long nVertMove ) override;
658 virtual void Scale( double fScaleX, double fScaleY ) override;
660 const Bitmap& GetBitmap() const { return maBmp; }
661 const Point& GetDestPoint() const { return maDstPt; }
662 const Size& GetDestSize() const { return maDstSz; }
663 const Point& GetSrcPoint() const { return maSrcPt; }
664 const Size& GetSrcSize() const { return maSrcSz; }
667 class VCL_DLLPUBLIC MetaBmpExAction : public MetaAction
669 private:
671 BitmapEx maBmpEx;
672 Point maPt;
674 public:
675 MetaBmpExAction();
676 protected:
677 virtual ~MetaBmpExAction() override;
678 public:
679 virtual void Execute( OutputDevice* pOut ) override;
680 virtual MetaAction* Clone() override;
681 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
682 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
684 MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx );
686 virtual void Move( long nHorzMove, long nVertMove ) override;
687 virtual void Scale( double fScaleX, double fScaleY ) override;
689 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
690 const Point& GetPoint() const { return maPt; }
693 class VCL_DLLPUBLIC MetaBmpExScaleAction : public MetaAction
695 private:
697 BitmapEx maBmpEx;
698 Point maPt;
699 Size maSz;
701 public:
702 MetaBmpExScaleAction();
703 protected:
704 virtual ~MetaBmpExScaleAction() override;
705 public:
706 virtual void Execute( OutputDevice* pOut ) override;
707 virtual MetaAction* Clone() override;
708 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
709 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
711 MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
712 const BitmapEx& rBmpEx ) ;
714 virtual void Move( long nHorzMove, long nVertMove ) override;
715 virtual void Scale( double fScaleX, double fScaleY ) override;
717 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
718 const Point& GetPoint() const { return maPt; }
719 const Size& GetSize() const { return maSz; }
722 class VCL_DLLPUBLIC MetaBmpExScalePartAction : public MetaAction
724 private:
726 BitmapEx maBmpEx;
727 Point maDstPt;
728 Size maDstSz;
729 Point maSrcPt;
730 Size maSrcSz;
732 public:
733 MetaBmpExScalePartAction();
734 protected:
735 virtual ~MetaBmpExScalePartAction() override;
736 public:
737 virtual void Execute( OutputDevice* pOut ) override;
738 virtual MetaAction* Clone() override;
739 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
740 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
742 MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
743 const Point& rSrcPt, const Size& rSrcSz,
744 const BitmapEx& rBmpEx );
746 virtual void Move( long nHorzMove, long nVertMove ) override;
747 virtual void Scale( double fScaleX, double fScaleY ) override;
749 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
750 const Point& GetDestPoint() const { return maDstPt; }
751 const Size& GetDestSize() const { return maDstSz; }
752 const Point& GetSrcPoint() const { return maSrcPt; }
753 const Size& GetSrcSize() const { return maSrcSz; }
756 class VCL_DLLPUBLIC MetaMaskAction : public MetaAction
758 private:
760 Bitmap maBmp;
761 Color maColor;
762 Point maPt;
764 public:
765 MetaMaskAction();
766 protected:
767 virtual ~MetaMaskAction() override;
768 public:
769 virtual void Execute( OutputDevice* pOut ) override;
770 virtual MetaAction* Clone() override;
771 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
772 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
774 MetaMaskAction( const Point& rPt,
775 const Bitmap& rBmp,
776 const Color& rColor );
778 virtual void Move( long nHorzMove, long nVertMove ) override;
779 virtual void Scale( double fScaleX, double fScaleY ) override;
781 const Bitmap& GetBitmap() const { return maBmp; }
782 const Color& GetColor() const { return maColor; }
783 const Point& GetPoint() const { return maPt; }
786 class VCL_DLLPUBLIC MetaMaskScaleAction : public MetaAction
788 private:
790 Bitmap maBmp;
791 Color maColor;
792 Point maPt;
793 Size maSz;
795 public:
796 MetaMaskScaleAction();
797 protected:
798 virtual ~MetaMaskScaleAction() override;
799 public:
800 virtual void Execute( OutputDevice* pOut ) override;
801 virtual MetaAction* Clone() override;
802 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
803 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
805 MetaMaskScaleAction( const Point& rPt, const Size& rSz,
806 const Bitmap& rBmp,
807 const Color& rColor );
809 virtual void Move( long nHorzMove, long nVertMove ) override;
810 virtual void Scale( double fScaleX, double fScaleY ) override;
812 const Bitmap& GetBitmap() const { return maBmp; }
813 const Color& GetColor() const { return maColor; }
814 const Point& GetPoint() const { return maPt; }
815 const Size& GetSize() const { return maSz; }
818 class VCL_DLLPUBLIC MetaMaskScalePartAction : public MetaAction
820 private:
822 Bitmap maBmp;
823 Color maColor;
824 Point maDstPt;
825 Size maDstSz;
826 Point maSrcPt;
827 Size maSrcSz;
829 public:
830 MetaMaskScalePartAction();
831 protected:
832 virtual ~MetaMaskScalePartAction() override;
833 public:
834 virtual void Execute( OutputDevice* pOut ) override;
835 virtual MetaAction* Clone() override;
836 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
837 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
839 MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz,
840 const Point& rSrcPt, const Size& rSrcSz,
841 const Bitmap& rBmp,
842 const Color& rColor );
844 virtual void Move( long nHorzMove, long nVertMove ) override;
845 virtual void Scale( double fScaleX, double fScaleY ) override;
847 const Bitmap& GetBitmap() const { return maBmp; }
848 const Color& GetColor() const { return maColor; }
849 const Point& GetDestPoint() const { return maDstPt; }
850 const Size& GetDestSize() const { return maDstSz; }
851 const Point& GetSrcPoint() const { return maSrcPt; }
852 const Size& GetSrcSize() const { return maSrcSz; }
855 class VCL_DLLPUBLIC MetaGradientAction : public MetaAction
857 private:
859 tools::Rectangle maRect;
860 Gradient maGradient;
862 public:
863 MetaGradientAction();
864 protected:
865 virtual ~MetaGradientAction() override;
866 public:
867 virtual void Execute( OutputDevice* pOut ) override;
868 virtual MetaAction* Clone() override;
869 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
870 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
872 MetaGradientAction( const tools::Rectangle& rRect, const Gradient& rGradient );
874 virtual void Move( long nHorzMove, long nVertMove ) override;
875 virtual void Scale( double fScaleX, double fScaleY ) override;
877 const tools::Rectangle& GetRect() const { return maRect; }
878 const Gradient& GetGradient() const { return maGradient; }
881 class VCL_DLLPUBLIC MetaGradientExAction : public MetaAction
883 private:
885 tools::PolyPolygon maPolyPoly;
886 Gradient maGradient;
888 public:
889 MetaGradientExAction();
890 protected:
891 virtual ~MetaGradientExAction() override;
892 public:
893 virtual void Execute( OutputDevice* pOut ) override;
894 virtual MetaAction* Clone() override;
895 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
896 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
898 MetaGradientExAction( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
900 virtual void Move( long nHorzMove, long nVertMove ) override;
901 virtual void Scale( double fScaleX, double fScaleY ) override;
903 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
904 const Gradient& GetGradient() const { return maGradient; }
907 class VCL_DLLPUBLIC MetaHatchAction : public MetaAction
909 private:
911 tools::PolyPolygon maPolyPoly;
912 Hatch maHatch;
914 public:
915 MetaHatchAction();
916 protected:
917 virtual ~MetaHatchAction() override;
918 public:
919 virtual void Execute( OutputDevice* pOut ) override;
920 virtual MetaAction* Clone() override;
921 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
922 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
924 MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
926 virtual void Move( long nHorzMove, long nVertMove ) override;
927 virtual void Scale( double fScaleX, double fScaleY ) override;
929 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
930 const Hatch& GetHatch() const { return maHatch; }
933 class VCL_DLLPUBLIC MetaWallpaperAction : public MetaAction
935 private:
937 tools::Rectangle maRect;
938 Wallpaper maWallpaper;
940 public:
941 MetaWallpaperAction();
942 protected:
943 virtual ~MetaWallpaperAction() override;
944 public:
945 virtual void Execute( OutputDevice* pOut ) override;
946 virtual MetaAction* Clone() override;
947 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
948 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
950 MetaWallpaperAction( const tools::Rectangle& rRect,
951 const Wallpaper& rPaper );
953 virtual void Move( long nHorzMove, long nVertMove ) override;
954 virtual void Scale( double fScaleX, double fScaleY ) override;
956 const tools::Rectangle& GetRect() const { return maRect; }
957 const Wallpaper& GetWallpaper() const { return maWallpaper; }
960 class VCL_DLLPUBLIC MetaClipRegionAction : public MetaAction
962 private:
964 vcl::Region maRegion;
965 bool mbClip;
967 public:
968 MetaClipRegionAction();
969 protected:
970 virtual ~MetaClipRegionAction() override;
971 public:
972 virtual void Execute( OutputDevice* pOut ) override;
973 virtual MetaAction* Clone() override;
974 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
975 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
977 MetaClipRegionAction( const vcl::Region& rRegion, bool bClip );
979 virtual void Move( long nHorzMove, long nVertMove ) override;
980 virtual void Scale( double fScaleX, double fScaleY ) override;
982 const vcl::Region& GetRegion() const { return maRegion; }
983 bool IsClipping() const { return mbClip; }
986 class VCL_DLLPUBLIC MetaISectRectClipRegionAction : public MetaAction
988 private:
990 tools::Rectangle maRect;
992 public:
993 MetaISectRectClipRegionAction();
994 protected:
995 virtual ~MetaISectRectClipRegionAction() override;
996 public:
997 virtual void Execute( OutputDevice* pOut ) override;
998 virtual MetaAction* Clone() override;
999 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1000 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1002 explicit MetaISectRectClipRegionAction( const tools::Rectangle& );
1004 virtual void Move( long nHorzMove, long nVertMove ) override;
1005 virtual void Scale( double fScaleX, double fScaleY ) override;
1007 const tools::Rectangle& GetRect() const { return maRect; }
1010 class VCL_DLLPUBLIC MetaISectRegionClipRegionAction : public MetaAction
1012 private:
1014 vcl::Region maRegion;
1016 public:
1017 MetaISectRegionClipRegionAction();
1018 protected:
1019 virtual ~MetaISectRegionClipRegionAction() override;
1020 public:
1021 virtual void Execute( OutputDevice* pOut ) override;
1022 virtual MetaAction* Clone() override;
1023 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1024 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1026 explicit MetaISectRegionClipRegionAction( const vcl::Region& );
1028 virtual void Move( long nHorzMove, long nVertMove ) override;
1029 virtual void Scale( double fScaleX, double fScaleY ) override;
1031 const vcl::Region& GetRegion() const { return maRegion; }
1034 class VCL_DLLPUBLIC MetaMoveClipRegionAction : public MetaAction
1036 private:
1038 long mnHorzMove;
1039 long mnVertMove;
1041 public:
1042 MetaMoveClipRegionAction();
1043 protected:
1044 virtual ~MetaMoveClipRegionAction() override;
1045 public:
1046 virtual void Execute( OutputDevice* pOut ) override;
1047 virtual MetaAction* Clone() override;
1048 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1049 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1051 MetaMoveClipRegionAction( long nHorzMove, long nVertMove );
1053 virtual void Scale( double fScaleX, double fScaleY ) override;
1055 long GetHorzMove() const { return mnHorzMove; }
1056 long GetVertMove() const { return mnVertMove; }
1059 class VCL_DLLPUBLIC MetaLineColorAction : public MetaAction
1061 private:
1063 Color maColor;
1064 bool mbSet;
1066 public:
1067 MetaLineColorAction();
1068 protected:
1069 virtual ~MetaLineColorAction() override;
1070 public:
1071 virtual void Execute( OutputDevice* pOut ) override;
1072 virtual MetaAction* Clone() override;
1073 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1074 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1076 MetaLineColorAction( const Color& rColor, bool bSet );
1078 const Color& GetColor() const { return maColor; }
1079 bool IsSetting() const { return mbSet; }
1082 class VCL_DLLPUBLIC MetaFillColorAction : public MetaAction
1084 private:
1086 Color maColor;
1087 bool mbSet;
1089 public:
1090 MetaFillColorAction();
1091 protected:
1092 virtual ~MetaFillColorAction() override;
1093 public:
1094 virtual void Execute( OutputDevice* pOut ) override;
1095 virtual MetaAction* Clone() override;
1096 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1097 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1099 MetaFillColorAction( const Color& rColor, bool bSet );
1101 const Color& GetColor() const { return maColor; }
1102 bool IsSetting() const { return mbSet; }
1105 class VCL_DLLPUBLIC MetaTextColorAction : public MetaAction
1107 private:
1109 Color maColor;
1111 public:
1112 MetaTextColorAction();
1113 protected:
1114 virtual ~MetaTextColorAction() override;
1115 public:
1116 virtual void Execute( OutputDevice* pOut ) override;
1117 virtual MetaAction* Clone() override;
1118 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1119 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1121 explicit MetaTextColorAction( const Color& );
1123 const Color& GetColor() const { return maColor; }
1126 class VCL_DLLPUBLIC MetaTextFillColorAction : public MetaAction
1128 private:
1130 Color maColor;
1131 bool mbSet;
1133 public:
1134 MetaTextFillColorAction();
1135 protected:
1136 virtual ~MetaTextFillColorAction() override;
1137 public:
1138 virtual void Execute( OutputDevice* pOut ) override;
1139 virtual MetaAction* Clone() override;
1140 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1141 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1143 MetaTextFillColorAction( const Color& rColor, bool bSet );
1145 const Color& GetColor() const { return maColor; }
1146 bool IsSetting() const { return mbSet; }
1149 class VCL_DLLPUBLIC MetaTextLineColorAction : public MetaAction
1151 private:
1153 Color maColor;
1154 bool mbSet;
1156 public:
1157 MetaTextLineColorAction();
1158 protected:
1159 virtual ~MetaTextLineColorAction() override;
1160 public:
1161 virtual void Execute( OutputDevice* pOut ) override;
1162 virtual MetaAction* Clone() override;
1163 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1164 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1166 MetaTextLineColorAction( const Color& rColor, bool bSet );
1168 const Color& GetColor() const { return maColor; }
1169 bool IsSetting() const { return mbSet; }
1172 class VCL_DLLPUBLIC MetaOverlineColorAction : public MetaAction
1174 private:
1176 Color maColor;
1177 bool mbSet;
1179 public:
1180 MetaOverlineColorAction();
1181 protected:
1182 virtual ~MetaOverlineColorAction() override;
1183 public:
1184 virtual void Execute( OutputDevice* pOut ) override;
1185 virtual MetaAction* Clone() override;
1186 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1187 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1189 MetaOverlineColorAction( const Color& rColor, bool bSet );
1191 const Color& GetColor() const { return maColor; }
1192 bool IsSetting() const { return mbSet; }
1195 class VCL_DLLPUBLIC MetaTextAlignAction : public MetaAction
1197 private:
1199 TextAlign maAlign;
1201 public:
1202 MetaTextAlignAction();
1203 protected:
1204 virtual ~MetaTextAlignAction() override;
1205 public:
1206 virtual void Execute( OutputDevice* pOut ) override;
1207 virtual MetaAction* Clone() override;
1208 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1209 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1211 explicit MetaTextAlignAction( TextAlign eAlign );
1213 TextAlign GetTextAlign() const { return maAlign; }
1216 class VCL_DLLPUBLIC MetaMapModeAction : public MetaAction
1218 private:
1220 MapMode maMapMode;
1222 public:
1223 MetaMapModeAction();
1224 protected:
1225 virtual ~MetaMapModeAction() override;
1226 public:
1227 virtual void Execute( OutputDevice* pOut ) override;
1228 virtual MetaAction* Clone() override;
1229 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1230 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1232 explicit MetaMapModeAction( const MapMode& );
1234 virtual void Scale( double fScaleX, double fScaleY ) override;
1236 const MapMode& GetMapMode() const { return maMapMode; }
1239 class VCL_DLLPUBLIC MetaFontAction : public MetaAction
1241 private:
1243 vcl::Font maFont;
1245 public:
1246 MetaFontAction();
1247 protected:
1248 virtual ~MetaFontAction() override;
1249 public:
1250 virtual void Execute( OutputDevice* pOut ) override;
1251 virtual MetaAction* Clone() override;
1252 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1253 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1255 explicit MetaFontAction( const vcl::Font& );
1257 virtual void Scale( double fScaleX, double fScaleY ) override;
1259 const vcl::Font& GetFont() const { return maFont; }
1262 class VCL_DLLPUBLIC MetaPushAction : public MetaAction
1264 private:
1266 PushFlags mnFlags;
1268 public:
1269 MetaPushAction();
1270 protected:
1271 virtual ~MetaPushAction() override;
1272 public:
1273 virtual void Execute( OutputDevice* pOut ) override;
1274 virtual MetaAction* Clone() override;
1275 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1276 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1278 explicit MetaPushAction( PushFlags nFlags );
1280 PushFlags GetFlags() const { return mnFlags; }
1283 class VCL_DLLPUBLIC MetaPopAction : public MetaAction
1285 public:
1287 MetaPopAction();
1288 protected:
1289 virtual ~MetaPopAction() override;
1290 public:
1291 virtual void Execute( OutputDevice* pOut ) override;
1292 virtual MetaAction* Clone() override;
1293 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1294 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1297 class VCL_DLLPUBLIC MetaRasterOpAction : public MetaAction
1299 private:
1301 RasterOp meRasterOp;
1303 public:
1304 MetaRasterOpAction();
1305 protected:
1306 virtual ~MetaRasterOpAction() override;
1307 public:
1308 virtual void Execute( OutputDevice* pOut ) override;
1309 virtual MetaAction* Clone() override;
1310 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1311 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1313 explicit MetaRasterOpAction( RasterOp eRasterOp );
1315 RasterOp GetRasterOp() const { return meRasterOp; }
1318 class VCL_DLLPUBLIC MetaTransparentAction : public MetaAction
1320 private:
1322 tools::PolyPolygon maPolyPoly;
1323 sal_uInt16 mnTransPercent;
1325 public:
1326 MetaTransparentAction();
1327 protected:
1328 virtual ~MetaTransparentAction() override;
1329 public:
1330 virtual void Execute( OutputDevice* pOut ) override;
1331 virtual MetaAction* Clone() override;
1332 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1333 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1335 MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent );
1337 virtual void Move( long nHorzMove, long nVertMove ) override;
1338 virtual void Scale( double fScaleX, double fScaleY ) override;
1340 const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
1341 sal_uInt16 GetTransparence() const { return mnTransPercent; }
1344 class VCL_DLLPUBLIC MetaFloatTransparentAction : public MetaAction
1346 private:
1348 GDIMetaFile maMtf;
1349 Point maPoint;
1350 Size maSize;
1351 Gradient maGradient;
1353 public:
1354 MetaFloatTransparentAction();
1355 protected:
1356 virtual ~MetaFloatTransparentAction() override;
1357 public:
1358 virtual void Execute( OutputDevice* pOut ) override;
1359 virtual MetaAction* Clone() override;
1360 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1361 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1363 MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
1364 const Size& rSize, const Gradient& rGradient );
1366 virtual void Move( long nHorzMove, long nVertMove ) override;
1367 virtual void Scale( double fScaleX, double fScaleY ) override;
1369 const GDIMetaFile& GetGDIMetaFile() const { return maMtf; }
1370 const Point& GetPoint() const { return maPoint; }
1371 const Size& GetSize() const { return maSize; }
1372 const Gradient& GetGradient() const { return maGradient; }
1375 class VCL_DLLPUBLIC MetaEPSAction : public MetaAction
1377 private:
1379 GfxLink maGfxLink;
1380 GDIMetaFile maSubst;
1381 Point maPoint;
1382 Size maSize;
1384 public:
1385 MetaEPSAction();
1386 protected:
1387 virtual ~MetaEPSAction() override;
1388 public:
1389 virtual void Execute( OutputDevice* pOut ) override;
1390 virtual MetaAction* Clone() override;
1391 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1392 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1394 MetaEPSAction( const Point& rPoint, const Size& rSize,
1395 const GfxLink& rGfxLink, const GDIMetaFile& rSubst );
1397 virtual void Move( long nHorzMove, long nVertMove ) override;
1398 virtual void Scale( double fScaleX, double fScaleY ) override;
1400 const GfxLink& GetLink() const { return maGfxLink; }
1401 const GDIMetaFile& GetSubstitute() const { return maSubst; }
1402 const Point& GetPoint() const { return maPoint; }
1403 const Size& GetSize() const { return maSize; }
1406 class VCL_DLLPUBLIC MetaRefPointAction : public MetaAction
1408 private:
1410 Point maRefPoint;
1411 bool mbSet;
1413 public:
1414 MetaRefPointAction();
1415 protected:
1416 virtual ~MetaRefPointAction() override;
1417 public:
1418 virtual void Execute( OutputDevice* pOut ) override;
1419 virtual MetaAction* Clone() override;
1420 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1421 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1423 MetaRefPointAction( const Point& rRefPoint, bool bSet );
1425 const Point& GetRefPoint() const { return maRefPoint; }
1426 bool IsSetting() const { return mbSet; }
1429 class VCL_DLLPUBLIC MetaCommentAction : public MetaAction
1431 private:
1433 OString maComment;
1434 sal_Int32 mnValue;
1435 sal_uInt32 mnDataSize;
1436 sal_uInt8* mpData;
1438 SAL_DLLPRIVATE void ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize );
1440 protected:
1441 virtual ~MetaCommentAction() override;
1443 public:
1444 explicit MetaCommentAction();
1445 explicit MetaCommentAction( const MetaCommentAction& rAct );
1446 explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0UL );
1448 virtual void Move( long nHorzMove, long nVertMove ) override;
1449 virtual void Scale( double fScaleX, double fScaleY ) override;
1451 virtual void Execute( OutputDevice* pOut ) override;
1452 virtual MetaAction* Clone() override;
1453 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1454 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1456 const OString& GetComment() const { return maComment; }
1457 sal_Int32 GetValue() const { return mnValue; }
1458 sal_uInt32 GetDataSize() const { return mnDataSize; }
1459 const sal_uInt8* GetData() const { return mpData; }
1462 class VCL_DLLPUBLIC MetaLayoutModeAction : public MetaAction
1464 private:
1466 ComplexTextLayoutFlags mnLayoutMode;
1468 public:
1469 MetaLayoutModeAction();
1470 protected:
1471 virtual ~MetaLayoutModeAction() override;
1472 public:
1473 virtual void Execute( OutputDevice* pOut ) override;
1474 virtual MetaAction* Clone() override;
1475 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1476 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1478 explicit MetaLayoutModeAction( ComplexTextLayoutFlags nLayoutMode );
1480 ComplexTextLayoutFlags GetLayoutMode() const { return mnLayoutMode; }
1483 class VCL_DLLPUBLIC MetaTextLanguageAction : public MetaAction
1485 private:
1487 LanguageType meTextLanguage;
1489 public:
1490 MetaTextLanguageAction();
1491 protected:
1492 virtual ~MetaTextLanguageAction() override;
1493 public:
1494 virtual void Execute( OutputDevice* pOut ) override;
1495 virtual MetaAction* Clone() override;
1496 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
1497 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
1499 explicit MetaTextLanguageAction( LanguageType );
1501 LanguageType GetTextLanguage() const { return meTextLanguage; }
1504 #endif // INCLUDED_VCL_METAACT_HXX
1506 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */