if (clipboard != null) {
final Worksheet srcSheet = clipboard.sourceSheet;
final Rect srcRect = clipboard.sourceRect;
final Rect dst = ss.getSelection();
Range rng = Utils.pasteSpecial(srcSheet,
srcRect,
ss.getSelectedSheet(),
dst.getTop(),
dst.getLeft(),
dst.getBottom(),
dst.getRight(),
getPasteType(pasteSelector.getSelectedItem().getValue().toString()),
getPasteOperation(operationSelector.getSelectedItem().getValue().toString()),
skipBlanks.isChecked(), transpose.isChecked());
if (clipboard.type == Clipboard.Type.CUT) {
Ranges
.range(srcSheet, srcRect.getTop(), srcRect.getLeft(), srcRect.getBottom(), srcRect.getRight())
.clearContents();
final CellStyle defaultStyle = clipboard.book.createCellStyle();
Ranges
.range(srcSheet, srcRect.getTop(), srcRect.getLeft(),srcRect.getBottom(), srcRect.getRight())
.setStyle(defaultStyle);
ss.getActionHandler().clearClipboard();
ss.setHighlight(null);
}
if (rng != null) {
ss.setSelection(new Rect(rng.getColumn(), rng.getRow(),
rng.getLastColumn(), rng.getLastRow()));
}
}
_pasteSpecialDialog.fireOnClose(null);
}