summaryrefslogtreecommitdiff
path: root/sw/source/core/inc/scriptinfo.hxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-08-31 17:55:44 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-09-06 12:12:27 +0200
commitc49faa1447801a885fd0c25910a4a5d7ea24ed77 (patch)
treeb2a73ea6064c5f5b0e9518e5bfc785fff4f9e0c5 /sw/source/core/inc/scriptinfo.hxx
parenta048b088819442ef1c437c6ecd8904a690b254f2 (diff)
Use enumeration directly
Change-Id: I5b537bb863eafa9e508c7298c611b0d1c0145d77
Diffstat (limited to 'sw/source/core/inc/scriptinfo.hxx')
-rw-r--r--sw/source/core/inc/scriptinfo.hxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 1ad55c423779..bdc47ca0c0ee 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -35,6 +35,9 @@ typedef std::list< sal_Int32 > PositionList;
// encapsultes information about script changes
class SwScriptInfo
{
+public:
+ enum CompType { KANA, SPECIAL_LEFT, SPECIAL_RIGHT, NONE };
+
private:
//! Records a single change in script type.
struct ScriptChangeInfo
@@ -64,10 +67,14 @@ private:
{
sal_Int32 position; //!< Character position where the change occurs.
sal_Int32 length; //!< Length of the segment.
- sal_uInt8 type; //!< Type of compression that we change to.
- inline CompressionChangeInfo(sal_Int32 pos, sal_Int32 len, sal_uInt8 typ) : position(pos), length(len), type(typ) {};
+ CompType type; //!< Type of compression that we change to.
+ inline CompressionChangeInfo(sal_Int32 pos, sal_Int32 len, CompType typ) : position(pos), length(len), type(typ) {};
};
std::vector<CompressionChangeInfo> aCompressionChanges;
+#ifdef DBG_UTIL
+ CompType DbgCompType( const sal_Int32 nPos ) const;
+#endif
+
sal_Int32 nInvalidityPos;
sal_uInt8 nDefaultDir;
@@ -83,7 +90,6 @@ private:
size_t HasKana( sal_Int32 nStart, const sal_Int32 nEnd ) const;
public:
- enum CompType { KANA, SPECIAL_LEFT, SPECIAL_RIGHT, NONE };
SwScriptInfo();
~SwScriptInfo();
@@ -153,7 +159,7 @@ public:
OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionLen today!");
return aCompressionChanges[ nCnt ].length;
}
- sal_uInt8 GetCompType( const size_t nCnt ) const
+ CompType GetCompType( const size_t nCnt ) const
{
OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionType today!");
return aCompressionChanges[ nCnt ].type;
@@ -181,10 +187,6 @@ public:
const sal_uInt8* pLevel = 0 ) const;
sal_uInt8 DirType( const sal_Int32 nPos ) const;
-#ifdef DBG_UTIL
- sal_uInt8 CompType( const sal_Int32 nPos ) const;
-#endif
-
// HIDDEN TEXT STUFF START
/** Hidden text range information - static and non-version