Revision: 1ff0930462c4 Branch: WithBrailleFormatting Author: Brandon Roller <brandon.r.roller@xxxxxxxxx> Date: Wed Jul 10 12:13:38 2013 Log: Updated method to remove braille elements http://code.google.com/p/brailleblaster/source/detail?r=1ff0930462c4&repo=newdesign Modified: /src/main/org/brailleblaster/wordprocessor/BBDocument.java /src/main/org/brailleblaster/wordprocessor/DocumentManager.java =======================================--- /src/main/org/brailleblaster/wordprocessor/BBDocument.java Wed Jul 10 05:34:57 2013 +++ /src/main/org/brailleblaster/wordprocessor/BBDocument.java Wed Jul 10 12:13:38 2013
@@ -490,8 +490,10 @@ if(e.get(i).getAttributeValue("semantics").equals("style,document")){ Elements els = e.get(i).getChildElements(); for(int j = 0; j < els.size(); j++){ - if(els.get(j).getLocalName().equals("brl")) - e.get(i).removeChild(j); + if(els.get(j).getLocalName().equals("brl")){ + int index = e.get(i).indexOf(els.get(j)); + e.get(i).removeChild(index); + } } } } =======================================--- /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Wed Jul 10 11:19:29 2013 +++ /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Wed Jul 10 12:13:38 2013
@@ -258,7 +258,7 @@ } private void initializeAllViews(String fileName, String filePath){ - // long start = System.currentTimeMillis(); + //long start = System.currentTimeMillis(); try{if(this.document.startDocument(filePath, BBIni.getDefaultConfigFile(), null)){
this.group.setRedraw(false); @@ -294,8 +294,8 @@ catch(Exception e){ e.printStackTrace(); } - // long end = System.currentTimeMillis(); - // System.out.println("TOTAL: " + (end - start)); + //long end = System.currentTimeMillis(); + //System.out.println("TOTAL: " + (end - start)); } private void initializeViews(Node current){ @@ -622,7 +622,7 @@ initializeDocumentTab(); - setCurrentOnRefresh(null,currentOffset); + setCurrentOnRefresh(null, currentOffset); this.text.view.setCaretOffset(currentOffset); this.text.setPositionFromStart(); }