1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*1d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*1d2dbeb0SAndrew Rist * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*1d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
11*1d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13*1d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the
17*1d2dbeb0SAndrew Rist * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20*1d2dbeb0SAndrew Rist *************************************************************/
21*1d2dbeb0SAndrew Rist
22*1d2dbeb0SAndrew Rist
23cdf0e10cSrcweir #ifndef _SCRIPTINFO_HXX
24cdf0e10cSrcweir #define _SCRIPTINFO_HXX
25cdf0e10cSrcweir #ifndef _SVSTDARR_HXX
26cdf0e10cSrcweir #define _SVSTDARR_SHORTS
27cdf0e10cSrcweir #define _SVSTDARR_BYTES
28cdf0e10cSrcweir #define _SVSTDARR_USHORTS
29cdf0e10cSrcweir #define _SVSTDARR_XUB_STRLEN
30cdf0e10cSrcweir #include <svl/svstdarr.hxx>
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #include <i18npool/lang.h>
33cdf0e10cSrcweir #include <list>
34cdf0e10cSrcweir #include <modeltoviewhelper.hxx>
35cdf0e10cSrcweir
36cdf0e10cSrcweir #include <errhdl.hxx>
37cdf0e10cSrcweir
38cdf0e10cSrcweir class SwTxtNode;
39cdf0e10cSrcweir class Point;
40cdf0e10cSrcweir class MultiSelection;
41cdf0e10cSrcweir class String;
42cdf0e10cSrcweir typedef std::list< xub_StrLen > PositionList;
43cdf0e10cSrcweir
44cdf0e10cSrcweir #define SPACING_PRECISION_FACTOR 100
45cdf0e10cSrcweir
46cdf0e10cSrcweir /*************************************************************************
47cdf0e10cSrcweir * class SwScanner
48cdf0e10cSrcweir * Hilfsklasse, die beim Spellen die Worte im gewuenschten Bereich
49cdf0e10cSrcweir * nacheinander zur Verfuegung stellt.
50cdf0e10cSrcweir *************************************************************************/
51cdf0e10cSrcweir
52cdf0e10cSrcweir class SwScanner
53cdf0e10cSrcweir {
54cdf0e10cSrcweir XubString aWord;
55cdf0e10cSrcweir const SwTxtNode& rNode;
56cdf0e10cSrcweir const String& rText;
57cdf0e10cSrcweir const LanguageType* pLanguage;
58cdf0e10cSrcweir const ModelToViewHelper::ConversionMap* pConversionMap;
59cdf0e10cSrcweir xub_StrLen nStartPos;
60cdf0e10cSrcweir xub_StrLen nEndPos;
61cdf0e10cSrcweir xub_StrLen nBegin;
62cdf0e10cSrcweir xub_StrLen nLen;
63cdf0e10cSrcweir LanguageType aCurrLang;
64cdf0e10cSrcweir sal_uInt16 nWordType;
65cdf0e10cSrcweir sal_Bool bClip;
66cdf0e10cSrcweir
67cdf0e10cSrcweir public:
68cdf0e10cSrcweir SwScanner( const SwTxtNode& rNd, const String& rTxt, const LanguageType* pLang,
69cdf0e10cSrcweir const ModelToViewHelper::ConversionMap* pConvMap,
70cdf0e10cSrcweir sal_uInt16 nWordType,
71cdf0e10cSrcweir xub_StrLen nStart, xub_StrLen nEnde, sal_Bool bClip = sal_False );
72cdf0e10cSrcweir
73cdf0e10cSrcweir
74cdf0e10cSrcweir // This next word function tries to find the language for the next word
75cdf0e10cSrcweir // It should currently _not_ be used for spell checking, and works only for
76cdf0e10cSrcweir // ! bReverse
77cdf0e10cSrcweir sal_Bool NextWord();
78cdf0e10cSrcweir
GetWord() const79cdf0e10cSrcweir const XubString& GetWord() const { return aWord; }
80cdf0e10cSrcweir
GetBegin() const81cdf0e10cSrcweir xub_StrLen GetBegin() const { return nBegin; }
GetEnd() const82cdf0e10cSrcweir xub_StrLen GetEnd() const { return nBegin + nLen; }
GetLen() const83cdf0e10cSrcweir xub_StrLen GetLen() const { return nLen; }
84cdf0e10cSrcweir
GetCurrentLanguage() const85cdf0e10cSrcweir LanguageType GetCurrentLanguage() const {return aCurrLang;}
86cdf0e10cSrcweir };
87cdf0e10cSrcweir
88cdf0e10cSrcweir /*************************************************************************
89cdf0e10cSrcweir * class SwScriptInfo
90cdf0e10cSrcweir *
91cdf0e10cSrcweir * encapsultes information about script changes
92cdf0e10cSrcweir *************************************************************************/
93cdf0e10cSrcweir
94cdf0e10cSrcweir class SwScriptInfo
95cdf0e10cSrcweir {
96cdf0e10cSrcweir private:
97cdf0e10cSrcweir SvXub_StrLens aScriptChg;
98cdf0e10cSrcweir SvBytes aScriptType;
99cdf0e10cSrcweir SvXub_StrLens aDirChg;
100cdf0e10cSrcweir SvBytes aDirType;
101cdf0e10cSrcweir SvXub_StrLens aKashida;
102cdf0e10cSrcweir SvXub_StrLens aKashidaInvalid;
103cdf0e10cSrcweir SvXub_StrLens aNoKashidaLine;
104cdf0e10cSrcweir SvXub_StrLens aNoKashidaLineEnd;
105cdf0e10cSrcweir SvXub_StrLens aCompChg;
106cdf0e10cSrcweir SvXub_StrLens aCompLen;
107cdf0e10cSrcweir SvXub_StrLens aHiddenChg;
108cdf0e10cSrcweir SvBytes aCompType;
109cdf0e10cSrcweir xub_StrLen nInvalidityPos;
110cdf0e10cSrcweir sal_uInt8 nDefaultDir;
111cdf0e10cSrcweir
112cdf0e10cSrcweir void UpdateBidiInfo( const String& rTxt );
113cdf0e10cSrcweir
114cdf0e10cSrcweir sal_Bool IsKashidaValid ( xub_StrLen nKashPos ) const;
115cdf0e10cSrcweir void MarkKashidaInvalid ( xub_StrLen nKashPos );
116cdf0e10cSrcweir void ClearKashidaInvalid ( xub_StrLen nKashPos );
117cdf0e10cSrcweir bool MarkOrClearKashidaInvalid( xub_StrLen nStt, xub_StrLen nLen, bool bMark, xub_StrLen nMarkCount );
118cdf0e10cSrcweir bool IsKashidaLine ( xub_StrLen nCharIdx ) const;
119cdf0e10cSrcweir
120cdf0e10cSrcweir public:
121cdf0e10cSrcweir enum CompType { KANA, SPECIAL_LEFT, SPECIAL_RIGHT, NONE };
122cdf0e10cSrcweir
123cdf0e10cSrcweir SwScriptInfo();
124cdf0e10cSrcweir ~SwScriptInfo();
125cdf0e10cSrcweir
126cdf0e10cSrcweir // determines script changes
127cdf0e10cSrcweir void InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL );
128cdf0e10cSrcweir void InitScriptInfo( const SwTxtNode& rNode );
129cdf0e10cSrcweir
130cdf0e10cSrcweir // set/get position from which data is invalid
131cdf0e10cSrcweir inline void SetInvalidity( const xub_StrLen nPos );
GetInvalidity() const132cdf0e10cSrcweir inline xub_StrLen GetInvalidity() const { return nInvalidityPos; };
133cdf0e10cSrcweir
134cdf0e10cSrcweir // get default direction for paragraph
GetDefaultDir() const135cdf0e10cSrcweir inline sal_uInt8 GetDefaultDir() const { return nDefaultDir; };
136cdf0e10cSrcweir
137cdf0e10cSrcweir // array operations, nCnt refers to array position
138cdf0e10cSrcweir inline size_t CountScriptChg() const;
139cdf0e10cSrcweir inline xub_StrLen GetScriptChg( const size_t nCnt ) const;
140cdf0e10cSrcweir inline sal_uInt8 GetScriptType( const sal_uInt16 nCnt ) const;
141cdf0e10cSrcweir
142cdf0e10cSrcweir inline size_t CountDirChg() const;
143cdf0e10cSrcweir inline xub_StrLen GetDirChg( const size_t nCnt ) const;
144cdf0e10cSrcweir inline sal_uInt8 GetDirType( const size_t nCnt ) const;
145cdf0e10cSrcweir
146cdf0e10cSrcweir inline size_t CountKashida() const;
147cdf0e10cSrcweir inline xub_StrLen GetKashida( const size_t nCnt ) const;
148cdf0e10cSrcweir
149cdf0e10cSrcweir inline size_t CountCompChg() const;
150cdf0e10cSrcweir inline xub_StrLen GetCompStart( const size_t nCnt ) const;
151cdf0e10cSrcweir inline xub_StrLen GetCompLen( const size_t nCnt ) const;
152cdf0e10cSrcweir inline sal_uInt8 GetCompType( const size_t nCnt ) const;
153cdf0e10cSrcweir
154cdf0e10cSrcweir inline size_t CountHiddenChg() const;
155cdf0e10cSrcweir inline xub_StrLen GetHiddenChg( const size_t nCnt ) const;
156cdf0e10cSrcweir static void CalcHiddenRanges( const SwTxtNode& rNode,
157cdf0e10cSrcweir MultiSelection& rHiddenMulti );
158cdf0e10cSrcweir
159cdf0e10cSrcweir // "high" level operations, nPos refers to string position
160cdf0e10cSrcweir xub_StrLen NextScriptChg( const xub_StrLen nPos ) const;
161cdf0e10cSrcweir sal_uInt8 ScriptType( const xub_StrLen nPos ) const;
162cdf0e10cSrcweir
163cdf0e10cSrcweir // Returns the position of the next direction level change.
164cdf0e10cSrcweir // If bLevel is set, the position of the next level which is smaller
165cdf0e10cSrcweir // than the level at position nPos is returned. This is required to
166cdf0e10cSrcweir // obtain the end of a SwBidiPortion
167cdf0e10cSrcweir xub_StrLen NextDirChg( const xub_StrLen nPos,
168cdf0e10cSrcweir const sal_uInt8* pLevel = 0 ) const;
169cdf0e10cSrcweir sal_uInt8 DirType( const xub_StrLen nPos ) const;
170cdf0e10cSrcweir
171cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 1
172cdf0e10cSrcweir sal_uInt8 CompType( const xub_StrLen nPos ) const;
173cdf0e10cSrcweir #endif
174cdf0e10cSrcweir
175cdf0e10cSrcweir //
176cdf0e10cSrcweir // HIDDEN TEXT STUFF START
177cdf0e10cSrcweir //
178cdf0e10cSrcweir
179cdf0e10cSrcweir /** Hidden text range information - static and non-version
180cdf0e10cSrcweir
181cdf0e10cSrcweir @descr Determines if a given position is inside a hidden text range. The
182cdf0e10cSrcweir static version tries to obtain a valid SwScriptInfo object
183cdf0e10cSrcweir via the SwTxtNode, otherwise it calculates the values from scratch.
184cdf0e10cSrcweir The non-static version uses the internally cached informatio
185cdf0e10cSrcweir for the calculation.
186cdf0e10cSrcweir
187cdf0e10cSrcweir @param rNode
188cdf0e10cSrcweir The text node.
189cdf0e10cSrcweir @param nPos
190cdf0e10cSrcweir The given position that should be checked.
191cdf0e10cSrcweir @param rnStartPos
192cdf0e10cSrcweir Return parameter for the start position of the hidden range.
193cdf0e10cSrcweir STRING_LEN if nPos is not inside a hidden range.
194cdf0e10cSrcweir @param rnEndPos
195cdf0e10cSrcweir Return parameter for the end position of the hidden range.
196cdf0e10cSrcweir 0 if nPos is not inside a hidden range.
197cdf0e10cSrcweir @param rnEndPos
198cdf0e10cSrcweir Return parameter that contains all the hidden text ranges. Optional.
199cdf0e10cSrcweir @return
200cdf0e10cSrcweir returns true if there are any hidden characters in this paragraph.
201cdf0e10cSrcweir
202cdf0e10cSrcweir */
203cdf0e10cSrcweir static bool GetBoundsOfHiddenRange( const SwTxtNode& rNode, xub_StrLen nPos,
204cdf0e10cSrcweir xub_StrLen& rnStartPos, xub_StrLen& rnEndPos,
205cdf0e10cSrcweir PositionList* pList = 0 );
206cdf0e10cSrcweir bool GetBoundsOfHiddenRange( xub_StrLen nPos, xub_StrLen& rnStartPos,
207cdf0e10cSrcweir xub_StrLen& rnEndPos, PositionList* pList = 0 ) const;
208cdf0e10cSrcweir
209cdf0e10cSrcweir static bool IsInHiddenRange( const SwTxtNode& rNode, xub_StrLen nPos );
210cdf0e10cSrcweir
211cdf0e10cSrcweir /** Hidden text attribute handling
212cdf0e10cSrcweir
213cdf0e10cSrcweir @descr Takes a string and either deletes the hidden ranges or sets
214cdf0e10cSrcweir a given character in place of the hidden characters.
215cdf0e10cSrcweir
216cdf0e10cSrcweir @param rNode
217cdf0e10cSrcweir The text node.
218cdf0e10cSrcweir @param nPos
219cdf0e10cSrcweir The string to modify.
220cdf0e10cSrcweir @param cChar
221cdf0e10cSrcweir The character that should replace the hidden characters.
222cdf0e10cSrcweir @param bDel
223cdf0e10cSrcweir If set, the hidden ranges will be deleted from the text node.
224cdf0e10cSrcweir */
225cdf0e10cSrcweir static sal_uInt16 MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
226cdf0e10cSrcweir const xub_StrLen nStt, const xub_StrLen nEnd,
227cdf0e10cSrcweir const xub_Unicode cChar );
228cdf0e10cSrcweir
229cdf0e10cSrcweir /** Hidden text attribute handling
230cdf0e10cSrcweir
231cdf0e10cSrcweir @descr Takes a SwTxtNode and deletes the hidden ranges from the node.
232cdf0e10cSrcweir
233cdf0e10cSrcweir @param rNode
234cdf0e10cSrcweir The text node.
235cdf0e10cSrcweir */
236cdf0e10cSrcweir static void DeleteHiddenRanges( SwTxtNode& rNode );
237cdf0e10cSrcweir
238cdf0e10cSrcweir //
239cdf0e10cSrcweir // HIDDEN TEXT STUFF END
240cdf0e10cSrcweir //
241cdf0e10cSrcweir
242cdf0e10cSrcweir // examines the range [ nStart, nStart + nEnd ] if there are kanas
243cdf0e10cSrcweir // returns start index of kana entry in array, otherwise USHRT_MAX
244cdf0e10cSrcweir sal_uInt16 HasKana( xub_StrLen nStart, const xub_StrLen nEnd ) const;
245cdf0e10cSrcweir
246cdf0e10cSrcweir // modifies the kerning array according to a given compress value
247cdf0e10cSrcweir long Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen nLen,
248cdf0e10cSrcweir const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
249cdf0e10cSrcweir Point* pPoint = NULL ) const;
250cdf0e10cSrcweir
251cdf0e10cSrcweir /** Performes a kashida justification on the kerning array
252cdf0e10cSrcweir
253cdf0e10cSrcweir @descr Add some extra space for kashida justification to the
254cdf0e10cSrcweir positions in the kerning array.
255cdf0e10cSrcweir @param pKernArray
256cdf0e10cSrcweir The printers kerning array. Optional.
257cdf0e10cSrcweir @param pScrArray
258cdf0e10cSrcweir The screen kerning array. Optional.
259cdf0e10cSrcweir @param nStt
260cdf0e10cSrcweir Start referring to the paragraph.
261cdf0e10cSrcweir @param nLen
262cdf0e10cSrcweir The number of characters to be considered.
263cdf0e10cSrcweir @param nSpaceAdd
264cdf0e10cSrcweir The value which has to be added to a kashida opportunity.
265cdf0e10cSrcweir @return The number of kashida opportunities in the given range
266cdf0e10cSrcweir */
267cdf0e10cSrcweir sal_uInt16 KashidaJustify( sal_Int32* pKernArray, sal_Int32* pScrArray,
268cdf0e10cSrcweir xub_StrLen nStt, xub_StrLen nLen,
269cdf0e10cSrcweir long nSpaceAdd = 0) const;
270cdf0e10cSrcweir
271cdf0e10cSrcweir /** Clears array of kashidas marked as invalid
272cdf0e10cSrcweir */
ClearKashidaInvalid(xub_StrLen nStt,xub_StrLen nLen)273cdf0e10cSrcweir inline void ClearKashidaInvalid ( xub_StrLen nStt, xub_StrLen nLen ) { MarkOrClearKashidaInvalid( nStt, nLen, false, 0 ); }
274cdf0e10cSrcweir
275cdf0e10cSrcweir /** Marks nCnt kashida positions as invalid
276cdf0e10cSrcweir pKashidaPositions: array of char indices relative to the paragraph
277cdf0e10cSrcweir */
278cdf0e10cSrcweir bool MarkKashidasInvalid ( xub_StrLen nCnt, xub_StrLen* pKashidaPositions );
279cdf0e10cSrcweir
280cdf0e10cSrcweir /** Marks nCnt kashida positions as invalid
281cdf0e10cSrcweir in the given text range
282cdf0e10cSrcweir */
MarkKashidasInvalid(xub_StrLen nCnt,xub_StrLen nStt,xub_StrLen nLen)283cdf0e10cSrcweir inline bool MarkKashidasInvalid ( xub_StrLen nCnt, xub_StrLen nStt, xub_StrLen nLen )
284cdf0e10cSrcweir { return MarkOrClearKashidaInvalid( nStt, nLen, true, nCnt ); }
285cdf0e10cSrcweir
286cdf0e10cSrcweir /** retrieves kashida opportunities for a given text range.
287cdf0e10cSrcweir returns the number of kashida positions in the given text range
288cdf0e10cSrcweir
289cdf0e10cSrcweir pKashidaPositions: buffer to reveive the char indices of the
290cdf0e10cSrcweir kashida opportunties relative to the paragraph
291cdf0e10cSrcweir */
292cdf0e10cSrcweir sal_uInt16 GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
293cdf0e10cSrcweir xub_StrLen* pKashidaPosition );
294cdf0e10cSrcweir
295cdf0e10cSrcweir
296cdf0e10cSrcweir
297cdf0e10cSrcweir
298cdf0e10cSrcweir /** Use regular blank justification instead of kashdida justification for the given line of text.
299cdf0e10cSrcweir nStt Start char index of the line referring to the paragraph.
300cdf0e10cSrcweir nLen Number of characters in the line
301cdf0e10cSrcweir */
302cdf0e10cSrcweir void SetNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen );
303cdf0e10cSrcweir
304cdf0e10cSrcweir /** Clear forced blank justification for a given line.
305cdf0e10cSrcweir nStt Start char index of the line referring to the paragraph.
306cdf0e10cSrcweir nLen Number of characters in the line
307cdf0e10cSrcweir */
308cdf0e10cSrcweir void ClearNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen );
309cdf0e10cSrcweir
310cdf0e10cSrcweir /** Checks if text is Arabic text.
311cdf0e10cSrcweir
312cdf0e10cSrcweir @descr Checks if text is Arabic text.
313cdf0e10cSrcweir @param rTxt
314cdf0e10cSrcweir The text to check
315cdf0e10cSrcweir @param nStt
316cdf0e10cSrcweir Start index of the text
317cdf0e10cSrcweir @return Returns if the language is an Arabic language
318cdf0e10cSrcweir */
319cdf0e10cSrcweir static sal_Bool IsArabicText( const XubString& rTxt, xub_StrLen nStt, xub_StrLen nLen );
320cdf0e10cSrcweir
321cdf0e10cSrcweir /** Performes a thai justification on the kerning array
322cdf0e10cSrcweir
323cdf0e10cSrcweir @descr Add some extra space for thai justification to the
324cdf0e10cSrcweir positions in the kerning array.
325cdf0e10cSrcweir @param rTxt
326cdf0e10cSrcweir The String
327cdf0e10cSrcweir @param pKernArray
328cdf0e10cSrcweir The printers kerning array. Optional.
329cdf0e10cSrcweir @param pScrArray
330cdf0e10cSrcweir The screen kerning array. Optional.
331cdf0e10cSrcweir @param nIdx
332cdf0e10cSrcweir Start referring to the paragraph.
333cdf0e10cSrcweir @param nLen
334cdf0e10cSrcweir The number of characters to be considered.
335cdf0e10cSrcweir @param nSpaceAdd
336cdf0e10cSrcweir The value which has to be added to the cells.
337cdf0e10cSrcweir @return The number of extra spaces in the given range
338cdf0e10cSrcweir */
339cdf0e10cSrcweir static sal_uInt16 ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
340cdf0e10cSrcweir sal_Int32* pScrArray, xub_StrLen nIdx,
341cdf0e10cSrcweir xub_StrLen nLen, xub_StrLen nNumberOfBlanks = 0,
342cdf0e10cSrcweir long nSpaceAdd = 0 );
343cdf0e10cSrcweir
344cdf0e10cSrcweir static SwScriptInfo* GetScriptInfo( const SwTxtNode& rNode,
345cdf0e10cSrcweir sal_Bool bAllowInvalid = sal_False );
346cdf0e10cSrcweir
347cdf0e10cSrcweir static sal_uInt8 WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI );
348cdf0e10cSrcweir };
349cdf0e10cSrcweir
SetInvalidity(const xub_StrLen nPos)350cdf0e10cSrcweir inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos )
351cdf0e10cSrcweir {
352cdf0e10cSrcweir if ( nPos < nInvalidityPos )
353cdf0e10cSrcweir nInvalidityPos = nPos;
354cdf0e10cSrcweir };
CountScriptChg() const355cdf0e10cSrcweir inline size_t SwScriptInfo::CountScriptChg() const { return aScriptChg.size(); }
GetScriptChg(const size_t nCnt) const356cdf0e10cSrcweir inline xub_StrLen SwScriptInfo::GetScriptChg( const size_t nCnt ) const
357cdf0e10cSrcweir {
358cdf0e10cSrcweir ASSERT( nCnt < aScriptChg.size(),"No ScriptChange today!");
359cdf0e10cSrcweir return aScriptChg[ nCnt ];
360cdf0e10cSrcweir }
GetScriptType(const xub_StrLen nCnt) const361cdf0e10cSrcweir inline sal_uInt8 SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
362cdf0e10cSrcweir {
363cdf0e10cSrcweir ASSERT( nCnt < aScriptType.size(),"No ScriptType today!");
364cdf0e10cSrcweir return aScriptType[ nCnt ];
365cdf0e10cSrcweir }
366cdf0e10cSrcweir
CountDirChg() const367cdf0e10cSrcweir inline size_t SwScriptInfo::CountDirChg() const { return aDirChg.size(); }
GetDirChg(const size_t nCnt) const368cdf0e10cSrcweir inline xub_StrLen SwScriptInfo::GetDirChg( const size_t nCnt ) const
369cdf0e10cSrcweir {
370cdf0e10cSrcweir ASSERT( nCnt < aDirChg.size(),"No DirChange today!");
371cdf0e10cSrcweir return aDirChg[ nCnt ];
372cdf0e10cSrcweir }
GetDirType(const size_t nCnt) const373cdf0e10cSrcweir inline sal_uInt8 SwScriptInfo::GetDirType( const size_t nCnt ) const
374cdf0e10cSrcweir {
375cdf0e10cSrcweir ASSERT( nCnt < aDirType.size(),"No DirType today!");
376cdf0e10cSrcweir return aDirType[ nCnt ];
377cdf0e10cSrcweir }
378cdf0e10cSrcweir
CountKashida() const379cdf0e10cSrcweir inline size_t SwScriptInfo::CountKashida() const { return aKashida.size(); }
GetKashida(const size_t nCnt) const380cdf0e10cSrcweir inline xub_StrLen SwScriptInfo::GetKashida( const size_t nCnt ) const
381cdf0e10cSrcweir {
382cdf0e10cSrcweir ASSERT( nCnt < aKashida.size(),"No Kashidas today!");
383cdf0e10cSrcweir return aKashida[ nCnt ];
384cdf0e10cSrcweir }
385cdf0e10cSrcweir
CountCompChg() const386cdf0e10cSrcweir inline size_t SwScriptInfo::CountCompChg() const { return aCompChg.size(); };
GetCompStart(const size_t nCnt) const387cdf0e10cSrcweir inline xub_StrLen SwScriptInfo::GetCompStart( const size_t nCnt ) const
388cdf0e10cSrcweir {
389cdf0e10cSrcweir ASSERT( nCnt < aCompChg.size(),"No CompressionStart today!");
390cdf0e10cSrcweir return aCompChg[ nCnt ];
391cdf0e10cSrcweir }
GetCompLen(const size_t nCnt) const392cdf0e10cSrcweir inline xub_StrLen SwScriptInfo::GetCompLen( const size_t nCnt ) const
393cdf0e10cSrcweir {
394cdf0e10cSrcweir ASSERT( nCnt < aCompLen.size(),"No CompressionLen today!");
395cdf0e10cSrcweir return aCompLen[ nCnt ];
396cdf0e10cSrcweir }
397cdf0e10cSrcweir
GetCompType(const size_t nCnt) const398cdf0e10cSrcweir inline sal_uInt8 SwScriptInfo::GetCompType( const size_t nCnt ) const
399cdf0e10cSrcweir {
400cdf0e10cSrcweir ASSERT( nCnt < aCompType.size(),"No CompressionType today!");
401cdf0e10cSrcweir return aCompType[ nCnt ];
402cdf0e10cSrcweir }
403cdf0e10cSrcweir
CountHiddenChg() const404cdf0e10cSrcweir inline size_t SwScriptInfo::CountHiddenChg() const { return aHiddenChg.size(); };
GetHiddenChg(const size_t nCnt) const405cdf0e10cSrcweir inline xub_StrLen SwScriptInfo::GetHiddenChg( const size_t nCnt ) const
406cdf0e10cSrcweir {
407cdf0e10cSrcweir ASSERT( nCnt < aHiddenChg.size(),"No HiddenChg today!");
408cdf0e10cSrcweir return aHiddenChg[ nCnt ];
409cdf0e10cSrcweir }
410cdf0e10cSrcweir
411cdf0e10cSrcweir
412cdf0e10cSrcweir #endif
413