Diff for /Amaya/amaya/styleparser.c between versions 1.111 and 1.112

version 1.111, 2001/12/18 17:55:27 version 1.112, 2002/01/10 16:21:12
Line 1222  static char *ParseCSSTextAlign (Element Line 1222  static char *ParseCSSTextAlign (Element
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
      ParseCSSDirection: parse a CSS direction property
     ----------------------------------------------------------------------*/
   static char *ParseCSSDirection (Element element, PSchema tsch,
                                   PresentationContext context, char *cssRule,
                                   CSSInfoPtr css, ThotBool isHTML)
   {
      PresentationValue   direction;
   
      direction.typed_data.value = 0;
      direction.typed_data.unit = STYLE_UNIT_REL;
      direction.typed_data.real = FALSE;
   
      cssRule = SkipBlanksAndComments (cssRule);
      if (!strncasecmp (cssRule, "ltr", 3))
        {
          direction.typed_data.value = STYLE_LEFTTORIGHT;
          cssRule = SkipWord (cssRule);
        }
      else if (!strncasecmp (cssRule, "rtl", 3))
        {
          direction.typed_data.value = STYLE_RIGHTTOLEFT;
          cssRule = SkipWord (cssRule);
        }
      else if (!strncasecmp (cssRule, "inherit", 7))
        {
          /* not implemented */
          cssRule = SkipWord (cssRule);
          return (cssRule);
        }
      else
        {
          CSSParseError ("Invalid direction value", cssRule);
          return (cssRule);
        }
   
      /*
       * install the new presentation.
       */
      if (direction.typed_data.value)
        TtaSetStylePresentation (PRDirection, element, tsch, context, direction);
      return (cssRule);
   }
   
   /*----------------------------------------------------------------------
    ParseCSSTextIndent: parse a CSS text-indent               ParseCSSTextIndent: parse a CSS text-indent          
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 2916  static CSSProperty CSSProperties[] = Line 2960  static CSSProperty CSSProperties[] =
    {"text-indent", ParseCSSTextIndent},     {"text-indent", ParseCSSTextIndent},
    {"line-height", ParseCSSLineSpacing},     {"line-height", ParseCSSLineSpacing},
   
      {"direction", ParseCSSDirection},
   
    {"margin-top", ParseCSSMarginTop},     {"margin-top", ParseCSSMarginTop},
    {"margin-right", ParseCSSMarginRight},     {"margin-right", ParseCSSMarginRight},
    {"margin-bottom", ParseCSSMarginBottom},     {"margin-bottom", ParseCSSMarginBottom},
Line 3421  void PToCss (PresentationSetting setting Line 3467  void PToCss (PresentationSetting setting
           break;            break;
         }          }
       break;        break;
       case PRDirection:
         switch (settings->value.typed_data.value)
           {
           case STYLE_LEFTTORIGHT:
             strcpy (buffer, "direction: ltr");
             break;
           case STYLE_RIGHTTOLEFT:
             strcpy (buffer, "direction: rtl");
             break;
           }
         break;
     case PRLineStyle:      case PRLineStyle:
       break;        break;
     case PRLineWeight:      case PRLineWeight:

Removed from v.1.111  
changed lines
  Added in v.1.112


Webmaster