mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:09:32 +02:00
fpvectorial-eps: Some corrections to the array handling
git-svn-id: trunk@37205 -
This commit is contained in:
parent
0cfb1121f3
commit
44f5d11c10
@ -237,7 +237,8 @@ begin
|
|||||||
Result.ClipPath := ClipPath;
|
Result.ClipPath := ClipPath;
|
||||||
Result.ClipMode := ClipMode;
|
Result.ClipMode := ClipMode;
|
||||||
Result.OverPrint := OverPrint;
|
Result.OverPrint := OverPrint;
|
||||||
Result.CTM := TArrayToken(CTM.Duplicate());
|
if CTM <> nil then
|
||||||
|
Result.CTM := TArrayToken(CTM.Duplicate());
|
||||||
Result.PenWidth := PenWidth;
|
Result.PenWidth := PenWidth;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -656,6 +657,14 @@ begin
|
|||||||
Continue;
|
Continue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// If we got an array after the substitution, don't run it, just put it in the stack
|
||||||
|
if CurToken is TArrayToken then
|
||||||
|
begin
|
||||||
|
Stack.Push(CurToken);
|
||||||
|
Continue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// If we got a procedure from the substitution, run it!
|
||||||
if CurToken is TProcedureToken then ExecuteProcedureToken(TProcedureToken(CurToken), AData, ADoc)
|
if CurToken is TProcedureToken then ExecuteProcedureToken(TProcedureToken(CurToken), AData, ADoc)
|
||||||
else ExecuteOperatorToken(TExpressionToken(CurToken), AData, ADoc);
|
else ExecuteOperatorToken(TExpressionToken(CurToken), AData, ADoc);
|
||||||
|
|
||||||
@ -2679,11 +2688,14 @@ begin
|
|||||||
ACurToken.StrValue := SubstituteToken.StrValue;
|
ACurToken.StrValue := SubstituteToken.StrValue;
|
||||||
ACurToken.FloatValue := SubstituteToken.FloatValue;
|
ACurToken.FloatValue := SubstituteToken.FloatValue;
|
||||||
end
|
end
|
||||||
else if SubstituteToken is TProcedureToken then
|
else if (SubstituteToken is TProcedureToken) or
|
||||||
|
(SubstituteToken is TArrayToken) then
|
||||||
begin
|
begin
|
||||||
ACurToken := SubstituteToken;
|
ACurToken := SubstituteToken;
|
||||||
end;
|
end;
|
||||||
if ACurToken.StrValue = '' then raise Exception.Create('[TvEPSVectorialReader.DictionarySubstituteOperator] The Dictionary substitution resulted in an empty value');
|
|
||||||
|
if (not (SubstituteToken is TArrayToken)) and (ACurToken.StrValue = '') then
|
||||||
|
raise Exception.Create('[TvEPSVectorialReader.DictionarySubstituteOperator] The Dictionary substitution resulted in an empty value');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user