Browse Source

* Fix bug ID #0035252, eliminate wrong combination of options

git-svn-id: trunk@41798 -
michael 6 years ago
parent
commit
d66e959ad7
1 changed files with 10 additions and 1 deletions
  1. 10 1
      packages/fcl-pdf/src/fppdf.pp

+ 10 - 1
packages/fcl-pdf/src/fppdf.pp

@@ -1026,6 +1026,7 @@ type
     procedure SetFonts(AValue: TPDFFontDefs);
     procedure SetFonts(AValue: TPDFFontDefs);
     procedure SetInfos(AValue: TPDFInfos);
     procedure SetInfos(AValue: TPDFInfos);
     procedure SetLineStyles(AValue: TPDFLineStyleDefs);
     procedure SetLineStyles(AValue: TPDFLineStyleDefs);
+    Procedure SetOptions(aValue : TPDFOptions);
   protected
   protected
     // Create all kinds of things, virtual so they can be overridden to create descendents instead
     // Create all kinds of things, virtual so they can be overridden to create descendents instead
     function CreatePDFPages: TPDFPages; virtual;
     function CreatePDFPages: TPDFPages; virtual;
@@ -1126,7 +1127,7 @@ type
     Property ObjectCount : Integer Read FObjectCount;
     Property ObjectCount : Integer Read FObjectCount;
     Property LineCapStyle: TPDFLineCapStyle Read FLineCapStyle Write FLineCapStyle;
     Property LineCapStyle: TPDFLineCapStyle Read FLineCapStyle Write FLineCapStyle;
   Published
   Published
-    Property Options : TPDFOptions Read FOptions Write FOPtions;
+    Property Options : TPDFOptions Read FOptions Write SetOptions;
     Property LineStyles : TPDFLineStyleDefs Read FLineStyleDefs Write SetLineStyles;
     Property LineStyles : TPDFLineStyleDefs Read FLineStyleDefs Write SetLineStyles;
     property PageLayout: TPDFPageLayout read FPageLayout write FPageLayout default lSingle;
     property PageLayout: TPDFPageLayout read FPageLayout write FPageLayout default lSingle;
     Property Infos : TPDFInfos Read FInfos Write SetInfos;
     Property Infos : TPDFInfos Read FInfos Write SetInfos;
@@ -4488,6 +4489,14 @@ begin
   FInfos.Assign(AValue);
   FInfos.Assign(AValue);
 end;
 end;
 
 
+procedure TPDFDocument.SetOptions(AValue: TPDFOptions);
+begin
+  if FOptions=AValue then Exit;
+  if (poNoEmbeddedFonts in  aValue) then
+    Exclude(aValue,poSubsetFont);
+  FOptions:=aValue;
+end;
+
 procedure TPDFDocument.SetLineStyles(AValue: TPDFLineStyleDefs);
 procedure TPDFDocument.SetLineStyles(AValue: TPDFLineStyleDefs);
 begin
 begin
   if FLineStyleDefs=AValue then Exit;
   if FLineStyleDefs=AValue then Exit;