aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSaid Ryan Ackley <sackley@apache.org>2003-11-10 15:34:20 +0000
committerSaid Ryan Ackley <sackley@apache.org>2003-11-10 15:34:20 +0000
commita685616569279b40547998704de388081df8eafa (patch)
treeb0186c2fbc757cbb141f645ace2b988b9f14e202 /src
parent0a34be25b84d576606e36e7e3d4441060abd1e31 (diff)
downloadpoi-a685616569279b40547998704de388081df8eafa.tar.gz
poi-a685616569279b40547998704de388081df8eafa.zip
some quick changes
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353444 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java125
1 files changed, 113 insertions, 12 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java
index f57cce641d..adde0e28ce 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java
@@ -141,7 +141,7 @@ public class CharacterProperties
public void markDeleted(boolean mark)
{
- if (mark != isFRMarkDel() && mark != _baseStyle.getCHP().isFRMarkDel())
+ if (mark != isFRMarkDel())
{
byte newVal = (byte)(mark ? 1 : 0);
_chpx.addSprm(SPRM_FRMARKDEL, newVal);
@@ -156,7 +156,7 @@ public class CharacterProperties
public void setBold(boolean bold)
{
- if (bold != isFBold() && bold != _baseStyle.getCHP().isFBold())
+ if (bold != isFBold())
{
byte newVal = (byte)(bold ? 1 : 0);
_chpx.addSprm(SPRM_FBOLD, newVal);
@@ -171,7 +171,7 @@ public class CharacterProperties
public void setItalic(boolean italic)
{
- if (italic != isFItalic() && italic != _baseStyle.getCHP().isFItalic())
+ if (italic != isFItalic())
{
byte newVal = (byte)(italic ? 1 : 0);
_chpx.addSprm(SPRM_FITALIC, newVal);
@@ -186,7 +186,7 @@ public class CharacterProperties
public void setOutline(boolean outlined)
{
- if (outlined != isFOutline() && outlined != _baseStyle.getCHP().isFOutline())
+ if (outlined != isFOutline())
{
byte newVal = (byte)(outlined ? 1 : 0);
_chpx.addSprm(SPRM_FOUTLINE, newVal);
@@ -202,7 +202,7 @@ public class CharacterProperties
public void setFldVanish(boolean fldVanish)
{
- if (fldVanish != isFFldVanish() && fldVanish != _baseStyle.getCHP().isFFldVanish())
+ if (fldVanish != isFFldVanish())
{
byte newVal = (byte)(fldVanish ? 1 : 0);
_chpx.addSprm(SPRM_FFLDVANISH, newVal);
@@ -217,7 +217,7 @@ public class CharacterProperties
public void setSmallCaps(boolean smallCaps)
{
- if (smallCaps != isFSmallCaps() && smallCaps != _baseStyle.getCHP().isFSmallCaps())
+ if (smallCaps != isFSmallCaps())
{
byte newVal = (byte)(smallCaps ? 1 : 0);
_chpx.addSprm(SPRM_FSMALLCAPS, newVal);
@@ -231,7 +231,7 @@ public class CharacterProperties
public void setCapitalized(boolean caps)
{
- if (caps != isFCaps() && caps != _baseStyle.getCHP().isFCaps())
+ if (caps != isFCaps())
{
byte newVal = (byte)(caps ? 1 : 0);
_chpx.addSprm(SPRM_FCAPS, newVal);
@@ -246,7 +246,7 @@ public class CharacterProperties
public void setVanished(boolean vanish)
{
- if (vanish != isFVanish() && vanish != _baseStyle.getCHP().isFVanish())
+ if (vanish != isFVanish())
{
byte newVal = (byte)(vanish ? 1 : 0);
_chpx.addSprm(SPRM_FVANISH, newVal);
@@ -261,7 +261,7 @@ public class CharacterProperties
public void markInserted(boolean mark)
{
- if (mark != isFRMark() && mark != _baseStyle.getCHP().isFRMark())
+ if (mark != isFRMark())
{
byte newVal = (byte)(mark ? 1 : 0);
_chpx.addSprm(SPRM_FRMARK, newVal);
@@ -276,7 +276,7 @@ public class CharacterProperties
public void strikeThrough(boolean strike)
{
- if (strike != isFStrike() && strike != _baseStyle.getCHP().isFStrike())
+ if (strike != isFStrike())
{
byte newVal = (byte)(strike ? 1 : 0);
_chpx.addSprm(SPRM_FSTRIKE, newVal);
@@ -291,7 +291,7 @@ public class CharacterProperties
public void setShadow(boolean shadow)
{
- if (shadow != isFShadow() && shadow != _baseStyle.getCHP().isFShadow())
+ if (shadow != isFShadow())
{
byte newVal = (byte)(shadow ? 1 : 0);
_chpx.addSprm(SPRM_FSHADOW, newVal);
@@ -307,7 +307,7 @@ public class CharacterProperties
public void setEmbossed(boolean emboss)
{
- if (emboss != isFEmboss() && emboss != _baseStyle.getCHP().isFEmboss())
+ if (emboss != isFEmboss())
{
byte newVal = (byte)(emboss ? 1 : 0);
_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()
throws CloneNotSupportedException