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

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

?? namerecord.java

?? java開發文檔之excel:jexcelapi_2_6_3.tar
?? JAVA
字號:
/*********************************************************************
*
*      Copyright (C) 2002 Andrew Khan
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/

package jxl.write.biff;

import jxl.biff.BuiltInName;
import jxl.biff.IntegerHelper;
import jxl.biff.StringHelper;
import jxl.biff.Type;
import jxl.biff.WritableRecordData;

/**
 * A name record.  Simply takes the binary data from the name
 * record read in
 */
class NameRecord extends WritableRecordData
{
  /**
   * The binary data for output to file
   */
  private byte[] data;

  /**
   * The name
   */
  private String name;

  /**
   * The built in name
   */
  private BuiltInName builtInName;

  /**
   * The index into the name table
   */
  private int index;
  
  /**
   * The 0-based index sheet reference for a record name
   *     0 is for a global reference
   */
  private int sheetRef = 0;

  /** 
   * A nested class to hold range information
   */
  class NameRange
  {
    private int columnFirst;
    private int rowFirst;
    private int columnLast;
    private int rowLast;
    private int externalSheet;

    NameRange(jxl.read.biff.NameRecord.NameRange nr)
    {
      columnFirst = nr.getFirstColumn();
      rowFirst = nr.getFirstRow();
      columnLast = nr.getLastColumn();
      rowLast = nr.getLastRow();
      externalSheet = nr.getExternalSheet();
    }
    
    /**
     * Create a new range for the name record.
     */
    NameRange(int extSheet, 
              int theStartRow, 
              int theEndRow,
              int theStartCol, 
              int theEndCol)
    {
      columnFirst = theStartCol;
      rowFirst = theStartRow;
      columnLast = theEndCol;
      rowLast = theEndRow;
      externalSheet = extSheet;
    }

    int getFirstColumn() {return columnFirst;}
    int getFirstRow() {return rowFirst;}
    int getLastColumn() {return columnLast;}
    int getLastRow() {return rowLast;}
    int getExternalSheet() { return externalSheet;}

    byte[] getData()
    {
      byte[] d = new byte[10];

      // Sheet index
      IntegerHelper.getTwoBytes(externalSheet, d, 0);

      // Starting row
      IntegerHelper.getTwoBytes(rowFirst, d, 2);
      
      // End row
      IntegerHelper.getTwoBytes(rowLast, d, 4);
      
      // Start column
      IntegerHelper.getTwoBytes(columnFirst & 0xff, d, 6);

      // End columns
      IntegerHelper.getTwoBytes(columnLast & 0xff, d, 8);

      return d;
    }
  }

  /**
   * The ranges covered by this name
   */
  private NameRange[] ranges;

  // Constants which refer to the parse tokens after the string
  private static final int cellReference = 0x3a;
  private static final int areaReference = 0x3b;
  private static final int subExpression = 0x29;
  private static final int union         = 0x10;

  /**
   * Constructor - used when copying sheets
   *
   * @param index the index into the name table
   */
  public NameRecord(jxl.read.biff.NameRecord sr, int ind)
  {
    super(Type.NAME);

    data = sr.getData();
    name = sr.getName();
    sheetRef = sr.getSheetRef();
    index = ind;

    // Copy the ranges
    jxl.read.biff.NameRecord.NameRange[] r = sr.getRanges();
    ranges = new NameRange[r.length];
    for (int i = 0 ; i < ranges.length ; i++)
    {
      ranges[i] = new NameRange(r[i]);
    }
  }

  /**
   * Create a new name record with the given information.
   * 
   * @param theName      Name to be created.
   * @param theIndex     Index of this name.
   * @param extSheet     External sheet index this name refers to.
   * @param theStartRow  First row this name refers to.
   * @param theEndRow    Last row this name refers to.
   * @param theStartCol  First column this name refers to.
   * @param theEndCol    Last column this name refers to.
   * @param global       TRUE if this is a global name
   */
  NameRecord(String theName, 
             int theIndex, 
             int extSheet, 
             int theStartRow, 
             int theEndRow, 
             int theStartCol, 
             int theEndCol,
             boolean global)
  { 
    super(Type.NAME);

    name = theName;
    index = theIndex;
    sheetRef = global ? 0 : index+1; // 0 indicates a global name, otherwise
                                     // the 1-based index of the sheet

    ranges = new NameRange[1];
    ranges[0] = new NameRange(extSheet, 
                              theStartRow, 
                              theEndRow, 
                              theStartCol, 
                              theEndCol);
  }

