mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1091112 - Serialize nsIPrintSettings options bitfield. r=jimm
This commit is contained in:
parent
0e7edc78fc
commit
eb9cc06bce
@ -72,6 +72,7 @@ struct PrintData {
|
||||
bool isInitializedFromPrinter;
|
||||
bool isInitializedFromPrefs;
|
||||
bool persistMarginBoxSettings;
|
||||
int32_t optionFlags;
|
||||
|
||||
/* Windows-specific things */
|
||||
nsString driverName;
|
||||
|
@ -22,7 +22,7 @@ interface nsIPrintSession;
|
||||
/**
|
||||
* Simplified graphics interface for JS rendering.
|
||||
*/
|
||||
[scriptable, uuid(1bcfc611-8941-4c39-9e06-7116e564a1ce)]
|
||||
[scriptable, uuid(11b86b46-12c9-4e63-8023-129dd239ace7)]
|
||||
|
||||
interface nsIPrintSettings : nsISupports
|
||||
{
|
||||
@ -137,10 +137,15 @@ interface nsIPrintSettings : nsISupports
|
||||
boolean GetPrintOptions(in int32_t aType);
|
||||
|
||||
/**
|
||||
* Set PrintOptions Bit field
|
||||
* Get PrintOptions Bit field
|
||||
*/
|
||||
int32_t GetPrintOptionsBits();
|
||||
|
||||
/**
|
||||
* Set PrintOptions Bit field
|
||||
*/
|
||||
void SetPrintOptionsBits(in int32_t bits);
|
||||
|
||||
/**
|
||||
* Get the page size in twips, considering the
|
||||
* orientation (portrait or landscape).
|
||||
|
@ -223,6 +223,8 @@ nsPrintOptions::SerializeToPrintData(nsIPrintSettings* aSettings,
|
||||
aSettings->GetIsInitializedFromPrefs(&data->isInitializedFromPrefs());
|
||||
aSettings->GetPersistMarginBoxSettings(&data->persistMarginBoxSettings());
|
||||
|
||||
aSettings->GetPrintOptionsBits(&data->optionFlags());
|
||||
|
||||
// Initialize the platform-specific values that don't
|
||||
// default-initialize, so that we don't send uninitialized data over
|
||||
// IPC (which leads to valgrind warnings, and, for bools, fatal
|
||||
@ -324,6 +326,8 @@ nsPrintOptions::DeserializeToPrintSettings(const PrintData& data,
|
||||
settings->SetIsInitializedFromPrefs(data.isInitializedFromPrefs());
|
||||
settings->SetPersistMarginBoxSettings(data.persistMarginBoxSettings());
|
||||
|
||||
settings->SetPrintOptionsBits(data.optionFlags());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -693,7 +693,7 @@ nsPrintSettings::SetPrintOptions(int32_t aType, bool aTurnOnOff)
|
||||
* See documentation in nsPrintSettingsImpl.h
|
||||
* @update 1/12/01 rods
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
NS_IMETHODIMP
|
||||
nsPrintSettings::GetPrintOptionsBits(int32_t *aBits)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aBits);
|
||||
@ -701,6 +701,13 @@ nsPrintSettings::GetPrintOptionsBits(int32_t *aBits)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintSettings::SetPrintOptionsBits(int32_t aBits)
|
||||
{
|
||||
mPrintOptions = aBits;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* attribute wstring docTitle; */
|
||||
nsresult
|
||||
nsPrintSettings::GetMarginStrs(char16_t * *aTitle,
|
||||
|
Loading…
Reference in New Issue
Block a user