1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SV_METAACT_HXX 25 #define _SV_METAACT_HXX 26 27 #include <vcl/dllapi.h> 28 #include <vcl/gradient.hxx> 29 #include <vcl/hatch.hxx> 30 #include <vcl/wall.hxx> 31 #include <vcl/font.hxx> 32 #include <tools/poly.hxx> 33 #include <vcl/bitmap.hxx> 34 #include <vcl/bitmapex.hxx> 35 #include <vcl/region.hxx> 36 #include <vcl/graph.hxx> 37 #include <vcl/outdev.hxx> 38 #include <vcl/gdimtf.hxx> 39 #include <vcl/gfxlink.hxx> 40 #include <vcl/lineinfo.hxx> 41 #include <vcl/rendergraphic.hxx> 42 43 class SvStream; 44 45 // ----------- 46 // - Defines - 47 // ----------- 48 49 #define META_NULL_ACTION (0) 50 #define META_PIXEL_ACTION (100) 51 #define META_POINT_ACTION (101) 52 #define META_LINE_ACTION (102) 53 #define META_RECT_ACTION (103) 54 #define META_ROUNDRECT_ACTION (104) 55 #define META_ELLIPSE_ACTION (105) 56 #define META_ARC_ACTION (106) 57 #define META_PIE_ACTION (107) 58 #define META_CHORD_ACTION (108) 59 #define META_POLYLINE_ACTION (109) 60 #define META_POLYGON_ACTION (110) 61 #define META_POLYPOLYGON_ACTION (111) 62 #define META_TEXT_ACTION (112) 63 #define META_TEXTARRAY_ACTION (113) 64 #define META_STRETCHTEXT_ACTION (114) 65 #define META_TEXTRECT_ACTION (115) 66 #define META_BMP_ACTION (116) 67 #define META_BMPSCALE_ACTION (117) 68 #define META_BMPSCALEPART_ACTION (118) 69 #define META_BMPEX_ACTION (119) 70 #define META_BMPEXSCALE_ACTION (120) 71 #define META_BMPEXSCALEPART_ACTION (121) 72 #define META_MASK_ACTION (122) 73 #define META_MASKSCALE_ACTION (123) 74 #define META_MASKSCALEPART_ACTION (124) 75 #define META_GRADIENT_ACTION (125) 76 #define META_HATCH_ACTION (126) 77 #define META_WALLPAPER_ACTION (127) 78 #define META_CLIPREGION_ACTION (128) 79 #define META_ISECTRECTCLIPREGION_ACTION (129) 80 #define META_ISECTREGIONCLIPREGION_ACTION (130) 81 #define META_MOVECLIPREGION_ACTION (131) 82 #define META_LINECOLOR_ACTION (132) 83 #define META_FILLCOLOR_ACTION (133) 84 #define META_TEXTCOLOR_ACTION (134) 85 #define META_TEXTFILLCOLOR_ACTION (135) 86 #define META_TEXTALIGN_ACTION (136) 87 #define META_MAPMODE_ACTION (137) 88 #define META_FONT_ACTION (138) 89 #define META_PUSH_ACTION (139) 90 #define META_POP_ACTION (140) 91 #define META_RASTEROP_ACTION (141) 92 #define META_TRANSPARENT_ACTION (142) 93 #define META_EPS_ACTION (143) 94 #define META_REFPOINT_ACTION (144) 95 #define META_TEXTLINECOLOR_ACTION (145) 96 #define META_TEXTLINE_ACTION (146) 97 #define META_FLOATTRANSPARENT_ACTION (147) 98 #define META_GRADIENTEX_ACTION (148) 99 #define META_LAYOUTMODE_ACTION (149) 100 #define META_TEXTLANGUAGE_ACTION (150) 101 #define META_OVERLINECOLOR_ACTION (151) 102 #define META_RENDERGRAPHIC_ACTION (152) 103 104 #define META_COMMENT_ACTION (512) 105 106 // ------------------------------------------------------------------------ 107 108 struct ImplMetaReadData 109 { 110 rtl_TextEncoding meActualCharSet; 111 112 ImplMetaReadData() : 113 meActualCharSet( RTL_TEXTENCODING_ASCII_US ) 114 { 115 } 116 }; 117 118 // ------------------------------------------------------------------------ 119 120 struct ImplMetaWriteData 121 { 122 rtl_TextEncoding meActualCharSet; 123 GDIMetaFileWriteFlags mnWriteFlags; 124 125 ImplMetaWriteData() : 126 meActualCharSet( RTL_TEXTENCODING_ASCII_US ), 127 mnWriteFlags( GDIMETAFILE_WRITE_DEFAULT ) 128 { 129 } 130 }; 131 132 // ------------------------------------------------------------------------ 133 134 #define DECL_META_ACTION( Name, nType ) \ 135 Meta##Name##Action(); \ 136 protected: \ 137 virtual ~Meta##Name##Action(); \ 138 public: \ 139 virtual void Execute( OutputDevice* pOut ); \ 140 virtual MetaAction* Clone(); \ 141 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ); \ 142 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ); 143 144 #define IMPL_META_ACTION( Name, nType ) \ 145 Meta##Name##Action::Meta##Name##Action() : \ 146 MetaAction( nType ) {} \ 147 Meta##Name##Action::~Meta##Name##Action() {} 148 149 // -------------- 150 // - MetaAction - 151 // -------------- 152 153 class VCL_DLLPUBLIC MetaAction 154 { 155 private: 156 sal_uLong mnRefCount; 157 sal_uInt16 mnType; 158 159 virtual sal_Bool Compare( const MetaAction& ) const; 160 161 protected: 162 virtual ~MetaAction(); 163 164 public: 165 MetaAction(); 166 MetaAction( sal_uInt16 nType ); 167 168 virtual void Execute( OutputDevice* pOut ); 169 170 virtual MetaAction* Clone(); 171 172 virtual void Move( long nHorzMove, long nVertMove ); 173 virtual void Scale( double fScaleX, double fScaleY ); 174 175 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ); 176 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ); 177 178 sal_Bool IsEqual( const MetaAction& ) const; 179 180 sal_uInt16 GetType() const { return mnType; } 181 sal_uLong GetRefCount() const { return mnRefCount; } 182 void ResetRefCount() { mnRefCount = 1; } 183 void Duplicate() { mnRefCount++; } 184 void Delete() { if ( 0 == --mnRefCount ) delete this; } 185 186 public: 187 static MetaAction* ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData ); 188 }; 189 190 // ------------------- 191 // - MetaPixelAction - 192 // ------------------- 193 194 class VCL_DLLPUBLIC MetaPixelAction : public MetaAction 195 { 196 private: 197 Point maPt; 198 Color maColor; 199 200 virtual sal_Bool Compare( const MetaAction& ) const; 201 202 public: 203 DECL_META_ACTION( Pixel, META_PIXEL_ACTION ) 204 205 MetaPixelAction( const Point& rPt, const Color& rColor ); 206 207 virtual void Move( long nHorzMove, long nVertMove ); 208 virtual void Scale( double fScaleX, double fScaleY ); 209 210 const Point& GetPoint() const { return maPt; } 211 const Color& GetColor() const { return maColor; } 212 }; 213 214 // ------------------- 215 // - MetaPointAction - 216 // ------------------- 217 218 class VCL_DLLPUBLIC MetaPointAction : public MetaAction 219 { 220 private: 221 Point maPt; 222 223 virtual sal_Bool Compare( const MetaAction& ) const; 224 225 public: 226 DECL_META_ACTION( Point, META_POINT_ACTION ) 227 228 MetaPointAction( const Point& rPt ); 229 230 virtual void Move( long nHorzMove, long nVertMove ); 231 virtual void Scale( double fScaleX, double fScaleY ); 232 233 const Point& GetPoint() const { return maPt; } 234 }; 235 236 // ------------------ 237 // - MetaLineAction - 238 // ------------------ 239 240 class VCL_DLLPUBLIC MetaLineAction : public MetaAction 241 { 242 private: 243 244 LineInfo maLineInfo; 245 Point maStartPt; 246 Point maEndPt; 247 248 virtual sal_Bool Compare( const MetaAction& ) const; 249 250 public: 251 DECL_META_ACTION( Line, META_LINE_ACTION ) 252 253 MetaLineAction( const Point& rStart, const Point& rEnd ); 254 MetaLineAction( const Point& rStart, const Point& rEnd, 255 const LineInfo& rLineInfo ); 256 257 virtual void Move( long nHorzMove, long nVertMove ); 258 virtual void Scale( double fScaleX, double fScaleY ); 259 260 const Point& GetStartPoint() const { return maStartPt; } 261 const Point& GetEndPoint() const { return maEndPt; } 262 const LineInfo& GetLineInfo() const { return maLineInfo; } 263 }; 264 265 // ------------------ 266 // - MetaRectAction - 267 // ------------------ 268 269 class VCL_DLLPUBLIC MetaRectAction : public MetaAction 270 { 271 private: 272 273 Rectangle maRect; 274 275 virtual sal_Bool Compare( const MetaAction& ) const; 276 public: 277 DECL_META_ACTION( Rect, META_RECT_ACTION ) 278 279 MetaRectAction( const Rectangle& rRect ); 280 281 virtual void Move( long nHorzMove, long nVertMove ); 282 virtual void Scale( double fScaleX, double fScaleY ); 283 284 const Rectangle& GetRect() const { return maRect; } 285 }; 286 287 // ----------------------- 288 // - MetaRoundRectAction - 289 // ----------------------- 290 291 class VCL_DLLPUBLIC MetaRoundRectAction : public MetaAction 292 { 293 private: 294 295 Rectangle maRect; 296 sal_uInt32 mnHorzRound; 297 sal_uInt32 mnVertRound; 298 299 virtual sal_Bool Compare( const MetaAction& ) const; 300 301 public: 302 DECL_META_ACTION( RoundRect, META_ROUNDRECT_ACTION ) 303 304 MetaRoundRectAction( const Rectangle& rRect, 305 sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); 306 307 virtual void Move( long nHorzMove, long nVertMove ); 308 virtual void Scale( double fScaleX, double fScaleY ); 309 310 const Rectangle& GetRect() const { return maRect; } 311 sal_uInt32 GetHorzRound() const { return mnHorzRound; } 312 sal_uInt32 GetVertRound() const { return mnVertRound; } 313 }; 314 315 // --------------------- 316 // - MetaEllipseAction - 317 // --------------------- 318 319 class VCL_DLLPUBLIC MetaEllipseAction : public MetaAction 320 { 321 private: 322 323 Rectangle maRect; 324 325 virtual sal_Bool Compare( const MetaAction& ) const; 326 327 public: 328 DECL_META_ACTION( Ellipse, META_ELLIPSE_ACTION ) 329 330 MetaEllipseAction( const Rectangle& rRect ); 331 332 virtual void Move( long nHorzMove, long nVertMove ); 333 virtual void Scale( double fScaleX, double fScaleY ); 334 335 const Rectangle& GetRect() const { return maRect; } 336 }; 337 338 // ----------------- 339 // - MetaArcAction - 340 // ----------------- 341 342 class VCL_DLLPUBLIC MetaArcAction : public MetaAction 343 { 344 private: 345 346 Rectangle maRect; 347 Point maStartPt; 348 Point maEndPt; 349 350 virtual sal_Bool Compare( const MetaAction& ) const; 351 352 public: 353 DECL_META_ACTION( Arc, META_ARC_ACTION ) 354 355 MetaArcAction( const Rectangle& rRect, 356 const Point& rStart, const Point& rEnd ); 357 358 virtual void Move( long nHorzMove, long nVertMove ); 359 virtual void Scale( double fScaleX, double fScaleY ); 360 361 const Rectangle& GetRect() const { return maRect; } 362 const Point& GetStartPoint() const { return maStartPt; } 363 const Point& GetEndPoint() const { return maEndPt; } 364 }; 365 366 // ----------------- 367 // - MetaPieAction - 368 // ----------------- 369 370 class VCL_DLLPUBLIC MetaPieAction : public MetaAction 371 { 372 private: 373 374 Rectangle maRect; 375 Point maStartPt; 376 Point maEndPt; 377 378 virtual sal_Bool Compare( const MetaAction& ) const; 379 380 public: 381 DECL_META_ACTION( Pie, META_PIE_ACTION ) 382 383 MetaPieAction( const Rectangle& rRect, 384 const Point& rStart, const Point& rEnd ); 385 386 virtual void Move( long nHorzMove, long nVertMove ); 387 virtual void Scale( double fScaleX, double fScaleY ); 388 389 const Rectangle& GetRect() const { return maRect; } 390 const Point& GetStartPoint() const { return maStartPt; } 391 const Point& GetEndPoint() const { return maEndPt; } 392 }; 393 394 // ------------------- 395 // - MetaChordAction - 396 // ------------------- 397 398 class VCL_DLLPUBLIC MetaChordAction : public MetaAction 399 { 400 private: 401 402 Rectangle maRect; 403 Point maStartPt; 404 Point maEndPt; 405 406 virtual sal_Bool Compare( const MetaAction& ) const; 407 408 public: 409 DECL_META_ACTION( Chord, META_CHORD_ACTION ) 410 411 MetaChordAction( const Rectangle& rRect, 412 const Point& rStart, const Point& rEnd ); 413 414 virtual void Move( long nHorzMove, long nVertMove ); 415 virtual void Scale( double fScaleX, double fScaleY ); 416 417 const Rectangle& GetRect() const { return maRect; } 418 const Point& GetStartPoint() const { return maStartPt; } 419 const Point& GetEndPoint() const { return maEndPt; } 420 }; 421 422 // ---------------------- 423 // - MetaPolyLineAction - 424 // ---------------------- 425 426 class VCL_DLLPUBLIC MetaPolyLineAction : public MetaAction 427 { 428 private: 429 430 LineInfo maLineInfo; 431 Polygon maPoly; 432 433 virtual sal_Bool Compare( const MetaAction& ) const; 434 435 public: 436 DECL_META_ACTION( PolyLine, META_POLYLINE_ACTION ) 437 438 MetaPolyLineAction( const Polygon& rPoly ); 439 MetaPolyLineAction( const Polygon& rPoly, const LineInfo& rLineInfo ); 440 441 virtual void Move( long nHorzMove, long nVertMove ); 442 virtual void Scale( double fScaleX, double fScaleY ); 443 444 const Polygon& GetPolygon() const { return maPoly; } 445 const LineInfo& GetLineInfo() const { return maLineInfo; } 446 }; 447 448 // --------------------- 449 // - MetaPolygonAction - 450 // --------------------- 451 452 class VCL_DLLPUBLIC MetaPolygonAction : public MetaAction 453 { 454 private: 455 456 Polygon maPoly; 457 458 virtual sal_Bool Compare( const MetaAction& ) const; 459 460 public: 461 DECL_META_ACTION( Polygon, META_POLYGON_ACTION ) 462 463 MetaPolygonAction( const Polygon& rPoly ); 464 465 virtual void Move( long nHorzMove, long nVertMove ); 466 virtual void Scale( double fScaleX, double fScaleY ); 467 468 const Polygon& GetPolygon() const { return maPoly; } 469 }; 470 471 // ------------------------- 472 // - MetaPolyPolygonAction - 473 // ------------------------- 474 475 class VCL_DLLPUBLIC MetaPolyPolygonAction : public MetaAction 476 { 477 private: 478 479 PolyPolygon maPolyPoly; 480 481 virtual sal_Bool Compare( const MetaAction& ) const; 482 483 public: 484 DECL_META_ACTION( PolyPolygon, META_POLYPOLYGON_ACTION ) 485 486 MetaPolyPolygonAction( const PolyPolygon& rPolyPoly ); 487 488 virtual void Move( long nHorzMove, long nVertMove ); 489 virtual void Scale( double fScaleX, double fScaleY ); 490 491 const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; } 492 }; 493 494 // ------------------ 495 // - MetaTextAction - 496 // ------------------ 497 498 class VCL_DLLPUBLIC MetaTextAction : public MetaAction 499 { 500 private: 501 502 Point maPt; 503 XubString maStr; 504 sal_uInt16 mnIndex; 505 sal_uInt16 mnLen; 506 507 virtual sal_Bool Compare( const MetaAction& ) const; 508 509 public: 510 DECL_META_ACTION( Text, META_TEXT_ACTION ) 511 512 MetaTextAction( const Point& rPt, const XubString& rStr, 513 sal_uInt16 nIndex, sal_uInt16 nLen ); 514 515 virtual void Move( long nHorzMove, long nVertMove ); 516 virtual void Scale( double fScaleX, double fScaleY ); 517 518 const Point& GetPoint() const { return maPt; } 519 const XubString& GetText() const { return maStr; } 520 sal_uInt16 GetIndex() const { return mnIndex; } 521 sal_uInt16 GetLen() const { return mnLen; } 522 }; 523 524 // ----------------------- 525 // - MetaTextArrayAction - 526 // ----------------------- 527 528 class VCL_DLLPUBLIC MetaTextArrayAction : public MetaAction 529 { 530 private: 531 532 Point maStartPt; 533 XubString maStr; 534 sal_Int32* mpDXAry; 535 sal_uInt16 mnIndex; 536 sal_uInt16 mnLen; 537 538 virtual sal_Bool Compare( const MetaAction& ) const; 539 540 protected: 541 virtual ~MetaTextArrayAction(); 542 543 public: 544 MetaTextArrayAction(); 545 MetaTextArrayAction( const MetaTextArrayAction& rAction ); 546 MetaTextArrayAction( const Point& rStartPt, 547 const XubString& rStr, 548 const sal_Int32* pDXAry, 549 sal_uInt16 nIndex, 550 sal_uInt16 nLen ); 551 552 virtual void Execute( OutputDevice* pOut ); 553 554 virtual MetaAction* Clone(); 555 556 virtual void Move( long nHorzMove, long nVertMove ); 557 virtual void Scale( double fScaleX, double fScaleY ); 558 559 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ); 560 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ); 561 562 const Point& GetPoint() const { return maStartPt; } 563 const XubString& GetText() const { return maStr; } 564 sal_uInt16 GetIndex() const { return mnIndex; } 565 sal_uInt16 GetLen() const { return mnLen; } 566 sal_Int32* GetDXArray() const { return mpDXAry; } 567 }; 568 569 // ------------------------- 570 // - MetaStretchTextAction - 571 // ------------------------- 572 573 class VCL_DLLPUBLIC MetaStretchTextAction : public MetaAction 574 { 575 private: 576 577 Point maPt; 578 XubString maStr; 579 sal_uInt32 mnWidth; 580 sal_uInt16 mnIndex; 581 sal_uInt16 mnLen; 582 583 virtual sal_Bool Compare( const MetaAction& ) const; 584 585 public: 586 DECL_META_ACTION( StretchText, META_STRETCHTEXT_ACTION ) 587 588 MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth, 589 const XubString& rStr, 590 sal_uInt16 nIndex, sal_uInt16 nLen ); 591 592 virtual void Move( long nHorzMove, long nVertMove ); 593 virtual void Scale( double fScaleX, double fScaleY ); 594 595 const Point& GetPoint() const { return maPt; } 596 const XubString& GetText() const { return maStr; } 597 sal_uInt32 GetWidth() const { return mnWidth; } 598 sal_uInt16 GetIndex() const { return mnIndex; } 599 sal_uInt16 GetLen() const { return mnLen; } 600 }; 601 602 // ---------------------- 603 // - MetaTextRectAction - 604 // ---------------------- 605 606 class VCL_DLLPUBLIC MetaTextRectAction : public MetaAction 607 { 608 private: 609 610 Rectangle maRect; 611 XubString maStr; 612 sal_uInt16 mnStyle; 613 614 virtual sal_Bool Compare( const MetaAction& ) const; 615 616 public: 617 DECL_META_ACTION( TextRect, META_TEXTRECT_ACTION ) 618 619 MetaTextRectAction( const Rectangle& rRect, 620 const XubString& rStr, sal_uInt16 nStyle ); 621 622 virtual void Move( long nHorzMove, long nVertMove ); 623 virtual void Scale( double fScaleX, double fScaleY ); 624 625 const Rectangle& GetRect() const { return maRect; } 626 const XubString& GetText() const { return maStr; } 627 sal_uInt16 GetStyle() const { return mnStyle; } 628 }; 629 630 // ---------------------- 631 // - MetaTextLineAction - 632 // ---------------------- 633 634 class VCL_DLLPUBLIC MetaTextLineAction : public MetaAction 635 { 636 private: 637 638 Point maPos; 639 long mnWidth; 640 FontStrikeout meStrikeout; 641 FontUnderline meUnderline; 642 FontUnderline meOverline; 643 644 virtual sal_Bool Compare( const MetaAction& ) const; 645 646 public: 647 DECL_META_ACTION( TextLine, META_TEXTLINE_ACTION ) 648 649 MetaTextLineAction( const Point& rPos, long nWidth, 650 FontStrikeout eStrikeout, 651 FontUnderline eUnderline, 652 FontUnderline eOverline ); 653 virtual void Move( long nHorzMove, long nVertMove ); 654 virtual void Scale( double fScaleX, double fScaleY ); 655 656 const Point& GetStartPoint() const { return maPos; } 657 long GetWidth() const { return mnWidth; } 658 FontStrikeout GetStrikeout() const { return meStrikeout; } 659 FontUnderline GetUnderline() const { return meUnderline; } 660 FontUnderline GetOverline() const { return meOverline; } 661 }; 662 663 // ----------------- 664 // - MetaBmpAction - 665 // ----------------- 666 667 class VCL_DLLPUBLIC MetaBmpAction : public MetaAction 668 { 669 private: 670 671 Bitmap maBmp; 672 Point maPt; 673 674 virtual sal_Bool Compare( const MetaAction& ) const; 675 676 public: 677 DECL_META_ACTION( Bmp, META_BMP_ACTION ) 678 679 MetaBmpAction( const Point& rPt, const Bitmap& rBmp ); 680 681 virtual void Move( long nHorzMove, long nVertMove ); 682 virtual void Scale( double fScaleX, double fScaleY ); 683 684 const Bitmap& GetBitmap() const { return maBmp; } 685 const Point& GetPoint() const { return maPt; } 686 }; 687 688 // ---------------------- 689 // - MetaBmpScaleAction - 690 // ---------------------- 691 692 class VCL_DLLPUBLIC MetaBmpScaleAction : public MetaAction 693 { 694 private: 695 696 Bitmap maBmp; 697 Point maPt; 698 Size maSz; 699 700 virtual sal_Bool Compare( const MetaAction& ) const; 701 702 public: 703 DECL_META_ACTION( BmpScale, META_BMPSCALE_ACTION ) 704 705 MetaBmpScaleAction( const Point& rPt, const Size& rSz, 706 const Bitmap& rBmp ); 707 708 virtual void Move( long nHorzMove, long nVertMove ); 709 virtual void Scale( double fScaleX, double fScaleY ); 710 711 const Bitmap& GetBitmap() const { return maBmp; } 712 const Point& GetPoint() const { return maPt; } 713 const Size& GetSize() const { return maSz; } 714 }; 715 716 // -------------------------- 717 // - MetaBmpScalePartAction - 718 // -------------------------- 719 720 class VCL_DLLPUBLIC MetaBmpScalePartAction : public MetaAction 721 { 722 private: 723 724 Bitmap maBmp; 725 Point maDstPt; 726 Size maDstSz; 727 Point maSrcPt; 728 Size maSrcSz; 729 730 virtual sal_Bool Compare( const MetaAction& ) const; 731 732 public: 733 DECL_META_ACTION( BmpScalePart, META_BMPSCALEPART_ACTION ) 734 735 MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz, 736 const Point& rSrcPt, const Size& rSrcSz, 737 const Bitmap& rBmp ); 738 739 virtual void Move( long nHorzMove, long nVertMove ); 740 virtual void Scale( double fScaleX, double fScaleY ); 741 742 const Bitmap& GetBitmap() const { return maBmp; } 743 const Point& GetDestPoint() const { return maDstPt; } 744 const Size& GetDestSize() const { return maDstSz; } 745 const Point& GetSrcPoint() const { return maSrcPt; } 746 const Size& GetSrcSize() const { return maSrcSz; } 747 }; 748 749 // ----------------- 750 // - MetaBmpExAction - 751 // ----------------- 752 753 class VCL_DLLPUBLIC MetaBmpExAction : public MetaAction 754 { 755 private: 756 757 BitmapEx maBmpEx; 758 Point maPt; 759 760 virtual sal_Bool Compare( const MetaAction& ) const; 761 762 public: 763 DECL_META_ACTION( BmpEx, META_BMPEX_ACTION ) 764 765 MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx ); 766 767 virtual void Move( long nHorzMove, long nVertMove ); 768 virtual void Scale( double fScaleX, double fScaleY ); 769 770 const BitmapEx& GetBitmapEx() const { return maBmpEx; } 771 const Point& GetPoint() const { return maPt; } 772 }; 773 774 // ---------------------- 775 // - MetaBmpExScaleAction - 776 // ---------------------- 777 778 class VCL_DLLPUBLIC MetaBmpExScaleAction : public MetaAction 779 { 780 private: 781 782 BitmapEx maBmpEx; 783 Point maPt; 784 Size maSz; 785 786 virtual sal_Bool Compare( const MetaAction& ) const; 787 788 public: 789 DECL_META_ACTION( BmpExScale, META_BMPEXSCALE_ACTION ) 790 791 MetaBmpExScaleAction( const Point& rPt, const Size& rSz, 792 const BitmapEx& rBmpEx ) ; 793 794 virtual void Move( long nHorzMove, long nVertMove ); 795 virtual void Scale( double fScaleX, double fScaleY ); 796 797 const BitmapEx& GetBitmapEx() const { return maBmpEx; } 798 const Point& GetPoint() const { return maPt; } 799 const Size& GetSize() const { return maSz; } 800 }; 801 802 // ---------------------------- 803 // - MetaBmpExScalePartAction - 804 // ---------------------------- 805 806 class VCL_DLLPUBLIC MetaBmpExScalePartAction : public MetaAction 807 { 808 private: 809 810 BitmapEx maBmpEx; 811 Point maDstPt; 812 Size maDstSz; 813 Point maSrcPt; 814 Size maSrcSz; 815 816 virtual sal_Bool Compare( const MetaAction& ) const; 817 818 public: 819 DECL_META_ACTION( BmpExScalePart, META_BMPEXSCALEPART_ACTION ) 820 821 MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz, 822 const Point& rSrcPt, const Size& rSrcSz, 823 const BitmapEx& rBmpEx ); 824 825 virtual void Move( long nHorzMove, long nVertMove ); 826 virtual void Scale( double fScaleX, double fScaleY ); 827 828 const BitmapEx& GetBitmapEx() const { return maBmpEx; } 829 const Point& GetDestPoint() const { return maDstPt; } 830 const Size& GetDestSize() const { return maDstSz; } 831 const Point& GetSrcPoint() const { return maSrcPt; } 832 const Size& GetSrcSize() const { return maSrcSz; } 833 }; 834 835 // ------------------ 836 // - MetaMaskAction - 837 // ------------------ 838 839 class VCL_DLLPUBLIC MetaMaskAction : public MetaAction 840 { 841 private: 842 843 Bitmap maBmp; 844 Color maColor; 845 Point maPt; 846 847 virtual sal_Bool Compare( const MetaAction& ) const; 848 849 public: 850 DECL_META_ACTION( Mask, META_MASK_ACTION ) 851 852 MetaMaskAction( const Point& rPt, 853 const Bitmap& rBmp, 854 const Color& rColor ); 855 856 virtual void Move( long nHorzMove, long nVertMove ); 857 virtual void Scale( double fScaleX, double fScaleY ); 858 859 const Bitmap& GetBitmap() const { return maBmp; } 860 const Color& GetColor() const { return maColor; } 861 const Point& GetPoint() const { return maPt; } 862 }; 863 864 // ----------------------- 865 // - MetaMaskScaleAction - 866 // ----------------------- 867 868 class VCL_DLLPUBLIC MetaMaskScaleAction : public MetaAction 869 { 870 private: 871 872 Bitmap maBmp; 873 Color maColor; 874 Point maPt; 875 Size maSz; 876 877 virtual sal_Bool Compare( const MetaAction& ) const; 878 879 public: 880 DECL_META_ACTION( MaskScale, META_MASKSCALE_ACTION ) 881 882 MetaMaskScaleAction( const Point& rPt, const Size& rSz, 883 const Bitmap& rBmp, 884 const Color& rColor ); 885 886 virtual void Move( long nHorzMove, long nVertMove ); 887 virtual void Scale( double fScaleX, double fScaleY ); 888 889 const Bitmap& GetBitmap() const { return maBmp; } 890 const Color& GetColor() const { return maColor; } 891 const Point& GetPoint() const { return maPt; } 892 const Size& GetSize() const { return maSz; } 893 }; 894 895 // --------------------------- 896 // - MetaMaskScalePartAction - 897 // --------------------------- 898 899 class VCL_DLLPUBLIC MetaMaskScalePartAction : public MetaAction 900 { 901 private: 902 903 Bitmap maBmp; 904 Color maColor; 905 Point maDstPt; 906 Size maDstSz; 907 Point maSrcPt; 908 Size maSrcSz; 909 910 virtual sal_Bool Compare( const MetaAction& ) const; 911 912 public: 913 DECL_META_ACTION( MaskScalePart, META_MASKSCALEPART_ACTION ) 914 915 MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz, 916 const Point& rSrcPt, const Size& rSrcSz, 917 const Bitmap& rBmp, 918 const Color& rColor ); 919 920 virtual void Move( long nHorzMove, long nVertMove ); 921 virtual void Scale( double fScaleX, double fScaleY ); 922 923 const Bitmap& GetBitmap() const { return maBmp; } 924 const Color& GetColor() const { return maColor; } 925 const Point& GetDestPoint() const { return maDstPt; } 926 const Size& GetDestSize() const { return maDstSz; } 927 const Point& GetSrcPoint() const { return maSrcPt; } 928 const Size& GetSrcSize() const { return maSrcSz; } 929 }; 930 931 // ---------------------- 932 // - MetaGradientAction - 933 // ---------------------- 934 935 class VCL_DLLPUBLIC MetaGradientAction : public MetaAction 936 { 937 private: 938 939 Rectangle maRect; 940 Gradient maGradient; 941 942 virtual sal_Bool Compare( const MetaAction& ) const; 943 944 public: 945 DECL_META_ACTION( Gradient, META_GRADIENT_ACTION ) 946 947 MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient ); 948 949 virtual void Move( long nHorzMove, long nVertMove ); 950 virtual void Scale( double fScaleX, double fScaleY ); 951 952 const Rectangle& GetRect() const { return maRect; } 953 const Gradient& GetGradient() const { return maGradient; } 954 }; 955 956 // ------------------------ 957 // - MetaGradientExAction - 958 // ------------------------ 959 960 class VCL_DLLPUBLIC MetaGradientExAction : public MetaAction 961 { 962 private: 963 964 PolyPolygon maPolyPoly; 965 Gradient maGradient; 966 967 virtual sal_Bool Compare( const MetaAction& ) const; 968 969 public: 970 DECL_META_ACTION( GradientEx, META_GRADIENTEX_ACTION ) 971 972 MetaGradientExAction( const PolyPolygon& rPolyPoly, const Gradient& rGradient ); 973 974 virtual void Move( long nHorzMove, long nVertMove ); 975 virtual void Scale( double fScaleX, double fScaleY ); 976 977 const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; } 978 const Gradient& GetGradient() const { return maGradient; } 979 }; 980 981 // ------------------- 982 // - MetaHatchAction - 983 // ------------------- 984 985 class VCL_DLLPUBLIC MetaHatchAction : public MetaAction 986 { 987 private: 988 989 PolyPolygon maPolyPoly; 990 Hatch maHatch; 991 992 virtual sal_Bool Compare( const MetaAction& ) const; 993 994 public: 995 DECL_META_ACTION( Hatch, META_HATCH_ACTION ) 996 997 MetaHatchAction( const PolyPolygon& rPolyPoly, const Hatch& rHatch ); 998 999 virtual void Move( long nHorzMove, long nVertMove ); 1000 virtual void Scale( double fScaleX, double fScaleY ); 1001 1002 const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; } 1003 const Hatch& GetHatch() const { return maHatch; } 1004 }; 1005 1006 // ----------------------- 1007 // - MetaWallpaperAction - 1008 // ----------------------- 1009 1010 class VCL_DLLPUBLIC MetaWallpaperAction : public MetaAction 1011 { 1012 private: 1013 1014 Rectangle maRect; 1015 Wallpaper maWallpaper; 1016 1017 virtual sal_Bool Compare( const MetaAction& ) const; 1018 1019 public: 1020 DECL_META_ACTION( Wallpaper, META_WALLPAPER_ACTION ) 1021 1022 MetaWallpaperAction( const Rectangle& rRect, 1023 const Wallpaper& rPaper ); 1024 1025 virtual void Move( long nHorzMove, long nVertMove ); 1026 virtual void Scale( double fScaleX, double fScaleY ); 1027 1028 const Rectangle& GetRect() const { return maRect; } 1029 const Wallpaper& GetWallpaper() const { return maWallpaper; } 1030 }; 1031 1032 // ------------------------ 1033 // - MetaClipRegionAction - 1034 // ------------------------ 1035 1036 class VCL_DLLPUBLIC MetaClipRegionAction : public MetaAction 1037 { 1038 private: 1039 1040 Region maRegion; 1041 sal_Bool mbClip; 1042 1043 virtual sal_Bool Compare( const MetaAction& ) const; 1044 1045 public: 1046 DECL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION ) 1047 1048 MetaClipRegionAction( const Region& rRegion, sal_Bool bClip ); 1049 1050 virtual void Move( long nHorzMove, long nVertMove ); 1051 virtual void Scale( double fScaleX, double fScaleY ); 1052 1053 const Region& GetRegion() const { return maRegion; } 1054 sal_Bool IsClipping() const { return mbClip; } 1055 }; 1056 1057 // --------------------------------- 1058 // - MetaISectRectClipRegionAction - 1059 // --------------------------------- 1060 1061 class VCL_DLLPUBLIC MetaISectRectClipRegionAction : public MetaAction 1062 { 1063 private: 1064 1065 Rectangle maRect; 1066 1067 virtual sal_Bool Compare( const MetaAction& ) const; 1068 1069 public: 1070 DECL_META_ACTION( ISectRectClipRegion, META_ISECTRECTCLIPREGION_ACTION ) 1071 1072 MetaISectRectClipRegionAction( const Rectangle& rRect ); 1073 1074 virtual void Move( long nHorzMove, long nVertMove ); 1075 virtual void Scale( double fScaleX, double fScaleY ); 1076 1077 const Rectangle& GetRect() const { return maRect; } 1078 }; 1079 1080 // ----------------------------------- 1081 // - MetaISectRegionClipRegionAction - 1082 // ----------------------------------- 1083 1084 class VCL_DLLPUBLIC MetaISectRegionClipRegionAction : public MetaAction 1085 { 1086 private: 1087 1088 Region maRegion; 1089 1090 virtual sal_Bool Compare( const MetaAction& ) const; 1091 1092 public: 1093 DECL_META_ACTION( ISectRegionClipRegion, META_ISECTREGIONCLIPREGION_ACTION ) 1094 1095 MetaISectRegionClipRegionAction( const Region& rRegion ); 1096 1097 virtual void Move( long nHorzMove, long nVertMove ); 1098 virtual void Scale( double fScaleX, double fScaleY ); 1099 1100 const Region& GetRegion() const { return maRegion; } 1101 }; 1102 1103 // ---------------------------- 1104 // - MetaMoveClipRegionAction - 1105 // ---------------------------- 1106 1107 class VCL_DLLPUBLIC MetaMoveClipRegionAction : public MetaAction 1108 { 1109 private: 1110 1111 long mnHorzMove; 1112 long mnVertMove; 1113 1114 virtual sal_Bool Compare( const MetaAction& ) const; 1115 1116 public: 1117 DECL_META_ACTION( MoveClipRegion, META_MOVECLIPREGION_ACTION ) 1118 1119 MetaMoveClipRegionAction( long nHorzMove, long nVertMove ); 1120 1121 virtual void Scale( double fScaleX, double fScaleY ); 1122 1123 long GetHorzMove() const { return mnHorzMove; } 1124 long GetVertMove() const { return mnVertMove; } 1125 }; 1126 1127 // ----------------------- 1128 // - MetaLineColorAction - 1129 // ----------------------- 1130 1131 class VCL_DLLPUBLIC MetaLineColorAction : public MetaAction 1132 { 1133 private: 1134 1135 Color maColor; 1136 sal_Bool mbSet; 1137 1138 virtual sal_Bool Compare( const MetaAction& ) const; 1139 1140 public: 1141 DECL_META_ACTION( LineColor, META_LINECOLOR_ACTION ) 1142 1143 MetaLineColorAction( const Color& rColor, sal_Bool bSet ); 1144 1145 const Color& GetColor() const { return maColor; } 1146 sal_Bool IsSetting() const { return mbSet; } 1147 }; 1148 1149 // ----------------------- 1150 // - MetaFillColorAction - 1151 // ----------------------- 1152 1153 class VCL_DLLPUBLIC MetaFillColorAction : public MetaAction 1154 { 1155 private: 1156 1157 Color maColor; 1158 sal_Bool mbSet; 1159 1160 virtual sal_Bool Compare( const MetaAction& ) const; 1161 1162 public: 1163 DECL_META_ACTION( FillColor, META_FILLCOLOR_ACTION ) 1164 1165 MetaFillColorAction( const Color& rColor, sal_Bool bSet ); 1166 1167 const Color& GetColor() const { return maColor; } 1168 sal_Bool IsSetting() const { return mbSet; } 1169 }; 1170 1171 // ----------------------- 1172 // - MetaTextColorAction - 1173 // ----------------------- 1174 1175 class VCL_DLLPUBLIC MetaTextColorAction : public MetaAction 1176 { 1177 private: 1178 1179 Color maColor; 1180 1181 virtual sal_Bool Compare( const MetaAction& ) const; 1182 1183 public: 1184 DECL_META_ACTION( TextColor, META_TEXTCOLOR_ACTION ) 1185 1186 MetaTextColorAction( const Color& rColor ); 1187 1188 const Color& GetColor() const { return maColor; } 1189 }; 1190 1191 // --------------------------- 1192 // - MetaTextFillColorAction - 1193 // --------------------------- 1194 1195 class VCL_DLLPUBLIC MetaTextFillColorAction : public MetaAction 1196 { 1197 private: 1198 1199 Color maColor; 1200 sal_Bool mbSet; 1201 1202 virtual sal_Bool Compare( const MetaAction& ) const; 1203 1204 public: 1205 DECL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION ) 1206 1207 MetaTextFillColorAction( const Color& rColor, sal_Bool bSet ); 1208 1209 const Color& GetColor() const { return maColor; } 1210 sal_Bool IsSetting() const { return mbSet; } 1211 }; 1212 1213 // --------------------------- 1214 // - MetaTextLineColorAction - 1215 // --------------------------- 1216 1217 class VCL_DLLPUBLIC MetaTextLineColorAction : public MetaAction 1218 { 1219 private: 1220 1221 Color maColor; 1222 sal_Bool mbSet; 1223 1224 virtual sal_Bool Compare( const MetaAction& ) const; 1225 1226 public: 1227 DECL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION ) 1228 1229 MetaTextLineColorAction( const Color& rColor, sal_Bool bSet ); 1230 1231 const Color& GetColor() const { return maColor; } 1232 sal_Bool IsSetting() const { return mbSet; } 1233 }; 1234 1235 // --------------------------- 1236 // - MetaOverlineColorAction - 1237 // --------------------------- 1238 1239 class VCL_DLLPUBLIC MetaOverlineColorAction : public MetaAction 1240 { 1241 private: 1242 1243 Color maColor; 1244 sal_Bool mbSet; 1245 1246 virtual sal_Bool Compare( const MetaAction& ) const; 1247 1248 public: 1249 DECL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION ) 1250 1251 MetaOverlineColorAction( const Color& rColor, sal_Bool bSet ); 1252 1253 const Color& GetColor() const { return maColor; } 1254 sal_Bool IsSetting() const { return mbSet; } 1255 }; 1256 1257 // ----------------------- 1258 // - MetaTextAlignAction - 1259 // ----------------------- 1260 1261 class VCL_DLLPUBLIC MetaTextAlignAction : public MetaAction 1262 { 1263 private: 1264 1265 TextAlign maAlign; 1266 1267 virtual sal_Bool Compare( const MetaAction& ) const; 1268 1269 public: 1270 DECL_META_ACTION( TextAlign, META_TEXTALIGN_ACTION ) 1271 1272 MetaTextAlignAction( TextAlign aAlign ); 1273 1274 TextAlign GetTextAlign() const { return maAlign; } 1275 }; 1276 1277 // --------------------- 1278 // - MetaMapModeAction - 1279 // --------------------- 1280 1281 class VCL_DLLPUBLIC MetaMapModeAction : public MetaAction 1282 { 1283 private: 1284 1285 MapMode maMapMode; 1286 1287 virtual sal_Bool Compare( const MetaAction& ) const; 1288 1289 public: 1290 DECL_META_ACTION( MapMode, META_MAPMODE_ACTION ) 1291 1292 MetaMapModeAction( const MapMode& rMapMode ); 1293 1294 virtual void Scale( double fScaleX, double fScaleY ); 1295 1296 const MapMode& GetMapMode() const { return maMapMode; } 1297 }; 1298 1299 // --------------------- 1300 // - MetaFontAction - 1301 // --------------------- 1302 1303 class VCL_DLLPUBLIC MetaFontAction : public MetaAction 1304 { 1305 private: 1306 1307 Font maFont; 1308 1309 virtual sal_Bool Compare( const MetaAction& ) const; 1310 1311 public: 1312 DECL_META_ACTION( Font, META_FONT_ACTION ) 1313 1314 MetaFontAction( const Font& rFont ); 1315 1316 virtual void Scale( double fScaleX, double fScaleY ); 1317 1318 const Font& GetFont() const { return maFont; } 1319 }; 1320 1321 // ------------------ 1322 // - MetaPushAction - 1323 // ------------------ 1324 1325 class VCL_DLLPUBLIC MetaPushAction : public MetaAction 1326 { 1327 private: 1328 1329 sal_uInt16 mnFlags; 1330 1331 virtual sal_Bool Compare( const MetaAction& ) const; 1332 1333 public: 1334 DECL_META_ACTION( Push, META_PUSH_ACTION ) 1335 1336 MetaPushAction( sal_uInt16 nFlags ); 1337 1338 sal_uInt16 GetFlags() const { return mnFlags; } 1339 }; 1340 1341 // ----------------- 1342 // - MetaPopAction - 1343 // ----------------- 1344 1345 class VCL_DLLPUBLIC MetaPopAction : public MetaAction 1346 { 1347 public: 1348 1349 DECL_META_ACTION( Pop, META_POP_ACTION ) 1350 }; 1351 1352 // ---------------------- 1353 // - MetaRasterOpAction - 1354 // ---------------------- 1355 1356 class VCL_DLLPUBLIC MetaRasterOpAction : public MetaAction 1357 { 1358 private: 1359 1360 RasterOp meRasterOp; 1361 1362 virtual sal_Bool Compare( const MetaAction& ) const; 1363 1364 public: 1365 DECL_META_ACTION( RasterOp, META_RASTEROP_ACTION ) 1366 1367 MetaRasterOpAction( RasterOp eRasterOp ); 1368 1369 RasterOp GetRasterOp() const { return meRasterOp; } 1370 }; 1371 1372 // ------------------------- 1373 // - MetaTransparentAction - 1374 // ------------------------- 1375 1376 class VCL_DLLPUBLIC MetaTransparentAction : public MetaAction 1377 { 1378 private: 1379 1380 PolyPolygon maPolyPoly; 1381 sal_uInt16 mnTransPercent; 1382 1383 virtual sal_Bool Compare( const MetaAction& ) const; 1384 1385 public: 1386 DECL_META_ACTION( Transparent, META_TRANSPARENT_ACTION ) 1387 1388 MetaTransparentAction( const PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ); 1389 1390 virtual void Move( long nHorzMove, long nVertMove ); 1391 virtual void Scale( double fScaleX, double fScaleY ); 1392 1393 const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; } 1394 sal_uInt16 GetTransparence() const { return mnTransPercent; } 1395 }; 1396 1397 // ------------------------------ 1398 // - MetaFloatTransparentAction - 1399 // ------------------------------ 1400 1401 class VCL_DLLPUBLIC MetaFloatTransparentAction : public MetaAction 1402 { 1403 private: 1404 1405 GDIMetaFile maMtf; 1406 Point maPoint; 1407 Size maSize; 1408 Gradient maGradient; 1409 1410 virtual sal_Bool Compare( const MetaAction& ) const; 1411 1412 public: 1413 DECL_META_ACTION( FloatTransparent, META_FLOATTRANSPARENT_ACTION ) 1414 1415 MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos, 1416 const Size& rSize, const Gradient& rGradient ); 1417 1418 virtual void Move( long nHorzMove, long nVertMove ); 1419 virtual void Scale( double fScaleX, double fScaleY ); 1420 1421 const GDIMetaFile& GetGDIMetaFile() const { return maMtf; } 1422 const Point& GetPoint() const { return maPoint; } 1423 const Size& GetSize() const { return maSize; } 1424 const Gradient& GetGradient() const { return maGradient; } 1425 }; 1426 1427 // --------------------- 1428 // - MetaDrawEPSAction - 1429 // --------------------- 1430 1431 class VCL_DLLPUBLIC MetaEPSAction : public MetaAction 1432 { 1433 private: 1434 1435 GfxLink maGfxLink; 1436 GDIMetaFile maSubst; 1437 Point maPoint; 1438 Size maSize; 1439 1440 virtual sal_Bool Compare( const MetaAction& ) const; 1441 1442 public: 1443 DECL_META_ACTION( EPS, META_EPS_ACTION ) 1444 1445 MetaEPSAction( const Point& rPoint, const Size& rSize, 1446 const GfxLink& rGfxLink, const GDIMetaFile& rSubst ); 1447 1448 virtual void Move( long nHorzMove, long nVertMove ); 1449 virtual void Scale( double fScaleX, double fScaleY ); 1450 1451 const GfxLink& GetLink() const { return maGfxLink; } 1452 const GDIMetaFile& GetSubstitute() const { return maSubst; } 1453 const Point& GetPoint() const { return maPoint; } 1454 const Size& GetSize() const { return maSize; } 1455 }; 1456 1457 // ---------------------- 1458 // - MetaRefPointAction - 1459 // ---------------------- 1460 1461 class VCL_DLLPUBLIC MetaRefPointAction : public MetaAction 1462 { 1463 private: 1464 1465 Point maRefPoint; 1466 sal_Bool mbSet; 1467 1468 virtual sal_Bool Compare( const MetaAction& ) const; 1469 1470 public: 1471 DECL_META_ACTION( RefPoint, META_REFPOINT_ACTION ) 1472 1473 MetaRefPointAction( const Point& rRefPoint, sal_Bool bSet ); 1474 1475 const Point& GetRefPoint() const { return maRefPoint; } 1476 sal_Bool IsSetting() const { return mbSet; } 1477 }; 1478 1479 // --------------------- 1480 // - MetaCommentAction - 1481 // --------------------- 1482 1483 class VCL_DLLPUBLIC MetaCommentAction : public MetaAction 1484 { 1485 private: 1486 1487 ByteString maComment; 1488 sal_Int32 mnValue; 1489 sal_uInt32 mnDataSize; 1490 sal_uInt8* mpData; 1491 1492 SAL_DLLPRIVATE void ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize ); 1493 virtual sal_Bool Compare( const MetaAction& ) const; 1494 1495 protected: 1496 ~MetaCommentAction(); 1497 1498 public: 1499 MetaCommentAction( sal_Int32 nValue = 0L ); 1500 MetaCommentAction( const MetaCommentAction& rAct ); 1501 MetaCommentAction( const ByteString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = NULL, sal_uInt32 nDataSize = 0UL ); 1502 MetaCommentAction( const sal_uInt8* pData, sal_uInt32 nDataSize ); 1503 1504 virtual void Move( long nHorzMove, long nVertMove ); 1505 virtual void Scale( double fScaleX, double fScaleY ); 1506 1507 virtual void Execute( OutputDevice* pOut ); 1508 virtual MetaAction* Clone(); 1509 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ); 1510 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ); 1511 1512 const ByteString& GetComment() const { return maComment; } 1513 sal_Int32 GetValue() const { return mnValue; } 1514 sal_uInt32 GetDataSize() const { return mnDataSize; } 1515 const sal_uInt8* GetData() const { return mpData; } 1516 }; 1517 1518 // ------------------------ 1519 // - MetaLayoutModeAction - 1520 // ------------------------ 1521 1522 class VCL_DLLPUBLIC MetaLayoutModeAction : public MetaAction 1523 { 1524 private: 1525 1526 sal_uInt32 mnLayoutMode; 1527 virtual sal_Bool Compare( const MetaAction& ) const; 1528 1529 public: 1530 DECL_META_ACTION( LayoutMode, META_LAYOUTMODE_ACTION ) 1531 1532 MetaLayoutModeAction( sal_uInt32 nLayoutMode ); 1533 1534 sal_uInt32 GetLayoutMode() const { return mnLayoutMode; } 1535 }; 1536 1537 // ------------------------ 1538 // - MetaTextLanguageAction - 1539 // ------------------------ 1540 1541 class VCL_DLLPUBLIC MetaTextLanguageAction : public MetaAction 1542 { 1543 private: 1544 1545 LanguageType meTextLanguage; 1546 virtual sal_Bool Compare( const MetaAction& ) const; 1547 1548 public: 1549 DECL_META_ACTION( TextLanguage, META_TEXTLANGUAGE_ACTION ) 1550 1551 MetaTextLanguageAction( LanguageType ); 1552 1553 LanguageType GetTextLanguage() const { return meTextLanguage; } 1554 }; 1555 1556 // --------------------------- 1557 // - MetaRenderGraphicAction - 1558 // --------------------------- 1559 1560 class VCL_DLLPUBLIC MetaRenderGraphicAction : public MetaAction 1561 { 1562 private: 1563 1564 ::vcl::RenderGraphic maRenderGraphic; 1565 Point maPoint; 1566 Size maSize; 1567 double mfRotateAngle; 1568 double mfShearAngleX; 1569 double mfShearAngleY; 1570 1571 virtual sal_Bool Compare( const MetaAction& ) const; 1572 1573 public: 1574 DECL_META_ACTION( RenderGraphic, META_RENDERGRAPHIC_ACTION ) 1575 1576 MetaRenderGraphicAction( const Point& rPoint, const Size& rSize, 1577 const vcl::RenderGraphic& rRenderData, 1578 double fRotateAngle = 0.0, 1579 double fShearAngleX = 0.0, 1580 double fShearAngleY = 0.0 ); 1581 1582 virtual void Move( long nHorzMove, long nVertMove ); 1583 virtual void Scale( double fScaleX, double fScaleY ); 1584 1585 const ::vcl::RenderGraphic& GetRenderGraphic() const { return maRenderGraphic; } 1586 const Point& GetPoint() const { return maPoint; } 1587 const Size& GetSize() const { return maSize; } 1588 double GetRotateAngle() const { return mfRotateAngle; } 1589 double GetShearAngleX() const { return mfShearAngleX; } 1590 double GetShearAngleY() const { return mfShearAngleY; } 1591 }; 1592 1593 #endif // _SV_METAACT_HXX 1594