From d03b31a2da2446436f3819d8d737c51f1abf20bf Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Sun, 11 Jul 2021 18:36:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20Assign(ErrOutput)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 ++-- Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/CompilationSamples/GraphWPF.pas | 6 ++++++ TestSuite/CompilationSamples/PABCSystem.pas | 4 +++- bin/Lib/GraphWPF.pas | 6 ++++++ bin/Lib/PABCSystem.pas | 4 +++- 8 files changed, 23 insertions(+), 7 deletions(-) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 5bad82d25..36594fba8 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "8"; public const string Build = "0"; - public const string Revision = "2931"; + public const string Revision = "2932"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 9ab7a9cc7..1d054bb10 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=8 -%REVISION%=2931 %COREVERSION%=0 +%REVISION%=2932 +%MINOR%=8 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 3e3a1420b..fe373a926 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.8.0.2931 +3.8.0.2932 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 022a4657b..27853004b 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.8.0.2931' +!define VERSION '3.8.0.2932' diff --git a/TestSuite/CompilationSamples/GraphWPF.pas b/TestSuite/CompilationSamples/GraphWPF.pas index da3517232..4726941df 100644 --- a/TestSuite/CompilationSamples/GraphWPF.pas +++ b/TestSuite/CompilationSamples/GraphWPF.pas @@ -703,6 +703,7 @@ function TextHeightPFont(text: string; f: FontOptions): real; /// Размер текста (совместно с FastDraw) function TextSizePFont(text: string; f: FontOptions): Size; +procedure AddToHost(v: Visual); {function GetDC: DrawingContext; procedure ReleaseDC(dc: DrawingContext); @@ -789,6 +790,11 @@ var GlobalScale := 1.0; CurrentCoordType: CoordType := StandardCoords; +procedure AddToHost(v: Visual); +begin + Host.children.Add(v); +end; + function GetDC: DrawingContext; begin var visual := new DrawingVisual(); diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index a5c7e6809..f054590fb 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -7062,7 +7062,7 @@ begin on e: Exception do raise e; end; - if f = output then + if (f = output) or (f = ErrOutput) then f.sw := new StreamWriter(f.fi.FullName); if f = input then begin @@ -14018,6 +14018,8 @@ procedure __FinalizeModule__; begin if (output.sw <> nil) and (output.sw is StreamWriter) and ((output.sw as StreamWriter).BaseStream <> nil) then output.sw.Close; + if (ErrOutput.sw <> nil) and (ErrOutput.sw is StreamWriter) and ((ErrOutput.sw as StreamWriter).BaseStream <> nil) then + ErrOutput.sw.Close; if (input.sr <> nil) and (input.sr.BaseStream <> nil) then input.sr.Close; end; diff --git a/bin/Lib/GraphWPF.pas b/bin/Lib/GraphWPF.pas index ac3ac902b..29974f55b 100644 --- a/bin/Lib/GraphWPF.pas +++ b/bin/Lib/GraphWPF.pas @@ -703,6 +703,7 @@ function TextHeightPFont(text: string; f: FontOptions): real; /// Размер текста (совместно с FastDraw) function TextSizePFont(text: string; f: FontOptions): Size; +procedure AddToHost(v: Visual); {function GetDC: DrawingContext; procedure ReleaseDC(dc: DrawingContext); @@ -789,6 +790,11 @@ var GlobalScale := 1.0; CurrentCoordType: CoordType := StandardCoords; +procedure AddToHost(v: Visual); +begin + Host.children.Add(v); +end; + function GetDC: DrawingContext; begin var visual := new DrawingVisual(); diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index a5c7e6809..f054590fb 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -7062,7 +7062,7 @@ begin on e: Exception do raise e; end; - if f = output then + if (f = output) or (f = ErrOutput) then f.sw := new StreamWriter(f.fi.FullName); if f = input then begin @@ -14018,6 +14018,8 @@ procedure __FinalizeModule__; begin if (output.sw <> nil) and (output.sw is StreamWriter) and ((output.sw as StreamWriter).BaseStream <> nil) then output.sw.Close; + if (ErrOutput.sw <> nil) and (ErrOutput.sw is StreamWriter) and ((ErrOutput.sw as StreamWriter).BaseStream <> nil) then + ErrOutput.sw.Close; if (input.sr <> nil) and (input.sr.BaseStream <> nil) then input.sr.Close; end;