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,
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 /*************************************************************************
57 * Numbering override of Wordpro.
58 ************************************************************************/
59 /*************************************************************************
61 * 2005-01-12 Create and implement.
62 ************************************************************************/
64 #ifndef _LWPNUMBERINGOVERRIDE_HXX
65 #define _LWPNUMBERINGOVERRIDE_HXX
67 #include "lwpoverride.hxx"
69 class LwpObjectStream
;
70 class LwpNumberingOverride
: public LwpOverride
73 LwpNumberingOverride();
74 virtual ~LwpNumberingOverride(){}
84 virtual void Read(LwpObjectStream
*pStrm
);
87 void Override(LwpNumberingOverride
* pOther
);
88 void operator=(const LwpOverride
& rOther
);
90 inline sal_uInt16
GetLevel() const;
91 inline sal_uInt16
GetPosition() const;
93 inline sal_Bool
IsLevelOverridden();
94 inline sal_Bool
IsPositionOverridden();
95 inline sal_Bool
IsHeadingOverridden();
96 inline sal_Bool
IsSmartLevelOverridden();
97 inline sal_Bool
IsHeading();
98 inline sal_Bool
IsSmartLevel();
100 void OverrideLevel(sal_uInt16 nNewLv
);
101 void OverridePosition(sal_uInt16 nNewPos
);
102 void OverrideHeading(sal_Bool bVal
);
103 void OverrideSmartLevel(sal_Bool bVal
);
105 inline void RevertLevel();
106 inline void RevertPosition();
107 inline void RevertHeading();
108 inline void RevertSmartLevel();
112 sal_uInt16 m_nPosition
;
115 inline sal_uInt16
LwpNumberingOverride::GetLevel() const
120 inline sal_uInt16
LwpNumberingOverride::GetPosition() const
125 //add by , 02/03/2005
126 inline sal_Bool
LwpNumberingOverride::IsLevelOverridden()
128 return (sal_Bool
)((m_nOverride
& NO_LEVEL
) != 0);
130 inline sal_Bool
LwpNumberingOverride::IsPositionOverridden()
132 return (sal_Bool
)((m_nOverride
& NO_POSITION
) != 0);
134 inline sal_Bool
LwpNumberingOverride::IsHeadingOverridden()
136 return (sal_Bool
)((m_nOverride
& HEADING
) != 0);
138 inline sal_Bool
LwpNumberingOverride::IsSmartLevelOverridden()
140 return (sal_Bool
)((m_nOverride
& SMARTLEVEL
) != 0);
142 inline sal_Bool
LwpNumberingOverride::IsHeading()
144 return (m_nValues
& HEADING
) != 0;
146 inline sal_Bool
LwpNumberingOverride::IsSmartLevel()
148 return (m_nValues
& SMARTLEVEL
) != 0;
151 inline void LwpNumberingOverride::RevertLevel()
153 LwpOverride::Override(NO_LEVEL
, STATE_STYLE
);
155 inline void LwpNumberingOverride::RevertPosition()
157 LwpOverride::Override(NO_POSITION
, STATE_STYLE
);
159 inline void LwpNumberingOverride::RevertHeading()
161 LwpOverride::Override(HEADING
, STATE_STYLE
);
163 inline void LwpNumberingOverride::RevertSmartLevel()
165 LwpOverride::Override(SMARTLEVEL
, STATE_STYLE
);