Bladeren bron

* Merging revisions 43787,r43798,r43799,r43800,r43806,r43807,r43836 from trunk:
------------------------------------------------------------------------
r43787 | michael | 2019-12-25 14:56:23 +0100 (Wed, 25 Dec 2019) | 1 line

* Remove some unused identifiers
------------------------------------------------------------------------
r43798 | michael | 2019-12-27 12:02:30 +0100 (Fri, 27 Dec 2019) | 1 line

* Fix bug ID #36484: macos forbids loading unversioned library
------------------------------------------------------------------------
r43799 | michael | 2019-12-27 12:08:52 +0100 (Fri, 27 Dec 2019) | 1 line

* Fix bug #36478: add array of category names
------------------------------------------------------------------------
r43800 | michael | 2019-12-27 23:09:52 +0100 (Fri, 27 Dec 2019) | 1 line

* Fix recno
------------------------------------------------------------------------
r43806 | michael | 2019-12-28 22:21:13 +0100 (Sat, 28 Dec 2019) | 1 line

* Search with Postscript font name and humanreadable font name
------------------------------------------------------------------------
r43807 | michael | 2019-12-28 22:21:45 +0100 (Sat, 28 Dec 2019) | 1 line

* Set default font to postscript name
------------------------------------------------------------------------
r43836 | michael | 2020-01-02 15:10:29 +0100 (Thu, 02 Jan 2020) | 1 line

* Fix bug #0036503
------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@43989 -

michael 5 jaren geleden
bovenliggende
commit
57026e8804

+ 1 - 2
packages/fcl-base/src/maskutils.pp

@@ -27,7 +27,7 @@ unit MaskUtils;
 interface
 
 uses
-  Classes, SysUtils;
+  SysUtils;
 
 
 function FormatMaskText(const EditMask: string; const AValue: string): string;
@@ -107,7 +107,6 @@ type
 implementation
 
 resourcestring
-  exInvalidMaskValue = 'FormatMaskText function failed!';
   exValidationFailed = 'TMaskUtils.ValidateInput failed.';
 
 const

+ 2 - 2
packages/fcl-report/demos/rptexpressions.pp

@@ -206,7 +206,7 @@ begin
   Memo.Layout.Top := 2;
   Memo.Layout.Width := 25;
   Memo.Layout.Height := 5;
-  Memo.Text := '[2 + RecNo - 6]';
+  Memo.Text := '[2 + RecNo('''') - 6]';
   Memo.Options := [moHideZeros];
 
   Memo := TFPReportMemo.Create(DataBand);
@@ -214,7 +214,7 @@ begin
   Memo.Layout.Top := 2;
   Memo.Layout.Width := 25;
   Memo.Layout.Height := 5;
-  Memo.Text := 'RecNo = [RecNo].';
+  Memo.Text := 'RecNo = [RecNo('''')].';
 
   PageFooter := TFPReportPageFooterBand.Create(p);
   PageFooter.Layout.Height := 20;

+ 4 - 1
packages/fcl-report/src/fpreport.pp

@@ -2343,11 +2343,14 @@ Function ReportExportManager : TFPReportExportManager;
 { this should probably be more configurable or flexible per platform }
 
 Const
+
+  { Note, these are the postscript names, not the human-readable ones. }
+
 {$IFDEF UNIX}
   cDefaultFont = 'LiberationSans';
 {$ELSE}
 {$IFDEF WINDOWS}
-  cDefaultFont = 'Arial';
+  cDefaultFont = 'ArialMT';
 {$ELSE}
   cDefaultFont = 'Helvetica';
 {$ENDIF}

+ 6 - 2
packages/fcl-report/src/fpreportpdfexport.pp

@@ -126,8 +126,12 @@ begin
       fnt := gTTFontCache.Find(AFontName); // we are doing a PostScript Name lookup (it contains Bold, Italic info)
       if Assigned(fnt) then
         Result := Document.AddFont(fnt.FileName, AFontName)
