Subversion Repositories DevTools

Rev

Rev 2094 | Rev 2104 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2094 Rev 2098
Line 23... Line 23...
23
      {
23
      {
24
         WordApp = wordApp;
24
         WordApp = wordApp;
25
         WordDocument = wordDocument;
25
         WordDocument = wordDocument;
26
      }
26
      }
27
 
27
 
28
 
-
 
29
      public Word.Range appendDescription(string wordText, EA_Utilities EA_Utils)
28
      public Word.Range appendDescription(string wordText, EA_Utilities EA_Utils)
30
      {
29
      {
-
 
30
         return appendDescription(wordText, EA_Utils, false);
-
 
31
      }
-
 
32
 
-
 
33
      public Word.Range appendDescription(string wordText, EA_Utilities EA_Utils, bool continuation)
-
 
34
      {
-
 
35
         return appendDescription(wordText, EA_Constants.styleName_Body1, EA_Utils, continuation);
-
 
36
      }
-
 
37
 
-
 
38
      public Word.Range appendDescription(string wordText, string styleName, EA_Utilities EA_Utils, bool continuation)
-
 
39
      {
31
         Word.Range wr = null;
40
         Word.Range wr = null;
32
 
41
 
33
         if (wordText != null && wordText.Length > 0)
42
         if (wordText != null && wordText.Length > 0)
34
            wr = appendAndSelectText(wordText, EA_Constants.styleName_Body1);
43
            wr = appendAndSelectText(wordText, styleName, continuation);
35
         else if (!EA_Utils.options.opt_SuppressElementDescriptionMissingWarnings)
44
         else if (!EA_Utils.options.opt_SuppressElementDescriptionMissingWarnings)
36
         {
45
         {
37
            wr = appendAndSelectText("Description missing!", EA_Constants.styleName_Body1);
46
            wr = appendAndSelectText("Description missing!", styleName, continuation);
-
 
47
            // For some wierd reason, if continuing on same paragraph, we have to decrement the range start by 1
-
 
48
            // otherwise the D of Description, does not get the red color or italic style
-
 
49
            if (continuation)
-
 
50
               wr.Start--;
38
            wr.Font.Italic = 1;
51
            wr.Font.Italic = 1;
39
            wr.Font.Color = Word.WdColor.wdColorRed;
52
            wr.Font.Color = Word.WdColor.wdColorRed;
40
         }
53
         }
41
         return wr;
54
         return wr;
42
      }
55
      }
43
 
56
 
-
 
57
 
44
      
58
      
45
      /// <summary>
59
      /// <summary>
46
      /// Appends a specified text string to the word document, selects the new text, and applies
60
      /// Appends a specified text string to the word document, selects the new text, and applies
47
      /// the specified style formatting to it.
61
      /// the specified style formatting to it.
48
      /// </summary>
62
      /// </summary>