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: wwstyles.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 ************************************************************************/
31 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
33 #ifndef WW_WWSTYLES_HXX
34 #define WW_WWSTYLES_HXX
36 class String
; //yuck...
38 #include <sal/types.h>
44 stiNormal
= 0, // 0x0000
45 stiLev1
= 1, // 0x0001
46 stiLev2
= 2, // 0x0002
47 stiLev3
= 3, // 0x0003
48 stiLev4
= 4, // 0x0004
49 stiLev5
= 5, // 0x0005
50 stiLev6
= 6, // 0x0006
51 stiLev7
= 7, // 0x0007
52 stiLev8
= 8, // 0x0008
53 stiLev9
= 9, // 0x0009
54 stiLevFirst
= stiLev1
,
56 stiIndex1
= 10, // 0x000A
57 stiIndex2
= 11, // 0x000B
58 stiIndex3
= 12, // 0x000C
59 stiIndex4
= 13, // 0x000D
60 stiIndex5
= 14, // 0x000E
61 stiIndex6
= 15, // 0x000F
62 stiIndex7
= 16, // 0x0010
63 stiIndex8
= 17, // 0x0011
64 stiIndex9
= 18, // 0x0012
65 stiIndexFirst
= stiIndex1
,
66 stiIndexLast
= stiIndex9
,
67 stiToc1
= 19, // 0x0013
68 stiToc2
= 20, // 0x0014
69 stiToc3
= 21, // 0x0015
70 stiToc4
= 22, // 0x0016
71 stiToc5
= 23, // 0x0017
72 stiToc6
= 24, // 0x0018
73 stiToc7
= 25, // 0x0019
74 stiToc8
= 26, // 0x001A
75 stiToc9
= 27, // 0x001B
76 stiTocFirst
= stiToc1
,
78 stiNormIndent
= 28, // 0x001C
79 stiFtnText
= 29, // 0x001D
80 stiAtnText
= 30, // 0x001E
81 stiHeader
= 31, // 0x001F
82 stiFooter
= 32, // 0x0020
83 stiIndexHeading
= 33, // 0x0021
84 stiCaption
= 34, // 0x0022
85 stiToCaption
= 35, // 0x0023
86 stiEnvAddr
= 36, // 0x0024
87 stiEnvRet
= 37, // 0x0025
88 stiFtnRef
= 38, // 0x0026 char style
89 stiAtnRef
= 39, // 0x0027 char style
90 stiLnn
= 40, // 0x0028 char style
91 stiPgn
= 41, // 0x0029 char style
92 stiEdnRef
= 42, // 0x002A char style
93 stiEdnText
= 43, // 0x002B
94 stiToa
= 44, // 0x002C
95 stiMacro
= 45, // 0x002D
96 stiToaHeading
= 46, // 0x002E
97 stiList
= 47, // 0x002F
98 stiListBullet
= 48, // 0x0030
99 stiListNumber
= 49, // 0x0031
100 stiList2
= 50, // 0x0032
101 stiList3
= 51, // 0x0033
102 stiList4
= 52, // 0x0034
103 stiList5
= 53, // 0x0035
104 stiListBullet2
= 54, // 0x0036
105 stiListBullet3
= 55, // 0x0037
106 stiListBullet4
= 56, // 0x0038
107 stiListBullet5
= 57, // 0x0039
108 stiListNumber2
= 58, // 0x003A
109 stiListNumber3
= 59, // 0x003B
110 stiListNumber4
= 60, // 0x003C
111 stiListNumber5
= 61, // 0x003D
112 stiTitle
= 62, // 0x003E
113 stiClosing
= 63, // 0x003F
114 stiSignature
= 64, // 0x0040
115 stiNormalChar
= 65, // 0x0041 char style
116 stiBodyText
= 66, // 0x0042
118 stiBodyTextInd1 was orig stiBodyText2 in documentation, but that
119 collides with the other stiBodyText2 and this seems more reasonable.
122 stiBodyTextInd1
= 67, // 0x0043
123 stiListCont
= 68, // 0x0044
124 stiListCont2
= 69, // 0x0045
125 stiListCont3
= 70, // 0x0046
126 stiListCont4
= 71, // 0x0047
127 stiListCont5
= 72, // 0x0048
128 stiMsgHeader
= 73, // 0x0049
129 stiSubtitle
= 74, // 0x004A
130 stiSalutation
= 75, // 0x004B
131 stiDate
= 76, // 0X004C
132 stiBodyText1I
= 77, // 0x004D
133 stiBodyText1I2
= 78, // 0x004E
134 stiNoteHeading
= 79, // 0x004F
135 stiBodyText2
= 80, // 0x0050
136 stiBodyText3
= 81, // 0x0051
137 stiBodyTextInd2
= 82, // 0x0052
138 stiBodyTextInd3
= 83, // 0x0053
139 stiBlockQuote
= 84, // 0x0054
140 stiHyperlink
= 85, // 0x0055 char style
141 stiHyperlinkFollowed
= 86, // 0x0056 char style
142 stiStrong
= 87, // 0x0057 char style
143 stiEmphasis
= 88, // 0x0058 char style
144 stiNavPane
= 89, // 0x0059 char style
145 stiPlainText
= 90, // 0x005A
146 stiMax
= 91, // number of defined sti's
147 stiUser
= 0x0ffe, // user styles are distinguished by name
148 stiNil
= 0x0fff // max for 12 bits
151 /** Find the WinWord sti index of an english style name.
153 When importing a RTF document we would like to treat styles as similiar
154 to how word does as possible, to this end word will treat some styles
155 with special names as inbuilt styles, and some as user defined styles.
157 See OpenOffice.org issue 21881
158 (http://www.openoffice.org/issues/show_bug.cgi?id=21881)
159 and OpenOffice.org issue 17503
160 (http://www.openoffice.org/issues/show_bug.cgi?id=17503)
163 rSting the Style name to test to see what winword sti word would give
164 such a name if it has no other information to work with (e.g. importing
167 @return the sti that word would give it. stiUser if word would treat
168 it as a user defined style.
171 <a href="mailto:cmc@openoffice.org">Caolán McNamara</a>
172 <a href="mailto:tono@openoffice.org">Takashi Ono</a>
174 sti
GetCanonicalStiFromEnglishName(const String
&rString
) throw();
176 /** Find the WinWord sti index of an old <= Word2 stc (style code)
178 When importing a Word 2 document we would like to treat styles as
179 similiar to how word 8 does as possible, to this end word will treat
180 some styles with special codes as inbuilt styles, and some as user
184 stc the Style code to test to see what winword sti word would give
187 @return the sti that word would give it. stiUser if word would treat
188 it as a user defined style.
191 <a href="mailto:cmc@openoffice.org">Caolán McNamara</a>
193 sti
GetCanonicalStiFromStc(sal_uInt8 stc
) throw();
195 /** Find the WinWord english name from a sti index
197 Map the word style index to it's english name
202 @return the name word would give it if it's an inbuilt name, otherwise
206 <a href="mailto:cmc@openoffice.org">Caolán McNamara</a>
208 const sal_Char
* GetEnglishNameFromSti(sti eSti
) throw();
210 /** Determine if the WinWord sti is standard Character Style
215 @return true if a known inbuild character style
218 <a href="mailto:cmc@openoffice.org">Caolán McNamara</a>
220 bool StandardStiIsCharStyle(sti eSti
) throw();
224 /* vi:set tabstop=4 shiftwidth=4 expandtab: */