xref: /aoo41x/main/sc/inc/attrib.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef SC_SCATTR_HXX
29*cdf0e10cSrcweir #define SC_SCATTR_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <svl/poolitem.hxx>
32*cdf0e10cSrcweir #include <svl/intitem.hxx>
33*cdf0e10cSrcweir #include <svl/eitem.hxx>
34*cdf0e10cSrcweir #include "scdllapi.h"
35*cdf0e10cSrcweir #include "global.hxx"
36*cdf0e10cSrcweir #include "address.hxx"
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir //------------------------------------------------------------------------
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir 										// Flags fuer durch Merge verdeckte Zellen
41*cdf0e10cSrcweir 										// und Control fuer Auto-Filter
42*cdf0e10cSrcweir #define SC_MF_HOR               0x0001
43*cdf0e10cSrcweir #define SC_MF_VER               0x0002
44*cdf0e10cSrcweir #define SC_MF_AUTO              0x0004  /// autofilter arrow
45*cdf0e10cSrcweir #define SC_MF_BUTTON            0x0008  /// field button for datapilot
46*cdf0e10cSrcweir #define SC_MF_SCENARIO          0x0010
47*cdf0e10cSrcweir #define SC_MF_BUTTON_POPUP      0x0020  /// dp button with popup arrow
48*cdf0e10cSrcweir #define SC_MF_HIDDEN_MEMBER     0x0040  /// dp field button with presence of hidden member
49*cdf0e10cSrcweir #define SC_MF_DP_TABLE          0x0080  /// dp table output
50*cdf0e10cSrcweir 
51*cdf0e10cSrcweir #define SC_MF_ALL               0x00FF
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir class EditTextObject;
55*cdf0e10cSrcweir class SvxBorderLine;
56*cdf0e10cSrcweir 
57*cdf0e10cSrcweir sal_Bool SC_DLLPUBLIC ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther );
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir //------------------------------------------------------------------------
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir class SC_DLLPUBLIC ScMergeAttr: public SfxPoolItem
62*cdf0e10cSrcweir {
63*cdf0e10cSrcweir 	SCsCOL      nColMerge;
64*cdf0e10cSrcweir 	SCsROW      nRowMerge;
65*cdf0e10cSrcweir public:
66*cdf0e10cSrcweir 				TYPEINFO();
67*cdf0e10cSrcweir 				ScMergeAttr();
68*cdf0e10cSrcweir 				ScMergeAttr( SCsCOL nCol, SCsROW nRow = 0);
69*cdf0e10cSrcweir 				ScMergeAttr( const ScMergeAttr& );
70*cdf0e10cSrcweir 				~ScMergeAttr();
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir 	virtual String          	GetValueText() const;
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir 	virtual int             operator==( const SfxPoolItem& ) const;
75*cdf0e10cSrcweir 	virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
76*cdf0e10cSrcweir 	virtual SfxPoolItem*    Create( SvStream& rStream, sal_uInt16 nVer ) const;
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir 			SCsCOL          GetColMerge() const {return nColMerge; }
79*cdf0e10cSrcweir 			SCsROW          GetRowMerge() const {return nRowMerge; }
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir 			sal_Bool			IsMerged() const { return nColMerge>1 || nRowMerge>1; }
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir 	inline  ScMergeAttr& operator=(const ScMergeAttr& rMerge)
84*cdf0e10cSrcweir 			{
85*cdf0e10cSrcweir 				nColMerge = rMerge.nColMerge;
86*cdf0e10cSrcweir 				nRowMerge = rMerge.nRowMerge;
87*cdf0e10cSrcweir 				return *this;
88*cdf0e10cSrcweir 			}
89*cdf0e10cSrcweir };
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir //------------------------------------------------------------------------
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir class SC_DLLPUBLIC ScMergeFlagAttr: public SfxInt16Item
94*cdf0e10cSrcweir {
95*cdf0e10cSrcweir public:
96*cdf0e10cSrcweir 			ScMergeFlagAttr();
97*cdf0e10cSrcweir 			ScMergeFlagAttr(sal_Int16 nFlags);
98*cdf0e10cSrcweir 			~ScMergeFlagAttr();
99*cdf0e10cSrcweir 
100*cdf0e10cSrcweir 	sal_Bool	IsHorOverlapped() const		{ return ( GetValue() & SC_MF_HOR ) != 0;  }
101*cdf0e10cSrcweir 	sal_Bool	IsVerOverlapped() const		{ return ( GetValue() & SC_MF_VER ) != 0;  }
102*cdf0e10cSrcweir 	sal_Bool	IsOverlapped() const		{ return ( GetValue() & ( SC_MF_HOR | SC_MF_VER ) ) != 0; }
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir 	sal_Bool	HasAutoFilter() const		{ return ( GetValue() & SC_MF_AUTO ) != 0; }
105*cdf0e10cSrcweir 	sal_Bool	HasButton() const			{ return ( GetValue() & SC_MF_BUTTON ) != 0; }
106*cdf0e10cSrcweir     bool    HasDPTable() const          { return ( GetValue() & SC_MF_DP_TABLE ) != 0; }
107*cdf0e10cSrcweir 
108*cdf0e10cSrcweir 	sal_Bool	IsScenario() const			{ return ( GetValue() & SC_MF_SCENARIO ) != 0; }
109*cdf0e10cSrcweir };
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir //------------------------------------------------------------------------
112*cdf0e10cSrcweir class SC_DLLPUBLIC ScProtectionAttr: public SfxPoolItem
113*cdf0e10cSrcweir {
114*cdf0e10cSrcweir 	sal_Bool        bProtection;    // Zelle schuetzen
115*cdf0e10cSrcweir 	sal_Bool        bHideFormula;   // Formel nicht Anzeigen
116*cdf0e10cSrcweir 	sal_Bool        bHideCell;      // Zelle nicht Anzeigen
117*cdf0e10cSrcweir 	sal_Bool        bHidePrint;     // Zelle nicht Ausdrucken
118*cdf0e10cSrcweir public:
119*cdf0e10cSrcweir 							TYPEINFO();
120*cdf0e10cSrcweir 							ScProtectionAttr();
121*cdf0e10cSrcweir 							ScProtectionAttr(   sal_Bool bProtect,
122*cdf0e10cSrcweir 												sal_Bool bHFormula = sal_False,
123*cdf0e10cSrcweir 												sal_Bool bHCell = sal_False,
124*cdf0e10cSrcweir 												sal_Bool bHPrint = sal_False);
125*cdf0e10cSrcweir 							ScProtectionAttr( const ScProtectionAttr& );
126*cdf0e10cSrcweir 							~ScProtectionAttr();
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir 	virtual String          	GetValueText() const;
129*cdf0e10cSrcweir 	virtual SfxItemPresentation GetPresentation(
130*cdf0e10cSrcweir 									SfxItemPresentation ePres,
131*cdf0e10cSrcweir 									SfxMapUnit eCoreMetric,
132*cdf0e10cSrcweir 									SfxMapUnit ePresMetric,
133*cdf0e10cSrcweir 									String& rText,
134*cdf0e10cSrcweir                                     const IntlWrapper* pIntl = 0 ) const;
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir 	virtual int             operator==( const SfxPoolItem& ) const;
137*cdf0e10cSrcweir 	virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
138*cdf0e10cSrcweir 	virtual SfxPoolItem*    Create( SvStream& rStream, sal_uInt16 nVer ) const;
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir 	virtual	sal_Bool			QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
141*cdf0e10cSrcweir 	virtual	sal_Bool			PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
142*cdf0e10cSrcweir 
143*cdf0e10cSrcweir 			sal_Bool            GetProtection() const { return bProtection; }
144*cdf0e10cSrcweir 			sal_Bool            SetProtection( sal_Bool bProtect);
145*cdf0e10cSrcweir 			sal_Bool            GetHideFormula() const { return bHideFormula; }
146*cdf0e10cSrcweir 			sal_Bool            SetHideFormula( sal_Bool bHFormula);
147*cdf0e10cSrcweir 			sal_Bool            GetHideCell() const { return bHideCell; }
148*cdf0e10cSrcweir 			sal_Bool            SetHideCell( sal_Bool bHCell);
149*cdf0e10cSrcweir 			sal_Bool            GetHidePrint() const { return bHidePrint; }
150*cdf0e10cSrcweir 			sal_Bool            SetHidePrint( sal_Bool bHPrint);
151*cdf0e10cSrcweir 	inline  ScProtectionAttr& operator=(const ScProtectionAttr& rProtection)
152*cdf0e10cSrcweir 			{
153*cdf0e10cSrcweir 				bProtection = rProtection.bProtection;
154*cdf0e10cSrcweir 				bHideFormula = rProtection.bHideFormula;
155*cdf0e10cSrcweir 				bHideCell = rProtection.bHideCell;
156*cdf0e10cSrcweir 				bHidePrint = rProtection.bHidePrint;
157*cdf0e10cSrcweir 				return *this;
158*cdf0e10cSrcweir 			}
159*cdf0e10cSrcweir };
160*cdf0e10cSrcweir 
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir //----------------------------------------------------------------------------
163*cdf0e10cSrcweir // ScRangeItem: verwaltet einen Tabellenbereich
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir #define SCR_INVALID		0x01
166*cdf0e10cSrcweir #define SCR_ALLTABS		0x02
167*cdf0e10cSrcweir #define SCR_TONEWTAB	0x04
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir class ScRangeItem : public SfxPoolItem
170*cdf0e10cSrcweir {
171*cdf0e10cSrcweir public:
172*cdf0e10cSrcweir 			TYPEINFO();
173*cdf0e10cSrcweir 
174*cdf0e10cSrcweir 			inline	ScRangeItem( const sal_uInt16 nWhich );
175*cdf0e10cSrcweir 			inline	ScRangeItem( const sal_uInt16   nWhich,
176*cdf0e10cSrcweir 								 const ScRange& rRange,
177*cdf0e10cSrcweir 								 const sal_uInt16 	nNewFlags = 0 );
178*cdf0e10cSrcweir 			inline	ScRangeItem( const ScRangeItem& rCpy );
179*cdf0e10cSrcweir 
180*cdf0e10cSrcweir 	inline ScRangeItem& operator=( const ScRangeItem &rCpy );
181*cdf0e10cSrcweir 
182*cdf0e10cSrcweir 	// "pure virtual Methoden" vom SfxPoolItem
183*cdf0e10cSrcweir 	virtual int 				operator==( const SfxPoolItem& ) const;
184*cdf0e10cSrcweir 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
185*cdf0e10cSrcweir 												 SfxMapUnit eCoreMetric,
186*cdf0e10cSrcweir 												 SfxMapUnit ePresMetric,
187*cdf0e10cSrcweir 												 String &rText,
188*cdf0e10cSrcweir                                                  const IntlWrapper* pIntl = 0 ) const;
189*cdf0e10cSrcweir 	virtual SfxPoolItem*		Clone( SfxItemPool *pPool = 0 ) const;
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir 	const ScRange&	GetRange() const 				{ return aRange;  }
192*cdf0e10cSrcweir 	void			SetRange( const ScRange& rNew )	{ aRange = rNew; }
193*cdf0e10cSrcweir 
194*cdf0e10cSrcweir 	sal_uInt16			GetFlags() const 				{ return nFlags;  }
195*cdf0e10cSrcweir 	void			SetFlags( sal_uInt16 nNew )	 		{ nFlags = nNew; }
196*cdf0e10cSrcweir 
197*cdf0e10cSrcweir private:
198*cdf0e10cSrcweir 	ScRange aRange;
199*cdf0e10cSrcweir 	sal_uInt16	nFlags;
200*cdf0e10cSrcweir };
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir inline ScRangeItem::ScRangeItem( const sal_uInt16 nWhichP )
203*cdf0e10cSrcweir     :   SfxPoolItem( nWhichP ), nFlags( SCR_INVALID ) // == ungueltige Area
204*cdf0e10cSrcweir {
205*cdf0e10cSrcweir }
206*cdf0e10cSrcweir 
207*cdf0e10cSrcweir inline ScRangeItem::ScRangeItem( const sal_uInt16   nWhichP,
208*cdf0e10cSrcweir 								 const ScRange& rRange,
209*cdf0e10cSrcweir 								 const sal_uInt16	nNew )
210*cdf0e10cSrcweir     : SfxPoolItem( nWhichP ), aRange( rRange ), nFlags( nNew )
211*cdf0e10cSrcweir {
212*cdf0e10cSrcweir }
213*cdf0e10cSrcweir 
214*cdf0e10cSrcweir inline ScRangeItem::ScRangeItem( const ScRangeItem& rCpy )
215*cdf0e10cSrcweir 	: SfxPoolItem( rCpy.Which() ), aRange( rCpy.aRange ), nFlags( rCpy.nFlags )
216*cdf0e10cSrcweir {}
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir inline ScRangeItem& ScRangeItem::operator=( const ScRangeItem &rCpy )
219*cdf0e10cSrcweir {
220*cdf0e10cSrcweir 	aRange = rCpy.aRange;
221*cdf0e10cSrcweir 	return *this;
222*cdf0e10cSrcweir }
223*cdf0e10cSrcweir 
224*cdf0e10cSrcweir //----------------------------------------------------------------------------
225*cdf0e10cSrcweir // ScTableListItem: verwaltet eine Liste von Tabellen
226*cdf0e10cSrcweir //----------------------------------------------------------------------------
227*cdf0e10cSrcweir class ScTableListItem : public SfxPoolItem
228*cdf0e10cSrcweir {
229*cdf0e10cSrcweir public:
230*cdf0e10cSrcweir 	TYPEINFO();
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir 	inline	ScTableListItem( const sal_uInt16 nWhich );
233*cdf0e10cSrcweir 			ScTableListItem( const ScTableListItem& rCpy );
234*cdf0e10cSrcweir //UNUSED2008-05  ScTableListItem( const sal_uInt16 nWhich, const List& rList );
235*cdf0e10cSrcweir 			~ScTableListItem();
236*cdf0e10cSrcweir 
237*cdf0e10cSrcweir 	ScTableListItem& operator=( const ScTableListItem &rCpy );
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir 	// "pure virtual Methoden" vom SfxPoolItem
240*cdf0e10cSrcweir 	virtual int 				operator==( const SfxPoolItem& ) const;
241*cdf0e10cSrcweir 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
242*cdf0e10cSrcweir 												 SfxMapUnit eCoreMetric,
243*cdf0e10cSrcweir 												 SfxMapUnit ePresMetric,
244*cdf0e10cSrcweir 												 String &rText,
245*cdf0e10cSrcweir                                                  const IntlWrapper* pIntl = 0 ) const;
246*cdf0e10cSrcweir 	virtual SfxPoolItem*		Clone( SfxItemPool *pPool = 0 ) const;
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir //UNUSED2009-05 sal_Bool	GetTableList( List& aList ) const;
249*cdf0e10cSrcweir //UNUSED2009-05 void	SetTableList( const List& aList );
250*cdf0e10cSrcweir 
251*cdf0e10cSrcweir public:
252*cdf0e10cSrcweir 	sal_uInt16  nCount;
253*cdf0e10cSrcweir 	SCTAB*  pTabArr;
254*cdf0e10cSrcweir };
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir inline ScTableListItem::ScTableListItem( const sal_uInt16 nWhichP )
257*cdf0e10cSrcweir     : SfxPoolItem(nWhichP), nCount(0), pTabArr(NULL)
258*cdf0e10cSrcweir {}
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir //----------------------------------------------------------------------------
261*cdf0e10cSrcweir // Seitenformat-Item: Kopf-/Fusszeileninhalte
262*cdf0e10cSrcweir 
263*cdf0e10cSrcweir #define SC_HF_LEFTAREA   1
264*cdf0e10cSrcweir #define SC_HF_CENTERAREA 2
265*cdf0e10cSrcweir #define SC_HF_RIGHTAREA  3
266*cdf0e10cSrcweir 
267*cdf0e10cSrcweir class SC_DLLPUBLIC ScPageHFItem : public SfxPoolItem
268*cdf0e10cSrcweir {
269*cdf0e10cSrcweir 	EditTextObject* pLeftArea;
270*cdf0e10cSrcweir 	EditTextObject* pCenterArea;
271*cdf0e10cSrcweir 	EditTextObject* pRightArea;
272*cdf0e10cSrcweir 
273*cdf0e10cSrcweir public:
274*cdf0e10cSrcweir 				TYPEINFO();
275*cdf0e10cSrcweir 				ScPageHFItem( sal_uInt16 nWhich );
276*cdf0e10cSrcweir 				ScPageHFItem( const ScPageHFItem& rItem );
277*cdf0e10cSrcweir 				~ScPageHFItem();
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir 	virtual String          GetValueText() const;
280*cdf0e10cSrcweir 	virtual int             operator==( const SfxPoolItem& ) const;
281*cdf0e10cSrcweir 	virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
282*cdf0e10cSrcweir 
283*cdf0e10cSrcweir 	virtual SfxPoolItem*    Create( SvStream& rStream, sal_uInt16 nVer ) const;
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir 	virtual	sal_Bool			QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
286*cdf0e10cSrcweir 	virtual	sal_Bool			PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
287*cdf0e10cSrcweir 
288*cdf0e10cSrcweir 	const EditTextObject* GetLeftArea() const		{ return pLeftArea; }
289*cdf0e10cSrcweir 	const EditTextObject* GetCenterArea() const		{ return pCenterArea; }
290*cdf0e10cSrcweir 	const EditTextObject* GetRightArea() const		{ return pRightArea; }
291*cdf0e10cSrcweir 
292*cdf0e10cSrcweir 	void SetLeftArea( const EditTextObject& rNew );
293*cdf0e10cSrcweir 	void SetCenterArea( const EditTextObject& rNew );
294*cdf0e10cSrcweir 	void SetRightArea( const EditTextObject& rNew );
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir 	//Set mit Uebereignung der Pointer, nArea siehe defines oben
297*cdf0e10cSrcweir 	void SetArea( EditTextObject *pNew, int nArea );
298*cdf0e10cSrcweir };
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir 
301*cdf0e10cSrcweir //----------------------------------------------------------------------------
302*cdf0e10cSrcweir // Seitenformat-Item: Kopf-/Fusszeileninhalte
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir class SC_DLLPUBLIC ScViewObjectModeItem: public SfxEnumItem
305*cdf0e10cSrcweir {
306*cdf0e10cSrcweir public:
307*cdf0e10cSrcweir 				TYPEINFO();
308*cdf0e10cSrcweir 
309*cdf0e10cSrcweir 				ScViewObjectModeItem( sal_uInt16 nWhich );
310*cdf0e10cSrcweir 				ScViewObjectModeItem( sal_uInt16 nWhich, ScVObjMode eMode );
311*cdf0e10cSrcweir 				~ScViewObjectModeItem();
312*cdf0e10cSrcweir 
313*cdf0e10cSrcweir 	virtual sal_uInt16				GetValueCount() const;
314*cdf0e10cSrcweir 	virtual String				GetValueText( sal_uInt16 nVal ) const;
315*cdf0e10cSrcweir 	virtual SfxPoolItem*		Clone( SfxItemPool *pPool = 0 ) const;
316*cdf0e10cSrcweir 	virtual SfxPoolItem*		Create(SvStream &, sal_uInt16) const;
317*cdf0e10cSrcweir 	virtual sal_uInt16				GetVersion( sal_uInt16 nFileVersion ) const;
318*cdf0e10cSrcweir 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
319*cdf0e10cSrcweir 												 SfxMapUnit eCoreMetric,
320*cdf0e10cSrcweir 												 SfxMapUnit ePresMetric,
321*cdf0e10cSrcweir 												 String& rText,
322*cdf0e10cSrcweir                                                  const IntlWrapper* pIntl = 0 ) const;
323*cdf0e10cSrcweir };
324*cdf0e10cSrcweir 
325*cdf0e10cSrcweir //----------------------------------------------------------------------------
326*cdf0e10cSrcweir //
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir class ScDoubleItem : public SfxPoolItem
329*cdf0e10cSrcweir {
330*cdf0e10cSrcweir public:
331*cdf0e10cSrcweir 				TYPEINFO();
332*cdf0e10cSrcweir 				ScDoubleItem( sal_uInt16 nWhich, double nVal=0 );
333*cdf0e10cSrcweir 				ScDoubleItem( const ScDoubleItem& rItem );
334*cdf0e10cSrcweir 				~ScDoubleItem();
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir 	virtual String          GetValueText() const;
337*cdf0e10cSrcweir 	virtual int             operator==( const SfxPoolItem& ) const;
338*cdf0e10cSrcweir 	virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
339*cdf0e10cSrcweir 
340*cdf0e10cSrcweir 	virtual SfxPoolItem*    Create( SvStream& rStream, sal_uInt16 nVer ) const;
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir 	double GetValue() const		{ return nValue; }
343*cdf0e10cSrcweir 
344*cdf0e10cSrcweir 	void SetValue( const double nVal ) { nValue = nVal;}
345*cdf0e10cSrcweir 
346*cdf0e10cSrcweir private:
347*cdf0e10cSrcweir 	double	nValue;
348*cdf0e10cSrcweir };
349*cdf0e10cSrcweir 
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir // ============================================================================
352*cdf0e10cSrcweir 
353*cdf0e10cSrcweir /** Member ID for "page scale to width" value in QueryValue() and PutValue(). */
354*cdf0e10cSrcweir const sal_uInt8 SC_MID_PAGE_SCALETO_WIDTH    = 1;
355*cdf0e10cSrcweir /** Member ID for "page scale to height" value in QueryValue() and PutValue(). */
356*cdf0e10cSrcweir const sal_uInt8 SC_MID_PAGE_SCALETO_HEIGHT   = 2;
357*cdf0e10cSrcweir 
358*cdf0e10cSrcweir 
359*cdf0e10cSrcweir /** Contains the "scale to width/height" attribute in page styles. */
360*cdf0e10cSrcweir class SC_DLLPUBLIC ScPageScaleToItem : public SfxPoolItem
361*cdf0e10cSrcweir {
362*cdf0e10cSrcweir public:
363*cdf0e10cSrcweir                                 TYPEINFO();
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir     /** Default c'tor sets the width and height to 0. */
366*cdf0e10cSrcweir     explicit                    ScPageScaleToItem();
367*cdf0e10cSrcweir     explicit                    ScPageScaleToItem( sal_uInt16 nWidth, sal_uInt16 nHeight );
368*cdf0e10cSrcweir 
369*cdf0e10cSrcweir     virtual                     ~ScPageScaleToItem();
370*cdf0e10cSrcweir 
371*cdf0e10cSrcweir     virtual ScPageScaleToItem*  Clone( SfxItemPool* = 0 ) const;
372*cdf0e10cSrcweir 
373*cdf0e10cSrcweir     virtual int                 operator==( const SfxPoolItem& rCmp ) const;
374*cdf0e10cSrcweir 
375*cdf0e10cSrcweir     inline sal_uInt16           GetWidth() const { return mnWidth; }
376*cdf0e10cSrcweir     inline sal_uInt16           GetHeight() const { return mnHeight; }
377*cdf0e10cSrcweir     inline bool                 IsValid() const { return mnWidth || mnHeight; }
378*cdf0e10cSrcweir 
379*cdf0e10cSrcweir     inline void                 SetWidth( sal_uInt16 nWidth ) { mnWidth = nWidth; }
380*cdf0e10cSrcweir     inline void                 SetHeight( sal_uInt16 nHeight ) { mnHeight = nHeight; }
381*cdf0e10cSrcweir     inline void                 Set( sal_uInt16 nWidth, sal_uInt16 nHeight )
382*cdf0e10cSrcweir                                     { mnWidth = nWidth; mnHeight = nHeight; }
383*cdf0e10cSrcweir     inline void                 SetInvalid() { mnWidth = mnHeight = 0; }
384*cdf0e10cSrcweir 
385*cdf0e10cSrcweir     virtual SfxItemPresentation GetPresentation(
386*cdf0e10cSrcweir                                     SfxItemPresentation ePresentation,
387*cdf0e10cSrcweir                                     SfxMapUnit, SfxMapUnit,
388*cdf0e10cSrcweir                                     XubString& rText,
389*cdf0e10cSrcweir                                     const IntlWrapper* = 0 ) const;
390*cdf0e10cSrcweir 
391*cdf0e10cSrcweir     virtual sal_Bool                QueryValue( ::com::sun::star::uno::Any& rAny, sal_uInt8 nMemberId = 0 ) const;
392*cdf0e10cSrcweir     virtual sal_Bool                PutValue( const ::com::sun::star::uno::Any& rAny, sal_uInt8 nMemberId = 0 );
393*cdf0e10cSrcweir 
394*cdf0e10cSrcweir private:
395*cdf0e10cSrcweir     sal_uInt16                  mnWidth;
396*cdf0e10cSrcweir     sal_uInt16                  mnHeight;
397*cdf0e10cSrcweir };
398*cdf0e10cSrcweir 
399*cdf0e10cSrcweir // ============================================================================
400*cdf0e10cSrcweir 
401*cdf0e10cSrcweir #endif
402*cdf0e10cSrcweir 
403