  /**
   * Create a new name record with the given information.
   * 
   * @param theName      Name to be created.
   * @param theIndex     Index of this name.
   * @param extSheet     External sheet index this name refers to.
   * @param theStartRow  First row this name refers to.
   * @param theEndRow    Last row this name refers to.
   * @param theStartCol  First column this name refers to.
   * @param theEndCol    Last column this name refers to.
   * @param global       TRUE if this is a global name
   */
  NameRecord(BuiltInName theName, 
             int theIndex, 
             int extSheet, 
             int theStartRow, 
             int theEndRow, 
             int theStartCol, 
             int theEndCol,
             boolean global)
  { 
    super(Type.NAME);

    builtInName = theName;
    index = theIndex;
    sheetRef = global ? 0 : index + 1; // 0 indicates a global name, otherwise
                                       // the 1-based index of the sheet

    ranges = new NameRange[1];
    ranges[0] = new NameRange(extSheet, 
                              theStartRow, 
                              theEndRow, 
                              theStartCol, 
                              theEndCol);
  }

  /**
   * Gets the binary data for output to file
   *
   * @return the binary data
   */
  public byte[] getData()
  {
    if (data != null)
    {
      // this is a copy
      return data;
    }

    final int NAME_HEADER_LENGTH = 15;
    final byte AREA_RANGE_LENGTH = 11;
    final byte AREA_REFERENCE = 0x3b;

    int length = NAME_HEADER_LENGTH + 
      AREA_RANGE_LENGTH;
    length += builtInName != null ? 1 : name.length();
    data = new byte[length];

    // Options
    int options = 0;

    if (builtInName != null)
    {
      options |= 0x20;
    }
    IntegerHelper.getTwoBytes(options, data, 0);

    // Keyboard shortcut
    data[2] = 0;

    // Length of the name in chars
    if (builtInName != null)
    {
      data[3] = (byte) 0x1;
    }
    else
    {
      data[3] = (byte) name.length();    
    }

    // Size of the definitions
    IntegerHelper.getTwoBytes(AREA_RANGE_LENGTH, data, 4);

    // Sheet index
    IntegerHelper.getTwoBytes(sheetRef, data, 6);
    IntegerHelper.getTwoBytes(sheetRef, data, 8);

    // Byte 10-13 are optional lengths [0,0,0,0]    
    // Byte 14 is length of name which is not used.    

    // The name
    if (builtInName != null)
    {
      data[15] = (byte) builtInName.getValue();
    }
    else
    {
      StringHelper.getBytes(name, data, 15);
    }

    // The actual range definition.
    int pos = builtInName != null ? 16 : name.length() + 15;

    // Range format - area
    data[pos] = areaReference;

    // The range data
    byte[] rd = ranges[0].getData();
    System.arraycopy(rd, 0, data, pos+1, rd.length);

    return data;
  }

  /**
   * Accessor for the name 
   *
   * @return the name
   */
  public String getName()
  {
    return name;
  }

  /**
   * Accessor for the index of this name in the name table
   *
   * @return the index of this name in the name table
   */
  public int getIndex()
  {
    return index;
  }
  
  /**
   * The 0-based index sheet reference for a record name
   *     0 is for a global reference
   *
   * @return the sheet reference for name formula
   */
  public int getSheetRef()
  {
    return sheetRef;
  }
  
  /**
   * Set the index sheet reference for a record name
   *     0 is for a global reference
   *
   */
  public void setSheetRef(int i)
  {
    sheetRef = i;
    IntegerHelper.getTwoBytes(sheetRef, data, 8);
  }

