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 <vcl/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[11];
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 
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 {
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;
238  case MetaActionType::ISECTRECTCLIPREGION: pAction = new MetaISectRectClipRegionAction; break;
239  case MetaActionType::ISECTREGIONCLIPREGION: pAction = new MetaISectRegionClipRegionAction; 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  VersionCompatRead aCompat(rIStm);
264  }
265  break;
266  }
267 
268  if( pAction )
269  pAction->Read( rIStm, pData );
270 
271  return pAction;
272 }
273 
274 void MetaAction::ReadColor(SvStream& rIStm, ::Color& rColor)
275 {
276  sal_uInt32 nTmp;
277  rIStm.ReadUInt32(nTmp);
278  rColor = ::Color(ColorTransparency, nTmp);
279 }
280 
281 void MetaAction::WriteColor(SvStream& rIStm, ::Color aColor)
282 {
283  rIStm.WriteUInt32(static_cast<sal_uInt32>(aColor));
284 }
285 
286 MetaPixelAction::MetaPixelAction() :
288 {}
289 
290 MetaPixelAction::~MetaPixelAction()
291 {}
292 
293 MetaPixelAction::MetaPixelAction( const Point& rPt, const Color& rColor ) :
295  maPt ( rPt ),
296  maColor ( rColor )
297 {}
298 
299 void MetaPixelAction::Execute( OutputDevice* pOut )
300 {
301  pOut->DrawPixel( maPt, maColor );
302 }
303 
304 rtl::Reference<MetaAction> MetaPixelAction::Clone()
305 {
306  return new MetaPixelAction( *this );
307 }
308 
309 void MetaPixelAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
310 {
311  maPt.Move( nHorzMove, nVertMove );
312 }
313 
314 void MetaPixelAction::Scale( double fScaleX, double fScaleY )
315 {
316  ImplScalePoint( maPt, fScaleX, fScaleY );
317 }
318 
319 void MetaPixelAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
320 {
321  MetaAction::Write(rOStm, pData);
322  VersionCompatWrite aCompat(rOStm, 1);
323  TypeSerializer aSerializer(rOStm);
324  aSerializer.writePoint(maPt);
325  WriteColor(rOStm, maColor);
326 }
327 
328 void MetaPixelAction::Read( SvStream& rIStm, ImplMetaReadData* )
329 {
330  VersionCompatRead aCompat(rIStm);
331  TypeSerializer aSerializer(rIStm);
332  aSerializer.readPoint(maPt);
333  ReadColor(rIStm, maColor);
334 }
335 
338 {}
339 
341 {}
342 
343 MetaPointAction::MetaPointAction( const Point& rPt ) :
345  maPt ( rPt )
346 {}
347 
349 {
350  pOut->DrawPixel( maPt );
351 }
352 
354 {
355  return new MetaPointAction( *this );
356 }
357 
358 void MetaPointAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
359 {
360  maPt.Move( nHorzMove, nVertMove );
361 }
362 
363 void MetaPointAction::Scale( double fScaleX, double fScaleY )
364 {
365  ImplScalePoint( maPt, fScaleX, fScaleY );
366 }
367 
369 {
370  MetaAction::Write(rOStm, pData);
371  VersionCompatWrite aCompat(rOStm, 1);
372  TypeSerializer aSerializer(rOStm);
373  aSerializer.writePoint(maPt);
374 }
375 
377 {
378  VersionCompatRead aCompat(rIStm);
379  TypeSerializer aSerializer(rIStm);
380  aSerializer.readPoint(maPt);
381 }
382 
385 {}
386 
388 {}
389 
390 MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) :
392  maStartPt ( rStart ),
393  maEndPt ( rEnd )
394 {}
395 
396 MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd,
397  const LineInfo& rLineInfo ) :
399  maLineInfo ( rLineInfo ),
400  maStartPt ( rStart ),
401  maEndPt ( rEnd )
402 {}
403 
405 {
406  if( maLineInfo.IsDefault() )
407  pOut->DrawLine( maStartPt, maEndPt );
408  else
410 }
411 
413 {
414  return new MetaLineAction( *this );
415 }
416 
417 void MetaLineAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
418 {
419  maStartPt.Move( nHorzMove, nVertMove );
420  maEndPt.Move( nHorzMove, nVertMove );
421 }
422 
423 void MetaLineAction::Scale( double fScaleX, double fScaleY )
424 {
425  ImplScalePoint( maStartPt, fScaleX, fScaleY );
426  ImplScalePoint( maEndPt, fScaleX, fScaleY );
427  ImplScaleLineInfo( maLineInfo, fScaleX, fScaleY );
428 }
429 
431 {
432  MetaAction::Write(rOStm, pData);
433  VersionCompatWrite aCompat(rOStm, 2);
434 
435  // Version 1
436  TypeSerializer aSerializer(rOStm);
437  aSerializer.writePoint(maStartPt);
438  aSerializer.writePoint(maEndPt);
439  // Version 2
440  WriteLineInfo( rOStm, maLineInfo );
441 }
442 
444 {
445  VersionCompatRead aCompat(rIStm);
446 
447  // Version 1
448  TypeSerializer aSerializer(rIStm);
449  aSerializer.readPoint(maStartPt);
450  aSerializer.readPoint(maEndPt);
451 
452  // Version 2
453  if( aCompat.GetVersion() >= 2 )
454  {
455  ReadLineInfo( rIStm, maLineInfo );
456  }
457 }
458 
461 {}
462 
464 {}
465 
468  maRect ( rRect )
469 {}
470 
472 {
473  pOut->DrawRect( maRect );
474 }
475 
477 {
478  return new MetaRectAction( *this );
479 }
480 
481 void MetaRectAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
482 {
483  maRect.Move( nHorzMove, nVertMove );
484 }
485 
486 void MetaRectAction::Scale( double fScaleX, double fScaleY )
487 {
488  ImplScaleRect( maRect, fScaleX, fScaleY );
489 }
490 
492 {
493  MetaAction::Write(rOStm, pData);
494  VersionCompatWrite aCompat(rOStm, 1);
495  TypeSerializer aSerializer(rOStm);
496  aSerializer.writeRectangle(maRect);
497 }
498 
500 {
501  VersionCompatRead aCompat(rIStm);
502  TypeSerializer aSerializer(rIStm);
503  aSerializer.readRectangle(maRect);
504 }
505 
506 MetaRoundRectAction::MetaRoundRectAction() :
508  mnHorzRound ( 0 ),
509  mnVertRound ( 0 )
510 {}
511 
512 MetaRoundRectAction::~MetaRoundRectAction()
513 {}
514 
515 MetaRoundRectAction::MetaRoundRectAction( const tools::Rectangle& rRect,
516  sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) :
518  maRect ( rRect ),
519  mnHorzRound ( nHorzRound ),
520  mnVertRound ( nVertRound )
521 {}
522 
523 void MetaRoundRectAction::Execute( OutputDevice* pOut )
524 {
525  pOut->DrawRect( maRect, mnHorzRound, mnVertRound );
526 }
527 
528 rtl::Reference<MetaAction> MetaRoundRectAction::Clone()
529 {
530  return new MetaRoundRectAction( *this );
531 }
532 
533 void MetaRoundRectAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
534 {
535  maRect.Move( nHorzMove, nVertMove );
536 }
537 
538 void MetaRoundRectAction::Scale( double fScaleX, double fScaleY )
539 {
540  ImplScaleRect( maRect, fScaleX, fScaleY );
541  mnHorzRound = FRound( mnHorzRound * fabs(fScaleX) );
542  mnVertRound = FRound( mnVertRound * fabs(fScaleY) );
543 }
544 
545 void MetaRoundRectAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
546 {
547  MetaAction::Write(rOStm, pData);
548  VersionCompatWrite aCompat(rOStm, 1);
549  TypeSerializer aSerializer(rOStm);
550  aSerializer.writeRectangle(maRect);
551  rOStm.WriteUInt32( mnHorzRound ).WriteUInt32( mnVertRound );
552 }
553 
554 void MetaRoundRectAction::Read( SvStream& rIStm, ImplMetaReadData* )
555 {
556  VersionCompatRead aCompat(rIStm);
557  TypeSerializer aSerializer(rIStm);
558  aSerializer.readRectangle(maRect);
559  rIStm.ReadUInt32( mnHorzRound ).ReadUInt32( mnVertRound );
560 }
561 
562 MetaEllipseAction::MetaEllipseAction() :
564 {}
565 
566 MetaEllipseAction::~MetaEllipseAction()
567 {}
568 
569 MetaEllipseAction::MetaEllipseAction( const tools::Rectangle& rRect ) :
571  maRect ( rRect )
572 {}
573 
574 void MetaEllipseAction::Execute( OutputDevice* pOut )
575 {
576  pOut->DrawEllipse( maRect );
577 }
578 
579 rtl::Reference<MetaAction> MetaEllipseAction::Clone()
580 {
581  return new MetaEllipseAction( *this );
582 }
583 
584 void MetaEllipseAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
585 {
586  maRect.Move( nHorzMove, nVertMove );
587 }
588 
589 void MetaEllipseAction::Scale( double fScaleX, double fScaleY )
590 {
591  ImplScaleRect( maRect, fScaleX, fScaleY );
592 }
593 
594 void MetaEllipseAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
595 {
596  MetaAction::Write(rOStm, pData);
597  VersionCompatWrite aCompat(rOStm, 1);
598  TypeSerializer aSerializer(rOStm);
599  aSerializer.writeRectangle(maRect);
600 }
601 
602 void MetaEllipseAction::Read( SvStream& rIStm, ImplMetaReadData* )
603 {
604  VersionCompatRead aCompat(rIStm);
605  TypeSerializer aSerializer(rIStm);
606  aSerializer.readRectangle(maRect);
607 }
608 
609 MetaArcAction::MetaArcAction() :
611 {}
612 
613 MetaArcAction::~MetaArcAction()
614 {}
615 
616 MetaArcAction::MetaArcAction( const tools::Rectangle& rRect,
617  const Point& rStart, const Point& rEnd ) :
619  maRect ( rRect ),
620  maStartPt ( rStart ),
621  maEndPt ( rEnd )
622 {}
623 
624 void MetaArcAction::Execute( OutputDevice* pOut )
625 {
626  pOut->DrawArc( maRect, maStartPt, maEndPt );
627 }
628 
629 rtl::Reference<MetaAction> MetaArcAction::Clone()
630 {
631  return new MetaArcAction( *this );
632 }
633 
634 void MetaArcAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
635 {
636  maRect.Move( nHorzMove, nVertMove );
637  maStartPt.Move( nHorzMove, nVertMove );
638  maEndPt.Move( nHorzMove, nVertMove );
639 }
640 
641 void MetaArcAction::Scale( double fScaleX, double fScaleY )
642 {
643  ImplScaleRect( maRect, fScaleX, fScaleY );
644  ImplScalePoint( maStartPt, fScaleX, fScaleY );
645  ImplScalePoint( maEndPt, fScaleX, fScaleY );
646 }
647 
648 void MetaArcAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
649 {
650  MetaAction::Write(rOStm, pData);
651  VersionCompatWrite aCompat(rOStm, 1);
652  TypeSerializer aSerializer(rOStm);
653  aSerializer.writeRectangle(maRect);
654  aSerializer.writePoint(maStartPt);
655  aSerializer.writePoint(maEndPt);
656 }
657 
658 void MetaArcAction::Read( SvStream& rIStm, ImplMetaReadData* )
659 {
660  VersionCompatRead aCompat(rIStm);
661  TypeSerializer aSerializer(rIStm);
662  aSerializer.readRectangle(maRect);
663  aSerializer.readPoint(maStartPt);
664  aSerializer.readPoint(maEndPt);
665 }
666 
667 MetaPieAction::MetaPieAction() :
669 {}
670 
671 MetaPieAction::~MetaPieAction()
672 {}
673 
674 MetaPieAction::MetaPieAction( const tools::Rectangle& rRect,
675  const Point& rStart, const Point& rEnd ) :
677  maRect ( rRect ),
678  maStartPt ( rStart ),
679  maEndPt ( rEnd )
680 {}
681 
682 void MetaPieAction::Execute( OutputDevice* pOut )
683 {
684  pOut->DrawPie( maRect, maStartPt, maEndPt );
685 }
686 
687 rtl::Reference<MetaAction> MetaPieAction::Clone()
688 {
689  return new MetaPieAction( *this );
690 }
691 
692 void MetaPieAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
693 {
694  maRect.Move( nHorzMove, nVertMove );
695  maStartPt.Move( nHorzMove, nVertMove );
696  maEndPt.Move( nHorzMove, nVertMove );
697 }
698 
699 void MetaPieAction::Scale( double fScaleX, double fScaleY )
700 {
701  ImplScaleRect( maRect, fScaleX, fScaleY );
702  ImplScalePoint( maStartPt, fScaleX, fScaleY );
703  ImplScalePoint( maEndPt, fScaleX, fScaleY );
704 }
705 
706 void MetaPieAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
707 {
708  MetaAction::Write(rOStm, pData);
709  VersionCompatWrite aCompat(rOStm, 1);
710  TypeSerializer aSerializer(rOStm);
711  aSerializer.writeRectangle(maRect);
712  aSerializer.writePoint(maStartPt);
713  aSerializer.writePoint(maEndPt);
714 }
715 
716 void MetaPieAction::Read( SvStream& rIStm, ImplMetaReadData* )
717 {
718  VersionCompatRead aCompat(rIStm);
719  TypeSerializer aSerializer(rIStm);
720  aSerializer.readRectangle(maRect);
721  aSerializer.readPoint(maStartPt);
722  aSerializer.readPoint(maEndPt);
723 }
724 
725 MetaChordAction::MetaChordAction() :
727 {}
728 
729 MetaChordAction::~MetaChordAction()
730 {}
731 
732 MetaChordAction::MetaChordAction( const tools::Rectangle& rRect,
733  const Point& rStart, const Point& rEnd ) :
735  maRect ( rRect ),
736  maStartPt ( rStart ),
737  maEndPt ( rEnd )
738 {}
739 
740 void MetaChordAction::Execute( OutputDevice* pOut )
741 {
742  pOut->DrawChord( maRect, maStartPt, maEndPt );
743 }
744 
745 rtl::Reference<MetaAction> MetaChordAction::Clone()
746 {
747  return new MetaChordAction( *this );
748 }
749 
750 void MetaChordAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
751 {
752  maRect.Move( nHorzMove, nVertMove );
753  maStartPt.Move( nHorzMove, nVertMove );
754  maEndPt.Move( nHorzMove, nVertMove );
755 }
756 
757 void MetaChordAction::Scale( double fScaleX, double fScaleY )
758 {
759  ImplScaleRect( maRect, fScaleX, fScaleY );
760  ImplScalePoint( maStartPt, fScaleX, fScaleY );
761  ImplScalePoint( maEndPt, fScaleX, fScaleY );
762 }
763 
764 void MetaChordAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
765 {
766  MetaAction::Write(rOStm, pData);
767  VersionCompatWrite aCompat(rOStm, 1);
768  TypeSerializer aSerializer(rOStm);
769  aSerializer.writeRectangle(maRect);
770  aSerializer.writePoint(maStartPt);
771  aSerializer.writePoint(maEndPt);
772 }
773 
774 void MetaChordAction::Read( SvStream& rIStm, ImplMetaReadData* )
775 {
776  VersionCompatRead aCompat(rIStm);
777  TypeSerializer aSerializer(rIStm);
778  aSerializer.readRectangle(maRect);
779  aSerializer.readPoint(maStartPt);
780  aSerializer.readPoint(maEndPt);
781 }
782 
783 MetaPolyLineAction::MetaPolyLineAction() :
785 {}
786 
787 MetaPolyLineAction::~MetaPolyLineAction()
788 {}
789 
790 MetaPolyLineAction::MetaPolyLineAction( const tools::Polygon& rPoly ) :
792  maPoly ( rPoly )
793 {}
794 
795 MetaPolyLineAction::MetaPolyLineAction( const tools::Polygon& rPoly, const LineInfo& rLineInfo ) :
797  maLineInfo ( rLineInfo ),
798  maPoly ( rPoly )
799 {}
800 
801 void MetaPolyLineAction::Execute( OutputDevice* pOut )
802 {
803  if( maLineInfo.IsDefault() )
804  pOut->DrawPolyLine( maPoly );
805  else
806  pOut->DrawPolyLine( maPoly, maLineInfo );
807 }
808 
809 rtl::Reference<MetaAction> MetaPolyLineAction::Clone()
810 {
811  return new MetaPolyLineAction( *this );
812 }
813 
814 void MetaPolyLineAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
815 {
816  maPoly.Move( nHorzMove, nVertMove );
817 }
818 
819 void MetaPolyLineAction::Scale( double fScaleX, double fScaleY )
820 {
821  ImplScalePoly( maPoly, fScaleX, fScaleY );
822  ImplScaleLineInfo( maLineInfo, fScaleX, fScaleY );
823 }
824 
825 void MetaPolyLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
826 {
827  MetaAction::Write(rOStm, pData);
828  VersionCompatWrite aCompat(rOStm, 3);
829 
830  tools::Polygon aSimplePoly;
831  maPoly.AdaptiveSubdivide( aSimplePoly );
832 
833  WritePolygon( rOStm, aSimplePoly ); // Version 1
834  WriteLineInfo( rOStm, maLineInfo ); // Version 2
835 
836  bool bHasPolyFlags = maPoly.HasFlags(); // Version 3
837  rOStm.WriteBool( bHasPolyFlags );
838  if ( bHasPolyFlags )
839  maPoly.Write( rOStm );
840 }
841 
842 void MetaPolyLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
843 {
844  VersionCompatRead aCompat(rIStm);
845 
846  // Version 1
847  ReadPolygon( rIStm, maPoly );
848 
849  // Version 2
850  if( aCompat.GetVersion() >= 2 )
851  ReadLineInfo( rIStm, maLineInfo );
852  if ( aCompat.GetVersion() >= 3 )
853  {
854  sal_uInt8 bHasPolyFlags(0);
855  rIStm.ReadUChar( bHasPolyFlags );
856  if ( bHasPolyFlags )
857  maPoly.Read( rIStm );
858  }
859 }
860 
861 MetaPolygonAction::MetaPolygonAction() :
863 {}
864 
865 MetaPolygonAction::~MetaPolygonAction()
866 {}
867 
868 MetaPolygonAction::MetaPolygonAction( const tools::Polygon& rPoly ) :
870  maPoly ( rPoly )
871 {}
872 
873 void MetaPolygonAction::Execute( OutputDevice* pOut )
874 {
875  pOut->DrawPolygon( maPoly );
876 }
877 
878 rtl::Reference<MetaAction> MetaPolygonAction::Clone()
879 {
880  return new MetaPolygonAction( *this );
881 }
882 
883 void MetaPolygonAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
884 {
885  maPoly.Move( nHorzMove, nVertMove );
886 }
887 
888 void MetaPolygonAction::Scale( double fScaleX, double fScaleY )
889 {
890  ImplScalePoly( maPoly, fScaleX, fScaleY );
891 }
892 
893 void MetaPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
894 {
895  MetaAction::Write(rOStm, pData);
896  VersionCompatWrite aCompat(rOStm, 2);
897 
898  tools::Polygon aSimplePoly; // Version 1
899  maPoly.AdaptiveSubdivide( aSimplePoly );
900  WritePolygon( rOStm, aSimplePoly );
901 
902  bool bHasPolyFlags = maPoly.HasFlags(); // Version 2
903  rOStm.WriteBool( bHasPolyFlags );
904  if ( bHasPolyFlags )
905  maPoly.Write( rOStm );
906 }
907 
908 void MetaPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
909 {
910  VersionCompatRead aCompat(rIStm);
911 
912  ReadPolygon( rIStm, maPoly ); // Version 1
913 
914  if( aCompat.GetVersion() >= 2 ) // Version 2
915  {
916  sal_uInt8 bHasPolyFlags(0);
917  rIStm.ReadUChar( bHasPolyFlags );
918  if ( bHasPolyFlags )
919  maPoly.Read( rIStm );
920  }
921 }
922 
923 MetaPolyPolygonAction::MetaPolyPolygonAction() :
925 {}
926 
927 MetaPolyPolygonAction::~MetaPolyPolygonAction()
928 {}
929 
930 MetaPolyPolygonAction::MetaPolyPolygonAction( const tools::PolyPolygon& rPolyPoly ) :
932  maPolyPoly ( rPolyPoly )
933 {}
934 
935 void MetaPolyPolygonAction::Execute( OutputDevice* pOut )
936 {
937  pOut->DrawPolyPolygon( maPolyPoly );
938 }
939 
940 rtl::Reference<MetaAction> MetaPolyPolygonAction::Clone()
941 {
942  return new MetaPolyPolygonAction( *this );
943 }
944 
945 void MetaPolyPolygonAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
946 {
947  maPolyPoly.Move( nHorzMove, nVertMove );
948 }
949 
950 void MetaPolyPolygonAction::Scale( double fScaleX, double fScaleY )
951 {
952  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
953  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
954 }
955 
956 void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
957 {
958  MetaAction::Write(rOStm, pData);
959  VersionCompatWrite aCompat(rOStm, 2);
960 
961  sal_uInt16 nNumberOfComplexPolygons = 0;
962  sal_uInt16 i, nPolyCount = maPolyPoly.Count();
963 
964  tools::Polygon aSimplePoly; // Version 1
965  rOStm.WriteUInt16( nPolyCount );
966  for ( i = 0; i < nPolyCount; i++ )
967  {
968  const tools::Polygon& rPoly = maPolyPoly.GetObject( i );
969  if ( rPoly.HasFlags() )
970  nNumberOfComplexPolygons++;
971  rPoly.AdaptiveSubdivide( aSimplePoly );
972  WritePolygon( rOStm, aSimplePoly );
973  }
974 
975  rOStm.WriteUInt16( nNumberOfComplexPolygons ); // Version 2
976  for ( i = 0; nNumberOfComplexPolygons && ( i < nPolyCount ); i++ )
977  {
978  const tools::Polygon& rPoly = maPolyPoly.GetObject( i );
979  if ( rPoly.HasFlags() )
980  {
981  rOStm.WriteUInt16( i );
982  rPoly.Write( rOStm );
983 
984  nNumberOfComplexPolygons--;
985  }
986  }
987 }
988 
989 void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
990 {
991  VersionCompatRead aCompat(rIStm);
992  ReadPolyPolygon( rIStm, maPolyPoly ); // Version 1
993 
994  if ( aCompat.GetVersion() < 2 ) // Version 2
995  return;
996 
997  sal_uInt16 nNumberOfComplexPolygons(0);
998  rIStm.ReadUInt16( nNumberOfComplexPolygons );
999  const size_t nMinRecordSize = sizeof(sal_uInt16);
1000  const size_t nMaxRecords = rIStm.remainingSize() / nMinRecordSize;
1001  if (nNumberOfComplexPolygons > nMaxRecords)
1002  {
1003  SAL_WARN("vcl.gdi", "Parsing error: " << nMaxRecords <<
1004  " max possible entries, but " << nNumberOfComplexPolygons << " claimed, truncating");
1005  nNumberOfComplexPolygons = nMaxRecords;
1006  }
1007  for (sal_uInt16 i = 0; i < nNumberOfComplexPolygons; ++i)
1008  {
1009  sal_uInt16 nIndex(0);
1010  rIStm.ReadUInt16( nIndex );
1011  tools::Polygon aPoly;
1012  aPoly.Read( rIStm );
1013  if (nIndex >= maPolyPoly.Count())
1014  {
1015  SAL_WARN("vcl.gdi", "svm contains polygon index " << nIndex
1016  << " outside possible range " << maPolyPoly.Count());
1017  continue;
1018  }
1019  maPolyPoly.Replace( aPoly, nIndex );
1020  }
1021 }
1022 
1025  mnIndex ( 0 ),
1026  mnLen ( 0 )
1027 {}
1028 
1030 {}
1031 
1032 MetaTextAction::MetaTextAction( const Point& rPt, const OUString& rStr,
1033  sal_Int32 nIndex, sal_Int32 nLen ) :
1035  maPt ( rPt ),
1036  maStr ( rStr ),
1037  mnIndex ( nIndex ),
1038  mnLen ( nLen )
1039 {}
1040 
1042 {
1043  pOut->DrawText( maPt, maStr, mnIndex, mnLen );
1044 }
1045 
1047 {
1048  return new MetaTextAction( *this );
1049 }
1050 
1051 void MetaTextAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1052 {
1053  maPt.Move( nHorzMove, nVertMove );
1054 }
1055 
1056 void MetaTextAction::Scale( double fScaleX, double fScaleY )
1057 {
1058  ImplScalePoint( maPt, fScaleX, fScaleY );
1059 }
1060 
1062 {
1063  MetaAction::Write(rOStm, pData);
1064  VersionCompatWrite aCompat(rOStm, 2);
1065  TypeSerializer aSerializer(rOStm);
1066  aSerializer.writePoint(maPt);
1067  rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet );
1068  rOStm.WriteUInt16(mnIndex);
1069  rOStm.WriteUInt16(mnLen);
1070 
1072 }
1073 
1075 {
1076  VersionCompatRead aCompat(rIStm);
1077  TypeSerializer aSerializer(rIStm);
1078  aSerializer.readPoint(maPt);
1079  maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
1080  sal_uInt16 nTmpIndex(0);
1081  rIStm.ReadUInt16(nTmpIndex);
1082  mnIndex = nTmpIndex;
1083  sal_uInt16 nTmpLen(0);
1084  rIStm.ReadUInt16(nTmpLen);
1085  mnLen = nTmpLen;
1086 
1087  if ( aCompat.GetVersion() >= 2 ) // Version 2
1089 }
1090 
1091 MetaTextArrayAction::MetaTextArrayAction() :
1093  mnIndex ( 0 ),
1094  mnLen ( 0 )
1095 {}
1096 
1097 MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
1099  maStartPt ( rAction.maStartPt ),
1100  maStr ( rAction.maStr ),
1101  mnIndex ( rAction.mnIndex ),
1102  mnLen ( rAction.mnLen )
1103 {
1104  if( rAction.mpDXAry )
1105  {
1106  mpDXAry.reset( new tools::Long[ mnLen ] );
1107  memcpy( mpDXAry.get(), rAction.mpDXAry.get(), mnLen * sizeof( tools::Long ) );
1108  }
1109 }
1110 
1111 MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
1112  const OUString& rStr,
1113  const tools::Long* pDXAry,
1114  sal_Int32 nIndex,
1115  sal_Int32 nLen ) :
1117  maStartPt ( rStartPt ),
1118  maStr ( rStr ),
1119  mnIndex ( nIndex ),
1120  mnLen ( nLen )
1121 {
1122  const sal_Int32 nAryLen = pDXAry ? mnLen : 0;
1123 
1124  if (nAryLen > 0)
1125  {
1126  mpDXAry.reset( new tools::Long[ nAryLen ] );
1127  memcpy( mpDXAry.get(), pDXAry, nAryLen * sizeof(tools::Long) );
1128  }
1129 }
1130 
1131 MetaTextArrayAction::~MetaTextArrayAction()
1132 {
1133 }
1134 
1135 void MetaTextArrayAction::Execute( OutputDevice* pOut )
1136 {
1137  pOut->DrawTextArray( maStartPt, maStr, mpDXAry.get(), mnIndex, mnLen );
1138 }
1139 
1140 rtl::Reference<MetaAction> MetaTextArrayAction::Clone()
1141 {
1142  return new MetaTextArrayAction( *this );
1143 }
1144 
1145 void MetaTextArrayAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1146 {
1147  maStartPt.Move( nHorzMove, nVertMove );
1148 }
1149 
1150 void MetaTextArrayAction::Scale( double fScaleX, double fScaleY )
1151 {
1152  ImplScalePoint( maStartPt, fScaleX, fScaleY );
1153 
1154  if ( mpDXAry && mnLen )
1155  {
1156  for ( sal_uInt16 i = 0, nCount = mnLen; i < nCount; i++ )
1157  mpDXAry[ i ] = FRound( mpDXAry[ i ] * fabs(fScaleX) );
1158  }
1159 }
1160 
1161 void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1162 {
1163  const sal_Int32 nAryLen = mpDXAry ? mnLen : 0;
1164 
1165  MetaAction::Write(rOStm, pData);
1166  VersionCompatWrite aCompat(rOStm, 2);
1167  TypeSerializer aSerializer(rOStm);
1168  aSerializer.writePoint(maStartPt);
1169  rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet );
1170  rOStm.WriteUInt16(mnIndex);
1171  rOStm.WriteUInt16(mnLen);
1172  rOStm.WriteInt32(nAryLen);
1173 
1174  for (sal_Int32 i = 0; i < nAryLen; ++i)
1175  rOStm.WriteInt32( mpDXAry[ i ] );
1176 
1177  write_uInt16_lenPrefixed_uInt16s_FromOUString(rOStm, maStr); // version 2
1178 }
1179 
1180 void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
1181 {
1182  mpDXAry.reset();
1183 
1184  VersionCompatRead aCompat(rIStm);
1185  TypeSerializer aSerializer(rIStm);
1186  aSerializer.readPoint(maStartPt);
1187  maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
1188  sal_uInt16 nTmpIndex(0);
1189  rIStm.ReadUInt16(nTmpIndex);
1190  mnIndex = nTmpIndex;
1191  sal_uInt16 nTmpLen(0);
1192  rIStm.ReadUInt16(nTmpLen);
1193  mnLen = nTmpLen;
1194  sal_Int32 nAryLen(0);
1195  rIStm.ReadInt32(nAryLen);
1196 
1197  if (mnLen > maStr.getLength() - mnIndex)
1198  {
1199  mnIndex = 0;
1200  mpDXAry = nullptr;
1201  return;
1202  }
1203 
1204  if( nAryLen )
1205  {
1206  // #i9762#, #106172# Ensure that DX array is at least mnLen entries long
1207  if ( mnLen >= nAryLen )
1208  {
1209  mpDXAry.reset( new (std::nothrow)tools::Long[ mnLen ] );
1210  if ( mpDXAry )
1211  {
1212  sal_Int32 i;
1213  sal_Int32 val;
1214  for( i = 0; i < nAryLen; i++ )
1215  {
1216  rIStm.ReadInt32( val);
1217  mpDXAry[ i ] = val;
1218  }
1219  // #106172# setup remainder
1220  for( ; i < mnLen; i++ )
1221  mpDXAry[ i ] = 0;
1222  }
1223  }
1224  else
1225  {
1226  mpDXAry = nullptr;
1227  return;
1228  }
1229  }
1230  else
1231  mpDXAry = nullptr;
1232 
1233  if ( aCompat.GetVersion() >= 2 ) // Version 2
1234  {
1236 
1237  if ( mnIndex + mnLen > maStr.getLength() )
1238  {
1239  mnIndex = 0;
1240  mpDXAry.reset();
1241  }
1242  }
1243 }
1244 
1247  mnWidth ( 0 ),
1248  mnIndex ( 0 ),
1249  mnLen ( 0 )
1250 {}
1251 
1253 {}
1254 
1255 MetaStretchTextAction::MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
1256  const OUString& rStr,
1257  sal_Int32 nIndex, sal_Int32 nLen ) :
1259  maPt ( rPt ),
1260  maStr ( rStr ),
1261  mnWidth ( nWidth ),
1262  mnIndex ( nIndex ),
1263  mnLen ( nLen )
1264 {}
1265 
1267 {
1268  pOut->DrawStretchText( maPt, mnWidth, maStr, mnIndex, mnLen );
1269 }
1270 
1272 {
1273  return new MetaStretchTextAction( *this );
1274 }
1275 
1277 {
1278  maPt.Move( nHorzMove, nVertMove );
1279 }
1280 
1281 void MetaStretchTextAction::Scale( double fScaleX, double fScaleY )
1282 {
1283  ImplScalePoint( maPt, fScaleX, fScaleY );
1284  mnWidth = static_cast<sal_uLong>(FRound( mnWidth * fabs(fScaleX) ));
1285 }
1286 
1288 {
1289  MetaAction::Write(rOStm, pData);
1290  VersionCompatWrite aCompat(rOStm, 2);
1291  TypeSerializer aSerializer(rOStm);
1292  aSerializer.writePoint(maPt);
1293  rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet );
1294  rOStm.WriteUInt32( mnWidth );
1295  rOStm.WriteUInt16( mnIndex );
1296  rOStm.WriteUInt16( mnLen );
1297 
1299 }
1300 
1302 {
1303  VersionCompatRead aCompat(rIStm);
1304  TypeSerializer aSerializer(rIStm);
1305  aSerializer.readPoint(maPt);
1306  maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
1307  rIStm.ReadUInt32( mnWidth );
1308  sal_uInt16 nTmpIndex(0);
1309  rIStm.ReadUInt16(nTmpIndex);
1310  mnIndex = nTmpIndex;
1311  sal_uInt16 nTmpLen(0);
1312  rIStm.ReadUInt16(nTmpLen);
1313  mnLen = nTmpLen;
1314 
1315  if ( aCompat.GetVersion() >= 2 ) // Version 2
1317 }
1318 
1321  mnStyle ( DrawTextFlags::NONE )
1322 {}
1323 
1325 {}
1326 
1328  const OUString& rStr, DrawTextFlags nStyle ) :
1330  maRect ( rRect ),
1331  maStr ( rStr ),
1332  mnStyle ( nStyle )
1333 {}
1334 
1336 {
1337  pOut->DrawText( maRect, maStr, mnStyle );
1338 }
1339 
1341 {
1342  return new MetaTextRectAction( *this );
1343 }
1344 
1346 {
1347  maRect.Move( nHorzMove, nVertMove );
1348 }
1349 
1350 void MetaTextRectAction::Scale( double fScaleX, double fScaleY )
1351 {
1352  ImplScaleRect( maRect, fScaleX, fScaleY );
1353 }
1354 
1356 {
1357  MetaAction::Write(rOStm, pData);
1358  VersionCompatWrite aCompat(rOStm, 2);
1359  TypeSerializer aSerializer(rOStm);
1360  aSerializer.writeRectangle(maRect);
1361  rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet );
1362  rOStm.WriteUInt16( static_cast<sal_uInt16>(mnStyle) );
1363 
1365 }
1366 
1368 {
1369  VersionCompatRead aCompat(rIStm);
1370  TypeSerializer aSerializer(rIStm);
1371  aSerializer.readRectangle(maRect);
1372  maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
1373  sal_uInt16 nTmp;
1374  rIStm .ReadUInt16( nTmp );
1375  mnStyle = static_cast<DrawTextFlags>(nTmp);
1376 
1377  if ( aCompat.GetVersion() >= 2 ) // Version 2
1379 }
1380 
1383  mnWidth ( 0 ),
1384  meStrikeout ( STRIKEOUT_NONE ),
1385  meUnderline ( LINESTYLE_NONE ),
1386  meOverline ( LINESTYLE_NONE )
1387 {}
1388 
1390 {}
1391 
1393  FontStrikeout eStrikeout,
1394  FontLineStyle eUnderline,
1395  FontLineStyle eOverline ) :
1397  maPos ( rPos ),
1398  mnWidth ( nWidth ),
1399  meStrikeout ( eStrikeout ),
1400  meUnderline ( eUnderline ),
1401  meOverline ( eOverline )
1402 {}
1403 
1405 {
1407 }
1408 
1410 {
1411  return new MetaTextLineAction( *this );
1412 }
1413 
1415 {
1416  maPos.Move( nHorzMove, nVertMove );
1417 }
1418 
1419 void MetaTextLineAction::Scale( double fScaleX, double fScaleY )
1420 {
1421  ImplScalePoint( maPos, fScaleX, fScaleY );
1422  mnWidth = FRound( mnWidth * fabs(fScaleX) );
1423 }
1424 
1426 {
1427  MetaAction::Write(rOStm, pData);
1428  VersionCompatWrite aCompat(rOStm, 2);
1429 
1430  TypeSerializer aSerializer(rOStm);
1431  aSerializer.writePoint(maPos);
1432 
1433  rOStm.WriteInt32( mnWidth );
1434  rOStm.WriteUInt32( meStrikeout );
1435  rOStm.WriteUInt32( meUnderline );
1436  // new in version 2
1437  rOStm.WriteUInt32( meOverline );
1438 }
1439 
1441 {
1442  VersionCompatRead aCompat(rIStm);
1443 
1444  sal_Int32 nTempWidth(0);
1445  TypeSerializer aSerializer(rIStm);
1446  aSerializer.readPoint(maPos);
1447  rIStm.ReadInt32(nTempWidth);
1448  mnWidth = nTempWidth;
1449 
1450  sal_uInt32 nTempStrikeout(0);
1451  rIStm.ReadUInt32( nTempStrikeout );
1452  meStrikeout = static_cast<FontStrikeout>(nTempStrikeout);
1453 
1454  sal_uInt32 nTempUnderline(0);
1455  rIStm.ReadUInt32( nTempUnderline );
1456  meUnderline = static_cast<FontLineStyle>(nTempUnderline);
1457 
1458  if (aCompat.GetVersion() >= 2)
1459  {
1460  sal_uInt32 nTempOverline(0);
1461  rIStm.ReadUInt32(nTempOverline);
1462  meOverline = static_cast<FontLineStyle>(nTempOverline);
1463  }
1464 }
1465 
1468 {}
1469 
1471 {}
1472 
1473 MetaBmpAction::MetaBmpAction( const Point& rPt, const Bitmap& rBmp ) :
1475  maBmp ( rBmp ),
1476  maPt ( rPt )
1477 {}
1478 
1480 {
1481  pOut->DrawBitmap( maPt, maBmp );
1482 }
1483 
1485 {
1486  return new MetaBmpAction( *this );
1487 }
1488 
1489 void MetaBmpAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1490 {
1491  maPt.Move( nHorzMove, nVertMove );
1492 }
1493 
1494 void MetaBmpAction::Scale( double fScaleX, double fScaleY )
1495 {
1496  ImplScalePoint( maPt, fScaleX, fScaleY );
1497 }
1498 
1500 {
1501  if( !maBmp.IsEmpty() )
1502  {
1503  MetaAction::Write(rOStm, pData);
1504  VersionCompatWrite aCompat(rOStm, 1);
1505  WriteDIB(maBmp, rOStm, false, true);
1506  TypeSerializer aSerializer(rOStm);
1507  aSerializer.writePoint(maPt);
1508  }
1509 }
1510 
1512 {
1513  VersionCompatRead aCompat(rIStm);
1514  ReadDIB(maBmp, rIStm, true);
1515  TypeSerializer aSerializer(rIStm);
1516  aSerializer.readPoint(maPt);
1517 }
1518 
1521 {}
1522 
1524 {}
1525 
1526 MetaBmpScaleAction::MetaBmpScaleAction( const Point& rPt, const Size& rSz,
1527  const Bitmap& rBmp ) :
1529  maBmp ( rBmp ),
1530  maPt ( rPt ),
1531  maSz ( rSz )
1532 {}
1533 
1535 {
1536  pOut->DrawBitmap( maPt, maSz, maBmp );
1537 }
1538 
1540 {
1541  return new MetaBmpScaleAction( *this );
1542 }
1543 
1545 {
1546  maPt.Move( nHorzMove, nVertMove );
1547 }
1548 
1549 void MetaBmpScaleAction::Scale( double fScaleX, double fScaleY )
1550 {
1551  tools::Rectangle aRectangle(maPt, maSz);
1552  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1553  maPt = aRectangle.TopLeft();
1554  maSz = aRectangle.GetSize();
1555 }
1556 
1558 {
1559  if( !maBmp.IsEmpty() )
1560  {
1561  MetaAction::Write(rOStm, pData);
1562  VersionCompatWrite aCompat(rOStm, 1);
1563  WriteDIB(maBmp, rOStm, false, true);
1564  TypeSerializer aSerializer(rOStm);
1565  aSerializer.writePoint(maPt);
1566  aSerializer.writeSize(maSz);
1567 
1568  }
1569 }
1570 
1572 {
1573  VersionCompatRead aCompat(rIStm);
1574  ReadDIB(maBmp, rIStm, true);
1575  TypeSerializer aSerializer(rIStm);
1576  aSerializer.readPoint(maPt);
1577  aSerializer.readSize(maSz);
1578 }
1579 
1580 MetaBmpScalePartAction::MetaBmpScalePartAction() :
1582 {}
1583 
1584 MetaBmpScalePartAction::~MetaBmpScalePartAction()
1585 {}
1586 
1587 MetaBmpScalePartAction::MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
1588  const Point& rSrcPt, const Size& rSrcSz,
1589  const Bitmap& rBmp ) :
1591  maBmp ( rBmp ),
1592  maDstPt ( rDstPt ),
1593  maDstSz ( rDstSz ),
1594  maSrcPt ( rSrcPt ),
1595  maSrcSz ( rSrcSz )
1596 {}
1597 
1598 void MetaBmpScalePartAction::Execute( OutputDevice* pOut )
1599 {
1600  pOut->DrawBitmap( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmp );
1601 }
1602 
1603 rtl::Reference<MetaAction> MetaBmpScalePartAction::Clone()
1604 {
1605  return new MetaBmpScalePartAction( *this );
1606 }
1607 
1608 void MetaBmpScalePartAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1609 {
1610  maDstPt.Move( nHorzMove, nVertMove );
1611 }
1612 
1613 void MetaBmpScalePartAction::Scale( double fScaleX, double fScaleY )
1614 {
1615  tools::Rectangle aRectangle(maDstPt, maDstSz);
1616  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1617  maDstPt = aRectangle.TopLeft();
1618  maDstSz = aRectangle.GetSize();
1619 }
1620 
1621 void MetaBmpScalePartAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1622 {
1623  if( !maBmp.IsEmpty() )
1624  {
1625  MetaAction::Write(rOStm, pData);
1626  VersionCompatWrite aCompat(rOStm, 1);
1627  WriteDIB(maBmp, rOStm, false, true);
1628  TypeSerializer aSerializer(rOStm);
1629  aSerializer.writePoint(maDstPt);
1630  aSerializer.writeSize(maDstSz);
1631  aSerializer.writePoint(maSrcPt);
1632  aSerializer.writeSize(maSrcSz);
1633 
1634  }
1635 }
1636 
1637 void MetaBmpScalePartAction::Read( SvStream& rIStm, ImplMetaReadData* )
1638 {
1639  VersionCompatRead aCompat(rIStm);
1640  ReadDIB(maBmp, rIStm, true);
1641  TypeSerializer aSerializer(rIStm);
1642  aSerializer.readPoint(maDstPt);
1643  aSerializer.readSize(maDstSz);
1644  aSerializer.readPoint(maSrcPt);
1645  aSerializer.readSize(maSrcSz);
1646 }
1647 
1650 {}
1651 
1653 {}
1654 
1655 MetaBmpExAction::MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx ) :
1657  maBmpEx ( rBmpEx ),
1658  maPt ( rPt )
1659 {}
1660 
1662 {
1663  pOut->DrawBitmapEx( maPt, maBmpEx );
1664 }
1665 
1667 {
1668  return new MetaBmpExAction( *this );
1669 }
1670 
1671 void MetaBmpExAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1672 {
1673  maPt.Move( nHorzMove, nVertMove );
1674 }
1675 
1676 void MetaBmpExAction::Scale( double fScaleX, double fScaleY )
1677 {
1678  ImplScalePoint( maPt, fScaleX, fScaleY );
1679 }
1680 
1682 {
1683  if( !maBmpEx.GetBitmap().IsEmpty() )
1684  {
1685  MetaAction::Write(rOStm, pData);
1686  VersionCompatWrite aCompat(rOStm, 1);
1687  WriteDIBBitmapEx(maBmpEx, rOStm);
1688  TypeSerializer aSerializer(rOStm);
1689  aSerializer.writePoint(maPt);
1690  }
1691 }
1692 
1694 {
1695  VersionCompatRead aCompat(rIStm);
1696  ReadDIBBitmapEx(maBmpEx, rIStm);
1697  TypeSerializer aSerializer(rIStm);
1698  aSerializer.readPoint(maPt);
1699 }
1700 
1703 {}
1704 
1706 {}
1707 
1708 MetaBmpExScaleAction::MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
1709  const BitmapEx& rBmpEx ) :
1711  maBmpEx ( rBmpEx ),
1712  maPt ( rPt ),
1713  maSz ( rSz )
1714 {}
1715 
1717 {
1718  pOut->DrawBitmapEx( maPt, maSz, maBmpEx );
1719 }
1720 
1722 {
1723  return new MetaBmpExScaleAction( *this );
1724 }
1725 
1727 {
1728  maPt.Move( nHorzMove, nVertMove );
1729 }
1730 
1731 void MetaBmpExScaleAction::Scale( double fScaleX, double fScaleY )
1732 {
1733  tools::Rectangle aRectangle(maPt, maSz);
1734  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1735  maPt = aRectangle.TopLeft();
1736  maSz = aRectangle.GetSize();
1737 }
1738 
1740 {
1741  if( !maBmpEx.GetBitmap().IsEmpty() )
1742  {
1743  MetaAction::Write(rOStm, pData);
1744  VersionCompatWrite aCompat(rOStm, 1);
1745  WriteDIBBitmapEx(maBmpEx, rOStm);
1746  TypeSerializer aSerializer(rOStm);
1747  aSerializer.writePoint(maPt);
1748  aSerializer.writeSize(maSz);
1749  }
1750 }
1751 
1753 {
1754  VersionCompatRead aCompat(rIStm);
1755  ReadDIBBitmapEx(maBmpEx, rIStm);
1756  TypeSerializer aSerializer(rIStm);
1757  aSerializer.readPoint(maPt);
1758  aSerializer.readSize(maSz);
1759 }
1760 
1761 MetaBmpExScalePartAction::MetaBmpExScalePartAction() :
1763 {}
1764 
1765 MetaBmpExScalePartAction::~MetaBmpExScalePartAction()
1766 {}
1767 
1768 MetaBmpExScalePartAction::MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
1769  const Point& rSrcPt, const Size& rSrcSz,
1770  const BitmapEx& rBmpEx ) :
1772  maBmpEx ( rBmpEx ),
1773  maDstPt ( rDstPt ),
1774  maDstSz ( rDstSz ),
1775  maSrcPt ( rSrcPt ),
1776  maSrcSz ( rSrcSz )
1777 {}
1778 
1779 void MetaBmpExScalePartAction::Execute( OutputDevice* pOut )
1780 {
1781  pOut->DrawBitmapEx( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmpEx );
1782 }
1783 
1784 rtl::Reference<MetaAction> MetaBmpExScalePartAction::Clone()
1785 {
1786  return new MetaBmpExScalePartAction( *this );
1787 }
1788 
1789 void MetaBmpExScalePartAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1790 {
1791  maDstPt.Move( nHorzMove, nVertMove );
1792 }
1793 
1794 void MetaBmpExScalePartAction::Scale( double fScaleX, double fScaleY )
1795 {
1796  tools::Rectangle aRectangle(maDstPt, maDstSz);
1797  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1798  maDstPt = aRectangle.TopLeft();
1799  maDstSz = aRectangle.GetSize();
1800 }
1801 
1802 void MetaBmpExScalePartAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1803 {
1804  if( !maBmpEx.GetBitmap().IsEmpty() )
1805  {
1806  MetaAction::Write(rOStm, pData);
1807  VersionCompatWrite aCompat(rOStm, 1);
1808  WriteDIBBitmapEx(maBmpEx, rOStm);
1809  TypeSerializer aSerializer(rOStm);
1810  aSerializer.writePoint(maDstPt);
1811  aSerializer.writeSize(maDstSz);
1812  aSerializer.writePoint(maSrcPt);
1813  aSerializer.writeSize(maSrcSz);
1814  }
1815 }
1816 
1817 void MetaBmpExScalePartAction::Read( SvStream& rIStm, ImplMetaReadData* )
1818 {
1819  VersionCompatRead aCompat(rIStm);
1820  ReadDIBBitmapEx(maBmpEx, rIStm);
1821  TypeSerializer aSerializer(rIStm);
1822  aSerializer.readPoint(maDstPt);
1823  aSerializer.readSize(maDstSz);
1824  aSerializer.readPoint(maSrcPt);
1825  aSerializer.readSize(maSrcSz);
1826 }
1827 
1830 {}
1831 
1833 {}
1834 
1836  const Bitmap& rBmp,
1837  const Color& rColor ) :
1839  maBmp ( rBmp ),
1840  maColor ( rColor ),
1841  maPt ( rPt )
1842 {}
1843 
1845 {
1846  pOut->DrawMask( maPt, maBmp, maColor );
1847 }
1848 
1850 {
1851  return new MetaMaskAction( *this );
1852 }
1853 
1854 void MetaMaskAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1855 {
1856  maPt.Move( nHorzMove, nVertMove );
1857 }
1858 
1859 void MetaMaskAction::Scale( double fScaleX, double fScaleY )
1860 {
1861  ImplScalePoint( maPt, fScaleX, fScaleY );
1862 }
1863 
1865 {
1866  if( !maBmp.IsEmpty() )
1867  {
1868  MetaAction::Write(rOStm, pData);
1869  VersionCompatWrite aCompat(rOStm, 1);
1870  WriteDIB(maBmp, rOStm, false, true);
1871  TypeSerializer aSerializer(rOStm);
1872  aSerializer.writePoint(maPt);
1873  }
1874 }
1875 
1877 {
1878  VersionCompatRead aCompat(rIStm);
1879  ReadDIB(maBmp, rIStm, true);
1880  TypeSerializer aSerializer(rIStm);
1881  aSerializer.readPoint(maPt);
1882 }
1883 
1886 {}
1887 
1889 {}
1890 
1891 MetaMaskScaleAction::MetaMaskScaleAction( const Point& rPt, const Size& rSz,
1892  const Bitmap& rBmp,
1893  const Color& rColor ) :
1895  maBmp ( rBmp ),
1896  maColor ( rColor ),
1897  maPt ( rPt ),
1898  maSz ( rSz )
1899 {}
1900 
1902 {
1903  pOut->DrawMask( maPt, maSz, maBmp, maColor );
1904 }
1905 
1907 {
1908  return new MetaMaskScaleAction( *this );
1909 }
1910 
1912 {
1913  maPt.Move( nHorzMove, nVertMove );
1914 }
1915 
1916 void MetaMaskScaleAction::Scale( double fScaleX, double fScaleY )
1917 {
1918  tools::Rectangle aRectangle(maPt, maSz);
1919  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1920  maPt = aRectangle.TopLeft();
1921  maSz = aRectangle.GetSize();
1922 }
1923 
1925 {
1926  if( !maBmp.IsEmpty() )
1927  {
1928  MetaAction::Write(rOStm, pData);
1929  VersionCompatWrite aCompat(rOStm, 1);
1930  WriteDIB(maBmp, rOStm, false, true);
1931  TypeSerializer aSerializer(rOStm);
1932  aSerializer.writePoint(maPt);
1933  aSerializer.writeSize(maSz);
1934  }
1935 }
1936 
1938 {
1939  VersionCompatRead aCompat(rIStm);
1940  ReadDIB(maBmp, rIStm, true);
1941  TypeSerializer aSerializer(rIStm);
1942  aSerializer.readPoint(maPt);
1943  aSerializer.readSize(maSz);
1944 }
1945 
1948 {}
1949 
1951 {}
1952 
1953 MetaMaskScalePartAction::MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz,
1954  const Point& rSrcPt, const Size& rSrcSz,
1955  const Bitmap& rBmp,
1956  const Color& rColor ) :
1958  maBmp ( rBmp ),
1959  maColor ( rColor ),
1960  maDstPt ( rDstPt ),
1961  maDstSz ( rDstSz ),
1962  maSrcPt ( rSrcPt ),
1963  maSrcSz ( rSrcSz )
1964 {}
1965 
1967 {
1969 }
1970 
1972 {
1973  return new MetaMaskScalePartAction( *this );
1974 }
1975 
1977 {
1978  maDstPt.Move( nHorzMove, nVertMove );
1979 }
1980 
1981 void MetaMaskScalePartAction::Scale( double fScaleX, double fScaleY )
1982 {
1983  tools::Rectangle aRectangle(maDstPt, maDstSz);
1984  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1985  maDstPt = aRectangle.TopLeft();
1986  maDstSz = aRectangle.GetSize();
1987 }
1988 
1990 {
1991  if( !maBmp.IsEmpty() )
1992  {
1993  MetaAction::Write(rOStm, pData);
1994  VersionCompatWrite aCompat(rOStm, 1);
1995  WriteDIB(maBmp, rOStm, false, true);
1996  WriteColor(rOStm, maColor);
1997  TypeSerializer aSerializer(rOStm);
1998  aSerializer.writePoint(maDstPt);
1999  aSerializer.writeSize(maDstSz);
2000  aSerializer.writePoint(maSrcPt);
2001  aSerializer.writeSize(maSrcSz);
2002  }
2003 }
2004 
2006 {
2007  VersionCompatRead aCompat(rIStm);
2008  ReadDIB(maBmp, rIStm, true);
2009  ReadColor(rIStm, maColor);
2010  TypeSerializer aSerializer(rIStm);
2011  aSerializer.readPoint(maDstPt);
2012  aSerializer.readSize(maDstSz);
2013  aSerializer.readPoint(maSrcPt);
2014  aSerializer.readSize(maSrcSz);
2015 }
2016 
2019 {}
2020 
2022 {}
2023 
2026  maRect ( rRect ),
2027  maGradient ( rGradient )
2028 {}
2029 
2031 {
2032  pOut->DrawGradient( maRect, maGradient );
2033 }
2034 
2036 {
2037  return new MetaGradientAction( *this );
2038 }
2039 
2041 {
2042  maRect.Move( nHorzMove, nVertMove );
2043 }
2044 
2045 void MetaGradientAction::Scale( double fScaleX, double fScaleY )
2046 {
2047  ImplScaleRect( maRect, fScaleX, fScaleY );
2048 }
2049 
2051 {
2052  MetaAction::Write(rOStm, pData);
2053  VersionCompatWrite aCompat(rOStm, 1);
2054  TypeSerializer aSerializer(rOStm);
2055  aSerializer.writeRectangle(maRect);
2056  aSerializer.writeGradient(maGradient);
2057 }
2058 
2060 {
2061  VersionCompatRead aCompat(rIStm);
2062  TypeSerializer aSerializer(rIStm);
2063  aSerializer.readRectangle(maRect);
2064  aSerializer.readGradient(maGradient);
2065 }
2066 
2067 MetaGradientExAction::MetaGradientExAction() :
2069 {}
2070 
2071 MetaGradientExAction::MetaGradientExAction( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ) :
2073  maPolyPoly ( rPolyPoly ),
2074  maGradient ( rGradient )
2075 {}
2076 
2077 MetaGradientExAction::~MetaGradientExAction()
2078 {}
2079 
2080 void MetaGradientExAction::Execute( OutputDevice* pOut )
2081 {
2082  if( pOut->GetConnectMetaFile() )
2083  {
2084  pOut->GetConnectMetaFile()->AddAction( this );
2085  }
2086 }
2087 
2088 rtl::Reference<MetaAction> MetaGradientExAction::Clone()
2089 {
2090  return new MetaGradientExAction( *this );
2091 }
2092 
2093 void MetaGradientExAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
2094 {
2095  maPolyPoly.Move( nHorzMove, nVertMove );
2096 }
2097 
2098 void MetaGradientExAction::Scale( double fScaleX, double fScaleY )
2099 {
2100  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
2101  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
2102 }
2103 
2104 void MetaGradientExAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2105 {
2106  MetaAction::Write(rOStm, pData);
2107  VersionCompatWrite aCompat(rOStm, 1);
2108 
2109  // #i105373# see comment at MetaTransparentAction::Write
2110  tools::PolyPolygon aNoCurvePolyPolygon;
2111  maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon);
2112 
2113  WritePolyPolygon( rOStm, aNoCurvePolyPolygon );
2114  TypeSerializer aSerializer(rOStm);
2115  aSerializer.writeGradient(maGradient);
2116 }
2117 
2118 void MetaGradientExAction::Read( SvStream& rIStm, ImplMetaReadData* )
2119 {
2120  VersionCompatRead aCompat(rIStm);
2121  ReadPolyPolygon( rIStm, maPolyPoly );
2122  TypeSerializer aSerializer(rIStm);
2123  aSerializer.readGradient(maGradient);
2124 }
2125 
2128 {}
2129 
2131 {}
2132 
2133 MetaHatchAction::MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ) :
2135  maPolyPoly ( rPolyPoly ),
2136  maHatch ( rHatch )
2137 {}
2138 
2140 {
2141  pOut->DrawHatch( maPolyPoly, maHatch );
2142 }
2143 
2145 {
2146  return new MetaHatchAction( *this );
2147 }
2148 
2149 void MetaHatchAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
2150 {
2151  maPolyPoly.Move( nHorzMove, nVertMove );
2152 }
2153 
2154 void MetaHatchAction::Scale( double fScaleX, double fScaleY )
2155 {
2156  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
2157  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
2158 }
2159 
2161 {
2162  MetaAction::Write(rOStm, pData);
2163  VersionCompatWrite aCompat(rOStm, 1);
2164 
2165  // #i105373# see comment at MetaTransparentAction::Write
2166  tools::PolyPolygon aNoCurvePolyPolygon;
2167  maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon);
2168 
2169  WritePolyPolygon( rOStm, aNoCurvePolyPolygon );
2170  WriteHatch( rOStm, maHatch );
2171 }
2172 
2174 {
2175  VersionCompatRead aCompat(rIStm);
2176  ReadPolyPolygon( rIStm, maPolyPoly );
2177  ReadHatch( rIStm, maHatch );
2178 }
2179 
2180 MetaWallpaperAction::MetaWallpaperAction() :
2182 {}
2183 
2184 MetaWallpaperAction::~MetaWallpaperAction()
2185 {}
2186 
2187 MetaWallpaperAction::MetaWallpaperAction( const tools::Rectangle& rRect,
2188  const Wallpaper& rPaper ) :
2190  maRect ( rRect ),
2191  maWallpaper ( rPaper )
2192 {}
2193 
2194 void MetaWallpaperAction::Execute( OutputDevice* pOut )
2195 {
2196  pOut->DrawWallpaper( maRect, maWallpaper );
2197 }
2198 
2199 rtl::Reference<MetaAction> MetaWallpaperAction::Clone()
2200 {
2201  return new MetaWallpaperAction( *this );
2202 }
2203 
2204 void MetaWallpaperAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
2205 {
2206  maRect.Move( nHorzMove, nVertMove );
2207 }
2208 
2209 void MetaWallpaperAction::Scale( double fScaleX, double fScaleY )
2210 {
2211  ImplScaleRect( maRect, fScaleX, fScaleY );
2212 }
2213 
2214 void MetaWallpaperAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2215 {
2216  MetaAction::Write(rOStm, pData);
2217  VersionCompatWrite aCompat(rOStm, 1);
2218 
2219  WriteWallpaper( rOStm, maWallpaper );
2220 }
2221 
2222 void MetaWallpaperAction::Read( SvStream& rIStm, ImplMetaReadData* )
2223 {
2224  VersionCompatRead aCompat(rIStm);
2225  ReadWallpaper( rIStm, maWallpaper );
2226 }
2227 
2228 MetaClipRegionAction::MetaClipRegionAction() :
2230  mbClip ( false )
2231 {}
2232 
2233 MetaClipRegionAction::~MetaClipRegionAction()
2234 {}
2235 
2236 MetaClipRegionAction::MetaClipRegionAction( const vcl::Region& rRegion, bool bClip ) :
2238  maRegion ( rRegion ),
2239  mbClip ( bClip )
2240 {}
2241 
2242 void MetaClipRegionAction::Execute( OutputDevice* pOut )
2243 {
2244  if( mbClip )
2245  pOut->SetClipRegion( maRegion );
2246  else
2247  pOut->SetClipRegion();
2248 }
2249 
2250 rtl::Reference<MetaAction> MetaClipRegionAction::Clone()
2251 {
2252  return new MetaClipRegionAction( *this );
2253 }
2254 
2255 void MetaClipRegionAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
2256 {
2257  maRegion.Move( nHorzMove, nVertMove );
2258 }
2259 
2260 void MetaClipRegionAction::Scale( double fScaleX, double fScaleY )
2261 {
2262  maRegion.Scale( fScaleX, fScaleY );
2263 }
2264 
2265 void MetaClipRegionAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2266 {
2267  MetaAction::Write(rOStm, pData);
2268  VersionCompatWrite aCompat(rOStm, 1);
2269 
2270  WriteRegion( rOStm, maRegion );
2271  rOStm.WriteBool( mbClip );
2272 }
2273 
2274 void MetaClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
2275 {
2276  VersionCompatRead aCompat(rIStm);
2277  ReadRegion( rIStm, maRegion );
2278  rIStm.ReadCharAsBool( mbClip );
2279 }
2280 
2281 MetaISectRectClipRegionAction::MetaISectRectClipRegionAction() :
2283 {}
2284 
2285 MetaISectRectClipRegionAction::~MetaISectRectClipRegionAction()
2286 {}
2287 
2288 MetaISectRectClipRegionAction::MetaISectRectClipRegionAction( const tools::Rectangle& rRect ) :
2290  maRect ( rRect )
2291 {}
2292 
2293 void MetaISectRectClipRegionAction::Execute( OutputDevice* pOut )
2294 {
2295  pOut->IntersectClipRegion( maRect );
2296 }
2297 
2298 rtl::Reference<MetaAction> MetaISectRectClipRegionAction::Clone()
2299 {
2300  return new MetaISectRectClipRegionAction( *this );
2301 }
2302 
2303 void MetaISectRectClipRegionAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
2304 {
2305  maRect.Move( nHorzMove, nVertMove );
2306 }
2307 
2308 void MetaISectRectClipRegionAction::Scale( double fScaleX, double fScaleY )
2309 {
2310  ImplScaleRect( maRect, fScaleX, fScaleY );
2311 }
2312 
2313 void MetaISectRectClipRegionAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2314 {
2315  MetaAction::Write(rOStm, pData);
2316  VersionCompatWrite aCompat(rOStm, 1);
2317  TypeSerializer aSerializer(rOStm);
2318  aSerializer.writeRectangle(maRect);
2319 }
2320 
2321 void MetaISectRectClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
2322 {
2323  VersionCompatRead aCompat(rIStm);
2324  TypeSerializer aSerializer(rIStm);
2325  aSerializer.readRectangle(maRect);
2326 }
2327 
2328 MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction() :
2330 {}
2331 
2332 MetaISectRegionClipRegionAction::~MetaISectRegionClipRegionAction()
2333 {}
2334 
2335 MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction( const vcl::Region& rRegion ) :
2337  maRegion ( rRegion )
2338 {
2339 }
2340 
2341 void MetaISectRegionClipRegionAction::Execute( OutputDevice* pOut )
2342 {
2343  pOut->IntersectClipRegion( maRegion );
2344 }
2345 
2346 rtl::Reference<MetaAction> MetaISectRegionClipRegionAction::Clone()
2347 {
2348  return new MetaISectRegionClipRegionAction( *this );
2349 }
2350 
2351 void MetaISectRegionClipRegionAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
2352 {
2353  maRegion.Move( nHorzMove, nVertMove );
2354 }
2355 
2356 void MetaISectRegionClipRegionAction::Scale( double fScaleX, double fScaleY )
2357 {
2358  maRegion.Scale( fScaleX, fScaleY );
2359 }
2360 
2361 void MetaISectRegionClipRegionAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2362 {
2363  MetaAction::Write(rOStm, pData);
2364  VersionCompatWrite aCompat(rOStm, 1);
2365  WriteRegion( rOStm, maRegion );
2366 }
2367 
2368 void MetaISectRegionClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
2369 {
2370  VersionCompatRead aCompat(rIStm);
2371  ReadRegion( rIStm, maRegion );
2372 }
2373 
2374 MetaMoveClipRegionAction::MetaMoveClipRegionAction() :
2376  mnHorzMove ( 0 ),
2377  mnVertMove ( 0 )
2378 {}
2379 
2380 MetaMoveClipRegionAction::~MetaMoveClipRegionAction()
2381 {}
2382 
2383 MetaMoveClipRegionAction::MetaMoveClipRegionAction( tools::Long nHorzMove, tools::Long nVertMove ) :
2385  mnHorzMove ( nHorzMove ),
2386  mnVertMove ( nVertMove )
2387 {}
2388 
2389 void MetaMoveClipRegionAction::Execute( OutputDevice* pOut )
2390 {
2391  pOut->MoveClipRegion( mnHorzMove, mnVertMove );
2392 }
2393 
2394 rtl::Reference<MetaAction> MetaMoveClipRegionAction::Clone()
2395 {
2396  return new MetaMoveClipRegionAction( *this );
2397 }
2398 
2399 void MetaMoveClipRegionAction::Scale( double fScaleX, double fScaleY )
2400 {
2401  mnHorzMove = FRound( mnHorzMove * fScaleX );
2402  mnVertMove = FRound( mnVertMove * fScaleY );
2403 }
2404 
2405 void MetaMoveClipRegionAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2406 {
2407  MetaAction::Write(rOStm, pData);
2408  VersionCompatWrite aCompat(rOStm, 1);
2409  rOStm.WriteInt32( mnHorzMove ).WriteInt32( mnVertMove );
2410 }
2411 
2412 void MetaMoveClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
2413 {
2414  VersionCompatRead aCompat(rIStm);
2415  sal_Int32 nTmpHM(0), nTmpVM(0);
2416  rIStm.ReadInt32( nTmpHM ).ReadInt32( nTmpVM );
2417  mnHorzMove = nTmpHM;
2418  mnVertMove = nTmpVM;
2419 }
2420 
2423  mbSet ( false )
2424 {}
2425 
2427 {}
2428 
2431  maColor ( rColor ),
2432  mbSet ( bSet )
2433 {}
2434 
2436 {
2437  if( mbSet )
2438  pOut->SetLineColor( maColor );
2439  else
2440  pOut->SetLineColor();
2441 }
2442 
2444 {
2445  return new MetaLineColorAction( *this );
2446 }
2447 
2449 {
2450  MetaAction::Write(rOStm, pData);
2451  VersionCompatWrite aCompat(rOStm, 1);
2452  WriteColor(rOStm, maColor);
2453  rOStm.WriteBool( mbSet );
2454 }
2455 
2457 {
2458  VersionCompatRead aCompat(rIStm);
2459  ReadColor(rIStm, maColor);
2460  rIStm.ReadCharAsBool( mbSet );
2461 }
2462 
2465  mbSet ( false )
2466 {}
2467 
2469 {}
2470 
2473  maColor ( rColor ),
2474  mbSet ( bSet )
2475 {}
2476 
2478 {
2479  if( mbSet )
2480  pOut->SetFillColor( maColor );
2481  else
2482  pOut->SetFillColor();
2483 }
2484 
2486 {
2487  return new MetaFillColorAction( *this );
2488 }
2489 
2491 {
2492  MetaAction::Write(rOStm, pData);
2493  VersionCompatWrite aCompat(rOStm, 1);
2494  WriteColor(rOStm, maColor);
2495  rOStm.WriteBool( mbSet );
2496 }
2497 
2499 {
2500  VersionCompatRead aCompat(rIStm);
2501  ReadColor(rIStm, maColor);
2502  rIStm.ReadCharAsBool( mbSet );
2503 }
2504 
2505 MetaTextColorAction::MetaTextColorAction() :
2507 {}
2508 
2509 MetaTextColorAction::~MetaTextColorAction()
2510 {}
2511 
2512 MetaTextColorAction::MetaTextColorAction( const Color& rColor ) :
2514  maColor ( rColor )
2515 {}
2516 
2517 void MetaTextColorAction::Execute( OutputDevice* pOut )
2518 {
2519  pOut->SetTextColor( maColor );
2520 }
2521 
2522 rtl::Reference<MetaAction> MetaTextColorAction::Clone()
2523 {
2524  return new MetaTextColorAction( *this );
2525 }
2526 
2527 void MetaTextColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2528 {
2529  MetaAction::Write(rOStm, pData);
2530  VersionCompatWrite aCompat(rOStm, 1);
2531  WriteColor(rOStm, maColor);
2532 }
2533 
2534 void MetaTextColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
2535 {
2536  VersionCompatRead aCompat(rIStm);
2537  ReadColor(rIStm, maColor);
2538 }
2539 
2540 MetaTextFillColorAction::MetaTextFillColorAction() :
2542  mbSet ( false )
2543 {}
2544 
2545 MetaTextFillColorAction::~MetaTextFillColorAction()
2546 {}
2547 
2548 MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, bool bSet ) :
2550  maColor ( rColor ),
2551  mbSet ( bSet )
2552 {}
2553 
2554 void MetaTextFillColorAction::Execute( OutputDevice* pOut )
2555 {
2556  if( mbSet )
2557  pOut->SetTextFillColor( maColor );
2558  else
2559  pOut->SetTextFillColor();
2560 }
2561 
2562 rtl::Reference<MetaAction> MetaTextFillColorAction::Clone()
2563 {
2564  return new MetaTextFillColorAction( *this );
2565 }
2566 
2567 void MetaTextFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2568 {
2569  MetaAction::Write(rOStm, pData);
2570  VersionCompatWrite aCompat(rOStm, 1);
2571  WriteColor(rOStm, maColor);
2572  rOStm.WriteBool( mbSet );
2573 }
2574 
2575 void MetaTextFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
2576 {
2577  VersionCompatRead aCompat(rIStm);
2578  ReadColor(rIStm, maColor);
2579  rIStm.ReadCharAsBool( mbSet );
2580 }
2581 
2582 MetaTextLineColorAction::MetaTextLineColorAction() :
2584  mbSet ( false )
2585 {}
2586 
2587 MetaTextLineColorAction::~MetaTextLineColorAction()
2588 {}
2589 
2590 MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, bool bSet ) :
2592  maColor ( rColor ),
2593  mbSet ( bSet )
2594 {}
2595 
2596 void MetaTextLineColorAction::Execute( OutputDevice* pOut )
2597 {
2598  if( mbSet )
2599  pOut->SetTextLineColor( maColor );
2600  else
2601  pOut->SetTextLineColor();
2602 }
2603 
2604 rtl::Reference<MetaAction> MetaTextLineColorAction::Clone()
2605 {
2606  return new MetaTextLineColorAction( *this );
2607 }
2608 
2609 void MetaTextLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2610 {
2611  MetaAction::Write(rOStm, pData);
2612  VersionCompatWrite aCompat(rOStm, 1);
2613  WriteColor(rOStm, maColor);
2614  rOStm.WriteBool( mbSet );
2615 }
2616 
2617 void MetaTextLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
2618 {
2619  VersionCompatRead aCompat(rIStm);
2620  ReadColor(rIStm, maColor);
2621  rIStm.ReadCharAsBool( mbSet );
2622 }
2623 
2624 MetaOverlineColorAction::MetaOverlineColorAction() :
2626  mbSet ( false )
2627 {}
2628 
2629 MetaOverlineColorAction::~MetaOverlineColorAction()
2630 {}
2631 
2632 MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, bool bSet ) :
2634  maColor ( rColor ),
2635  mbSet ( bSet )
2636 {}
2637 
2638 void MetaOverlineColorAction::Execute( OutputDevice* pOut )
2639 {
2640  if( mbSet )
2641  pOut->SetOverlineColor( maColor );
2642  else
2643  pOut->SetOverlineColor();
2644 }
2645 
2646 rtl::Reference<MetaAction> MetaOverlineColorAction::Clone()
2647 {
2648  return new MetaOverlineColorAction( *this );
2649 }
2650 
2651 void MetaOverlineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2652 {
2653  MetaAction::Write(rOStm, pData);
2654  VersionCompatWrite aCompat(rOStm, 1);
2655  WriteColor(rOStm, maColor);
2656  rOStm.WriteBool( mbSet );
2657 }
2658 
2659 void MetaOverlineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
2660 {
2661  VersionCompatRead aCompat(rIStm);
2662  ReadColor(rIStm, maColor);
2663  rIStm.ReadCharAsBool( mbSet );
2664 }
2665 
2666 MetaTextAlignAction::MetaTextAlignAction() :
2668  maAlign ( ALIGN_TOP )
2669 {}
2670 
2671 MetaTextAlignAction::~MetaTextAlignAction()
2672 {}
2673 
2674 MetaTextAlignAction::MetaTextAlignAction( TextAlign aAlign ) :
2676  maAlign ( aAlign )
2677 {}
2678 
2679 void MetaTextAlignAction::Execute( OutputDevice* pOut )
2680 {
2681  pOut->SetTextAlign( maAlign );
2682 }
2683 
2684 rtl::Reference<MetaAction> MetaTextAlignAction::Clone()
2685 {
2686  return new MetaTextAlignAction( *this );
2687 }
2688 
2689 void MetaTextAlignAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2690 {
2691  MetaAction::Write(rOStm, pData);
2692  VersionCompatWrite aCompat(rOStm, 1);
2693  rOStm.WriteUInt16( maAlign );
2694 }
2695 
2696 void MetaTextAlignAction::Read( SvStream& rIStm, ImplMetaReadData* )
2697 {
2698  sal_uInt16 nTmp16(0);
2699 
2700  VersionCompatRead aCompat(rIStm);
2701  rIStm.ReadUInt16( nTmp16 ); maAlign = static_cast<TextAlign>(nTmp16);
2702 }
2703 
2704 MetaMapModeAction::MetaMapModeAction() :
2706 {}
2707 
2708 MetaMapModeAction::~MetaMapModeAction()
2709 {}
2710 
2711 MetaMapModeAction::MetaMapModeAction( const MapMode& rMapMode ) :
2713  maMapMode ( rMapMode )
2714 {}
2715 
2716 void MetaMapModeAction::Execute( OutputDevice* pOut )
2717 {
2718  pOut->SetMapMode( maMapMode );
2719 }
2720 
2721 rtl::Reference<MetaAction> MetaMapModeAction::Clone()
2722 {
2723  return new MetaMapModeAction( *this );
2724 }
2725 
2726 void MetaMapModeAction::Scale( double fScaleX, double fScaleY )
2727 {
2728  Point aPoint( maMapMode.GetOrigin() );
2729 
2730  ImplScalePoint( aPoint, fScaleX, fScaleY );
2731  maMapMode.SetOrigin( aPoint );
2732 }
2733 
2734 void MetaMapModeAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2735 {
2736  MetaAction::Write(rOStm, pData);
2737  VersionCompatWrite aCompat(rOStm, 1);
2738  TypeSerializer aSerializer(rOStm);
2739  aSerializer.writeMapMode(maMapMode);
2740 }
2741 
2742 void MetaMapModeAction::Read( SvStream& rIStm, ImplMetaReadData* )
2743 {
2744  VersionCompatRead aCompat(rIStm);
2745  TypeSerializer aSerializer(rIStm);
2746  aSerializer.readMapMode(maMapMode);
2747 }
2748 
2749 MetaFontAction::MetaFontAction() :
2751 {}
2752 
2753 MetaFontAction::~MetaFontAction()
2754 {}
2755 
2756 MetaFontAction::MetaFontAction( const vcl::Font& rFont ) :
2758  maFont ( rFont )
2759 {
2760  // #96876: because RTL_TEXTENCODING_SYMBOL is often set at the StarSymbol font,
2761  // we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems
2762  // to be the right way; changing the textencoding at other sources
2763  // is too dangerous at the moment
2764  if ( IsStarSymbol( maFont.GetFamilyName() )
2765  && ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) )
2766  {
2767  maFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
2768  }
2769 }
2770 
2771 void MetaFontAction::Execute( OutputDevice* pOut )
2772 {
2773  pOut->SetFont( maFont );
2774 }
2775 
2776 rtl::Reference<MetaAction> MetaFontAction::Clone()
2777 {
2778  return new MetaFontAction( *this );
2779 }
2780 
2781 void MetaFontAction::Scale( double fScaleX, double fScaleY )
2782 {
2783  const Size aSize(
2784  FRound(maFont.GetFontSize().Width() * fabs(fScaleX)),
2785  FRound(maFont.GetFontSize().Height() * fabs(fScaleY)));
2786  maFont.SetFontSize( aSize );
2787 }
2788 
2789 void MetaFontAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2790 {
2791  MetaAction::Write(rOStm, pData);
2792  VersionCompatWrite aCompat(rOStm, 1);
2793  WriteFont( rOStm, maFont );
2794  pData->meActualCharSet = maFont.GetCharSet();
2795  if ( pData->meActualCharSet == RTL_TEXTENCODING_DONTKNOW )
2796  pData->meActualCharSet = osl_getThreadTextEncoding();
2797 }
2798 
2799 void MetaFontAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
2800 {
2801  VersionCompatRead aCompat(rIStm);
2802  ReadFont( rIStm, maFont );
2803  pData->meActualCharSet = maFont.GetCharSet();
2804  if ( pData->meActualCharSet == RTL_TEXTENCODING_DONTKNOW )
2805  pData->meActualCharSet = osl_getThreadTextEncoding();
2806 }
2807 
2808 MetaPushAction::MetaPushAction() :
2810  mnFlags ( PushFlags::NONE )
2811 {}
2812 
2813 MetaPushAction::~MetaPushAction()
2814 {}
2815 
2816 MetaPushAction::MetaPushAction( PushFlags nFlags ) :
2818  mnFlags ( nFlags )
2819 {}
2820 
2821 void MetaPushAction::Execute( OutputDevice* pOut )
2822 {
2823  pOut->Push( mnFlags );
2824 }
2825 
2826 rtl::Reference<MetaAction> MetaPushAction::Clone()
2827 {
2828  return new MetaPushAction( *this );
2829 }
2830 
2831 void MetaPushAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2832 {
2833  MetaAction::Write(rOStm, pData);
2834  VersionCompatWrite aCompat(rOStm, 1);
2835  rOStm.WriteUInt16( static_cast<sal_uInt16>(mnFlags) );
2836 }
2837 
2838 void MetaPushAction::Read( SvStream& rIStm, ImplMetaReadData* )
2839 {
2840  VersionCompatRead aCompat(rIStm);
2841  sal_uInt16 tmp;
2842  rIStm.ReadUInt16( tmp );
2843  mnFlags = static_cast<PushFlags>(tmp);
2844 }
2845 
2846 MetaPopAction::MetaPopAction() :
2848 {}
2849 
2850 MetaPopAction::~MetaPopAction()
2851 {}
2852 
2853 void MetaPopAction::Execute( OutputDevice* pOut )
2854 {
2855  pOut->Pop();
2856 }
2857 
2858 rtl::Reference<MetaAction> MetaPopAction::Clone()
2859 {
2860  return new MetaPopAction( *this );
2861 }
2862 
2863 void MetaPopAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2864 {
2865  MetaAction::Write(rOStm, pData);
2866  VersionCompatWrite aCompat(rOStm, 1);
2867 }
2868 
2869 void MetaPopAction::Read( SvStream& rIStm, ImplMetaReadData* )
2870 {
2871  VersionCompatRead aCompat(rIStm);
2872 }
2873 
2874 MetaRasterOpAction::MetaRasterOpAction() :
2876  meRasterOp ( RasterOp::OverPaint )
2877 {}
2878 
2879 MetaRasterOpAction::~MetaRasterOpAction()
2880 {}
2881 
2882 MetaRasterOpAction::MetaRasterOpAction( RasterOp eRasterOp ) :
2884  meRasterOp ( eRasterOp )
2885 {
2886 }
2887 
2888 void MetaRasterOpAction::Execute( OutputDevice* pOut )
2889 {
2890  pOut->SetRasterOp( meRasterOp );
2891 }
2892 
2893 rtl::Reference<MetaAction> MetaRasterOpAction::Clone()
2894 {
2895  return new MetaRasterOpAction( *this );
2896 }
2897 
2898 void MetaRasterOpAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2899 {
2900  MetaAction::Write(rOStm, pData);
2901  VersionCompatWrite aCompat(rOStm, 1);
2902  rOStm.WriteUInt16( static_cast<sal_uInt16>(meRasterOp) );
2903 }
2904 
2905 void MetaRasterOpAction::Read( SvStream& rIStm, ImplMetaReadData* )
2906 {
2907  sal_uInt16 nTmp16(0);
2908 
2909  VersionCompatRead aCompat(rIStm);
2910  rIStm.ReadUInt16( nTmp16 ); meRasterOp = static_cast<RasterOp>(nTmp16);
2911 }
2912 
2915  mnTransPercent ( 0 )
2916 {}
2917 
2919 {}
2920 
2921 MetaTransparentAction::MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ) :
2923  maPolyPoly ( rPolyPoly ),
2924  mnTransPercent ( nTransPercent )
2925 {}
2926 
2928 {
2930 }
2931 
2933 {
2934  return new MetaTransparentAction( *this );
2935 }
2936 
2938 {
2939  maPolyPoly.Move( nHorzMove, nVertMove );
2940 }
2941 
2942 void MetaTransparentAction::Scale( double fScaleX, double fScaleY )
2943 {
2944  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
2945  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
2946 }
2947 
2949 {
2950  MetaAction::Write(rOStm, pData);
2951  VersionCompatWrite aCompat(rOStm, 1);
2952 
2953  // #i105373# The tools::PolyPolygon in this action may be a curve; this
2954  // was ignored until now what is an error. To make older office
2955  // versions work with MetaFiles, i opt for applying AdaptiveSubdivide
2956  // to the PolyPolygon.
2957  // The alternative would be to really write the curve information
2958  // like in MetaPolyPolygonAction::Write (where someone extended it
2959  // correctly, but not here :-( ).
2960  // The golden solution would be to combine both, but i think it's
2961  // not necessary; a good subdivision will be sufficient.
2962  tools::PolyPolygon aNoCurvePolyPolygon;
2963  maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon);
2964 
2965  WritePolyPolygon( rOStm, aNoCurvePolyPolygon );
2966  rOStm.WriteUInt16( mnTransPercent );
2967 }
2968 
2970 {
2971  VersionCompatRead aCompat(rIStm);
2972  ReadPolyPolygon( rIStm, maPolyPoly );
2973  rIStm.ReadUInt16( mnTransPercent );
2974 }
2975 
2978 {}
2979 
2981 {}
2982 
2984  const Size& rSize, const Gradient& rGradient ) :
2986  maMtf ( rMtf ),
2987  maPoint ( rPos ),
2988  maSize ( rSize ),
2989  maGradient ( rGradient )
2990 {}
2991 
2993 {
2995 }
2996 
2998 {
2999  return new MetaFloatTransparentAction( *this );
3000 }
3001 
3003 {
3004  maPoint.Move( nHorzMove, nVertMove );
3005 }
3006 
3007 void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY )
3008 {
3009  tools::Rectangle aRectangle(maPoint, maSize);
3010  ImplScaleRect( aRectangle, fScaleX, fScaleY );
3011  maPoint = aRectangle.TopLeft();
3012  maSize = aRectangle.GetSize();
3013 }
3014 
3016 {
3017  MetaAction::Write(rOStm, pData);
3018  VersionCompatWrite aCompat(rOStm, 1);
3019 
3020  maMtf.Write( rOStm );
3021  TypeSerializer aSerializer(rOStm);
3022  aSerializer.writePoint(maPoint);
3023  aSerializer.writeSize(maSize);
3024  aSerializer.writeGradient(maGradient);
3025 }
3026 
3028 {
3029  VersionCompatRead aCompat(rIStm);
3030  ReadGDIMetaFile(rIStm, maMtf, pData);
3031  TypeSerializer aSerializer(rIStm);
3032  aSerializer.readPoint(maPoint);
3033  aSerializer.readSize(maSize);
3034  aSerializer.readGradient(maGradient);
3035 }
3036 
3039 {}
3040 
3042 {}
3043 
3044 MetaEPSAction::MetaEPSAction( const Point& rPoint, const Size& rSize,
3045  const GfxLink& rGfxLink, const GDIMetaFile& rSubst ) :
3047  maGfxLink ( rGfxLink ),
3048  maSubst ( rSubst ),
3049  maPoint ( rPoint ),
3050  maSize ( rSize )
3051 {}
3052 
3054 {
3055  pOut->DrawEPS( maPoint, maSize, maGfxLink, &maSubst );
3056 }
3057 
3059 {
3060  return new MetaEPSAction( *this );
3061 }
3062 
3063 void MetaEPSAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
3064 {
3065  maPoint.Move( nHorzMove, nVertMove );
3066 }
3067 
3068 void MetaEPSAction::Scale( double fScaleX, double fScaleY )
3069 {
3070  tools::Rectangle aRectangle(maPoint, maSize);
3071  ImplScaleRect( aRectangle, fScaleX, fScaleY );
3072  maPoint = aRectangle.TopLeft();
3073  maSize = aRectangle.GetSize();
3074 }
3075 
3077 {
3078  MetaAction::Write(rOStm, pData);
3079  VersionCompatWrite aCompat(rOStm, 1);
3080 
3081  TypeSerializer aSerializer(rOStm);
3082  aSerializer.writeGfxLink(maGfxLink);
3083  aSerializer.writePoint(maPoint);
3084  aSerializer.writeSize(maSize);
3085  maSubst.Write( rOStm );
3086 }
3087 
3089 {
3090  VersionCompatRead aCompat(rIStm);
3091  TypeSerializer aSerializer(rIStm);
3092  aSerializer.readGfxLink(maGfxLink);
3093  aSerializer.readPoint(maPoint);
3094  aSerializer.readSize(maSize);
3095  ReadGDIMetaFile( rIStm, maSubst );
3096 }
3097 
3098 MetaRefPointAction::MetaRefPointAction() :
3100  mbSet ( false )
3101 {}
3102 
3103 MetaRefPointAction::~MetaRefPointAction()
3104 {}
3105 
3106 MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, bool bSet ) :
3108  maRefPoint ( rRefPoint ),
3109  mbSet ( bSet )
3110 {}
3111 
3112 void MetaRefPointAction::Execute( OutputDevice* pOut )
3113 {
3114  if( mbSet )
3115  pOut->SetRefPoint( maRefPoint );
3116  else
3117  pOut->SetRefPoint();
3118 }
3119 
3120 rtl::Reference<MetaAction> MetaRefPointAction::Clone()
3121 {
3122  return new MetaRefPointAction( *this );
3123 }
3124 
3125 void MetaRefPointAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3126 {
3127  MetaAction::Write(rOStm, pData);
3128  VersionCompatWrite aCompat(rOStm, 1);
3129 
3130  TypeSerializer aSerializer(rOStm);
3131  aSerializer.writePoint(maRefPoint);
3132  rOStm.WriteBool( mbSet );
3133 }
3134 
3135 void MetaRefPointAction::Read( SvStream& rIStm, ImplMetaReadData* )
3136 {
3137  VersionCompatRead aCompat(rIStm);
3138  TypeSerializer aSerializer(rIStm);
3139  aSerializer.readPoint(maRefPoint);
3140  rIStm.ReadCharAsBool( mbSet );
3141 }
3142 
3145  mnValue ( 0 )
3146 {
3147  ImplInitDynamicData( nullptr, 0UL );
3148 }
3149 
3152  maComment ( rAct.maComment ),
3153  mnValue ( rAct.mnValue )
3154 {
3155  ImplInitDynamicData( rAct.mpData.get(), rAct.mnDataSize );
3156 }
3157 
3158 MetaCommentAction::MetaCommentAction( const OString& rComment, sal_Int32 nValue, const sal_uInt8* pData, sal_uInt32 nDataSize ) :
3160  maComment ( rComment ),
3161  mnValue ( nValue )
3162 {
3163  ImplInitDynamicData( pData, nDataSize );
3164 }
3165 
3167 {
3168 }
3169 
3170 void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize )
3171 {
3172  if ( nDataSize && pData )
3173  {
3174  mnDataSize = nDataSize;
3175  mpData.reset( new sal_uInt8[ mnDataSize ] );
3176  memcpy( mpData.get(), pData, mnDataSize );
3177  }
3178  else
3179  {
3180  mnDataSize = 0;
3181  mpData = nullptr;
3182  }
3183 }
3184 
3186 {
3187  if ( pOut->GetConnectMetaFile() )
3188  {
3189  pOut->GetConnectMetaFile()->AddAction( this );
3190  }
3191 }
3192 
3194 {
3195  return new MetaCommentAction( *this );
3196 }
3197 
3199 {
3200  if ( !(nXMove || nYMove) )
3201  return;
3202 
3203  if ( !(mnDataSize && mpData) )
3204  return;
3205 
3206  bool bPathStroke = (maComment == "XPATHSTROKE_SEQ_BEGIN");
3207  if ( !(bPathStroke || maComment == "XPATHFILL_SEQ_BEGIN") )
3208  return;
3209 
3210  SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
3211  SvMemoryStream aDest;
3212  if ( bPathStroke )
3213  {
3214  SvtGraphicStroke aStroke;
3215  ReadSvtGraphicStroke( aMemStm, aStroke );
3216 
3217  tools::Polygon aPath;
3218  aStroke.getPath( aPath );
3219  aPath.Move( nXMove, nYMove );
3220  aStroke.setPath( aPath );
3221 
3222  tools::PolyPolygon aStartArrow;
3223  aStroke.getStartArrow(aStartArrow);
3224  aStartArrow.Move(nXMove, nYMove);
3225  aStroke.setStartArrow(aStartArrow);
3226 
3227  tools::PolyPolygon aEndArrow;
3228  aStroke.getEndArrow(aEndArrow);
3229  aEndArrow.Move(nXMove, nYMove);
3230  aStroke.setEndArrow(aEndArrow);
3231 
3232  WriteSvtGraphicStroke( aDest, aStroke );
3233  }
3234  else
3235  {
3236  SvtGraphicFill aFill;
3237  ReadSvtGraphicFill( aMemStm, aFill );
3238 
3239  tools::PolyPolygon aPath;
3240  aFill.getPath( aPath );
3241  aPath.Move( nXMove, nYMove );
3242  aFill.setPath( aPath );
3243 
3244  WriteSvtGraphicFill( aDest, aFill );
3245  }
3246  mpData.reset();
3247  ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
3248 }
3249 
3250 // SJ: 25.07.06 #i56656# we are not able to mirror certain kind of
3251 // comments properly, especially the XPATHSTROKE and XPATHFILL lead to
3252 // problems, so it is better to remove these comments when mirroring
3253 // FIXME: fake comment to apply the next hunk in the right location
3254 void MetaCommentAction::Scale( double fXScale, double fYScale )
3255 {
3256  if (( fXScale == 1.0 ) && ( fYScale == 1.0 ))
3257  return;
3258 
3259  if ( !(mnDataSize && mpData) )
3260  return;
3261 
3262  bool bPathStroke = (maComment == "XPATHSTROKE_SEQ_BEGIN");
3263  if ( bPathStroke || maComment == "XPATHFILL_SEQ_BEGIN" )
3264  {
3265  SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
3266  SvMemoryStream aDest;
3267  if ( bPathStroke )
3268  {
3269  SvtGraphicStroke aStroke;
3270  ReadSvtGraphicStroke( aMemStm, aStroke );
3271  aStroke.scale( fXScale, fYScale );
3272  WriteSvtGraphicStroke( aDest, aStroke );
3273  }
3274  else
3275  {
3276  SvtGraphicFill aFill;
3277  ReadSvtGraphicFill( aMemStm, aFill );
3278  tools::PolyPolygon aPath;
3279  aFill.getPath( aPath );
3280  aPath.Scale( fXScale, fYScale );
3281  aFill.setPath( aPath );
3282  WriteSvtGraphicFill( aDest, aFill );
3283  }
3284  mpData.reset();
3285  ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
3286  } else if( maComment == "EMF_PLUS_HEADER_INFO" ){
3287  SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
3288  SvMemoryStream aDest;
3289 
3290  sal_Int32 nLeft(0), nRight(0), nTop(0), nBottom(0);
3291  sal_Int32 nPixX(0), nPixY(0), nMillX(0), nMillY(0);
3292  float m11(0), m12(0), m21(0), m22(0), mdx(0), mdy(0);
3293 
3294  // read data
3295  aMemStm.ReadInt32( nLeft ).ReadInt32( nTop ).ReadInt32( nRight ).ReadInt32( nBottom );
3296  aMemStm.ReadInt32( nPixX ).ReadInt32( nPixY ).ReadInt32( nMillX ).ReadInt32( nMillY );
3297  aMemStm.ReadFloat( m11 ).ReadFloat( m12 ).ReadFloat( m21 ).ReadFloat( m22 ).ReadFloat( mdx ).ReadFloat( mdy );
3298 
3299  // add scale to the transformation
3300  m11 *= fXScale;
3301  m12 *= fXScale;
3302  m22 *= fYScale;
3303  m21 *= fYScale;
3304 
3305  // prepare new data
3306  aDest.WriteInt32( nLeft ).WriteInt32( nTop ).WriteInt32( nRight ).WriteInt32( nBottom );
3307  aDest.WriteInt32( nPixX ).WriteInt32( nPixY ).WriteInt32( nMillX ).WriteInt32( nMillY );
3308  aDest.WriteFloat( m11 ).WriteFloat( m12 ).WriteFloat( m21 ).WriteFloat( m22 ).WriteFloat( mdx ).WriteFloat( mdy );
3309 
3310  // save them
3311  ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
3312  }
3313 }
3314 
3316 {
3317  MetaAction::Write(rOStm, pData);
3318  VersionCompatWrite aCompat(rOStm, 1);
3321 
3322  if ( mnDataSize )
3323  rOStm.WriteBytes( mpData.get(), mnDataSize );
3324 }
3325 
3327 {
3328  VersionCompatRead aCompat(rIStm);
3330  rIStm.ReadInt32( mnValue ).ReadUInt32( mnDataSize );
3331 
3332  if (mnDataSize > rIStm.remainingSize())
3333  {
3334  SAL_WARN("vcl.gdi", "Parsing error: " << rIStm.remainingSize() <<
3335  " available data, but " << mnDataSize << " claimed, truncating");
3336  mnDataSize = rIStm.remainingSize();
3337  }
3338 
3339  SAL_INFO("vcl.gdi", "MetaCommentAction::Read " << maComment);
3340 
3341  mpData.reset();
3342 
3343  if( mnDataSize )
3344  {
3345  mpData.reset(new sal_uInt8[ mnDataSize ]);
3346  rIStm.ReadBytes(mpData.get(), mnDataSize);
3347  }
3348 }
3349 
3350 MetaLayoutModeAction::MetaLayoutModeAction() :
3352  mnLayoutMode( ComplexTextLayoutFlags::Default )
3353 {}
3354 
3355 MetaLayoutModeAction::~MetaLayoutModeAction()
3356 {}
3357 
3358 MetaLayoutModeAction::MetaLayoutModeAction( ComplexTextLayoutFlags nLayoutMode ) :
3360  mnLayoutMode( nLayoutMode )
3361 {}
3362 
3363 void MetaLayoutModeAction::Execute( OutputDevice* pOut )
3364 {
3365  pOut->SetLayoutMode( mnLayoutMode );
3366 }
3367 
3368 rtl::Reference<MetaAction> MetaLayoutModeAction::Clone()
3369 {
3370  return new MetaLayoutModeAction( *this );
3371 }
3372 
3373 void MetaLayoutModeAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3374 {
3375  MetaAction::Write(rOStm, pData);
3376  VersionCompatWrite aCompat(rOStm, 1);
3377  rOStm.WriteUInt32( static_cast<sal_uInt32>(mnLayoutMode) );
3378 }
3379 
3380 void MetaLayoutModeAction::Read( SvStream& rIStm, ImplMetaReadData* )
3381 {
3382  VersionCompatRead aCompat(rIStm);
3383  sal_uInt32 tmp;
3384  rIStm.ReadUInt32( tmp );
3385  mnLayoutMode = static_cast<ComplexTextLayoutFlags>(tmp);
3386 }
3387 
3388 MetaTextLanguageAction::MetaTextLanguageAction() :
3390  meTextLanguage( LANGUAGE_DONTKNOW )
3391 {}
3392 
3393 MetaTextLanguageAction::~MetaTextLanguageAction()
3394 {}
3395 
3396 MetaTextLanguageAction::MetaTextLanguageAction( LanguageType eTextLanguage ) :
3398  meTextLanguage( eTextLanguage )
3399 {}
3400 
3401 void MetaTextLanguageAction::Execute( OutputDevice* pOut )
3402 {
3403  pOut->SetDigitLanguage( meTextLanguage );
3404 }
3405 
3406 rtl::Reference<MetaAction> MetaTextLanguageAction::Clone()
3407 {
3408  return new MetaTextLanguageAction( *this );
3409 }
3410 
3411 void MetaTextLanguageAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3412 {
3413  MetaAction::Write(rOStm, pData);
3414  VersionCompatWrite aCompat(rOStm, 1);
3415  rOStm.WriteUInt16( static_cast<sal_uInt16>(meTextLanguage) );
3416 }
3417 
3418 void MetaTextLanguageAction::Read( SvStream& rIStm, ImplMetaReadData* )
3419 {
3420  VersionCompatRead aCompat(rIStm);
3421  sal_uInt16 nTmp = 0;
3422  rIStm.ReadUInt16( nTmp );
3423  meTextLanguage = static_cast<LanguageType>(nTmp);
3424 }
3425 
3426 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:491
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1906
sal_uInt16 Count() const
SvStream & WriteBool(bool b)
Point TopLeft() const
virtual ~MetaRectAction() override
Definition: metaact.cxx:463
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:3068
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:791
MetaActionType mnType
Definition: metaact.hxx:68
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1989
virtual void Execute(OutputDevice *pOut)
Definition: metaact.cxx:168
void SetDigitLanguage(LanguageType)
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1721
GfxLink maGfxLink
Definition: metaact.hxx:1588
virtual ~MetaStretchTextAction() override
Definition: metaact.cxx:1252
Definition: hatch.hxx:46
GDIMetaFile maSubst
Definition: metaact.hxx:1589
sal_Int32 nIndex
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1367
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:98
virtual ~MetaGradientAction() override
Definition: metaact.cxx:2021
bool ReadDIB(Bitmap &rTarget, SvStream &rIStm, bool bFileHeader, bool bMSOFormat)
Definition: dibtools.cxx:1700
rtl_TextEncoding meActualCharSet
Definition: metaact.hxx:47
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:2937
Bitmap maBmp
Definition: metaact.hxx:858
SvStream & WritePolygon(SvStream &rOStream, const tools::Polygon &rPoly)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1499
SvStream & WriteUInt16(sal_uInt16 nUInt16)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2992
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:2045
SvStream & ReadPolyPolygon(SvStream &rIStream, tools::PolyPolygon &rPolyPoly)
SvStream & WriteInt32(sal_Int32 nInt32)
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2498
virtual ~MetaMaskAction() override
Definition: metaact.cxx:1832
void readPoint(Point &rPoint)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
void writeRectangle(const Rectangle &rRectangle)
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2932
virtual ~MetaTextAction() override
Definition: metaact.cxx:1029
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:499
void Write(SvStream &rOStream) const
virtual ~MetaCommentAction() override
Definition: metaact.cxx:3166
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:1731
SvStream & WriteSvtGraphicStroke(SvStream &rOStm, const SvtGraphicStroke &rClass)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2448
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1271
void readRectangle(Rectangle &rRectangle)
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1849
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1409
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1056
SvStream & ReadPolygon(SvStream &rIStream, tools::Polygon &rPoly)
sal_uIntPtr sal_uLong
OUString maStr
Definition: metaact.hxx:473
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1937
long Long
void writeSize(const Size &rSize)
virtual ~MetaBmpExAction() override
Definition: metaact.cxx:1652
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:430
SvStream & WriteFont(SvStream &rOStm, const vcl::Font &rFont)
Definition: font/font.cxx:572
SvStream & ReadCharAsBool(bool &rBool)
void DrawPolygon(const tools::Polygon &rPoly)
Render the given polygon.
Definition: polygon.cxx:156
sal_Int32 mnIndex
Definition: metaact.hxx:474
Encapsulates geometry and associated attributes of a graphical 'pen stroke'.
void DrawChord(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
void Scale(double fScaleX, double fScaleY)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:3053
void DrawPolyLine(const tools::Polygon &rPoly)
Render the given polygon as a line stroke.
Definition: polyline.cxx:33
DrawTextFlags mnStyle
Definition: metaact.hxx:584
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1041
void SetTextFillColor()
Definition: text.cxx:697
virtual ~MetaEPSAction() override
Definition: metaact.cxx:3041
void Move(tools::Long nHorzMove, tools::Long nVertMove)
void SetLayoutMode(ComplexTextLayoutFlags nTextLayoutMode)
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:417
void IntersectClipRegion(const tools::Rectangle &rRect)
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:415
void DrawTextLine(const Point &rPos, tools::Long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove=false)
Definition: textline.cxx:898
basegfx::BColor maColor
virtual ~MetaMaskScaleAction() override
Definition: metaact.cxx:1888
SvStream & ReadSvtGraphicStroke(SvStream &rIStm, SvtGraphicStroke &rClass)
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:3088
void DrawMask(const Point &rDestPt, const Bitmap &rBitmap, const Color &rMaskColor)
Definition: mask.cxx:30
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:363
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2050
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1916
void writeGfxLink(const GfxLink &rGfxLink)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1404
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:3315
virtual ~MetaPointAction() override
Definition: metaact.cxx:340
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:476
void SetMapMode()
Definition: map.cxx:516
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1752
SvStream & ReadSvtGraphicFill(SvStream &rIStm, SvtGraphicFill &rClass)
void DrawTextArray(const Point &rStartPt, const OUString &rStr, const tools::Long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:917
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2173
virtual ~MetaMaskScalePartAction() override
Definition: metaact.cxx:1950
NONE
void Read(SvStream &rIStream)
void scale(double fScaleX, double fScaleY)
Affine scaling in both X and Y dimensions.
virtual ~MetaBmpScaleAction() override
Definition: metaact.cxx:1523
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1854
SvStream & WriteWallpaper(SvStream &rOStm, const Wallpaper &rWallpaper)
Definition: wall.cxx:356
void DrawWallpaper(const tools::Rectangle &rRect, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:42
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1494
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2059
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:368
FuncFlags mnFlags
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2005
OString read_uInt16_lenPrefixed_uInt8s_ToOString(SvStream &rStrm)
virtual ~MetaHatchAction() override
Definition: metaact.cxx:2130
void DrawStretchText(const Point &rStartPt, sal_uLong nWidth, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1)
Definition: text.cxx:1115
bool ReadDIBBitmapEx(BitmapEx &rTarget, SvStream &rIStm, bool bFileHeader, bool bMSOFormat)
Definition: dibtools.cxx:1709
LINESTYLE_NONE
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1571
SvStream & ReadWallpaper(SvStream &rIStm, Wallpaper &rWallpaper)
Definition: wall.cxx:351
RasterOp
Definition: vclenum.hxx:192
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1489
virtual ~MetaFloatTransparentAction() override
Definition: metaact.cxx:2980
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:412
int nCount
SAL_DLLPRIVATE void ImplInitDynamicData(const sal_uInt8 *pData, sal_uInt32 nDataSize)
Definition: metaact.cxx:3170
SvStream & WriteUniOrByteString(const OUString &rStr, rtl_TextEncoding eDestCharSet)
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1544
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1876
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:3002
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1911
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1440
SvStream & WriteUInt32(sal_uInt32 nUInt32)
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2456
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1859
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:404
static rtl::Reference< MetaAction > ReadMetaAction(SvStream &rIStm, ImplMetaReadData *pData)
Definition: metaact.cxx:195
PushFlags
Definition: outdevstate.hxx:38
MetaActionType
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1693
void writePoint(const Point &rPoint)
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:423
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:376
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:443
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1520
sal_uInt64 remainingSize()
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2948
void DrawLine(const Point &rStartPt, const Point &rEndPt)
Definition: line.cxx:89
void readSize(Size &rSize)
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2035
void SetTextLineColor()
Definition: textline.cxx:800
tools::Rectangle maRect
Definition: metaact.hxx:582
void DrawRect(const tools::Rectangle &rRect)
Definition: rect.cxx:51
virtual ~MetaLineColorAction() override
Definition: metaact.cxx:2426
void AdaptiveSubdivide(tools::PolyPolygon &rResult) const
void setPath(const tools::PolyPolygon &rPath)
Set path to fill.
Gradient maGradient
Definition: metaact.hxx:970
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1681
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
Point BottomRight() const
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2144
FontStrikeout meStrikeout
Definition: metaact.hxx:617
sal_uInt32 mnDataSize
Definition: metaact.hxx:1652
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1661
void SetLineColor()
void SetRefPoint()
Definition: outdev.cxx:281
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1266
bool WriteDIBBitmapEx(const BitmapEx &rSource, SvStream &rOStm)
Definition: dibtools.cxx:1840
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:2969
FontLineStyle meOverline
Definition: metaact.hxx:619
Bitmap maBmp
Definition: metaact.hxx:653
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:3058
SvStream & ReadLineInfo(SvStream &rIStm, LineInfo &rLineInfo)
Definition: lineinfo.cxx:136
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:358
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1414
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1976
std::unique_ptr< sal_uInt8[]> mpData
Definition: metaact.hxx:1654
sal_Int32 mnValue
Definition: metaact.hxx:1651
int i
sal_Int32 mnLen
Definition: metaact.hxx:475
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1971
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1301
virtual void Scale(double fScaleX, double fScaleY)
Definition: metaact.cxx:181
Point maStartPt
Definition: metaact.hxx:164
static void ReadColor(SvStream &rIStm,::Color &rColor)
Definition: metaact.cxx:274
sal_Int32 mnType
tools::Long FRound(double fVal)
ComplexTextLayoutFlags
Definition: outdevstate.hxx:66
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1726
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:3198
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1484
virtual rtl::Reference< MetaAction > Clone()
Definition: metaact.cxx:172
SvStream & ReadFloat(float &rFloat)
void DrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
void DrawArc(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1739
static void WriteColor(SvStream &rIStm,::Color aColor)
Definition: metaact.cxx:281
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1425
bool HasFlags() const
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2927
void SetFillColor()
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:303
std::size_t WriteBytes(const void *pData, std::size_t nSize)
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1051
void writeGradient(const Gradient &rGradient)
OUString read_uInt16_lenPrefixed_uInt16s_ToOUString(SvStream &rStrm)
void SetTextColor(const Color &rColor)
Definition: text.cxx:662
void Move(tools::Long nHorzMove, tools::Long nVertMove)
rtl_TextEncoding meActualCharSet
Definition: metaact.hxx:58
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1539
#define LANGUAGE_DONTKNOW
void getPath(tools::Polygon &) const
Query path to stroke.
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:3254
sal_uInt16 GetSize() const
void SetOverlineColor()
Definition: textline.cxx:849
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1345
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1557
virtual ~MetaFillColorAction() override
Definition: metaact.cxx:2468
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1844
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1350
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2477
SvStream & ReadUChar(unsigned char &rChar)
ColorTransparency
DrawTextFlags
Definition: outdev.hxx:143
void MoveClipRegion(tools::Long nHorzMove, tools::Long nVertMove)
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1074
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:471
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1676
void DrawPie(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
std::size_t write_uInt16_lenPrefixed_uInt8s_FromOString(SvStream &rStrm, const OString &rStr)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1061
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2443
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2139
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:1470
SvStream & ReadRegion(SvStream &rIStrm, vcl::Region &rRegion)
Definition: region.cxx:1523
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1901
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove)
Definition: metaact.cxx:177
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:55
void DrawHatch(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch)
Size GetSize() const
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2997
TextAlign
SvStream & ReadHatch(SvStream &rIStm, Hatch &rHatch)
Definition: gdi/hatch.cxx:79
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData)
Definition: metaact.cxx:190
SvStream & ReadInt32(sal_Int32 &rInt32)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1966
SvStream & WritePolyPolygon(SvStream &rOStream, const tools::PolyPolygon &rPolyPoly)
std::size_t ReadBytes(void *pData, std::size_t nSize)
Bitmap GetBitmap(Color aTransparentReplaceColor) const
Definition: BitmapEx.cxx:229
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1335
SvStream & WriteSvtGraphicFill(SvStream &rOStm, const SvtGraphicFill &rClass)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1355
tools::Rectangle maRect
Definition: metaact.hxx:197
virtual ~MetaBmpExScaleAction() override
Definition: metaact.cxx:1705
ALIGN_TOP
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:3185
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:2040
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:3027
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2160
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1549
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:3193
B2DPoint maPoint
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1716
BitmapEx maBmpEx
Definition: metaact.hxx:754
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1276
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:3326
unsigned char sal_uInt8
OUString maComment
SvStream & ReadFont(SvStream &rIStm, vcl::Font &rFont)
Definition: font/font.cxx:514
void SetFont(const vcl::Font &rNewFont)
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:2149
virtual void Read(SvStream &rIStm, ImplMetaReadData *pData) override
Definition: metaact.cxx:1511
void AddAction(const rtl::Reference< MetaAction > &pAction)
Definition: gdimtf.cxx:564
LineInfo maLineInfo
Definition: metaact.hxx:163
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:2154
SvStream & WriteFloat(float nFloat)
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1924
SvStream & ReadGDIMetaFile(SvStream &rIStm, GDIMetaFile &rGDIMetaFile, ImplMetaReadData *pData)
Definition: gdimtf.cxx:2642
#define SAL_INFO(area, stream)
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1671
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1029
void SetRasterOp(RasterOp eRasterOp)
double mnWidth
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1340
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:3015
bool DrawEPS(const Point &rPt, const Size &rSz, const GfxLink &rGfxLink, GDIMetaFile *pSubst=nullptr)
Definition: outdev.cxx:654
LINE
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:348
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1046
void DrawPolyPolygon(const tools::PolyPolygon &rPolyPoly)
Render the given poly-polygon.
Definition: polygon.cxx:36
bool IsEmpty() const
Definition: bitmap.hxx:547
sal_uInt64 Tell() const
QPRO_FUNC_TYPE nType
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1287
tools::Rectangle maRect
Definition: metaact.hxx:969
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:353
virtual ~MetaLineAction() override
Definition: metaact.cxx:387
virtual ~MetaTextLineAction() override
Definition: metaact.cxx:1389
void setPath(const tools::Polygon &)
Set path to stroke.
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:481
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1479
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1534
void DrawEllipse(const tools::Rectangle &rRect)
sal_uInt16 mnTransPercent
Definition: metaact.hxx:1521
void AdaptiveSubdivide(tools::Polygon &rResult, const double d=1.0) const
sal_uInt32 mnWidth
Definition: metaact.hxx:546
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:3063
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:486
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:1666
#define SAL_WARN(area, stream)
void readGfxLink(GfxLink &rGfxLink)
COMMENT
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:3076
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:1864
Encapsulates geometry and associated attributes of a filled area.
virtual ~MetaTransparentAction() override
Definition: metaact.cxx:2918
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2030
void getEndArrow(tools::PolyPolygon &) const
Get the polygon that is put at the end of the line.
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2435
STRIKEOUT_NONE
void getPath(tools::PolyPolygon &) const
Query path to fill.
virtual ~MetaTextRectAction() override
Definition: metaact.cxx:1324
bool WriteDIB(const Bitmap &rSource, SvStream &rOStm, bool bCompressed, bool bFileHeader)
Definition: dibtools.cxx:1823
bool IsStarSymbol(const OUString &rFontName)
int mnIndex
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:2942
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData) override
Definition: metaact.cxx:2490
void readGradient(Gradient &rGradient)
FontLineStyle
virtual void Write(SvStream &rOStm, ImplMetaWriteData *pData)
Definition: metaact.cxx:185
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: outdevstate.cxx:59
void DrawGradient(const tools::Rectangle &rRect, const Gradient &rGradient)
virtual ~MetaAction() override
Definition: metaact.cxx:164
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1981
SvStream & WriteLineInfo(SvStream &rOStm, const LineInfo &rLineInfo)
Definition: lineinfo.cxx:172
std::size_t write_uInt16_lenPrefixed_uInt16s_FromOUString(SvStream &rStrm, const OUString &rStr)
FontLineStyle meUnderline
Definition: metaact.hxx:618
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1281
FontStrikeout
TEXT
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:3007
void SetTextAlign(TextAlign eAlign)
Definition: text.cxx:763
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1419
SvStream & Write(SvStream &rOStm)
Definition: gdimtf.cxx:2743
SvStream & WriteRegion(SvStream &rOStrm, const vcl::Region &rRegion)
Definition: region.cxx:1587
virtual rtl::Reference< MetaAction > Clone() override
Definition: metaact.cxx:2485
::basegfx::B2IVector maSize
const void * GetData()
const double mnValue
OUString ReadUniOrByteString(rtl_TextEncoding eSrcCharSet)
tools::Long mnWidth
Definition: metaact.hxx:616
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo