Example #1
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();
 }
Example #2
0
 public static CT_Compat Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_Compat ctObj = new CT_Compat();
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "useSingleBorderforContiguousCells")
             ctObj.useSingleBorderforContiguousCells = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "wpJustification")
             ctObj.wpJustification = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "noTabHangInd")
             ctObj.noTabHangInd = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "noLeading")
             ctObj.noLeading = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "spaceForUL")
             ctObj.spaceForUL = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "noColumnBalance")
             ctObj.noColumnBalance = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "balanceSingleByteDoubleByteWidth")
             ctObj.balanceSingleByteDoubleByteWidth = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "noExtraLineSpacing")
             ctObj.noExtraLineSpacing = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotLeaveBackslashAlone")
             ctObj.doNotLeaveBackslashAlone = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "ulTrailSpace")
             ctObj.ulTrailSpace = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotExpandShiftReturn")
             ctObj.doNotExpandShiftReturn = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "spacingInWholePoints")
             ctObj.spacingInWholePoints = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "lineWrapLikeWord6")
             ctObj.lineWrapLikeWord6 = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "printBodyTextBeforeHeader")
             ctObj.printBodyTextBeforeHeader = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "printColBlack")
             ctObj.printColBlack = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "wpSpaceWidth")
             ctObj.wpSpaceWidth = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "showBreaksInFrames")
             ctObj.showBreaksInFrames = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "subFontBySize")
             ctObj.subFontBySize = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "suppressBottomSpacing")
             ctObj.suppressBottomSpacing = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "suppressTopSpacing")
             ctObj.suppressTopSpacing = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "suppressSpacingAtTopOfPage")
             ctObj.suppressSpacingAtTopOfPage = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "suppressTopSpacingWP")
             ctObj.suppressTopSpacingWP = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "suppressSpBfAfterPgBrk")
             ctObj.suppressSpBfAfterPgBrk = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "swapBordersFacingPages")
             ctObj.swapBordersFacingPages = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "convMailMergeEsc")
             ctObj.convMailMergeEsc = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "truncateFontHeightsLikeWP6")
             ctObj.truncateFontHeightsLikeWP6 = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "mwSmallCaps")
             ctObj.mwSmallCaps = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "usePrinterMetrics")
             ctObj.usePrinterMetrics = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotSuppressParagraphBorders")
             ctObj.doNotSuppressParagraphBorders = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "wrapTrailSpaces")
             ctObj.wrapTrailSpaces = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "footnoteLayoutLikeWW8")
             ctObj.footnoteLayoutLikeWW8 = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "shapeLayoutLikeWW8")
             ctObj.shapeLayoutLikeWW8 = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "alignTablesRowByRow")
             ctObj.alignTablesRowByRow = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "forgetLastTabAlignment")
             ctObj.forgetLastTabAlignment = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "adjustLineHeightInTable")
             ctObj.adjustLineHeightInTable = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "autoSpaceLikeWord95")
             ctObj.autoSpaceLikeWord95 = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "noSpaceRaiseLower")
             ctObj.noSpaceRaiseLower = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotUseHTMLParagraphAutoSpacing")
             ctObj.doNotUseHTMLParagraphAutoSpacing = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "layoutRawTableWidth")
             ctObj.layoutRawTableWidth = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "layoutTableRowsApart")
             ctObj.layoutTableRowsApart = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "useWord97LineBreakRules")
             ctObj.useWord97LineBreakRules = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotBreakWrappedTables")
             ctObj.doNotBreakWrappedTables = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotSnapToGridInCell")
             ctObj.doNotSnapToGridInCell = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "selectFldWithFirstOrLastChar")
             ctObj.selectFldWithFirstOrLastChar = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "applyBreakingRules")
             ctObj.applyBreakingRules = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotWrapTextWithPunct")
             ctObj.doNotWrapTextWithPunct = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotUseEastAsianBreakRules")
             ctObj.doNotUseEastAsianBreakRules = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "useWord2002TableStyleRules")
             ctObj.useWord2002TableStyleRules = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "growAutofit")
             ctObj.growAutofit = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "useFELayout")
             ctObj.useFELayout = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "useNormalStyleForList")
             ctObj.useNormalStyleForList = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotUseIndentAsNumberingTabStop")
             ctObj.doNotUseIndentAsNumberingTabStop = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "useAltKinsokuLineBreakRules")
             ctObj.useAltKinsokuLineBreakRules = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "allowSpaceOfSameStyleInTable")
             ctObj.allowSpaceOfSameStyleInTable = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotSuppressIndentation")
             ctObj.doNotSuppressIndentation = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotAutofitConstrainedTables")
             ctObj.doNotAutofitConstrainedTables = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "autofitToFirstFixedWidthCell")
             ctObj.autofitToFirstFixedWidthCell = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "underlineTabInNumList")
             ctObj.underlineTabInNumList = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "displayHangulFixedWidth")
             ctObj.displayHangulFixedWidth = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "splitPgBreakAndParaMark")
             ctObj.splitPgBreakAndParaMark = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotVertAlignCellWithSp")
             ctObj.doNotVertAlignCellWithSp = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotBreakConstrainedForcedTable")
             ctObj.doNotBreakConstrainedForcedTable = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "doNotVertAlignInTxbx")
             ctObj.doNotVertAlignInTxbx = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "useAnsiKerningPairs")
             ctObj.useAnsiKerningPairs = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "cachedColBalance")
             ctObj.cachedColBalance = CT_OnOff.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }