mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-03 04:27:43 +01:00
Change cef_pdf_print_settings_t custom margins from double to int (fixes issue #2694)
This commit is contained in:
parent
ec0c57d0e1
commit
e876217e24
@ -2430,13 +2430,13 @@ typedef struct _cef_pdf_print_settings_t {
|
||||
int scale_factor;
|
||||
|
||||
///
|
||||
// Margins in millimeters. Only used if |margin_type| is set to
|
||||
// Margins in points. Only used if |margin_type| is set to
|
||||
// PDF_PRINT_MARGIN_CUSTOM.
|
||||
///
|
||||
double margin_top;
|
||||
double margin_right;
|
||||
double margin_bottom;
|
||||
double margin_left;
|
||||
int margin_top;
|
||||
int margin_right;
|
||||
int margin_bottom;
|
||||
int margin_left;
|
||||
|
||||
///
|
||||
// Margin type.
|
||||
|
@ -116,10 +116,10 @@ void FillInDictionaryFromPdfPrintSettings(
|
||||
print_settings.SetInteger(kSettingMarginsType, margin_type);
|
||||
if (margin_type == CUSTOM_MARGINS) {
|
||||
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
|
||||
dict->SetDouble(kSettingMarginTop, pdf_settings.margin_top);
|
||||
dict->SetDouble(kSettingMarginRight, pdf_settings.margin_right);
|
||||
dict->SetDouble(kSettingMarginBottom, pdf_settings.margin_bottom);
|
||||
dict->SetDouble(kSettingMarginLeft, pdf_settings.margin_left);
|
||||
dict->SetInteger(kSettingMarginTop, pdf_settings.margin_top);
|
||||
dict->SetInteger(kSettingMarginRight, pdf_settings.margin_right);
|
||||
dict->SetInteger(kSettingMarginBottom, pdf_settings.margin_bottom);
|
||||
dict->SetInteger(kSettingMarginLeft, pdf_settings.margin_left);
|
||||
print_settings.Set(kSettingMarginsCustom, std::move(dict));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user