  /**
   * Gets the array of ranges for this name
   * @return the ranges
   */
  public NameRange[] getRanges()
  {
    return ranges;
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧洲视频一区二区| 国产亚洲精品aa| 欧美午夜一区二区| 色综合色综合色综合色综合色综合 | 337p日本欧洲亚洲大胆精品| 狠狠色丁香久久婷婷综合_中| 中文字幕视频一区二区三区久| 久久精品一区二区三区av| 欧美大胆人体bbbb| 欧美mv日韩mv亚洲| 2023国产精品视频| 国产欧美一区二区三区在线看蜜臀| 久久久国际精品| 午夜a成v人精品| 亚洲第四色夜色| 蜜桃视频一区二区三区| 紧缚奴在线一区二区三区| 国产一区在线不卡| 成人精品鲁一区一区二区| 99国产精品久久久| 欧美日韩免费在线视频| 欧美一区二区三区不卡| 精品少妇一区二区| 日本一区二区三区久久久久久久久不| 国产精品美女久久久久久久网站| 国产精品久久久久影院亚瑟| 伊人夜夜躁av伊人久久| 丝袜亚洲另类丝袜在线| 精品一区二区三区在线播放| 成人精品一区二区三区中文字幕| 一本色道久久综合狠狠躁的推荐| 欧美日韩国产精品自在自线| 欧美大片在线观看一区二区| 国产欧美日韩精品一区| 北条麻妃国产九九精品视频| 99精品热视频| 欧美日韩在线三级| 精品剧情在线观看| 中文字幕电影一区| 亚洲激情一二三区| 久久激情五月激情| 岛国精品一区二区| 欧美最猛黑人xxxxx猛交| 日韩一区二区免费在线电影 | 欧美成人aa大片| 中文一区在线播放| 亚洲1区2区3区4区| 国产精品99久久久久久宅男| 一本一道综合狠狠老| 777a∨成人精品桃花网| 中文字幕 久热精品 视频在线| 亚洲国产精品一区二区久久 | 日韩精品自拍偷拍| 综合自拍亚洲综合图不卡区| 免费日韩伦理电影| 91丨porny丨最新| 欧美日韩国产高清一区二区三区| 欧美乱妇一区二区三区不卡视频| 欧美精品一区视频| 亚洲国产日日夜夜| 久草在线在线精品观看| 一本大道av一区二区在线播放| 日韩欧美国产综合一区 | 天涯成人国产亚洲精品一区av| 国产一区二区三区不卡在线观看| 色天天综合久久久久综合片| 久久久久99精品国产片| 婷婷久久综合九色综合伊人色| 国产成人自拍高清视频在线免费播放 | 色综合欧美在线| 久久影音资源网| 五月天激情综合网| 色综合一区二区| 国产片一区二区| 另类成人小视频在线| 欧美视频日韩视频在线观看| 亚洲欧洲韩国日本视频 | 久久这里只有精品首页| 亚洲老妇xxxxxx| 日本大胆欧美人术艺术动态| 色综合久久综合| 亚洲国产精品成人综合| 极品少妇一区二区| 日韩欧美一二三四区| 亚洲最大色网站| 91在线观看污| 国产精品狼人久久影院观看方式| 国产一区福利在线| 欧美一区二区三区性视频| 亚洲一级二级在线| 在线观看一区二区视频| 亚洲欧美另类综合偷拍| 成人黄色电影在线| 国产精品美女久久久久久久网站| 国产老女人精品毛片久久| 欧美videos大乳护士334| 麻豆国产一区二区| 日韩精品一区在线| 极品少妇xxxx偷拍精品少妇| 欧美成人性福生活免费看| 日本aⅴ精品一区二区三区| 欧美精品tushy高清| 日韩精品亚洲专区| 欧美一区二区精品| 久久精品国产色蜜蜜麻豆| 91精品国产综合久久精品app| 肉丝袜脚交视频一区二区| 欧美日韩亚洲国产综合| 亚洲成人激情自拍| 91精品国产综合久久精品app| 日本成人在线不卡视频| 欧美一区二区性放荡片| 精品一二线国产| 日韩av电影免费观看高清完整版| 欧美日韩一区在线观看| 天天综合网 天天综合色| 欧美一二三区在线| 国产在线视频不卡二| 国产日韩欧美综合在线| av在线免费不卡| 亚洲激情六月丁香| 欧美日韩高清一区二区| 寂寞少妇一区二区三区| 国产三级欧美三级| 91亚洲永久精品| 亚洲午夜免费电影| 日韩午夜精品视频| 国产在线日韩欧美| 亚洲人成电影网站色mp4| 欧美日韩国产一二三| 麻豆久久久久久| 国产精品免费人成网站| 在线观看区一区二| 久久av资源站| 综合色中文字幕| 欧美一区二区三区日韩| 国产精品白丝jk白祙喷水网站| 国产精品不卡一区| 欧美欧美午夜aⅴ在线观看| 精彩视频一区二区三区| 亚洲猫色日本管| 91精品欧美福利在线观看| 国产98色在线|日韩| 亚洲国产乱码最新视频| 久久亚洲一区二区三区明星换脸| av资源网一区| 日本va欧美va精品发布| 国产精品欧美一区二区三区| 欧美日韩一区在线观看| 国产成人高清在线| 亚洲成人免费看| 国产精品乱人伦一区二区| 欧美美女直播网站| 国产宾馆实践打屁股91| 天使萌一区二区三区免费观看| 中文幕一区二区三区久久蜜桃| 911国产精品| 99久久综合99久久综合网站| 日本午夜精品一区二区三区电影| 国产农村妇女毛片精品久久麻豆| 欧美性极品少妇| 不卡视频在线看| 久久狠狠亚洲综合| 亚洲成人福利片| 国产精品亲子伦对白| 日韩视频一区二区| 日本高清不卡aⅴ免费网站| 国产一区二区精品久久99| 午夜私人影院久久久久| 综合久久久久久| 国产日产精品一区| 日韩一级免费一区| 日本一区二区三区高清不卡| 宅男在线国产精品| 日本高清视频一区二区| 成人av网站在线| 狠狠色丁香久久婷婷综合_中| 天堂va蜜桃一区二区三区漫画版| 亚洲人成网站在线| 国产精品毛片大码女人| 精品国产91亚洲一区二区三区婷婷 | 色噜噜狠狠一区二区三区果冻| 国产suv精品一区二区6| 久久国产精品99久久人人澡| 亚洲成人免费看| 一区二区三区四区蜜桃| 国产精品久久久久天堂| 久久精品一区二区三区av| 欧美成人一级视频| 欧美一级日韩不卡播放免费| 欧美日韩中文字幕一区二区| 91污片在线观看| 成人av在线网站| 懂色av一区二区三区免费观看 | 欧美视频在线观看一区| 成人av电影免费在线播放| 国产乱码精品一区二区三区忘忧草| 亚洲欧洲精品一区二区三区 | 色久综合一二码| 99久久婷婷国产精品综合|