LibreOffice Module vcl (master)  1
metaact.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <stdio.h>
21 #include <string.h>
22 #include <osl/thread.h>
23 #include <sal/log.hxx>
24 #include <tools/stream.hxx>
25 #include <tools/vcompat.hxx>
26 #include <tools/helpers.hxx>
27 #include <vcl/dibtools.hxx>
28 #include <vcl/outdev.hxx>
29 #include <vcl/metaact.hxx>
30 #include <vcl/graphictools.hxx>
31 #include <unotools/fontdefs.hxx>
32 #include <TypeSerializer.hxx>
33 
34 namespace
35 {
36 
37 const char *
38 meta_action_name(MetaActionType nMetaAction)
39 {
40 #ifndef SAL_LOG_INFO
41  (void) nMetaAction;
42  return "";
43 #else
44  switch( nMetaAction )
45  {
46  case MetaActionType::NONE: return "NULL";
47  case MetaActionType::PIXEL: return "PIXEL";
48  case MetaActionType::POINT: return "POINT";
49  case MetaActionType::LINE: return "LINE";
50  case MetaActionType::RECT: return "RECT";
51  case MetaActionType::ROUNDRECT: return "ROUNDRECT";
52  case MetaActionType::ELLIPSE: return "ELLIPSE";
53  case MetaActionType::ARC: return "ARC";
54  case MetaActionType::PIE: return "PIE";
55  case MetaActionType::CHORD: return "CHORD";
56  case MetaActionType::POLYLINE: return "POLYLINE";
57  case MetaActionType::POLYGON: return "POLYGON";
58  case MetaActionType::POLYPOLYGON: return "POLYPOLYGON";
59  case MetaActionType::TEXT: return "TEXT";
60  case MetaActionType::TEXTARRAY: return "TEXTARRAY";
61  case MetaActionType::STRETCHTEXT: return "STRETCHTEXT";
62  case MetaActionType::TEXTRECT: return "TEXTRECT";
63  case MetaActionType::BMP: return "BMP";
64  case MetaActionType::BMPSCALE: return "BMPSCALE";
65  case MetaActionType::BMPSCALEPART: return "BMPSCALEPART";
66  case MetaActionType::BMPEX: return "BMPEX";
67  case MetaActionType::BMPEXSCALE: return "BMPEXSCALE";
68  case MetaActionType::BMPEXSCALEPART: return "BMPEXSCALEPART";
69  case MetaActionType::MASK: return "MASK";
70  case MetaActionType::MASKSCALE: return "MASKSCALE";
71  case MetaActionType::MASKSCALEPART: return "MASKSCALEPART";
72  case MetaActionType::GRADIENT: return "GRADIENT";
73  case MetaActionType::HATCH: return "HATCH";
74  case MetaActionType::WALLPAPER: return "WALLPAPER";
75  case MetaActionType::CLIPREGION: return "CLIPREGION";
76  case MetaActionType::ISECTRECTCLIPREGION: return "ISECTRECTCLIPREGION";
77  case MetaActionType::ISECTREGIONCLIPREGION: return "ISECTREGIONCLIPREGION";
78  case MetaActionType::MOVECLIPREGION: return "MOVECLIPREGION";
79  case MetaActionType::LINECOLOR: return "LINECOLOR";
80  case MetaActionType::FILLCOLOR: return "FILLCOLOR";
81  case MetaActionType::TEXTCOLOR: return "TEXTCOLOR";
82  case MetaActionType::TEXTFILLCOLOR: return "TEXTFILLCOLOR";
83  case MetaActionType::TEXTALIGN: return "TEXTALIGN";
84  case MetaActionType::MAPMODE: return "MAPMODE";
85  case MetaActionType::FONT: return "FONT";
86  case MetaActionType::PUSH: return "PUSH";
87  case MetaActionType::POP: return "POP";
88  case MetaActionType::RASTEROP: return "RASTEROP";
89  case MetaActionType::Transparent: return "TRANSPARENT";
90  case MetaActionType::EPS: return "EPS";
91  case MetaActionType::REFPOINT: return "REFPOINT";
92  case MetaActionType::TEXTLINECOLOR: return "TEXTLINECOLOR";
93  case MetaActionType::TEXTLINE: return "TEXTLINE";
94  case MetaActionType::FLOATTRANSPARENT: return "FLOATTRANSPARENT";
95  case MetaActionType::GRADIENTEX: return "GRADIENTEX";
96  case MetaActionType::LAYOUTMODE: return "LAYOUTMODE";
97  case MetaActionType::TEXTLANGUAGE: return "TEXTLANGUAGE";
98  case MetaActionType::OVERLINECOLOR: return "OVERLINECOLOR";
99  case MetaActionType::COMMENT: return "COMMENT";
100  default:
101  // Yes, return a pointer to a static buffer. This is a very
102  // local debugging output function, so no big deal.
103  static char buffer[6];
104  sprintf(buffer, "%u", static_cast<unsigned int>(nMetaAction));
105  return buffer;
106  }
107 #endif
108 }
109 
110 void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY )
111 {
112  rPt.setX( FRound( fScaleX * rPt.X() ) );
113  rPt.setY( FRound( fScaleY * rPt.Y() ) );
114 }
115 
116 void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScaleY )
117 {
118  Point aTL( rRect.TopLeft() );
119  Point aBR( rRect.BottomRight() );
120 
121  ImplScalePoint( aTL, fScaleX, fScaleY );
122  ImplScalePoint( aBR, fScaleX, fScaleY );
123 
124  rRect = tools::Rectangle( aTL, aBR );
125  rRect.Justify();
126 }
127 
128 void ImplScalePoly( tools::Polygon& rPoly, double fScaleX, double fScaleY )
129 {
130  for( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
131  ImplScalePoint( rPoly[ i ], fScaleX, fScaleY );
132 }
133 
134 void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScaleY )
135 {
136  if( !rLineInfo.IsDefault() )
137  {
138  const double fScale = ( fabs(fScaleX) + fabs(fScaleY) ) * 0.5;
139 
140  rLineInfo.SetWidth( FRound( fScale * rLineInfo.GetWidth() ) );
141  rLineInfo.SetDashLen( FRound( fScale * rLineInfo.GetDashLen() ) );
142  rLineInfo.SetDotLen( FRound( fScale * rLineInfo.GetDotLen() ) );
143  rLineInfo.SetDistance( FRound( fScale * rLineInfo.GetDistance() ) );
144  }
145 }
146 
147 } //anonymous namespace
148 
151 {
152 }
153 
155  mnType( nType )
156 {
157 }
158 
160  SimpleReferenceObject(), mnType( rOther.mnType )
161 {
162 }
163 
165 {
166 }
167 
169 {
170 }
171 
173 {
174  return new MetaAction;
175 }
176 
177 void MetaAction::Move( long, long )
178 {
179 }
180 
181 void MetaAction::Scale( double, double )
182 {
183 }
184 
186 {
187  rOStm.WriteUInt16( static_cast<sal_uInt16>(mnType) );
188 }
189 
191 {
192  // DO NOT read mnType - ReadMetaAction already did that!
193 }
194 
196 {
197  MetaAction* pAction = nullptr;
198  sal_uInt16 nTmp = 0;
199  rIStm.ReadUInt16( nTmp );
200  MetaActionType nType = static_cast<MetaActionType>(nTmp);
201 
202  SAL_INFO("vcl.gdi", "ReadMetaAction " << meta_action_name( nType ));
203 
204  switch( nType )
205  {
206  case MetaActionType::NONE: pAction = new MetaAction; break;
207  case MetaActionType::PIXEL: pAction = new MetaPixelAction; break;
208  case MetaActionType::POINT: pAction = new MetaPointAction; break;
209  case MetaActionType::LINE: pAction = new MetaLineAction; break;
210  case MetaActionType::RECT: pAction = new MetaRectAction; break;
211  case MetaActionType::ROUNDRECT: pAction = new MetaRoundRectAction; break;
212  case MetaActionType::ELLIPSE: pAction = new MetaEllipseAction; break;
213  case MetaActionType::ARC: pAction = new MetaArcAction; break;
214  case MetaActionType::PIE: pAction = new MetaPieAction; break;
215  case MetaActionType::CHORD: pAction = new MetaChordAction; break;
216  case MetaActionType::POLYLINE: pAction = new MetaPolyLineAction; break;
217  case MetaActionType::POLYGON: pAction = new MetaPolygonAction; break;
218  case MetaActionType::POLYPOLYGON: pAction = new MetaPolyPolygonAction; break;
219  case MetaActionType::TEXT: pAction = new MetaTextAction; break;
220  case MetaActionType::TEXTARRAY: pAction = new MetaTextArrayAction; break;
221  case MetaActionType::STRETCHTEXT: pAction = new MetaStretchTextAction; break;
222  case MetaActionType::TEXTRECT: pAction = new MetaTextRectAction; break;
223  case MetaActionType::TEXTLINE: pAction = new MetaTextLineAction; break;
224  case MetaActionType::BMP: pAction = new MetaBmpAction; break;
225  case MetaActionType::BMPSCALE: pAction = new MetaBmpScaleAction; break;
226  case MetaActionType::BMPSCALEPART: pAction = new MetaBmpScalePartAction; break;
227  case MetaActionType::BMPEX: pAction = new MetaBmpExAction; break;
228  case MetaActionType::BMPEXSCALE: pAction = new MetaBmpExScaleAction; break;
229  case MetaActionType::BMPEXSCALEPART: pAction = new MetaBmpExScalePartAction; break;
230  case MetaActionType::MASK: pAction = new MetaMaskAction; break;
231  case MetaActionType::MASKSCALE: pAction = new MetaMaskScaleAction; break;
232  case MetaActionType::MASKSCALEPART: pAction = new MetaMaskScalePartAction; break;
233  case MetaActionType::GRADIENT: pAction = new MetaGradientAction; break;
234  case MetaActionType::GRADIENTEX: pAction = new MetaGradientExAction; break;
235  case MetaActionType::HATCH: pAction = new MetaHatchAction; break;
236  case MetaActionType::WALLPAPER: pAction = new MetaWallpaperAction; break;
237  case MetaActionType::CLIPREGION: pAction = new MetaClipRegionAction; break;
240  case MetaActionType::MOVECLIPREGION: pAction = new MetaMoveClipRegionAction; break;
241  case MetaActionType::LINECOLOR: pAction = new MetaLineColorAction; break;
242  case MetaActionType::FILLCOLOR: pAction = new MetaFillColorAction; break;
243  case MetaActionType::TEXTCOLOR: pAction = new MetaTextColorAction; break;
244  case MetaActionType::TEXTFILLCOLOR: pAction = new MetaTextFillColorAction; break;
245  case MetaActionType::TEXTLINECOLOR: pAction = new MetaTextLineColorAction; break;
246  case MetaActionType::OVERLINECOLOR: pAction = new MetaOverlineColorAction; break;
247  case MetaActionType::TEXTALIGN: pAction = new MetaTextAlignAction; break;
248  case MetaActionType::MAPMODE: pAction = new MetaMapModeAction; break;
249  case MetaActionType::FONT: pAction = new MetaFontAction; break;
250  case MetaActionType::PUSH: pAction = new MetaPushAction; break;
251  case MetaActionType::POP: pAction = new MetaPopAction; break;
252  case MetaActionType::RASTEROP: pAction = new MetaRasterOpAction; break;
253  case MetaActionType::Transparent: pAction = new MetaTransparentAction; break;
255  case MetaActionType::EPS: pAction = new MetaEPSAction; break;
256  case MetaActionType::REFPOINT: pAction = new MetaRefPointAction; break;
257  case MetaActionType::COMMENT: pAction = new MetaCommentAction; break;
258  case MetaActionType::LAYOUTMODE: pAction = new MetaLayoutModeAction; break;
259  case MetaActionType::TEXTLANGUAGE: pAction = new MetaTextLanguageAction; break;
260 
261  default:
262  {
263  VersionCompat aCompat(rIStm, StreamMode::READ);
264  }
265  break;
266  }
267 
268  if( pAction )
269  pAction->Read( rIStm, pData );
270 
271  return pAction;
272 }
273 
276 {}
277 
279 {}
280 
281 MetaPixelAction::MetaPixelAction( const Point& rPt, const Color& rColor ) :
283  maPt ( rPt ),
284  maColor ( rColor )
285 {}
286 
288 {
289  pOut->DrawPixel( maPt, maColor );
290 }
291 
293 {
294  return new MetaPixelAction( *this );
295 }
296 
297 void MetaPixelAction::Move( long nHorzMove, long nVertMove )
298 {
299  maPt.Move( nHorzMove, nVertMove );
300 }
301 
302 void MetaPixelAction::Scale( double fScaleX, double fScaleY )
303 {
304  ImplScalePoint( maPt, fScaleX, fScaleY );
305 }
306 
308 {
309  MetaAction::Write(rOStm, pData);
310  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
311  WritePair( rOStm, maPt );
312  rOStm.WriteUInt32(maColor.mValue);
313 }
314 
316 {
317  VersionCompat aCompat(rIStm, StreamMode::READ);
318  ReadPair( rIStm, maPt );
319  rIStm.ReadUInt32(maColor.mValue);
320 }
321 
324 {}
325 
327 {}
328 
331  maPt ( rPt )
332 {}
333 
335 {
336  pOut->DrawPixel( maPt );
337 }
338 
340 {
341  return new MetaPointAction( *this );
342 }
343 
344 void MetaPointAction::Move( long nHorzMove, long nVertMove )
345 {
346  maPt.Move( nHorzMove, nVertMove );
347 }
348 
349 void MetaPointAction::Scale( double fScaleX, double fScaleY )
350 {
351  ImplScalePoint( maPt, fScaleX, fScaleY );
352 }
353 
355 {
356  MetaAction::Write(rOStm, pData);
357  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
358  WritePair( rOStm, maPt );
359 }
360 
362 {
363  VersionCompat aCompat(rIStm, StreamMode::READ);
364  ReadPair( rIStm, maPt );
365 }
366 
369 {}
370 
372 {}
373 
374 MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) :
376  maStartPt ( rStart ),
377  maEndPt ( rEnd )
378 {}
379 
380 MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd,
381  const LineInfo& rLineInfo ) :
383  maLineInfo ( rLineInfo ),
384  maStartPt ( rStart ),
385  maEndPt ( rEnd )
386 {}
387 
389 {
390  if( maLineInfo.IsDefault() )
391  pOut->DrawLine( maStartPt, maEndPt );
392  else
394 }
395 
397 {
398  return new MetaLineAction( *this );
399 }
400 
401 void MetaLineAction::Move( long nHorzMove, long nVertMove )
402 {
403  maStartPt.Move( nHorzMove, nVertMove );
404  maEndPt.Move( nHorzMove, nVertMove );
405 }
406 
407 void MetaLineAction::Scale( double fScaleX, double fScaleY )
408 {
409  ImplScalePoint( maStartPt, fScaleX, fScaleY );
410  ImplScalePoint( maEndPt, fScaleX, fScaleY );
411  ImplScaleLineInfo( maLineInfo, fScaleX, fScaleY );
412 }
413 
415 {
416  MetaAction::Write(rOStm, pData);
417  VersionCompat aCompat(rOStm, StreamMode::WRITE, 2);
418 
419  WritePair( rOStm, maStartPt );
420  WritePair( rOStm, maEndPt ); // Version 1
421  WriteLineInfo( rOStm, maLineInfo ); // Version 2
422 }
423 
425 {
426  VersionCompat aCompat(rIStm, StreamMode::READ);
427 
428  // Version 1
429  ReadPair( rIStm, maStartPt );
430  ReadPair( rIStm, maEndPt );
431 
432  // Version 2
433  if( aCompat.GetVersion() >= 2 )
434  {
435  ReadLineInfo( rIStm, maLineInfo );
436  }
437 }
438 
441 {}
442 
444 {}
445 
448  maRect ( rRect )
449 {}
450 
452 {
453  pOut->DrawRect( maRect );
454 }
455 
457 {
458  return new MetaRectAction( *this );
459 }
460 
461 void MetaRectAction::Move( long nHorzMove, long nVertMove )
462 {
463  maRect.Move( nHorzMove, nVertMove );
464 }
465 
466 void MetaRectAction::Scale( double fScaleX, double fScaleY )
467 {
468  ImplScaleRect( maRect, fScaleX, fScaleY );
469 }
470 
472 {
473  MetaAction::Write(rOStm, pData);
474  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
475  WriteRectangle( rOStm, maRect );
476 }
477 
479 {
480  VersionCompat aCompat(rIStm, StreamMode::READ);
481  ReadRectangle( rIStm, maRect );
482 }
483 
486  mnHorzRound ( 0 ),
487  mnVertRound ( 0 )
488 {}
489 
491 {}
492 
494  sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) :
496  maRect ( rRect ),
497  mnHorzRound ( nHorzRound ),
498  mnVertRound ( nVertRound )
499 {}
500 
502 {
504 }
505 
507 {
508  return new MetaRoundRectAction( *this );
509 }
510 
511 void MetaRoundRectAction::Move( long nHorzMove, long nVertMove )
512 {
513  maRect.Move( nHorzMove, nVertMove );
514 }
515 
516 void MetaRoundRectAction::Scale( double fScaleX, double fScaleY )
517 {
518  ImplScaleRect( maRect, fScaleX, fScaleY );
519  mnHorzRound = FRound( mnHorzRound * fabs(fScaleX) );
520  mnVertRound = FRound( mnVertRound * fabs(fScaleY) );
521 }
522 
524 {
525  MetaAction::Write(rOStm, pData);
526  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
527  WriteRectangle( rOStm, maRect );
529 }
530 
532 {
533  VersionCompat aCompat(rIStm, StreamMode::READ);
535 }
536 
539 {}
540 
542 {}
543 
546  maRect ( rRect )
547 {}
548 
550 {
551  pOut->DrawEllipse( maRect );
552 }
553 
555 {
556  return new MetaEllipseAction( *this );
557 }
558 
559 void MetaEllipseAction::Move( long nHorzMove, long nVertMove )
560 {
561  maRect.Move( nHorzMove, nVertMove );
562 }
563 
564 void MetaEllipseAction::Scale( double fScaleX, double fScaleY )
565 {
566  ImplScaleRect( maRect, fScaleX, fScaleY );
567 }
568 
570 {
571  MetaAction::Write(rOStm, pData);
572  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
573  WriteRectangle( rOStm, maRect );
574 }
575 
577 {
578  VersionCompat aCompat(rIStm, StreamMode::READ);
579  ReadRectangle( rIStm, maRect );
580 }
581 
584 {}
585 
587 {}
588 
590  const Point& rStart, const Point& rEnd ) :
592  maRect ( rRect ),
593  maStartPt ( rStart ),
594  maEndPt ( rEnd )
595 {}
596 
598 {
599  pOut->DrawArc( maRect, maStartPt, maEndPt );
600 }
601 
603 {
604  return new MetaArcAction( *this );
605 }
606 
607 void MetaArcAction::Move( long nHorzMove, long nVertMove )
608 {
609  maRect.Move( nHorzMove, nVertMove );
610  maStartPt.Move( nHorzMove, nVertMove );
611  maEndPt.Move( nHorzMove, nVertMove );
612 }
613 
614 void MetaArcAction::Scale( double fScaleX, double fScaleY )
615 {
616  ImplScaleRect( maRect, fScaleX, fScaleY );
617  ImplScalePoint( maStartPt, fScaleX, fScaleY );
618  ImplScalePoint( maEndPt, fScaleX, fScaleY );
619 }
620 
622 {
623  MetaAction::Write(rOStm, pData);
624  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
625  WriteRectangle( rOStm, maRect );
626  WritePair( rOStm, maStartPt );
627  WritePair( rOStm, maEndPt );
628 }
629 
631 {
632  VersionCompat aCompat(rIStm, StreamMode::READ);
633  ReadRectangle( rIStm, maRect );
634  ReadPair( rIStm, maStartPt );
635  ReadPair( rIStm, maEndPt );
636 }
637 
640 {}
641 
643 {}
644 
646  const Point& rStart, const Point& rEnd ) :
648  maRect ( rRect ),
649  maStartPt ( rStart ),
650  maEndPt ( rEnd )
651 {}
652 
654 {
655  pOut->DrawPie( maRect, maStartPt, maEndPt );
656 }
657 
659 {
660  return new MetaPieAction( *this );
661 }
662 
663 void MetaPieAction::Move( long nHorzMove, long nVertMove )
664 {
665  maRect.Move( nHorzMove, nVertMove );
666  maStartPt.Move( nHorzMove, nVertMove );
667  maEndPt.Move( nHorzMove, nVertMove );
668 }
669 
670 void MetaPieAction::Scale( double fScaleX, double fScaleY )
671 {
672  ImplScaleRect( maRect, fScaleX, fScaleY );
673  ImplScalePoint( maStartPt, fScaleX, fScaleY );
674  ImplScalePoint( maEndPt, fScaleX, fScaleY );
675 }
676 
678 {
679  MetaAction::Write(rOStm, pData);
680  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
681  WriteRectangle( rOStm, maRect );
682  WritePair( rOStm, maStartPt );
683  WritePair( rOStm, maEndPt );
684 }
685 
687 {
688  VersionCompat aCompat(rIStm, StreamMode::READ);
689  ReadRectangle( rIStm, maRect );
690  ReadPair( rIStm, maStartPt );
691  ReadPair( rIStm, maEndPt );
692 }
693 
696 {}
697 
699 {}
700 
702  const Point& rStart, const Point& rEnd ) :
704  maRect ( rRect ),
705  maStartPt ( rStart ),
706  maEndPt ( rEnd )
707 {}
708 
710 {
711  pOut->DrawChord( maRect, maStartPt, maEndPt );
712 }
713 
715 {
716  return new MetaChordAction( *this );
717 }
718 
719 void MetaChordAction::Move( long nHorzMove, long nVertMove )
720 {
721  maRect.Move( nHorzMove, nVertMove );
722  maStartPt.Move( nHorzMove, nVertMove );
723  maEndPt.Move( nHorzMove, nVertMove );
724 }
725 
726 void MetaChordAction::Scale( double fScaleX, double fScaleY )
727 {
728  ImplScaleRect( maRect, fScaleX, fScaleY );
729  ImplScalePoint( maStartPt, fScaleX, fScaleY );
730  ImplScalePoint( maEndPt, fScaleX, fScaleY );
731 }
732 
734 {
735  MetaAction::Write(rOStm, pData);
736  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
737  WriteRectangle( rOStm, maRect );
738  WritePair( rOStm, maStartPt );
739  WritePair( rOStm, maEndPt );
740 }
741 
743 {
744  VersionCompat aCompat(rIStm, StreamMode::READ);
745  ReadRectangle( rIStm, maRect );
746  ReadPair( rIStm, maStartPt );
747  ReadPair( rIStm, maEndPt );
748 }
749 
752 {}
753 
755 {}
756 
759  maPoly ( rPoly )
760 {}
761 
764  maLineInfo ( rLineInfo ),
765  maPoly ( rPoly )
766 {}
767 
769 {
770  if( maLineInfo.IsDefault() )
771  pOut->DrawPolyLine( maPoly );
772  else
773  pOut->DrawPolyLine( maPoly, maLineInfo );
774 }
775 
777 {
778  return new MetaPolyLineAction( *this );
779 }
780 
781 void MetaPolyLineAction::Move( long nHorzMove, long nVertMove )
782 {
783  maPoly.Move( nHorzMove, nVertMove );
784 }
785 
786 void MetaPolyLineAction::Scale( double fScaleX, double fScaleY )
787 {
788  ImplScalePoly( maPoly, fScaleX, fScaleY );
789  ImplScaleLineInfo( maLineInfo, fScaleX, fScaleY );
790 }
791 
793 {
794  MetaAction::Write(rOStm, pData);
795  VersionCompat aCompat(rOStm, StreamMode::WRITE, 3);
796 
797  tools::Polygon aSimplePoly;
798  maPoly.AdaptiveSubdivide( aSimplePoly );
799 
800  WritePolygon( rOStm, aSimplePoly ); // Version 1
801  WriteLineInfo( rOStm, maLineInfo ); // Version 2
802 
803  bool bHasPolyFlags = maPoly.HasFlags(); // Version 3
804  rOStm.WriteBool( bHasPolyFlags );
805  if ( bHasPolyFlags )
806  maPoly.Write( rOStm );
807 }
808 
810 {
811  VersionCompat aCompat(rIStm, StreamMode::READ);
812 
813  // Version 1
814  ReadPolygon( rIStm, maPoly );
815 
816  // Version 2
817  if( aCompat.GetVersion() >= 2 )
818  ReadLineInfo( rIStm, maLineInfo );
819  if ( aCompat.GetVersion() >= 3 )
820  {
821  sal_uInt8 bHasPolyFlags(0);
822  rIStm.ReadUChar( bHasPolyFlags );
823  if ( bHasPolyFlags )
824  maPoly.Read( rIStm );
825  }
826 }
827 
830 {}
831 
833 {}
834 
837  maPoly ( rPoly )
838 {}
839 
841 {
842  pOut->DrawPolygon( maPoly );
843 }
844 
846 {
847  return new MetaPolygonAction( *this );
848 }
849 
850 void MetaPolygonAction::Move( long nHorzMove, long nVertMove )
851 {
852  maPoly.Move( nHorzMove, nVertMove );
853 }
854 
855 void MetaPolygonAction::Scale( double fScaleX, double fScaleY )
856 {
857  ImplScalePoly( maPoly, fScaleX, fScaleY );
858 }
859 
861 {
862  MetaAction::Write(rOStm, pData);
863  VersionCompat aCompat(rOStm, StreamMode::WRITE, 2);
864 
865  tools::Polygon aSimplePoly; // Version 1
866  maPoly.AdaptiveSubdivide( aSimplePoly );
867  WritePolygon( rOStm, aSimplePoly );
868 
869  bool bHasPolyFlags = maPoly.HasFlags(); // Version 2
870  rOStm.WriteBool( bHasPolyFlags );
871  if ( bHasPolyFlags )
872  maPoly.Write( rOStm );
873 }
874 
876 {
877  VersionCompat aCompat(rIStm, StreamMode::READ);
878 
879  ReadPolygon( rIStm, maPoly ); // Version 1
880 
881  if( aCompat.GetVersion() >= 2 ) // Version 2
882  {
883  sal_uInt8 bHasPolyFlags(0);
884  rIStm.ReadUChar( bHasPolyFlags );
885  if ( bHasPolyFlags )
886  maPoly.Read( rIStm );
887  }
888 }
889 
892 {}
893 
895 {}
896 
899  maPolyPoly ( rPolyPoly )
900 {}
901 
903 {
904  pOut->DrawPolyPolygon( maPolyPoly );
905 }
906 
908 {
909  return new MetaPolyPolygonAction( *this );
910 }
911 
912 void MetaPolyPolygonAction::Move( long nHorzMove, long nVertMove )
913 {
914  maPolyPoly.Move( nHorzMove, nVertMove );
915 }
916 
917 void MetaPolyPolygonAction::Scale( double fScaleX, double fScaleY )
918 {
919  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
920  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
921 }
922 
924 {
925  MetaAction::Write(rOStm, pData);
926  VersionCompat aCompat(rOStm, StreamMode::WRITE, 2);
927 
928  sal_uInt16 nNumberOfComplexPolygons = 0;
929  sal_uInt16 i, nPolyCount = maPolyPoly.Count();
930 
931  tools::Polygon aSimplePoly; // Version 1
932  rOStm.WriteUInt16( nPolyCount );
933  for ( i = 0; i < nPolyCount; i++ )
934  {
935  const tools::Polygon& rPoly = maPolyPoly.GetObject( i );
936  if ( rPoly.HasFlags() )
937  nNumberOfComplexPolygons++;
938  rPoly.AdaptiveSubdivide( aSimplePoly );
939  WritePolygon( rOStm, aSimplePoly );
940  }
941 
942  rOStm.WriteUInt16( nNumberOfComplexPolygons ); // Version 2
943  for ( i = 0; nNumberOfComplexPolygons && ( i < nPolyCount ); i++ )
944  {
945  const tools::Polygon& rPoly = maPolyPoly.GetObject( i );
946  if ( rPoly.HasFlags() )
947  {
948  rOStm.WriteUInt16( i );
949  rPoly.Write( rOStm );
950 
951  nNumberOfComplexPolygons--;
952  }
953  }
954 }
955 
957 {
958  VersionCompat aCompat(rIStm, StreamMode::READ);
959  ReadPolyPolygon( rIStm, maPolyPoly ); // Version 1
960 
961  if ( aCompat.GetVersion() >= 2 ) // Version 2
962  {
963  sal_uInt16 nNumberOfComplexPolygons(0);
964  rIStm.ReadUInt16( nNumberOfComplexPolygons );
965  const size_t nMinRecordSize = sizeof(sal_uInt16);
966  const size_t nMaxRecords = rIStm.remainingSize() / nMinRecordSize;
967  if (nNumberOfComplexPolygons > nMaxRecords)
968  {
969  SAL_WARN("vcl.gdi", "Parsing error: " << nMaxRecords <<
970  " max possible entries, but " << nNumberOfComplexPolygons << " claimed, truncating");
971  nNumberOfComplexPolygons = nMaxRecords;
972  }
973  for (sal_uInt16 i = 0; i < nNumberOfComplexPolygons; ++i)
974  {
975  sal_uInt16 nIndex(0);
976  rIStm.ReadUInt16( nIndex );
977  tools::Polygon aPoly;
978  aPoly.Read( rIStm );
979  if (nIndex >= maPolyPoly.Count())
980  {
981  SAL_WARN("vcl.gdi", "svm contains polygon index " << nIndex
982  << " outside possible range " << maPolyPoly.Count());
983  continue;
984  }
985  maPolyPoly.Replace( aPoly, nIndex );
986  }
987  }
988 }
989 
992  mnIndex ( 0 ),
993  mnLen ( 0 )
994 {}
995 
997 {}
998 
999 MetaTextAction::MetaTextAction( const Point& rPt, const OUString& rStr,
1000  sal_Int32 nIndex, sal_Int32 nLen ) :
1002  maPt ( rPt ),
1003  maStr ( rStr ),
1004  mnIndex ( nIndex ),
1005  mnLen ( nLen )
1006 {}
1007 
1009 {
1010  pOut->DrawText( maPt, maStr, mnIndex, mnLen );
1011 }
1012 
1014 {
1015  return new MetaTextAction( *this );
1016 }
1017 
1018 void MetaTextAction::Move( long nHorzMove, long nVertMove )
1019 {
1020  maPt.Move( nHorzMove, nVertMove );
1021 }
1022 
1023 void MetaTextAction::Scale( double fScaleX, double fScaleY )
1024 {
1025  ImplScalePoint( maPt, fScaleX, fScaleY );
1026 }
1027 
1029 {
1030  MetaAction::Write(rOStm, pData);
1031  VersionCompat aCompat(rOStm, StreamMode::WRITE, 2);
1032  WritePair( rOStm, maPt );
1033  rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet );
1034  rOStm.WriteUInt16(mnIndex);
1035  rOStm.WriteUInt16(mnLen);
1036 
1038 }
1039 
1041 {
1042  VersionCompat aCompat(rIStm, StreamMode::READ);
1043  ReadPair( rIStm, maPt );
1044  maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
1045  sal_uInt16 nTmpIndex(0);
1046  rIStm.ReadUInt16(nTmpIndex);
1047  mnIndex = nTmpIndex;
1048  sal_uInt16 nTmpLen(0);
1049  rIStm.ReadUInt16(nTmpLen);
1050  mnLen = nTmpLen;
1051 
1052  if ( aCompat.GetVersion() >= 2 ) // Version 2
1054 }
1055 
1058  mnIndex ( 0 ),
1059  mnLen ( 0 )
1060 {}
1061 
1064  maStartPt ( rAction.maStartPt ),
1065  maStr ( rAction.maStr ),
1066  mnIndex ( rAction.mnIndex ),
1067  mnLen ( rAction.mnLen )
1068 {
1069  if( rAction.mpDXAry )
1070  {
1071  mpDXAry.reset( new long[ mnLen ] );
1072  memcpy( mpDXAry.get(), rAction.mpDXAry.get(), mnLen * sizeof( long ) );
1073  }
1074 }
1075 
1077  const OUString& rStr,
1078  const long* pDXAry,
1079  sal_Int32 nIndex,
1080  sal_Int32 nLen ) :
1082  maStartPt ( rStartPt ),
1083  maStr ( rStr ),
1084  mnIndex ( nIndex ),
1085  mnLen ( nLen )
1086 {
1087  const sal_Int32 nAryLen = pDXAry ? mnLen : 0;
1088 
1089  if (nAryLen > 0)
1090  {
1091  mpDXAry.reset( new long[ nAryLen ] );
1092  memcpy( mpDXAry.get(), pDXAry, nAryLen * sizeof(long) );
1093  }
1094 }
1095 
1097 {
1098 }
1099 
1101 {
1102  pOut->DrawTextArray( maStartPt, maStr, mpDXAry.get(), mnIndex, mnLen );
1103 }
1104 
1106 {
1107  return new MetaTextArrayAction( *this );
1108 }
1109 
1110 void MetaTextArrayAction::Move( long nHorzMove, long nVertMove )
1111 {
1112  maStartPt.Move( nHorzMove, nVertMove );
1113 }
1114 
1115 void MetaTextArrayAction::Scale( double fScaleX, double fScaleY )
1116 {
1117  ImplScalePoint( maStartPt, fScaleX, fScaleY );
1118 
1119  if ( mpDXAry && mnLen )
1120  {
1121  for ( sal_uInt16 i = 0, nCount = mnLen; i < nCount; i++ )
1122  mpDXAry[ i ] = FRound( mpDXAry[ i ] * fabs(fScaleX) );
1123  }
1124 }
1125 
1127 {
1128  const sal_Int32 nAryLen = mpDXAry ? mnLen : 0;
1129 
1130  MetaAction::Write(rOStm, pData);
1131  VersionCompat aCompat(rOStm, StreamMode::WRITE, 2);
1132  WritePair( rOStm, maStartPt );
1133  rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet );
1134  rOStm.WriteUInt16(mnIndex);
1135  rOStm.WriteUInt16(mnLen);
1136  rOStm.WriteInt32(nAryLen);
1137 
1138  for (sal_Int32 i = 0; i < nAryLen; ++i)
1139  rOStm.WriteInt32( mpDXAry[ i ] );
1140 
1142 }
1143 
1145 {
1146  mpDXAry.reset();
1147 
1148  VersionCompat aCompat(rIStm, StreamMode::READ);
1149  ReadPair( rIStm, maStartPt );
1150  maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
1151  sal_uInt16 nTmpIndex(0);
1152  rIStm.ReadUInt16(nTmpIndex);
1153  mnIndex = nTmpIndex;
1154  sal_uInt16 nTmpLen(0);
1155  rIStm.ReadUInt16(nTmpLen);
1156  mnLen = nTmpLen;
1157  sal_Int32 nAryLen(0);
1158  rIStm.ReadInt32(nAryLen);
1159 
1160  if (mnLen > maStr.getLength() - mnIndex)
1161  {
1162  mnIndex = 0;
1163  mpDXAry = nullptr;
1164  return;
1165  }
1166 
1167  if( nAryLen )
1168  {
1169  // #i9762#, #106172# Ensure that DX array is at least mnLen entries long
1170  if ( mnLen >= nAryLen )
1171  {
1172  mpDXAry.reset( new (std::nothrow)long[ mnLen ] );
1173  if ( mpDXAry )
1174  {
1175  sal_Int32 i;
1176  sal_Int32 val;
1177  for( i = 0; i < nAryLen; i++ )
1178  {
1179  rIStm.ReadInt32( val);
1180  mpDXAry[ i ] = val;
1181  }
1182  // #106172# setup remainder
1183  for( ; i < mnLen; i++ )
1184  mpDXAry[ i ] = 0;
1185  }
1186  }
1187  else
1188  {
1189  mpDXAry = nullptr;
1190  return;
1191  }
1192  }
1193  else
1194  mpDXAry = nullptr;
1195 
1196  if ( aCompat.GetVersion() >= 2 ) // Version 2
1197  {
1199 
1200  if ( mnIndex + mnLen > maStr.getLength() )
1201  {
1202  mnIndex = 0;
1203  mpDXAry.reset();
1204  }
1205  }
1206 }
1207 
1210  mnWidth ( 0 ),
1211  mnIndex ( 0 ),
1212  mnLen ( 0 )
1213 {}
1214 
1216 {}
1217 
1219  const OUString& rStr,
1220  sal_Int32 nIndex, sal_Int32 nLen ) :
1222  maPt ( rPt ),
1223  maStr ( rStr ),
1224  mnWidth ( nWidth ),
1225  mnIndex ( nIndex ),
1226  mnLen ( nLen )
1227 {}
1228 
1230 {
1232 }
1233 
1235 {
1236  return new MetaStretchTextAction( *this );
1237 }
1238 
1239 void MetaStretchTextAction::Move( long nHorzMove, long nVertMove )
1240 {
1241  maPt.Move( nHorzMove, nVertMove );
1242 }
1243 
1244 void MetaStretchTextAction::Scale( double fScaleX, double fScaleY )
1245 {
1246  ImplScalePoint( maPt, fScaleX, fScaleY );
1247  mnWidth = static_cast<sal_uLong>(FRound( mnWidth * fabs(fScaleX) ));
1248 }
1249 
1251 {
1252  MetaAction::Write(rOStm, pData);
1253  VersionCompat aCompat(rOStm, StreamMode::WRITE, 2);
1254  WritePair( rOStm, maPt );
1255  rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet );
1256  rOStm.WriteUInt32( mnWidth );
1257  rOStm.WriteUInt16( mnIndex );
1258  rOStm.WriteUInt16( mnLen );
1259 
1261 }
1262 
1264 {
1265  VersionCompat aCompat(rIStm, StreamMode::READ);
1266  ReadPair( rIStm, maPt );
1267  maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
1268  rIStm.ReadUInt32( mnWidth );
1269  sal_uInt16 nTmpIndex(0);
1270  rIStm.ReadUInt16(nTmpIndex);
1271  mnIndex = nTmpIndex;
1272  sal_uInt16 nTmpLen(0);
1273  rIStm.ReadUInt16(nTmpLen);
1274  mnLen = nTmpLen;
1275 
1276  if ( aCompat.GetVersion() >= 2 ) // Version 2
1278 }
1279 
1282  mnStyle ( DrawTextFlags::NONE )
1283 {}
1284 
1286 {}
1287 
1289  const OUString& rStr, DrawTextFlags nStyle ) :
1291  maRect ( rRect ),
1292  maStr ( rStr ),
1293  mnStyle ( nStyle )
1294 {}
1295 
1297 {
1298  pOut->DrawText( maRect, maStr, mnStyle );
1299 }
1300 
1302 {
1303  return new MetaTextRectAction( *this );
1304 }
1305 
1306 void MetaTextRectAction::Move( long nHorzMove, long nVertMove )
1307 {
1308  maRect.Move( nHorzMove, nVertMove );
1309 }
1310 
1311 void MetaTextRectAction::Scale( double fScaleX, double fScaleY )
1312 {
1313  ImplScaleRect( maRect, fScaleX, fScaleY );
1314 }
1315 
1317 {
1318  MetaAction::Write(rOStm, pData);
1319  VersionCompat aCompat(rOStm, StreamMode::WRITE, 2);
1320  WriteRectangle( rOStm, maRect );
1321  rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet );
1322  rOStm.WriteUInt16( static_cast<sal_uInt16>(mnStyle) );
1323 
1325 }
1326 
1328 {
1329  VersionCompat aCompat(rIStm, StreamMode::READ);
1330  ReadRectangle( rIStm, maRect );
1331  maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
1332  sal_uInt16 nTmp;
1333  rIStm .ReadUInt16( nTmp );
1334  mnStyle = static_cast<DrawTextFlags>(nTmp);
1335 
1336  if ( aCompat.GetVersion() >= 2 ) // Version 2
1338 }
1339 
1342  mnWidth ( 0 ),
1343  meStrikeout ( STRIKEOUT_NONE ),
1344  meUnderline ( LINESTYLE_NONE ),
1345  meOverline ( LINESTYLE_NONE )
1346 {}
1347 
1349 {}
1350 
1352  FontStrikeout eStrikeout,
1353  FontLineStyle eUnderline,
1354  FontLineStyle eOverline ) :
1356  maPos ( rPos ),
1357  mnWidth ( nWidth ),
1358  meStrikeout ( eStrikeout ),
1359  meUnderline ( eUnderline ),
1360  meOverline ( eOverline )
1361 {}
1362 
1364 {
1366 }
1367 
1369 {
1370  return new MetaTextLineAction( *this );
1371 }
1372 
1373 void MetaTextLineAction::Move( long nHorzMove, long nVertMove )
1374 {
1375  maPos.Move( nHorzMove, nVertMove );
1376 }
1377 
1378 void MetaTextLineAction::Scale( double fScaleX, double fScaleY )
1379 {
1380  ImplScalePoint( maPos, fScaleX, fScaleY );
1381  mnWidth = FRound( mnWidth * fabs(fScaleX) );
1382 }
1383 
1385 {
1386  MetaAction::Write(rOStm, pData);
1387  VersionCompat aCompat(rOStm, StreamMode::WRITE, 2);
1388 
1389  WritePair( rOStm, maPos );
1390  rOStm.WriteInt32( mnWidth );
1391  rOStm.WriteUInt32( meStrikeout );
1392  rOStm.WriteUInt32( meUnderline );
1393  // new in version 2
1394  rOStm.WriteUInt32( meOverline );
1395 }
1396 
1398 {
1399  VersionCompat aCompat(rIStm, StreamMode::READ);
1400 
1401  sal_Int32 nTempWidth(0);
1402  ReadPair( rIStm, maPos );
1403  rIStm.ReadInt32(nTempWidth);
1404  mnWidth = nTempWidth;
1405 
1406  sal_uInt32 nTempStrikeout(0);
1407  rIStm.ReadUInt32( nTempStrikeout );
1408  meStrikeout = static_cast<FontStrikeout>(nTempStrikeout);
1409 
1410  sal_uInt32 nTempUnderline(0);
1411  rIStm.ReadUInt32( nTempUnderline );
1412  meUnderline = static_cast<FontLineStyle>(nTempUnderline);
1413 
1414  if (aCompat.GetVersion() >= 2)
1415  {
1416  sal_uInt32 nTempOverline(0);
1417  rIStm.ReadUInt32(nTempOverline);
1418  meOverline = static_cast<FontLineStyle>(nTempOverline);
1419  }
1420 }
1421 
1424 {}
1425 
1427 {}
1428 
1429 MetaBmpAction::MetaBmpAction( const Point& rPt, const Bitmap& rBmp ) :
1431  maBmp ( rBmp ),
1432  maPt ( rPt )
1433 {}
1434 
1436 {
1437  pOut->DrawBitmap( maPt, maBmp );
1438 }
1439 
1441 {
1442  return new MetaBmpAction( *this );
1443 }
1444 
1445 void MetaBmpAction::Move( long nHorzMove, long nVertMove )
1446 {
1447  maPt.Move( nHorzMove, nVertMove );
1448 }
1449 
1450 void MetaBmpAction::Scale( double fScaleX, double fScaleY )
1451 {
1452  ImplScalePoint( maPt, fScaleX, fScaleY );
1453 }
1454 
1456 {
1457  if( !!maBmp )
1458  {
1459  MetaAction::Write(rOStm, pData);
1460  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
1461  WriteDIB(maBmp, rOStm, false, true);
1462  WritePair( rOStm, maPt );
1463  }
1464 }
1465 
1467 {
1468  VersionCompat aCompat(rIStm, StreamMode::READ);
1469  ReadDIB(maBmp, rIStm, true);
1470  ReadPair( rIStm, maPt );
1471 }
1472 
1475 {}
1476 
1478 {}
1479 
1481  const Bitmap& rBmp ) :
1483  maBmp ( rBmp ),
1484  maPt ( rPt ),
1485  maSz ( rSz )
1486 {}
1487 
1489 {
1490  pOut->DrawBitmap( maPt, maSz, maBmp );
1491 }
1492 
1494 {
1495  return new MetaBmpScaleAction( *this );
1496 }
1497 
1498 void MetaBmpScaleAction::Move( long nHorzMove, long nVertMove )
1499 {
1500  maPt.Move( nHorzMove, nVertMove );
1501 }
1502 
1503 void MetaBmpScaleAction::Scale( double fScaleX, double fScaleY )
1504 {
1505  tools::Rectangle aRectangle(maPt, maSz);
1506  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1507  maPt = aRectangle.TopLeft();
1508  maSz = aRectangle.GetSize();
1509 }
1510 
1512 {
1513  if( !!maBmp )
1514  {
1515  MetaAction::Write(rOStm, pData);
1516  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
1517  WriteDIB(maBmp, rOStm, false, true);
1518  WritePair( rOStm, maPt );
1519  WritePair( rOStm, maSz );
1520  }
1521 }
1522 
1524 {
1525  VersionCompat aCompat(rIStm, StreamMode::READ);
1526  ReadDIB(maBmp, rIStm, true);
1527  ReadPair( rIStm, maPt );
1528  ReadPair( rIStm, maSz );
1529 }
1530 
1533 {}
1534 
1536 {}
1537 
1539  const Point& rSrcPt, const Size& rSrcSz,
1540  const Bitmap& rBmp ) :
1542  maBmp ( rBmp ),
1543  maDstPt ( rDstPt ),
1544  maDstSz ( rDstSz ),
1545  maSrcPt ( rSrcPt ),
1546  maSrcSz ( rSrcSz )
1547 {}
1548 
1550 {
1552 }
1553 
1555 {
1556  return new MetaBmpScalePartAction( *this );
1557 }
1558 
1559 void MetaBmpScalePartAction::Move( long nHorzMove, long nVertMove )
1560 {
1561  maDstPt.Move( nHorzMove, nVertMove );
1562 }
1563 
1564 void MetaBmpScalePartAction::Scale( double fScaleX, double fScaleY )
1565 {
1566  tools::Rectangle aRectangle(maDstPt, maDstSz);
1567  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1568  maDstPt = aRectangle.TopLeft();
1569  maDstSz = aRectangle.GetSize();
1570 }
1571 
1573 {
1574  if( !!maBmp )
1575  {
1576  MetaAction::Write(rOStm, pData);
1577  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
1578  WriteDIB(maBmp, rOStm, false, true);
1579  WritePair( rOStm, maDstPt );
1580  WritePair( rOStm, maDstSz );
1581  WritePair( rOStm, maSrcPt );
1582  WritePair( rOStm, maSrcSz );
1583  }
1584 }
1585 
1587 {
1588  VersionCompat aCompat(rIStm, StreamMode::READ);
1589  ReadDIB(maBmp, rIStm, true);
1590  ReadPair( rIStm, maDstPt );
1591  ReadPair( rIStm, maDstSz );
1592  ReadPair( rIStm, maSrcPt );
1593  ReadPair( rIStm, maSrcSz );
1594 }
1595 
1598 {}
1599 
1601 {}
1602 
1603 MetaBmpExAction::MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx ) :
1605  maBmpEx ( rBmpEx ),
1606  maPt ( rPt )
1607 {}
1608 
1610 {
1611  pOut->DrawBitmapEx( maPt, maBmpEx );
1612 }
1613 
1615 {
1616  return new MetaBmpExAction( *this );
1617 }
1618 
1619 void MetaBmpExAction::Move( long nHorzMove, long nVertMove )
1620 {
1621  maPt.Move( nHorzMove, nVertMove );
1622 }
1623 
1624 void MetaBmpExAction::Scale( double fScaleX, double fScaleY )
1625 {
1626  ImplScalePoint( maPt, fScaleX, fScaleY );
1627 }
1628 
1630 {
1631  if( !!maBmpEx.GetBitmap() )
1632  {
1633  MetaAction::Write(rOStm, pData);
1634  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
1635  WriteDIBBitmapEx(maBmpEx, rOStm);
1636  WritePair( rOStm, maPt );
1637  }
1638 }
1639 
1641 {
1642  VersionCompat aCompat(rIStm, StreamMode::READ);
1643  ReadDIBBitmapEx(maBmpEx, rIStm);
1644  ReadPair( rIStm, maPt );
1645 }
1646 
1649 {}
1650 
1652 {}
1653 
1655  const BitmapEx& rBmpEx ) :
1657  maBmpEx ( rBmpEx ),
1658  maPt ( rPt ),
1659  maSz ( rSz )
1660 {}
1661 
1663 {
1664  pOut->DrawBitmapEx( maPt, maSz, maBmpEx );
1665 }
1666 
1668 {
1669  return new MetaBmpExScaleAction( *this );
1670 }
1671 
1672 void MetaBmpExScaleAction::Move( long nHorzMove, long nVertMove )
1673 {
1674  maPt.Move( nHorzMove, nVertMove );
1675 }
1676 
1677 void MetaBmpExScaleAction::Scale( double fScaleX, double fScaleY )
1678 {
1679  tools::Rectangle aRectangle(maPt, maSz);
1680  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1681  maPt = aRectangle.TopLeft();
1682  maSz = aRectangle.GetSize();
1683 }
1684 
1686 {
1687  if( !!maBmpEx.GetBitmap() )
1688  {
1689  MetaAction::Write(rOStm, pData);
1690  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
1691  WriteDIBBitmapEx(maBmpEx, rOStm);
1692  WritePair( rOStm, maPt );
1693  WritePair( rOStm, maSz );
1694  }
1695 }
1696 
1698 {
1699  VersionCompat aCompat(rIStm, StreamMode::READ);
1700  ReadDIBBitmapEx(maBmpEx, rIStm);
1701  ReadPair( rIStm, maPt );
1702  ReadPair( rIStm, maSz );
1703 }
1704 
1707 {}
1708 
1710 {}
1711 
1713  const Point& rSrcPt, const Size& rSrcSz,
1714  const BitmapEx& rBmpEx ) :
1716  maBmpEx ( rBmpEx ),
1717  maDstPt ( rDstPt ),
1718  maDstSz ( rDstSz ),
1719  maSrcPt ( rSrcPt ),
1720  maSrcSz ( rSrcSz )
1721 {}
1722 
1724 {
1726 }
1727 
1729 {
1730  return new MetaBmpExScalePartAction( *this );
1731 }
1732 
1733 void MetaBmpExScalePartAction::Move( long nHorzMove, long nVertMove )
1734 {
1735  maDstPt.Move( nHorzMove, nVertMove );
1736 }
1737 
1738 void MetaBmpExScalePartAction::Scale( double fScaleX, double fScaleY )
1739 {
1740  tools::Rectangle aRectangle(maDstPt, maDstSz);
1741  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1742  maDstPt = aRectangle.TopLeft();
1743  maDstSz = aRectangle.GetSize();
1744 }
1745 
1747 {
1748  if( !!maBmpEx.GetBitmap() )
1749  {
1750  MetaAction::Write(rOStm, pData);
1751  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
1752  WriteDIBBitmapEx(maBmpEx, rOStm);
1753  WritePair( rOStm, maDstPt );
1754  WritePair( rOStm, maDstSz );
1755  WritePair( rOStm, maSrcPt );
1756  WritePair( rOStm, maSrcSz );
1757  }
1758 }
1759 
1761 {
1762  VersionCompat aCompat(rIStm, StreamMode::READ);
1763  ReadDIBBitmapEx(maBmpEx, rIStm);
1764  ReadPair( rIStm, maDstPt );
1765  ReadPair( rIStm, maDstSz );
1766  ReadPair( rIStm, maSrcPt );
1767  ReadPair( rIStm, maSrcSz );
1768 }
1769 
1772 {}
1773 
1775 {}
1776 
1778  const Bitmap& rBmp,
1779  const Color& rColor ) :
1781  maBmp ( rBmp ),
1782  maColor ( rColor ),
1783  maPt ( rPt )
1784 {}
1785 
1787 {
1788  pOut->DrawMask( maPt, maBmp, maColor );
1789 }
1790 
1792 {
1793  return new MetaMaskAction( *this );
1794 }
1795 
1796 void MetaMaskAction::Move( long nHorzMove, long nVertMove )
1797 {
1798  maPt.Move( nHorzMove, nVertMove );
1799 }
1800 
1801 void MetaMaskAction::Scale( double fScaleX, double fScaleY )
1802 {
1803  ImplScalePoint( maPt, fScaleX, fScaleY );
1804 }
1805 
1807 {
1808  if( !!maBmp )
1809  {
1810  MetaAction::Write(rOStm, pData);
1811  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
1812  WriteDIB(maBmp, rOStm, false, true);
1813  WritePair( rOStm, maPt );
1814  }
1815 }
1816 
1818 {
1819  VersionCompat aCompat(rIStm, StreamMode::READ);
1820  ReadDIB(maBmp, rIStm, true);
1821  ReadPair( rIStm, maPt );
1822 }
1823 
1826 {}
1827 
1829 {}
1830 
1832  const Bitmap& rBmp,
1833  const Color& rColor ) :
1835  maBmp ( rBmp ),
1836  maColor ( rColor ),
1837  maPt ( rPt ),
1838  maSz ( rSz )
1839 {}
1840 
1842 {
1843  pOut->DrawMask( maPt, maSz, maBmp, maColor );
1844 }
1845 
1847 {
1848  return new MetaMaskScaleAction( *this );
1849 }
1850 
1851 void MetaMaskScaleAction::Move( long nHorzMove, long nVertMove )
1852 {
1853  maPt.Move( nHorzMove, nVertMove );
1854 }
1855 
1856 void MetaMaskScaleAction::Scale( double fScaleX, double fScaleY )
1857 {
1858  tools::Rectangle aRectangle(maPt, maSz);
1859  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1860  maPt = aRectangle.TopLeft();
1861  maSz = aRectangle.GetSize();
1862 }
1863 
1865 {
1866  if( !!maBmp )
1867  {
1868  MetaAction::Write(rOStm, pData);
1869  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
1870  WriteDIB(maBmp, rOStm, false, true);
1871  WritePair( rOStm, maPt );
1872  WritePair( rOStm, maSz );
1873  }
1874 }
1875 
1877 {
1878  VersionCompat aCompat(rIStm, StreamMode::READ);
1879  ReadDIB(maBmp, rIStm, true);
1880  ReadPair( rIStm, maPt );
1881  ReadPair( rIStm, maSz );
1882 }
1883 
1886 {}
1887 
1889 {}
1890 
1892  const Point& rSrcPt, const Size& rSrcSz,
1893  const Bitmap& rBmp,
1894  const Color& rColor ) :
1896  maBmp ( rBmp ),
1897  maColor ( rColor ),
1898  maDstPt ( rDstPt ),
1899  maDstSz ( rDstSz ),
1900  maSrcPt ( rSrcPt ),
1901  maSrcSz ( rSrcSz )
1902 {}
1903 
1905 {
1907 }
1908 
1910 {
1911  return new MetaMaskScalePartAction( *this );
1912 }
1913 
1914 void MetaMaskScalePartAction::Move( long nHorzMove, long nVertMove )
1915 {
1916  maDstPt.Move( nHorzMove, nVertMove );
1917 }
1918 
1919 void MetaMaskScalePartAction::Scale( double fScaleX, double fScaleY )
1920 {
1921  tools::Rectangle aRectangle(maDstPt, maDstSz);
1922  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1923  maDstPt = aRectangle.TopLeft();
1924  maDstSz = aRectangle.GetSize();
1925 }
1926 
1928 {
1929  if( !!maBmp )
1930  {
1931  MetaAction::Write(rOStm, pData);
1932  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
1933  WriteDIB(maBmp, rOStm, false, true);
1934  rOStm.WriteUInt32(maColor.mValue);
1935  WritePair( rOStm, maDstPt );
1936  WritePair( rOStm, maDstSz );
1937  WritePair( rOStm, maSrcPt );
1938  WritePair( rOStm, maSrcSz );
1939  }
1940 }
1941 
1943 {
1944  VersionCompat aCompat(rIStm, StreamMode::READ);
1945  ReadDIB(maBmp, rIStm, true);
1946  rIStm.ReadUInt32(maColor.mValue);
1947  ReadPair( rIStm, maDstPt );
1948  ReadPair( rIStm, maDstSz );
1949  ReadPair( rIStm, maSrcPt );
1950  ReadPair( rIStm, maSrcSz );
1951 }
1952 
1955 {}
1956 
1958 {}
1959 
1962  maRect ( rRect ),
1963  maGradient ( rGradient )
1964 {}
1965 
1967 {
1968  pOut->DrawGradient( maRect, maGradient );
1969 }
1970 
1972 {
1973  return new MetaGradientAction( *this );
1974 }
1975 
1976 void MetaGradientAction::Move( long nHorzMove, long nVertMove )
1977 {
1978  maRect.Move( nHorzMove, nVertMove );
1979 }
1980 
1981 void MetaGradientAction::Scale( double fScaleX, double fScaleY )
1982 {
1983  ImplScaleRect( maRect, fScaleX, fScaleY );
1984 }
1985 
1987 {
1988  MetaAction::Write(rOStm, pData);
1989  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
1990  WriteRectangle( rOStm, maRect );
1991  TypeSerializer aSerializer(rOStm);
1992  aSerializer.writeGradient(maGradient);
1993 }
1994 
1996 {
1997  VersionCompat aCompat(rIStm, StreamMode::READ);
1998  ReadRectangle( rIStm, maRect );
1999  TypeSerializer aSerializer(rIStm);
2000  aSerializer.readGradient(maGradient);
2001 }
2002 
2005 {}
2006 
2009  maPolyPoly ( rPolyPoly ),
2010  maGradient ( rGradient )
2011 {}
2012 
2014 {}
2015 
2017 {
2018  if( pOut->GetConnectMetaFile() )
2019  {
2020  pOut->GetConnectMetaFile()->AddAction( this );
2021  }
2022 }
2023 
2025 {
2026  return new MetaGradientExAction( *this );
2027 }
2028 
2029 void MetaGradientExAction::Move( long nHorzMove, long nVertMove )
2030 {
2031  maPolyPoly.Move( nHorzMove, nVertMove );
2032 }
2033 
2034 void MetaGradientExAction::Scale( double fScaleX, double fScaleY )
2035 {
2036  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
2037  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
2038 }
2039 
2041 {
2042  MetaAction::Write(rOStm, pData);
2043  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2044 
2045  // #i105373# see comment at MetaTransparentAction::Write
2046  tools::PolyPolygon aNoCurvePolyPolygon;
2047  maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon);
2048 
2049  WritePolyPolygon( rOStm, aNoCurvePolyPolygon );
2050  TypeSerializer aSerializer(rOStm);
2051  aSerializer.writeGradient(maGradient);
2052 }
2053 
2055 {
2056  VersionCompat aCompat(rIStm, StreamMode::READ);
2057  ReadPolyPolygon( rIStm, maPolyPoly );
2058  TypeSerializer aSerializer(rIStm);
2059  aSerializer.readGradient(maGradient);
2060 }
2061 
2064 {}
2065 
2067 {}
2068 
2069 MetaHatchAction::MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ) :
2071  maPolyPoly ( rPolyPoly ),
2072  maHatch ( rHatch )
2073 {}
2074 
2076 {
2077  pOut->DrawHatch( maPolyPoly, maHatch );
2078 }
2079 
2081 {
2082  return new MetaHatchAction( *this );
2083 }
2084 
2085 void MetaHatchAction::Move( long nHorzMove, long nVertMove )
2086 {
2087  maPolyPoly.Move( nHorzMove, nVertMove );
2088 }
2089 
2090 void MetaHatchAction::Scale( double fScaleX, double fScaleY )
2091 {
2092  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
2093  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
2094 }
2095 
2097 {
2098  MetaAction::Write(rOStm, pData);
2099  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2100 
2101  // #i105373# see comment at MetaTransparentAction::Write
2102  tools::PolyPolygon aNoCurvePolyPolygon;
2103  maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon);
2104 
2105  WritePolyPolygon( rOStm, aNoCurvePolyPolygon );
2106  WriteHatch( rOStm, maHatch );
2107 }
2108 
2110 {
2111  VersionCompat aCompat(rIStm, StreamMode::READ);
2112  ReadPolyPolygon( rIStm, maPolyPoly );
2113  ReadHatch( rIStm, maHatch );
2114 }
2115 
2118 {}
2119 
2121 {}
2122 
2124  const Wallpaper& rPaper ) :
2126  maRect ( rRect ),
2127  maWallpaper ( rPaper )
2128 {}
2129 
2131 {
2132  pOut->DrawWallpaper( maRect, maWallpaper );
2133 }
2134 
2136 {
2137  return new MetaWallpaperAction( *this );
2138 }
2139 
2140 void MetaWallpaperAction::Move( long nHorzMove, long nVertMove )
2141 {
2142  maRect.Move( nHorzMove, nVertMove );
2143 }
2144 
2145 void MetaWallpaperAction::Scale( double fScaleX, double fScaleY )
2146 {
2147  ImplScaleRect( maRect, fScaleX, fScaleY );
2148 }
2149 
2151 {
2152  MetaAction::Write(rOStm, pData);
2153  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2154 
2155  WriteWallpaper( rOStm, maWallpaper );
2156 }
2157 
2159 {
2160  VersionCompat aCompat(rIStm, StreamMode::READ);
2161  ReadWallpaper( rIStm, maWallpaper );
2162 }
2163 
2166  mbClip ( false )
2167 {}
2168 
2170 {}
2171 
2174  maRegion ( rRegion ),
2175  mbClip ( bClip )
2176 {}
2177 
2179 {
2180  if( mbClip )
2181  pOut->SetClipRegion( maRegion );
2182  else
2183  pOut->SetClipRegion();
2184 }
2185 
2187 {
2188  return new MetaClipRegionAction( *this );
2189 }
2190 
2191 void MetaClipRegionAction::Move( long nHorzMove, long nVertMove )
2192 {
2193  maRegion.Move( nHorzMove, nVertMove );
2194 }
2195 
2196 void MetaClipRegionAction::Scale( double fScaleX, double fScaleY )
2197 {
2198  maRegion.Scale( fScaleX, fScaleY );
2199 }
2200 
2202 {
2203  MetaAction::Write(rOStm, pData);
2204  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2205 
2206  WriteRegion( rOStm, maRegion );
2207  rOStm.WriteBool( mbClip );
2208 }
2209 
2211 {
2212  VersionCompat aCompat(rIStm, StreamMode::READ);
2213  ReadRegion( rIStm, maRegion );
2214  rIStm.ReadCharAsBool( mbClip );
2215 }
2216 
2219 {}
2220 
2222 {}
2223 
2226  maRect ( rRect )
2227 {}
2228 
2230 {
2231  pOut->IntersectClipRegion( maRect );
2232 }
2233 
2235 {
2236  return new MetaISectRectClipRegionAction( *this );
2237 }
2238 
2239 void MetaISectRectClipRegionAction::Move( long nHorzMove, long nVertMove )
2240 {
2241  maRect.Move( nHorzMove, nVertMove );
2242 }
2243 
2244 void MetaISectRectClipRegionAction::Scale( double fScaleX, double fScaleY )
2245 {
2246  ImplScaleRect( maRect, fScaleX, fScaleY );
2247 }
2248 
2250 {
2251  MetaAction::Write(rOStm, pData);
2252  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2253  WriteRectangle( rOStm, maRect );
2254 }
2255 
2257 {
2258  VersionCompat aCompat(rIStm, StreamMode::READ);
2259  ReadRectangle( rIStm, maRect );
2260 }
2261 
2264 {}
2265 
2267 {}
2268 
2271  maRegion ( rRegion )
2272 {
2273 }
2274 
2276 {
2277  pOut->IntersectClipRegion( maRegion );
2278 }
2279 
2281 {
2282  return new MetaISectRegionClipRegionAction( *this );
2283 }
2284 
2285 void MetaISectRegionClipRegionAction::Move( long nHorzMove, long nVertMove )
2286 {
2287  maRegion.Move( nHorzMove, nVertMove );
2288 }
2289 
2290 void MetaISectRegionClipRegionAction::Scale( double fScaleX, double fScaleY )
2291 {
2292  maRegion.Scale( fScaleX, fScaleY );
2293 }
2294 
2296 {
2297  MetaAction::Write(rOStm, pData);
2298  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2299  WriteRegion( rOStm, maRegion );
2300 }
2301 
2303 {
2304  VersionCompat aCompat(rIStm, StreamMode::READ);
2305  ReadRegion( rIStm, maRegion );
2306 }
2307 
2310  mnHorzMove ( 0 ),
2311  mnVertMove ( 0 )
2312 {}
2313 
2315 {}
2316 
2317 MetaMoveClipRegionAction::MetaMoveClipRegionAction( long nHorzMove, long nVertMove ) :
2319  mnHorzMove ( nHorzMove ),
2320  mnVertMove ( nVertMove )
2321 {}
2322 
2324 {
2326 }
2327 
2329 {
2330  return new MetaMoveClipRegionAction( *this );
2331 }
2332 
2333 void MetaMoveClipRegionAction::Scale( double fScaleX, double fScaleY )
2334 {
2335  mnHorzMove = FRound( mnHorzMove * fScaleX );
2336  mnVertMove = FRound( mnVertMove * fScaleY );
2337 }
2338 
2340 {
2341  MetaAction::Write(rOStm, pData);
2342  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2344 }
2345 
2347 {
2348  VersionCompat aCompat(rIStm, StreamMode::READ);
2349  sal_Int32 nTmpHM(0), nTmpVM(0);
2350  rIStm.ReadInt32( nTmpHM ).ReadInt32( nTmpVM );
2351  mnHorzMove = nTmpHM;
2352  mnVertMove = nTmpVM;
2353 }
2354 
2357  mbSet ( false )
2358 {}
2359 
2361 {}
2362 
2365  maColor ( rColor ),
2366  mbSet ( bSet )
2367 {}
2368 
2370 {
2371  if( mbSet )
2372  pOut->SetLineColor( maColor );
2373  else
2374  pOut->SetLineColor();
2375 }
2376 
2378 {
2379  return new MetaLineColorAction( *this );
2380 }
2381 
2383 {
2384  MetaAction::Write(rOStm, pData);
2385  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2386  rOStm.WriteUInt32(maColor.mValue);
2387  rOStm.WriteBool( mbSet );
2388 }
2389 
2391 {
2392  VersionCompat aCompat(rIStm, StreamMode::READ);
2393  rIStm.ReadUInt32(maColor.mValue);
2394  rIStm.ReadCharAsBool( mbSet );
2395 }
2396 
2399  mbSet ( false )
2400 {}
2401 
2403 {}
2404 
2407  maColor ( rColor ),
2408  mbSet ( bSet )
2409 {}
2410 
2412 {
2413  if( mbSet )
2414  pOut->SetFillColor( maColor );
2415  else
2416  pOut->SetFillColor();
2417 }
2418 
2420 {
2421  return new MetaFillColorAction( *this );
2422 }
2423 
2425 {
2426  MetaAction::Write(rOStm, pData);
2427  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2428  rOStm.WriteUInt32(maColor.mValue);
2429  rOStm.WriteBool( mbSet );
2430 }
2431 
2433 {
2434  VersionCompat aCompat(rIStm, StreamMode::READ);
2435  rIStm.ReadUInt32(maColor.mValue);
2436  rIStm.ReadCharAsBool( mbSet );
2437 }
2438 
2441 {}
2442 
2444 {}
2445 
2448  maColor ( rColor )
2449 {}
2450 
2452 {
2453  pOut->SetTextColor( maColor );
2454 }
2455 
2457 {
2458  return new MetaTextColorAction( *this );
2459 }
2460 
2462 {
2463  MetaAction::Write(rOStm, pData);
2464  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2465  rOStm.WriteUInt32(maColor.mValue);
2466 }
2467 
2469 {
2470  VersionCompat aCompat(rIStm, StreamMode::READ);
2471  rIStm.ReadUInt32(maColor.mValue);
2472 }
2473 
2476  mbSet ( false )
2477 {}
2478 
2480 {}
2481 
2484  maColor ( rColor ),
2485  mbSet ( bSet )
2486 {}
2487 
2489 {
2490  if( mbSet )
2491  pOut->SetTextFillColor( maColor );
2492  else
2493  pOut->SetTextFillColor();
2494 }
2495 
2497 {
2498  return new MetaTextFillColorAction( *this );
2499 }
2500 
2502 {
2503  MetaAction::Write(rOStm, pData);
2504  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2505  rOStm.WriteUInt32(maColor.mValue);
2506  rOStm.WriteBool( mbSet );
2507 }
2508 
2510 {
2511  VersionCompat aCompat(rIStm, StreamMode::READ);
2512  rIStm.ReadUInt32(maColor.mValue);
2513  rIStm.ReadCharAsBool( mbSet );
2514 }
2515 
2518  mbSet ( false )
2519 {}
2520 
2522 {}
2523 
2526  maColor ( rColor ),
2527  mbSet ( bSet )
2528 {}
2529 
2531 {
2532  if( mbSet )
2533  pOut->SetTextLineColor( maColor );
2534  else
2535  pOut->SetTextLineColor();
2536 }
2537 
2539 {
2540  return new MetaTextLineColorAction( *this );
2541 }
2542 
2544 {
2545  MetaAction::Write(rOStm, pData);
2546  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2547  rOStm.WriteUInt32(maColor.mValue);
2548  rOStm.WriteBool( mbSet );
2549 }
2550 
2552 {
2553  VersionCompat aCompat(rIStm, StreamMode::READ);
2554  rIStm.ReadUInt32(maColor.mValue);
2555  rIStm.ReadCharAsBool( mbSet );
2556 }
2557 
2560  mbSet ( false )
2561 {}
2562 
2564 {}
2565 
2568  maColor ( rColor ),
2569  mbSet ( bSet )
2570 {}
2571 
2573 {
2574  if( mbSet )
2575  pOut->SetOverlineColor( maColor );
2576  else
2577  pOut->SetOverlineColor();
2578 }
2579 
2581 {
2582  return new MetaOverlineColorAction( *this );
2583 }
2584 
2586 {
2587  MetaAction::Write(rOStm, pData);
2588  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2589  rOStm.WriteUInt32(maColor.mValue);
2590  rOStm.WriteBool( mbSet );
2591 }
2592 
2594 {
2595  VersionCompat aCompat(rIStm, StreamMode::READ);
2596  rIStm.ReadUInt32(maColor.mValue);
2597  rIStm.ReadCharAsBool( mbSet );
2598 }
2599 
2602  maAlign ( ALIGN_TOP )
2603 {}
2604 
2606 {}
2607 
2610  maAlign ( aAlign )
2611 {}
2612 
2614 {
2615  pOut->SetTextAlign( maAlign );
2616 }
2617 
2619 {
2620  return new MetaTextAlignAction( *this );
2621 }
2622 
2624 {
2625  MetaAction::Write(rOStm, pData);
2626  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2627  rOStm.WriteUInt16( maAlign );
2628 }
2629 
2631 {
2632  sal_uInt16 nTmp16(0);
2633 
2634  VersionCompat aCompat(rIStm, StreamMode::READ);
2635  rIStm.ReadUInt16( nTmp16 ); maAlign = static_cast<TextAlign>(nTmp16);
2636 }
2637 
2640 {}
2641 
2643 {}
2644 
2647  maMapMode ( rMapMode )
2648 {}
2649 
2651 {
2652  pOut->SetMapMode( maMapMode );
2653 }
2654 
2656 {
2657  return new MetaMapModeAction( *this );
2658 }
2659 
2660 void MetaMapModeAction::Scale( double fScaleX, double fScaleY )
2661 {
2662  Point aPoint( maMapMode.GetOrigin() );
2663 
2664  ImplScalePoint( aPoint, fScaleX, fScaleY );
2665  maMapMode.SetOrigin( aPoint );
2666 }
2667 
2669 {
2670  MetaAction::Write(rOStm, pData);
2671  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2672  WriteMapMode( rOStm, maMapMode );
2673 }
2674 
2676 {
2677  VersionCompat aCompat(rIStm, StreamMode::READ);
2678  ReadMapMode( rIStm, maMapMode );
2679 }
2680 
2683 {}
2684 
2686 {}
2687 
2690  maFont ( rFont )
2691 {
2692  // #96876: because RTL_TEXTENCODING_SYMBOL is often set at the StarSymbol font,
2693  // we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems
2694  // to be the right way; changing the textencoding at other sources
2695  // is too dangerous at the moment
2697  && ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) )
2698  {
2699  maFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
2700  }
2701 }
2702 
2704 {
2705  pOut->SetFont( maFont );
2706 }
2707 
2709 {
2710  return new MetaFontAction( *this );
2711 }
2712 
2713 void MetaFontAction::Scale( double fScaleX, double fScaleY )
2714 {
2715  const Size aSize(
2716  FRound(maFont.GetFontSize().Width() * fabs(fScaleX)),
2717  FRound(maFont.GetFontSize().Height() * fabs(fScaleY)));
2718  maFont.SetFontSize( aSize );
2719 }
2720 
2722 {
2723  MetaAction::Write(rOStm, pData);
2724  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2725  WriteFont( rOStm, maFont );
2726  pData->meActualCharSet = maFont.GetCharSet();
2727  if ( pData->meActualCharSet == RTL_TEXTENCODING_DONTKNOW )
2728  pData->meActualCharSet = osl_getThreadTextEncoding();
2729 }
2730 
2732 {
2733  VersionCompat aCompat(rIStm, StreamMode::READ);
2734  ReadFont( rIStm, maFont );
2735  pData->meActualCharSet = maFont.GetCharSet();
2736  if ( pData->meActualCharSet == RTL_TEXTENCODING_DONTKNOW )
2737  pData->meActualCharSet = osl_getThreadTextEncoding();
2738 }
2739 
2742  mnFlags ( PushFlags::NONE )
2743 {}
2744 
2746 {}
2747 
2750  mnFlags ( nFlags )
2751 {}
2752 
2754 {
2755  pOut->Push( mnFlags );
2756 }
2757 
2759 {
2760  return new MetaPushAction( *this );
2761 }
2762 
2764 {
2765  MetaAction::Write(rOStm, pData);
2766  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2767  rOStm.WriteUInt16( static_cast<sal_uInt16>(mnFlags) );
2768 }
2769 
2771 {
2772  VersionCompat aCompat(rIStm, StreamMode::READ);
2773  sal_uInt16 tmp;
2774  rIStm.ReadUInt16( tmp );
2775  mnFlags = static_cast<PushFlags>(tmp);
2776 }
2777 
2780 {}
2781 
2783 {}
2784 
2786 {
2787  pOut->Pop();
2788 }
2789 
2791 {
2792  return new MetaPopAction( *this );
2793 }
2794 
2796 {
2797  MetaAction::Write(rOStm, pData);
2798  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2799 }
2800 
2802 {
2803  VersionCompat aCompat(rIStm, StreamMode::READ);
2804 }
2805 
2808  meRasterOp ( RasterOp::OverPaint )
2809 {}
2810 
2812 {}
2813 
2816  meRasterOp ( eRasterOp )
2817 {
2818 }
2819 
2821 {
2822  pOut->SetRasterOp( meRasterOp );
2823 }
2824 
2826 {
2827  return new MetaRasterOpAction( *this );
2828 }
2829 
2831 {
2832  MetaAction::Write(rOStm, pData);
2833  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2834  rOStm.WriteUInt16( static_cast<sal_uInt16>(meRasterOp) );
2835 }
2836 
2838 {
2839  sal_uInt16 nTmp16(0);
2840 
2841  VersionCompat aCompat(rIStm, StreamMode::READ);
2842  rIStm.ReadUInt16( nTmp16 ); meRasterOp = static_cast<RasterOp>(nTmp16);
2843 }
2844 
2847  mnTransPercent ( 0 )
2848 {}
2849 
2851 {}
2852 
2853 MetaTransparentAction::MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ) :
2855  maPolyPoly ( rPolyPoly ),
2856  mnTransPercent ( nTransPercent )
2857 {}
2858 
2860 {
2862 }
2863 
2865 {
2866  return new MetaTransparentAction( *this );
2867 }
2868 
2869 void MetaTransparentAction::Move( long nHorzMove, long nVertMove )
2870 {
2871  maPolyPoly.Move( nHorzMove, nVertMove );
2872 }
2873 
2874 void MetaTransparentAction::Scale( double fScaleX, double fScaleY )
2875 {
2876  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
2877  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
2878 }
2879 
2881 {
2882  MetaAction::Write(rOStm, pData);
2883  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2884 
2885  // #i105373# The tools::PolyPolygon in this action may be a curve; this
2886  // was ignored until now what is an error. To make older office
2887  // versions work with MetaFiles, i opt for applying AdaptiveSubdivide
2888  // to the PolyPolygon.
2889  // The alternative would be to really write the curve information
2890  // like in MetaPolyPolygonAction::Write (where someone extended it
2891  // correctly, but not here :-( ).
2892  // The golden solution would be to combine both, but i think it's
2893  // not necessary; a good subdivision will be sufficient.
2894  tools::PolyPolygon aNoCurvePolyPolygon;
2895  maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon);
2896 
2897  WritePolyPolygon( rOStm, aNoCurvePolyPolygon );
2898  rOStm.WriteUInt16( mnTransPercent );
2899 }
2900 
2902 {
2903  VersionCompat aCompat(rIStm, StreamMode::READ);
2904  ReadPolyPolygon( rIStm, maPolyPoly );
2905  rIStm.ReadUInt16( mnTransPercent );
2906 }
2907 
2910 {}
2911 
2913 {}
2914 
2916  const Size& rSize, const Gradient& rGradient ) :
2918  maMtf ( rMtf ),
2919  maPoint ( rPos ),
2920  maSize ( rSize ),
2921  maGradient ( rGradient )
2922 {}
2923 
2925 {
2927 }
2928 
2930 {
2931  return new MetaFloatTransparentAction( *this );
2932 }
2933 
2934 void MetaFloatTransparentAction::Move( long nHorzMove, long nVertMove )
2935 {
2936  maPoint.Move( nHorzMove, nVertMove );
2937 }
2938 
2939 void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY )
2940 {
2941  tools::Rectangle aRectangle(maPoint, maSize);
2942  ImplScaleRect( aRectangle, fScaleX, fScaleY );
2943  maPoint = aRectangle.TopLeft();
2944  maSize = aRectangle.GetSize();
2945 }
2946 
2948 {
2949  MetaAction::Write(rOStm, pData);
2950  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
2951 
2952  maMtf.Write( rOStm );
2953  WritePair( rOStm, maPoint );
2954  WritePair( rOStm, maSize );
2955 
2956  TypeSerializer aSerializer(rOStm);
2957  aSerializer.writeGradient(maGradient);
2958 }
2959 
2961 {
2962  VersionCompat aCompat(rIStm, StreamMode::READ);
2963  ReadGDIMetaFile(rIStm, maMtf, pData);
2964  ReadPair( rIStm, maPoint );
2965  ReadPair( rIStm, maSize );
2966  TypeSerializer aSerializer(rIStm);
2967  aSerializer.readGradient(maGradient);
2968 }
2969 
2972 {}
2973 
2975 {}
2976 
2977 MetaEPSAction::MetaEPSAction( const Point& rPoint, const Size& rSize,
2978  const GfxLink& rGfxLink, const GDIMetaFile& rSubst ) :
2980  maGfxLink ( rGfxLink ),
2981  maSubst ( rSubst ),
2982  maPoint ( rPoint ),
2983  maSize ( rSize )
2984 {}
2985 
2987 {
2988  pOut->DrawEPS( maPoint, maSize, maGfxLink, &maSubst );
2989 }
2990 
2992 {
2993  return new MetaEPSAction( *this );
2994 }
2995 
2996 void MetaEPSAction::Move( long nHorzMove, long nVertMove )
2997 {
2998  maPoint.Move( nHorzMove, nVertMove );
2999 }
3000 
3001 void MetaEPSAction::Scale( double fScaleX, double fScaleY )
3002 {
3003  tools::Rectangle aRectangle(maPoint, maSize);
3004  ImplScaleRect( aRectangle, fScaleX, fScaleY );
3005  maPoint = aRectangle.TopLeft();
3006  maSize = aRectangle.GetSize();
3007 }
3008 
3010 {
3011  MetaAction::Write(rOStm, pData);
3012  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
3013 
3014  WriteGfxLink( rOStm, maGfxLink );
3015  WritePair( rOStm, maPoint );
3016  WritePair( rOStm, maSize );
3017  maSubst.Write( rOStm );
3018 }
3019 
3021 {
3022  VersionCompat aCompat(rIStm, StreamMode::READ);
3023  ReadGfxLink( rIStm, maGfxLink );
3024  ReadPair( rIStm, maPoint );
3025  ReadPair( rIStm, maSize );
3026  ReadGDIMetaFile( rIStm, maSubst );
3027 }
3028 
3031  mbSet ( false )
3032 {}
3033 
3035 {}
3036 
3037 MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, bool bSet ) :
3039  maRefPoint ( rRefPoint ),
3040  mbSet ( bSet )
3041 {}
3042 
3044 {
3045  if( mbSet )
3046  pOut->SetRefPoint( maRefPoint );
3047  else
3048  pOut->SetRefPoint();
3049 }
3050 
3052 {
3053  return new MetaRefPointAction( *this );
3054 }
3055 
3057 {
3058  MetaAction::Write(rOStm, pData);
3059  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
3060 
3061  WritePair( rOStm, maRefPoint );
3062  rOStm.WriteBool( mbSet );
3063 }
3064 
3066 {
3067  VersionCompat aCompat(rIStm, StreamMode::READ);
3068  ReadPair( rIStm, maRefPoint ).ReadCharAsBool( mbSet );
3069 }
3070 
3073  mnValue ( 0 )
3074 {
3075  ImplInitDynamicData( nullptr, 0UL );
3076 }
3077 
3080  maComment ( rAct.maComment ),
3081  mnValue ( rAct.mnValue )
3082 {
3083  ImplInitDynamicData( rAct.mpData.get(), rAct.mnDataSize );
3084 }
3085 
3086 MetaCommentAction::MetaCommentAction( const OString& rComment, sal_Int32 nValue, const sal_uInt8* pData, sal_uInt32 nDataSize ) :
3088  maComment ( rComment ),
3089  mnValue ( nValue )
3090 {
3091  ImplInitDynamicData( pData, nDataSize );
3092 }
3093 
3095 {
3096 }
3097 
3098 void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize )
3099 {
3100  if ( nDataSize && pData )
3101  {
3102  mnDataSize = nDataSize;
3103  mpData.reset( new sal_uInt8[ mnDataSize ] );
3104  memcpy( mpData.get(), pData, mnDataSize );
3105  }
3106  else
3107  {
3108  mnDataSize = 0;
3109  mpData = nullptr;
3110  }
3111 }
3112 
3114 {
3115  if ( pOut->GetConnectMetaFile() )
3116  {
3117  pOut->GetConnectMetaFile()->AddAction( this );
3118  }
3119 }
3120 
3122 {
3123  return new MetaCommentAction( *this );
3124 }
3125 
3126 void MetaCommentAction::Move( long nXMove, long nYMove )
3127 {
3128  if ( nXMove || nYMove )
3129  {
3130  if ( mnDataSize && mpData )
3131  {
3132  bool bPathStroke = (maComment == "XPATHSTROKE_SEQ_BEGIN");
3133  if ( bPathStroke || maComment == "XPATHFILL_SEQ_BEGIN" )
3134  {
3135  SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
3136  SvMemoryStream aDest;
3137  if ( bPathStroke )
3138  {
3139  SvtGraphicStroke aStroke;
3140  ReadSvtGraphicStroke( aMemStm, aStroke );
3141 
3142  tools::Polygon aPath;
3143  aStroke.getPath( aPath );
3144  aPath.Move( nXMove, nYMove );
3145  aStroke.setPath( aPath );
3146 
3147  tools::PolyPolygon aStartArrow;
3148  aStroke.getStartArrow(aStartArrow);
3149  aStartArrow.Move(nXMove, nYMove);
3150  aStroke.setStartArrow(aStartArrow);
3151 
3152  tools::PolyPolygon aEndArrow;
3153  aStroke.getEndArrow(aEndArrow);
3154  aEndArrow.Move(nXMove, nYMove);
3155  aStroke.setEndArrow(aEndArrow);
3156 
3157  WriteSvtGraphicStroke( aDest, aStroke );
3158  }
3159  else
3160  {
3161  SvtGraphicFill aFill;
3162  ReadSvtGraphicFill( aMemStm, aFill );
3163 
3164  tools::PolyPolygon aPath;
3165  aFill.getPath( aPath );
3166  aPath.Move( nXMove, nYMove );
3167  aFill.setPath( aPath );
3168 
3169  WriteSvtGraphicFill( aDest, aFill );
3170  }
3171  mpData.reset();
3172  ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
3173  }
3174  }
3175  }
3176 }
3177 
3178 // SJ: 25.07.06 #i56656# we are not able to mirror certain kind of
3179 // comments properly, especially the XPATHSTROKE and XPATHFILL lead to
3180 // problems, so it is better to remove these comments when mirroring
3181 // FIXME: fake comment to apply the next hunk in the right location
3182 void MetaCommentAction::Scale( double fXScale, double fYScale )
3183 {
3184  if ( ( fXScale != 1.0 ) || ( fYScale != 1.0 ) )
3185  {
3186  if ( mnDataSize && mpData )
3187  {
3188  bool bPathStroke = (maComment == "XPATHSTROKE_SEQ_BEGIN");
3189  if ( bPathStroke || maComment == "XPATHFILL_SEQ_BEGIN" )
3190  {
3191  SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
3192  SvMemoryStream aDest;
3193  if ( bPathStroke )
3194  {
3195  SvtGraphicStroke aStroke;
3196  ReadSvtGraphicStroke( aMemStm, aStroke );
3197  aStroke.scale( fXScale, fYScale );
3198  WriteSvtGraphicStroke( aDest, aStroke );
3199  }
3200  else
3201  {
3202  SvtGraphicFill aFill;
3203  ReadSvtGraphicFill( aMemStm, aFill );
3204  tools::PolyPolygon aPath;
3205  aFill.getPath( aPath );
3206  aPath.Scale( fXScale, fYScale );
3207  aFill.setPath( aPath );
3208  WriteSvtGraphicFill( aDest, aFill );
3209  }
3210  mpData.reset();
3211  ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
3212  } else if( maComment == "EMF_PLUS_HEADER_INFO" ){
3213  SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
3214  SvMemoryStream aDest;
3215 
3216  sal_Int32 nLeft(0), nRight(0), nTop(0), nBottom(0);
3217  sal_Int32 nPixX(0), nPixY(0), nMillX(0), nMillY(0);
3218  float m11(0), m12(0), m21(0), m22(0), mdx(0), mdy(0);
3219 
3220  // read data
3221  aMemStm.ReadInt32( nLeft ).ReadInt32( nTop ).ReadInt32( nRight ).ReadInt32( nBottom );
3222  aMemStm.ReadInt32( nPixX ).ReadInt32( nPixY ).ReadInt32( nMillX ).ReadInt32( nMillY );
3223  aMemStm.ReadFloat( m11 ).ReadFloat( m12 ).ReadFloat( m21 ).ReadFloat( m22 ).ReadFloat( mdx ).ReadFloat( mdy );
3224 
3225  // add scale to the transformation
3226  m11 *= fXScale;
3227  m12 *= fXScale;
3228  m22 *= fYScale;
3229  m21 *= fYScale;
3230 
3231  // prepare new data
3232  aDest.WriteInt32( nLeft ).WriteInt32( nTop ).WriteInt32( nRight ).WriteInt32( nBottom );
3233  aDest.WriteInt32( nPixX ).WriteInt32( nPixY ).WriteInt32( nMillX ).WriteInt32( nMillY );
3234  aDest.WriteFloat( m11 ).WriteFloat( m12 ).WriteFloat( m21 ).WriteFloat( m22 ).WriteFloat( mdx ).WriteFloat( mdy );
3235 
3236  // save them
3237  ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
3238  }
3239  }
3240  }
3241 }
3242 
3244 {
3245  MetaAction::Write(rOStm, pData);
3246  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
3249 
3250  if ( mnDataSize )
3251  rOStm.WriteBytes( mpData.get(), mnDataSize );
3252 }
3253 
3255 {
3256  VersionCompat aCompat(rIStm, StreamMode::READ);
3258  rIStm.ReadInt32( mnValue ).ReadUInt32( mnDataSize );
3259 
3260  if (mnDataSize > rIStm.remainingSize())
3261  {
3262  SAL_WARN("vcl.gdi", "Parsing error: " << rIStm.remainingSize() <<
3263  " available data, but " << mnDataSize << " claimed, truncating");
3264  mnDataSize = rIStm.remainingSize();
3265  }
3266 
3267  SAL_INFO("vcl.gdi", "MetaCommentAction::Read " << maComment);
3268 
3269  mpData.reset();
3270 
3271  if( mnDataSize )
3272  {
3273  mpData.reset(new sal_uInt8[ mnDataSize ]);
3274  rIStm.ReadBytes(mpData.get(), mnDataSize);
3275  }
3276 }
3277 
3280  mnLayoutMode( ComplexTextLayoutFlags::Default )
3281 {}
3282 
3284 {}
3285 
3288  mnLayoutMode( nLayoutMode )
3289 {}
3290 
3292 {
3293  pOut->SetLayoutMode( mnLayoutMode );
3294 }
3295 
3297 {
3298  return new MetaLayoutModeAction( *this );
3299 }
3300 
3302 {
3303  MetaAction::Write(rOStm, pData);
3304  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
3305  rOStm.WriteUInt32( static_cast<sal_uInt32>(mnLayoutMode) );
3306 }
3307 
3309 {
3310  VersionCompat aCompat(rIStm, StreamMode::READ);
3311  sal_uInt32 tmp;
3312  rIStm.ReadUInt32( tmp );
3313  mnLayoutMode = static_cast<ComplexTextLayoutFlags>(tmp);
3314 }
3315 
3318  meTextLanguage( LANGUAGE_DONTKNOW )
3319 {}
3320 
3322 {}
3323 
3326  meTextLanguage( eTextLanguage )
3327 {}
3328 
3330 {
3332 }
3333 
3335 {
3336  return new MetaTextLanguageAction( *this );
3337 }
3338 
3340 {
3341  MetaAction::Write(rOStm, pData);
3342  VersionCompat aCompat(rOStm, StreamMode::WRITE, 1);
3343  rOStm.WriteUInt16( static_cast<sal_uInt16>(meTextLanguage) );
3344 }
3345 
3347 {
3348  VersionCompat aCompat(rIStm, StreamMode::READ);
3349  sal_uInt16 nTmp = 0;
3350  rIStm.ReadUInt16( nTmp );
3351  meTextLanguage = static_cast<LanguageType>(nTmp);
3352 }
3353 
3354 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:471
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1846
sal_uInt16 Count() const
SvStream & WriteBool(bool b)
Point TopLeft() const
virtual ~MetaRectAction() override
Definition: metaact.cxx:443
long Width() const
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2623
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:3001
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:779
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1927
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:2285
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:602
virtual void Execute(OutputDevice *pOut)
Definition: metaact.cxx:168
void SetDigitLanguage(LanguageType)
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1667
GfxLink maGfxLink
Definition: metaact.hxx:1567
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1105
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:742
virtual ~MetaStretchTextAction() override
Definition: metaact.cxx:1215
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1760
Definition: hatch.hxx:44
GDIMetaFile maSubst
Definition: metaact.hxx:1568
SvStream & ReadRectangle(SvStream &rIStream, tools::Rectangle &rRect)
const tools::Polygon & GetObject(sal_uInt16 nPos) const
void SetFontSize(const Size &)
Definition: font/font.cxx:116
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1327
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2630
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2650
void setStartArrow(const tools::PolyPolygon &)
Set the polygon that is put at the start of the line.
SvStream & WriteHatch(SvStream &rOStm, const Hatch &rHatch)
Definition: gdi/hatch.cxx:97
virtual ~MetaGradientAction() override
Definition: metaact.cxx:1957
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2229
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:511
bool ReadDIB(Bitmap &rTarget, SvStream &rIStm, bool bFileHeader, bool bMSOFormat)
Definition: dibtools.cxx:1734
rtl_TextEncoding meActualCharSet
Definition: metaact.hxx:46
const OUString & GetFamilyName() const
Definition: font/font.cxx:666
virtual ~MetaISectRegionClipRegionAction() override
Definition: metaact.cxx:2266
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:776
Bitmap maBmp
Definition: metaact.hxx:848
SvStream & WritePolygon(SvStream &rOStream, const tools::Polygon &rPoly)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:768
virtual ~MetaPushAction() override
Definition: metaact.cxx:2745
static MetaAction * ReadMetaAction(SvStream &rIStm, ImplMetaReadData *pData)
Definition: metaact.cxx:195
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1455
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:917
virtual ~MetaEllipseAction() override
Definition: metaact.cxx:541
SvStream & WriteUInt16(sal_uInt16 nUInt16)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2924
long FRound(double fVal)
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:2660
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2613
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1981
SvStream & ReadPolyPolygon(SvStream &rIStream, tools::PolyPolygon &rPolyPoly)
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:344
SvStream & WriteInt32(sal_Int32 nInt32)
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2432
virtual ~MetaMaskAction() override
Definition: metaact.cxx:1774
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:2290
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2864
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:3334
virtual ~MetaPieAction() override
Definition: metaact.cxx:642
virtual ~MetaTextAction() override
Definition: metaact.cxx:996
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2016
SvStream & WriteMapMode(SvStream &rOStm, const MapMode &rMapMode)
Definition: mapmod.cxx:149
long Height() const
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:478
Point maEndPt
Definition: metaact.hxx:313
void Write(SvStream &rOStream) const
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:792
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:2034
virtual ~MetaCommentAction() override
Definition: metaact.cxx:3094
RECT
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1677
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2580
SvStream & WriteSvtGraphicStroke(SvStream &rOStm, const SvtGraphicStroke &rClass)
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2825
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:2869
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2703
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1738
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2382
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1234
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1791
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1549
Point maStartPt
Definition: metaact.hxx:312
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1368
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1023
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2280
SvStream & ReadPolygon(SvStream &rIStream, tools::Polygon &rPoly)
sal_uIntPtr sal_uLong
OUString maStr
Definition: metaact.hxx:465
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1876
virtual ~MetaPolyLineAction() override
Definition: metaact.cxx:754
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2275
virtual ~MetaBmpExAction() override
Definition: metaact.cxx:1600
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:1851
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:414
tools::Rectangle maRect
Definition: metaact.hxx:1049
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:1110
SvStream & WriteFont(SvStream &rOStm, const vcl::Font &rFont)
Definition: font/font.cxx:447
SvStream & ReadCharAsBool(bool &rBool)
virtual ~MetaWallpaperAction() override
Definition: metaact.cxx:2120
void DrawPolygon(const tools::Polygon &rPoly)
Render the given polygon.
Definition: polygon.cxx:156
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2618
sal_Int32 mnIndex
Definition: metaact.hxx:466
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2830
Encapsulates geometry and associated attributes of a graphical 'pen stroke'.
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:523
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1746
void DrawChord(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2256
void Scale(double fScaleX, double fScaleY)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2986
void DrawPolyLine(const tools::Polygon &rPoly)
Render the given polygon as a line stroke.
Definition: polyline.cxx:33
DrawTextFlags mnStyle
Definition: metaact.hxx:577
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1008
void SetTextFillColor()
Definition: text.cxx:697
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2538
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2551
virtual ~MetaEPSAction() override
Definition: metaact.cxx:2974
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2346
void SetLayoutMode(ComplexTextLayoutFlags nTextLayoutMode)
virtual ~MetaGradientExAction() override
Definition: metaact.cxx:2013
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:1306
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:436
void IntersectClipRegion(const tools::Rectangle &rRect)
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:417
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:1976
void SetCharSet(rtl_TextEncoding)
Definition: font/font.cxx:128
tools::Polygon maPoly
Definition: metaact.hxx:408
sal_uInt32 mValue
sal_uInt32 mnIndex
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:630
virtual ~MetaMaskScaleAction() override
Definition: metaact.cxx:1828
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:2029
SvStream & ReadSvtGraphicStroke(SvStream &rIStm, SvtGraphicStroke &rClass)
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:3020
Point maEndPt
Definition: metaact.hxx:280
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:658
void DrawMask(const Point &rDestPt, const Bitmap &rBitmap, const Color &rMaskColor)
Definition: mask.cxx:30
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:2191
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:349
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1986
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1100
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1856
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1363
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:3243
virtual ~MetaPointAction() override
Definition: metaact.cxx:326
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:456
void SetMapMode()
Definition: map.cxx:655
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:663
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1697
SvStream & ReadSvtGraphicFill(SvStream &rIStm, SvtGraphicFill &rClass)
virtual ~MetaTextLanguageAction() override
Definition: metaact.cxx:3321
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2468
virtual ~MetaISectRectClipRegionAction() override
Definition: metaact.cxx:2221
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2456
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2109
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:506
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2186
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:850
sal_uInt32 mnHorzRound
Definition: metaact.hxx:218
virtual ~MetaMaskScalePartAction() override
Definition: metaact.cxx:1888
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:719
void Read(SvStream &rIStream)
void Move(long nHorzMoveDelta, long nVertMoveDelta)
void scale(double fScaleX, double fScaleY)
Affine scaling in both X and Y dimensions.
virtual ~MetaBmpScaleAction() override
Definition: metaact.cxx:1477
SvStream & WriteWallpaper(SvStream &rOStm, const Wallpaper &rWallpaper)
Definition: wall.cxx:360
void DrawWallpaper(const tools::Rectangle &rRect, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:42
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1450
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1995
LineInfo maLineInfo
Definition: metaact.hxx:377
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:354
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1942
OString read_uInt16_lenPrefixed_uInt8s_ToOString(SvStream &rStrm)
virtual ~MetaRefPointAction() override
Definition: metaact.cxx:3034
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:2196
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2708
Color const maColor
Definition: metaact.hxx:883
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2820
virtual ~MetaHatchAction() override
Definition: metaact.cxx:2066
void DrawStretchText(const Point &rStartPt, sal_uLong nWidth, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1)
Definition: text.cxx:1111
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:781
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2158
FUNC_TYPE const nType
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:902
bool ReadDIBBitmapEx(BitmapEx &rTarget, SvStream &rIStm, bool bFileHeader, bool bMSOFormat)
Definition: dibtools.cxx:1743
LINESTYLE_NONE
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:302
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:840
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:726
void setX(long nX)
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1523
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:786
SvStream & ReadWallpaper(SvStream &rIStm, Wallpaper &rWallpaper)
Definition: wall.cxx:355
RasterOp
Definition: vclenum.hxx:191
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:956
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:501
std::unique_ptr< long[]> mpDXAry
Definition: metaact.hxx:502
virtual ~MetaFloatTransparentAction() override
Definition: metaact.cxx:2912
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:396
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2593
SAL_DLLPRIVATE void ImplInitDynamicData(const sal_uInt8 *pData, sal_uInt32 nDataSize)
Definition: metaact.cxx:3098
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2302
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2040
virtual ~MetaClipRegionAction() override
Definition: metaact.cxx:2169
SvStream & WriteUniOrByteString(const OUString &rStr, rtl_TextEncoding eDestCharSet)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2339
virtual ~MetaChordAction() override
Definition: metaact.cxx:698
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1817
ComplexTextLayoutFlags mnLayoutMode
Definition: metaact.hxx:1663
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1397
SvStream & WriteUInt32(sal_uInt32 nUInt32)
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2390
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:1239
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1801
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:388
PushFlags
Definition: outdevstate.hxx:38
MetaActionType
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1640
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:3043
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:621
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:407
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:923
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:361
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:424
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2249
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1502
sal_uInt64 remainingSize()
void Move(long nHorzMove, long nVertMove)
Definition: region.cxx:414
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2585
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2880
void setY(long nY)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
Definition: line.cxx:88
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2785
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:845
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1971
void SetTextLineColor()
Definition: textline.cxx:800
tools::Rectangle maRect
Definition: metaact.hxx:575
void DrawRect(const tools::Rectangle &rRect)
Definition: rect.cxx:32
virtual ~MetaLineColorAction() override
Definition: metaact.cxx:2360
void AdaptiveSubdivide(tools::PolyPolygon &rResult) const
void Move(long nHorzMove, long nVertMove)
void setPath(const tools::PolyPolygon &rPath)
Set path to fill.
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:297
Gradient maGradient
Definition: metaact.hxx:960
Bitmap GetBitmap(const Color *pTransReplaceColor=nullptr) const
Definition: bitmapex.cxx:236
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1629
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:2140
virtual ~MetaRoundRectAction() override
Definition: metaact.cxx:490
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:1914
Point BottomRight() const
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1572
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2080
FontStrikeout meStrikeout
Definition: metaact.hxx:610
sal_uInt32 mnDataSize
Definition: metaact.hxx:1631
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1609
void DrawTextArray(const Point &rStartPt, const OUString &rStr, const long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:914
void Move(long nHorzMove, long nVertMove)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2130
NONE
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2530
void SetLineColor()
void SetRefPoint()
Definition: outdev.cxx:278
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:3056
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:912
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2178
void Replace(const Polygon &rPoly, sal_uInt16 nPos)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1229
bool WriteDIBBitmapEx(const BitmapEx &rSource, SvStream &rOStm)
Definition: dibtools.cxx:1874
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2901
FontLineStyle meOverline
Definition: metaact.hxx:612
Bitmap maBmp
Definition: metaact.hxx:646
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2991
SvStream & ReadLineInfo(SvStream &rIStm, LineInfo &rLineInfo)
Definition: lineinfo.cxx:136
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2770
std::unique_ptr< sal_uInt8[]> mpData
Definition: metaact.hxx:1633
sal_Int32 mnValue
Definition: metaact.hxx:1630
sal_uInt16 GetVersion() const
sal_Int32 mnLen
Definition: metaact.hxx:467
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:597
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1909
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:3339
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1263
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:576
virtual void Scale(double fScaleX, double fScaleY)
Definition: metaact.cxx:181
Point maStartPt
Definition: metaact.hxx:156
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2509
virtual ~MetaTextColorAction() override
Definition: metaact.cxx:2443
sal_Int32 mnType
virtual ~MetaTextAlignAction() override
Definition: metaact.cxx:2605
Point maStartPt
Definition: metaact.hxx:279
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2721
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:686
ComplexTextLayoutFlags
Definition: outdevstate.hxx:66
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:315
virtual ~MetaOverlineColorAction() override
Definition: metaact.cxx:2563
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:292
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1440
virtual rtl::Reference< MetaAction > Clone()
Definition: metaact.cxx:172
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:677
virtual ~MetaFontAction() override
Definition: metaact.cxx:2685
virtual ~MetaArcAction() override
Definition: metaact.cxx:586
SvStream & ReadFloat(float &rFloat)
void DrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
int i
void DrawArc(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
void writeGradient(Gradient &rGradient)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1685
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:714
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2210
void SetOrigin(const Point &rOrigin)
Definition: mapmod.cxx:101
virtual ~MetaPopAction() override
Definition: metaact.cxx:2782
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1384
bool HasFlags() const
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2024
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2859
void SetFillColor()
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:907
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
std::size_t WriteBytes(const void *pData, std::size_t nSize)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:569
OUString read_uInt16_lenPrefixed_uInt16s_ToOUString(SvStream &rStrm)
void SetTextColor(const Color &rColor)
Definition: text.cxx:662
rtl_TextEncoding meActualCharSet
Definition: metaact.hxx:57
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:3126
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1493
#define LANGUAGE_DONTKNOW
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:2713
void DrawTextLine(const Point &rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove=false)
Definition: textline.cxx:898
const Size & GetFontSize() const
Definition: font/font.cxx:669
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:3291
void getPath(tools::Polygon &) const
Query path to stroke.
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:3182
sal_uInt16 GetSize() const
void SetOverlineColor()
Definition: textline.cxx:849
void MoveClipRegion(long nHorzMove, long nVertMove)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1511
virtual ~MetaFillColorAction() override
Definition: metaact.cxx:2402
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:564
virtual ~MetaMapModeAction() override
Definition: metaact.cxx:2642
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1786
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1311
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2411
SvStream & ReadUChar(unsigned char &rChar)
Wallpaper maWallpaper
Definition: metaact.hxx:1050
DrawTextFlags
Definition: outdev.hxx:144
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2572
vcl::Region maRegion
Definition: metaact.hxx:1080
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1040
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:451
virtual ~MetaBmpExScalePartAction() override
Definition: metaact.cxx:1709
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1624
void DrawPie(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
SvStream & WritePair(SvStream &rOStream, const Pair &rPair)
std::size_t write_uInt16_lenPrefixed_uInt8s_FromOString(SvStream &rStrm, const OString &rStr)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1028
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2377
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2075
void DrawBitmap(const Point &rDestPt, const Bitmap &rBitmap)
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual ~MetaBmpAction() override
Definition: metaact.cxx:1426
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:809
SvStream & ReadRegion(SvStream &rIStrm, vcl::Region &rRegion)
Definition: region.cxx:1523
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1841
SvStream & WriteRectangle(SvStream &rOStream, const tools::Rectangle &rRect)
void getStartArrow(tools::PolyPolygon &) const
Get the polygon that is put at the start of the line.
void DrawPixel(const Point &rPt)
Definition: pixel.cxx:54
long X() const
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1115
void DrawHatch(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:653
Size GetSize() const
tools::Rectangle maRect
Definition: metaact.hxx:311
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2929
SvStream & ReadHatch(SvStream &rIStm, Hatch &rHatch)
Definition: gdi/hatch.cxx:79
virtual ~MetaPolygonAction() override
Definition: metaact.cxx:832
virtual ~MetaRasterOpAction() override
Definition: metaact.cxx:2811
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData)
Definition: metaact.cxx:190
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:401
SvStream & ReadInt32(sal_Int32 &rInt32)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1904
SvStream & WritePolyPolygon(SvStream &rOStream, const tools::PolyPolygon &rPolyPoly)
std::size_t ReadBytes(void *pData, std::size_t nSize)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2501
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1296
SvStream & WriteSvtGraphicFill(SvStream &rOStm, const SvtGraphicFill &rClass)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1316
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:607
tools::Rectangle maRect
Definition: metaact.hxx:189
virtual ~MetaBmpExScaleAction() override
Definition: metaact.cxx:1651
MetaActionType const mnType
Definition: metaact.hxx:67
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:855
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:3329
tools::Rectangle maRect
Definition: metaact.hxx:344
ALIGN_TOP
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2328
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2790
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:1498
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:559
void setEndArrow(const tools::PolyPolygon &)
Set the polygon that is put at the end of the line.
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:3113
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:3051
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2960
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2655
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2096
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1503
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:989
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:3121
B2DPoint maPoint
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1662
tools::Rectangle maRect
Definition: metaact.hxx:250
BitmapEx maBmpEx
Definition: metaact.hxx:747
virtual ~MetaPolyPolygonAction() override
Definition: metaact.cxx:894
FuncFlags const mnFlags
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:3254
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2801
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:549
unsigned char sal_uInt8
OUString maComment
vcl::Font maFont
Definition: metaact.hxx:1407
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2201
SvStream & ReadFont(SvStream &rIStm, vcl::Font &rFont)
Definition: font/font.cxx:442
void SetFont(const vcl::Font &rNewFont)
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1466
virtual void Move(long nHorzMove, long nVertMove) override
Definition: metaact.cxx:1445
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2758
void AddAction(const rtl::Reference< MetaAction > &pAction)
Definition: gdimtf.cxx:539
LineInfo maLineInfo
Definition: metaact.hxx:155
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:2090
SvStream & WriteFloat(float nFloat)
virtual ~MetaTextFillColorAction() override
Definition: metaact.cxx:2479
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2496
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1864
SvStream & ReadGDIMetaFile(SvStream &rIStm, GDIMetaFile &rGDIMetaFile, ImplMetaReadData *pData)
Definition: gdimtf.cxx:2620