Diff for /Amaya/amaya/styleparser.c between versions 1.125 and 1.126

version 1.125, 2002/03/21 16:18:03 version 1.126, 2002/03/27 15:04:24
Line 1150  static char *ParseCSSDisplay (Element el Line 1150  static char *ParseCSSDisplay (Element el
    pval.typed_data.unit = STYLE_UNIT_REL;     pval.typed_data.unit = STYLE_UNIT_REL;
    pval.typed_data.real = FALSE;     pval.typed_data.real = FALSE;
    cssRule = SkipBlanksAndComments (cssRule);     cssRule = SkipBlanksAndComments (cssRule);
    if (!strncasecmp (cssRule, "block", 5))     if (!strncasecmp (cssRule, "none", 4))
      {  
        /* pval.typed_data.value = STYLE_INLINE;  
         if (DoApply)  
         {  
         if (tsch)  
         cssRule = CheckImportantRule (cssRule, context);  
         TtaSetStylePresentation (PRLine, element, tsch, context, pval);  
         } */  
         cssRule = SkipWord (cssRule);  
      }  
    else if (!strncasecmp (cssRule, "inline", 6))  
      {  
        /* pval.typed_data.value = STYLE_INLINE;  
         if (DoApply)  
         {  
         if (tsch)  
         cssRule = CheckImportantRule (cssRule, context);  
         TtaSetStylePresentation (PRLine, element, tsch, context, pval);  
         } */  
         cssRule = SkipWord (cssRule);  
      }  
    else if (!strncasecmp (cssRule, "none", 4))  
      {       {
         pval.typed_data.value = 0;          pval.typed_data.value = 0;
         if (DoApply)          if (DoApply)
Line 1183  static char *ParseCSSDisplay (Element el Line 1161  static char *ParseCSSDisplay (Element el
         }          }
         cssRule = SkipWord (cssRule);          cssRule = SkipWord (cssRule);
      }       }
    else if (!strncasecmp (cssRule, "list-item", 9))  
      cssRule = SkipValue (cssRule, FALSE);  
    else     else
      CSSParseError ("Invalid display value", cssRule);       {
          if (!strncasecmp (cssRule, "block", 5))
            pval.typed_data.value = STYLE_DISPLAYBLOCK;
          else if (!strncasecmp (cssRule, "inline", 6))
            pval.typed_data.value = STYLE_DISPLAYINLINE;
          else if (!strncasecmp (cssRule, "list-item", 9))
          pval.typed_data.value = STYLE_DISPLAYLISTITEM;
          else if (!strncasecmp (cssRule, "runin", 5))
            pval.typed_data.value = STYLE_DISPLAYRUNIN;
          else if (!strncasecmp (cssRule, "compact", 7))
            pval.typed_data.value = STYLE_DISPLAYCOMPACT;
          else if (!strncasecmp (cssRule, "marker", 6))
            pval.typed_data.value = STYLE_DISPLAYMARKER;
          else
            {
              CSSParseError ("Invalid display value", cssRule);
              cssRule = SkipWord (cssRule);
              return (cssRule);
            }
   
          if (DoApply)
            {
              if (tsch)
                cssRule = CheckImportantRule (cssRule, context);
              TtaSetStylePresentation (PRDisplay, element, tsch, context, pval);
            }
          cssRule = SkipWord (cssRule);
        }
    return (cssRule);     return (cssRule);
 }  }
   
Line 3768  void PToCss (PresentationSetting setting Line 3770  void PToCss (PresentationSetting setting
       break;        break;
     case PRLineStyle:      case PRLineStyle:
       break;        break;
       case PRDisplay:
         switch (settings->value.typed_data.value)
           {
           case STYLE_DISPLAYINLINE:
             strcpy (buffer, "display: inline");
             break;
           case STYLE_DISPLAYBLOCK:
             strcpy (buffer, "display: block");
             break;
           case STYLE_DISPLAYLISTITEM:
             strcpy (buffer, "display: list-item");
             break;
           case STYLE_DISPLAYRUNIN:
             strcpy (buffer, "display: runin");
             break;
           case STYLE_DISPLAYCOMPACT:
             strcpy (buffer, "display: compact");
             break;
           case STYLE_DISPLAYMARKER:
             strcpy (buffer, "display: marker");
             break;
           default:
             break;
           }
         break;
     case PRLineWeight:      case PRLineWeight:
       elType = TtaGetElementType(el);        elType = TtaGetElementType(el);
 #ifdef _SVG  #ifdef _SVG
Line 3811  void PToCss (PresentationSetting setting Line 3838  void PToCss (PresentationSetting setting
       break;        break;
     case PRHorizOverflow:      case PRHorizOverflow:
       break;        break;
     case PRLine:  
       if (settings->value.typed_data.value == STYLE_INLINE)  
         strcpy (buffer, "display: inline");  
       else if (settings->value.typed_data.value == STYLE_NOTINLINE)  
         strcpy (buffer, "display: block");  
       break;  
     case PRBackgroundPicture:      case PRBackgroundPicture:
       if (settings->value.pointer != NULL)        if (settings->value.pointer != NULL)
         sprintf (buffer, "background-image: url(%s)",          sprintf (buffer, "background-image: url(%s)",

Removed from v.1.125  
changed lines
  Added in v.1.126


Webmaster