1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _SXMTPITM_HXX 28 #define _SXMTPITM_HXX 29 30 #include <svx/svddef.hxx> 31 #include <svl/eitem.hxx> 32 #include "svx/svxdllapi.h" 33 34 enum SdrMeasureTextHPos {SDRMEASURE_TEXTHAUTO,SDRMEASURE_TEXTLEFTOUTSIDE,SDRMEASURE_TEXTINSIDE,SDRMEASURE_TEXTRIGHTOUTSIDE}; 35 enum SdrMeasureTextVPos {SDRMEASURE_TEXTVAUTO,SDRMEASURE_ABOVE,SDRMEASURETEXT_BREAKEDLINE,SDRMEASURE_BELOW,SDRMEASURETEXT_VERTICALCENTERED}; 36 37 //------------------------------ 38 // class SdrMeasureTextHPosItem 39 //------------------------------ 40 class SVX_DLLPUBLIC SdrMeasureTextHPosItem: public SfxEnumItem { 41 public: 42 TYPEINFO(); 43 SdrMeasureTextHPosItem(SdrMeasureTextHPos ePos=SDRMEASURE_TEXTHAUTO): SfxEnumItem(SDRATTR_MEASURETEXTHPOS,sal::static_int_cast< sal_uInt16 >(ePos)) {} 44 SdrMeasureTextHPosItem(SvStream& rIn) : SfxEnumItem(SDRATTR_MEASURETEXTHPOS,rIn) {} 45 virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; 46 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const; 47 virtual sal_uInt16 GetValueCount() const; // { return 4; } 48 SdrMeasureTextHPos GetValue() const { return (SdrMeasureTextHPos)SfxEnumItem::GetValue(); } 49 50 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; 51 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); 52 53 virtual String GetValueTextByPos(sal_uInt16 nPos) const; 54 virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; 55 }; 56 57 //------------------------------ 58 // class SdrMeasureTextVPosItem 59 //------------------------------ 60 class SVX_DLLPUBLIC SdrMeasureTextVPosItem: public SfxEnumItem { 61 public: 62 TYPEINFO(); 63 SdrMeasureTextVPosItem(SdrMeasureTextVPos ePos=SDRMEASURE_TEXTVAUTO): SfxEnumItem(SDRATTR_MEASURETEXTVPOS,sal::static_int_cast< sal_uInt16 >(ePos)) {} 64 SdrMeasureTextVPosItem(SvStream& rIn) : SfxEnumItem(SDRATTR_MEASURETEXTVPOS,rIn) {} 65 virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; 66 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const; 67 virtual sal_uInt16 GetValueCount() const; // { return 5; } 68 SdrMeasureTextVPos GetValue() const { return (SdrMeasureTextVPos)SfxEnumItem::GetValue(); } 69 70 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; 71 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); 72 73 virtual String GetValueTextByPos(sal_uInt16 nPos) const; 74 virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; 75 }; 76 77 #endif 78