some quick changes

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Said Ryan Ackley 2003-11-10 15:34:20 +00:00
parent 1081456401
commit 310a747291

View File

@ -141,7 +141,7 @@ public class CharacterProperties
public void markDeleted(boolean mark) public void markDeleted(boolean mark)
{ {
if (mark != isFRMarkDel() && mark != _baseStyle.getCHP().isFRMarkDel()) if (mark != isFRMarkDel())
{ {
byte newVal = (byte)(mark ? 1 : 0); byte newVal = (byte)(mark ? 1 : 0);
_chpx.addSprm(SPRM_FRMARKDEL, newVal); _chpx.addSprm(SPRM_FRMARKDEL, newVal);
@ -156,7 +156,7 @@ public class CharacterProperties
public void setBold(boolean bold) public void setBold(boolean bold)
{ {
if (bold != isFBold() && bold != _baseStyle.getCHP().isFBold()) if (bold != isFBold())
{ {
byte newVal = (byte)(bold ? 1 : 0); byte newVal = (byte)(bold ? 1 : 0);
_chpx.addSprm(SPRM_FBOLD, newVal); _chpx.addSprm(SPRM_FBOLD, newVal);
@ -171,7 +171,7 @@ public class CharacterProperties
public void setItalic(boolean italic) public void setItalic(boolean italic)
{ {
if (italic != isFItalic() && italic != _baseStyle.getCHP().isFItalic()) if (italic != isFItalic())
{ {
byte newVal = (byte)(italic ? 1 : 0); byte newVal = (byte)(italic ? 1 : 0);
_chpx.addSprm(SPRM_FITALIC, newVal); _chpx.addSprm(SPRM_FITALIC, newVal);
@ -186,7 +186,7 @@ public class CharacterProperties
public void setOutline(boolean outlined) public void setOutline(boolean outlined)
{ {
if (outlined != isFOutline() && outlined != _baseStyle.getCHP().isFOutline()) if (outlined != isFOutline())
{ {
byte newVal = (byte)(outlined ? 1 : 0); byte newVal = (byte)(outlined ? 1 : 0);
_chpx.addSprm(SPRM_FOUTLINE, newVal); _chpx.addSprm(SPRM_FOUTLINE, newVal);
@ -202,7 +202,7 @@ public class CharacterProperties
public void setFldVanish(boolean fldVanish) public void setFldVanish(boolean fldVanish)
{ {
if (fldVanish != isFFldVanish() && fldVanish != _baseStyle.getCHP().isFFldVanish()) if (fldVanish != isFFldVanish())
{ {
byte newVal = (byte)(fldVanish ? 1 : 0); byte newVal = (byte)(fldVanish ? 1 : 0);
_chpx.addSprm(SPRM_FFLDVANISH, newVal); _chpx.addSprm(SPRM_FFLDVANISH, newVal);
@ -217,7 +217,7 @@ public class CharacterProperties
public void setSmallCaps(boolean smallCaps) public void setSmallCaps(boolean smallCaps)
{ {
if (smallCaps != isFSmallCaps() && smallCaps != _baseStyle.getCHP().isFSmallCaps()) if (smallCaps != isFSmallCaps())
{ {
byte newVal = (byte)(smallCaps ? 1 : 0); byte newVal = (byte)(smallCaps ? 1 : 0);
_chpx.addSprm(SPRM_FSMALLCAPS, newVal); _chpx.addSprm(SPRM_FSMALLCAPS, newVal);
@ -231,7 +231,7 @@ public class CharacterProperties
public void setCapitalized(boolean caps) public void setCapitalized(boolean caps)
{ {
if (caps != isFCaps() && caps != _baseStyle.getCHP().isFCaps()) if (caps != isFCaps())
{ {
byte newVal = (byte)(caps ? 1 : 0); byte newVal = (byte)(caps ? 1 : 0);
_chpx.addSprm(SPRM_FCAPS, newVal); _chpx.addSprm(SPRM_FCAPS, newVal);
@ -246,7 +246,7 @@ public class CharacterProperties
public void setVanished(boolean vanish) public void setVanished(boolean vanish)
{ {
if (vanish != isFVanish() && vanish != _baseStyle.getCHP().isFVanish()) if (vanish != isFVanish())
{ {
byte newVal = (byte)(vanish ? 1 : 0); byte newVal = (byte)(vanish ? 1 : 0);
_chpx.addSprm(SPRM_FVANISH, newVal); _chpx.addSprm(SPRM_FVANISH, newVal);
@ -261,7 +261,7 @@ public class CharacterProperties
public void markInserted(boolean mark) public void markInserted(boolean mark)
{ {
if (mark != isFRMark() && mark != _baseStyle.getCHP().isFRMark()) if (mark != isFRMark())
{ {
byte newVal = (byte)(mark ? 1 : 0); byte newVal = (byte)(mark ? 1 : 0);
_chpx.addSprm(SPRM_FRMARK, newVal); _chpx.addSprm(SPRM_FRMARK, newVal);
@ -276,7 +276,7 @@ public class CharacterProperties
public void strikeThrough(boolean strike) public void strikeThrough(boolean strike)
{ {
if (strike != isFStrike() && strike != _baseStyle.getCHP().isFStrike()) if (strike != isFStrike())
{ {
byte newVal = (byte)(strike ? 1 : 0); byte newVal = (byte)(strike ? 1 : 0);
_chpx.addSprm(SPRM_FSTRIKE, newVal); _chpx.addSprm(SPRM_FSTRIKE, newVal);
@ -291,7 +291,7 @@ public class CharacterProperties
public void setShadow(boolean shadow) public void setShadow(boolean shadow)
{ {
if (shadow != isFShadow() && shadow != _baseStyle.getCHP().isFShadow()) if (shadow != isFShadow())
{ {
byte newVal = (byte)(shadow ? 1 : 0); byte newVal = (byte)(shadow ? 1 : 0);
_chpx.addSprm(SPRM_FSHADOW, newVal); _chpx.addSprm(SPRM_FSHADOW, newVal);
@ -307,7 +307,7 @@ public class CharacterProperties
public void setEmbossed(boolean emboss) public void setEmbossed(boolean emboss)
{ {
if (emboss != isFEmboss() && emboss != _baseStyle.getCHP().isFEmboss()) if (emboss != isFEmboss())
{ {
byte newVal = (byte)(emboss ? 1 : 0); byte newVal = (byte)(emboss ? 1 : 0);
_chpx.addSprm(SPRM_FEMBOSS, newVal); _chpx.addSprm(SPRM_FEMBOSS, newVal);
@ -316,6 +316,107 @@ public class CharacterProperties
} }
public boolean isImprinted()
{
return isFImprint();
}
public void setImprinted(boolean imprint)
{
if (imprint != isFImprint())
{
byte newVal = (byte)(imprint ? 1 : 0);
_chpx.addSprm(SPRM_FIMPRINT, newVal);
super.setFImprint(imprint);
}
}
public boolean isDoubleStrikeThrough()
{
return isFDStrike();
}
public void setDoubleStrikethrough(boolean dstrike)
{
if (dstrike != isFDStrike())
{
byte newVal = (byte)(dstrike ? 1 : 0);
_chpx.addSprm(SPRM_FDSTRIKE, newVal);
super.setFDStrike(dstrike);
}
}
public void setFtcAscii(int ftcAscii)
{
if (ftcAscii != getFtcAscii())
{
_chpx.addSprm(SPRM_RGFTCASCII, (short)ftcAscii);
}
super.setFtcAscii(ftcAscii);
}
public void setFtcFE(int ftcFE)
{
if (ftcFE != getFtcFE())
{
_chpx.addSprm(SPRM_RGFTCFAREAST, (short)ftcFE);
}
super.setFtcFE(ftcFE);
}
public void setFtcOther(int ftcOther)
{
if (ftcOther != getFtcOther())
{
_chpx.addSprm(SPRM_RGFTCNOTFAREAST, (short)ftcOther);
}
super.setFtcOther(ftcOther);
}
public int getFontSize()
{
return getHps();
}
public void setFontSize(int halfPoints)
{
if (halfPoints != getHps())
{
_chpx.addSprm(SPRM_HPS, (short)halfPoints);
super.setHps(halfPoints);
}
}
public int getCharacterSpacing()
{
return getDxaSpace();
}
public void setCharacterSpacing(int twips)
{
if (twips != getDxaSpace())
{
_chpx.addSprm(SPRM_DXASPACE, twips);
super.setDxaSpace(twips);
}
}
public short getSubSuperScriptIndex()
{
return getIss();
}
public void setSubSuperScriptIndex(short iss)
{
if (iss != getIss())
{
_chpx.addSprm(SPRM_DXASPACE, iss);
super.setDxaSpace(iss);
}
}
public Object clone() public Object clone()
throws CloneNotSupportedException throws CloneNotSupportedException