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 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_svx.hxx" 26 27 // include --------------------------------------------------------------- 28 29 30 #include <com/sun/star/drawing/LineJoint.hpp> 31 #include <com/sun/star/drawing/LineCap.hpp> 32 #include <com/sun/star/uno/Any.hxx> 33 34 #include <svx/dialogs.hrc> 35 #include "svx/xattr.hxx" 36 #include <svx/xtable.hxx> 37 #include <svx/dialmgr.hxx> 38 #include <editeng/itemtype.hxx> 39 #include <svx/xdef.hxx> 40 #include <svx/AffineMatrixItem.hxx> 41 42 #define GLOBALOVERFLOW 43 44 /************************************************************************/ 45 46 //------------------------------ 47 // class XLineTransparenceItem 48 //------------------------------ 49 TYPEINIT1_AUTOFACTORY(XLineTransparenceItem, SfxUInt16Item); 50 51 /************************************************************************* 52 |* 53 |* XLineTransparenceItem::XLineTransparenceItem(sal_uInt16) 54 |* 55 |* Beschreibung 56 |* Ersterstellung 07.11.95 KA 57 |* Letzte Aenderung 07.11.95 KA 58 |* 59 *************************************************************************/ 60 61 XLineTransparenceItem::XLineTransparenceItem(sal_uInt16 nLineTransparence) : 62 SfxUInt16Item(XATTR_LINETRANSPARENCE, nLineTransparence) 63 { 64 } 65 66 /************************************************************************* 67 |* 68 |* XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn) 69 |* 70 |* Beschreibung 71 |* Ersterstellung 07.11.95 KA 72 |* Letzte Aenderung 07.11.95 KA 73 |* 74 *************************************************************************/ 75 76 XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn) : 77 SfxUInt16Item(XATTR_LINETRANSPARENCE, rIn) 78 { 79 } 80 81 /************************************************************************* 82 |* 83 |* XLineTransparenceItem::Clone(SfxItemPool* pPool) const 84 |* 85 |* Beschreibung 86 |* Ersterstellung 07.11.95 KA 87 |* Letzte Aenderung 07.11.95 KA 88 |* 89 *************************************************************************/ 90 91 SfxPoolItem* XLineTransparenceItem::Clone(SfxItemPool* /*pPool*/) const 92 { 93 return new XLineTransparenceItem(*this); 94 } 95 96 /************************************************************************* 97 |* 98 |* SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, sal_uInt16 nVer) const 99 |* 100 |* Beschreibung 101 |* Ersterstellung 07.11.95 KA 102 |* Letzte Aenderung 07.11.95 KA 103 |* 104 *************************************************************************/ 105 106 SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 107 { 108 return new XLineTransparenceItem(rIn); 109 } 110 111 //------------------------------------------------------------------------ 112 113 SfxItemPresentation XLineTransparenceItem::GetPresentation 114 ( 115 SfxItemPresentation ePres, 116 SfxMapUnit /*eCoreUnit*/, 117 SfxMapUnit /*ePresUnit*/, 118 XubString& rText, const IntlWrapper * 119 ) const 120 { 121 rText.Erase(); 122 123 switch ( ePres ) 124 { 125 case SFX_ITEM_PRESENTATION_NONE: 126 return ePres; 127 case SFX_ITEM_PRESENTATION_COMPLETE: 128 rText = XubString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ); 129 rText.AppendAscii(": "); 130 case SFX_ITEM_PRESENTATION_NAMELESS: 131 rText += XubString( UniString::CreateFromInt32((sal_uInt16) GetValue()) ); 132 rText += sal_Unicode('%'); 133 return ePres; 134 default: 135 return SFX_ITEM_PRESENTATION_NONE; 136 } 137 } 138 139 //----------------------- 140 // class XLineJointItem - 141 //----------------------- 142 143 TYPEINIT1_AUTOFACTORY(XLineJointItem, SfxEnumItem); 144 145 // ----------------------------------------------------------------------------- 146 147 XLineJointItem::XLineJointItem( com::sun::star::drawing::LineJoint eLineJoint ) : 148 SfxEnumItem(XATTR_LINEJOINT, sal::static_int_cast< sal_uInt16 >(eLineJoint)) 149 { 150 } 151 152 // ----------------------------------------------------------------------------- 153 154 XLineJointItem::XLineJointItem( SvStream& rIn ) : 155 SfxEnumItem( XATTR_LINEJOINT, rIn ) 156 { 157 } 158 159 // ----------------------------------------------------------------------------- 160 161 sal_uInt16 XLineJointItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const 162 { 163 return 1; 164 } 165 166 // ----------------------------------------------------------------------------- 167 168 SfxPoolItem* XLineJointItem::Create( SvStream& rIn, sal_uInt16 nVer ) const 169 { 170 XLineJointItem* pRet = new XLineJointItem( rIn ); 171 172 if(nVer < 1) 173 pRet->SetValue(com::sun::star::drawing::LineJoint_ROUND); 174 175 return pRet; 176 } 177 178 // ----------------------------------------------------------------------------- 179 180 SfxPoolItem* XLineJointItem::Clone(SfxItemPool* /*pPool*/) const 181 { 182 return new XLineJointItem( *this ); 183 } 184 185 // ----------------------------------------------------------------------------- 186 187 SfxItemPresentation XLineJointItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, 188 SfxMapUnit /*ePresUnit*/, XubString& rText, const IntlWrapper*) const 189 { 190 rText.Erase(); 191 192 switch( ePres ) 193 { 194 case SFX_ITEM_PRESENTATION_NONE: return ePres; 195 196 case SFX_ITEM_PRESENTATION_COMPLETE: 197 case SFX_ITEM_PRESENTATION_NAMELESS: 198 { 199 sal_uInt16 nId = 0; 200 201 switch( GetValue() ) 202 { 203 case( com::sun::star::drawing::LineJoint_NONE ): 204 nId = RID_SVXSTR_LINEJOINT_NONE; 205 break; 206 207 case( com::sun::star::drawing::LineJoint_MIDDLE ): 208 nId = RID_SVXSTR_LINEJOINT_MIDDLE; 209 break; 210 211 212 case( com::sun::star::drawing::LineJoint_BEVEL ): 213 nId = RID_SVXSTR_LINEJOINT_BEVEL; 214 break; 215 216 217 case( com::sun::star::drawing::LineJoint_MITER ): 218 nId = RID_SVXSTR_LINEJOINT_MITER; 219 break; 220 221 222 case( com::sun::star::drawing::LineJoint_ROUND ): 223 nId = RID_SVXSTR_LINEJOINT_ROUND; 224 break; 225 226 // Not handled? 227 case( com::sun::star::drawing::LineJoint_MAKE_FIXED_SIZE ): 228 break; 229 } 230 231 if( nId ) 232 rText = SVX_RESSTR( nId ); 233 234 return ePres; 235 } 236 default: 237 return SFX_ITEM_PRESENTATION_NONE; 238 } 239 } 240 241 // ----------------------------------------------------------------------------- 242 243 sal_Bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const 244 { 245 const ::com::sun::star::drawing::LineJoint eJoint = GetValue(); 246 rVal <<= eJoint; 247 return sal_True; 248 } 249 250 // ----------------------------------------------------------------------------- 251 252 sal_Bool XLineJointItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) 253 { 254 ::com::sun::star::drawing::LineJoint eUnoJoint; 255 256 if(!(rVal >>= eUnoJoint)) 257 { 258 // also try an int (for Basic) 259 sal_Int32 nLJ = 0; 260 if(!(rVal >>= nLJ)) 261 return sal_False; 262 eUnoJoint = (::com::sun::star::drawing::LineJoint)nLJ; 263 } 264 265 SetValue( sal::static_int_cast< sal_uInt16 >( eUnoJoint ) ); 266 267 return sal_True; 268 } 269 270 // ----------------------------------------------------------------------------- 271 272 sal_uInt16 XLineJointItem::GetValueCount() const 273 { 274 // don't forget to update the api interface also 275 return 5; 276 } 277 278 //--------------------- 279 // class AffineMatrixItem 280 //--------------------- 281 282 TYPEINIT1_AUTOFACTORY(AffineMatrixItem, SfxPoolItem); 283 284 AffineMatrixItem::AffineMatrixItem(const com::sun::star::geometry::AffineMatrix2D* pMatrix) 285 : SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX) 286 { 287 if(pMatrix) 288 { 289 maMatrix = *pMatrix; 290 } 291 else 292 { 293 maMatrix.m00 = 1.0; 294 maMatrix.m01 = 0.0; 295 maMatrix.m02 = 0.0; 296 maMatrix.m10 = 0.0; 297 maMatrix.m11 = 1.0; 298 maMatrix.m12 = 0.0; 299 } 300 } 301 302 AffineMatrixItem::AffineMatrixItem(SvStream& rIn) 303 : SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX) 304 { 305 rIn >> maMatrix.m00; 306 rIn >> maMatrix.m01; 307 rIn >> maMatrix.m02; 308 rIn >> maMatrix.m10; 309 rIn >> maMatrix.m11; 310 rIn >> maMatrix.m12; 311 } 312 313 AffineMatrixItem::AffineMatrixItem(const AffineMatrixItem& rRef) 314 : SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX) 315 { 316 maMatrix = rRef.maMatrix; 317 } 318 319 AffineMatrixItem::~AffineMatrixItem() 320 { 321 } 322 323 int AffineMatrixItem::operator==(const SfxPoolItem& rRef) const 324 { 325 if(!SfxPoolItem::operator==(rRef)) 326 { 327 return 0; 328 } 329 330 const AffineMatrixItem* pRef = dynamic_cast< const AffineMatrixItem* >(&rRef); 331 332 if(!pRef) 333 { 334 return 0; 335 } 336 337 return (maMatrix.m00 == pRef->maMatrix.m00 338 && maMatrix.m01 == pRef->maMatrix.m01 339 && maMatrix.m02 == pRef->maMatrix.m02 340 && maMatrix.m10 == pRef->maMatrix.m10 341 && maMatrix.m11 == pRef->maMatrix.m11 342 && maMatrix.m12 == pRef->maMatrix.m12); 343 } 344 345 SfxPoolItem* AffineMatrixItem::Clone( SfxItemPool* /*pPool*/ ) const 346 { 347 return new AffineMatrixItem(*this); 348 } 349 350 SfxPoolItem* AffineMatrixItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/ ) const 351 { 352 return new AffineMatrixItem(rIn); 353 } 354 355 SvStream& AffineMatrixItem::Store(SvStream &rStream, sal_uInt16 /*nItemVersion*/ ) const 356 { 357 rStream << maMatrix.m00; 358 rStream << maMatrix.m01; 359 rStream << maMatrix.m02; 360 rStream << maMatrix.m10; 361 rStream << maMatrix.m11; 362 rStream << maMatrix.m12; 363 return rStream; 364 } 365 366 sal_Bool AffineMatrixItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberId */ ) const 367 { 368 rVal <<= maMatrix; 369 return sal_True; 370 } 371 372 sal_Bool AffineMatrixItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberId */ ) 373 { 374 if (rVal >>= maMatrix) 375 { 376 return sal_True; 377 } 378 379 DBG_ERROR( "AffineMatrixItem::PutValue - Wrong type!" ); 380 return sal_False; 381 } 382 383 const com::sun::star::geometry::AffineMatrix2D& AffineMatrixItem::GetAffineMatrix2D() const 384 { 385 return maMatrix; 386 } 387 388 //----------------------- 389 // class XLineCapItem - 390 //----------------------- 391 392 TYPEINIT1_AUTOFACTORY(XLineCapItem, SfxEnumItem); 393 394 // ----------------------------------------------------------------------------- 395 396 XLineCapItem::XLineCapItem(com::sun::star::drawing::LineCap eLineCap) 397 : SfxEnumItem(XATTR_LINECAP, sal::static_int_cast< sal_uInt16 >(eLineCap)) 398 { 399 } 400 401 // ----------------------------------------------------------------------------- 402 403 XLineCapItem::XLineCapItem( SvStream& rIn ) 404 : SfxEnumItem(XATTR_LINECAP, rIn) 405 { 406 } 407 408 // ----------------------------------------------------------------------------- 409 410 sal_uInt16 XLineCapItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const 411 { 412 return 1; 413 } 414 415 // ----------------------------------------------------------------------------- 416 417 SfxPoolItem* XLineCapItem::Create( SvStream& rIn, sal_uInt16 nVer ) const 418 { 419 XLineCapItem* pRet = new XLineCapItem( rIn ); 420 421 if(nVer < 1) 422 pRet->SetValue(com::sun::star::drawing::LineCap_BUTT); 423 424 return pRet; 425 } 426 427 // ----------------------------------------------------------------------------- 428 429 SfxPoolItem* XLineCapItem::Clone(SfxItemPool* /*pPool*/) const 430 { 431 return new XLineCapItem( *this ); 432 } 433 434 // ----------------------------------------------------------------------------- 435 436 SfxItemPresentation XLineCapItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, 437 SfxMapUnit /*ePresUnit*/, XubString& rText, const IntlWrapper*) const 438 { 439 rText.Erase(); 440 441 switch( ePres ) 442 { 443 case SFX_ITEM_PRESENTATION_NONE: return ePres; 444 445 case SFX_ITEM_PRESENTATION_COMPLETE: 446 case SFX_ITEM_PRESENTATION_NAMELESS: 447 { 448 sal_uInt16 nId = 0; 449 450 switch( GetValue() ) 451 { 452 default: /*com::sun::star::drawing::LineCap_BUTT*/ 453 nId = RID_SVXSTR_LINECAP_BUTT; 454 break; 455 456 case(com::sun::star::drawing::LineCap_ROUND): 457 nId = RID_SVXSTR_LINECAP_ROUND; 458 break; 459 460 case(com::sun::star::drawing::LineCap_SQUARE): 461 nId = RID_SVXSTR_LINECAP_SQUARE; 462 break; 463 } 464 465 if( nId ) 466 rText = SVX_RESSTR( nId ); 467 468 return ePres; 469 } 470 default: 471 return SFX_ITEM_PRESENTATION_NONE; 472 } 473 } 474 475 // ----------------------------------------------------------------------------- 476 477 sal_Bool XLineCapItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const 478 { 479 const com::sun::star::drawing::LineCap eCap(GetValue()); 480 rVal <<= eCap; 481 return true; 482 } 483 484 // ----------------------------------------------------------------------------- 485 486 sal_Bool XLineCapItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) 487 { 488 com::sun::star::drawing::LineCap eUnoCap; 489 490 if(!(rVal >>= eUnoCap)) 491 { 492 // also try an int (for Basic) 493 sal_Int32 nLJ(0); 494 495 if(!(rVal >>= nLJ)) 496 { 497 return false; 498 } 499 500 eUnoCap = (com::sun::star::drawing::LineCap)nLJ; 501 } 502 503 OSL_ENSURE(com::sun::star::drawing::LineCap_BUTT == eUnoCap 504 || com::sun::star::drawing::LineCap_ROUND == eUnoCap 505 || com::sun::star::drawing::LineCap_SQUARE == eUnoCap, "Unknown enum value in XATTR_LINECAP (!)"); 506 507 SetValue(sal::static_int_cast< sal_uInt16 >(eUnoCap)); 508 509 return true; 510 } 511 512 // ----------------------------------------------------------------------------- 513 514 sal_uInt16 XLineCapItem::GetValueCount() const 515 { 516 // don't forget to update the api interface also 517 return 3; 518 } 519 520 // ----------------------------------------------------------------------------- 521 522 com::sun::star::drawing::LineCap XLineCapItem::GetValue() const 523 { 524 const com::sun::star::drawing::LineCap eRetval((com::sun::star::drawing::LineCap)SfxEnumItem::GetValue()); 525 OSL_ENSURE(com::sun::star::drawing::LineCap_BUTT == eRetval 526 || com::sun::star::drawing::LineCap_ROUND == eRetval 527 || com::sun::star::drawing::LineCap_SQUARE == eRetval, "Unknown enum value in XATTR_LINECAP (!)"); 528 529 return eRetval; 530 } 531 532 //------------------------------ 533 // class XFillTransparenceItem 534 //------------------------------ 535 TYPEINIT1_AUTOFACTORY(XFillTransparenceItem, SfxUInt16Item); 536 537 /************************************************************************* 538 |* 539 |* XFillTransparenceItem::XFillTransparenceItem(sal_uInt16) 540 |* 541 |* Beschreibung 542 |* Ersterstellung 07.11.95 KA 543 |* Letzte Aenderung 07.11.95 KA 544 |* 545 *************************************************************************/ 546 547 XFillTransparenceItem::XFillTransparenceItem(sal_uInt16 nFillTransparence) : 548 SfxUInt16Item(XATTR_FILLTRANSPARENCE, nFillTransparence) 549 { 550 } 551 552 /************************************************************************* 553 |* 554 |* XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn) 555 |* 556 |* Beschreibung 557 |* Ersterstellung 07.11.95 KA 558 |* Letzte Aenderung 07.11.95 KA 559 |* 560 *************************************************************************/ 561 562 XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn) : 563 SfxUInt16Item(XATTR_FILLTRANSPARENCE, rIn) 564 { 565 } 566 567 /************************************************************************* 568 |* 569 |* XFillTransparenceItem::Clone(SfxItemPool* pPool) const 570 |* 571 |* Beschreibung 572 |* Ersterstellung 07.11.95 KA 573 |* Letzte Aenderung 07.11.95 KA 574 |* 575 *************************************************************************/ 576 577 SfxPoolItem* XFillTransparenceItem::Clone(SfxItemPool* /*pPool*/) const 578 { 579 return new XFillTransparenceItem(*this); 580 } 581 582 /************************************************************************* 583 |* 584 |* SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, sal_uInt16 nVer) const 585 |* 586 |* Beschreibung 587 |* Ersterstellung 07.11.95 KA 588 |* Letzte Aenderung 07.11.95 KA 589 |* 590 *************************************************************************/ 591 592 SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 593 { 594 return new XFillTransparenceItem(rIn); 595 } 596 597 //------------------------------------------------------------------------ 598 599 SfxItemPresentation XFillTransparenceItem::GetPresentation 600 ( 601 SfxItemPresentation ePres, 602 SfxMapUnit /*eCoreUnit*/, 603 SfxMapUnit /*ePresUnit*/, 604 XubString& rText, const IntlWrapper * 605 ) const 606 { 607 rText.Erase(); 608 609 switch ( ePres ) 610 { 611 case SFX_ITEM_PRESENTATION_NONE: 612 return ePres; 613 case SFX_ITEM_PRESENTATION_COMPLETE: 614 rText = XubString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ); 615 rText.AppendAscii(": "); 616 case SFX_ITEM_PRESENTATION_NAMELESS: 617 rText += XubString( UniString::CreateFromInt32((sal_uInt16) GetValue() )); 618 rText += sal_Unicode('%'); 619 return ePres; 620 default: 621 return SFX_ITEM_PRESENTATION_NONE; 622 } 623 } 624 625 //------------------------------ 626 // class XFormTextShadowTranspItem 627 //------------------------------ 628 TYPEINIT1_AUTOFACTORY(XFormTextShadowTranspItem, SfxUInt16Item); 629 630 /************************************************************************* 631 |* 632 |* XFormTextShadowTranspItem::XFormTextShadowTranspItem(sal_uInt16) 633 |* 634 |* Beschreibung 635 |* Ersterstellung 09.11.95 KA 636 |* Letzte Aenderung 09.11.95 KA 637 |* 638 *************************************************************************/ 639 640 XFormTextShadowTranspItem::XFormTextShadowTranspItem(sal_uInt16 nShdwTransparence) : 641 SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, nShdwTransparence) 642 { 643 } 644 645 /************************************************************************* 646 |* 647 |* XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn) 648 |* 649 |* Beschreibung 650 |* Ersterstellung 09.11.95 KA 651 |* Letzte Aenderung 09.11.95 KA 652 |* 653 *************************************************************************/ 654 655 XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn) : 656 SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, rIn) 657 { 658 } 659 660 /************************************************************************* 661 |* 662 |* XFormTextShadowTranspItem::Clone(SfxItemPool* pPool) const 663 |* 664 |* Beschreibung 665 |* Ersterstellung 09.11.95 KA 666 |* Letzte Aenderung 09.11.95 KA 667 |* 668 *************************************************************************/ 669 670 SfxPoolItem* XFormTextShadowTranspItem::Clone(SfxItemPool* /*pPool*/) const 671 { 672 return new XFormTextShadowTranspItem(*this); 673 } 674 675 /************************************************************************* 676 |* 677 |* SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, sal_uInt16 nVer) const 678 |* 679 |* Beschreibung 680 |* Ersterstellung 09.11.95 KA 681 |* Letzte Aenderung 09.11.95 KA 682 |* 683 *************************************************************************/ 684 685 SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 686 { 687 return new XFormTextShadowTranspItem(rIn); 688 } 689 690 691 //------------------------------ 692 // class XFillGradientStepCountItem 693 //------------------------------ 694 TYPEINIT1_AUTOFACTORY(XGradientStepCountItem, SfxUInt16Item); 695 696 /************************************************************************* 697 |* 698 |* XGradientStepCountItem::XGradientStepCountItem( sal_uInt16 ) 699 |* 700 |* Beschreibung 701 |* Ersterstellung 23.01.96 KA 702 |* Letzte Aenderung 23.01.96 KA 703 |* 704 *************************************************************************/ 705 706 XGradientStepCountItem::XGradientStepCountItem( sal_uInt16 nStepCount ) : 707 SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, nStepCount ) 708 { 709 } 710 711 /************************************************************************* 712 |* 713 |* XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn ) 714 |* 715 |* Beschreibung 716 |* Ersterstellung 23.01.96 KA 717 |* Letzte Aenderung 23.01.96 KA 718 |* 719 *************************************************************************/ 720 721 XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn ) : 722 SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, rIn ) 723 { 724 } 725 726 /************************************************************************* 727 |* 728 |* XGradientStepCountItem::Clone( SfxItemPool* pPool ) const 729 |* 730 |* Beschreibung 731 |* Ersterstellung 23.01.96 KA 732 |* Letzte Aenderung 23.01.96 KA 733 |* 734 *************************************************************************/ 735 736 SfxPoolItem* XGradientStepCountItem::Clone( SfxItemPool* /*pPool*/) const 737 { 738 return new XGradientStepCountItem( *this ); 739 } 740 741 /************************************************************************* 742 |* 743 |* SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, sal_uInt16 nVer) const 744 |* 745 |* Beschreibung 746 |* Ersterstellung 23.01.96 KA 747 |* Letzte Aenderung 23.01.96 KA 748 |* 749 *************************************************************************/ 750 751 SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 752 { 753 return new XGradientStepCountItem( rIn ); 754 } 755 756 //------------------------------------------------------------------------ 757 758 SfxItemPresentation XGradientStepCountItem::GetPresentation 759 ( 760 SfxItemPresentation ePres, 761 SfxMapUnit /*eCoreUnit*/, 762 SfxMapUnit /*ePresUnit*/, 763 XubString& rText, const IntlWrapper * 764 ) const 765 { 766 rText.Erase(); 767 768 switch ( ePres ) 769 { 770 case SFX_ITEM_PRESENTATION_NONE: 771 return ePres; 772 case SFX_ITEM_PRESENTATION_COMPLETE: 773 // rText = XubString( ResId( RID_SVXSTR_GRADIENTSTEPCOUNT, DIALOG_MGR() ) ); 774 // rText += ": "; 775 case SFX_ITEM_PRESENTATION_NAMELESS: 776 rText += XubString( UniString::CreateFromInt32((sal_uInt16) GetValue() )); 777 return ePres; 778 default: 779 return SFX_ITEM_PRESENTATION_NONE; 780 } 781 } 782 783 784 //------------------------------ 785 // class XFillBmpTileItem 786 //------------------------------ 787 TYPEINIT1_AUTOFACTORY( XFillBmpTileItem, SfxBoolItem ); 788 789 /************************************************************************* 790 |* 791 |* 792 |* 793 |* Beschreibung 794 |* Ersterstellung 28.02.96 KA 795 |* Letzte Aenderung 28.02.96 KA 796 |* 797 *************************************************************************/ 798 799 XFillBmpTileItem::XFillBmpTileItem( sal_Bool bTile ) : 800 SfxBoolItem( XATTR_FILLBMP_TILE, bTile ) 801 { 802 } 803 804 805 /************************************************************************* 806 |* 807 |* 808 |* 809 |* Beschreibung 810 |* Ersterstellung 28.02.96 KA 811 |* Letzte Aenderung 28.02.96 KA 812 |* 813 *************************************************************************/ 814 815 XFillBmpTileItem::XFillBmpTileItem( SvStream& rIn ) : 816 SfxBoolItem( XATTR_FILLBMP_TILE, rIn ) 817 { 818 } 819 820 821 /************************************************************************* 822 |* 823 |* 824 |* 825 |* Beschreibung 826 |* Ersterstellung 28.02.96 KA 827 |* Letzte Aenderung 28.02.96 KA 828 |* 829 *************************************************************************/ 830 831 SfxPoolItem* XFillBmpTileItem::Clone( SfxItemPool* /*pPool*/) const 832 { 833 return new XFillBmpTileItem( *this ); 834 } 835 836 837 /************************************************************************* 838 |* 839 |* 840 |* 841 |* Beschreibung 842 |* Ersterstellung 28.02.96 KA 843 |* Letzte Aenderung 28.02.96 KA 844 |* 845 *************************************************************************/ 846 847 SfxPoolItem* XFillBmpTileItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const 848 { 849 return new XFillBmpTileItem( rIn ); 850 } 851 852 853 /************************************************************************* 854 |* 855 |* 856 |* 857 |* Beschreibung 858 |* Ersterstellung 28.02.96 KA 859 |* Letzte Aenderung 28.02.96 KA 860 |* 861 *************************************************************************/ 862 863 SfxItemPresentation XFillBmpTileItem::GetPresentation 864 ( 865 SfxItemPresentation ePres, 866 SfxMapUnit /*eCoreUnit*/, 867 SfxMapUnit /*ePresUnit*/, 868 XubString& rText, const IntlWrapper * 869 ) const 870 { 871 rText.Erase(); 872 873 switch ( ePres ) 874 { 875 case SFX_ITEM_PRESENTATION_NONE: 876 return ePres; 877 case SFX_ITEM_PRESENTATION_COMPLETE: 878 case SFX_ITEM_PRESENTATION_NAMELESS: 879 return ePres; 880 default: 881 return SFX_ITEM_PRESENTATION_NONE; 882 } 883 } 884 885 886 //------------------------------ 887 // class XFillBmpTilePosItem 888 //------------------------------ 889 TYPEINIT1_AUTOFACTORY( XFillBmpPosItem, SfxEnumItem ); 890 891 /************************************************************************* 892 |* 893 |* 894 |* 895 |* Beschreibung 896 |* Ersterstellung 28.02.96 KA 897 |* Letzte Aenderung 28.02.96 KA 898 |* 899 *************************************************************************/ 900 901 XFillBmpPosItem::XFillBmpPosItem( RECT_POINT eRP ) : 902 SfxEnumItem( XATTR_FILLBMP_POS, sal::static_int_cast< sal_uInt16 >( eRP ) ) 903 { 904 } 905 906 907 /************************************************************************* 908 |* 909 |* 910 |* 911 |* Beschreibung 912 |* Ersterstellung 28.02.96 KA 913 |* Letzte Aenderung 28.02.96 KA 914 |* 915 *************************************************************************/ 916 917 XFillBmpPosItem::XFillBmpPosItem( SvStream& rIn ) : 918 SfxEnumItem( XATTR_FILLBMP_POS, rIn ) 919 { 920 } 921 922 923 /************************************************************************* 924 |* 925 |* 926 |* 927 |* Beschreibung 928 |* Ersterstellung 28.02.96 KA 929 |* Letzte Aenderung 28.02.96 KA 930 |* 931 *************************************************************************/ 932 933 SfxPoolItem* XFillBmpPosItem::Clone( SfxItemPool* /*pPool*/) const 934 { 935 return new XFillBmpPosItem( *this ); 936 } 937 938 939 /************************************************************************* 940 |* 941 |* 942 |* 943 |* Beschreibung 944 |* Ersterstellung 28.02.96 KA 945 |* Letzte Aenderung 28.02.96 KA 946 |* 947 *************************************************************************/ 948 949 SfxPoolItem* XFillBmpPosItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const 950 { 951 return new XFillBmpPosItem( rIn ); 952 } 953 954 955 /************************************************************************* 956 |* 957 |* 958 |* 959 |* Beschreibung 960 |* Ersterstellung 28.02.96 KA 961 |* Letzte Aenderung 28.02.96 KA 962 |* 963 *************************************************************************/ 964 965 SfxItemPresentation XFillBmpPosItem::GetPresentation 966 ( 967 SfxItemPresentation ePres, 968 SfxMapUnit /*eCoreUnit*/, 969 SfxMapUnit /*ePresUnit*/, 970 XubString& rText, const IntlWrapper * 971 ) const 972 { 973 rText.Erase(); 974 975 switch ( ePres ) 976 { 977 case SFX_ITEM_PRESENTATION_NONE: 978 return ePres; 979 case SFX_ITEM_PRESENTATION_COMPLETE: 980 case SFX_ITEM_PRESENTATION_NAMELESS: 981 return ePres; 982 default: 983 return SFX_ITEM_PRESENTATION_NONE; 984 } 985 } 986 987 /****************************************************************************** 988 |* 989 |* 990 |* 991 \******************************************************************************/ 992 993 sal_uInt16 XFillBmpPosItem::GetValueCount() const 994 { 995 return 9; 996 } 997 998 999 //------------------------------ 1000 // class XFillBmpTileSizeXItem 1001 //------------------------------ 1002 TYPEINIT1_AUTOFACTORY( XFillBmpSizeXItem, SfxMetricItem ); 1003 1004 /************************************************************************* 1005 |* 1006 |* 1007 |* 1008 |* Beschreibung 1009 |* Ersterstellung 28.02.96 KA 1010 |* Letzte Aenderung 28.02.96 KA 1011 |* 1012 *************************************************************************/ 1013 1014 XFillBmpSizeXItem::XFillBmpSizeXItem( long nSizeX ) : 1015 SfxMetricItem( XATTR_FILLBMP_SIZEX, nSizeX ) 1016 { 1017 } 1018 1019 1020 /************************************************************************* 1021 |* 1022 |* 1023 |* 1024 |* Beschreibung 1025 |* Ersterstellung 28.02.96 KA 1026 |* Letzte Aenderung 28.02.96 KA 1027 |* 1028 *************************************************************************/ 1029 1030 XFillBmpSizeXItem::XFillBmpSizeXItem( SvStream& rIn ) : 1031 SfxMetricItem( XATTR_FILLBMP_SIZEX, rIn ) 1032 { 1033 } 1034 1035 1036 /************************************************************************* 1037 |* 1038 |* 1039 |* 1040 |* Beschreibung 1041 |* Ersterstellung 28.02.96 KA 1042 |* Letzte Aenderung 28.02.96 KA 1043 |* 1044 *************************************************************************/ 1045 1046 SfxPoolItem* XFillBmpSizeXItem::Clone( SfxItemPool* /*pPool*/) const 1047 { 1048 return new XFillBmpSizeXItem( *this ); 1049 } 1050 1051 1052 /************************************************************************* 1053 |* 1054 |* 1055 |* 1056 |* Beschreibung 1057 |* Ersterstellung 28.02.96 KA 1058 |* Letzte Aenderung 28.02.96 KA 1059 |* 1060 *************************************************************************/ 1061 1062 SfxPoolItem* XFillBmpSizeXItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const 1063 { 1064 return new XFillBmpSizeXItem( rIn ); 1065 } 1066 1067 1068 /************************************************************************* 1069 |* 1070 |* 1071 |* 1072 |* Beschreibung 1073 |* Ersterstellung 28.02.96 KA 1074 |* Letzte Aenderung 28.02.96 KA 1075 |* 1076 *************************************************************************/ 1077 1078 SfxItemPresentation XFillBmpSizeXItem::GetPresentation 1079 ( 1080 SfxItemPresentation ePres, 1081 SfxMapUnit /*eCoreUnit*/, 1082 SfxMapUnit /*ePresUnit*/, 1083 XubString& rText, const IntlWrapper * 1084 ) const 1085 { 1086 rText.Erase(); 1087 1088 switch ( ePres ) 1089 { 1090 case SFX_ITEM_PRESENTATION_NONE: 1091 return ePres; 1092 case SFX_ITEM_PRESENTATION_COMPLETE: 1093 case SFX_ITEM_PRESENTATION_NAMELESS: 1094 return ePres; 1095 default: 1096 return SFX_ITEM_PRESENTATION_NONE; 1097 } 1098 } 1099 1100 1101 /************************************************************************* 1102 |* 1103 |* Beschreibung 1104 |* Ersterstellung 05.11.96 KA 1105 |* Letzte Aenderung 05.11.96 KA 1106 |* 1107 \*************************************************************************/ 1108 1109 FASTBOOL XFillBmpSizeXItem::HasMetrics() const 1110 { 1111 return GetValue() > 0L; 1112 } 1113 1114 1115 //------------------------------ 1116 // class XFillBmpTileSizeYItem 1117 //------------------------------ 1118 TYPEINIT1_AUTOFACTORY( XFillBmpSizeYItem, SfxMetricItem ); 1119 1120 /************************************************************************* 1121 |* 1122 |* 1123 |* 1124 |* Beschreibung 1125 |* Ersterstellung 28.02.96 KA 1126 |* Letzte Aenderung 28.02.96 KA 1127 |* 1128 *************************************************************************/ 1129 1130 XFillBmpSizeYItem::XFillBmpSizeYItem( long nSizeY ) : 1131 SfxMetricItem( XATTR_FILLBMP_SIZEY, nSizeY ) 1132 { 1133 } 1134 1135 1136 /************************************************************************* 1137 |* 1138 |* 1139 |* 1140 |* Beschreibung 1141 |* Ersterstellung 28.02.96 KA 1142 |* Letzte Aenderung 28.02.96 KA 1143 |* 1144 *************************************************************************/ 1145 1146 XFillBmpSizeYItem::XFillBmpSizeYItem( SvStream& rIn ) : 1147 SfxMetricItem( XATTR_FILLBMP_SIZEY, rIn ) 1148 { 1149 } 1150 1151 1152 /************************************************************************* 1153 |* 1154 |* 1155 |* 1156 |* Beschreibung 1157 |* Ersterstellung 28.02.96 KA 1158 |* Letzte Aenderung 28.02.96 KA 1159 |* 1160 *************************************************************************/ 1161 1162 SfxPoolItem* XFillBmpSizeYItem::Clone( SfxItemPool* /*pPool*/) const 1163 { 1164 return new XFillBmpSizeYItem( *this ); 1165 } 1166 1167 1168 /************************************************************************* 1169 |* 1170 |* 1171 |* 1172 |* Beschreibung 1173 |* Ersterstellung 28.02.96 KA 1174 |* Letzte Aenderung 28.02.96 KA 1175 |* 1176 *************************************************************************/ 1177 1178 SfxPoolItem* XFillBmpSizeYItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const 1179 { 1180 return new XFillBmpSizeYItem( rIn ); 1181 } 1182 1183 1184 /************************************************************************* 1185 |* 1186 |* 1187 |* 1188 |* Beschreibung 1189 |* Ersterstellung 28.02.96 KA 1190 |* Letzte Aenderung 28.02.96 KA 1191 |* 1192 *************************************************************************/ 1193 1194 SfxItemPresentation XFillBmpSizeYItem::GetPresentation 1195 ( 1196 SfxItemPresentation ePres, 1197 SfxMapUnit /*eCoreUnit*/, 1198 SfxMapUnit /*ePresUnit*/, 1199 XubString& rText, const IntlWrapper * 1200 ) const 1201 { 1202 rText.Erase(); 1203 1204 switch ( ePres ) 1205 { 1206 case SFX_ITEM_PRESENTATION_NONE: 1207 return ePres; 1208 case SFX_ITEM_PRESENTATION_COMPLETE: 1209 case SFX_ITEM_PRESENTATION_NAMELESS: 1210 return ePres; 1211 default: 1212 return SFX_ITEM_PRESENTATION_NONE; 1213 } 1214 } 1215 1216 1217 /************************************************************************* 1218 |* 1219 |* Beschreibung 1220 |* Ersterstellung 05.11.96 KA 1221 |* Letzte Aenderung 05.11.96 KA 1222 |* 1223 \*************************************************************************/ 1224 1225 FASTBOOL XFillBmpSizeYItem::HasMetrics() const 1226 { 1227 return GetValue() > 0L; 1228 } 1229 1230 1231 //------------------------------ 1232 // class XFillBmpTileLogItem 1233 //------------------------------ 1234 TYPEINIT1_AUTOFACTORY( XFillBmpSizeLogItem, SfxBoolItem ); 1235 1236 /************************************************************************* 1237 |* 1238 |* 1239 |* 1240 |* Beschreibung 1241 |* Ersterstellung 28.02.96 KA 1242 |* Letzte Aenderung 28.02.96 KA 1243 |* 1244 *************************************************************************/ 1245 1246 XFillBmpSizeLogItem::XFillBmpSizeLogItem( sal_Bool bLog ) : 1247 SfxBoolItem( XATTR_FILLBMP_SIZELOG, bLog ) 1248 { 1249 } 1250 1251 1252 /************************************************************************* 1253 |* 1254 |* 1255 |* 1256 |* Beschreibung 1257 |* Ersterstellung 28.02.96 KA 1258 |* Letzte Aenderung 28.02.96 KA 1259 |* 1260 *************************************************************************/ 1261 1262 XFillBmpSizeLogItem::XFillBmpSizeLogItem( SvStream& rIn ) : 1263 SfxBoolItem( XATTR_FILLBMP_SIZELOG, rIn ) 1264 { 1265 } 1266 1267 1268 /************************************************************************* 1269 |* 1270 |* 1271 |* 1272 |* Beschreibung 1273 |* Ersterstellung 28.02.96 KA 1274 |* Letzte Aenderung 28.02.96 KA 1275 |* 1276 *************************************************************************/ 1277 1278 SfxPoolItem* XFillBmpSizeLogItem::Clone( SfxItemPool* /*pPool*/) const 1279 { 1280 return new XFillBmpSizeLogItem( *this ); 1281 } 1282 1283 1284 /************************************************************************* 1285 |* 1286 |* 1287 |* 1288 |* Beschreibung 1289 |* Ersterstellung 28.02.96 KA 1290 |* Letzte Aenderung 28.02.96 KA 1291 |* 1292 *************************************************************************/ 1293 1294 SfxPoolItem* XFillBmpSizeLogItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const 1295 { 1296 return new XFillBmpSizeLogItem( rIn ); 1297 } 1298 1299 1300 /************************************************************************* 1301 |* 1302 |* 1303 |* 1304 |* Beschreibung 1305 |* Ersterstellung 28.02.96 KA 1306 |* Letzte Aenderung 28.02.96 KA 1307 |* 1308 *************************************************************************/ 1309 1310 SfxItemPresentation XFillBmpSizeLogItem::GetPresentation 1311 ( 1312 SfxItemPresentation ePres, 1313 SfxMapUnit /*eCoreUnit*/, 1314 SfxMapUnit /*ePresUnit*/, 1315 XubString& rText, const IntlWrapper * 1316 ) const 1317 { 1318 rText.Erase(); 1319 1320 switch ( ePres ) 1321 { 1322 case SFX_ITEM_PRESENTATION_NONE: 1323 return ePres; 1324 case SFX_ITEM_PRESENTATION_COMPLETE: 1325 case SFX_ITEM_PRESENTATION_NAMELESS: 1326 return ePres; 1327 default: 1328 return SFX_ITEM_PRESENTATION_NONE; 1329 } 1330 } 1331 1332 1333 //------------------------------ 1334 // class XFillBmpTileOffXItem 1335 //------------------------------ 1336 TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetXItem, SfxUInt16Item ); 1337 1338 /************************************************************************* 1339 |* 1340 |* 1341 |* 1342 |* Beschreibung 1343 |* Ersterstellung 28.02.96 KA 1344 |* Letzte Aenderung 28.02.96 KA 1345 |* 1346 *************************************************************************/ 1347 1348 XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( sal_uInt16 nOffX ) : 1349 SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, nOffX ) 1350 { 1351 } 1352 1353 1354 /************************************************************************* 1355 |* 1356 |* 1357 |* 1358 |* Beschreibung 1359 |* Ersterstellung 28.02.96 KA 1360 |* Letzte Aenderung 28.02.96 KA 1361 |* 1362 *************************************************************************/ 1363 1364 XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( SvStream& rIn ) : 1365 SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, rIn ) 1366 { 1367 } 1368 1369 1370 /************************************************************************* 1371 |* 1372 |* 1373 |* 1374 |* Beschreibung 1375 |* Ersterstellung 28.02.96 KA 1376 |* Letzte Aenderung 28.02.96 KA 1377 |* 1378 *************************************************************************/ 1379 1380 SfxPoolItem* XFillBmpTileOffsetXItem::Clone( SfxItemPool* /*pPool*/) const 1381 { 1382 return new XFillBmpTileOffsetXItem( *this ); 1383 } 1384 1385 1386 /************************************************************************* 1387 |* 1388 |* 1389 |* 1390 |* Beschreibung 1391 |* Ersterstellung 28.02.96 KA 1392 |* Letzte Aenderung 28.02.96 KA 1393 |* 1394 *************************************************************************/ 1395 1396 SfxPoolItem* XFillBmpTileOffsetXItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const 1397 { 1398 return new XFillBmpTileOffsetXItem( rIn ); 1399 } 1400 1401 1402 /************************************************************************* 1403 |* 1404 |* 1405 |* 1406 |* Beschreibung 1407 |* Ersterstellung 28.02.96 KA 1408 |* Letzte Aenderung 28.02.96 KA 1409 |* 1410 *************************************************************************/ 1411 1412 SfxItemPresentation XFillBmpTileOffsetXItem::GetPresentation 1413 ( 1414 SfxItemPresentation ePres, 1415 SfxMapUnit /*eCoreUnit*/, 1416 SfxMapUnit /*ePresUnit*/, 1417 XubString& rText, const IntlWrapper * 1418 ) const 1419 { 1420 rText.Erase(); 1421 1422 switch ( ePres ) 1423 { 1424 case SFX_ITEM_PRESENTATION_NONE: 1425 return ePres; 1426 case SFX_ITEM_PRESENTATION_COMPLETE: 1427 case SFX_ITEM_PRESENTATION_NAMELESS: 1428 return ePres; 1429 default: 1430 return SFX_ITEM_PRESENTATION_NONE; 1431 } 1432 } 1433 1434 1435 //------------------------------ 1436 // class XFillBmpTileOffYItem 1437 //------------------------------ 1438 TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetYItem, SfxUInt16Item ); 1439 1440 /************************************************************************* 1441 |* 1442 |* 1443 |* 1444 |* Beschreibung 1445 |* Ersterstellung 28.02.96 KA 1446 |* Letzte Aenderung 28.02.96 KA 1447 |* 1448 *************************************************************************/ 1449 1450 XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( sal_uInt16 nOffY ) : 1451 SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, nOffY ) 1452 { 1453 } 1454 1455 1456 /************************************************************************* 1457 |* 1458 |* 1459 |* 1460 |* Beschreibung 1461 |* Ersterstellung 28.02.96 KA 1462 |* Letzte Aenderung 28.02.96 KA 1463 |* 1464 *************************************************************************/ 1465 1466 XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( SvStream& rIn ) : 1467 SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, rIn ) 1468 { 1469 } 1470 1471 1472 /************************************************************************* 1473 |* 1474 |* 1475 |* 1476 |* Beschreibung 1477 |* Ersterstellung 28.02.96 KA 1478 |* Letzte Aenderung 28.02.96 KA 1479 |* 1480 *************************************************************************/ 1481 1482 SfxPoolItem* XFillBmpTileOffsetYItem::Clone( SfxItemPool* /*pPool*/) const 1483 { 1484 return new XFillBmpTileOffsetYItem( *this ); 1485 } 1486 1487 1488 /************************************************************************* 1489 |* 1490 |* 1491 |* 1492 |* Beschreibung 1493 |* Ersterstellung 28.02.96 KA 1494 |* Letzte Aenderung 28.02.96 KA 1495 |* 1496 *************************************************************************/ 1497 1498 SfxPoolItem* XFillBmpTileOffsetYItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const 1499 { 1500 return new XFillBmpTileOffsetYItem( rIn ); 1501 } 1502 1503 1504 /************************************************************************* 1505 |* 1506 |* 1507 |* 1508 |* Beschreibung 1509 |* Ersterstellung 28.02.96 KA 1510 |* Letzte Aenderung 28.02.96 KA 1511 |* 1512 *************************************************************************/ 1513 1514 SfxItemPresentation XFillBmpTileOffsetYItem::GetPresentation 1515 ( 1516 SfxItemPresentation ePres, 1517 SfxMapUnit /*eCoreUnit*/, 1518 SfxMapUnit /*ePresUnit*/, 1519 XubString& rText, const IntlWrapper * 1520 ) const 1521 { 1522 rText.Erase(); 1523 1524 switch ( ePres ) 1525 { 1526 case SFX_ITEM_PRESENTATION_NONE: 1527 return ePres; 1528 case SFX_ITEM_PRESENTATION_COMPLETE: 1529 case SFX_ITEM_PRESENTATION_NAMELESS: 1530 return ePres; 1531 default: 1532 return SFX_ITEM_PRESENTATION_NONE; 1533 } 1534 } 1535 1536 1537 //------------------------------ 1538 // class XFillBmpStretchItem 1539 //------------------------------ 1540 TYPEINIT1_AUTOFACTORY( XFillBmpStretchItem, SfxBoolItem ); 1541 1542 /************************************************************************* 1543 |* 1544 |* 1545 |* 1546 |* Beschreibung 1547 |* Ersterstellung 28.02.96 KA 1548 |* Letzte Aenderung 28.02.96 KA 1549 |* 1550 *************************************************************************/ 1551 1552 XFillBmpStretchItem::XFillBmpStretchItem( sal_Bool bStretch ) : 1553 SfxBoolItem( XATTR_FILLBMP_STRETCH, bStretch ) 1554 { 1555 } 1556 1557 1558 /************************************************************************* 1559 |* 1560 |* 1561 |* 1562 |* Beschreibung 1563 |* Ersterstellung 28.02.96 KA 1564 |* Letzte Aenderung 28.02.96 KA 1565 |* 1566 *************************************************************************/ 1567 1568 XFillBmpStretchItem::XFillBmpStretchItem( SvStream& rIn ) : 1569 SfxBoolItem( XATTR_FILLBMP_STRETCH, rIn ) 1570 { 1571 } 1572 1573 1574 /************************************************************************* 1575 |* 1576 |* 1577 |* 1578 |* Beschreibung 1579 |* Ersterstellung 28.02.96 KA 1580 |* Letzte Aenderung 28.02.96 KA 1581 |* 1582 *************************************************************************/ 1583 1584 SfxPoolItem* XFillBmpStretchItem::Clone( SfxItemPool* /*pPool*/) const 1585 { 1586 return new XFillBmpStretchItem( *this ); 1587 } 1588 1589 1590 /************************************************************************* 1591 |* 1592 |* 1593 |* 1594 |* Beschreibung 1595 |* Ersterstellung 28.02.96 KA 1596 |* Letzte Aenderung 28.02.96 KA 1597 |* 1598 *************************************************************************/ 1599 1600 SfxPoolItem* XFillBmpStretchItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const 1601 { 1602 return new XFillBmpStretchItem( rIn ); 1603 } 1604 1605 1606 /************************************************************************* 1607 |* 1608 |* 1609 |* 1610 |* Beschreibung 1611 |* Ersterstellung 28.02.96 KA 1612 |* Letzte Aenderung 28.02.96 KA 1613 |* 1614 *************************************************************************/ 1615 1616 SfxItemPresentation XFillBmpStretchItem::GetPresentation 1617 ( 1618 SfxItemPresentation ePres, 1619 SfxMapUnit /*eCoreUnit*/, 1620 SfxMapUnit /*ePresUnit*/, 1621 XubString& rText, const IntlWrapper * 1622 ) const 1623 { 1624 rText.Erase(); 1625 1626 switch ( ePres ) 1627 { 1628 case SFX_ITEM_PRESENTATION_NONE: 1629 return ePres; 1630 case SFX_ITEM_PRESENTATION_COMPLETE: 1631 case SFX_ITEM_PRESENTATION_NAMELESS: 1632 return ePres; 1633 default: 1634 return SFX_ITEM_PRESENTATION_NONE; 1635 } 1636 } 1637 1638 1639 //------------------------------ 1640 // class XFillBmpTileOffPosXItem 1641 //------------------------------ 1642 TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetXItem, SfxUInt16Item ); 1643 1644 /************************************************************************* 1645 |* 1646 |* 1647 |* 1648 |* Beschreibung 1649 |* Ersterstellung KA 29.04.96 1650 |* Letzte Aenderung KA 29.04.96 1651 |* 1652 *************************************************************************/ 1653 1654 XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( sal_uInt16 nOffPosX ) : 1655 SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, nOffPosX ) 1656 { 1657 } 1658 1659 1660 /************************************************************************* 1661 |* 1662 |* 1663 |* 1664 |* Beschreibung 1665 |* Ersterstellung KA 29.04.96 1666 |* Letzte Aenderung KA 29.04.96 1667 |* 1668 *************************************************************************/ 1669 1670 XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( SvStream& rIn ) : 1671 SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, rIn ) 1672 { 1673 } 1674 1675 1676 /************************************************************************* 1677 |* 1678 |* 1679 |* 1680 |* Beschreibung 1681 |* Ersterstellung KA 29.04.96 1682 |* Letzte Aenderung KA 29.04.96 1683 |* 1684 *************************************************************************/ 1685 1686 SfxPoolItem* XFillBmpPosOffsetXItem::Clone( SfxItemPool* /*pPool*/) const 1687 { 1688 return new XFillBmpPosOffsetXItem( *this ); 1689 } 1690 1691 1692 /************************************************************************* 1693 |* 1694 |* 1695 |* 1696 |* Beschreibung 1697 |* Ersterstellung KA 29.04.96 1698 |* Letzte Aenderung KA 29.04.96 1699 |* 1700 *************************************************************************/ 1701 1702 SfxPoolItem* XFillBmpPosOffsetXItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const 1703 { 1704 return new XFillBmpPosOffsetXItem( rIn ); 1705 } 1706 1707 1708 /************************************************************************* 1709 |* 1710 |* 1711 |* 1712 |* Beschreibung 1713 |* Ersterstellung KA 29.04.96 1714 |* Letzte Aenderung KA 29.04.96 1715 |* 1716 *************************************************************************/ 1717 1718 SfxItemPresentation XFillBmpPosOffsetXItem::GetPresentation 1719 ( 1720 SfxItemPresentation ePres, 1721 SfxMapUnit /*eCoreUnit*/, 1722 SfxMapUnit /*ePresUnit*/, 1723 XubString& rText, const IntlWrapper * 1724 ) const 1725 { 1726 rText.Erase(); 1727 1728 switch ( ePres ) 1729 { 1730 case SFX_ITEM_PRESENTATION_NONE: 1731 return ePres; 1732 case SFX_ITEM_PRESENTATION_COMPLETE: 1733 case SFX_ITEM_PRESENTATION_NAMELESS: 1734 return ePres; 1735 default: 1736 return SFX_ITEM_PRESENTATION_NONE; 1737 } 1738 } 1739 1740 1741 //------------------------------ 1742 // class XFillBmpTileOffPosYItem 1743 //------------------------------ 1744 TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetYItem, SfxUInt16Item ); 1745 1746 /************************************************************************* 1747 |* 1748 |* 1749 |* 1750 |* Beschreibung 1751 |* Ersterstellung KA 29.04.96 1752 |* Letzte Aenderung KA 29.04.96 1753 |* 1754 *************************************************************************/ 1755 1756 XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( sal_uInt16 nOffPosY ) : 1757 SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, nOffPosY ) 1758 { 1759 } 1760 1761 1762 /************************************************************************* 1763 |* 1764 |* 1765 |* 1766 |* Beschreibung 1767 |* Ersterstellung KA 29.04.96 1768 |* Letzte Aenderung KA 29.04.96 1769 |* 1770 *************************************************************************/ 1771 1772 XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( SvStream& rIn ) : 1773 SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, rIn ) 1774 { 1775 } 1776 1777 1778 /************************************************************************* 1779 |* 1780 |* 1781 |* 1782 |* Beschreibung 1783 |* Ersterstellung KA 29.04.96 1784 |* Letzte Aenderung KA 29.04.96 1785 |* 1786 *************************************************************************/ 1787 1788 SfxPoolItem* XFillBmpPosOffsetYItem::Clone( SfxItemPool* /*pPool*/) const 1789 { 1790 return new XFillBmpPosOffsetYItem( *this ); 1791 } 1792 1793 1794 /************************************************************************* 1795 |* 1796 |* 1797 |* 1798 |* Beschreibung 1799 |* Ersterstellung KA 29.04.96 1800 |* Letzte Aenderung KA 29.04.96 1801 |* 1802 *************************************************************************/ 1803 1804 SfxPoolItem* XFillBmpPosOffsetYItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const 1805 { 1806 return new XFillBmpPosOffsetYItem( rIn ); 1807 } 1808 1809 1810 /************************************************************************* 1811 |* 1812 |* 1813 |* 1814 |* Beschreibung 1815 |* Ersterstellung KA 29.04.96 1816 |* Letzte Aenderung KA 29.04.96 1817 |* 1818 *************************************************************************/ 1819 1820 SfxItemPresentation XFillBmpPosOffsetYItem::GetPresentation 1821 ( 1822 SfxItemPresentation ePres, 1823 SfxMapUnit /*eCoreUnit*/, 1824 SfxMapUnit /*ePresUnit*/, 1825 XubString& rText, const IntlWrapper * 1826 ) const 1827 { 1828 rText.Erase(); 1829 1830 switch ( ePres ) 1831 { 1832 case SFX_ITEM_PRESENTATION_NONE: 1833 return ePres; 1834 case SFX_ITEM_PRESENTATION_COMPLETE: 1835 case SFX_ITEM_PRESENTATION_NAMELESS: 1836 return ePres; 1837 default: 1838 return SFX_ITEM_PRESENTATION_NONE; 1839 } 1840 } 1841 1842 //-------------------------- 1843 // class XFillBackgroundItem 1844 //-------------------------- 1845 TYPEINIT1_AUTOFACTORY(XFillBackgroundItem, SfxBoolItem); 1846 1847 /************************************************************************* 1848 |* 1849 |* XFillBackgroundItem::XFillBackgroundItem( sal_Bool ) 1850 |* 1851 |* Beschreibung 1852 |* Ersterstellung 19.11.96 KA 1853 |* Letzte Aenderung 1854 |* 1855 *************************************************************************/ 1856 1857 XFillBackgroundItem::XFillBackgroundItem( sal_Bool bFill ) : 1858 SfxBoolItem( XATTR_FILLBACKGROUND, bFill ) 1859 { 1860 } 1861 1862 /************************************************************************* 1863 |* 1864 |* XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn ) 1865 |* 1866 |* Beschreibung 1867 |* Ersterstellung 23.01.96 KA 1868 |* Letzte Aenderung 23.01.96 KA 1869 |* 1870 *************************************************************************/ 1871 1872 XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn ) : 1873 SfxBoolItem( XATTR_FILLBACKGROUND, rIn ) 1874 { 1875 } 1876 1877 /************************************************************************* 1878 |* 1879 |* XFillBackgroundItem::Clone( SfxItemPool* pPool ) const 1880 |* 1881 |* Beschreibung 1882 |* Ersterstellung 23.01.96 KA 1883 |* Letzte Aenderung 23.01.96 KA 1884 |* 1885 *************************************************************************/ 1886 1887 SfxPoolItem* XFillBackgroundItem::Clone( SfxItemPool* /*pPool*/) const 1888 { 1889 return new XFillBackgroundItem( *this ); 1890 } 1891 1892 /************************************************************************* 1893 |* 1894 |* SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, sal_uInt16 nVer) const 1895 |* 1896 |* Beschreibung 1897 |* Ersterstellung 23.01.96 KA 1898 |* Letzte Aenderung 23.01.96 KA 1899 |* 1900 *************************************************************************/ 1901 1902 SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 1903 { 1904 return new XFillBackgroundItem( rIn ); 1905 } 1906 1907 //------------------------------------------------------------------------ 1908 1909 SfxItemPresentation XFillBackgroundItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, 1910 SfxMapUnit /*ePresUnit*/, XubString& rText, const IntlWrapper*) const 1911 { 1912 rText.Erase(); 1913 1914 switch( ePres ) 1915 { 1916 case SFX_ITEM_PRESENTATION_NONE: 1917 return ePres; 1918 1919 case SFX_ITEM_PRESENTATION_COMPLETE: 1920 case SFX_ITEM_PRESENTATION_NAMELESS: 1921 return ePres; 1922 default: 1923 return SFX_ITEM_PRESENTATION_NONE; 1924 } 1925 } 1926 1927 1928 1929