Ejemplo n.º 1
0
        protected void CommonConstruct(OfficeDocument doc)
        {
            InitializeComponent();
            InsureSettings();
            m_doc = doc;

            PopulateGrid();
        }
Ejemplo n.º 2
0
		/// <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;
		}
Ejemplo n.º 3
0
        /// <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;
        }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
 /// <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);
 }
Ejemplo n.º 6
0
		protected void CommonConstruct(OfficeDocument doc)
		{
			InitializeComponent();
			InsureSettings();
			m_doc = doc;

			PopulateGrid();
		}
Ejemplo n.º 7
0
		/// <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);
		}
Ejemplo n.º 8
0
		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);
			}
		}