Diff for /Amaya/amaya/styleparser.c between versions 1.80 and 1.81

version 1.80, 2001/02/06 16:44:30 version 1.81, 2001/02/12 11:32:38
Line 1086  static char *ParseCSSTextAlign (Element Line 1086  static char *ParseCSSTextAlign (Element
                                 CSSInfoPtr css, ThotBool isHTML)                                  CSSInfoPtr css, ThotBool isHTML)
 {  {
    PresentationValue   align;     PresentationValue   align;
    PresentationValue   justify;  
   
    align.typed_data.value = 0;     align.typed_data.value = 0;
    align.typed_data.unit = STYLE_UNIT_REL;     align.typed_data.unit = STYLE_UNIT_REL;
    align.typed_data.real = FALSE;     align.typed_data.real = FALSE;
    justify.typed_data.value = 0;  
    justify.typed_data.unit = STYLE_UNIT_REL;  
    justify.typed_data.real = FALSE;  
   
    cssRule = SkipWCBlanksAndComments (cssRule);     cssRule = SkipWCBlanksAndComments (cssRule);
    if (!ustrncasecmp (cssRule, TEXT("left"), 4))     if (!ustrncasecmp (cssRule, TEXT("left"), 4))
Line 1113  static char *ParseCSSTextAlign (Element Line 1109  static char *ParseCSSTextAlign (Element
      }       }
    else if (!ustrncasecmp (cssRule, TEXT("justify"), 7))     else if (!ustrncasecmp (cssRule, TEXT("justify"), 7))
      {       {
         justify.typed_data.value = Justified;          align.typed_data.value = Justify;
         cssRule = SkipWord (cssRule);          cssRule = SkipWord (cssRule);
      }       }
    else     else
Line 1126  static char *ParseCSSTextAlign (Element Line 1122  static char *ParseCSSTextAlign (Element
     * install the new presentation.      * install the new presentation.
     */      */
    if (align.typed_data.value)     if (align.typed_data.value)
      {       TtaSetStylePresentation (PRAdjust, element, tsch, context, align);
        TtaSetStylePresentation (PRAdjust, element, tsch, context, align);  
      }  
    if (justify.typed_data.value)  
      {  
        TtaSetStylePresentation (PRJustify, element, tsch, context, justify);  
        TtaSetStylePresentation (PRHyphenate, element, tsch, context, justify);  
      }  
    return (cssRule);     return (cssRule);
 }  }
   
Line 3060  void PToCss (PresentationSetting setting Line 3049  void PToCss (PresentationSetting setting
                   settings->value.typed_data.value);                    settings->value.typed_data.value);
       add_unit = 1;        add_unit = 1;
       break;        break;
     case PRJustify:  
       if (settings->value.typed_data.value == STYLE_JUSTIFIED)  
         usprintf (buffer, TEXT("text-align: justify"));  
       break;  
     case PRAdjust:      case PRAdjust:
       switch (settings->value.typed_data.value)        switch (settings->value.typed_data.value)
         {          {
Line 3079  void PToCss (PresentationSetting setting Line 3064  void PToCss (PresentationSetting setting
         case STYLE_ADJUSTLEFTWITHDOTS:          case STYLE_ADJUSTLEFTWITHDOTS:
           ustrcpy (buffer, TEXT("text-align: left"));            ustrcpy (buffer, TEXT("text-align: left"));
           break;            break;
           case STYLE_ADJUSTJUSTIFY:
             ustrcpy (buffer, TEXT("text-align: justify"));
             break;
         }          }
       break;        break;
     case PRHyphenate:      case PRHyphenate:

Removed from v.1.80  
changed lines
  Added in v.1.81


Webmaster