1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tgrditem.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SW_TGRDITEM_HXX
31 #define SW_TGRDITEM_HXX
34 #ifndef _SFXPOOLITEM_HXX //autogen
35 #include <bf_svtools/poolitem.hxx>
38 #include <hintids.hxx>
40 #ifndef _FORMAT_HXX //autogen
48 enum SwTextGrid
{ GRID_NONE
, GRID_LINES_ONLY
, GRID_LINES_CHARS
};
50 class SwTextGridItem
: public SfxPoolItem
54 sal_uInt16 nBaseHeight
, nRubyHeight
;
62 virtual ~SwTextGridItem();
64 // "pure virtual Methoden" vom SfxPoolItem
65 virtual int operator==( const SfxPoolItem
& ) const;
66 virtual SfxPoolItem
* Clone( SfxItemPool
* pPool
= 0 ) const;
67 virtual SfxPoolItem
* Create(SvStream
&, USHORT nVer
) const;
68 virtual SvStream
& Store(SvStream
&, USHORT nIVer
) const;
69 virtual USHORT
GetVersion( USHORT nFFVer
) const;
70 virtual BOOL
QueryValue( ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 ) const;
71 virtual BOOL
PutValue( const ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 );
73 SwTextGridItem
& operator=( const SwTextGridItem
& );
75 const Color
& GetColor() const { return aColor
; }
76 void SetColor( const Color
& rCol
) { aColor
= rCol
; }
78 sal_uInt16
GetLines() const { return nLines
; }
79 void SetLines( sal_uInt16 nNew
) { nLines
= nNew
; }
81 sal_uInt16
GetBaseHeight() const { return nBaseHeight
; }
82 void SetBaseHeight( sal_uInt16 nNew
) { nBaseHeight
= nNew
; }
84 sal_uInt16
GetRubyHeight() const { return nRubyHeight
; }
85 void SetRubyHeight( sal_uInt16 nNew
) { nRubyHeight
= nNew
; }
87 SwTextGrid
GetGridType() const { return eGridType
; }
88 void SetGridType( SwTextGrid eNew
) { eGridType
= eNew
; }
90 BOOL
IsRubyTextBelow() const { return bRubyTextBelow
; }
91 BOOL
GetRubyTextBelow() const { return bRubyTextBelow
; }
92 void SetRubyTextBelow( BOOL bNew
) { bRubyTextBelow
= bNew
; }
94 BOOL
IsPrintGrid() const { return bPrintGrid
; }
95 BOOL
GetPrintGrid() const { return bPrintGrid
; }
96 void SetPrintGrid( BOOL bNew
) { bPrintGrid
= bNew
; }
98 BOOL
IsDisplayGrid() const { return bDisplayGrid
; }
99 BOOL
GetDisplayGrid() const { return bDisplayGrid
; }
100 void SetDisplayGrid( BOOL bNew
) { bDisplayGrid
= bNew
; }
103 inline const SwTextGridItem
&SwAttrSet::GetTextGrid(BOOL bInP
) const
104 { return (const SwTextGridItem
&)Get( RES_TEXTGRID
, bInP
); }
105 inline const SwTextGridItem
&SwFmt::GetTextGrid(BOOL bInP
) const
106 { return (const SwTextGridItem
&)aSet
.Get( RES_TEXTGRID
, bInP
); }
108 } //namespace binfilter