mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 06:38:36 +00:00
Bug 275387 Print Preview Scale and orientation not adjusted (stuck on page setup settings) r=mconnor
This commit is contained in:
parent
206838e42b
commit
a489e5ddee
@ -353,6 +353,7 @@
|
||||
if (!settings.shrinkToFit) {
|
||||
settings.shrinkToFit = true;
|
||||
PrintUtils.savePrintSettings(settings);
|
||||
PrintUtils.savePrintPreviewSettings(settings);
|
||||
PrintUtils.printPreview();
|
||||
}
|
||||
return;
|
||||
@ -374,6 +375,7 @@
|
||||
settings.shrinkToFit = false;
|
||||
settings.scaling = aValue;
|
||||
PrintUtils.savePrintSettings(settings);
|
||||
PrintUtils.savePrintPreviewSettings(settings);
|
||||
PrintUtils.printPreview();
|
||||
]]>
|
||||
</body>
|
||||
@ -402,6 +404,7 @@
|
||||
var settings = print.currentPrintSettings;
|
||||
settings.orientation = orientValue;
|
||||
PrintUtils.savePrintSettings(settings);
|
||||
PrintUtils.savePrintPreviewSettings(settings);
|
||||
PrintUtils.printPreview();
|
||||
]]>
|
||||
</body>
|
||||
|
@ -138,6 +138,17 @@ var PrintUtils = {
|
||||
}
|
||||
},
|
||||
|
||||
savePrintPreviewSettings: function (aPrintSettings)
|
||||
{
|
||||
// XXX this ignore gPrintSettingsAreGlobal and gSavePrintSettings
|
||||
var PSSVC = Components.classes["@mozilla.org/gfx/printsettings-service;1"]
|
||||
.getService(Components.interfaces.nsIPrintSettingsService);
|
||||
var flags = aPrintSettings.kInitSaveShrinkToFit |
|
||||
aPrintSettings.kInitSaveScaling |
|
||||
aPrintSettings.kInitSaveOrientation;
|
||||
PSSVC.savePrintSettingsToPrefs(aPrintSettings, true, flags);
|
||||
},
|
||||
|
||||
////////////////////////////////////////
|
||||
// "private" methods. Don't use them. //
|
||||
////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user