if (lastSlashPos != -1) {
fileName = fullFileName.substring(lastSlashPos + 1, fullFileName.length());
} else if (lastBackSlashPos != -1) {
fileName = fullFileName.substring(lastBackSlashPos + 1, fullFileName.length());
}
XmlStringBuilder xml = XmlStringBuilder.createFromXmlString(fileName);
int to = -1;
int docSize = editor.getDocument().size();
if (cursorLoc != -1) {
// Insert the attachment at the cursor location.
CMutableDocument doc = editor.getDocument();