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 _SVX_BRKITEM_HXX 28 #define _SVX_BRKITEM_HXX 29 30 // include --------------------------------------------------------------- 31 32 #include <svl/eitem.hxx> 33 #include <editeng/svxenum.hxx> 34 #include <editeng/editengdllapi.h> 35 36 namespace rtl 37 { 38 class OUString; 39 } 40 41 // class SvxFmtBreakItem ------------------------------------------------- 42 43 /* 44 [Beschreibung] 45 Dieses Item beschreibt ein Umbruch-Attribut 46 Automatisch?, Seiten- oder Spaltenumbruch, davor oder danach? 47 */ 48 #define FMTBREAK_NOAUTO ((sal_uInt16)0x0001) 49 50 class EDITENG_DLLPUBLIC SvxFmtBreakItem : public SfxEnumItem 51 { 52 public: 53 TYPEINFO(); 54 55 inline SvxFmtBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/, 56 const sal_uInt16 nWhich ); 57 inline SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ); 58 inline SvxFmtBreakItem& operator=( const SvxFmtBreakItem& rCpy ); 59 60 // "pure virtual Methoden" vom SfxPoolItem 61 virtual int operator==( const SfxPoolItem& ) const; 62 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; 63 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); 64 65 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, 66 SfxMapUnit eCoreMetric, 67 SfxMapUnit ePresMetric, 68 String &rText, const IntlWrapper * = 0 ) const; 69 virtual String GetValueTextByPos( sal_uInt16 nPos ) const; 70 71 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; 72 virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; 73 virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; 74 virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; 75 virtual sal_uInt16 GetValueCount() const; 76 77 // MS VC4.0 kommt durcheinander 78 void SetValue( sal_uInt16 nNewVal ) 79 {SfxEnumItem::SetValue(nNewVal); } 80 SvxBreak GetBreak() const { return SvxBreak( GetValue() ); } 81 void SetBreak( const SvxBreak eNew ) 82 { SetValue( (sal_uInt16)eNew ); } 83 }; 84 85 86 inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxBreak eBreak, 87 const sal_uInt16 _nWhich ) : 88 SfxEnumItem( _nWhich, (sal_uInt16)eBreak ) 89 {} 90 91 inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ) : 92 SfxEnumItem( rBreak ) 93 {} 94 95 inline SvxFmtBreakItem& SvxFmtBreakItem::operator=( 96 const SvxFmtBreakItem& rBreak ) 97 { 98 SetValue( rBreak.GetValue() ); 99 return *this; 100 } 101 102 #endif 103 104