}         // InsertText

        // ----------------------------------------------------------------------
        public void InsertSpecialChar(IRtfInterpreterContext context, RtfVisualSpecialCharKind kind)
        {
            if (context != null)
            {
                DoInsertSpecialChar(context, kind);
            }
        }         // InsertSpecialChar
 // ----------------------------------------------------------------------
 public void InsertSpecialChar( IRtfInterpreterContext context, RtfVisualSpecialCharKind kind )
 {
     if ( context != null )
     {
         DoInsertSpecialChar( context, kind );
     }
 }
        }         // NotifyInsertText

        // ----------------------------------------------------------------------
        protected void NotifyInsertSpecialChar(RtfVisualSpecialCharKind kind)
        {
            if (listeners != null)
            {
                foreach (IRtfInterpreterListener listener in listeners)
                {
                    listener.InsertSpecialChar(context, kind);
                }
            }
        }         // NotifyInsertSpecialChar
        }         // DoInsertText

        // ----------------------------------------------------------------------
        protected override void DoInsertSpecialChar(IRtfInterpreterContext context, RtfVisualSpecialCharKind kind)
        {
            if (settings.Enabled && !string.IsNullOrEmpty(settings.SpecialCharFormatText))
            {
                WriteLine(string.Format(
                              CultureInfo.InvariantCulture,
                              settings.SpecialCharFormatText,
                              kind));
            }
        }         // DoInsertSpecialChar
Beispiel #5
0
		} // DoInsertText

		// ----------------------------------------------------------------------
		protected override void DoInsertSpecialChar( IRtfInterpreterContext context, RtfVisualSpecialCharKind kind )
		{
			switch ( kind )
			{
				case RtfVisualSpecialCharKind.Tabulator:
					this.plainText.Append( this.settings.TabulatorText );
					break;
				case RtfVisualSpecialCharKind.NonBreakingSpace:
					this.plainText.Append( this.settings.NonBreakingSpaceText );
					break;
				case RtfVisualSpecialCharKind.EmSpace:
					this.plainText.Append( this.settings.EmSpaceText );
					break;
				case RtfVisualSpecialCharKind.EnSpace:
					this.plainText.Append( this.settings.EnSpaceText );
					break;
				case RtfVisualSpecialCharKind.QmSpace:
					this.plainText.Append( this.settings.QmSpaceText );
					break;
				case RtfVisualSpecialCharKind.EmDash:
					this.plainText.Append( this.settings.EmDashText );
					break;
				case RtfVisualSpecialCharKind.EnDash:
					this.plainText.Append( this.settings.EnDashText );
					break;
				case RtfVisualSpecialCharKind.OptionalHyphen:
					this.plainText.Append( this.settings.OptionalHyphenText );
					break;
				case RtfVisualSpecialCharKind.NonBreakingHyphen:
					this.plainText.Append( this.settings.NonBreakingHyphenText );
					break;
				case RtfVisualSpecialCharKind.Bullet:
					this.plainText.Append( this.settings.BulletText );
					break;
				case RtfVisualSpecialCharKind.LeftSingleQuote:
					this.plainText.Append( this.settings.LeftSingleQuoteText );
					break;
				case RtfVisualSpecialCharKind.RightSingleQuote:
					this.plainText.Append( this.settings.RightSingleQuoteText );
					break;
				case RtfVisualSpecialCharKind.LeftDoubleQuote:
					this.plainText.Append( this.settings.LeftDoubleQuoteText );
					break;
				case RtfVisualSpecialCharKind.RightDoubleQuote:
					this.plainText.Append( this.settings.RightDoubleQuoteText );
					break;
				default:
					this.plainText.Append( this.settings.UnknownSpecialCharText );
					break;
			}
		} // DoInsertSpecialChar
