亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? stylesheet.java

?? 抽取pdf和word文本內容的源代碼
?? JAVA
字號:
/* ====================================================================   Copyright 2002-2004   Apache Software Foundation   Licensed under the Apache License, Version 2.0 (the "License");   you may not use this file except in compliance with the License.   You may obtain a copy of the License at       http://www.apache.org/licenses/LICENSE-2.0   Unless required by applicable law or agreed to in writing, software   distributed under the License is distributed on an "AS IS" BASIS,   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the License for the specific language governing permissions and   limitations under the License.==================================================================== */        package org.apache.poi.hwpf.model;import java.util.*;import java.io.IOException;import org.apache.poi.util.LittleEndian;import org.apache.poi.hwpf.model.io.HWPFOutputStream;import org.apache.poi.hwpf.usermodel.CharacterProperties;import org.apache.poi.hwpf.usermodel.ParagraphProperties;import org.apache.poi.hwpf.sprm.ParagraphSprmUncompressor;import org.apache.poi.hwpf.sprm.CharacterSprmUncompressor;/** * Represents a document's stylesheet. A word documents formatting is stored as * compressed styles that are based on styles contained in the stylesheet. This * class also contains static utility functions to uncompress different * formatting properties. * * @author Ryan Ackley */public class StyleSheet implements HDFType{  public static final int NIL_STYLE = 4095;  private static final int PAP_TYPE = 1;  private static final int CHP_TYPE = 2;  private static final int SEP_TYPE = 4;  private static final int TAP_TYPE = 5;  private final static ParagraphProperties NIL_PAP = new ParagraphProperties();  private final static CharacterProperties NIL_CHP = new CharacterProperties();  private int _stshiLength;  private int _baseLength;  private int _flags;  private int _maxIndex;  private int _maxFixedIndex;  private int _stylenameVersion;  private int[] _rgftc;  StyleDescription[] _styleDescriptions;  /**   * StyleSheet constructor. Loads a document's stylesheet information,   *   * @param styleSheet A byte array containing a document's raw stylesheet   *        info. Found by using FileInformationBlock.getFcStshf() and   *        FileInformationBLock.getLcbStshf()   */  public StyleSheet(byte[] tableStream, int offset)  {      _stshiLength = LittleEndian.getShort(tableStream, offset);      offset += LittleEndian.SHORT_SIZE;      int stdCount = LittleEndian.getShort(tableStream, offset);      offset += LittleEndian.SHORT_SIZE;      _baseLength = LittleEndian.getShort(tableStream, offset);      offset += LittleEndian.SHORT_SIZE;      _flags = LittleEndian.getShort(tableStream, offset);      offset += LittleEndian.SHORT_SIZE;      _maxIndex = LittleEndian.getShort(tableStream, offset);      offset += LittleEndian.SHORT_SIZE;      _maxFixedIndex = LittleEndian.getShort(tableStream, offset);      offset += LittleEndian.SHORT_SIZE;      _stylenameVersion = LittleEndian.getShort(tableStream, offset);      offset += LittleEndian.SHORT_SIZE;      _rgftc = new int[3];      _rgftc[0] = LittleEndian.getShort(tableStream, offset);      offset += LittleEndian.SHORT_SIZE;      _rgftc[1] = LittleEndian.getShort(tableStream, offset);      offset += LittleEndian.SHORT_SIZE;      _rgftc[2] = LittleEndian.getShort(tableStream, offset);      offset += LittleEndian.SHORT_SIZE;      offset = (LittleEndian.SHORT_SIZE + _stshiLength);      _styleDescriptions = new StyleDescription[stdCount];      for(int x = 0; x < stdCount; x++)      {          int stdSize = LittleEndian.getShort(tableStream, offset);          //get past the size          offset += 2;          if(stdSize > 0)          {              //byte[] std = new byte[stdSize];              StyleDescription aStyle = new StyleDescription(tableStream,                _baseLength, offset, true);              _styleDescriptions[x] = aStyle;          }          offset += stdSize;      }      for(int x = 0; x < _styleDescriptions.length; x++)      {          if(_styleDescriptions[x] != null)          {              createPap(x);              createChp(x);          }      }  }  public void writeTo(HWPFOutputStream out)    throws IOException  {    int offset = 0;    // add two bytes so we can prepend the stylesheet w/ its size    byte[] buf = new byte[_stshiLength + 2];    LittleEndian.putShort(buf, offset, (short)_stshiLength);    offset += LittleEndian.SHORT_SIZE;    LittleEndian.putShort(buf, offset, (short)_styleDescriptions.length);    offset += LittleEndian.SHORT_SIZE;    LittleEndian.putShort(buf, offset, (short)_baseLength);    offset += LittleEndian.SHORT_SIZE;    LittleEndian.putShort(buf, offset, (short)_flags);    offset += LittleEndian.SHORT_SIZE;    LittleEndian.putShort(buf, offset, (short)_maxIndex);    offset += LittleEndian.SHORT_SIZE;    LittleEndian.putShort(buf, offset, (short)_maxFixedIndex);    offset += LittleEndian.SHORT_SIZE;    LittleEndian.putShort(buf, offset, (short)_stylenameVersion);    offset += LittleEndian.SHORT_SIZE;    LittleEndian.putShort(buf, offset, (short)_rgftc[0]);    offset += LittleEndian.SHORT_SIZE;    LittleEndian.putShort(buf, offset, (short)_rgftc[1]);    offset += LittleEndian.SHORT_SIZE;    LittleEndian.putShort(buf, offset, (short)_rgftc[2]);    out.write(buf);    byte[] sizeHolder = new byte[2];    for (int x = 0; x < _styleDescriptions.length; x++)    {      if(_styleDescriptions[x] != null)      {          byte[] std = _styleDescriptions[x].toByteArray();          // adjust the size so it is always on a word boundary          LittleEndian.putShort(sizeHolder, (short)((std.length) + (std.length % 2)));          out.write(sizeHolder);          out.write(std);          // Must always start on a word boundary.          if (std.length % 2 == 1)          {            out.write('\0');          }      }      else      {        sizeHolder[0] = 0;        sizeHolder[1] = 0;        out.write(sizeHolder);      }    }  }  public boolean equals(Object o)  {    StyleSheet ss = (StyleSheet)o;    if (ss._baseLength == _baseLength && ss._flags == _flags &&        ss._maxFixedIndex ==_maxFixedIndex && ss._maxIndex == _maxIndex &&        ss._rgftc[0] == _rgftc[0] && ss._rgftc[1] == _rgftc[1] &&        ss._rgftc[2] == _rgftc[2] && ss._stshiLength == _stshiLength &&        ss._stylenameVersion == _stylenameVersion)    {      if (ss._styleDescriptions.length == _styleDescriptions.length)      {        for (int x = 0; x < _styleDescriptions.length; x++)        {          // check for null          if (ss._styleDescriptions[x] != _styleDescriptions[x])          {            // check for equality            if (!ss._styleDescriptions[x].equals(_styleDescriptions[x]))            {              return false;            }          }        }        return true;      }    }    return false;  }  /**   * Creates a PartagraphProperties object from a papx stored in the   * StyleDescription at the index istd in the StyleDescription array. The PAP   * is placed in the StyleDescription at istd after its been created. Not   * every StyleDescription will contain a papx. In these cases this function   * does nothing   *   * @param istd The index of the StyleDescription to create the   *        ParagraphProperties  from (and also place the finished PAP in)   */  private void createPap(int istd)  {      StyleDescription sd = _styleDescriptions[istd];      ParagraphProperties pap = sd.getPAP();      byte[] papx = sd.getPAPX();      int baseIndex = sd.getBaseStyle();      if(pap == null && papx != null)      {          ParagraphProperties parentPAP = new ParagraphProperties();          if(baseIndex != NIL_STYLE)          {              parentPAP = _styleDescriptions[baseIndex].getPAP();              if(parentPAP == null)              {                  createPap(baseIndex);                  parentPAP = _styleDescriptions[baseIndex].getPAP();              }          }          pap = (ParagraphProperties)ParagraphSprmUncompressor.uncompressPAP(parentPAP, papx, 2);          sd.setPAP(pap);      }  }  /**   * Creates a CharacterProperties object from a chpx stored in the   * StyleDescription at the index istd in the StyleDescription array. The   * CharacterProperties object is placed in the StyleDescription at istd after   * its been created. Not every StyleDescription will contain a chpx. In these   * cases this function does nothing.   *   * @param istd The index of the StyleDescription to create the   *        CharacterProperties object from.   */  private void createChp(int istd)  {      StyleDescription sd = _styleDescriptions[istd];      CharacterProperties chp = sd.getCHP();      byte[] chpx = sd.getCHPX();      int baseIndex = sd.getBaseStyle();      if(chp == null && chpx != null)      {          CharacterProperties parentCHP = new CharacterProperties();          if(baseIndex != NIL_STYLE)          {              parentCHP = _styleDescriptions[baseIndex].getCHP();              if(parentCHP == null)              {                  createChp(baseIndex);                  parentCHP = _styleDescriptions[baseIndex].getCHP();              }          }          chp = (CharacterProperties)CharacterSprmUncompressor.uncompressCHP(parentCHP, chpx, 0);          sd.setCHP(chp);      }  }  /**   * Gets the StyleDescription at index x.   *   * @param x the index of the desired StyleDescription.   */  public StyleDescription getStyleDescription(int x)  {      return _styleDescriptions[x];  }  public CharacterProperties getCharacterStyle(int x)  {    if (x == NIL_STYLE)    {      return NIL_CHP;    }    return (_styleDescriptions[x] != null ? _styleDescriptions[x].getCHP() : null);  }  public ParagraphProperties getParagraphStyle(int x)  {    if (x == NIL_STYLE)    {      return NIL_PAP;    }    return (_styleDescriptions[x] != null ? _styleDescriptions[x].getPAP() : null);  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产麻豆国产自产在线| 99久久综合国产精品| 欧美肥妇bbw| 91色porny在线视频| 成人丝袜高跟foot| 国产曰批免费观看久久久| 亚洲第一综合色| 亚洲欧美日本在线| 国产精品麻豆久久久| 国产精品毛片高清在线完整版 | 丝袜亚洲另类欧美| 一区二区免费视频| 一区二区三区成人在线视频| 韩国精品免费视频| www.在线成人| 久久精品日韩一区二区三区| 日韩你懂的在线观看| 久久久一区二区| 中文字幕一区二区三区四区| 中文字幕中文在线不卡住| 亚洲黄色小视频| 蜜臂av日日欢夜夜爽一区| 奇米在线7777在线精品| 国产高清不卡一区| 91电影在线观看| 欧美日韩一区高清| 精品国产成人系列| 中文字幕一区二区不卡| 成人免费视频免费观看| 久久婷婷久久一区二区三区| 最近日韩中文字幕| 日韩经典中文字幕一区| 欧美三级日本三级少妇99| 亚洲最新视频在线观看| 欧美最新大片在线看| 久久综合久久综合久久| 麻豆精品一二三| 精品美女一区二区| 亚洲午夜免费电影| 成人小视频免费在线观看| 国产日韩精品一区二区三区在线| 欧美一级xxx| 国产精品私房写真福利视频| 国产精品一级二级三级| 色婷婷av一区二区三区之一色屋| 成人午夜激情在线| 国产日韩av一区二区| 成人激情开心网| 欧美精品一二三| 日本欧美一区二区三区| 91同城在线观看| 亚洲午夜羞羞片| 日韩三级免费观看| 国产成人综合亚洲91猫咪| 国产精品国产馆在线真实露脸 | 一级中文字幕一区二区| 欧美精品在线观看一区二区| 午夜不卡av在线| 91碰在线视频| 美女网站在线免费欧美精品| 久久精品视频免费| 欧美性三三影院| 一区二区三区**美女毛片| 欧美精品在线观看一区二区| 国产精品一区二区果冻传媒| 亚洲欧美激情小说另类| 日韩美女一区二区三区四区| 成人高清视频在线| 天堂午夜影视日韩欧美一区二区| 一本一道久久a久久精品| 蜜臀国产一区二区三区在线播放| 欧美在线不卡一区| 久久99精品网久久| 久久久欧美精品sm网站| 色婷婷综合在线| 精品一区二区三区日韩| 亚洲午夜日本在线观看| 国产欧美中文在线| 欧美影院一区二区| 国产91丝袜在线观看| 国产精品入口麻豆九色| 69久久99精品久久久久婷婷| 天堂在线亚洲视频| 亚洲精品欧美在线| 国产亚洲欧洲一区高清在线观看| 国产精品一区在线观看乱码| 亚洲第一av色| 亚洲欧洲一区二区三区| www激情久久| 91精品国产欧美一区二区| 91麻豆视频网站| 成人免费毛片嘿嘿连载视频| 久久电影网电视剧免费观看| 久久久精品综合| 91精品国产综合久久福利软件 | 日韩一区在线免费观看| 精品噜噜噜噜久久久久久久久试看| 蜜臂av日日欢夜夜爽一区| 亚洲女厕所小便bbb| 中文字幕巨乱亚洲| 91网站在线播放| 波多野结衣视频一区| 国产另类ts人妖一区二区| 蜜桃久久精品一区二区| 天天av天天翘天天综合网| 亚洲妇熟xx妇色黄| 亚洲一区二区三区视频在线播放| 粉嫩在线一区二区三区视频| 日韩 欧美一区二区三区| 亚洲成年人影院| 午夜欧美在线一二页| 五月婷婷另类国产| 亚洲国产aⅴ天堂久久| 亚洲超碰97人人做人人爱| 一区二区久久久| 亚洲国产精品一区二区www在线| 欧美精品久久99久久在免费线| 麻豆精品久久精品色综合| 蜜桃视频免费观看一区| 久久99精品久久久久久动态图| 亚洲欧洲日韩综合一区二区| 亚洲国产电影在线观看| 国产免费成人在线视频| 国产精品网曝门| 亚洲黄色小视频| 亚洲成人手机在线| 毛片基地黄久久久久久天堂| 极品少妇xxxx偷拍精品少妇| 国产激情一区二区三区| 91在线观看成人| 欧美日韩一区二区三区四区五区 | 麻豆一区二区在线| 精品一区二区免费| 成人中文字幕合集| 欧美亚洲自拍偷拍| 欧美电视剧在线观看完整版| 久久亚洲欧美国产精品乐播| 国产欧美日韩综合| 亚洲一区二区三区三| 久久66热偷产精品| 99精品久久99久久久久| 国产九色sp调教91| 99国产精品久久久| 欧美一区二区三区喷汁尤物| 国产日韩精品一区二区三区在线| 欧美一区二区三区视频在线| 精品国产成人在线影院 | 91视频免费观看| 欧美喷水一区二区| 色综合天天狠狠| 制服丝袜一区二区三区| 国产午夜久久久久| 亚洲一区二区三区四区中文字幕| 国产精品国产三级国产| 天天av天天翘天天综合网| 成人免费的视频| 欧美一级免费观看| 亚洲视频图片小说| 经典三级视频一区| 欧美专区在线观看一区| 久久精品亚洲一区二区三区浴池| 日韩欧美精品在线| 亚洲精品乱码久久久久| 久久69国产一区二区蜜臀| 精品视频免费在线| 国产三级精品三级在线专区| 日本亚洲视频在线| 欧美在线一区二区| 国产人妖乱国产精品人妖| 日日嗨av一区二区三区四区| 99久久777色| 国产欧美日韩亚州综合| 激情欧美一区二区| 日韩一区二区在线看| 亚洲一区欧美一区| 91热门视频在线观看| 中文字幕一区二区三区在线观看| 一级做a爱片久久| 成人av资源在线| 久久亚洲影视婷婷| 精品写真视频在线观看| 在线观看日产精品| 一区二区三区 在线观看视频 | 亚洲欧美激情小说另类| 成人午夜精品一区二区三区| 久久视频一区二区| 看片网站欧美日韩| 欧美一级片在线观看| 婷婷国产在线综合| 欧美酷刑日本凌虐凌虐| 丝袜诱惑亚洲看片| 欧美一区二区三区在线| 欧美a一区二区| 欧美一卡二卡三卡四卡| 日韩和欧美一区二区三区| 欧美日韩精品二区第二页| 亚洲图片一区二区| 欧美群妇大交群中文字幕| 日韩激情一区二区| 26uuu色噜噜精品一区|