예제 #1
0
 private void ReadFrom(Stream inputStream)
 {
     try
     {
         ctSettings = SettingsDocument.Parse(inputStream).Settings;
     }
     catch (Exception e)
     {
         throw new Exception("SettingsDocument parse failed", e);
     }
 }
예제 #2
0
파일: XWPFSettings.cs 프로젝트: zzy092/npoi
 private void ReadFrom(Stream inputStream)
 {
     try
     {
         XmlDocument xmldoc = ConvertStreamToXml(inputStream);
         ctSettings = SettingsDocument.Parse(xmldoc, NamespaceManager).Settings;
     }
     catch (Exception e)
     {
         throw new Exception("SettingsDocument parse failed", e);
     }
 }
예제 #3
0
        private void WriteSettings()
        {
            SettingsPart settingsPart = new SettingsPart();
            CT_Settings  cT_Settings  = (CT_Settings)settingsPart.Root;

            cT_Settings.Compat = new CT_Compat
            {
                FootnoteLayoutLikeWW8            = this.On(),
                ShapeLayoutLikeWW8               = this.On(),
                AlignTablesRowByRow              = this.On(),
                ForgetLastTabAlignment           = this.On(),
                DoNotUseHTMLParagraphAutoSpacing = this.On(),
                LayoutRawTableWidth              = this.On(),
                LayoutTableRowsApart             = this.On(),
                UseWord97LineBreakRules          = this.On(),
                DoNotBreakWrappedTables          = this.On(),
                DoNotSnapToGridInCell            = this.On(),
                SelectFldWithFirstOrLastChar     = this.On(),
                DoNotWrapTextWithPunct           = this.On(),
                DoNotUseEastAsianBreakRules      = this.On(),
                UseWord2002TableStyleRules       = this.On(),
                GrowAutofit                      = this.On(),
                UseNormalStyleForList            = this.On(),
                DoNotUseIndentAsNumberingTabStop = this.On(),
                UseAltKinsokuLineBreakRules      = this.On(),
                AllowSpaceOfSameStyleInTable     = this.On(),
                DoNotSuppressIndentation         = this.On(),
                DoNotAutofitConstrainedTables    = this.On(),
                AutofitToFirstFixedWidthCell     = this.On(),
                UnderlineTabInNumList            = this.On(),
                DisplayHangulFixedWidth          = this.On(),
                SplitPgBreakAndParaMark          = this.On(),
                DoNotVertAlignCellWithSp         = this.On(),
                DoNotBreakConstrainedForcedTable = this.On(),
                DoNotVertAlignInTxbx             = this.On(),
                UseAnsiKerningPairs              = this.On(),
                CachedColBalance                 = this.On()
            };
            this._manager.WriteStaticPart(settingsPart, "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml", "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings", "word/settings.xml", this._manager.GetRootPart());
        }
예제 #4
0
 public XWPFSettings()
     : base()
 {
     ctSettings = new CT_Settings();
 }
예제 #5
0
 public SettingsDocument(CT_Settings settings)
 {
     this.settings = settings;
 }
예제 #6
0
        public static SettingsDocument Parse(XmlDocument doc, XmlNamespaceManager NameSpaceManager)
        {
            CT_Settings obj = CT_Settings.Parse(doc.DocumentElement, NameSpaceManager);

            return(new SettingsDocument(obj));
        }
예제 #7
0
 public SettingsDocument()
 {
     settings = new CT_Settings();
 }
예제 #8
0
        public static SettingsDocument Parse(Stream stream)
        {
            CT_Settings obj = (CT_Settings)serializer.Deserialize(stream);

            return(new SettingsDocument(obj));
        }
예제 #9
0
 public XWPFSettings()
 {
     this.ctSettings = new CT_Settings();
 }