diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/addresses/AddressFromClipboardDialog.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/addresses/AddressFromClipboardDialog.java index a0886b65a..f5a232d7b 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/addresses/AddressFromClipboardDialog.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/addresses/AddressFromClipboardDialog.java @@ -682,6 +682,8 @@ public class AddressFromClipboardDialog extends javax.swing.JDialog { /** * Creates new form AddressFromClipboardDialog + * @param parent + * @param modal */ public AddressFromClipboardDialog(java.awt.Frame parent, boolean modal) { super(parent, modal); @@ -692,9 +694,6 @@ public AddressFromClipboardDialog(java.awt.Frame parent, boolean modal) { int mark = e.getMark(); if (dot != mark) { - System.out.println("Selection Start: " + Math.min(dot, mark)); - System.out.println("Selection End: " + Math.max(dot, mark)); - try { String text = this.taBody.getText(Math.min(dot, mark), Math.max(dot, mark) - Math.min(dot, mark)); text = text.replace(", ", "\n"); @@ -703,8 +702,6 @@ public AddressFromClipboardDialog(java.awt.Frame parent, boolean modal) { log.error("Unable to extract attributes", ex); } - } else { - System.out.println("Caret Position: " + dot); } }); @@ -720,8 +717,6 @@ private void extractAttributes(String text) { DefaultTableModel tm = (DefaultTableModel) this.tblAttributes.getModel(); tm.setRowCount(0); - boolean addressProvided=false; - String[] lines = text.split("\n"); for (String line : lines) { line=line.trim(); @@ -739,7 +734,6 @@ private void extractAttributes(String text) { line=line.replace("(dot)", "."); line=line.replace(":", ""); line=line.trim(); - addressProvided=true; } else if (line.toLowerCase().contains("telefon") || line.toLowerCase().contains("tel:") || line.toLowerCase().contains("tel.")) { field=AttributeCellEditor.ATTRIBUTE_TEL; line=line.replace("Telefonnummer", ""); @@ -753,6 +747,15 @@ private void extractAttributes(String text) { line=line.replace(":", ""); line=line.replace(".", ""); line=line.trim(); + } else if (line.toLowerCase().contains("mobil")) { + field=AttributeCellEditor.ATTRIBUTE_MOBIL; + line=line.replace("Mobil", ""); + line=line.replace("Mobilnummer", ""); + line=line.replace("Handy", ""); + line=line.replace("handy", ""); + line=line.replace(":", ""); + line=line.replace(".", ""); + line=line.trim(); } else if (line.toLowerCase().contains("fax") || line.toLowerCase().contains("fax:") || line.toLowerCase().contains("telefax") || line.toLowerCase().contains("telefax:")) { field=AttributeCellEditor.ATTRIBUTE_FAX; line=line.replace("Telefax", "");