xref: /trunk/main/sw/inc/fmtline.hxx (revision cdf0e10c)
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 SW_FMTLINE_HXX
28 #define SW_FMTLINE_HXX
29 
30 
31 #include <svl/poolitem.hxx>
32 #include <hintids.hxx>
33 #include <format.hxx>
34 #include "swdllapi.h"
35 
36 class IntlWrapper;
37 
38 class SW_DLLPUBLIC SwFmtLineNumber: public SfxPoolItem
39 {
40 	sal_uLong nStartValue	:24; //Startwert fuer den Absatz, 0 == kein Startwert
41 	sal_uLong bCountLines	:1;	 //Zeilen des Absatzes sollen mitgezaehlt werden.
42 
43 public:
44 	SwFmtLineNumber();
45 	~SwFmtLineNumber();
46 
47     TYPEINFO();
48 
49 	// "pure virtual Methoden" vom SfxPoolItem
50 	virtual int             operator==( const SfxPoolItem& ) const;
51 	virtual SfxPoolItem*	Clone( SfxItemPool* pPool = 0 ) const;
52 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
53 									SfxMapUnit eCoreMetric,
54 									SfxMapUnit ePresMetric,
55 									String &rText,
56                                     const IntlWrapper*    pIntl = 0 ) const;
57 	virtual	sal_Bool        	 QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
58 	virtual	sal_Bool			 PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
59 
60 	sal_uLong GetStartValue() const { return nStartValue; }
61 	sal_Bool  IsCount()		  const { return bCountLines != 0; }
62 
63 	void SetStartValue( sal_uLong nNew ) { nStartValue = nNew; }
64 	void SetCountLines( sal_Bool b )     { bCountLines = b;	   }
65 };
66 
67 inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(sal_Bool bInP) const
68 	{ return (const SwFmtLineNumber&)Get( RES_LINENUMBER,bInP); }
69 
70 #endif
71 
72