Merge changes from 1.0 final + more config ui work

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@34 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2009-09-21 06:12:18 +00:00
parent e8bba32302
commit a0384669cc
46 changed files with 1671 additions and 90 deletions

View file

@ -16,16 +16,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2006 by Henrik Just
* Copyright: 2002-2009 by Henrik Just
*
* All Rights Reserved.
*
* Version 0.5 (2006-11-02)
* Version 1.2 (2009-09-20)
*
*/
package writer2latex.latex.i18n;
import java.util.Set;
/** This class contains a node in a trie of string -> LaTeX code replacements
*/
public class ReplacementTrieNode {
@ -114,6 +116,18 @@ public class ReplacementTrieNode {
child.setFontencs(nFontencs);
}
}
protected void collectStrings(Set<String> strings, String sPrefix) {
ReplacementTrieNode child = this.getFirstChild();
while (child!=null) {
if (child.getLaTeXCode()!=null) {
strings.add(sPrefix+child.getLetter());
System.out.println("Found "+sPrefix+child.getLetter());
}
child.collectStrings(strings, sPrefix+child.getLetter());
child = child.getNextSibling();
}
}
public String toString() {
String s = Character.toString(cLetter);