Bug 1309397 - Remove nsIPrintOptions::ShowPrintSetupDialog. r=vlad, f=myk

--HG--
extra : rebase_source : 367fd1d95303a78f1d5badfe566d481cf3360fea
This commit is contained in:
Jonathan Watt 2016-10-11 16:32:57 +01:00
Родитель 3fa4643b5e
Коммит 6f4f6ac656
2 изменённых файлов: 0 добавлений и 44 удалений

Просмотреть файл

@ -19,10 +19,6 @@ interface nsIStringEnumerator;
interface nsIPrintOptions : nsISupports
{
/**
* Show Native Print Options dialog, this may not be supported on all platforms
*/
void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings);
};
[scriptable, uuid(5e738fff-404c-4c94-9189-e8f2cce93e94)]

Просмотреть файл

@ -330,46 +330,6 @@ nsPrintOptions::DeserializeToPrintSettings(const PrintData& data,
}
NS_IMETHODIMP
nsPrintOptions::ShowPrintSetupDialog(nsIPrintSettings *aPS)
{
NS_ENSURE_ARG_POINTER(aPS);
nsresult rv;
// create a nsIArray of the parameters
// being passed to the window
nsCOMPtr<nsIMutableArray> array = nsArray::Create();
nsCOMPtr<nsISupports> psSupports = do_QueryInterface(aPS);
NS_ASSERTION(psSupports, "PrintSettings must be a supports");
array->AppendElement(psSupports, /*weak =*/ false);
nsCOMPtr<nsIDialogParamBlock> ioParamBlock =
do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
ioParamBlock->SetInt(0, 0);
nsCOMPtr<nsISupports> blkSupps = do_QueryInterface(ioParamBlock);
NS_ASSERTION(blkSupps, "IOBlk must be a supports");
array->AppendElement(blkSupps, /*weak =*/ false);
nsCOMPtr<nsIWindowWatcher> wwatch =
do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<mozIDOMWindowProxy> parent;
wwatch->GetActiveWindow(getter_AddRefs(parent));
// null |parent| is non-fatal
nsCOMPtr<mozIDOMWindowProxy> newWindow;
return wwatch->OpenWindow(parent,
"chrome://global/content/printPageSetup.xul",
"_blank","chrome,modal,centerscreen", array,
getter_AddRefs(newWindow));
}
/** ---------------------------------------------------
* Helper function - Creates the "prefix" for the pref
* It is either "print."