-      else
-        raise Exception.CreateFmt('fpreport: Could not find the font <%s> in the font cache.', [AFontName]);
+      else 
+        begin
+        fnt:=gTTFontCache.FindFont(AFontName);
+        if fnt=Nil then
+          raise Exception.CreateFmt('fpreport: Could not find the font <%s> in the font cache.', [AFontName]);
+        end;
     end;
   end;
 end;

+ 2 - 2
packages/fcl-report/test/tcbasereport.pp

@@ -3438,7 +3438,7 @@ begin
   FMemo.UseParentFont := False;
   FMemo.Font.Name := 'Calibri';
   FMemo.StretchMode := smActualHeight;
-  TMemoFriend(FMemo).WordWrapOverflow:=wwoOverflow;
+  TMemoFriend(FMemo).WordOverflow:=woOverflow;
   TMemoFriend(FMemo).CreateRTLayout;
   TMemoFriend(FMemo).RecalcLayout;
   AssertEquals('Failed on 1', 1, FMemo.TextLines.Count);
@@ -3456,7 +3456,7 @@ begin
   FMemo.UseParentFont := False;
   FMemo.Font.Name := 'Calibri';
   FMemo.StretchMode := smActualHeight;
-  TMemoFriend(FMemo).WordWrapOverflow:=wwoSplit;
+  TMemoFriend(FMemo).WordOverflow:=woSplit;
   TMemoFriend(FMemo).CreateRTLayout;
   TMemoFriend(FMemo).RecalcLayout;
   AssertEquals('Failed on 1', 2, FMemo.TextLines.Count);

+ 5 - 1
packages/openssl/src/openssl.pas

@@ -109,7 +109,7 @@ var
   { ADD NEW ONES WHEN THEY APPEAR!
     Always make .so/dylib first, then versions, in descending order!
     Add "." .before the version, first is always just "" }
-  DLLVersions: array[1..16] of string = ('', '.1.0.6', '.1.0.5', '.1.0.4', '.1.0.3',
+  DLLVersions: array[1..17] of string = ('', '.1.1', '.1.0.6', '.1.0.5', '.1.0.4', '.1.0.3',
                                         '.1.0.2', '.1.0.1','.1.0.0','.0.9.8',
                                         '.0.9.7', '.0.9.6', '.0.9.5', '.0.9.4',
                                         '.0.9.3', '.0.9.2', '.0.9.1');
@@ -5623,6 +5623,10 @@ Function LoadLibraries : Boolean;
 
 begin
   Result:=False;
+{$IFDEF DARWIN}  
+  // Mac OS no longer allows you to load the unversioned one. Bug ID 36484.
+  DLLVERSIONS[1]:=DLLVERSIONS[2];
+{$ENDIF}
   SSLUtilHandle := LoadLib(DLLUtilName);
   SSLLibHandle := LoadLib(DLLSSLName);
   {$IFDEF MSWINDOWS}

+ 35 - 0
rtl/objpas/unicodedata.pas

@@ -180,6 +180,41 @@ const
     UGC_Surrogate               = 27;
     UGC_PrivateUse              = 28;
     UGC_Unassigned              = 29;
+    
+// Names
+
+  UnicodeCategoryNames: array[0..29] of string[2] = (
+    'Lu',
+    'Ll',
+    'Lt',
+    'Lm',
+    'Lo',
+    'Mn',
+    'Mc',
+    'Me',
+    'Nd',
+    'Nl',
+    'No',
+    'Pc',
+    'Pd',
+    'Ps',
+    'Pe',
+    'Pi',
+    'Pf',
+    'Po',
+    'Sm',
+    'Sc',
+    'Sk',
+    'So',
+    'Zs',
+    'Zl',
+    'Zp',
+    'Cc',
+    'Cf',
+    'Cs',
+    'Co',
+    'Cn'
+    );
 
 type