org.apache.poi.hslf.record
Class TextSpecInfoRun

java.lang.Object
  extended by org.apache.poi.hslf.record.TextSpecInfoRun

public class TextSpecInfoRun
extends java.lang.Object


Nested Class Summary
static class TextSpecInfoRun.SpellInfoEnum
          A enum that specifies the spelling status of a run of text.
 
Field Summary
protected  short altLangId
          An optional TxLCID that specifies the alternate language identifier of this text.
protected  short bidi
          An optional signed integer that specifies whether the text contains bidirectional characters.
protected  short langId
          An optional TxLCID that specifies the language identifier of this text.
protected  int length
           
protected  int mask
           
protected  int pp10extMask
           
protected  byte[] smartTagsBytes
           
protected  short spellInfo
          An optional SpellingFlags structure that specifies the spelling status of this text.
 
Constructor Summary
TextSpecInfoRun(int len)
          Inits a TextSpecInfoRun with default values
TextSpecInfoRun(LittleEndianByteArrayInputStream source)
           
 
Method Summary
 short getAltLangId()
          Alternate Windows LANGID of this text; must be a valid non-East Asian LANGID if the text has an East Asian language, otherwise may be an East Asian LANGID or language neutral (zero).
 java.lang.Boolean getBidi()
           
 java.lang.Boolean getGrammarError()
           
 void getGrammarError(java.lang.Boolean grammarError)
           
 short getLangId()
          Windows LANGID for this text.
 int getLength()
           
 int getPP10RunId()
           
 byte[] getSmartTagsBytes()
           
 TextSpecInfoRun.SpellInfoEnum getSpellInfo()
           
 void setAltLangId(short altLangId)
           
 void setBidi(java.lang.Boolean bidi)
           
 void setLangId(short langId)
           
 void setLength(int length)
           
 void setPP10RunId(int pp10RunId)
           
 void setSmartTagsBytes(byte[] smartTagsBytes)
           
 void setSpellInfo(TextSpecInfoRun.SpellInfoEnum spellInfo)
           
 void writeOut(java.io.OutputStream out)
          Write the contents of the record back, so it can be written to disk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

length

protected int length

mask

protected int mask

spellInfo

protected short spellInfo
An optional SpellingFlags structure that specifies the spelling status of this text. It MUST exist if and only if spell is TRUE. The spellInfo.grammar sub-field MUST be zero.
error (1 bit): A bit that specifies whether the text is spelled incorrectly.
clean (1 bit): A bit that specifies whether the text needs rechecking.
grammar (1 bit): A bit that specifies whether the text has a grammar error.
reserved (13 bits): MUST be zero and MUST be ignored.


langId

protected short langId
An optional TxLCID that specifies the language identifier of this text. It MUST exist if and only if lang is TRUE.
0x0000 = No language.
0x0013 = Any Dutch language is preferred over non-Dutch languages when proofing the text.
0x0400 = No proofing is performed on the text.
> 0x0400 = A valid LCID as specified by [MS-LCID].


altLangId

protected short altLangId
An optional TxLCID that specifies the alternate language identifier of this text. It MUST exist if and only if altLang is TRUE.


bidi

protected short bidi
An optional signed integer that specifies whether the text contains bidirectional characters. It MUST exist if and only if fBidi is TRUE. 0x0000 = Contains no bidirectional characters, 0x0001 = Contains bidirectional characters.


pp10extMask

protected int pp10extMask

smartTagsBytes

protected byte[] smartTagsBytes
Constructor Detail

TextSpecInfoRun

public TextSpecInfoRun(int len)
Inits a TextSpecInfoRun with default values

Parameters:
len - the length of the one and only run

TextSpecInfoRun

public TextSpecInfoRun(LittleEndianByteArrayInputStream source)
Method Detail

writeOut

public void writeOut(java.io.OutputStream out)
              throws java.io.IOException
Write the contents of the record back, so it can be written to disk

Parameters:
out - the output stream to write to.
Throws:
java.io.IOException - if an error occurs.

getSpellInfo

public TextSpecInfoRun.SpellInfoEnum getSpellInfo()
Returns:
Spelling status of this text. null if not defined.

setSpellInfo

public void setSpellInfo(TextSpecInfoRun.SpellInfoEnum spellInfo)
Parameters:
spellInfo - Spelling status of this text. null if not defined.

getLangId

public short getLangId()
Windows LANGID for this text.

Returns:
Windows LANGID for this text, -1 if it's not set

setLangId

public void setLangId(short langId)
Parameters:
langId - Windows LANGID for this text, -1 to unset

getAltLangId

public short getAltLangId()
Alternate Windows LANGID of this text; must be a valid non-East Asian LANGID if the text has an East Asian language, otherwise may be an East Asian LANGID or language neutral (zero).

Returns:
Alternate Windows LANGID of this text, -1 if it's not set

setAltLangId

public void setAltLangId(short altLangId)

getLength

public int getLength()
Returns:
Length of special info run.

setLength

public void setLength(int length)
Parameters:
length - Length of special info run.

getBidi

public java.lang.Boolean getBidi()
Returns:
the bidirectional characters flag. false = not bidi, true = is bidi, null = not set

setBidi

public void setBidi(java.lang.Boolean bidi)
Parameters:
bidi - the bidirectional characters flag. false = not bidi, true = is bidi, null = not set

getSmartTagsBytes

public byte[] getSmartTagsBytes()
Returns:
the unparsed smart tags

setSmartTagsBytes

public void setSmartTagsBytes(byte[] smartTagsBytes)
Parameters:
smartTagsBytes - the unparsed smart tags, null to unset

getPP10RunId

public int getPP10RunId()
Returns:
an identifier for a character run that contains StyleTextProp11 data.

setPP10RunId

public void setPP10RunId(int pp10RunId)
Parameters:
pp10RunId - an identifier for a character run that contains StyleTextProp11 data, -1 to unset

getGrammarError

public java.lang.Boolean getGrammarError()

getGrammarError

public void getGrammarError(java.lang.Boolean grammarError)


Copyright 2016 The Apache Software Foundation or its licensors, as applicable.