//creating a user defined dictionary for XSearchableDictionaryList
XDictionaryList xDicList = (XDictionaryList) UnoRuntime.queryInterface(
XDictionaryList.class, oObj);
xDicList.removeDictionary(xDicList.getDictionaryByName("MyDictionary"));
XDictionary xDic = xDicList.createDictionary("NegativDic",new Locale(
"en","US","WIN"),com.sun.star.linguistic2.DictionaryType.NEGATIVE,"");
XDictionary xDic2 = xDicList.createDictionary("PositivDic",new Locale(
"en","US","WIN"),com.sun.star.linguistic2.DictionaryType.POSITIVE,"");
xDic2.add("Positiv",false,"");
xDic.add("Negativ",true,"");
xDicList.addDictionary(xDic);
xDicList.addDictionary(xDic2);
xDic.setActive(true);
xDic2.setActive(true);
return tEnv;
}