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