1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <com/sun/star/drawing/LineJoint.hpp>
21 #include <com/sun/star/drawing/LineCap.hpp>
22 #include <com/sun/star/uno/Any.hxx>
24 #include <svx/dialogs.hrc>
25 #include "svx/xattr.hxx"
26 #include <svx/xtable.hxx>
27 #include <svx/dialmgr.hxx>
28 #include <editeng/itemtype.hxx>
29 #include <svx/xdef.hxx>
30 #include <svx/AffineMatrixItem.hxx>
32 /************************************************************************/
34 //------------------------------
35 // class XLineTransparenceItem
36 //------------------------------
37 TYPEINIT1_AUTOFACTORY(XLineTransparenceItem
, SfxUInt16Item
);
39 /*************************************************************************
41 |* XLineTransparenceItem::XLineTransparenceItem(sal_uInt16)
43 *************************************************************************/
45 XLineTransparenceItem::XLineTransparenceItem(sal_uInt16 nLineTransparence
) :
46 SfxUInt16Item(XATTR_LINETRANSPARENCE
, nLineTransparence
)
50 /*************************************************************************
52 |* XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn)
54 *************************************************************************/
56 XLineTransparenceItem::XLineTransparenceItem(SvStream
& rIn
) :
57 SfxUInt16Item(XATTR_LINETRANSPARENCE
, rIn
)
61 /*************************************************************************
63 |* XLineTransparenceItem::Clone(SfxItemPool* pPool) const
65 *************************************************************************/
67 SfxPoolItem
* XLineTransparenceItem::Clone(SfxItemPool
* /*pPool*/) const
69 return new XLineTransparenceItem(*this);
72 /*************************************************************************
74 |* SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, sal_uInt16 nVer) const
76 *************************************************************************/
78 SfxPoolItem
* XLineTransparenceItem::Create(SvStream
& rIn
, sal_uInt16
/*nVer*/) const
80 return new XLineTransparenceItem(rIn
);
83 //------------------------------------------------------------------------
85 SfxItemPresentation
XLineTransparenceItem::GetPresentation
87 SfxItemPresentation ePres
,
88 SfxMapUnit
/*eCoreUnit*/,
89 SfxMapUnit
/*ePresUnit*/,
90 OUString
& rText
, const IntlWrapper
*
97 case SFX_ITEM_PRESENTATION_NONE
:
99 case SFX_ITEM_PRESENTATION_COMPLETE
:
100 rText
= OUString( ResId( RID_SVXSTR_TRANSPARENCE
, DIALOG_MGR() ) ) + ": ";
101 case SFX_ITEM_PRESENTATION_NAMELESS
:
102 rText
= rText
+ OUString::number( GetValue() ) + "%";
105 return SFX_ITEM_PRESENTATION_NONE
;
109 //-----------------------
110 // class XLineJointItem -
111 //-----------------------
113 TYPEINIT1_AUTOFACTORY(XLineJointItem
, SfxEnumItem
);
115 // -----------------------------------------------------------------------------
117 XLineJointItem::XLineJointItem( com::sun::star::drawing::LineJoint eLineJoint
) :
118 SfxEnumItem(XATTR_LINEJOINT
, sal::static_int_cast
< sal_uInt16
>(eLineJoint
))
122 // -----------------------------------------------------------------------------
124 XLineJointItem::XLineJointItem( SvStream
& rIn
) :
125 SfxEnumItem( XATTR_LINEJOINT
, rIn
)
129 // -----------------------------------------------------------------------------
131 sal_uInt16
XLineJointItem::GetVersion( sal_uInt16
/*nFileFormatVersion*/) const
136 // -----------------------------------------------------------------------------
138 SfxPoolItem
* XLineJointItem::Create( SvStream
& rIn
, sal_uInt16 nVer
) const
140 XLineJointItem
* pRet
= new XLineJointItem( rIn
);
143 pRet
->SetValue(com::sun::star::drawing::LineJoint_ROUND
);
148 // -----------------------------------------------------------------------------
150 SfxPoolItem
* XLineJointItem::Clone(SfxItemPool
* /*pPool*/) const
152 return new XLineJointItem( *this );
155 // -----------------------------------------------------------------------------
157 SfxItemPresentation
XLineJointItem::GetPresentation( SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/,
158 SfxMapUnit
/*ePresUnit*/, OUString
& rText
, const IntlWrapper
*) const
164 case SFX_ITEM_PRESENTATION_NONE
: return ePres
;
166 case SFX_ITEM_PRESENTATION_COMPLETE
:
167 case SFX_ITEM_PRESENTATION_NAMELESS
:
173 case( com::sun::star::drawing::LineJoint_MAKE_FIXED_SIZE
):
174 case( com::sun::star::drawing::LineJoint_NONE
):
175 nId
= RID_SVXSTR_LINEJOINT_NONE
;
178 case( com::sun::star::drawing::LineJoint_MIDDLE
):
179 nId
= RID_SVXSTR_LINEJOINT_MIDDLE
;
183 case( com::sun::star::drawing::LineJoint_BEVEL
):
184 nId
= RID_SVXSTR_LINEJOINT_BEVEL
;
188 case( com::sun::star::drawing::LineJoint_MITER
):
189 nId
= RID_SVXSTR_LINEJOINT_MITER
;
193 case( com::sun::star::drawing::LineJoint_ROUND
):
194 nId
= RID_SVXSTR_LINEJOINT_ROUND
;
199 rText
= SVX_RESSTR( nId
);
204 return SFX_ITEM_PRESENTATION_NONE
;
208 // -----------------------------------------------------------------------------
210 bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
212 const ::com::sun::star::drawing::LineJoint eJoint
= GetValue();
217 // -----------------------------------------------------------------------------
219 bool XLineJointItem::PutValue( const ::com::sun::star::uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
221 ::com::sun::star::drawing::LineJoint eUnoJoint
;
223 if(!(rVal
>>= eUnoJoint
))
225 // also try an int (for Basic)
229 eUnoJoint
= (::com::sun::star::drawing::LineJoint
)nLJ
;
232 SetValue( sal::static_int_cast
< sal_uInt16
>( eUnoJoint
) );
237 // -----------------------------------------------------------------------------
239 sal_uInt16
XLineJointItem::GetValueCount() const
241 // don't forget to update the api interface also
245 //---------------------
246 // class AffineMatrixItem
247 //---------------------
249 TYPEINIT1_AUTOFACTORY(AffineMatrixItem
, SfxPoolItem
);
251 AffineMatrixItem::AffineMatrixItem(const com::sun::star::geometry::AffineMatrix2D
* pMatrix
)
252 : SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX
)
269 AffineMatrixItem::AffineMatrixItem(SvStream
& rIn
)
270 : SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX
)
280 AffineMatrixItem::AffineMatrixItem(const AffineMatrixItem
& rRef
)
281 : SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX
)
283 maMatrix
= rRef
.maMatrix
;
286 AffineMatrixItem::~AffineMatrixItem()
290 int AffineMatrixItem::operator==(const SfxPoolItem
& rRef
) const
292 if(!SfxPoolItem::operator==(rRef
))
297 const AffineMatrixItem
* pRef
= dynamic_cast< const AffineMatrixItem
* >(&rRef
);
304 return (maMatrix
.m00
== pRef
->maMatrix
.m00
305 && maMatrix
.m01
== pRef
->maMatrix
.m01
306 && maMatrix
.m02
== pRef
->maMatrix
.m02
307 && maMatrix
.m10
== pRef
->maMatrix
.m10
308 && maMatrix
.m11
== pRef
->maMatrix
.m11
309 && maMatrix
.m12
== pRef
->maMatrix
.m12
);
312 SfxPoolItem
* AffineMatrixItem::Clone( SfxItemPool
* /*pPool*/ ) const
314 return new AffineMatrixItem(*this);
317 SfxPoolItem
* AffineMatrixItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/ ) const
319 return new AffineMatrixItem(rIn
);
322 SvStream
& AffineMatrixItem::Store(SvStream
&rStream
, sal_uInt16
/*nItemVersion*/ ) const
324 rStream
<< maMatrix
.m00
;
325 rStream
<< maMatrix
.m01
;
326 rStream
<< maMatrix
.m02
;
327 rStream
<< maMatrix
.m10
;
328 rStream
<< maMatrix
.m11
;
329 rStream
<< maMatrix
.m12
;
333 bool AffineMatrixItem::QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8
/*nMemberId*/ ) const
339 bool AffineMatrixItem::PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8
/*nMemberId*/ )
341 if (rVal
>>= maMatrix
)
346 OSL_ENSURE(false, "AffineMatrixItem::PutValue - Wrong type!");
350 const com::sun::star::geometry::AffineMatrix2D
& AffineMatrixItem::GetAffineMatrix2D() const
355 //-----------------------
356 // class XLineCapItem -
357 //-----------------------
359 TYPEINIT1_AUTOFACTORY(XLineCapItem
, SfxEnumItem
);
361 // -----------------------------------------------------------------------------
363 XLineCapItem::XLineCapItem(com::sun::star::drawing::LineCap eLineCap
)
364 : SfxEnumItem(XATTR_LINECAP
, sal::static_int_cast
< sal_uInt16
>(eLineCap
))
368 // -----------------------------------------------------------------------------
370 XLineCapItem::XLineCapItem( SvStream
& rIn
)
371 : SfxEnumItem(XATTR_LINECAP
, rIn
)
375 // -----------------------------------------------------------------------------
377 sal_uInt16
XLineCapItem::GetVersion( sal_uInt16
/*nFileFormatVersion*/) const
382 // -----------------------------------------------------------------------------
384 SfxPoolItem
* XLineCapItem::Create( SvStream
& rIn
, sal_uInt16 nVer
) const
386 XLineCapItem
* pRet
= new XLineCapItem( rIn
);
389 pRet
->SetValue(com::sun::star::drawing::LineCap_BUTT
);
394 // -----------------------------------------------------------------------------
396 SfxPoolItem
* XLineCapItem::Clone(SfxItemPool
* /*pPool*/) const
398 return new XLineCapItem( *this );
401 // -----------------------------------------------------------------------------
403 SfxItemPresentation
XLineCapItem::GetPresentation( SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/,
404 SfxMapUnit
/*ePresUnit*/, OUString
& rText
, const IntlWrapper
*) const
410 case SFX_ITEM_PRESENTATION_NONE
: return ePres
;
412 case SFX_ITEM_PRESENTATION_COMPLETE
:
413 case SFX_ITEM_PRESENTATION_NAMELESS
:
419 default: /*com::sun::star::drawing::LineCap_BUTT*/
420 nId
= RID_SVXSTR_LINECAP_BUTT
;
423 case(com::sun::star::drawing::LineCap_ROUND
):
424 nId
= RID_SVXSTR_LINECAP_ROUND
;
427 case(com::sun::star::drawing::LineCap_SQUARE
):
428 nId
= RID_SVXSTR_LINECAP_SQUARE
;
433 rText
= SVX_RESSTR( nId
);
438 return SFX_ITEM_PRESENTATION_NONE
;
442 // -----------------------------------------------------------------------------
444 bool XLineCapItem::QueryValue( ::com::sun::star::uno::Any
& rVal
, sal_uInt8
/*nMemberId*/) const
446 const com::sun::star::drawing::LineCap
eCap(GetValue());
451 // -----------------------------------------------------------------------------
453 bool XLineCapItem::PutValue( const ::com::sun::star::uno::Any
& rVal
, sal_uInt8
/*nMemberId*/)
455 com::sun::star::drawing::LineCap eUnoCap
;
457 if(!(rVal
>>= eUnoCap
))
459 // also try an int (for Basic)
467 eUnoCap
= (com::sun::star::drawing::LineCap
)nLJ
;
470 OSL_ENSURE(com::sun::star::drawing::LineCap_BUTT
== eUnoCap
471 || com::sun::star::drawing::LineCap_ROUND
== eUnoCap
472 || com::sun::star::drawing::LineCap_SQUARE
== eUnoCap
, "Unknown enum value in XATTR_LINECAP (!)");
474 SetValue(sal::static_int_cast
< sal_uInt16
>(eUnoCap
));
479 // -----------------------------------------------------------------------------
481 sal_uInt16
XLineCapItem::GetValueCount() const
483 // don't forget to update the api interface also
487 // -----------------------------------------------------------------------------
489 com::sun::star::drawing::LineCap
XLineCapItem::GetValue() const
491 const com::sun::star::drawing::LineCap
eRetval((com::sun::star::drawing::LineCap
)SfxEnumItem::GetValue());
492 OSL_ENSURE(com::sun::star::drawing::LineCap_BUTT
== eRetval
493 || com::sun::star::drawing::LineCap_ROUND
== eRetval
494 || com::sun::star::drawing::LineCap_SQUARE
== eRetval
, "Unknown enum value in XATTR_LINECAP (!)");
499 //------------------------------
500 // class XFillTransparenceItem
501 //------------------------------
502 TYPEINIT1_AUTOFACTORY(XFillTransparenceItem
, SfxUInt16Item
);
504 /*************************************************************************
506 |* XFillTransparenceItem::XFillTransparenceItem(sal_uInt16)
508 *************************************************************************/
510 XFillTransparenceItem::XFillTransparenceItem(sal_uInt16 nFillTransparence
) :
511 SfxUInt16Item(XATTR_FILLTRANSPARENCE
, nFillTransparence
)
515 /*************************************************************************
517 |* XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn)
519 *************************************************************************/
521 XFillTransparenceItem::XFillTransparenceItem(SvStream
& rIn
) :
522 SfxUInt16Item(XATTR_FILLTRANSPARENCE
, rIn
)
526 /*************************************************************************
528 |* XFillTransparenceItem::Clone(SfxItemPool* pPool) const
530 *************************************************************************/
532 SfxPoolItem
* XFillTransparenceItem::Clone(SfxItemPool
* /*pPool*/) const
534 return new XFillTransparenceItem(*this);
537 /*************************************************************************
539 |* SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, sal_uInt16 nVer) const
541 *************************************************************************/
543 SfxPoolItem
* XFillTransparenceItem::Create(SvStream
& rIn
, sal_uInt16
/*nVer*/) const
545 return new XFillTransparenceItem(rIn
);
548 //------------------------------------------------------------------------
550 SfxItemPresentation
XFillTransparenceItem::GetPresentation
552 SfxItemPresentation ePres
,
553 SfxMapUnit
/*eCoreUnit*/,
554 SfxMapUnit
/*ePresUnit*/,
555 OUString
& rText
, const IntlWrapper
*
562 case SFX_ITEM_PRESENTATION_NONE
:
564 case SFX_ITEM_PRESENTATION_COMPLETE
:
565 rText
= OUString( ResId( RID_SVXSTR_TRANSPARENCE
, DIALOG_MGR() ) ) + ": ";
566 case SFX_ITEM_PRESENTATION_NAMELESS
:
567 rText
= rText
+ OUString::number( GetValue() ) + "%";
570 return SFX_ITEM_PRESENTATION_NONE
;
574 //------------------------------
575 // class XFormTextShadowTranspItem
576 //------------------------------
577 TYPEINIT1_AUTOFACTORY(XFormTextShadowTranspItem
, SfxUInt16Item
);
579 /*************************************************************************
581 |* XFormTextShadowTranspItem::XFormTextShadowTranspItem(sal_uInt16)
583 *************************************************************************/
585 XFormTextShadowTranspItem::XFormTextShadowTranspItem(sal_uInt16 nShdwTransparence
) :
586 SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP
, nShdwTransparence
)
590 /*************************************************************************
592 |* XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn)
594 *************************************************************************/
596 XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream
& rIn
) :
597 SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP
, rIn
)
601 /*************************************************************************
603 |* XFormTextShadowTranspItem::Clone(SfxItemPool* pPool) const
605 *************************************************************************/
607 SfxPoolItem
* XFormTextShadowTranspItem::Clone(SfxItemPool
* /*pPool*/) const
609 return new XFormTextShadowTranspItem(*this);
612 /*************************************************************************
614 |* SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, sal_uInt16 nVer) const
616 *************************************************************************/
618 SfxPoolItem
* XFormTextShadowTranspItem::Create(SvStream
& rIn
, sal_uInt16
/*nVer*/) const
620 return new XFormTextShadowTranspItem(rIn
);
624 //------------------------------
625 // class XFillGradientStepCountItem
626 //------------------------------
627 TYPEINIT1_AUTOFACTORY(XGradientStepCountItem
, SfxUInt16Item
);
629 /*************************************************************************
631 |* XGradientStepCountItem::XGradientStepCountItem( sal_uInt16 )
633 *************************************************************************/
635 XGradientStepCountItem::XGradientStepCountItem( sal_uInt16 nStepCount
) :
636 SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT
, nStepCount
)
640 /*************************************************************************
642 |* XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn )
644 *************************************************************************/
646 XGradientStepCountItem::XGradientStepCountItem( SvStream
& rIn
) :
647 SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT
, rIn
)
651 /*************************************************************************
653 |* XGradientStepCountItem::Clone( SfxItemPool* pPool ) const
655 *************************************************************************/
657 SfxPoolItem
* XGradientStepCountItem::Clone( SfxItemPool
* /*pPool*/) const
659 return new XGradientStepCountItem( *this );
662 /*************************************************************************
664 |* SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, sal_uInt16 nVer) const
666 *************************************************************************/
668 SfxPoolItem
* XGradientStepCountItem::Create(SvStream
& rIn
, sal_uInt16
/*nVer*/) const
670 return new XGradientStepCountItem( rIn
);
673 //------------------------------------------------------------------------
675 SfxItemPresentation
XGradientStepCountItem::GetPresentation
677 SfxItemPresentation ePres
,
678 SfxMapUnit
/*eCoreUnit*/,
679 SfxMapUnit
/*ePresUnit*/,
680 OUString
& rText
, const IntlWrapper
*
687 case SFX_ITEM_PRESENTATION_NONE
:
689 case SFX_ITEM_PRESENTATION_COMPLETE
:
690 // rText = OUString( ResId( RID_SVXSTR_GRADIENTSTEPCOUNT, DIALOG_MGR() ) ) + ": ";
691 case SFX_ITEM_PRESENTATION_NAMELESS
:
692 rText
+= OUString::number(GetValue());
695 return SFX_ITEM_PRESENTATION_NONE
;
700 //------------------------------
701 // class XFillBmpTileItem
702 //------------------------------
703 TYPEINIT1_AUTOFACTORY( XFillBmpTileItem
, SfxBoolItem
);
705 XFillBmpTileItem::XFillBmpTileItem( sal_Bool bTile
) :
706 SfxBoolItem( XATTR_FILLBMP_TILE
, bTile
)
710 XFillBmpTileItem::XFillBmpTileItem( SvStream
& rIn
) :
711 SfxBoolItem( XATTR_FILLBMP_TILE
, rIn
)
715 SfxPoolItem
* XFillBmpTileItem::Clone( SfxItemPool
* /*pPool*/) const
717 return new XFillBmpTileItem( *this );
720 SfxPoolItem
* XFillBmpTileItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/) const
722 return new XFillBmpTileItem( rIn
);
725 SfxItemPresentation
XFillBmpTileItem::GetPresentation
727 SfxItemPresentation ePres
,
728 SfxMapUnit
/*eCoreUnit*/,
729 SfxMapUnit
/*ePresUnit*/,
730 OUString
& rText
, const IntlWrapper
*
737 case SFX_ITEM_PRESENTATION_NONE
:
739 case SFX_ITEM_PRESENTATION_COMPLETE
:
740 case SFX_ITEM_PRESENTATION_NAMELESS
:
743 return SFX_ITEM_PRESENTATION_NONE
;
748 //------------------------------
749 // class XFillBmpTilePosItem
750 //------------------------------
751 TYPEINIT1_AUTOFACTORY( XFillBmpPosItem
, SfxEnumItem
);
753 XFillBmpPosItem::XFillBmpPosItem( RECT_POINT eRP
) :
754 SfxEnumItem( XATTR_FILLBMP_POS
, sal::static_int_cast
< sal_uInt16
>( eRP
) )
758 XFillBmpPosItem::XFillBmpPosItem( SvStream
& rIn
) :
759 SfxEnumItem( XATTR_FILLBMP_POS
, rIn
)
763 SfxPoolItem
* XFillBmpPosItem::Clone( SfxItemPool
* /*pPool*/) const
765 return new XFillBmpPosItem( *this );
768 SfxPoolItem
* XFillBmpPosItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/) const
770 return new XFillBmpPosItem( rIn
);
773 SfxItemPresentation
XFillBmpPosItem::GetPresentation
775 SfxItemPresentation ePres
,
776 SfxMapUnit
/*eCoreUnit*/,
777 SfxMapUnit
/*ePresUnit*/,
778 OUString
& rText
, const IntlWrapper
*
785 case SFX_ITEM_PRESENTATION_NONE
:
787 case SFX_ITEM_PRESENTATION_COMPLETE
:
788 case SFX_ITEM_PRESENTATION_NAMELESS
:
791 return SFX_ITEM_PRESENTATION_NONE
;
795 sal_uInt16
XFillBmpPosItem::GetValueCount() const
801 //------------------------------
802 // class XFillBmpTileSizeXItem
803 //------------------------------
804 TYPEINIT1_AUTOFACTORY( XFillBmpSizeXItem
, SfxMetricItem
);
806 XFillBmpSizeXItem::XFillBmpSizeXItem( long nSizeX
) :
807 SfxMetricItem( XATTR_FILLBMP_SIZEX
, nSizeX
)
811 XFillBmpSizeXItem::XFillBmpSizeXItem( SvStream
& rIn
) :
812 SfxMetricItem( XATTR_FILLBMP_SIZEX
, rIn
)
816 SfxPoolItem
* XFillBmpSizeXItem::Clone( SfxItemPool
* /*pPool*/) const
818 return new XFillBmpSizeXItem( *this );
821 SfxPoolItem
* XFillBmpSizeXItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/) const
823 return new XFillBmpSizeXItem( rIn
);
826 SfxItemPresentation
XFillBmpSizeXItem::GetPresentation
828 SfxItemPresentation ePres
,
829 SfxMapUnit
/*eCoreUnit*/,
830 SfxMapUnit
/*ePresUnit*/,
831 OUString
& rText
, const IntlWrapper
*
838 case SFX_ITEM_PRESENTATION_NONE
:
840 case SFX_ITEM_PRESENTATION_COMPLETE
:
841 case SFX_ITEM_PRESENTATION_NAMELESS
:
844 return SFX_ITEM_PRESENTATION_NONE
;
848 bool XFillBmpSizeXItem::HasMetrics() const
850 return GetValue() > 0L;
854 //------------------------------
855 // class XFillBmpTileSizeYItem
856 //------------------------------
857 TYPEINIT1_AUTOFACTORY( XFillBmpSizeYItem
, SfxMetricItem
);
859 XFillBmpSizeYItem::XFillBmpSizeYItem( long nSizeY
) :
860 SfxMetricItem( XATTR_FILLBMP_SIZEY
, nSizeY
)
864 XFillBmpSizeYItem::XFillBmpSizeYItem( SvStream
& rIn
) :
865 SfxMetricItem( XATTR_FILLBMP_SIZEY
, rIn
)
869 SfxPoolItem
* XFillBmpSizeYItem::Clone( SfxItemPool
* /*pPool*/) const
871 return new XFillBmpSizeYItem( *this );
874 SfxPoolItem
* XFillBmpSizeYItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/) const
876 return new XFillBmpSizeYItem( rIn
);
879 SfxItemPresentation
XFillBmpSizeYItem::GetPresentation
881 SfxItemPresentation ePres
,
882 SfxMapUnit
/*eCoreUnit*/,
883 SfxMapUnit
/*ePresUnit*/,
884 OUString
& rText
, const IntlWrapper
*
891 case SFX_ITEM_PRESENTATION_NONE
:
893 case SFX_ITEM_PRESENTATION_COMPLETE
:
894 case SFX_ITEM_PRESENTATION_NAMELESS
:
897 return SFX_ITEM_PRESENTATION_NONE
;
901 bool XFillBmpSizeYItem::HasMetrics() const
903 return GetValue() > 0L;
907 //------------------------------
908 // class XFillBmpTileLogItem
909 //------------------------------
910 TYPEINIT1_AUTOFACTORY( XFillBmpSizeLogItem
, SfxBoolItem
);
912 XFillBmpSizeLogItem::XFillBmpSizeLogItem( sal_Bool bLog
) :
913 SfxBoolItem( XATTR_FILLBMP_SIZELOG
, bLog
)
917 XFillBmpSizeLogItem::XFillBmpSizeLogItem( SvStream
& rIn
) :
918 SfxBoolItem( XATTR_FILLBMP_SIZELOG
, rIn
)
922 SfxPoolItem
* XFillBmpSizeLogItem::Clone( SfxItemPool
* /*pPool*/) const
924 return new XFillBmpSizeLogItem( *this );
927 SfxPoolItem
* XFillBmpSizeLogItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/) const
929 return new XFillBmpSizeLogItem( rIn
);
932 SfxItemPresentation
XFillBmpSizeLogItem::GetPresentation
934 SfxItemPresentation ePres
,
935 SfxMapUnit
/*eCoreUnit*/,
936 SfxMapUnit
/*ePresUnit*/,
937 OUString
& rText
, const IntlWrapper
*
944 case SFX_ITEM_PRESENTATION_NONE
:
946 case SFX_ITEM_PRESENTATION_COMPLETE
:
947 case SFX_ITEM_PRESENTATION_NAMELESS
:
950 return SFX_ITEM_PRESENTATION_NONE
;
955 //------------------------------
956 // class XFillBmpTileOffXItem
957 //------------------------------
958 TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetXItem
, SfxUInt16Item
);
960 XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( sal_uInt16 nOffX
) :
961 SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX
, nOffX
)
965 XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( SvStream
& rIn
) :
966 SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX
, rIn
)
970 SfxPoolItem
* XFillBmpTileOffsetXItem::Clone( SfxItemPool
* /*pPool*/) const
972 return new XFillBmpTileOffsetXItem( *this );
975 SfxPoolItem
* XFillBmpTileOffsetXItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/) const
977 return new XFillBmpTileOffsetXItem( rIn
);
980 SfxItemPresentation
XFillBmpTileOffsetXItem::GetPresentation
982 SfxItemPresentation ePres
,
983 SfxMapUnit
/*eCoreUnit*/,
984 SfxMapUnit
/*ePresUnit*/,
985 OUString
& rText
, const IntlWrapper
*
992 case SFX_ITEM_PRESENTATION_NONE
:
994 case SFX_ITEM_PRESENTATION_COMPLETE
:
995 case SFX_ITEM_PRESENTATION_NAMELESS
:
998 return SFX_ITEM_PRESENTATION_NONE
;
1003 //------------------------------
1004 // class XFillBmpTileOffYItem
1005 //------------------------------
1006 TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetYItem
, SfxUInt16Item
);
1008 XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( sal_uInt16 nOffY
) :
1009 SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY
, nOffY
)
1013 XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( SvStream
& rIn
) :
1014 SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY
, rIn
)
1018 SfxPoolItem
* XFillBmpTileOffsetYItem::Clone( SfxItemPool
* /*pPool*/) const
1020 return new XFillBmpTileOffsetYItem( *this );
1023 SfxPoolItem
* XFillBmpTileOffsetYItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/) const
1025 return new XFillBmpTileOffsetYItem( rIn
);
1028 SfxItemPresentation
XFillBmpTileOffsetYItem::GetPresentation
1030 SfxItemPresentation ePres
,
1031 SfxMapUnit
/*eCoreUnit*/,
1032 SfxMapUnit
/*ePresUnit*/,
1033 OUString
& rText
, const IntlWrapper
*
1040 case SFX_ITEM_PRESENTATION_NONE
:
1042 case SFX_ITEM_PRESENTATION_COMPLETE
:
1043 case SFX_ITEM_PRESENTATION_NAMELESS
:
1046 return SFX_ITEM_PRESENTATION_NONE
;
1051 //------------------------------
1052 // class XFillBmpStretchItem
1053 //------------------------------
1054 TYPEINIT1_AUTOFACTORY( XFillBmpStretchItem
, SfxBoolItem
);
1056 XFillBmpStretchItem::XFillBmpStretchItem( sal_Bool bStretch
) :
1057 SfxBoolItem( XATTR_FILLBMP_STRETCH
, bStretch
)
1061 XFillBmpStretchItem::XFillBmpStretchItem( SvStream
& rIn
) :
1062 SfxBoolItem( XATTR_FILLBMP_STRETCH
, rIn
)
1066 SfxPoolItem
* XFillBmpStretchItem::Clone( SfxItemPool
* /*pPool*/) const
1068 return new XFillBmpStretchItem( *this );
1071 SfxPoolItem
* XFillBmpStretchItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/) const
1073 return new XFillBmpStretchItem( rIn
);
1076 SfxItemPresentation
XFillBmpStretchItem::GetPresentation
1078 SfxItemPresentation ePres
,
1079 SfxMapUnit
/*eCoreUnit*/,
1080 SfxMapUnit
/*ePresUnit*/,
1081 OUString
& rText
, const IntlWrapper
*
1088 case SFX_ITEM_PRESENTATION_NONE
:
1090 case SFX_ITEM_PRESENTATION_COMPLETE
:
1091 case SFX_ITEM_PRESENTATION_NAMELESS
:
1094 return SFX_ITEM_PRESENTATION_NONE
;
1099 //------------------------------
1100 // class XFillBmpTileOffPosXItem
1101 //------------------------------
1102 TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetXItem
, SfxUInt16Item
);
1104 XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( sal_uInt16 nOffPosX
) :
1105 SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX
, nOffPosX
)
1109 XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( SvStream
& rIn
) :
1110 SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX
, rIn
)
1114 SfxPoolItem
* XFillBmpPosOffsetXItem::Clone( SfxItemPool
* /*pPool*/) const
1116 return new XFillBmpPosOffsetXItem( *this );
1119 SfxPoolItem
* XFillBmpPosOffsetXItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/) const
1121 return new XFillBmpPosOffsetXItem( rIn
);
1124 SfxItemPresentation
XFillBmpPosOffsetXItem::GetPresentation
1126 SfxItemPresentation ePres
,
1127 SfxMapUnit
/*eCoreUnit*/,
1128 SfxMapUnit
/*ePresUnit*/,
1129 OUString
& rText
, const IntlWrapper
*
1136 case SFX_ITEM_PRESENTATION_NONE
:
1138 case SFX_ITEM_PRESENTATION_COMPLETE
:
1139 case SFX_ITEM_PRESENTATION_NAMELESS
:
1142 return SFX_ITEM_PRESENTATION_NONE
;
1147 //------------------------------
1148 // class XFillBmpTileOffPosYItem
1149 //------------------------------
1150 TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetYItem
, SfxUInt16Item
);
1152 XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( sal_uInt16 nOffPosY
) :
1153 SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY
, nOffPosY
)
1157 XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( SvStream
& rIn
) :
1158 SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY
, rIn
)
1162 SfxPoolItem
* XFillBmpPosOffsetYItem::Clone( SfxItemPool
* /*pPool*/) const
1164 return new XFillBmpPosOffsetYItem( *this );
1167 SfxPoolItem
* XFillBmpPosOffsetYItem::Create( SvStream
& rIn
, sal_uInt16
/*nVer*/) const
1169 return new XFillBmpPosOffsetYItem( rIn
);
1172 SfxItemPresentation
XFillBmpPosOffsetYItem::GetPresentation
1174 SfxItemPresentation ePres
,
1175 SfxMapUnit
/*eCoreUnit*/,
1176 SfxMapUnit
/*ePresUnit*/,
1177 OUString
& rText
, const IntlWrapper
*
1184 case SFX_ITEM_PRESENTATION_NONE
:
1186 case SFX_ITEM_PRESENTATION_COMPLETE
:
1187 case SFX_ITEM_PRESENTATION_NAMELESS
:
1190 return SFX_ITEM_PRESENTATION_NONE
;
1194 //--------------------------
1195 // class XFillBackgroundItem
1196 //--------------------------
1197 TYPEINIT1_AUTOFACTORY(XFillBackgroundItem
, SfxBoolItem
);
1199 /*************************************************************************
1201 |* XFillBackgroundItem::XFillBackgroundItem( sal_Bool )
1203 *************************************************************************/
1205 XFillBackgroundItem::XFillBackgroundItem( sal_Bool bFill
) :
1206 SfxBoolItem( XATTR_FILLBACKGROUND
, bFill
)
1210 /*************************************************************************
1212 |* XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn )
1214 *************************************************************************/
1216 XFillBackgroundItem::XFillBackgroundItem( SvStream
& rIn
) :
1217 SfxBoolItem( XATTR_FILLBACKGROUND
, rIn
)
1221 /*************************************************************************
1223 |* XFillBackgroundItem::Clone( SfxItemPool* pPool ) const
1225 *************************************************************************/
1227 SfxPoolItem
* XFillBackgroundItem::Clone( SfxItemPool
* /*pPool*/) const
1229 return new XFillBackgroundItem( *this );
1232 /*************************************************************************
1234 |* SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, sal_uInt16 nVer) const
1236 *************************************************************************/
1238 SfxPoolItem
* XFillBackgroundItem::Create(SvStream
& rIn
, sal_uInt16
/*nVer*/) const
1240 return new XFillBackgroundItem( rIn
);
1243 //------------------------------------------------------------------------
1245 SfxItemPresentation
XFillBackgroundItem::GetPresentation( SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/,
1246 SfxMapUnit
/*ePresUnit*/, OUString
& rText
, const IntlWrapper
*) const
1252 case SFX_ITEM_PRESENTATION_NONE
:
1255 case SFX_ITEM_PRESENTATION_COMPLETE
:
1256 case SFX_ITEM_PRESENTATION_NAMELESS
:
1259 return SFX_ITEM_PRESENTATION_NONE
;
1265 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */