mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 13:20:18 +02:00
TAChart: Extend TDatapointTool.AffectedSeries to accept also semicolon and pipe ('|') as separators.
git-svn-id: trunk@58768 -
This commit is contained in:
parent
75cdabf306
commit
63c26a35ae
@ -236,7 +236,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// An ordered set of integers represented as a comma-separated string
|
// An ordered set of integers represented as a comma-separated string
|
||||||
// for publushing as a single property.
|
// for publishing as a single property.
|
||||||
TPublishedIntegerSet = object
|
TPublishedIntegerSet = object
|
||||||
strict private
|
strict private
|
||||||
FAllSet: Boolean;
|
FAllSet: Boolean;
|
||||||
@ -985,7 +985,15 @@ begin
|
|||||||
if AllSet then exit;
|
if AllSet then exit;
|
||||||
sl := TStringList.Create;
|
sl := TStringList.Create;
|
||||||
try
|
try
|
||||||
sl.CommaText := AValue;
|
if pos(',', AValue) > 0 then
|
||||||
|
sl.CommaText := AValue
|
||||||
|
else if pos(';', AValue) > 0 then begin
|
||||||
|
sl.Delimiter := ';';
|
||||||
|
sl.DelimitedText := AValue;
|
||||||
|
end else if pos('|', AValue) > 0 then begin
|
||||||
|
sl.Delimiter := '|';
|
||||||
|
sl.DelimitedText := AValue;
|
||||||
|
end;
|
||||||
SetLength(FData, sl.Count);
|
SetLength(FData, sl.Count);
|
||||||
i := 0;
|
i := 0;
|
||||||
for s in sl do
|
for s in sl do
|
||||||
|
@ -445,6 +445,10 @@ begin
|
|||||||
AssertTrue(FISet.AllSet);
|
AssertTrue(FISet.AllSet);
|
||||||
FISet.AsString := '+';
|
FISet.AsString := '+';
|
||||||
AssertEquals(PUB_INT_SET_EMPTY, FISet.AsString);
|
AssertEquals(PUB_INT_SET_EMPTY, FISet.AsString);
|
||||||
|
FISet.AsString := '3 ;1;; 2';
|
||||||
|
AssertEquals('3,1,2', FISet.AsString);
|
||||||
|
FISet.AsString := '3|1||2';
|
||||||
|
AssertEquals('3,1,2', FISet.AsString);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPublishedIntegerSetTest.TestIsSet;
|
procedure TPublishedIntegerSetTest.TestIsSet;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<Version Value="9"/>
|
<Version Value="11"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<General>
|
<General>
|
||||||
<Flags>
|
<Flags>
|
||||||
@ -18,7 +18,6 @@
|
|||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<Language Value=""/>
|
<Language Value=""/>
|
||||||
<CharSet Value=""/>
|
<CharSet Value=""/>
|
||||||
<StringTable ProductVersion=""/>
|
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<BuildModes Count="1">
|
<BuildModes Count="1">
|
||||||
<Item1 Name="default" Default="True"/>
|
<Item1 Name="default" Default="True"/>
|
||||||
@ -30,9 +29,10 @@
|
|||||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||||
</PublishOptions>
|
</PublishOptions>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<local>
|
<FormatVersion Value="2"/>
|
||||||
<FormatVersion Value="1"/>
|
<Modes Count="1">
|
||||||
</local>
|
<Mode0 Name="default"/>
|
||||||
|
</Modes>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<RequiredPackages Count="1">
|
<RequiredPackages Count="1">
|
||||||
<Item1>
|
<Item1>
|
||||||
@ -43,27 +43,22 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="test.lpr"/>
|
<Filename Value="test.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="test"/>
|
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="UtilsTest.pas"/>
|
<Filename Value="UtilsTest.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="UtilsTest"/>
|
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="SourcesTest.pas"/>
|
<Filename Value="SourcesTest.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="SourcesTest"/>
|
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="AssertHelpers.pas"/>
|
<Filename Value="AssertHelpers.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="AssertHelpers"/>
|
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="DbTest.pas"/>
|
<Filename Value="DbTest.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="DbTest"/>
|
|
||||||
</Unit4>
|
</Unit4>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
@ -88,12 +83,6 @@
|
|||||||
<OverflowChecks Value="True"/>
|
<OverflowChecks Value="True"/>
|
||||||
</Checks>
|
</Checks>
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Other>
|
|
||||||
<CompilerMessages>
|
|
||||||
<UseMsgFile Value="True"/>
|
|
||||||
</CompilerMessages>
|
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
|
||||||
</Other>
|
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<Exceptions Count="4">
|
<Exceptions Count="4">
|
||||||
|
Loading…
Reference in New Issue
Block a user