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