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/filter/SvmReader.hxx>
29 #include <vcl/filter/SvmWriter.hxx>
30 #include <vcl/outdev.hxx>
31 #include <vcl/metaact.hxx>
32 #include <vcl/graphictools.hxx>
33 #include <unotools/fontdefs.hxx>
34 #include <vcl/TypeSerializer.hxx>
35 
36 namespace
37 {
38 
39 void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY )
40 {
41  rPt.setX( FRound( fScaleX * rPt.X() ) );
42  rPt.setY( FRound( fScaleY * rPt.Y() ) );
43 }
44 
45 void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScaleY )
46 {
47  Point aTL( rRect.TopLeft() );
48  Point aBR( rRect.BottomRight() );
49 
50  ImplScalePoint( aTL, fScaleX, fScaleY );
51  ImplScalePoint( aBR, fScaleX, fScaleY );
52 
53  rRect = tools::Rectangle( aTL, aBR );
54  rRect.Justify();
55 }
56 
57 void ImplScalePoly( tools::Polygon& rPoly, double fScaleX, double fScaleY )
58 {
59  for( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
60  ImplScalePoint( rPoly[ i ], fScaleX, fScaleY );
61 }
62 
63 void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScaleY )
64 {
65  if( !rLineInfo.IsDefault() )
66  {
67  const double fScale = ( fabs(fScaleX) + fabs(fScaleY) ) * 0.5;
68 
69  rLineInfo.SetWidth( FRound( fScale * rLineInfo.GetWidth() ) );
70  rLineInfo.SetDashLen( FRound( fScale * rLineInfo.GetDashLen() ) );
71  rLineInfo.SetDotLen( FRound( fScale * rLineInfo.GetDotLen() ) );
72  rLineInfo.SetDistance( FRound( fScale * rLineInfo.GetDistance() ) );
73  }
74 }
75 
76 } //anonymous namespace
77 
80 {
81 }
82 
84  mnType( nType )
85 {
86 }
87 
89  SimpleReferenceObject(), mnType( rOther.mnType )
90 {
91 }
92 
94 {
95 }
96 
98 {
99 }
100 
102 {
103  return new MetaAction;
104 }
105 
107 {
108 }
109 
110 void MetaAction::Scale( double, double )
111 {
112 }
113 
114 void MetaAction::ReadColor(SvStream& rIStm, ::Color& rColor)
115 {
116  sal_uInt32 nTmp;
117  rIStm.ReadUInt32(nTmp);
118  rColor = ::Color(ColorTransparency, nTmp);
119 }
120 
121 void MetaAction::WriteColor(SvStream& rIStm, ::Color aColor)
122 {
123  rIStm.WriteUInt32(static_cast<sal_uInt32>(aColor));
124 }
125 
126 MetaPixelAction::MetaPixelAction() :
128 {}
129 
130 MetaPixelAction::~MetaPixelAction()
131 {}
132 
133 MetaPixelAction::MetaPixelAction( const Point& rPt, const Color& rColor ) :
135  maPt ( rPt ),
136  maColor ( rColor )
137 {}
138 
139 void MetaPixelAction::Execute( OutputDevice* pOut )
140 {
141  pOut->DrawPixel( maPt, maColor );
142 }
143 
144 rtl::Reference<MetaAction> MetaPixelAction::Clone() const
145 {
146  return new MetaPixelAction( *this );
147 }
148 
149 void MetaPixelAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
150 {
151  maPt.Move( nHorzMove, nVertMove );
152 }
153 
154 void MetaPixelAction::Scale( double fScaleX, double fScaleY )
155 {
156  ImplScalePoint( maPt, fScaleX, fScaleY );
157 }
158 
161 {}
162 
164 {}
165 
166 MetaPointAction::MetaPointAction( const Point& rPt ) :
168  maPt ( rPt )
169 {}
170 
172 {
173  pOut->DrawPixel( maPt );
174 }
175 
177 {
178  return new MetaPointAction( *this );
179 }
180 
181 void MetaPointAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
182 {
183  maPt.Move( nHorzMove, nVertMove );
184 }
185 
186 void MetaPointAction::Scale( double fScaleX, double fScaleY )
187 {
188  ImplScalePoint( maPt, fScaleX, fScaleY );
189 }
190 
193 {}
194 
196 {}
197 
198 MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) :
200  maStartPt ( rStart ),
201  maEndPt ( rEnd )
202 {}
203 
204 MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd,
205  const LineInfo& rLineInfo ) :
207  maLineInfo ( rLineInfo ),
208  maStartPt ( rStart ),
209  maEndPt ( rEnd )
210 {}
211 
213 {
214  if( maLineInfo.IsDefault() )
215  pOut->DrawLine( maStartPt, maEndPt );
216  else
218 }
219 
221 {
222  return new MetaLineAction( *this );
223 }
224 
225 void MetaLineAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
226 {
227  maStartPt.Move( nHorzMove, nVertMove );
228  maEndPt.Move( nHorzMove, nVertMove );
229 }
230 
231 void MetaLineAction::Scale( double fScaleX, double fScaleY )
232 {
233  ImplScalePoint( maStartPt, fScaleX, fScaleY );
234  ImplScalePoint( maEndPt, fScaleX, fScaleY );
235  ImplScaleLineInfo( maLineInfo, fScaleX, fScaleY );
236 }
237 
240 {}
241 
243 {}
244 
247  maRect ( rRect )
248 {}
249 
251 {
252  pOut->DrawRect( maRect );
253 }
254 
256 {
257  return new MetaRectAction( *this );
258 }
259 
260 void MetaRectAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
261 {
262  maRect.Move( nHorzMove, nVertMove );
263 }
264 
265 void MetaRectAction::Scale( double fScaleX, double fScaleY )
266 {
267  ImplScaleRect( maRect, fScaleX, fScaleY );
268 }
269 
270 MetaRoundRectAction::MetaRoundRectAction() :
272  mnHorzRound ( 0 ),
273  mnVertRound ( 0 )
274 {}
275 
276 MetaRoundRectAction::~MetaRoundRectAction()
277 {}
278 
279 MetaRoundRectAction::MetaRoundRectAction( const tools::Rectangle& rRect,
280  sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) :
282  maRect ( rRect ),
283  mnHorzRound ( nHorzRound ),
284  mnVertRound ( nVertRound )
285 {}
286 
287 void MetaRoundRectAction::Execute( OutputDevice* pOut )
288 {
289  pOut->DrawRect( maRect, mnHorzRound, mnVertRound );
290 }
291 
292 rtl::Reference<MetaAction> MetaRoundRectAction::Clone() const
293 {
294  return new MetaRoundRectAction( *this );
295 }
296 
297 void MetaRoundRectAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
298 {
299  maRect.Move( nHorzMove, nVertMove );
300 }
301 
302 void MetaRoundRectAction::Scale( double fScaleX, double fScaleY )
303 {
304  ImplScaleRect( maRect, fScaleX, fScaleY );
305  mnHorzRound = FRound( mnHorzRound * fabs(fScaleX) );
306  mnVertRound = FRound( mnVertRound * fabs(fScaleY) );
307 }
308 
309 MetaEllipseAction::MetaEllipseAction() :
311 {}
312 
313 MetaEllipseAction::~MetaEllipseAction()
314 {}
315 
316 MetaEllipseAction::MetaEllipseAction( const tools::Rectangle& rRect ) :
318  maRect ( rRect )
319 {}
320 
321 void MetaEllipseAction::Execute( OutputDevice* pOut )
322 {
323  pOut->DrawEllipse( maRect );
324 }
325 
326 rtl::Reference<MetaAction> MetaEllipseAction::Clone() const
327 {
328  return new MetaEllipseAction( *this );
329 }
330 
331 void MetaEllipseAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
332 {
333  maRect.Move( nHorzMove, nVertMove );
334 }
335 
336 void MetaEllipseAction::Scale( double fScaleX, double fScaleY )
337 {
338  ImplScaleRect( maRect, fScaleX, fScaleY );
339 }
340 
341 MetaArcAction::MetaArcAction() :
343 {}
344 
345 MetaArcAction::~MetaArcAction()
346 {}
347 
348 MetaArcAction::MetaArcAction( const tools::Rectangle& rRect,
349  const Point& rStart, const Point& rEnd ) :
351  maRect ( rRect ),
352  maStartPt ( rStart ),
353  maEndPt ( rEnd )
354 {}
355 
356 void MetaArcAction::Execute( OutputDevice* pOut )
357 {
358  pOut->DrawArc( maRect, maStartPt, maEndPt );
359 }
360 
361 rtl::Reference<MetaAction> MetaArcAction::Clone() const
362 {
363  return new MetaArcAction( *this );
364 }
365 
366 void MetaArcAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
367 {
368  maRect.Move( nHorzMove, nVertMove );
369  maStartPt.Move( nHorzMove, nVertMove );
370  maEndPt.Move( nHorzMove, nVertMove );
371 }
372 
373 void MetaArcAction::Scale( double fScaleX, double fScaleY )
374 {
375  ImplScaleRect( maRect, fScaleX, fScaleY );
376  ImplScalePoint( maStartPt, fScaleX, fScaleY );
377  ImplScalePoint( maEndPt, fScaleX, fScaleY );
378 }
379 
380 MetaPieAction::MetaPieAction() :
382 {}
383 
384 MetaPieAction::~MetaPieAction()
385 {}
386 
387 MetaPieAction::MetaPieAction( const tools::Rectangle& rRect,
388  const Point& rStart, const Point& rEnd ) :
390  maRect ( rRect ),
391  maStartPt ( rStart ),
392  maEndPt ( rEnd )
393 {}
394 
395 void MetaPieAction::Execute( OutputDevice* pOut )
396 {
397  pOut->DrawPie( maRect, maStartPt, maEndPt );
398 }
399 
400 rtl::Reference<MetaAction> MetaPieAction::Clone() const
401 {
402  return new MetaPieAction( *this );
403 }
404 
405 void MetaPieAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
406 {
407  maRect.Move( nHorzMove, nVertMove );
408  maStartPt.Move( nHorzMove, nVertMove );
409  maEndPt.Move( nHorzMove, nVertMove );
410 }
411 
412 void MetaPieAction::Scale( double fScaleX, double fScaleY )
413 {
414  ImplScaleRect( maRect, fScaleX, fScaleY );
415  ImplScalePoint( maStartPt, fScaleX, fScaleY );
416  ImplScalePoint( maEndPt, fScaleX, fScaleY );
417 }
418 
419 MetaChordAction::MetaChordAction() :
421 {}
422 
423 MetaChordAction::~MetaChordAction()
424 {}
425 
426 MetaChordAction::MetaChordAction( const tools::Rectangle& rRect,
427  const Point& rStart, const Point& rEnd ) :
429  maRect ( rRect ),
430  maStartPt ( rStart ),
431  maEndPt ( rEnd )
432 {}
433 
434 void MetaChordAction::Execute( OutputDevice* pOut )
435 {
436  pOut->DrawChord( maRect, maStartPt, maEndPt );
437 }
438 
439 rtl::Reference<MetaAction> MetaChordAction::Clone() const
440 {
441  return new MetaChordAction( *this );
442 }
443 
444 void MetaChordAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
445 {
446  maRect.Move( nHorzMove, nVertMove );
447  maStartPt.Move( nHorzMove, nVertMove );
448  maEndPt.Move( nHorzMove, nVertMove );
449 }
450 
451 void MetaChordAction::Scale( double fScaleX, double fScaleY )
452 {
453  ImplScaleRect( maRect, fScaleX, fScaleY );
454  ImplScalePoint( maStartPt, fScaleX, fScaleY );
455  ImplScalePoint( maEndPt, fScaleX, fScaleY );
456 }
457 
458 MetaPolyLineAction::MetaPolyLineAction() :
460 {}
461 
462 MetaPolyLineAction::~MetaPolyLineAction()
463 {}
464 
465 MetaPolyLineAction::MetaPolyLineAction( const tools::Polygon& rPoly ) :
467  maPoly ( rPoly )
468 {}
469 
470 MetaPolyLineAction::MetaPolyLineAction( const tools::Polygon& rPoly, const LineInfo& rLineInfo ) :
472  maLineInfo ( rLineInfo ),
473  maPoly ( rPoly )
474 {}
475 
476 void MetaPolyLineAction::Execute( OutputDevice* pOut )
477 {
478  if( maLineInfo.IsDefault() )
479  pOut->DrawPolyLine( maPoly );
480  else
481  pOut->DrawPolyLine( maPoly, maLineInfo );
482 }
483 
484 rtl::Reference<MetaAction> MetaPolyLineAction::Clone() const
485 {
486  return new MetaPolyLineAction( *this );
487 }
488 
489 void MetaPolyLineAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
490 {
491  maPoly.Move( nHorzMove, nVertMove );
492 }
493 
494 void MetaPolyLineAction::Scale( double fScaleX, double fScaleY )
495 {
496  ImplScalePoly( maPoly, fScaleX, fScaleY );
497  ImplScaleLineInfo( maLineInfo, fScaleX, fScaleY );
498 }
499 
500 MetaPolygonAction::MetaPolygonAction() :
502 {}
503 
504 MetaPolygonAction::~MetaPolygonAction()
505 {}
506 
507 MetaPolygonAction::MetaPolygonAction( const tools::Polygon& rPoly ) :
509  maPoly ( rPoly )
510 {}
511 
512 void MetaPolygonAction::Execute( OutputDevice* pOut )
513 {
514  pOut->DrawPolygon( maPoly );
515 }
516 
517 rtl::Reference<MetaAction> MetaPolygonAction::Clone() const
518 {
519  return new MetaPolygonAction( *this );
520 }
521 
522 void MetaPolygonAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
523 {
524  maPoly.Move( nHorzMove, nVertMove );
525 }
526 
527 void MetaPolygonAction::Scale( double fScaleX, double fScaleY )
528 {
529  ImplScalePoly( maPoly, fScaleX, fScaleY );
530 }
531 
532 MetaPolyPolygonAction::MetaPolyPolygonAction() :
534 {}
535 
536 MetaPolyPolygonAction::~MetaPolyPolygonAction()
537 {}
538 
539 MetaPolyPolygonAction::MetaPolyPolygonAction( const tools::PolyPolygon& rPolyPoly ) :
541  maPolyPoly ( rPolyPoly )
542 {}
543 
544 void MetaPolyPolygonAction::Execute( OutputDevice* pOut )
545 {
546  pOut->DrawPolyPolygon( maPolyPoly );
547 }
548 
549 rtl::Reference<MetaAction> MetaPolyPolygonAction::Clone() const
550 {
551  return new MetaPolyPolygonAction( *this );
552 }
553 
554 void MetaPolyPolygonAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
555 {
556  maPolyPoly.Move( nHorzMove, nVertMove );
557 }
558 
559 void MetaPolyPolygonAction::Scale( double fScaleX, double fScaleY )
560 {
561  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
562  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
563 }
564 
567  mnIndex ( 0 ),
568  mnLen ( 0 )
569 {}
570 
572 {}
573 
574 MetaTextAction::MetaTextAction( const Point& rPt, const OUString& rStr,
575  sal_Int32 nIndex, sal_Int32 nLen ) :
577  maPt ( rPt ),
578  maStr ( rStr ),
579  mnIndex ( nIndex ),
580  mnLen ( nLen )
581 {}
582 
584 {
585  pOut->DrawText( maPt, maStr, mnIndex, mnLen );
586 }
587 
589 {
590  return new MetaTextAction( *this );
591 }
592 
593 void MetaTextAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
594 {
595  maPt.Move( nHorzMove, nVertMove );
596 }
597 
598 void MetaTextAction::Scale( double fScaleX, double fScaleY )
599 {
600  ImplScalePoint( maPt, fScaleX, fScaleY );
601 }
602 
603 MetaTextArrayAction::MetaTextArrayAction() :
605  mnIndex ( 0 ),
606  mnLen ( 0 )
607 {}
608 
609 MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
611  maStartPt ( rAction.maStartPt ),
612  maStr ( rAction.maStr ),
613  mnIndex ( rAction.mnIndex ),
614  mnLen ( rAction.mnLen )
615 {
616  if( rAction.mpDXAry )
617  {
618  mpDXAry.reset( new tools::Long[ mnLen ] );
619  memcpy( mpDXAry.get(), rAction.mpDXAry.get(), mnLen * sizeof( tools::Long ) );
620  }
621 }
622 
623 MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
624  const OUString& rStr,
625  const tools::Long* pDXAry,
626  sal_Int32 nIndex,
627  sal_Int32 nLen ) :
629  maStartPt ( rStartPt ),
630  maStr ( rStr ),
631  mnIndex ( nIndex ),
632  mnLen ( nLen )
633 {
634  const sal_Int32 nAryLen = pDXAry ? mnLen : 0;
635 
636  if (nAryLen > 0)
637  {
638  mpDXAry.reset( new tools::Long[ nAryLen ] );
639  memcpy( mpDXAry.get(), pDXAry, nAryLen * sizeof(tools::Long) );
640  }
641 }
642 
643 MetaTextArrayAction::~MetaTextArrayAction()
644 {
645 }
646 
647 void MetaTextArrayAction::Execute( OutputDevice* pOut )
648 {
649  pOut->DrawTextArray( maStartPt, maStr, mpDXAry.get(), mnIndex, mnLen );
650 }
651 
652 rtl::Reference<MetaAction> MetaTextArrayAction::Clone() const
653 {
654  return new MetaTextArrayAction( *this );
655 }
656 
657 void MetaTextArrayAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
658 {
659  maStartPt.Move( nHorzMove, nVertMove );
660 }
661 
662 void MetaTextArrayAction::Scale( double fScaleX, double fScaleY )
663 {
664  ImplScalePoint( maStartPt, fScaleX, fScaleY );
665 
666  if ( mpDXAry && mnLen )
667  {
668  for ( sal_uInt16 i = 0, nCount = mnLen; i < nCount; i++ )
669  mpDXAry[ i ] = FRound( mpDXAry[ i ] * fabs(fScaleX) );
670  }
671 }
672 
673 void MetaTextArrayAction::SetDXArray(std::unique_ptr<tools::Long[]> aArray)
674 {
675  mpDXAry = std::move(aArray);
676 }
677 
680  mnWidth ( 0 ),
681  mnIndex ( 0 ),
682  mnLen ( 0 )
683 {}
684 
686 {}
687 
688 MetaStretchTextAction::MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
689  const OUString& rStr,
690  sal_Int32 nIndex, sal_Int32 nLen ) :
692  maPt ( rPt ),
693  maStr ( rStr ),
694  mnWidth ( nWidth ),
695  mnIndex ( nIndex ),
696  mnLen ( nLen )
697 {}
698 
700 {
702 }
703 
705 {
706  return new MetaStretchTextAction( *this );
707 }
708 
710 {
711  maPt.Move( nHorzMove, nVertMove );
712 }
713 
714 void MetaStretchTextAction::Scale( double fScaleX, double fScaleY )
715 {
716  ImplScalePoint( maPt, fScaleX, fScaleY );
717  mnWidth = static_cast<sal_uLong>(FRound( mnWidth * fabs(fScaleX) ));
718 }
721  mnStyle ( DrawTextFlags::NONE )
722 {}
723 
725 {}
726 
728  const OUString& rStr, DrawTextFlags nStyle ) :
730  maRect ( rRect ),
731  maStr ( rStr ),
732  mnStyle ( nStyle )
733 {}
734 
736 {
737  pOut->DrawText( maRect, maStr, mnStyle );
738 }
739 
741 {
742  return new MetaTextRectAction( *this );
743 }
744 
746 {
747  maRect.Move( nHorzMove, nVertMove );
748 }
749 
750 void MetaTextRectAction::Scale( double fScaleX, double fScaleY )
751 {
752  ImplScaleRect( maRect, fScaleX, fScaleY );
753 }
754 
757  mnWidth ( 0 ),
758  meStrikeout ( STRIKEOUT_NONE ),
759  meUnderline ( LINESTYLE_NONE ),
760  meOverline ( LINESTYLE_NONE )
761 {}
762 
764 {}
765 
767  FontStrikeout eStrikeout,
768  FontLineStyle eUnderline,
769  FontLineStyle eOverline ) :
771  maPos ( rPos ),
772  mnWidth ( nWidth ),
773  meStrikeout ( eStrikeout ),
774  meUnderline ( eUnderline ),
775  meOverline ( eOverline )
776 {}
777 
779 {
781 }
782 
784 {
785  return new MetaTextLineAction( *this );
786 }
787 
789 {
790  maPos.Move( nHorzMove, nVertMove );
791 }
792 
793 void MetaTextLineAction::Scale( double fScaleX, double fScaleY )
794 {
795  ImplScalePoint( maPos, fScaleX, fScaleY );
796  mnWidth = FRound( mnWidth * fabs(fScaleX) );
797 }
798 
801 {}
802 
804 {}
805 
806 MetaBmpAction::MetaBmpAction( const Point& rPt, const Bitmap& rBmp ) :
808  maBmp ( rBmp ),
809  maPt ( rPt )
810 {}
811 
813 {
814  pOut->DrawBitmap( maPt, maBmp );
815 }
816 
818 {
819  return new MetaBmpAction( *this );
820 }
821 
822 void MetaBmpAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
823 {
824  maPt.Move( nHorzMove, nVertMove );
825 }
826 
827 void MetaBmpAction::Scale( double fScaleX, double fScaleY )
828 {
829  ImplScalePoint( maPt, fScaleX, fScaleY );
830 }
831 
834 {}
835 
837 {}
838 
839 MetaBmpScaleAction::MetaBmpScaleAction( const Point& rPt, const Size& rSz,
840  const Bitmap& rBmp ) :
842  maBmp ( rBmp ),
843  maPt ( rPt ),
844  maSz ( rSz )
845 {}
846 
848 {
849  pOut->DrawBitmap( maPt, maSz, maBmp );
850 }
851 
853 {
854  return new MetaBmpScaleAction( *this );
855 }
856 
858 {
859  maPt.Move( nHorzMove, nVertMove );
860 }
861 
862 void MetaBmpScaleAction::Scale( double fScaleX, double fScaleY )
863 {
864  tools::Rectangle aRectangle(maPt, maSz);
865  ImplScaleRect( aRectangle, fScaleX, fScaleY );
866  maPt = aRectangle.TopLeft();
867  maSz = aRectangle.GetSize();
868 }
869 
870 MetaBmpScalePartAction::MetaBmpScalePartAction() :
872 {}
873 
874 MetaBmpScalePartAction::~MetaBmpScalePartAction()
875 {}
876 
877 MetaBmpScalePartAction::MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
878  const Point& rSrcPt, const Size& rSrcSz,
879  const Bitmap& rBmp ) :
881  maBmp ( rBmp ),
882  maDstPt ( rDstPt ),
883  maDstSz ( rDstSz ),
884  maSrcPt ( rSrcPt ),
885  maSrcSz ( rSrcSz )
886 {}
887 
888 void MetaBmpScalePartAction::Execute( OutputDevice* pOut )
889 {
890  pOut->DrawBitmap( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmp );
891 }
892 
893 rtl::Reference<MetaAction> MetaBmpScalePartAction::Clone() const
894 {
895  return new MetaBmpScalePartAction( *this );
896 }
897 
898 void MetaBmpScalePartAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
899 {
900  maDstPt.Move( nHorzMove, nVertMove );
901 }
902 
903 void MetaBmpScalePartAction::Scale( double fScaleX, double fScaleY )
904 {
905  tools::Rectangle aRectangle(maDstPt, maDstSz);
906  ImplScaleRect( aRectangle, fScaleX, fScaleY );
907  maDstPt = aRectangle.TopLeft();
908  maDstSz = aRectangle.GetSize();
909 }
910 
913 {}
914 
916 {}
917 
918 MetaBmpExAction::MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx ) :
920  maBmpEx ( rBmpEx ),
921  maPt ( rPt )
922 {}
923 
925 {
926  pOut->DrawBitmapEx( maPt, maBmpEx );
927 }
928 
930 {
931  return new MetaBmpExAction( *this );
932 }
933 
934 void MetaBmpExAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
935 {
936  maPt.Move( nHorzMove, nVertMove );
937 }
938 
939 void MetaBmpExAction::Scale( double fScaleX, double fScaleY )
940 {
941  ImplScalePoint( maPt, fScaleX, fScaleY );
942 }
943 
946 {}
947 
949 {}
950 
951 MetaBmpExScaleAction::MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
952  const BitmapEx& rBmpEx ) :
954  maBmpEx ( rBmpEx ),
955  maPt ( rPt ),
956  maSz ( rSz )
957 {}
958 
960 {
961  pOut->DrawBitmapEx( maPt, maSz, maBmpEx );
962 }
963 
965 {
966  return new MetaBmpExScaleAction( *this );
967 }
968 
970 {
971  maPt.Move( nHorzMove, nVertMove );
972 }
973 
974 void MetaBmpExScaleAction::Scale( double fScaleX, double fScaleY )
975 {
976  tools::Rectangle aRectangle(maPt, maSz);
977  ImplScaleRect( aRectangle, fScaleX, fScaleY );
978  maPt = aRectangle.TopLeft();
979  maSz = aRectangle.GetSize();
980 }
981 
982 MetaBmpExScalePartAction::MetaBmpExScalePartAction() :
984 {}
985 
986 MetaBmpExScalePartAction::~MetaBmpExScalePartAction()
987 {}
988 
989 MetaBmpExScalePartAction::MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
990  const Point& rSrcPt, const Size& rSrcSz,
991  const BitmapEx& rBmpEx ) :
993  maBmpEx ( rBmpEx ),
994  maDstPt ( rDstPt ),
995  maDstSz ( rDstSz ),
996  maSrcPt ( rSrcPt ),
997  maSrcSz ( rSrcSz )
998 {}
999 
1000 void MetaBmpExScalePartAction::Execute( OutputDevice* pOut )
1001 {
1002  pOut->DrawBitmapEx( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmpEx );
1003 }
1004 
1005 rtl::Reference<MetaAction> MetaBmpExScalePartAction::Clone() const
1006 {
1007  return new MetaBmpExScalePartAction( *this );
1008 }
1009 
1010 void MetaBmpExScalePartAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1011 {
1012  maDstPt.Move( nHorzMove, nVertMove );
1013 }
1014 
1015 void MetaBmpExScalePartAction::Scale( double fScaleX, double fScaleY )
1016 {
1017  tools::Rectangle aRectangle(maDstPt, maDstSz);
1018  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1019  maDstPt = aRectangle.TopLeft();
1020  maDstSz = aRectangle.GetSize();
1021 }
1022 
1025 {}
1026 
1028 {}
1029 
1031  const Bitmap& rBmp,
1032  const Color& rColor ) :
1034  maBmp ( rBmp ),
1035  maColor ( rColor ),
1036  maPt ( rPt )
1037 {}
1038 
1040 {
1041  pOut->DrawMask( maPt, maBmp, maColor );
1042 }
1043 
1045 {
1046  return new MetaMaskAction( *this );
1047 }
1048 
1049 void MetaMaskAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1050 {
1051  maPt.Move( nHorzMove, nVertMove );
1052 }
1053 
1054 void MetaMaskAction::Scale( double fScaleX, double fScaleY )
1055 {
1056  ImplScalePoint( maPt, fScaleX, fScaleY );
1057 }
1058 
1061 {}
1062 
1064 {}
1065 
1066 MetaMaskScaleAction::MetaMaskScaleAction( const Point& rPt, const Size& rSz,
1067  const Bitmap& rBmp,
1068  const Color& rColor ) :
1070  maBmp ( rBmp ),
1071  maColor ( rColor ),
1072  maPt ( rPt ),
1073  maSz ( rSz )
1074 {}
1075 
1077 {
1078  pOut->DrawMask( maPt, maSz, maBmp, maColor );
1079 }
1080 
1082 {
1083  return new MetaMaskScaleAction( *this );
1084 }
1085 
1087 {
1088  maPt.Move( nHorzMove, nVertMove );
1089 }
1090 
1091 void MetaMaskScaleAction::Scale( double fScaleX, double fScaleY )
1092 {
1093  tools::Rectangle aRectangle(maPt, maSz);
1094  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1095  maPt = aRectangle.TopLeft();
1096  maSz = aRectangle.GetSize();
1097 }
1098 
1101 {}
1102 
1104 {}
1105 
1106 MetaMaskScalePartAction::MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz,
1107  const Point& rSrcPt, const Size& rSrcSz,
1108  const Bitmap& rBmp,
1109  const Color& rColor ) :
1111  maBmp ( rBmp ),
1112  maColor ( rColor ),
1113  maDstPt ( rDstPt ),
1114  maDstSz ( rDstSz ),
1115  maSrcPt ( rSrcPt ),
1116  maSrcSz ( rSrcSz )
1117 {}
1118 
1120 {
1122 }
1123 
1125 {
1126  return new MetaMaskScalePartAction( *this );
1127 }
1128 
1130 {
1131  maDstPt.Move( nHorzMove, nVertMove );
1132 }
1133 
1134 void MetaMaskScalePartAction::Scale( double fScaleX, double fScaleY )
1135 {
1136  tools::Rectangle aRectangle(maDstPt, maDstSz);
1137  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1138  maDstPt = aRectangle.TopLeft();
1139  maDstSz = aRectangle.GetSize();
1140 }
1141 
1144 {}
1145 
1147 {}
1148 
1151  maRect ( rRect ),
1152  maGradient ( rGradient )
1153 {}
1154 
1156 {
1157  pOut->DrawGradient( maRect, maGradient );
1158 }
1159 
1161 {
1162  return new MetaGradientAction( *this );
1163 }
1164 
1166 {
1167  maRect.Move( nHorzMove, nVertMove );
1168 }
1169 
1170 void MetaGradientAction::Scale( double fScaleX, double fScaleY )
1171 {
1172  ImplScaleRect( maRect, fScaleX, fScaleY );
1173 }
1174 
1177 {}
1178 
1181  maPolyPoly ( rPolyPoly ),
1182  maGradient ( rGradient )
1183 {}
1184 
1186 {}
1187 
1189 {
1190  if( pOut->GetConnectMetaFile() )
1191  {
1192  pOut->GetConnectMetaFile()->AddAction( this );
1193  }
1194 }
1195 
1197 {
1198  return new MetaGradientExAction( *this );
1199 }
1200 
1202 {
1203  maPolyPoly.Move( nHorzMove, nVertMove );
1204 }
1205 
1206 void MetaGradientExAction::Scale( double fScaleX, double fScaleY )
1207 {
1208  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
1209  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
1210 }
1211 
1214 {}
1215 
1217 {}
1218 
1219 MetaHatchAction::MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ) :
1221  maPolyPoly ( rPolyPoly ),
1222  maHatch ( rHatch )
1223 {}
1224 
1226 {
1227  pOut->DrawHatch( maPolyPoly, maHatch );
1228 }
1229 
1231 {
1232  return new MetaHatchAction( *this );
1233 }
1234 
1235 void MetaHatchAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1236 {
1237  maPolyPoly.Move( nHorzMove, nVertMove );
1238 }
1239 
1240 void MetaHatchAction::Scale( double fScaleX, double fScaleY )
1241 {
1242  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
1243  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
1244 }
1245 
1246 MetaWallpaperAction::MetaWallpaperAction() :
1248 {}
1249 
1250 MetaWallpaperAction::~MetaWallpaperAction()
1251 {}
1252 
1253 MetaWallpaperAction::MetaWallpaperAction( const tools::Rectangle& rRect,
1254  const Wallpaper& rPaper ) :
1256  maRect ( rRect ),
1257  maWallpaper ( rPaper )
1258 {}
1259 
1260 void MetaWallpaperAction::Execute( OutputDevice* pOut )
1261 {
1262  pOut->DrawWallpaper( maRect, maWallpaper );
1263 }
1264 
1265 rtl::Reference<MetaAction> MetaWallpaperAction::Clone() const
1266 {
1267  return new MetaWallpaperAction( *this );
1268 }
1269 
1270 void MetaWallpaperAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1271 {
1272  maRect.Move( nHorzMove, nVertMove );
1273 }
1274 
1275 void MetaWallpaperAction::Scale( double fScaleX, double fScaleY )
1276 {
1277  ImplScaleRect( maRect, fScaleX, fScaleY );
1278 }
1279 
1282  mbClip ( false )
1283 {}
1284 
1286 {}
1287 
1290  maRegion ( rRegion ),
1291  mbClip ( bClip )
1292 {}
1293 
1295 {
1296  if( mbClip )
1297  pOut->SetClipRegion( maRegion );
1298  else
1299  pOut->SetClipRegion();
1300 }
1301 
1303 {
1304  return new MetaClipRegionAction( *this );
1305 }
1306 
1308 {
1309  maRegion.Move( nHorzMove, nVertMove );
1310 }
1311 
1312 void MetaClipRegionAction::Scale( double fScaleX, double fScaleY )
1313 {
1314  maRegion.Scale( fScaleX, fScaleY );
1315 }
1316 
1319 {}
1320 
1322 {}
1323 
1326  maRect ( rRect )
1327 {}
1328 
1330 {
1331  pOut->IntersectClipRegion( maRect );
1332 }
1333 
1335 {
1336  return new MetaISectRectClipRegionAction( *this );
1337 }
1338 
1340 {
1341  maRect.Move( nHorzMove, nVertMove );
1342 }
1343 
1344 void MetaISectRectClipRegionAction::Scale( double fScaleX, double fScaleY )
1345 {
1346  ImplScaleRect( maRect, fScaleX, fScaleY );
1347 }
1348 
1351 {}
1352 
1354 {}
1355 
1358  maRegion ( rRegion )
1359 {
1360 }
1361 
1363 {
1364  pOut->IntersectClipRegion( maRegion );
1365 }
1366 
1368 {
1369  return new MetaISectRegionClipRegionAction( *this );
1370 }
1371 
1373 {
1374  maRegion.Move( nHorzMove, nVertMove );
1375 }
1376 
1377 void MetaISectRegionClipRegionAction::Scale( double fScaleX, double fScaleY )
1378 {
1379  maRegion.Scale( fScaleX, fScaleY );
1380 }
1381 
1384  mnHorzMove ( 0 ),
1385  mnVertMove ( 0 )
1386 {}
1387 
1389 {}
1390 
1393  mnHorzMove ( nHorzMove ),
1394  mnVertMove ( nVertMove )
1395 {}
1396 
1398 {
1400 }
1401 
1403 {
1404  return new MetaMoveClipRegionAction( *this );
1405 }
1406 
1407 void MetaMoveClipRegionAction::Scale( double fScaleX, double fScaleY )
1408 {
1409  mnHorzMove = FRound( mnHorzMove * fScaleX );
1410  mnVertMove = FRound( mnVertMove * fScaleY );
1411 }
1412 
1415  mbSet ( false )
1416 {}
1417 
1419 {}
1420 
1423  maColor ( rColor ),
1424  mbSet ( bSet )
1425 {}
1426 
1428 {
1429  if( mbSet )
1430  pOut->SetLineColor( maColor );
1431  else
1432  pOut->SetLineColor();
1433 }
1434 
1436 {
1437  return new MetaLineColorAction( *this );
1438 }
1439 
1442  mbSet ( false )
1443 {}
1444 
1446 {}
1447 
1450  maColor ( rColor ),
1451  mbSet ( bSet )
1452 {}
1453 
1455 {
1456  if( mbSet )
1457  pOut->SetFillColor( maColor );
1458  else
1459  pOut->SetFillColor();
1460 }
1461 
1463 {
1464  return new MetaFillColorAction( *this );
1465 }
1466 
1469 {}
1470 
1472 {}
1473 
1476  maColor ( rColor )
1477 {}
1478 
1480 {
1481  pOut->SetTextColor( maColor );
1482 }
1483 
1485 {
1486  return new MetaTextColorAction( *this );
1487 }
1488 
1491  mbSet ( false )
1492 {}
1493 
1495 {}
1496 
1499  maColor ( rColor ),
1500  mbSet ( bSet )
1501 {}
1502 
1504 {
1505  if( mbSet )
1506  pOut->SetTextFillColor( maColor );
1507  else
1508  pOut->SetTextFillColor();
1509 }
1510 
1512 {
1513  return new MetaTextFillColorAction( *this );
1514 }
1515 
1518  mbSet ( false )
1519 {}
1520 
1522 {}
1523 
1526  maColor ( rColor ),
1527  mbSet ( bSet )
1528 {}
1529 
1531 {
1532  if( mbSet )
1533  pOut->SetTextLineColor( maColor );
1534  else
1535  pOut->SetTextLineColor();
1536 }
1537 
1539 {
1540  return new MetaTextLineColorAction( *this );
1541 }
1542 
1545  mbSet ( false )
1546 {}
1547 
1549 {}
1550 
1553  maColor ( rColor ),
1554  mbSet ( bSet )
1555 {}
1556 
1558 {
1559  if( mbSet )
1560  pOut->SetOverlineColor( maColor );
1561  else
1562  pOut->SetOverlineColor();
1563 }
1564 
1566 {
1567  return new MetaOverlineColorAction( *this );
1568 }
1569 
1572  maAlign ( ALIGN_TOP )
1573 {}
1574 
1576 {}
1577 
1580  maAlign ( aAlign )
1581 {}
1582 
1584 {
1585  pOut->SetTextAlign( maAlign );
1586 }
1587 
1589 {
1590  return new MetaTextAlignAction( *this );
1591 }
1592 
1595 {}
1596 
1598 {}
1599 
1602  maMapMode ( rMapMode )
1603 {}
1604 
1606 {
1607  pOut->SetMapMode( maMapMode );
1608 }
1609 
1611 {
1612  return new MetaMapModeAction( *this );
1613 }
1614 
1615 void MetaMapModeAction::Scale( double fScaleX, double fScaleY )
1616 {
1617  Point aPoint( maMapMode.GetOrigin() );
1618 
1619  ImplScalePoint( aPoint, fScaleX, fScaleY );
1620  maMapMode.SetOrigin( aPoint );
1621 }
1622 
1625 {}
1626 
1628 {}
1629 
1632  maFont ( rFont )
1633 {
1634  // #96876: because RTL_TEXTENCODING_SYMBOL is often set at the StarSymbol font,
1635  // we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems
1636  // to be the right way; changing the textencoding at other sources
1637  // is too dangerous at the moment
1639  && ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) )
1640  {
1641  maFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
1642  }
1643 }
1644 
1646 {
1647  pOut->SetFont( maFont );
1648 }
1649 
1651 {
1652  return new MetaFontAction( *this );
1653 }
1654 
1655 void MetaFontAction::Scale( double fScaleX, double fScaleY )
1656 {
1657  const Size aSize(
1658  FRound(maFont.GetFontSize().Width() * fabs(fScaleX)),
1659  FRound(maFont.GetFontSize().Height() * fabs(fScaleY)));
1660  maFont.SetFontSize( aSize );
1661 }
1662 
1665  mnFlags ( PushFlags::NONE )
1666 {}
1667 
1669 {}
1670 
1673  mnFlags ( nFlags )
1674 {}
1675 
1677 {
1678  pOut->Push( mnFlags );
1679 }
1680 
1682 {
1683  return new MetaPushAction( *this );
1684 }
1685 
1688 {}
1689 
1691 {}
1692 
1694 {
1695  pOut->Pop();
1696 }
1697 
1699 {
1700  return new MetaPopAction( *this );
1701 }
1702 
1705  meRasterOp ( RasterOp::OverPaint )
1706 {}
1707 
1709 {}
1710 
1713  meRasterOp ( eRasterOp )
1714 {
1715 }
1716 
1718 {
1719  pOut->SetRasterOp( meRasterOp );
1720 }
1721 
1723 {
1724  return new MetaRasterOpAction( *this );
1725 }
1726 
1729  mnTransPercent ( 0 )
1730 {}
1731 
1733 {}
1734 
1735 MetaTransparentAction::MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ) :
1737  maPolyPoly ( rPolyPoly ),
1738  mnTransPercent ( nTransPercent )
1739 {}
1740 
1742 {
1744 }
1745 
1747 {
1748  return new MetaTransparentAction( *this );
1749 }
1750 
1752 {
1753  maPolyPoly.Move( nHorzMove, nVertMove );
1754 }
1755 
1756 void MetaTransparentAction::Scale( double fScaleX, double fScaleY )
1757 {
1758  for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
1759  ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
1760 }
1761 
1764 {}
1765 
1767 {}
1768 
1770  const Size& rSize, const Gradient& rGradient ) :
1772  maMtf ( rMtf ),
1773  maPoint ( rPos ),
1774  maSize ( rSize ),
1775  maGradient ( rGradient )
1776 {}
1777 
1779 {
1781 }
1782 
1784 {
1785  return new MetaFloatTransparentAction( *this );
1786 }
1787 
1789 {
1790  maPoint.Move( nHorzMove, nVertMove );
1791 }
1792 
1793 void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY )
1794 {
1795  tools::Rectangle aRectangle(maPoint, maSize);
1796  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1797  maPoint = aRectangle.TopLeft();
1798  maSize = aRectangle.GetSize();
1799 }
1800 
1803 {}
1804 
1806 {}
1807 
1808 MetaEPSAction::MetaEPSAction( const Point& rPoint, const Size& rSize,
1809  const GfxLink& rGfxLink, const GDIMetaFile& rSubst ) :
1811  maGfxLink ( rGfxLink ),
1812  maSubst ( rSubst ),
1813  maPoint ( rPoint ),
1814  maSize ( rSize )
1815 {}
1816 
1818 {
1819  pOut->DrawEPS( maPoint, maSize, maGfxLink, &maSubst );
1820 }
1821 
1823 {
1824  return new MetaEPSAction( *this );
1825 }
1826 
1827 void MetaEPSAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1828 {
1829  maPoint.Move( nHorzMove, nVertMove );
1830 }
1831 
1832 void MetaEPSAction::Scale( double fScaleX, double fScaleY )
1833 {
1834  tools::Rectangle aRectangle(maPoint, maSize);
1835  ImplScaleRect( aRectangle, fScaleX, fScaleY );
1836  maPoint = aRectangle.TopLeft();
1837  maSize = aRectangle.GetSize();
1838 }
1839 
1842  mbSet ( false )
1843 {}
1844 
1846 {}
1847 
1848 MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, bool bSet ) :
1850  maRefPoint ( rRefPoint ),
1851  mbSet ( bSet )
1852 {}
1853 
1855 {
1856  if( mbSet )
1857  pOut->SetRefPoint( maRefPoint );
1858  else
1859  pOut->SetRefPoint();
1860 }
1861 
1863 {
1864  return new MetaRefPointAction( *this );
1865 }
1866 
1869  mnValue ( 0 )
1870 {
1871  ImplInitDynamicData( nullptr, 0UL );
1872 }
1873 
1876  maComment ( rAct.maComment ),
1877  mnValue ( rAct.mnValue )
1878 {
1879  ImplInitDynamicData( rAct.mpData.get(), rAct.mnDataSize );
1880 }
1881 
1882 MetaCommentAction::MetaCommentAction( const OString& rComment, sal_Int32 nValue, const sal_uInt8* pData, sal_uInt32 nDataSize ) :
1884  maComment ( rComment ),
1885  mnValue ( nValue )
1886 {
1887  ImplInitDynamicData( pData, nDataSize );
1888 }
1889 
1891 {
1892 }
1893 
1894 void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize )
1895 {
1896  if ( nDataSize && pData )
1897  {
1898  mnDataSize = nDataSize;
1899  mpData.reset( new sal_uInt8[ mnDataSize ] );
1900  memcpy( mpData.get(), pData, mnDataSize );
1901  }
1902  else
1903  {
1904  mnDataSize = 0;
1905  mpData = nullptr;
1906  }
1907 }
1908 
1910 {
1911  if ( pOut->GetConnectMetaFile() )
1912  {
1913  pOut->GetConnectMetaFile()->AddAction( this );
1914  }
1915 }
1916 
1918 {
1919  return new MetaCommentAction( *this );
1920 }
1921 
1923 {
1924  if ( !(nXMove || nYMove) )
1925  return;
1926 
1927  if ( !(mnDataSize && mpData) )
1928  return;
1929 
1930  bool bPathStroke = (maComment == "XPATHSTROKE_SEQ_BEGIN");
1931  if ( !(bPathStroke || maComment == "XPATHFILL_SEQ_BEGIN") )
1932  return;
1933 
1934  SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
1935  SvMemoryStream aDest;
1936  if ( bPathStroke )
1937  {
1938  SvtGraphicStroke aStroke;
1939  ReadSvtGraphicStroke( aMemStm, aStroke );
1940 
1941  tools::Polygon aPath;
1942  aStroke.getPath( aPath );
1943  aPath.Move( nXMove, nYMove );
1944  aStroke.setPath( aPath );
1945 
1946  tools::PolyPolygon aStartArrow;
1947  aStroke.getStartArrow(aStartArrow);
1948  aStartArrow.Move(nXMove, nYMove);
1949  aStroke.setStartArrow(aStartArrow);
1950 
1951  tools::PolyPolygon aEndArrow;
1952  aStroke.getEndArrow(aEndArrow);
1953  aEndArrow.Move(nXMove, nYMove);
1954  aStroke.setEndArrow(aEndArrow);
1955 
1956  WriteSvtGraphicStroke( aDest, aStroke );
1957  }
1958  else
1959  {
1960  SvtGraphicFill aFill;
1961  ReadSvtGraphicFill( aMemStm, aFill );
1962 
1963  tools::PolyPolygon aPath;
1964  aFill.getPath( aPath );
1965  aPath.Move( nXMove, nYMove );
1966  aFill.setPath( aPath );
1967 
1968  WriteSvtGraphicFill( aDest, aFill );
1969  }
1970  mpData.reset();
1971  ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
1972 }
1973 
1974 // SJ: 25.07.06 #i56656# we are not able to mirror certain kind of
1975 // comments properly, especially the XPATHSTROKE and XPATHFILL lead to
1976 // problems, so it is better to remove these comments when mirroring
1977 // FIXME: fake comment to apply the next hunk in the right location
1978 void MetaCommentAction::Scale( double fXScale, double fYScale )
1979 {
1980  if (( fXScale == 1.0 ) && ( fYScale == 1.0 ))
1981  return;
1982 
1983  if ( !(mnDataSize && mpData) )
1984  return;
1985 
1986  bool bPathStroke = (maComment == "XPATHSTROKE_SEQ_BEGIN");
1987  if ( bPathStroke || maComment == "XPATHFILL_SEQ_BEGIN" )
1988  {
1989  SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
1990  SvMemoryStream aDest;
1991  if ( bPathStroke )
1992  {
1993  SvtGraphicStroke aStroke;
1994  ReadSvtGraphicStroke( aMemStm, aStroke );
1995  aStroke.scale( fXScale, fYScale );
1996  WriteSvtGraphicStroke( aDest, aStroke );
1997  }
1998  else
1999  {
2000  SvtGraphicFill aFill;
2001  ReadSvtGraphicFill( aMemStm, aFill );
2002  tools::PolyPolygon aPath;
2003  aFill.getPath( aPath );
2004  aPath.Scale( fXScale, fYScale );
2005  aFill.setPath( aPath );
2006  WriteSvtGraphicFill( aDest, aFill );
2007  }
2008  mpData.reset();
2009  ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
2010  } else if( maComment == "EMF_PLUS_HEADER_INFO" ){
2011  SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
2012  SvMemoryStream aDest;
2013 
2014  sal_Int32 nLeft(0), nRight(0), nTop(0), nBottom(0);
2015  sal_Int32 nPixX(0), nPixY(0), nMillX(0), nMillY(0);
2016  float m11(0), m12(0), m21(0), m22(0), mdx(0), mdy(0);
2017 
2018  // read data
2019  aMemStm.ReadInt32( nLeft ).ReadInt32( nTop ).ReadInt32( nRight ).ReadInt32( nBottom );
2020  aMemStm.ReadInt32( nPixX ).ReadInt32( nPixY ).ReadInt32( nMillX ).ReadInt32( nMillY );
2021  aMemStm.ReadFloat( m11 ).ReadFloat( m12 ).ReadFloat( m21 ).ReadFloat( m22 ).ReadFloat( mdx ).ReadFloat( mdy );
2022 
2023  // add scale to the transformation
2024  m11 *= fXScale;
2025  m12 *= fXScale;
2026  m22 *= fYScale;
2027  m21 *= fYScale;
2028 
2029  // prepare new data
2030  aDest.WriteInt32( nLeft ).WriteInt32( nTop ).WriteInt32( nRight ).WriteInt32( nBottom );
2031  aDest.WriteInt32( nPixX ).WriteInt32( nPixY ).WriteInt32( nMillX ).WriteInt32( nMillY );
2032  aDest.WriteFloat( m11 ).WriteFloat( m12 ).WriteFloat( m21 ).WriteFloat( m22 ).WriteFloat( mdx ).WriteFloat( mdy );
2033 
2034  // save them
2035  ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
2036  }
2037 }
2038 
2041  mnLayoutMode( ComplexTextLayoutFlags::Default )
2042 {}
2043 
2045 {}
2046 
2049  mnLayoutMode( nLayoutMode )
2050 {}
2051 
2053 {
2054  pOut->SetLayoutMode( mnLayoutMode );
2055 }
2056 
2058 {
2059  return new MetaLayoutModeAction( *this );
2060 }
2061 
2064  meTextLanguage( LANGUAGE_DONTKNOW )
2065 {}
2066 
2068 {}
2069 
2072  meTextLanguage( eTextLanguage )
2073 {}
2074 
2076 {
2078 }
2079 
2081 {
2082  return new MetaTextLanguageAction( *this );
2083 }
2084 
2085 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 Count() const
virtual ~MetaRectAction() override
Definition: metaact.cxx:242
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1832
virtual void Execute(OutputDevice *pOut)
Definition: metaact.cxx:97
void SetDigitLanguage(LanguageType)
Definition: text.cxx:66
GfxLink maGfxLink
Definition: metaact.hxx:1605
virtual ~MetaStretchTextAction() override
Definition: metaact.cxx:685
Definition: hatch.hxx:46
GDIMetaFile maSubst
Definition: metaact.hxx:1606
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1538
void SetFontSize(const Size &)
Definition: font/font.cxx:127
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1605
void setStartArrow(const tools::PolyPolygon &)
Set the polygon that is put at the start of the line.
virtual ~MetaGradientAction() override
Definition: metaact.cxx:1146
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1329
const OUString & GetFamilyName() const
Definition: font/font.cxx:829
virtual ~MetaISectRegionClipRegionAction() override
Definition: metaact.cxx:1353
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1751
Bitmap maBmp
Definition: metaact.hxx:876
virtual ~MetaPushAction() override
Definition: metaact.cxx:1668
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1778
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1698
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1615
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1583
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1170
SvStream & WriteInt32(sal_Int32 nInt32)
virtual ~MetaMaskAction() override
Definition: metaact.cxx:1027
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1377
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1822
void Move(tools::Long nHorzMove, tools::Long nVertMove)
Definition: region.cxx:399
virtual ~MetaTextAction() override
Definition: metaact.cxx:571
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1188
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1339
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1206
virtual ~MetaCommentAction() override
Definition: metaact.cxx:1890
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: bitmapex.cxx:33
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:974
SvStream & WriteSvtGraphicStroke(SvStream &rOStm, const SvtGraphicStroke &rClass)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1645
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:598
sal_uIntPtr sal_uLong
OUString maStr
Definition: metaact.hxx:472
long Long
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1362
virtual ~MetaBmpExAction() override
Definition: metaact.cxx:915
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1746
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1160
void DrawPolygon(const tools::Polygon &rPoly)
Render the given polygon.
Definition: polygon.cxx:156
sal_Int32 mnIndex
Definition: metaact.hxx:473
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:1817
void DrawPolyLine(const tools::Polygon &rPoly)
Render the given polygon as a line stroke.
Definition: polyline.cxx:33
DrawTextFlags mnStyle
Definition: metaact.hxx:590
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:583
void SetTextFillColor()
Definition: text.cxx:704
virtual ~MetaEPSAction() override
Definition: metaact.cxx:1805
void Move(tools::Long nHorzMove, tools::Long nVertMove)
void SetLayoutMode(ComplexTextLayoutFlags nTextLayoutMode)
Definition: text.cxx:55
virtual ~MetaGradientExAction() override
Definition: metaact.cxx:1185
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:225
void IntersectClipRegion(const tools::Rectangle &rRect)
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:285
void DrawTextLine(const Point &rPos, tools::Long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove=false)
Definition: textline.cxx:931
basegfx::BColor maColor
void SetCharSet(rtl_TextEncoding)
Definition: font/font.cxx:139
virtual ~MetaMaskScaleAction() override
Definition: metaact.cxx:1063
SvStream & ReadSvtGraphicStroke(SvStream &rIStm, SvtGraphicStroke &rClass)
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1650
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:186
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1091
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:778
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:929
virtual ~MetaPointAction() override
Definition: metaact.cxx:163
void SetMapMode()
Definition: map.cxx:592
DrawTextFlags
SvStream & ReadSvtGraphicFill(SvStream &rIStm, SvtGraphicFill &rClass)
virtual ~MetaTextLanguageAction() override
Definition: metaact.cxx:2067
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:898
virtual ~MetaISectRectClipRegionAction() override
Definition: metaact.cxx:1321
virtual ~MetaMaskScalePartAction() override
Definition: metaact.cxx:1103
NONE
void scale(double fScaleX, double fScaleY)
Affine scaling in both X and Y dimensions.
virtual ~MetaBmpScaleAction() override
Definition: metaact.cxx:836
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1049
void DrawWallpaper(const tools::Rectangle &rRect, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:35
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:827
constexpr tools::Long Width() const
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1917
FuncFlags mnFlags
virtual ~MetaRefPointAction() override
Definition: metaact.cxx:1845
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1312
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1717
virtual ~MetaHatchAction() override
Definition: metaact.cxx:1216
void DrawStretchText(const Point &rStartPt, sal_uLong nWidth, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1)
Definition: text.cxx:1094
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1484
LINESTYLE_NONE
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:783
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:822
MetaAction()
Definition: metaact.cxx:78
virtual ~MetaFloatTransparentAction() override
Definition: metaact.cxx:1766
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1402
int nCount
SAL_DLLPRIVATE void ImplInitDynamicData(const sal_uInt8 *pData, sal_uInt32 nDataSize)
Definition: metaact.cxx:1894
virtual ~MetaClipRegionAction() override
Definition: metaact.cxx:1285
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:857
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1196
ComplexTextLayoutFlags mnLayoutMode
Definition: metaact.hxx:1705
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1788
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1086
void Pop()
Definition: stack.cxx:93
SvStream & WriteUInt32(sal_uInt32 nUInt32)
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1054
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:212
PushFlags
Definition: outdevstate.hxx:38
MetaActionType
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1854
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:231
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1535
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1230
void DrawLine(const Point &rStartPt, const Point &rEndPt)
Definition: line.cxx:160
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1693
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:964
void SetTextLineColor()
Definition: textline.cxx:881
tools::Rectangle maRect
Definition: metaact.hxx:588
void DrawRect(const tools::Rectangle &rRect)
Definition: rect.cxx:51
virtual ~MetaLineColorAction() override
Definition: metaact.cxx:1418
void setPath(const tools::PolyPolygon &rPath)
Set path to fill.
Gradient maGradient
Definition: metaact.hxx:993
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:176
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:740
FontStrikeout meStrikeout
Definition: metaact.hxx:624
sal_uInt32 mnDataSize
Definition: metaact.hxx:1671
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:924
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1530
void SetLineColor()
Definition: line.cxx:36
void SetRefPoint()
Definition: outdev.cxx:289
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1294
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:699
FontLineStyle meOverline
Definition: metaact.hxx:626
Bitmap maBmp
Definition: metaact.hxx:663
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:181
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:788
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1129
std::unique_ptr< sal_uInt8[]> mpData
Definition: metaact.hxx:1673
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1334
int i
sal_Int32 mnLen
Definition: metaact.hxx:474
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1044
virtual void Scale(double fScaleX, double fScaleY)
Definition: metaact.cxx:110
Point maStartPt
Definition: metaact.hxx:162
static void ReadColor(SvStream &rIStm,::Color &rColor)
Definition: metaact.cxx:114
virtual ~MetaTextColorAction() override
Definition: metaact.cxx:1471
sal_Int32 mnType
tools::Long FRound(double fVal)
virtual ~MetaTextAlignAction() override
Definition: metaact.cxx:1575
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1783
ComplexTextLayoutFlags
Definition: outdevstate.hxx:65
virtual ~MetaOverlineColorAction() override
Definition: metaact.cxx:1548
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1862
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:969
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1922
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1681
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1124
virtual ~MetaFontAction() override
Definition: metaact.cxx:1627
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)
void SetOrigin(const Point &rOrigin)
Definition: mapmod.cxx:104
static void WriteColor(SvStream &rIStm,::Color aColor)
Definition: metaact.cxx:121
virtual ~MetaPopAction() override
Definition: metaact.cxx:1690
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1741
void SetFillColor()
Definition: fill.cxx:29
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:168
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:593
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1302
void SetTextColor(const Color &rColor)
Definition: text.cxx:686
void Move(tools::Long nHorzMove, tools::Long nVertMove)
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:255
#define LANGUAGE_DONTKNOW
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1655
const Size & GetFontSize() const
Definition: font/font.cxx:832
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2052
void getPath(tools::Polygon &) const
Query path to stroke.
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1978
sal_uInt16 GetSize() const
void SetOverlineColor()
Definition: textline.cxx:906
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:745
virtual ~MetaFillColorAction() override
Definition: metaact.cxx:1445
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1565
virtual ~MetaMapModeAction() override
Definition: metaact.cxx:1597
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1039
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:750
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1454
ColorTransparency
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1557
void MoveClipRegion(tools::Long nHorzMove, tools::Long nVertMove)
vcl::Region maRegion
Definition: metaact.hxx:1112
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:250
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:939
void DrawPie(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1225
RasterOp
Definition: RasterOp.hxx:22
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:803
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1076
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove)
Definition: metaact.cxx:106
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:56
void DrawHatch(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch)
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1588
TextAlign
virtual ~MetaRasterOpAction() override
Definition: metaact.cxx:1708
constexpr Point TopLeft() const
SvStream & ReadInt32(sal_Int32 &rInt32)
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1119
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1307
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:735
SvStream & WriteSvtGraphicFill(SvStream &rOStm, const SvtGraphicFill &rClass)
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1462
tools::Rectangle maRect
Definition: metaact.hxx:196
virtual ~MetaBmpExScaleAction() override
Definition: metaact.cxx:948
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2075
ALIGN_TOP
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:2080
constexpr Size GetSize() const
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:1909
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1165
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1511
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:862
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1022
B2DPoint maPoint
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:959
BitmapEx maBmpEx
Definition: metaact.hxx:768
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:709
constexpr tools::Long Height() const
unsigned char sal_uInt8
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1372
OUString maComment
vcl::Font maFont
Definition: metaact.hxx:1439
void SetFont(const vcl::Font &rNewFont)
Definition: outdev/font.cxx:52
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1235
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:588
void AddAction(const rtl::Reference< MetaAction > &pAction)
Definition: gdimtf.cxx:562
LineInfo maLineInfo
Definition: metaact.hxx:161
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1240
SvStream & WriteFloat(float nFloat)
virtual ~MetaTextFillColorAction() override
Definition: metaact.cxx:1494
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1201
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:934
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1081
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1503
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1052
void SetRasterOp(RasterOp eRasterOp)
Definition: outdev.cxx:314
double mnWidth
bool DrawEPS(const Point &rPt, const Size &rSz, const GfxLink &rGfxLink, GDIMetaFile *pSubst=nullptr)
Definition: outdev.cxx:714
LINE
virtual ~MetaMoveClipRegionAction() override
Definition: metaact.cxx:1388
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:171
void DrawPolyPolygon(const tools::PolyPolygon &rPolyPoly)
Render the given poly-polygon.
Definition: polygon.cxx:36
sal_uInt64 Tell() const
PushFlags mnFlags
Definition: metaact.hxx:1471
tools::Rectangle maRect
Definition: metaact.hxx:992
virtual ~MetaLineAction() override
Definition: metaact.cxx:195
LanguageType meTextLanguage
Definition: metaact.hxx:1729
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1610
const Point & GetOrigin() const
Definition: mapmod.cxx:140
void Scale(double fScaleX, double fScaleY)
Definition: region.cxx:452
virtual ~MetaTextLineAction() override
Definition: metaact.cxx:763
void setPath(const tools::Polygon &)
Set path to stroke.
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:260
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:812
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:847
virtual rtl::Reference< MetaAction > Clone() const
Definition: metaact.cxx:101
void DrawEllipse(const tools::Rectangle &rRect)
constexpr Point BottomRight() const
sal_uInt16 mnTransPercent
Definition: metaact.hxx:1536
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1407
sal_uInt32 mnWidth
Definition: metaact.hxx:549
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1827
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:265
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:2057
RasterOp meRasterOp
Definition: metaact.hxx:1511
COMMENT
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:817
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1479
Encapsulates geometry and associated attributes of a filled area.
virtual ~MetaTransparentAction() override
Definition: metaact.cxx:1732
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1155
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1435
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:1427
STRIKEOUT_NONE
void getPath(tools::PolyPolygon &) const
Query path to fill.
virtual ~MetaTextRectAction() override
Definition: metaact.cxx:724
bool IsStarSymbol(const OUString &rFontName)
int mnIndex
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1756
virtual ~MetaLayoutModeAction() override
Definition: metaact.cxx:2044
FontLineStyle
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1367
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:704
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: stack.cxx:34
void DrawGradient(const tools::Rectangle &rRect, const Gradient &rGradient)
virtual ~MetaTextLineColorAction() override
Definition: metaact.cxx:1521
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:772
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:852
virtual ~MetaAction() override
Definition: metaact.cxx:93
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1676
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1134
FontLineStyle meUnderline
Definition: metaact.hxx:625
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:714
FontStrikeout
TEXT
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1793
void SetTextAlign(TextAlign eAlign)
Definition: text.cxx:744
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:793
rtl_TextEncoding GetCharSet() const
Definition: font/font.cxx:838
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1397
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1344
::basegfx::B2IVector maSize
const void * GetData()
const double mnValue
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1722
tools::Long mnWidth
Definition: metaact.hxx:623
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:220