Exemple #1
0
        /**
         * Sets the default spelling language on ctStyles DocDefaults parameter
         * @param strSpellingLanguage
         */
        public void SetSpellingLanguage(String strSpellingLanguage)
        {
            CT_Language lang = GetCTLanguage();

            lang.val  = (/*setter*/ strSpellingLanguage);
            lang.bidi = (/*setter*/ strSpellingLanguage);
        }
Exemple #2
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;
 }
Exemple #3
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;
 }
Exemple #4
0
        protected CT_Language GetCTLanguage()
        {
            EnsureDocDefaults();

            CT_Language lang = null;

            if (defaultRunStyle.GetRPr().IsSetLang())
            {
                lang = defaultRunStyle.GetRPr().lang;
            }
            else
            {
                lang = defaultRunStyle.GetRPr().AddNewLang();
            }

            return(lang);
        }
Exemple #5
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);
        }
Exemple #6
0
        /**
         * Sets the default East Asia spelling language on ctStyles DocDefaults parameter
         * @param strEastAsia
         */
        public void SetEastAsia(String strEastAsia)
        {
            CT_Language lang = GetCTLanguage();

            lang.eastAsia = (/*setter*/ strEastAsia);
        }
Exemple #7
0
 public CT_Settings()
 {
     this.listSeparatorField = new CT_String();
     this.listSeparator.val = ",";
     
     this.decimalSymbolField = new CT_String();
     this.decimalSymbol.val = ".";
     //this.doNotEmbedSmartTagsField = new CT_OnOff();
     this.shapeDefaultsField = new System.Xml.XmlElement[0];
     //this.schemaLibraryField = new List<CT_Schema>();
     //this.smartTagTypeField = new List<CT_SmartTagType>();
     //this.readModeInkLockDownField = new CT_ReadingModeInkLockDown();
     //this.captionsField = new CT_Captions();
     //this.forceUpgradeField = new CT_Empty();
     //this.doNotAutoCompressPicturesField = new CT_OnOff();
     //this.doNotIncludeSubdocsInStatsField = new CT_OnOff();
     this.clrSchemeMappingField = new CT_ColorSchemeMapping();
     this.clrSchemeMapping.bg1 = ST_ColorSchemeIndex.light1;
     this.clrSchemeMapping.t1 = ST_ColorSchemeIndex.dark1;
     this.clrSchemeMapping.bg2 = ST_ColorSchemeIndex.light2;
     this.clrSchemeMapping.t2 = ST_ColorSchemeIndex.dark2;
     this.clrSchemeMapping.accent1 = ST_ColorSchemeIndex.accent1;
     this.clrSchemeMapping.accent2 = ST_ColorSchemeIndex.accent2;
     this.clrSchemeMapping.accent3 = ST_ColorSchemeIndex.accent3;
     this.clrSchemeMapping.accent4 = ST_ColorSchemeIndex.accent4;
     this.clrSchemeMapping.accent5 = ST_ColorSchemeIndex.accent5;
     this.clrSchemeMapping.accent6 = ST_ColorSchemeIndex.accent6;
     this.clrSchemeMapping.hyperlink = ST_ColorSchemeIndex.hyperlink;
     this.clrSchemeMapping.followedHyperlink = ST_ColorSchemeIndex.followedHyperlink;
     this.themeFontLangField = new CT_Language();
     this.themeFontLang.val = "en-US";
     this.themeFontLang.eastAsia = "zh-CN";
     //this.attachedSchemaField = new List<CT_String>();
     //this.uiCompat97To2003Field = new CT_OnOff();
     this.mathPrField = new NPOI.OpenXmlFormats.Shared.CT_MathPr();
     this.rsidsField = new CT_DocRsids();
     //this.docVarsField = new List<CT_DocVar>();
     this.compatField = new CT_Compat();
     //this.endnotePrField = new CT_EdnDocProps();
     //this.footnotePrField = new CT_FtnDocProps();
     //this.hdrShapeDefaultsField = new System.Xml.XmlElement[0];
     //this.updateFieldsField = new CT_OnOff();
     //this.alwaysMergeEmptyNamespaceField = new CT_OnOff();
     //this.showXMLTagsField = new CT_OnOff();
     //this.saveThroughXsltField = new CT_SaveThroughXslt();
     //this.useXSLTWhenSavingField = new CT_OnOff();
     //this.saveXmlDataOnlyField = new CT_OnOff();
     //this.doNotDemarcateInvalidXmlField = new CT_OnOff();
     //this.alwaysShowPlaceholderTextField = new CT_OnOff();
     //this.ignoreMixedContentField = new CT_OnOff();
     //this.saveInvalidXmlField = new CT_OnOff();
     //this.doNotValidateAgainstSchemaField = new CT_OnOff();
     //this.savePreviewPictureField = new CT_OnOff();
     //this.noLineBreaksBeforeField = new CT_Kinsoku();
     //this.noLineBreaksAfterField = new CT_Kinsoku();
     //this.strictFirstAndLastCharsField = new CT_OnOff();
     //this.printTwoOnOneField = new CT_OnOff();
     this.characterSpacingControlField = new CT_CharacterSpacing();
     this.characterSpacingControl.val = ST_CharacterSpacing.compressPunctuation;
     //this.noPunctuationKerningField = new CT_OnOff();
     //this.doNotShadeFormDataField = new CT_OnOff();
     //this.drawingGridVerticalOriginField = new CT_TwipsMeasure();
     //this.drawingGridHorizontalOriginField = new CT_TwipsMeasure();
     //this.doNotUseMarginsForDrawingGridOriginField = new CT_OnOff();
     this.displayVerticalDrawingGridEveryField = new CT_DecimalNumber();
     this.displayVerticalDrawingGridEvery.val = "2";
     this.displayHorizontalDrawingGridEveryField = new CT_DecimalNumber();
     this.displayHorizontalDrawingGridEvery.val = "0";
     this.drawingGridVerticalSpacingField = new CT_TwipsMeasure();
     this.drawingGridVerticalSpacing.val = 156;
     //this.drawingGridHorizontalSpacingField = new CT_TwipsMeasure();
     //this.bookFoldPrintingSheetsField = new CT_DecimalNumber();
     //this.bookFoldPrintingField = new CT_OnOff();
     //this.bookFoldRevPrintingField = new CT_OnOff();
     //this.evenAndOddHeadersField = new CT_OnOff();
     //this.defaultTableStyleField = new CT_String();
     //this.clickAndTypeStyleField = new CT_String();
     //this.summaryLengthField = new CT_DecimalNumber();
     //this.showEnvelopeField = new CT_OnOff();
     //this.doNotHyphenateCapsField = new CT_OnOff();
     //this.hyphenationZoneField = new CT_TwipsMeasure();
     //this.consecutiveHyphenLimitField = new CT_DecimalNumber();
     //this.autoHyphenationField = new CT_OnOff();
     this.defaultTabStopField = new CT_TwipsMeasure();
     this.defaultTabStopField.val = 420;
     //this.styleLockQFSetField = new CT_OnOff();
     //this.styleLockThemeField = new CT_OnOff();
     //this.autoFormatOverrideField = new CT_OnOff();
     //this.documentProtectionField = new CT_DocProtect();
     //this.doNotTrackFormattingField = new CT_OnOff();
     //this.doNotTrackMovesField = new CT_OnOff();
     //this.trackRevisionsField = new CT_OnOff();
     //this.revisionViewField = new CT_TrackChangesView();
     //this.mailMergeField = new CT_MailMerge();
     //this.documentTypeField = new CT_DocType();
     //this.stylePaneSortMethodField = new CT_ShortHexNumber();
     //this.stylePaneFormatFilterField = new CT_ShortHexNumber();
     //this.linkStylesField = new CT_OnOff();
     //this.attachedTemplateField = new CT_Rel();
     //this.formsDesignField = new CT_OnOff();
     //this.proofStateField = new CT_Proof();
     //this.activeWritingStyleField = new List<CT_WritingStyle>();
     //this.hideGrammaticalErrorsField = new CT_OnOff();
     //this.hideSpellingErrorsField = new CT_OnOff();
     //this.gutterAtTopField = new CT_OnOff();
     this.bordersDoNotSurroundFooterField = new CT_OnOff();
     this.bordersDoNotSurroundHeaderField = new CT_OnOff();
     //this.alignBordersAndEdgesField = new CT_OnOff();
     //this.mirrorMarginsField = new CT_OnOff();
     //this.saveFormsDataField = new CT_OnOff();
     //this.saveSubsetFontsField = new CT_OnOff();
     //this.embedSystemFontsField = new CT_OnOff();
     //this.embedTrueTypeFontsField = new CT_OnOff();
     //this.printFormsDataField = new CT_OnOff();
     //this.printFractionalCharacterWidthField = new CT_OnOff();
     //this.printPostScriptOverTextField = new CT_OnOff();
     //this.displayBackgroundShapeField = new CT_OnOff();
     //this.doNotDisplayPageBoundariesField = new CT_OnOff();
     //this.removeDateAndTimeField = new CT_OnOff();
     //this.removePersonalInformationField = new CT_OnOff();
     this.zoomField = new CT_Zoom();
     //this.viewField = new CT_View();
     //this.writeProtectionField = new CT_WriteProtection();
 }