protected void CommonConstruct(OfficeDocument doc) { InitializeComponent(); InsureSettings(); m_doc = doc; PopulateGrid(); }
/// <summary> /// FontConvertersPicker: to choose the font you want to process in the Word document /// /// This version of the constructor is for when you want the same (given) EncConverter /// used for all fonts. /// </summary> /// <param name="doc"></param> /// <param name="aEC"></param> public FontConvertersPicker(OfficeDocument doc, IEncConverter aEC) { System.Diagnostics.Debug.Assert(aEC != null); m_aECForAll = new DirectableEncConverter(aEC); m_strApplyEC = String.Format(cstrApplyECFormat, aEC.Name); CommonConstruct(doc); // no mapping in this mode converterMappingToolStripMenuItem.Visible = false; }
/// <summary> /// FontConvertersPicker: to choose the font you want to process in the Word document /// /// This version of the constructor is for when you want the same (given) EncConverter /// used for all fonts. /// </summary> /// <param name="doc"></param> /// <param name="aEC"></param> public FontConvertersPicker(OfficeDocument doc, IEncConverter aEC) { System.Diagnostics.Debug.Assert(aEC != null); m_aECForAll = new DirectableEncConverter(aEC); m_strApplyEC = String.Format(cstrApplyECFormat, aEC.Name); CommonConstruct(doc); // no mapping in this mode converterMappingToolStripMenuItem.Visible = false; }
protected void DoWork(BackgroundWorker worker, OfficeDocument doc) { int nWordCount = doc.WordCount; /* * if (doc.GetType() == typeof(PubDocument)) // for publisher, we step when we've found a font * { * progressBarFontsInUse.Maximum = nWordCount; * progressBarFontsInUse.Step = 1; * nWordCount = 0; * } */ FontNamesInUseProcessor aDocumentProcess = new FontNamesInUseProcessor(nWordCount, worker); try { doc.ProcessWordByWord(aDocumentProcess); } catch (Exception ex) { OfficeApp.DisplayException(ex); } }
/// <summary> /// FontConvertersPicker: to choose the font you want to process in the Word document /// /// This version of the constructor is for when you want the EncConverter picked (by /// the user when the font is selected). /// </summary> /// <param name="doc"></param> public FontConvertersPicker(OfficeDocument doc) { CommonConstruct(doc); }
protected void CommonConstruct(OfficeDocument doc) { InitializeComponent(); InsureSettings(); m_doc = doc; PopulateGrid(); }
/// <summary> /// FontConvertersPicker: to choose the font you want to process in the Word document /// /// This version of the constructor is for when you want the EncConverter picked (by /// the user when the font is selected). /// </summary> /// <param name="doc"></param> public FontConvertersPicker(OfficeDocument doc) { CommonConstruct(doc); }
protected void DoWork(BackgroundWorker worker, OfficeDocument doc) { int nWordCount = doc.WordCount; /* if (doc.GetType() == typeof(PubDocument)) // for publisher, we step when we've found a font { progressBarFontsInUse.Maximum = nWordCount; progressBarFontsInUse.Step = 1; nWordCount = 0; } */ FontNamesInUseProcessor aDocumentProcess = new FontNamesInUseProcessor(nWordCount, worker); try { doc.ProcessWordByWord(aDocumentProcess); } catch (Exception ex) { OfficeApp.DisplayException(ex); } }