/**
* Sets the default spelling language on ctStyles DocDefaults parameter
* @param strSpellingLanguage
*/
public void setSpellingLanguage(String strSpellingLanguage) {
CTDocDefaults docDefaults = null;
CTRPr runProps = null;
CTLanguage lang = null;
// Just making sure we use the members that have already been defined
if(ctStyles.isSetDocDefaults()) {
docDefaults = ctStyles.getDocDefaults();
if(docDefaults.isSetRPrDefault()) {
CTRPrDefault RPrDefault = docDefaults.getRPrDefault();
if(RPrDefault.isSetRPr()) {
runProps = RPrDefault.getRPr();
if(runProps.isSetLang())
lang = runProps.getLang();
}
}
}
if(docDefaults == null)
docDefaults = ctStyles.addNewDocDefaults();
if(runProps == null)
runProps = docDefaults.addNewRPrDefault().addNewRPr();
if(lang == null)
lang = runProps.addNewLang();
lang.setVal(strSpellingLanguage);
lang.setBidi(strSpellingLanguage);