merge the formfield patch from ooo-build
[ooovba.git] / lotuswordpro / source / filter / lwptabrack.hxx
blobd9599df05719a5c2a7e92370fd8c69d0a89075bf
1 /*************************************************************************
3 * The Contents of this file are made available subject to the terms of
4 * either of the following licenses
6 * - GNU Lesser General Public License Version 2.1
7 * - Sun Industry Standards Source License Version 1.1
9 * Sun Microsystems Inc., October, 2000
11 * GNU Lesser General Public License Version 2.1
12 * =============================================
13 * Copyright 2000 by Sun Microsystems, Inc.
14 * 901 San Antonio Road, Palo Alto, CA 94303, USA
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License version 2.1, as published by the Free Software Foundation.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with this library; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28 * MA 02111-1307 USA
31 * Sun Industry Standards Source License Version 1.1
32 * =================================================
33 * The contents of this file are subject to the Sun Industry Standards
34 * Source License Version 1.1 (the "License"); You may not use this file
35 * except in compliance with the License. You may obtain a copy of the
36 * License at http://www.openoffice.org/license.html.
38 * Software provided under this License is provided on an "AS IS" basis,
39 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
40 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
41 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
42 * See the License for the specific provisions governing your rights and
43 * obligations concerning the Software.
45 * The Initial Developer of the Original Code is: IBM Corporation
47 * Copyright: 2008 by IBM Corporation
49 * All Rights Reserved.
51 * Contributor(s): _______________________________________
54 ************************************************************************/
55 /*************************************************************************
56 * @file
57 * Tabrack for LwpTabPiece object.
58 ************************************************************************/
59 /*************************************************************************
60 * Change History
61 * 2005-01-12 create this file.
62 ************************************************************************/
64 #ifndef _LWPTABRACK_HXX
65 #define _LWPTABRACK_HXX
67 #include "lwpobj.hxx"
69 class LwpObjectStream;
70 class LwpTab;
71 class LwpTabRack;
73 class LwpTab
75 public:
76 LwpTab(void);
78 enum TabType
80 TT_LEFT = 1,
81 TT_CENTER,
82 TT_RIGHT,
83 TT_NUMERIC
86 enum LeaderType
88 TL_NONE = 0,
89 TL_HYPHEN,
90 TL_DOT,
91 TL_LINE
94 enum RelativeType
96 TR_LEFT = 1,
97 TR_RIGHT,
98 TR_CENTER
100 public:
101 void Read(LwpObjectStream *pStrm);
102 // 2005/01/28
103 inline sal_uInt32 GetPosition();
104 inline TabType GetTabType();
105 inline LeaderType GetLeaderType();
106 inline RelativeType GetRelativeType();
107 inline sal_uInt16 GetAlignChar();
109 protected:
110 sal_uInt32 m_nX;
111 sal_uInt8 m_nType;
112 sal_uInt8 m_nLeader;
113 sal_uInt8 m_nRelativeType;
114 sal_uInt16 m_nAlignChar; //be careful
117 // 2005/01/28
118 inline sal_uInt32 LwpTab::GetPosition()
120 return m_nX;
123 inline LwpTab::TabType LwpTab::GetTabType()
125 return (LwpTab::TabType)m_nType;
128 inline LwpTab::LeaderType LwpTab::GetLeaderType()
130 return (LwpTab::LeaderType)m_nLeader;
132 inline LwpTab::RelativeType LwpTab::GetRelativeType()
134 return (LwpTab::RelativeType)m_nRelativeType;
137 inline sal_uInt16 LwpTab::GetAlignChar()
139 return m_nAlignChar;
142 class LwpTabRack : public LwpObject
144 public:
145 LwpTabRack(LwpObjectHeader objHdr, LwpSvStream* pStrm);
146 virtual ~LwpTabRack(){}
147 public:
148 void Read();
149 // 2005/01/28
150 sal_uInt16 GetNumTabs();
151 LwpTab* Lookup(sal_uInt16 nIndex);
152 LwpTabRack* GetNext();
153 private:
154 enum{
155 MaxTabs = 15
157 sal_uInt16 m_nNumTabs;
158 LwpTab m_aTabs[MaxTabs];
159 LwpObjectID m_NextID;
162 #endif