/** * Create a new XSSFHyperlink. This method is for Internal use only. * XSSFHyperlinks can be created by {@link XSSFCreationHelper}. * See the <a href="https://poi.apache.org/spreadsheet/quick-guide.html#Hyperlinks">spreadsheet quick-guide</a> * for an example. * * @param other the hyperlink to copy */ @Internal //FIXME: change to protected if/when SXSSFHyperlink class is created public XSSFHyperlink(Hyperlink other) { if (other instanceof XSSFHyperlink) { XSSFHyperlink xlink = (XSSFHyperlink) other; _type = xlink.getType(); _location = xlink._location; _externalRel = xlink._externalRel; _ctHyperlink = (CTHyperlink) xlink._ctHyperlink.copy(); } else { _type = other.getType(); _location = other.getAddress(); _externalRel = null; _ctHyperlink = CTHyperlink.Factory.newInstance(); setCellReference(new CellReference(other.getFirstRow(), other.getFirstColumn())); } } /**
/** * Create a new XSSFHyperlink. This method is protected to be used only by * {@link XSSFCreationHelper#createHyperlink(HyperlinkType)}. * * @param type - the type of hyperlink to create */ protected XSSFHyperlink(HyperlinkType type) { _type = type; _ctHyperlink = CTHyperlink.Factory.newInstance(); _externalRel = null; }
/** * Create a new XSSFHyperlink. This method is protected to be used only by XSSFCreationHelper * * @param type - the type of hyperlink to create */ protected XSSFHyperlink(int type) { _type = type; _ctHyperlink = CTHyperlink.Factory.newInstance(); }
/** * Create a new XSSFHyperlink. This method is for Internal use only. * XSSFHyperlinks can be created by {@link XSSFCreationHelper}. * See the <a href="https://poi.apache.org/spreadsheet/quick-guide.html#Hyperlinks">spreadsheet quick-guide</a> * for an example. * * @param other the hyperlink to copy */ @Internal //FIXME: change to protected if/when SXSSFHyperlink class is created public XSSFHyperlink(Hyperlink other) { if (other instanceof XSSFHyperlink) { XSSFHyperlink xlink = (XSSFHyperlink) other; _type = xlink.getType(); _location = xlink._location; _externalRel = xlink._externalRel; _ctHyperlink = (CTHyperlink) xlink._ctHyperlink.copy(); } else { _type = other.getType(); _location = other.getAddress(); _externalRel = null; _ctHyperlink = CTHyperlink.Factory.newInstance(); setCellReference(new CellReference(other.getFirstRow(), other.getFirstColumn())); } } /**
/** * Create a new XSSFHyperlink. This method is protected to be used only by * {@link XSSFCreationHelper#createHyperlink(HyperlinkType)}. * * @param type - the type of hyperlink to create */ protected XSSFHyperlink(HyperlinkType type) { _type = type; _ctHyperlink = CTHyperlink.Factory.newInstance(); _externalRel = null; }