2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2003-10-30 09:18:14 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 13:26:10 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2003-10-30 09:18:14 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2003-10-30 09:18:14 +00:00
|
|
|
*
|
2008-04-10 13:26:10 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2003-10-30 09:18:14 +00:00
|
|
|
*
|
2008-04-10 13:26:10 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2003-10-30 09:18:14 +00:00
|
|
|
*
|
2008-04-10 13:26:10 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2003-10-30 09:18:14 +00:00
|
|
|
*
|
2008-04-10 13:26:10 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2003-10-30 09:18:14 +00:00
|
|
|
*
|
2008-04-10 13:26:10 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2003-10-30 09:18:14 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _SCRIPTINFO_HXX
|
|
|
|
#define _SCRIPTINFO_HXX
|
|
|
|
#ifndef _SVSTDARR_HXX
|
|
|
|
#define _SVSTDARR_USHORTS
|
|
|
|
#define _SVSTDARR_XUB_STRLEN
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/svstdarr.hxx>
|
2003-10-30 09:18:14 +00:00
|
|
|
#endif
|
2004-02-26 14:28:26 +00:00
|
|
|
#include <list>
|
2011-09-08 22:18:05 +01:00
|
|
|
#include "swscanner.hxx"
|
2007-09-27 07:58:02 +00:00
|
|
|
|
2003-10-30 09:18:14 +00:00
|
|
|
class SwTxtNode;
|
|
|
|
class Point;
|
2004-02-26 14:28:26 +00:00
|
|
|
class MultiSelection;
|
2008-04-02 08:45:11 +00:00
|
|
|
class String;
|
2004-02-26 14:28:26 +00:00
|
|
|
typedef std::list< xub_StrLen > PositionList;
|
2003-10-30 09:18:14 +00:00
|
|
|
|
2005-04-18 13:33:25 +00:00
|
|
|
#define SPACING_PRECISION_FACTOR 100
|
|
|
|
|
2003-10-30 09:18:14 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* class SwScriptInfo
|
|
|
|
*
|
|
|
|
* encapsultes information about script changes
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
class SwScriptInfo
|
|
|
|
{
|
|
|
|
private:
|
2011-02-08 14:05:29 +00:00
|
|
|
//! Records a single change in script type.
|
|
|
|
struct ScriptChangeInfo
|
|
|
|
{
|
|
|
|
xub_StrLen position; //!< Character position at which we change script
|
2011-03-14 16:51:14 +00:00
|
|
|
sal_uInt8 type; //!< Script type (Latin/Asian/Complex) that we change to.
|
|
|
|
inline ScriptChangeInfo(xub_StrLen pos, sal_uInt8 typ) : position(pos), type(typ) {};
|
2011-02-08 14:05:29 +00:00
|
|
|
};
|
|
|
|
//TODO - This is sorted, so should probably be a std::set rather than vector.
|
|
|
|
// But we also use random access (probably unnecessarily).
|
|
|
|
std::vector<ScriptChangeInfo> aScriptChanges;
|
2011-02-08 15:05:14 +00:00
|
|
|
//! Records a single change in direction.
|
|
|
|
struct DirectionChangeInfo
|
|
|
|
{
|
|
|
|
xub_StrLen position; //!< Character position at which we change direction.
|
2011-03-14 16:51:14 +00:00
|
|
|
sal_uInt8 type; //!< Direction that we change to.
|
|
|
|
inline DirectionChangeInfo(xub_StrLen pos, sal_uInt8 typ) : position(pos), type(typ) {};
|
2011-02-08 15:05:14 +00:00
|
|
|
};
|
|
|
|
std::vector<DirectionChangeInfo> aDirectionChanges;
|
2003-10-30 09:18:14 +00:00
|
|
|
SvXub_StrLens aKashida;
|
2009-01-05 15:33:41 +00:00
|
|
|
SvXub_StrLens aKashidaInvalid;
|
|
|
|
SvXub_StrLens aNoKashidaLine;
|
|
|
|
SvXub_StrLens aNoKashidaLineEnd;
|
2004-02-26 14:28:26 +00:00
|
|
|
SvXub_StrLens aHiddenChg;
|
2011-02-08 16:12:13 +00:00
|
|
|
//! Records a single change in compression.
|
|
|
|
struct CompressionChangeInfo
|
|
|
|
{
|
|
|
|
xub_StrLen position; //!< Character position where the change occurs.
|
|
|
|
xub_StrLen length; //!< Length of the segment.
|
2011-03-14 16:51:14 +00:00
|
|
|
sal_uInt8 type; //!< Type of compression that we change to.
|
|
|
|
inline CompressionChangeInfo(xub_StrLen pos, xub_StrLen len, sal_uInt8 typ) : position(pos), length(len), type(typ) {};
|
2011-02-08 16:12:13 +00:00
|
|
|
};
|
|
|
|
std::vector<CompressionChangeInfo> aCompressionChanges;
|
2003-10-30 09:18:14 +00:00
|
|
|
xub_StrLen nInvalidityPos;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt8 nDefaultDir;
|
2003-10-30 09:18:14 +00:00
|
|
|
|
|
|
|
void UpdateBidiInfo( const String& rTxt );
|
|
|
|
|
2009-01-05 15:33:41 +00:00
|
|
|
sal_Bool IsKashidaValid ( xub_StrLen nKashPos ) const;
|
|
|
|
void MarkKashidaInvalid ( xub_StrLen nKashPos );
|
|
|
|
void ClearKashidaInvalid ( xub_StrLen nKashPos );
|
|
|
|
bool MarkOrClearKashidaInvalid( xub_StrLen nStt, xub_StrLen nLen, bool bMark, xub_StrLen nMarkCount );
|
|
|
|
bool IsKashidaLine ( xub_StrLen nCharIdx ) const;
|
|
|
|
|
2003-10-30 09:18:14 +00:00
|
|
|
public:
|
|
|
|
enum CompType { KANA, SPECIAL_LEFT, SPECIAL_RIGHT, NONE };
|
|
|
|
|
2006-01-10 12:39:26 +00:00
|
|
|
SwScriptInfo();
|
|
|
|
~SwScriptInfo();
|
2003-10-30 09:18:14 +00:00
|
|
|
|
|
|
|
// determines script changes
|
|
|
|
void InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL );
|
|
|
|
void InitScriptInfo( const SwTxtNode& rNode );
|
|
|
|
|
|
|
|
// set/get position from which data is invalid
|
|
|
|
inline void SetInvalidity( const xub_StrLen nPos );
|
|
|
|
inline xub_StrLen GetInvalidity() const { return nInvalidityPos; };
|
|
|
|
|
|
|
|
// get default direction for paragraph
|
2011-01-17 15:06:54 +01:00
|
|
|
inline sal_uInt8 GetDefaultDir() const { return nDefaultDir; };
|
2003-10-30 09:18:14 +00:00
|
|
|
|
|
|
|
// array operations, nCnt refers to array position
|
2010-10-05 20:01:23 +02:00
|
|
|
inline size_t CountScriptChg() const;
|
|
|
|
inline xub_StrLen GetScriptChg( const size_t nCnt ) const;
|
2011-01-17 15:06:54 +01:00
|
|
|
inline sal_uInt8 GetScriptType( const sal_uInt16 nCnt ) const;
|
2003-10-30 09:18:14 +00:00
|
|
|
|
2010-10-05 20:01:23 +02:00
|
|
|
inline size_t CountDirChg() const;
|
|
|
|
inline xub_StrLen GetDirChg( const size_t nCnt ) const;
|
2011-01-17 15:06:54 +01:00
|
|
|
inline sal_uInt8 GetDirType( const size_t nCnt ) const;
|
2003-10-30 09:18:14 +00:00
|
|
|
|
2010-10-05 20:01:23 +02:00
|
|
|
inline size_t CountKashida() const;
|
|
|
|
inline xub_StrLen GetKashida( const size_t nCnt ) const;
|
2003-10-30 09:18:14 +00:00
|
|
|
|
2010-10-05 20:01:23 +02:00
|
|
|
inline size_t CountCompChg() const;
|
|
|
|
inline xub_StrLen GetCompStart( const size_t nCnt ) const;
|
|
|
|
inline xub_StrLen GetCompLen( const size_t nCnt ) const;
|
2011-01-17 15:06:54 +01:00
|
|
|
inline sal_uInt8 GetCompType( const size_t nCnt ) const;
|
2003-10-30 09:18:14 +00:00
|
|
|
|
2010-10-05 20:01:23 +02:00
|
|
|
inline size_t CountHiddenChg() const;
|
|
|
|
inline xub_StrLen GetHiddenChg( const size_t nCnt ) const;
|
2006-01-19 17:19:50 +00:00
|
|
|
static void CalcHiddenRanges( const SwTxtNode& rNode,
|
2004-02-26 14:28:26 +00:00
|
|
|
MultiSelection& rHiddenMulti );
|
|
|
|
|
2003-10-30 09:18:14 +00:00
|
|
|
// "high" level operations, nPos refers to string position
|
|
|
|
xub_StrLen NextScriptChg( const xub_StrLen nPos ) const;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt8 ScriptType( const xub_StrLen nPos ) const;
|
2003-10-30 09:18:14 +00:00
|
|
|
|
|
|
|
// Returns the position of the next direction level change.
|
|
|
|
// If bLevel is set, the position of the next level which is smaller
|
|
|
|
// than the level at position nPos is returned. This is required to
|
|
|
|
// obtain the end of a SwBidiPortion
|
|
|
|
xub_StrLen NextDirChg( const xub_StrLen nPos,
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt8* pLevel = 0 ) const;
|
|
|
|
sal_uInt8 DirType( const xub_StrLen nPos ) const;
|
2003-10-30 09:18:14 +00:00
|
|
|
|
2004-08-12 11:28:17 +00:00
|
|
|
#if OSL_DEBUG_LEVEL > 1
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt8 CompType( const xub_StrLen nPos ) const;
|
2004-08-12 11:28:17 +00:00
|
|
|
#endif
|
2003-10-30 09:18:14 +00:00
|
|
|
|
2004-06-29 07:08:37 +00:00
|
|
|
//
|
|
|
|
// HIDDEN TEXT STUFF START
|
|
|
|
//
|
|
|
|
|
2004-02-26 14:28:26 +00:00
|
|
|
/** Hidden text range information - static and non-version
|
|
|
|
|
|
|
|
@descr Determines if a given position is inside a hidden text range. The
|
|
|
|
static version tries to obtain a valid SwScriptInfo object
|
|
|
|
via the SwTxtNode, otherwise it calculates the values from scratch.
|
|
|
|
The non-static version uses the internally cached informatio
|
|
|
|
for the calculation.
|
|
|
|
|
|
|
|
@param rNode
|
|
|
|
The text node.
|
|
|
|
@param nPos
|
|
|
|
The given position that should be checked.
|
|
|
|
@param rnStartPos
|
|
|
|
Return parameter for the start position of the hidden range.
|
|
|
|
STRING_LEN if nPos is not inside a hidden range.
|
|
|
|
@param rnEndPos
|
|
|
|
Return parameter for the end position of the hidden range.
|
|
|
|
0 if nPos is not inside a hidden range.
|
|
|
|
@param rnEndPos
|
|
|
|
Return parameter that contains all the hidden text ranges. Optional.
|
|
|
|
@return
|
|
|
|
returns true if there are any hidden characters in this paragraph.
|
|
|
|
|
|
|
|
*/
|
|
|
|
static bool GetBoundsOfHiddenRange( const SwTxtNode& rNode, xub_StrLen nPos,
|
|
|
|
xub_StrLen& rnStartPos, xub_StrLen& rnEndPos,
|
|
|
|
PositionList* pList = 0 );
|
|
|
|
bool GetBoundsOfHiddenRange( xub_StrLen nPos, xub_StrLen& rnStartPos,
|
|
|
|
xub_StrLen& rnEndPos, PositionList* pList = 0 ) const;
|
|
|
|
|
|
|
|
static bool IsInHiddenRange( const SwTxtNode& rNode, xub_StrLen nPos );
|
|
|
|
|
2004-06-29 07:08:37 +00:00
|
|
|
/** Hidden text attribute handling
|
2004-02-26 14:28:26 +00:00
|
|
|
|
|
|
|
@descr Takes a string and either deletes the hidden ranges or sets
|
|
|
|
a given character in place of the hidden characters.
|
|
|
|
|
|
|
|
@param rNode
|
|
|
|
The text node.
|
|
|
|
@param nPos
|
|
|
|
The string to modify.
|
2004-04-27 12:42:22 +00:00
|
|
|
@param cChar
|
2004-02-26 14:28:26 +00:00
|
|
|
The character that should replace the hidden characters.
|
2004-06-29 07:08:37 +00:00
|
|
|
@param bDel
|
|
|
|
If set, the hidden ranges will be deleted from the text node.
|
2004-04-27 12:42:22 +00:00
|
|
|
*/
|
2011-01-17 15:06:54 +01:00
|
|
|
static sal_uInt16 MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
|
2004-04-27 12:42:22 +00:00
|
|
|
const xub_StrLen nStt, const xub_StrLen nEnd,
|
|
|
|
const xub_Unicode cChar );
|
2004-02-26 14:28:26 +00:00
|
|
|
|
2006-11-01 14:12:00 +00:00
|
|
|
/** Hidden text attribute handling
|
|
|
|
|
|
|
|
@descr Takes a SwTxtNode and deletes the hidden ranges from the node.
|
|
|
|
|
|
|
|
@param rNode
|
|
|
|
The text node.
|
|
|
|
*/
|
|
|
|
static void DeleteHiddenRanges( SwTxtNode& rNode );
|
|
|
|
|
2004-06-29 07:08:37 +00:00
|
|
|
//
|
|
|
|
// HIDDEN TEXT STUFF END
|
|
|
|
//
|
|
|
|
|
2003-10-30 09:18:14 +00:00
|
|
|
// examines the range [ nStart, nStart + nEnd ] if there are kanas
|
|
|
|
// returns start index of kana entry in array, otherwise USHRT_MAX
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 HasKana( xub_StrLen nStart, const xub_StrLen nEnd ) const;
|
2003-10-30 09:18:14 +00:00
|
|
|
|
|
|
|
// modifies the kerning array according to a given compress value
|
2005-10-05 12:14:08 +00:00
|
|
|
long Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen nLen,
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
|
2003-10-30 09:18:14 +00:00
|
|
|
Point* pPoint = NULL ) const;
|
|
|
|
|
|
|
|
/** Performes a kashida justification on the kerning array
|
|
|
|
|
|
|
|
@descr Add some extra space for kashida justification to the
|
|
|
|
positions in the kerning array.
|
|
|
|
@param pKernArray
|
|
|
|
The printers kerning array. Optional.
|
|
|
|
@param pScrArray
|
|
|
|
The screen kerning array. Optional.
|
2009-01-05 15:33:41 +00:00
|
|
|
@param nStt
|
2003-10-30 09:18:14 +00:00
|
|
|
Start referring to the paragraph.
|
|
|
|
@param nLen
|
|
|
|
The number of characters to be considered.
|
2005-04-18 13:33:25 +00:00
|
|
|
@param nSpaceAdd
|
2003-10-30 09:18:14 +00:00
|
|
|
The value which has to be added to a kashida opportunity.
|
|
|
|
@return The number of kashida opportunities in the given range
|
|
|
|
*/
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 KashidaJustify( sal_Int32* pKernArray, sal_Int32* pScrArray,
|
2009-01-05 15:33:41 +00:00
|
|
|
xub_StrLen nStt, xub_StrLen nLen,
|
|
|
|
long nSpaceAdd = 0) const;
|
2003-10-30 09:18:14 +00:00
|
|
|
|
2009-01-05 15:33:41 +00:00
|
|
|
/** Clears array of kashidas marked as invalid
|
|
|
|
*/
|
|
|
|
inline void ClearKashidaInvalid ( xub_StrLen nStt, xub_StrLen nLen ) { MarkOrClearKashidaInvalid( nStt, nLen, false, 0 ); }
|
2003-10-30 09:18:14 +00:00
|
|
|
|
2009-01-05 15:33:41 +00:00
|
|
|
/** Marks nCnt kashida positions as invalid
|
|
|
|
pKashidaPositions: array of char indices relative to the paragraph
|
2003-10-30 09:18:14 +00:00
|
|
|
*/
|
2009-01-05 15:33:41 +00:00
|
|
|
bool MarkKashidasInvalid ( xub_StrLen nCnt, xub_StrLen* pKashidaPositions );
|
|
|
|
|
|
|
|
/** Marks nCnt kashida positions as invalid
|
|
|
|
in the given text range
|
|
|
|
*/
|
|
|
|
inline bool MarkKashidasInvalid ( xub_StrLen nCnt, xub_StrLen nStt, xub_StrLen nLen )
|
|
|
|
{ return MarkOrClearKashidaInvalid( nStt, nLen, true, nCnt ); }
|
|
|
|
|
|
|
|
/** retrieves kashida opportunities for a given text range.
|
|
|
|
returns the number of kashida positions in the given text range
|
|
|
|
|
|
|
|
pKashidaPositions: buffer to reveive the char indices of the
|
|
|
|
kashida opportunties relative to the paragraph
|
|
|
|
*/
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
|
2009-01-05 15:33:41 +00:00
|
|
|
xub_StrLen* pKashidaPosition );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Use regular blank justification instead of kashdida justification for the given line of text.
|
|
|
|
nStt Start char index of the line referring to the paragraph.
|
|
|
|
nLen Number of characters in the line
|
|
|
|
*/
|
|
|
|
void SetNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen );
|
|
|
|
|
|
|
|
/** Clear forced blank justification for a given line.
|
|
|
|
nStt Start char index of the line referring to the paragraph.
|
|
|
|
nLen Number of characters in the line
|
|
|
|
*/
|
|
|
|
void ClearNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen );
|
|
|
|
|
|
|
|
/** Checks if text is Arabic text.
|
|
|
|
|
|
|
|
@descr Checks if text is Arabic text.
|
|
|
|
@param rTxt
|
|
|
|
The text to check
|
|
|
|
@param nStt
|
|
|
|
Start index of the text
|
|
|
|
@return Returns if the language is an Arabic language
|
|
|
|
*/
|
|
|
|
static sal_Bool IsArabicText( const XubString& rTxt, xub_StrLen nStt, xub_StrLen nLen );
|
2003-10-30 09:18:14 +00:00
|
|
|
|
|
|
|
/** Performes a thai justification on the kerning array
|
|
|
|
|
|
|
|
@descr Add some extra space for thai justification to the
|
|
|
|
positions in the kerning array.
|
|
|
|
@param rTxt
|
|
|
|
The String
|
|
|
|
@param pKernArray
|
|
|
|
The printers kerning array. Optional.
|
|
|
|
@param pScrArray
|
|
|
|
The screen kerning array. Optional.
|
|
|
|
@param nIdx
|
|
|
|
Start referring to the paragraph.
|
|
|
|
@param nLen
|
|
|
|
The number of characters to be considered.
|
2005-04-18 13:33:25 +00:00
|
|
|
@param nSpaceAdd
|
2003-10-30 09:18:14 +00:00
|
|
|
The value which has to be added to the cells.
|
|
|
|
@return The number of extra spaces in the given range
|
|
|
|
*/
|
2011-01-17 15:06:54 +01:00
|
|
|
static sal_uInt16 ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
|
2005-10-05 12:14:08 +00:00
|
|
|
sal_Int32* pScrArray, xub_StrLen nIdx,
|
2005-04-18 13:33:25 +00:00
|
|
|
xub_StrLen nLen, xub_StrLen nNumberOfBlanks = 0,
|
|
|
|
long nSpaceAdd = 0 );
|
2003-10-30 09:18:14 +00:00
|
|
|
|
|
|
|
static SwScriptInfo* GetScriptInfo( const SwTxtNode& rNode,
|
|
|
|
sal_Bool bAllowInvalid = sal_False );
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
static sal_uInt8 WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI );
|
2003-10-30 09:18:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos )
|
|
|
|
{
|
|
|
|
if ( nPos < nInvalidityPos )
|
|
|
|
nInvalidityPos = nPos;
|
|
|
|
};
|
2011-03-14 16:51:14 +00:00
|
|
|
inline size_t SwScriptInfo::CountScriptChg() const { return aScriptChanges.size(); }
|
2010-10-05 20:01:23 +02:00
|
|
|
inline xub_StrLen SwScriptInfo::GetScriptChg( const size_t nCnt ) const
|
2003-10-30 09:18:14 +00:00
|
|
|
{
|
2011-02-08 14:05:29 +00:00
|
|
|
OSL_ENSURE( nCnt < aScriptChanges.size(),"No ScriptChange today!");
|
|
|
|
return aScriptChanges[nCnt].position;
|
2003-10-30 09:18:14 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
inline sal_uInt8 SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
|
2003-10-30 09:18:14 +00:00
|
|
|
{
|
2011-02-08 14:05:29 +00:00
|
|
|
OSL_ENSURE( nCnt < aScriptChanges.size(),"No ScriptType today!");
|
|
|
|
return aScriptChanges[nCnt].type;
|
2003-10-30 09:18:14 +00:00
|
|
|
}
|
|
|
|
|
2011-03-14 16:51:14 +00:00
|
|
|
inline size_t SwScriptInfo::CountDirChg() const { return aDirectionChanges.size(); }
|
2010-10-05 20:01:23 +02:00
|
|
|
inline xub_StrLen SwScriptInfo::GetDirChg( const size_t nCnt ) const
|
2003-10-30 09:18:14 +00:00
|
|
|
{
|
2011-02-08 15:05:14 +00:00
|
|
|
OSL_ENSURE( nCnt < aDirectionChanges.size(),"No DirChange today!");
|
|
|
|
return aDirectionChanges[ nCnt ].position;
|
2003-10-30 09:18:14 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
inline sal_uInt8 SwScriptInfo::GetDirType( const size_t nCnt ) const
|
2003-10-30 09:18:14 +00:00
|
|
|
{
|
2011-02-08 15:05:14 +00:00
|
|
|
OSL_ENSURE( nCnt < aDirectionChanges.size(),"No DirType today!");
|
|
|
|
return aDirectionChanges[ nCnt ].type;
|
2003-10-30 09:18:14 +00:00
|
|
|
}
|
|
|
|
|
2010-10-05 20:01:23 +02:00
|
|
|
inline size_t SwScriptInfo::CountKashida() const { return aKashida.size(); }
|
|
|
|
inline xub_StrLen SwScriptInfo::GetKashida( const size_t nCnt ) const
|
2003-10-30 09:18:14 +00:00
|
|
|
{
|
2011-03-15 13:50:53 +00:00
|
|
|
OSL_ENSURE( nCnt < aKashida.size(),"No Kashidas today!");
|
2003-10-30 09:18:14 +00:00
|
|
|
return aKashida[ nCnt ];
|
|
|
|
}
|
|
|
|
|
2011-03-14 16:51:14 +00:00
|
|
|
inline size_t SwScriptInfo::CountCompChg() const { return aCompressionChanges.size(); };
|
2010-10-05 20:01:23 +02:00
|
|
|
inline xub_StrLen SwScriptInfo::GetCompStart( const size_t nCnt ) const
|
2003-10-30 09:18:14 +00:00
|
|
|
{
|
2011-02-08 16:12:13 +00:00
|
|
|
OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionStart today!");
|
|
|
|
return aCompressionChanges[ nCnt ].position;
|
2003-10-30 09:18:14 +00:00
|
|
|
}
|
2010-10-05 20:01:23 +02:00
|
|
|
inline xub_StrLen SwScriptInfo::GetCompLen( const size_t nCnt ) const
|
2003-10-30 09:18:14 +00:00
|
|
|
{
|
2011-02-08 16:12:13 +00:00
|
|
|
OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionLen today!");
|
|
|
|
return aCompressionChanges[ nCnt ].length;
|
2003-10-30 09:18:14 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
inline sal_uInt8 SwScriptInfo::GetCompType( const size_t nCnt ) const
|
2003-10-30 09:18:14 +00:00
|
|
|
{
|
2011-02-08 16:12:13 +00:00
|
|
|
OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionType today!");
|
|
|
|
return aCompressionChanges[ nCnt ].type;
|
2003-10-30 09:18:14 +00:00
|
|
|
}
|
|
|
|
|
2010-10-05 20:01:23 +02:00
|
|
|
inline size_t SwScriptInfo::CountHiddenChg() const { return aHiddenChg.size(); };
|
|
|
|
inline xub_StrLen SwScriptInfo::GetHiddenChg( const size_t nCnt ) const
|
2004-02-26 14:28:26 +00:00
|
|
|
{
|
2011-03-15 13:50:53 +00:00
|
|
|
OSL_ENSURE( nCnt < aHiddenChg.size(),"No HiddenChg today!");
|
2004-02-26 14:28:26 +00:00
|
|
|
return aHiddenChg[ nCnt ];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-10-30 09:18:14 +00:00
|
|
|
#endif
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|