poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sack...@apache.org
Subject cvs commit: jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel CharacterProperties.java
Date Mon, 10 Nov 2003 15:34:21 GMT
sackley     2003/11/10 07:34:20

  Modified:    src/scratchpad/src/org/apache/poi/hwpf/usermodel
                        CharacterProperties.java
  Log:
  some quick changes
  
  Revision  Changes    Path
  1.3       +113 -12   jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java
  
  Index: CharacterProperties.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CharacterProperties.java	10 Nov 2003 11:53:51 -0000	1.2
  +++ CharacterProperties.java	10 Nov 2003 15:34:20 -0000	1.3
  @@ -141,7 +141,7 @@
   
     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 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 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 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 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 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 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 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 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 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 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,11 +307,112 @@
   
     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);
         super.setFEmboss(emboss);
  +    }
  +
  +  }
  +
  +  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);
       }
   
     }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message