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 <utility>
28#include <vcl/dibtools.hxx>
31#include <vcl/outdev.hxx>
32#include <vcl/metaact.hxx>
33#include <vcl/graphictools.hxx>
35#include <unotools/fontdefs.hxx>
37
38namespace
39{
40
41void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY )
42{
43 rPt.setX( FRound( fScaleX * rPt.X() ) );
44 rPt.setY( FRound( fScaleY * rPt.Y() ) );
45}
46
47void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScaleY )
48{
49 Point aTL( rRect.TopLeft() );
50 Point aBR( rRect.BottomRight() );
51
52 ImplScalePoint( aTL, fScaleX, fScaleY );
53 ImplScalePoint( aBR, fScaleX, fScaleY );
54
55 rRect = tools::Rectangle( aTL, aBR );
56 rRect.Normalize();
57}
58
59void ImplScalePoly( tools::Polygon& rPoly, double fScaleX, double fScaleY )
60{
61 for( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
62 ImplScalePoint( rPoly[ i ], fScaleX, fScaleY );
63}
64
65void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScaleY )
66{
67 if( !rLineInfo.IsDefault() )
68 {
69 const double fScale = ( fabs(fScaleX) + fabs(fScaleY) ) * 0.5;
70
71 rLineInfo.SetWidth( FRound( fScale * rLineInfo.GetWidth() ) );
72 rLineInfo.SetDashLen( FRound( fScale * rLineInfo.GetDashLen() ) );
73 rLineInfo.SetDotLen( FRound( fScale * rLineInfo.GetDotLen() ) );
74 rLineInfo.SetDistance( FRound( fScale * rLineInfo.GetDistance() ) );
75 }
76}
77
78} //anonymous namespace
79
82{
83}
84
86 mnType( nType )
87{
88}
89
91 SimpleReferenceObject(), mnType( rOther.mnType )
92{
93}
94
96{
97}
98
100{
101}
102
104{
105 return new MetaAction;
106}
107
109{
110}
111
112void MetaAction::Scale( double, double )
113{
114}
115
118{}
119
121{}
122
123MetaPixelAction::MetaPixelAction( const Point& rPt, const Color& rColor ) :
125 maPt ( rPt ),
126 maColor ( rColor )
127{}
128
130{
131 pOut->DrawPixel( maPt, maColor );
132}
133
135{
136 return new MetaPixelAction( *this );
137}
138
140{
141 maPt.Move( nHorzMove, nVertMove );
142}
143
144void MetaPixelAction::Scale( double fScaleX, double fScaleY )
145{
146 ImplScalePoint( maPt, fScaleX, fScaleY );
147}
148
151{}
152
154{}
155
158 maPt ( rPt )
159{}
160
162{
163 pOut->DrawPixel( maPt );
164}
165
167{
168 return new MetaPointAction( *this );
169}
170
172{
173 maPt.Move( nHorzMove, nVertMove );
174}
175
176void MetaPointAction::Scale( double fScaleX, double fScaleY )
177{
178 ImplScalePoint( maPt, fScaleX, fScaleY );
179}
180
183{}
184
186{}
187
188MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) :
190 maStartPt ( rStart ),
191 maEndPt ( rEnd )
192{}
193
194MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd,
195 LineInfo aLineInfo ) :
197 maLineInfo (std::move( aLineInfo )),
198 maStartPt ( rStart ),
199 maEndPt ( rEnd )
200{}
201
203{
204 if( maLineInfo.IsDefault() )
205 pOut->DrawLine( maStartPt, maEndPt );
206 else
207 pOut->DrawLine( maStartPt, maEndPt, maLineInfo );
208}
209
211{
212 return new MetaLineAction( *this );
213}
214
215void MetaLineAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
216{
217 maStartPt.Move( nHorzMove, nVertMove );
218 maEndPt.Move( nHorzMove, nVertMove );
219}
220
221void MetaLineAction::Scale( double fScaleX, double fScaleY )
222{
223 ImplScalePoint( maStartPt, fScaleX, fScaleY );
224 ImplScalePoint( maEndPt, fScaleX, fScaleY );
225 ImplScaleLineInfo( maLineInfo, fScaleX, fScaleY );
226}
227
230{}
231
233{}
234
237 maRect ( rRect )
238{}
239
241{
242 pOut->DrawRect( maRect );
243}
244
246{
247 return new MetaRectAction( *this );
248}
249
250void MetaRectAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
251{
252 maRect.Move( nHorzMove, nVertMove );
253}
254
255void MetaRectAction::Scale( double fScaleX, double fScaleY )
256{
257 ImplScaleRect( maRect, fScaleX, fScaleY );
258}
259
262 mnHorzRound ( 0 ),
263 mnVertRound ( 0 )
264{}
265
267{}
268
270 sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) :
272 maRect ( rRect ),
273 mnHorzRound ( nHorzRound ),
274 mnVertRound ( nVertRound )
275{}
276
278{
279 pOut->DrawRect( maRect, mnHorzRound, mnVertRound );
280}
281
283{
284 return new MetaRoundRectAction( *this );
285}
286
288{
289 maRect.Move( nHorzMove, nVertMove );
290}
291
292void MetaRoundRectAction::Scale( double fScaleX, double fScaleY )
293{
294 ImplScaleRect( maRect, fScaleX, fScaleY );
295 mnHorzRound = FRound( mnHorzRound * fabs(fScaleX) );
296 mnVertRound = FRound( mnVertRound * fabs(fScaleY) );
297}
298
301{}
302
304{}
305
308 maRect ( rRect )
309{}
310
312{
313 pOut->DrawEllipse( maRect );
314}
315
317{
318 return new MetaEllipseAction( *this );
319}
320
322{
323 maRect.Move( nHorzMove, nVertMove );
324}
325
326void MetaEllipseAction::Scale( double fScaleX, double fScaleY )
327{
328 ImplScaleRect( maRect, fScaleX, fScaleY );
329}
330
333{}
334
336{}
337
339 const Point& rStart, const Point& rEnd ) :
341 maRect ( rRect ),
342 maStartPt ( rStart ),
343 maEndPt ( rEnd )
344{}
345
347{
348 pOut->DrawArc( maRect, maStartPt, maEndPt );
349}
350
352{
353 return new MetaArcAction( *this );
354}
355
356void MetaArcAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
357{
358 maRect.Move( nHorzMove, nVertMove );
359 maStartPt.Move( nHorzMove, nVertMove );
360 maEndPt.Move( nHorzMove, nVertMove );
361}
362
363void MetaArcAction::Scale( double fScaleX, double fScaleY )
364{
365 ImplScaleRect( maRect, fScaleX, fScaleY );
366 ImplScalePoint( maStartPt, fScaleX, fScaleY );
367 ImplScalePoint( maEndPt, fScaleX, fScaleY );
368}
369
372{}
373
375{}
376
378 const Point& rStart, const Point& rEnd ) :
380 maRect ( rRect ),
381 maStartPt ( rStart ),
382 maEndPt ( rEnd )
383{}
384
386{
387 pOut->DrawPie( maRect, maStartPt, maEndPt );
388}
389
391{
392 return new MetaPieAction( *this );
393}
394
395void MetaPieAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
396{
397 maRect.Move( nHorzMove, nVertMove );
398 maStartPt.Move( nHorzMove, nVertMove );
399 maEndPt.Move( nHorzMove, nVertMove );
400}
401
402void MetaPieAction::Scale( double fScaleX, double fScaleY )
403{
404 ImplScaleRect( maRect, fScaleX, fScaleY );
405 ImplScalePoint( maStartPt, fScaleX, fScaleY );
406 ImplScalePoint( maEndPt, fScaleX, fScaleY );
407}
408
411{}
412
414{}
415
417 const Point& rStart, const Point& rEnd ) :
419 maRect ( rRect ),
420 maStartPt ( rStart ),
421 maEndPt ( rEnd )
422{}
423
425{
426 pOut->DrawChord( maRect, maStartPt, maEndPt );
427}
428
430{
431 return new MetaChordAction( *this );
432}
433
435{
436 maRect.Move( nHorzMove, nVertMove );
437 maStartPt.Move( nHorzMove, nVertMove );
438 maEndPt.Move( nHorzMove, nVertMove );
439}
440
441void MetaChordAction::Scale( double fScaleX, double fScaleY )
442{
443 ImplScaleRect( maRect, fScaleX, fScaleY );
444 ImplScalePoint( maStartPt, fScaleX, fScaleY );
445 ImplScalePoint( maEndPt, fScaleX, fScaleY );
446}
447
450{}
451
453{}
454
457 maPoly (std::move( aPoly ))
458{}
459
462 maLineInfo (std::move( aLineInfo )),
463 maPoly (std::move( aPoly ))
464{}
465
467{
468 if( maLineInfo.IsDefault() )
469 pOut->DrawPolyLine( maPoly );
470 else
471 pOut->DrawPolyLine( maPoly, maLineInfo );
472}
473
475{
476 return new MetaPolyLineAction( *this );
477}
478
480{
481 maPoly.Move( nHorzMove, nVertMove );
482}
483
484void MetaPolyLineAction::Scale( double fScaleX, double fScaleY )
485{
486 ImplScalePoly( maPoly, fScaleX, fScaleY );
487 ImplScaleLineInfo( maLineInfo, fScaleX, fScaleY );
488}
489
492{}
493
495{}
496
499 maPoly (std::move( aPoly ))
500{}
501
503{
504 pOut->DrawPolygon( maPoly );
505}
506
508{
509 return new MetaPolygonAction( *this );
510}
511
513{
514 maPoly.Move( nHorzMove, nVertMove );
515}
516
517void MetaPolygonAction::Scale( double fScaleX, double fScaleY )
518{
519 ImplScalePoly( maPoly, fScaleX, fScaleY );
520}
521
524{}
525
527{}
528
531 maPolyPoly (std::move( aPolyPoly ))
532{}
533
535{
536 pOut->DrawPolyPolygon( maPolyPoly );
537}
538
540{
541 return new MetaPolyPolygonAction( *this );
542}
543
545{
546 maPolyPoly.Move( nHorzMove, nVertMove );
547}
548
549void MetaPolyPolygonAction::Scale( double fScaleX, double fScaleY )
550{
551 for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
552 ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
553}
554
557 mnIndex ( 0 ),
558 mnLen ( 0 )
559{}
560
562{}
563
564MetaTextAction::MetaTextAction( const Point& rPt, OUString aStr,
565 sal_Int32 nIndex, sal_Int32 nLen ) :
567 maPt ( rPt ),
568 maStr (std::move( aStr )),
569 mnIndex ( nIndex ),
570 mnLen ( nLen )
571{}
572
573static bool AllowY(tools::Long nY)
574{
575 static bool bFuzzing = utl::ConfigManager::IsFuzzing();
576 if (bFuzzing)
577 {
578 if (nY > 0x20000000 || nY < -0x20000000)
579 {
580 SAL_WARN("vcl", "skipping huge y: " << nY);
581 return false;
582 }
583 }
584 return true;
585}
586
587static bool AllowRect(const tools::Rectangle& rRect)
588{
589 return AllowY(rRect.Top()) && AllowY(rRect.Bottom());
590}
591
593{
594 if (!AllowY(pOut->LogicToPixel(maPt).Y()))
595 return;
596
597 pOut->DrawText( maPt, maStr, mnIndex, mnLen );
598}
599
601{
602 return new MetaTextAction( *this );
603}
604
605void MetaTextAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
606{
607 maPt.Move( nHorzMove, nVertMove );
608}
609
610void MetaTextAction::Scale( double fScaleX, double fScaleY )
611{
612 ImplScalePoint( maPt, fScaleX, fScaleY );
613}
614
615MetaTextArrayAction::MetaTextArrayAction() :
617 mnIndex ( 0 ),
618 mnLen ( 0 )
619{}
620
621MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
623 maStartPt ( rAction.maStartPt ),
624 maStr ( rAction.maStr ),
625 maDXAry ( rAction.maDXAry ),
626 maKashidaAry( rAction.maKashidaAry ),
627 mnIndex ( rAction.mnIndex ),
628 mnLen ( rAction.mnLen )
629{
630}
631
632MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
633 OUString aStr,
634 KernArray aDXAry,
635 std::vector<sal_Bool> aKashidaAry,
636 sal_Int32 nIndex,
637 sal_Int32 nLen ) :
639 maStartPt ( rStartPt ),
640 maStr (std::move( aStr )),
641 maDXAry (std::move( aDXAry )),
642 maKashidaAry(std::move( aKashidaAry )),
643 mnIndex ( nIndex ),
644 mnLen ( nLen )
645{
646}
647
648MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
649 OUString aStr,
650 KernArraySpan pDXAry,
651 o3tl::span<const sal_Bool> pKashidaAry,
652 sal_Int32 nIndex,
653 sal_Int32 nLen ) :
655 maStartPt ( rStartPt ),
656 maStr (std::move( aStr )),
657 maKashidaAry( pKashidaAry.begin(), pKashidaAry.end() ),
658 mnIndex ( nIndex ),
659 mnLen ( nLen )
660{
661 maDXAry.assign(pDXAry);
662}
663
664MetaTextArrayAction::~MetaTextArrayAction()
665{
666}
667
668void MetaTextArrayAction::Execute( OutputDevice* pOut )
669{
670 pOut->DrawTextArray( maStartPt, maStr, maDXAry, maKashidaAry, mnIndex, mnLen );
671}
672
673rtl::Reference<MetaAction> MetaTextArrayAction::Clone() const
674{
675 return new MetaTextArrayAction( *this );
676}
677
678void MetaTextArrayAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
679{
680 maStartPt.Move( nHorzMove, nVertMove );
681}
682
683void MetaTextArrayAction::Scale( double fScaleX, double fScaleY )
684{
685 ImplScalePoint( maStartPt, fScaleX, fScaleY );
686
687 if ( !maDXAry.empty() && mnLen )
688 {
689 for ( sal_uInt16 i = 0, nCount = mnLen; i < nCount; i++ )
690 maDXAry.set(i, FRound(maDXAry[i] * fabs(fScaleX)));
691 }
692}
693
694void MetaTextArrayAction::SetDXArray(KernArray aArray)
695{
696 maDXAry = std::move(aArray);
697}
698
699void MetaTextArrayAction::SetKashidaArray(std::vector<sal_Bool> aArray)
700{
701 maKashidaAry = std::move(aArray);
702}
703
706 mnWidth ( 0 ),
707 mnIndex ( 0 ),
708 mnLen ( 0 )
709{}
710
712{}
713
714MetaStretchTextAction::MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
715 OUString aStr,
716 sal_Int32 nIndex, sal_Int32 nLen ) :
718 maPt ( rPt ),
719 maStr (std::move( aStr )),
720 mnWidth ( nWidth ),
721 mnIndex ( nIndex ),
722 mnLen ( nLen )
723{}
724
726{
727 if (!AllowY(pOut->LogicToPixel(maPt).Y()))
728 return;
729
730 pOut->DrawStretchText( maPt, mnWidth, maStr, mnIndex, mnLen );
731}
732
734{
735 return new MetaStretchTextAction( *this );
736}
737
739{
740 maPt.Move( nHorzMove, nVertMove );
741}
742
743void MetaStretchTextAction::Scale( double fScaleX, double fScaleY )
744{
745 ImplScalePoint( maPt, fScaleX, fScaleY );
746 mnWidth = static_cast<sal_uLong>(FRound( mnWidth * fabs(fScaleX) ));
747}
750 mnStyle ( DrawTextFlags::NONE )
751{}
752
754{}
755
757 OUString aStr, DrawTextFlags nStyle ) :
759 maRect ( rRect ),
760 maStr (std::move( aStr )),
761 mnStyle ( nStyle )
762{}
763
765{
766 if (!AllowRect(pOut->LogicToPixel(maRect)))
767 return;
768
769 pOut->DrawText( maRect, maStr, mnStyle );
770}
771
773{
774 return new MetaTextRectAction( *this );
775}
776
778{
779 maRect.Move( nHorzMove, nVertMove );
780}
781
782void MetaTextRectAction::Scale( double fScaleX, double fScaleY )
783{
784 ImplScaleRect( maRect, fScaleX, fScaleY );
785}
786
789 mnWidth ( 0 ),
790 meStrikeout ( STRIKEOUT_NONE ),
791 meUnderline ( LINESTYLE_NONE ),
792 meOverline ( LINESTYLE_NONE )
793{}
794
796{}
797
799 FontStrikeout eStrikeout,
800 FontLineStyle eUnderline,
801 FontLineStyle eOverline ) :
803 maPos ( rPos ),
804 mnWidth ( nWidth ),
805 meStrikeout ( eStrikeout ),
806 meUnderline ( eUnderline ),
807 meOverline ( eOverline )
808{}
809
811{
812 pOut->DrawTextLine( maPos, mnWidth, meStrikeout, meUnderline, meOverline );
813}
814
816{
817 return new MetaTextLineAction( *this );
818}
819
821{
822 maPos.Move( nHorzMove, nVertMove );
823}
824
825void MetaTextLineAction::Scale( double fScaleX, double fScaleY )
826{
827 ImplScalePoint( maPos, fScaleX, fScaleY );
828 mnWidth = FRound( mnWidth * fabs(fScaleX) );
829}
830
833{}
834
836{}
837
838MetaBmpAction::MetaBmpAction( const Point& rPt, const Bitmap& rBmp ) :
840 maBmp ( rBmp ),
841 maPt ( rPt )
842{}
843
845{
846 pOut->DrawBitmap( maPt, maBmp );
847}
848
850{
851 return new MetaBmpAction( *this );
852}
853
854void MetaBmpAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
855{
856 maPt.Move( nHorzMove, nVertMove );
857}
858
859void MetaBmpAction::Scale( double fScaleX, double fScaleY )
860{
861 ImplScalePoint( maPt, fScaleX, fScaleY );
862}
863
866{}
867
869{}
870
871MetaBmpScaleAction::MetaBmpScaleAction( const Point& rPt, const Size& rSz,
872 const Bitmap& rBmp ) :
874 maBmp ( rBmp ),
875 maPt ( rPt ),
876 maSz ( rSz )
877{}
878
879static bool AllowScale(const Size& rSource, const Size& rDest)
880{
881 static bool bFuzzing = utl::ConfigManager::IsFuzzing();
882 if (bFuzzing)
883 {
884 constexpr int nMaxScaleWhenFuzzing = 256;
885
886 auto nSourceHeight = rSource.Height();
887 auto nDestHeight = rDest.Height();
888 if (nSourceHeight && nDestHeight > nSourceHeight && nDestHeight / nSourceHeight > nMaxScaleWhenFuzzing)
889 {
890 SAL_WARN("vcl", "skipping large vertical scaling: " << nSourceHeight << " to " << nDestHeight);
891 return false;
892 }
893
894 if (nDestHeight && nSourceHeight > nDestHeight && nSourceHeight / nDestHeight > nMaxScaleWhenFuzzing)
895 {
896 SAL_WARN("vcl", "skipping large vertical scaling: " << nSourceHeight << " to " << nDestHeight);
897 return false;
898 }
899
900 auto nSourceWidth = rSource.Width();
901 auto nDestWidth = rDest.Width();
902 if (nSourceWidth && nDestWidth > nSourceWidth && nDestWidth / nSourceWidth > nMaxScaleWhenFuzzing)
903 {
904 SAL_WARN("vcl", "skipping large horizontal scaling: " << nSourceWidth << " to " << nDestWidth);
905 return false;
906 }
907
908 if (nDestWidth && nSourceWidth > nDestWidth && nSourceWidth / nDestWidth > nMaxScaleWhenFuzzing)
909 {
910 SAL_WARN("vcl", "skipping large horizontal scaling: " << nSourceWidth << " to " << nDestWidth);
911 return false;
912 }
913 }
914
915 return true;
916}
917
919{
920 if (!AllowScale(maBmp.GetSizePixel(), pOut->LogicToPixel(maSz)))
921 return;
922
923 pOut->DrawBitmap( maPt, maSz, maBmp );
924}
925
927{
928 return new MetaBmpScaleAction( *this );
929}
930
932{
933 maPt.Move( nHorzMove, nVertMove );
934}
935
936void MetaBmpScaleAction::Scale( double fScaleX, double fScaleY )
937{
938 tools::Rectangle aRectangle(maPt, maSz);
939 ImplScaleRect( aRectangle, fScaleX, fScaleY );
940 maPt = aRectangle.TopLeft();
941 maSz = aRectangle.GetSize();
942}
943
944MetaBmpScalePartAction::MetaBmpScalePartAction() :
946{}
947
948MetaBmpScalePartAction::~MetaBmpScalePartAction()
949{}
950
951MetaBmpScalePartAction::MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
952 const Point& rSrcPt, const Size& rSrcSz,
953 const Bitmap& rBmp ) :
955 maBmp ( rBmp ),
956 maDstPt ( rDstPt ),
957 maDstSz ( rDstSz ),
958 maSrcPt ( rSrcPt ),
959 maSrcSz ( rSrcSz )
960{}
961
962void MetaBmpScalePartAction::Execute( OutputDevice* pOut )
963{
964 pOut->DrawBitmap( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmp );
965}
966
967rtl::Reference<MetaAction> MetaBmpScalePartAction::Clone() const
968{
969 return new MetaBmpScalePartAction( *this );
970}
971
972void MetaBmpScalePartAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
973{
974 maDstPt.Move( nHorzMove, nVertMove );
975}
976
977void MetaBmpScalePartAction::Scale( double fScaleX, double fScaleY )
978{
979 tools::Rectangle aRectangle(maDstPt, maDstSz);
980 ImplScaleRect( aRectangle, fScaleX, fScaleY );
981 maDstPt = aRectangle.TopLeft();
982 maDstSz = aRectangle.GetSize();
983}
984
987{}
988
990{}
991
992MetaBmpExAction::MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx ) :
994 maBmpEx ( rBmpEx ),
995 maPt ( rPt )
996{}
997
999{
1000 pOut->DrawBitmapEx( maPt, maBmpEx );
1001}
1002
1004{
1005 return new MetaBmpExAction( *this );
1006}
1007
1009{
1010 maPt.Move( nHorzMove, nVertMove );
1011}
1012
1013void MetaBmpExAction::Scale( double fScaleX, double fScaleY )
1014{
1015 ImplScalePoint( maPt, fScaleX, fScaleY );
1016}
1017
1020{}
1021
1023{}
1024
1026 const BitmapEx& rBmpEx ) :
1028 maBmpEx ( rBmpEx ),
1029 maPt ( rPt ),
1030 maSz ( rSz )
1031{}
1032
1034{
1035 if (!AllowScale(maBmpEx.GetSizePixel(), pOut->LogicToPixel(maSz)))
1036 return;
1037 if (!AllowRect(pOut->LogicToPixel(tools::Rectangle(maPt, maSz))))
1038 return;
1039
1040 pOut->DrawBitmapEx( maPt, maSz, maBmpEx );
1041}
1042
1044{
1045 return new MetaBmpExScaleAction( *this );
1046}
1047
1049{
1050 maPt.Move( nHorzMove, nVertMove );
1051}
1052
1053void MetaBmpExScaleAction::Scale( double fScaleX, double fScaleY )
1054{
1055 tools::Rectangle aRectangle(maPt, maSz);
1056 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1057 maPt = aRectangle.TopLeft();
1058 maSz = aRectangle.GetSize();
1059}
1060
1061MetaBmpExScalePartAction::MetaBmpExScalePartAction() :
1063{}
1064
1065MetaBmpExScalePartAction::~MetaBmpExScalePartAction()
1066{}
1067
1068MetaBmpExScalePartAction::MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
1069 const Point& rSrcPt, const Size& rSrcSz,
1070 const BitmapEx& rBmpEx ) :
1072 maBmpEx ( rBmpEx ),
1073 maDstPt ( rDstPt ),
1074 maDstSz ( rDstSz ),
1075 maSrcPt ( rSrcPt ),
1076 maSrcSz ( rSrcSz )
1077{}
1078
1079void MetaBmpExScalePartAction::Execute( OutputDevice* pOut )
1080{
1081 pOut->DrawBitmapEx( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmpEx );
1082}
1083
1084rtl::Reference<MetaAction> MetaBmpExScalePartAction::Clone() const
1085{
1086 return new MetaBmpExScalePartAction( *this );
1087}
1088
1089void MetaBmpExScalePartAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1090{
1091 maDstPt.Move( nHorzMove, nVertMove );
1092}
1093
1094void MetaBmpExScalePartAction::Scale( double fScaleX, double fScaleY )
1095{
1096 tools::Rectangle aRectangle(maDstPt, maDstSz);
1097 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1098 maDstPt = aRectangle.TopLeft();
1099 maDstSz = aRectangle.GetSize();
1100}
1101
1104{}
1105
1107{}
1108
1110 const Bitmap& rBmp,
1111 const Color& rColor ) :
1113 maBmp ( rBmp ),
1114 maColor ( rColor ),
1115 maPt ( rPt )
1116{}
1117
1119{
1120 pOut->DrawMask( maPt, maBmp, maColor );
1121}
1122
1124{
1125 return new MetaMaskAction( *this );
1126}
1127
1129{
1130 maPt.Move( nHorzMove, nVertMove );
1131}
1132
1133void MetaMaskAction::Scale( double fScaleX, double fScaleY )
1134{
1135 ImplScalePoint( maPt, fScaleX, fScaleY );
1136}
1137
1140{}
1141
1143{}
1144
1146 const Bitmap& rBmp,
1147 const Color& rColor ) :
1149 maBmp ( rBmp ),
1150 maColor ( rColor ),
1151 maPt ( rPt ),
1152 maSz ( rSz )
1153{}
1154
1156{
1157 if (!AllowRect(pOut->LogicToPixel(tools::Rectangle(maPt, maSz))))
1158 return;
1159 pOut->DrawMask( maPt, maSz, maBmp, maColor );
1160}
1161
1163{
1164 return new MetaMaskScaleAction( *this );
1165}
1166
1168{
1169 maPt.Move( nHorzMove, nVertMove );
1170}
1171
1172void MetaMaskScaleAction::Scale( double fScaleX, double fScaleY )
1173{
1174 tools::Rectangle aRectangle(maPt, maSz);
1175 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1176 maPt = aRectangle.TopLeft();
1177 maSz = aRectangle.GetSize();
1178}
1179
1182{}
1183
1185{}
1186
1187MetaMaskScalePartAction::MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz,
1188 const Point& rSrcPt, const Size& rSrcSz,
1189 const Bitmap& rBmp,
1190 const Color& rColor ) :
1192 maBmp ( rBmp ),
1193 maColor ( rColor ),
1194 maDstPt ( rDstPt ),
1195 maDstSz ( rDstSz ),
1196 maSrcPt ( rSrcPt ),
1197 maSrcSz ( rSrcSz )
1198{}
1199
1201{
1203 return;
1204
1206}
1207
1209{
1210 return new MetaMaskScalePartAction( *this );
1211}
1212
1214{
1215 maDstPt.Move( nHorzMove, nVertMove );
1216}
1217
1218void MetaMaskScalePartAction::Scale( double fScaleX, double fScaleY )
1219{
1220 tools::Rectangle aRectangle(maDstPt, maDstSz);
1221 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1222 maDstPt = aRectangle.TopLeft();
1223 maDstSz = aRectangle.GetSize();
1224}
1225
1228{}
1229
1231{}
1232
1235 maRect ( rRect ),
1236 maGradient (std::move( aGradient ))
1237{}
1238
1240{
1241 pOut->DrawGradient( maRect, maGradient );
1242}
1243
1245{
1246 return new MetaGradientAction( *this );
1247}
1248
1250{
1251 maRect.Move( nHorzMove, nVertMove );
1252}
1253
1254void MetaGradientAction::Scale( double fScaleX, double fScaleY )
1255{
1256 ImplScaleRect( maRect, fScaleX, fScaleY );
1257}
1258
1261{}
1262
1265 maPolyPoly (std::move( aPolyPoly )),
1266 maGradient (std::move( aGradient ))
1267{}
1268
1270{}
1271
1273{
1274 if( pOut->GetConnectMetaFile() )
1275 {
1276 pOut->GetConnectMetaFile()->AddAction( this );
1277 }
1278}
1279
1281{
1282 return new MetaGradientExAction( *this );
1283}
1284
1286{
1287 maPolyPoly.Move( nHorzMove, nVertMove );
1288}
1289
1290void MetaGradientExAction::Scale( double fScaleX, double fScaleY )
1291{
1292 for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
1293 ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
1294}
1295
1298{}
1299
1301{}
1302
1305 maPolyPoly (std::move( aPolyPoly )),
1306 maHatch ( rHatch )
1307{}
1308
1310{
1311 pOut->DrawHatch( maPolyPoly, maHatch );
1312}
1313
1315{
1316 return new MetaHatchAction( *this );
1317}
1318
1320{
1321 maPolyPoly.Move( nHorzMove, nVertMove );
1322}
1323
1324void MetaHatchAction::Scale( double fScaleX, double fScaleY )
1325{
1326 for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
1327 ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
1328}
1329
1330MetaWallpaperAction::MetaWallpaperAction() :
1332{}
1333
1334MetaWallpaperAction::~MetaWallpaperAction()
1335{}
1336
1337MetaWallpaperAction::MetaWallpaperAction( const tools::Rectangle& rRect,
1338 const Wallpaper& rPaper ) :
1340 maRect ( rRect ),
1341 maWallpaper ( rPaper )
1342{}
1343
1344void MetaWallpaperAction::Execute( OutputDevice* pOut )
1345{
1346 pOut->DrawWallpaper( maRect, maWallpaper );
1347}
1348
1349rtl::Reference<MetaAction> MetaWallpaperAction::Clone() const
1350{
1351 return new MetaWallpaperAction( *this );
1352}
1353
1354void MetaWallpaperAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1355{
1356 maRect.Move( nHorzMove, nVertMove );
1357}
1358
1359void MetaWallpaperAction::Scale( double fScaleX, double fScaleY )
1360{
1361 ImplScaleRect( maRect, fScaleX, fScaleY );
1362}
1363
1366 mbClip ( false )
1367{}
1368
1370{}
1371
1374 maRegion (std::move( aRegion )),
1375 mbClip ( bClip )
1376{}
1377
1379{
1380 if( mbClip )
1381 pOut->SetClipRegion( maRegion );
1382 else
1383 pOut->SetClipRegion();
1384}
1385
1387{
1388 return new MetaClipRegionAction( *this );
1389}
1390
1392{
1393 maRegion.Move( nHorzMove, nVertMove );
1394}
1395
1396void MetaClipRegionAction::Scale( double fScaleX, double fScaleY )
1397{
1398 maRegion.Scale( fScaleX, fScaleY );
1399}
1400
1403{}
1404
1406{}
1407
1410 maRect ( rRect )
1411{}
1412
1414{
1415 pOut->IntersectClipRegion( maRect );
1416}
1417
1419{
1420 return new MetaISectRectClipRegionAction( *this );
1421}
1422
1424{
1425 maRect.Move( nHorzMove, nVertMove );
1426}
1427
1428void MetaISectRectClipRegionAction::Scale( double fScaleX, double fScaleY )
1429{
1430 ImplScaleRect( maRect, fScaleX, fScaleY );
1431}
1432
1435{}
1436
1438{}
1439
1442 maRegion (std::move( aRegion ))
1443{
1444}
1445
1447{
1448 pOut->IntersectClipRegion( maRegion );
1449}
1450
1452{
1453 return new MetaISectRegionClipRegionAction( *this );
1454}
1455
1457{
1458 maRegion.Move( nHorzMove, nVertMove );
1459}
1460
1461void MetaISectRegionClipRegionAction::Scale( double fScaleX, double fScaleY )
1462{
1463 maRegion.Scale( fScaleX, fScaleY );
1464}
1465
1468 mnHorzMove ( 0 ),
1469 mnVertMove ( 0 )
1470{}
1471
1473{}
1474
1477 mnHorzMove ( nHorzMove ),
1478 mnVertMove ( nVertMove )
1479{}
1480
1482{
1483 pOut->MoveClipRegion( mnHorzMove, mnVertMove );
1484}
1485
1487{
1488 return new MetaMoveClipRegionAction( *this );
1489}
1490
1491void MetaMoveClipRegionAction::Scale( double fScaleX, double fScaleY )
1492{
1493 mnHorzMove = FRound( mnHorzMove * fScaleX );
1494 mnVertMove = FRound( mnVertMove * fScaleY );
1495}
1496
1499 mbSet ( false )
1500{}
1501
1503{}
1504
1507 maColor ( rColor ),
1508 mbSet ( bSet )
1509{}
1510
1512{
1513 if( mbSet )
1514 pOut->SetLineColor( maColor );
1515 else
1516 pOut->SetLineColor();
1517}
1518
1520{
1521 return new MetaLineColorAction( *this );
1522}
1523
1526 mbSet ( false )
1527{}
1528
1530{}
1531
1534 maColor ( rColor ),
1535 mbSet ( bSet )
1536{}
1537
1539{
1540 if( mbSet )
1541 pOut->SetFillColor( maColor );
1542 else
1543 pOut->SetFillColor();
1544}
1545
1547{
1548 return new MetaFillColorAction( *this );
1549}
1550
1553{}
1554
1556{}
1557
1560 maColor ( rColor )
1561{}
1562
1564{
1565 pOut->SetTextColor( maColor );
1566}
1567
1569{
1570 return new MetaTextColorAction( *this );
1571}
1572
1575 mbSet ( false )
1576{}
1577
1579{}
1580
1583 maColor ( rColor ),
1584 mbSet ( bSet )
1585{}
1586
1588{
1589 if( mbSet )
1590 pOut->SetTextFillColor( maColor );
1591 else
1592 pOut->SetTextFillColor();
1593}
1594
1596{
1597 return new MetaTextFillColorAction( *this );
1598}
1599
1602 mbSet ( false )
1603{}
1604
1606{}
1607
1610 maColor ( rColor ),
1611 mbSet ( bSet )
1612{}
1613
1615{
1616 if( mbSet )
1617 pOut->SetTextLineColor( maColor );
1618 else
1619 pOut->SetTextLineColor();
1620}
1621
1623{
1624 return new MetaTextLineColorAction( *this );
1625}
1626
1629 mbSet ( false )
1630{}
1631
1633{}
1634
1637 maColor ( rColor ),
1638 mbSet ( bSet )
1639{}
1640
1642{
1643 if( mbSet )
1644 pOut->SetOverlineColor( maColor );
1645 else
1646 pOut->SetOverlineColor();
1647}
1648
1650{
1651 return new MetaOverlineColorAction( *this );
1652}
1653
1656 maAlign ( ALIGN_TOP )
1657{}
1658
1660{}
1661
1664 maAlign ( aAlign )
1665{}
1666
1668{
1669 pOut->SetTextAlign( maAlign );
1670}
1671
1673{
1674 return new MetaTextAlignAction( *this );
1675}
1676
1679{}
1680
1682{}
1683
1686 maMapMode ( rMapMode )
1687{}
1688
1690{
1691 pOut->SetMapMode( maMapMode );
1692}
1693
1695{
1696 return new MetaMapModeAction( *this );
1697}
1698
1699void MetaMapModeAction::Scale( double fScaleX, double fScaleY )
1700{
1701 Point aPoint( maMapMode.GetOrigin() );
1702
1703 ImplScalePoint( aPoint, fScaleX, fScaleY );
1704 maMapMode.SetOrigin( aPoint );
1705}
1706
1709{}
1710
1712{}
1713
1716 maFont (std::move( aFont ))
1717{
1718 // #96876: because RTL_TEXTENCODING_SYMBOL is often set at the OpenSymbol font,
1719 // we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems
1720 // to be the right way; changing the textencoding at other sources
1721 // is too dangerous at the moment
1723 && ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) )
1724 {
1725 SAL_WARN_IF(maFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL, "vcl", "OpenSymbol should not have charset of RTL_TEXTENCODING_SYMBOL in new documents");
1726 maFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
1727 }
1728}
1729
1731{
1732 pOut->SetFont( maFont );
1733}
1734
1736{
1737 return new MetaFontAction( *this );
1738}
1739
1740void MetaFontAction::Scale( double fScaleX, double fScaleY )
1741{
1742 const Size aSize(
1743 FRound(maFont.GetFontSize().Width() * fabs(fScaleX)),
1744 FRound(maFont.GetFontSize().Height() * fabs(fScaleY)));
1745 maFont.SetFontSize( aSize );
1746}
1747
1751{}
1752
1754{}
1755
1758 mnFlags ( nFlags )
1759{}
1760
1762{
1763 pOut->Push( mnFlags );
1764}
1765
1767{
1768 return new MetaPushAction( *this );
1769}
1770
1773{}
1774
1776{}
1777
1779{
1780 pOut->Pop();
1781}
1782
1784{
1785 return new MetaPopAction( *this );
1786}
1787
1790 meRasterOp ( RasterOp::OverPaint )
1791{}
1792
1794{}
1795
1798 meRasterOp ( eRasterOp )
1799{
1800}
1801
1803{
1804 pOut->SetRasterOp( meRasterOp );
1805}
1806
1808{
1809 return new MetaRasterOpAction( *this );
1810}
1811
1814 mnTransPercent ( 0 )
1815{}
1816
1818{}
1819
1822 maPolyPoly (std::move( aPolyPoly )),
1823 mnTransPercent ( nTransPercent )
1824{}
1825
1827{
1828 pOut->DrawTransparent( maPolyPoly, mnTransPercent );
1829}
1830
1832{
1833 return new MetaTransparentAction( *this );
1834}
1835
1837{
1838 maPolyPoly.Move( nHorzMove, nVertMove );
1839}
1840
1841void MetaTransparentAction::Scale( double fScaleX, double fScaleY )
1842{
1843 for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
1844 ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
1845}
1846
1849{}
1850
1852{}
1853
1855 const Size& rSize, Gradient aGradient ) :
1857 maMtf ( rMtf ),
1858 maPoint ( rPos ),
1859 maSize ( rSize ),
1860 maGradient (std::move( aGradient ))
1861{}
1862
1864{
1865 pOut->DrawTransparent( maMtf, maPoint, maSize, maGradient );
1866}
1867
1869{
1870 return new MetaFloatTransparentAction( *this );
1871}
1872
1874{
1875 maPoint.Move( nHorzMove, nVertMove );
1876}
1877
1878void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY )
1879{
1880 tools::Rectangle aRectangle(maPoint, maSize);
1881 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1882 maPoint = aRectangle.TopLeft();
1883 maSize = aRectangle.GetSize();
1884}
1885
1888{}
1889
1891{}
1892
1893MetaEPSAction::MetaEPSAction( const Point& rPoint, const Size& rSize,
1894 GfxLink aGfxLink, const GDIMetaFile& rSubst ) :
1896 maGfxLink (std::move( aGfxLink )),
1897 maSubst ( rSubst ),
1898 maPoint ( rPoint ),
1899 maSize ( rSize )
1900{}
1901
1903{
1904 pOut->DrawEPS( maPoint, maSize, maGfxLink, &maSubst );
1905}
1906
1908{
1909 return new MetaEPSAction( *this );
1910}
1911
1912void MetaEPSAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
1913{
1914 maPoint.Move( nHorzMove, nVertMove );
1915}
1916
1917void MetaEPSAction::Scale( double fScaleX, double fScaleY )
1918{
1919 tools::Rectangle aRectangle(maPoint, maSize);
1920 ImplScaleRect( aRectangle, fScaleX, fScaleY );
1921 maPoint = aRectangle.TopLeft();
1922 maSize = aRectangle.GetSize();
1923}
1924
1927 mbSet ( false )
1928{}
1929
1931{}
1932
1933MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, bool bSet ) :
1935 maRefPoint ( rRefPoint ),
1936 mbSet ( bSet )
1937{}
1938
1940{
1941 if( mbSet )
1942 pOut->SetRefPoint( maRefPoint );
1943 else
1944 pOut->SetRefPoint();
1945}
1946
1948{
1949 return new MetaRefPointAction( *this );
1950}
1951
1954 mnValue ( 0 )
1955{
1956 ImplInitDynamicData( nullptr, 0UL );
1957}
1958
1961 maComment ( rAct.maComment ),
1962 mnValue ( rAct.mnValue )
1963{
1964 ImplInitDynamicData( rAct.mpData.get(), rAct.mnDataSize );
1965}
1966
1967MetaCommentAction::MetaCommentAction( OString aComment, sal_Int32 nValue, const sal_uInt8* pData, sal_uInt32 nDataSize ) :
1969 maComment (std::move( aComment )),
1970 mnValue ( nValue )
1971{
1972 ImplInitDynamicData( pData, nDataSize );
1973}
1974
1976{
1977}
1978
1979void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize )
1980{
1981 if ( nDataSize && pData )
1982 {
1983 mnDataSize = nDataSize;
1984 mpData.reset( new sal_uInt8[ mnDataSize ] );
1985 memcpy( mpData.get(), pData, mnDataSize );
1986 }
1987 else
1988 {
1989 mnDataSize = 0;
1990 mpData = nullptr;
1991 }
1992}
1993
1995{
1996 if ( pOut->GetConnectMetaFile() )
1997 {
1998 pOut->GetConnectMetaFile()->AddAction( this );
1999 }
2000}
2001
2003{
2004 return new MetaCommentAction( *this );
2005}
2006
2008{
2009 if ( !(nXMove || nYMove) )
2010 return;
2011
2012 if ( !(mnDataSize && mpData) )
2013 return;
2014
2015 bool bPathStroke = (maComment == "XPATHSTROKE_SEQ_BEGIN");
2016 if ( !(bPathStroke || maComment == "XPATHFILL_SEQ_BEGIN") )
2017 return;
2018
2019 SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
2020 SvMemoryStream aDest;
2021 if ( bPathStroke )
2022 {
2023 SvtGraphicStroke aStroke;
2024 ReadSvtGraphicStroke( aMemStm, aStroke );
2025
2026 tools::Polygon aPath;
2027 aStroke.getPath( aPath );
2028 aPath.Move( nXMove, nYMove );
2029 aStroke.setPath( aPath );
2030
2031 tools::PolyPolygon aStartArrow;
2032 aStroke.getStartArrow(aStartArrow);
2033 aStartArrow.Move(nXMove, nYMove);
2034 aStroke.setStartArrow(aStartArrow);
2035
2036 tools::PolyPolygon aEndArrow;
2037 aStroke.getEndArrow(aEndArrow);
2038 aEndArrow.Move(nXMove, nYMove);
2039 aStroke.setEndArrow(aEndArrow);
2040
2041 WriteSvtGraphicStroke( aDest, aStroke );
2042 }
2043 else
2044 {
2045 SvtGraphicFill aFill;
2046 ReadSvtGraphicFill( aMemStm, aFill );
2047
2048 tools::PolyPolygon aPath;
2049 aFill.getPath( aPath );
2050 aPath.Move( nXMove, nYMove );
2051 aFill.setPath( aPath );
2052
2053 WriteSvtGraphicFill( aDest, aFill );
2054 }
2055 mpData.reset();
2056 ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
2057}
2058
2059// SJ: 25.07.06 #i56656# we are not able to mirror certain kind of
2060// comments properly, especially the XPATHSTROKE and XPATHFILL lead to
2061// problems, so it is better to remove these comments when mirroring
2062// FIXME: fake comment to apply the next hunk in the right location
2063void MetaCommentAction::Scale( double fXScale, double fYScale )
2064{
2065 if (( fXScale == 1.0 ) && ( fYScale == 1.0 ))
2066 return;
2067
2068 if ( !(mnDataSize && mpData) )
2069 return;
2070
2071 bool bPathStroke = (maComment == "XPATHSTROKE_SEQ_BEGIN");
2072 if ( bPathStroke || maComment == "XPATHFILL_SEQ_BEGIN" )
2073 {
2074 SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
2075 SvMemoryStream aDest;
2076 if ( bPathStroke )
2077 {
2078 SvtGraphicStroke aStroke;
2079 ReadSvtGraphicStroke( aMemStm, aStroke );
2080 aStroke.scale( fXScale, fYScale );
2081 WriteSvtGraphicStroke( aDest, aStroke );
2082 }
2083 else
2084 {
2085 SvtGraphicFill aFill;
2086 ReadSvtGraphicFill( aMemStm, aFill );
2087 tools::PolyPolygon aPath;
2088 aFill.getPath( aPath );
2089 aPath.Scale( fXScale, fYScale );
2090 aFill.setPath( aPath );
2091 WriteSvtGraphicFill( aDest, aFill );
2092 }
2093 mpData.reset();
2094 ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
2095 } else if( maComment == "EMF_PLUS_HEADER_INFO" ){
2096 SvMemoryStream aMemStm( static_cast<void*>(mpData.get()), mnDataSize, StreamMode::READ );
2097 SvMemoryStream aDest;
2098
2099 sal_Int32 nLeft(0), nRight(0), nTop(0), nBottom(0);
2100 sal_Int32 nPixX(0), nPixY(0), nMillX(0), nMillY(0);
2101 float m11(0), m12(0), m21(0), m22(0), mdx(0), mdy(0);
2102
2103 // read data
2104 aMemStm.ReadInt32( nLeft ).ReadInt32( nTop ).ReadInt32( nRight ).ReadInt32( nBottom );
2105 aMemStm.ReadInt32( nPixX ).ReadInt32( nPixY ).ReadInt32( nMillX ).ReadInt32( nMillY );
2106 aMemStm.ReadFloat( m11 ).ReadFloat( m12 ).ReadFloat( m21 ).ReadFloat( m22 ).ReadFloat( mdx ).ReadFloat( mdy );
2107
2108 // add scale to the transformation
2109 m11 *= fXScale;
2110 m12 *= fXScale;
2111 m22 *= fYScale;
2112 m21 *= fYScale;
2113
2114 // prepare new data
2115 aDest.WriteInt32( nLeft ).WriteInt32( nTop ).WriteInt32( nRight ).WriteInt32( nBottom );
2116 aDest.WriteInt32( nPixX ).WriteInt32( nPixY ).WriteInt32( nMillX ).WriteInt32( nMillY );
2117 aDest.WriteFloat( m11 ).WriteFloat( m12 ).WriteFloat( m21 ).WriteFloat( m22 ).WriteFloat( mdx ).WriteFloat( mdy );
2118
2119 // save them
2120 ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
2121 }
2122}
2123
2126 mnLayoutMode( vcl::text::ComplexTextLayoutFlags::Default )
2127{}
2128
2130{}
2131
2134 mnLayoutMode( nLayoutMode )
2135{}
2136
2138{
2139 pOut->SetLayoutMode( mnLayoutMode );
2140}
2141
2143{
2144 return new MetaLayoutModeAction( *this );
2145}
2146
2149 meTextLanguage( LANGUAGE_DONTKNOW )
2150{}
2151
2153{}
2154
2157 meTextLanguage( eTextLanguage )
2158{}
2159
2161{
2162 pOut->SetDigitLanguage( meTextLanguage );
2163}
2164
2166{
2167 return new MetaTextLanguageAction( *this );
2168}
2169
2170/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
basegfx::BColor maColor
DrawTextFlags
geometry::RealSize2D maSize
RasterOp
Definition: RasterOp.hxx:23
B2DPoint maPoint
const Size & GetSizePixel() const
Definition: bitmapex.hxx:72
Size GetSizePixel() const
Definition: hatch.hxx:47
void SetOrigin(const Point &rOrigin)
Definition: mapmod.cxx:103
const Point & GetOrigin() const
Definition: mapmod.cxx:148
virtual ~MetaAction() override
Definition: metaact.cxx:95
MetaAction()
Definition: metaact.cxx:80
virtual void Execute(OutputDevice *pOut)
Definition: metaact.cxx:99
virtual void Scale(double fScaleX, double fScaleY)
Definition: metaact.cxx:112
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove)
Definition: metaact.cxx:108
virtual rtl::Reference< MetaAction > Clone() const
Definition: metaact.cxx:103
virtual ~MetaArcAction() override
Definition: metaact.cxx:335
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:346
Point maStartPt
Definition: metaact.hxx:285
Point maEndPt
Definition: metaact.hxx:286
tools::Rectangle maRect
Definition: metaact.hxx:284
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:351
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:356
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:363
Bitmap maBmp
Definition: metaact.hxx:672
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:854
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:849
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:859
virtual ~MetaBmpAction() override
Definition: metaact.cxx:835
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:844
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:998
virtual ~MetaBmpExAction() override
Definition: metaact.cxx:989
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1003
BitmapEx maBmpEx
Definition: metaact.hxx:777
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1008
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1013
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1043
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1048
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1033
virtual ~MetaBmpExScaleAction() override
Definition: metaact.cxx:1022
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1053
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:926
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:936
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:931
virtual ~MetaBmpScaleAction() override
Definition: metaact.cxx:868
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:918
tools::Rectangle maRect
Definition: metaact.hxx:352
virtual ~MetaChordAction() override
Definition: metaact.cxx:413
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:434
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:429
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:441
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:424
vcl::Region maRegion
Definition: metaact.hxx:1121
virtual ~MetaClipRegionAction() override
Definition: metaact.cxx:1369
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1386
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1396
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1391
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1378
sal_uInt32 mnDataSize
Definition: metaact.hxx:1680
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1994
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:2007
SAL_DLLPRIVATE void ImplInitDynamicData(const sal_uInt8 *pData, sal_uInt32 nDataSize)
Definition: metaact.cxx:1979
std::unique_ptr< sal_uInt8[]> mpData
Definition: metaact.hxx:1682
virtual ~MetaCommentAction() override
Definition: metaact.cxx:1975
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:2002
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:2063
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1912
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1902
GfxLink maGfxLink
Definition: metaact.hxx:1614
virtual ~MetaEPSAction() override
Definition: metaact.cxx:1890
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1907
GDIMetaFile maSubst
Definition: metaact.hxx:1615
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1917
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:321
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:311
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:326
tools::Rectangle maRect
Definition: metaact.hxx:257
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:316
virtual ~MetaEllipseAction() override
Definition: metaact.cxx:303
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1546
virtual ~MetaFillColorAction() override
Definition: metaact.cxx:1529
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1538
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1873
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1868
virtual ~MetaFloatTransparentAction() override
Definition: metaact.cxx:1851
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1863
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1878
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1735
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1740
vcl::Font maFont
Definition: metaact.hxx:1448
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1730
virtual ~MetaFontAction() override
Definition: metaact.cxx:1711
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1254
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1239
Gradient maGradient
Definition: metaact.hxx:1002
tools::Rectangle maRect
Definition: metaact.hxx:1001
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1244
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1249
virtual ~MetaGradientAction() override
Definition: metaact.cxx:1230
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1280
virtual ~MetaGradientExAction() override
Definition: metaact.cxx:1269
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1031
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1272
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1285
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1290
virtual ~MetaHatchAction() override
Definition: metaact.cxx:1300
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1314
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1319
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1061
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1309
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1324
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1413
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1428
virtual ~MetaISectRectClipRegionAction() override
Definition: metaact.cxx:1405
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1418
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1423
virtual ~MetaISectRegionClipRegionAction() override
Definition: metaact.cxx:1437
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1446
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1451
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1456
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1461
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2137
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:2142
vcl::text::ComplexTextLayoutFlags mnLayoutMode
Definition: metaact.hxx:1714
virtual ~MetaLayoutModeAction() override
Definition: metaact.cxx:2129
LineInfo maLineInfo
Definition: metaact.hxx:161
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:210
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:202
virtual ~MetaLineAction() override
Definition: metaact.cxx:185
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:215
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:221
Point maStartPt
Definition: metaact.hxx:162
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1511
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1519
virtual ~MetaLineColorAction() override
Definition: metaact.cxx:1502
virtual ~MetaMapModeAction() override
Definition: metaact.cxx:1681
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1689
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1699
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1694
Bitmap maBmp
Definition: metaact.hxx:885
virtual ~MetaMaskAction() override
Definition: metaact.cxx:1106
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1128
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1118
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1133
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1123
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1167
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1162
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1172
virtual ~MetaMaskScaleAction() override
Definition: metaact.cxx:1142
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1155
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1200
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1208
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1213
virtual ~MetaMaskScalePartAction() override
Definition: metaact.cxx:1184
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1218
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1481
virtual ~MetaMoveClipRegionAction() override
Definition: metaact.cxx:1472
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1491
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1486
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1641
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1649
virtual ~MetaOverlineColorAction() override
Definition: metaact.cxx:1632
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:395
virtual ~MetaPieAction() override
Definition: metaact.cxx:374
Point maStartPt
Definition: metaact.hxx:319
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:385
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:390
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:402
tools::Rectangle maRect
Definition: metaact.hxx:318
Point maEndPt
Definition: metaact.hxx:320
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:139
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:134
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:144
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:129
virtual ~MetaPixelAction() override
Definition: metaact.cxx:120
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:161
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:176
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:171
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:166
virtual ~MetaPointAction() override
Definition: metaact.cxx:153
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:479
tools::Polygon maPoly
Definition: metaact.hxx:387
virtual ~MetaPolyLineAction() override
Definition: metaact.cxx:452
LineInfo maLineInfo
Definition: metaact.hxx:386
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:466
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:474
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:484
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:444
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:544
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:534
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:549
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:539
virtual ~MetaPolyPolygonAction() override
Definition: metaact.cxx:526
virtual ~MetaPolygonAction() override
Definition: metaact.cxx:494
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:517
tools::Polygon maPoly
Definition: metaact.hxx:417
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:502
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:507
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:512
virtual ~MetaPopAction() override
Definition: metaact.cxx:1775
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1778
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1783
virtual ~MetaPushAction() override
Definition: metaact.cxx:1753
vcl::PushFlags mnFlags
Definition: metaact.hxx:1480
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1761
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1766
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1807
virtual ~MetaRasterOpAction() override
Definition: metaact.cxx:1793
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1802
RasterOp meRasterOp
Definition: metaact.hxx:1520
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:240
tools::Rectangle maRect
Definition: metaact.hxx:196
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:245
virtual ~MetaRectAction() override
Definition: metaact.cxx:232
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:255
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:250
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1947
virtual ~MetaRefPointAction() override
Definition: metaact.cxx:1930
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1939
tools::Rectangle maRect
Definition: metaact.hxx:223
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:282
sal_uInt32 mnHorzRound
Definition: metaact.hxx:224
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:292
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:287
virtual ~MetaRoundRectAction() override
Definition: metaact.cxx:266
sal_uInt32 mnVertRound
Definition: metaact.hxx:225
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:277
virtual ~MetaStretchTextAction() override
Definition: metaact.cxx:711
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:733
sal_uInt32 mnWidth
Definition: metaact.hxx:558
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:743
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:725
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:738
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:610
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:600
virtual ~MetaTextAction() override
Definition: metaact.cxx:561
OUString maStr
Definition: metaact.hxx:472
sal_Int32 mnIndex
Definition: metaact.hxx:473
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:605
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:592
sal_Int32 mnLen
Definition: metaact.hxx:474
virtual ~MetaTextAlignAction() override
Definition: metaact.cxx:1659
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1667
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1672
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1568
virtual ~MetaTextColorAction() override
Definition: metaact.cxx:1555
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1563
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1595
virtual ~MetaTextFillColorAction() override
Definition: metaact.cxx:1578
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1587
virtual ~MetaTextLanguageAction() override
Definition: metaact.cxx:2152
LanguageType meTextLanguage
Definition: metaact.hxx:1738
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:2160
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:2165
virtual ~MetaTextLineAction() override
Definition: metaact.cxx:795
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:820
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:810
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:825
FontStrikeout meStrikeout
Definition: metaact.hxx:633
tools::Long mnWidth
Definition: metaact.hxx:632
FontLineStyle meUnderline
Definition: metaact.hxx:634
FontLineStyle meOverline
Definition: metaact.hxx:635
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:815
virtual ~MetaTextLineColorAction() override
Definition: metaact.cxx:1605
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1614
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1622
virtual ~MetaTextRectAction() override
Definition: metaact.cxx:753
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:772
DrawTextFlags mnStyle
Definition: metaact.hxx:599
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:764
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:777
tools::Rectangle maRect
Definition: metaact.hxx:597
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:782
sal_uInt16 mnTransPercent
Definition: metaact.hxx:1545
virtual rtl::Reference< MetaAction > Clone() const override
Definition: metaact.cxx:1831
virtual void Move(tools::Long nHorzMove, tools::Long nVertMove) override
Definition: metaact.cxx:1836
virtual void Execute(OutputDevice *pOut) override
Definition: metaact.cxx:1826
virtual void Scale(double fScaleX, double fScaleY) override
Definition: metaact.cxx:1841
virtual ~MetaTransparentAction() override
Definition: metaact.cxx:1817
tools::PolyPolygon maPolyPoly
Definition: metaact.hxx:1544
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const void * GetData()
SvStream & WriteInt32(sal_Int32 nInt32)
sal_uInt64 Tell() const
SvStream & ReadFloat(float &rFloat)
SvStream & WriteFloat(float nFloat)
SvStream & ReadInt32(sal_Int32 &rInt32)
Encapsulates geometry and associated attributes of a filled area.
void getPath(tools::PolyPolygon &) const
Query path to fill.
void setPath(const tools::PolyPolygon &rPath)
Set path to fill.
Encapsulates geometry and associated attributes of a graphical 'pen stroke'.
void getPath(tools::Polygon &) const
Query path to stroke.
void getStartArrow(tools::PolyPolygon &) const
Get the polygon that is put at the start of the line.
void getEndArrow(tools::PolyPolygon &) const
Get the polygon that is put at the end of the line.
void setEndArrow(const tools::PolyPolygon &)
Set the polygon that is put at the end of the line.
void setPath(const tools::Polygon &)
Set path to stroke.
void scale(double fScaleX, double fScaleY)
Affine scaling in both X and Y dimensions.
void setStartArrow(const tools::PolyPolygon &)
Set the polygon that is put at the start of the line.
sal_uInt16 Count() const
void Move(tools::Long nHorzMove, tools::Long nVertMove)
void Scale(double fScaleX, double fScaleY)
sal_uInt16 GetSize() const
void Move(tools::Long nHorzMove, tools::Long nVertMove)
constexpr tools::Long Top() const
constexpr Point TopLeft() const
constexpr Size GetSize() const
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
constexpr Point BottomRight() const
constexpr tools::Long Bottom() const
static bool IsFuzzing()
void SetFontSize(const Size &)
Definition: font/font.cxx:149
const OUString & GetFamilyName() const
Definition: font/font.cxx:904
void SetCharSet(rtl_TextEncoding)
Definition: font/font.cxx:161
const Size & GetFontSize() const
Definition: font/font.cxx:907
rtl_TextEncoding GetCharSet() const
Definition: font/font.cxx:913
void Move(tools::Long nHorzMove, tools::Long nVertMove)
Definition: region.cxx:401
void Scale(double fScaleX, double fScaleY)
Definition: region.cxx:454
int nCount
sal_Int16 nValue
UNOTOOLS_DLLPUBLIC bool IsOpenSymbol(std::u16string_view rFontName)
FontLineStyle
LINESTYLE_NONE
FontStrikeout
STRIKEOUT_NONE
ALIGN_TOP
FuncFlags mnFlags
SvStream & WriteSvtGraphicFill(SvStream &rOStm, const SvtGraphicFill &rClass)
SvStream & ReadSvtGraphicStroke(SvStream &rIStm, SvtGraphicStroke &rClass)
SvStream & ReadSvtGraphicFill(SvStream &rIStm, SvtGraphicFill &rClass)
SvStream & WriteSvtGraphicStroke(SvStream &rOStm, const SvtGraphicStroke &rClass)
tools::Long FRound(double fVal)
sal_Int32 nIndex
#define LANGUAGE_DONTKNOW
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
COMMENT
static bool AllowRect(const tools::Rectangle &rRect)
Definition: metaact.cxx:587
static bool AllowScale(const Size &rSource, const Size &rDest)
Definition: metaact.cxx:879
static bool AllowY(tools::Long nY)
Definition: metaact.cxx:573
MetaActionType
aStr
std::unique_ptr< sal_Int32[]> pData
def text(shape, orig_st)
NONE
const sal_uInt16 TEXTCOLOR
int i
enumrange< T >::Iterator begin(enumrange< T >)
end
TextAlign
long Long
ComplexTextLayoutFlags
Definition: State.hxx:76
PushFlags
Definition: State.hxx:40
QPRO_FUNC_TYPE nType
OUString maComment
sal_Int32 mnType
double mnWidth
const double mnValue
sal_uIntPtr sal_uLong
sal_uInt32 mnIndex
TEXT
LINE
#define TEXTLINE
unsigned char sal_uInt8
oslFileHandle & pOut