Esempio n. 1
0
 public void SetEastAsia(string strEastAsia)
 {
   CT_DocDefaults ctDocDefaults = (CT_DocDefaults) null;
   CT_RPr ctRpr = (CT_RPr) null;
   CT_Language ctLanguage = (CT_Language) null;
   if (this.ctStyles.IsSetDocDefaults())
   {
     ctDocDefaults = this.ctStyles.docDefaults;
     if (ctDocDefaults.IsSetRPrDefault())
     {
       CT_RPrDefault rPrDefault = ctDocDefaults.rPrDefault;
       if (rPrDefault.IsSetRPr())
       {
         ctRpr = rPrDefault.rPr;
         if (ctRpr.IsSetLang())
           ctLanguage = ctRpr.lang;
       }
     }
   }
   if (ctDocDefaults == null)
     ctDocDefaults = this.ctStyles.AddNewDocDefaults();
   if (ctRpr == null)
     ctRpr = ctDocDefaults.AddNewRPrDefault().AddNewRPr();
   if (ctLanguage == null)
     ctLanguage = ctRpr.AddNewLang();
   ctLanguage.eastAsia = strEastAsia;
 }
Esempio n. 2
0
 public void SetSpellingLanguage(string strSpellingLanguage)
 {
   CT_DocDefaults ctDocDefaults = (CT_DocDefaults) null;
   CT_RPr ctRpr = (CT_RPr) null;
   CT_Language ctLanguage = (CT_Language) null;
   if (this.ctStyles.IsSetDocDefaults())
   {
     ctDocDefaults = this.ctStyles.docDefaults;
     if (ctDocDefaults.IsSetRPrDefault())
     {
       CT_RPrDefault rPrDefault = ctDocDefaults.rPrDefault;
       if (rPrDefault.IsSetRPr())
       {
         ctRpr = rPrDefault.rPr;
         if (ctRpr.IsSetLang())
           ctLanguage = ctRpr.lang;
       }
     }
   }
   if (ctDocDefaults == null)
     ctDocDefaults = this.ctStyles.AddNewDocDefaults();
   if (ctRpr == null)
     ctRpr = ctDocDefaults.AddNewRPrDefault().AddNewRPr();
   if (ctLanguage == null)
     ctLanguage = ctRpr.AddNewLang();
   ctLanguage.val = strSpellingLanguage;
   ctLanguage.bidi = strSpellingLanguage;
 }
Esempio n. 3
0
        /**
         * Sets the default spelling language on ctStyles DocDefaults parameter
         * @param strSpellingLanguage
         */
        public void SetSpellingLanguage(String strSpellingLanguage)
        {
            CT_DocDefaults docDefaults = null;
            CT_RPr         RunProps    = null;
            CT_Language    lang        = null;

            // Just making sure we use the members that have already been defined
            if (ctStyles.IsSetDocDefaults())
            {
                docDefaults = ctStyles.docDefaults;
                if (docDefaults.IsSetRPrDefault())
                {
                    CT_RPrDefault RPrDefault = docDefaults.rPrDefault;
                    if (RPrDefault.IsSetRPr())
                    {
                        RunProps = RPrDefault.rPr;
                        if (RunProps.IsSetLang())
                        {
                            lang = RunProps.lang;
                        }
                    }
                }
            }

            if (docDefaults == null)
            {
                docDefaults = ctStyles.AddNewDocDefaults();
            }
            if (RunProps == null)
            {
                RunProps = docDefaults.AddNewRPrDefault().AddNewRPr();
            }
            if (lang == null)
            {
                lang = RunProps.AddNewLang();
            }

            lang.val  = (strSpellingLanguage);
            lang.bidi = (strSpellingLanguage);
        }