Beispiel #6
0
        // Members

        public RtfVisualSpecialChar(RtfVisualSpecialCharKind charKind) :
            base(RtfVisualKind.Special)
        {
            CharKind = charKind;
        } // RtfVisualSpecialChar
 // ----------------------------------------------------------------------
 protected override void DoInsertSpecialChar( IRtfInterpreterContext context, RtfVisualSpecialCharKind kind )
 {
     FlushPendingText();
     visualDocumentContent.Add( new RtfVisualSpecialChar( kind ) );
 }
        }         // DoInsertText

        // ----------------------------------------------------------------------
        protected override void DoInsertSpecialChar(IRtfInterpreterContext context, RtfVisualSpecialCharKind kind)
        {
            FlushPendingText();
            visualDocumentContent.Add(new RtfVisualSpecialChar(kind));
        }         // DoInsertSpecialChar
 // ----------------------------------------------------------------------
 public RtfVisualSpecialChar(RtfVisualSpecialCharKind charKind, IRtfTextFormat format) :
     base(RtfVisualKind.Special)
 {
     this.charKind = charKind;
     this.format   = format;
 } // RtfVisualSpecialChar
 // ----------------------------------------------------------------------
 protected override void DoInsertSpecialChar( IRtfInterpreterContext context, RtfVisualSpecialCharKind kind )
 {
     if ( settings.Enabled && !string.IsNullOrEmpty( settings.SpecialCharFormatText ) )
     {
         WriteLine( string.Format(
             CultureInfo.InvariantCulture,
             settings.SpecialCharFormatText,
             kind ) );
     }
 }
        }         // DoInsertText

        // ----------------------------------------------------------------------
        protected virtual void DoInsertSpecialChar(IRtfInterpreterContext context, RtfVisualSpecialCharKind kind)
        {
        }         // DoInsertSpecialChar
Beispiel #12
0
        }         // DoInsertText

        // ----------------------------------------------------------------------
        protected override void DoInsertSpecialChar(IRtfInterpreterContext context, RtfVisualSpecialCharKind kind)
        {
            switch (kind)
            {
            case RtfVisualSpecialCharKind.Tabulator:
                plainText.Append(settings.TabulatorText);
                break;

            case RtfVisualSpecialCharKind.NonBreakingSpace:
                plainText.Append(settings.NonBreakingSpaceText);
                break;

            case RtfVisualSpecialCharKind.EmSpace:
                plainText.Append(settings.EmSpaceText);
                break;

            case RtfVisualSpecialCharKind.EnSpace:
                plainText.Append(settings.EnSpaceText);
                break;

            case RtfVisualSpecialCharKind.QmSpace:
                plainText.Append(settings.QmSpaceText);
                break;

            case RtfVisualSpecialCharKind.EmDash:
                plainText.Append(settings.EmDashText);
                break;

            case RtfVisualSpecialCharKind.EnDash:
                plainText.Append(settings.EnDashText);
                break;

            case RtfVisualSpecialCharKind.OptionalHyphen:
                plainText.Append(settings.OptionalHyphenText);
                break;

            case RtfVisualSpecialCharKind.NonBreakingHyphen:
                plainText.Append(settings.NonBreakingHyphenText);
                break;

            case RtfVisualSpecialCharKind.Bullet:
                plainText.Append(settings.BulletText);
                break;

            case RtfVisualSpecialCharKind.LeftSingleQuote:
                plainText.Append(settings.LeftSingleQuoteText);
                break;

            case RtfVisualSpecialCharKind.RightSingleQuote:
                plainText.Append(settings.RightSingleQuoteText);
                break;

            case RtfVisualSpecialCharKind.LeftDoubleQuote:
                plainText.Append(settings.LeftDoubleQuoteText);
                break;

            case RtfVisualSpecialCharKind.RightDoubleQuote:
                plainText.Append(settings.RightDoubleQuoteText);
                break;

            default:
                plainText.Append(settings.UnknownSpecialCharText);
                break;
            }
        }         // DoInsertSpecialChar
 // ----------------------------------------------------------------------
 public RtfVisualSpecialChar( RtfVisualSpecialCharKind charKind )
     : base(RtfVisualKind.Special)
 {
     this.charKind = charKind;
 }
 // ----------------------------------------------------------------------
 protected virtual void DoInsertSpecialChar( IRtfInterpreterContext context, RtfVisualSpecialCharKind kind )
 {
 }
 // ----------------------------------------------------------------------
 protected void NotifyInsertSpecialChar( RtfVisualSpecialCharKind kind )
 {
     if ( listeners != null )
     {
         foreach ( IRtfInterpreterListener listener in listeners )
         {
             listener.InsertSpecialChar( context, kind );
         }
     }
 }
		} // DoInsertText

		// ----------------------------------------------------------------------
		protected override void DoInsertSpecialChar( IRtfInterpreterContext context, RtfVisualSpecialCharKind kind )
		{
			if ( this.settings.Enabled && logger.IsInfoEnabled && !string.IsNullOrEmpty( this.settings.SpecialCharFormatText ) )
			{
				Log( string.Format(
					CultureInfo.InvariantCulture,
					this.settings.SpecialCharFormatText,
					kind ) );
			}
		} // DoInsertSpecialChar