import java.net.URI;
import java.net.URISyntaxException;
+import org.apache.poi.common.Duplicatable;
import org.apache.poi.common.usermodel.HyperlinkType;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackageRelationship;
* Note - unlike with HSSF, many kinds of hyperlink
* are largely stored as relations of the sheet
*/
-public class XSSFHyperlink implements Hyperlink {
+public class XSSFHyperlink implements Hyperlink, Duplicatable {
final private HyperlinkType _type;
final private PackageRelationship _externalRel;
final private CTHyperlink _ctHyperlink; //contains a reference to the cell where the hyperlink is anchored, getRef()
public void setTooltip(String text) {
_ctHyperlink.setTooltip(text);
}
+
+ /**
+ * @return a new XSSFHyperlink based on this
+ * @since POI 5.1.0
+ */
+ @Override
+ public Duplicatable copy() {
+ return new XSSFHyperlink(this);
+ }
}