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;
|
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.
|
// PDF_PRINT_MARGIN_CUSTOM.
|
||||||
///
|
///
|
||||||
double margin_top;
|
int margin_top;
|
||||||
double margin_right;
|
int margin_right;
|
||||||
double margin_bottom;
|
int margin_bottom;
|
||||||
double margin_left;
|
int margin_left;
|
||||||
|
|
||||||
///
|
///
|
||||||
// Margin type.
|
// Margin type.
|
||||||
|
|
|
@ -116,10 +116,10 @@ void FillInDictionaryFromPdfPrintSettings(
|
||||||
print_settings.SetInteger(kSettingMarginsType, margin_type);
|
print_settings.SetInteger(kSettingMarginsType, margin_type);
|
||||||
if (margin_type == CUSTOM_MARGINS) {
|
if (margin_type == CUSTOM_MARGINS) {
|
||||||
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
|
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
|
||||||
dict->SetDouble(kSettingMarginTop, pdf_settings.margin_top);
|
dict->SetInteger(kSettingMarginTop, pdf_settings.margin_top);
|
||||||
dict->SetDouble(kSettingMarginRight, pdf_settings.margin_right);
|
dict->SetInteger(kSettingMarginRight, pdf_settings.margin_right);
|
||||||
dict->SetDouble(kSettingMarginBottom, pdf_settings.margin_bottom);
|
dict->SetInteger(kSettingMarginBottom, pdf_settings.margin_bottom);
|
||||||
dict->SetDouble(kSettingMarginLeft, pdf_settings.margin_left);
|
dict->SetInteger(kSettingMarginLeft, pdf_settings.margin_left);
|
||||||
print_settings.Set(kSettingMarginsCustom, std::move(dict));
|
print_settings.Set(kSettingMarginsCustom, std::move(dict));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue