/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// if aWebBrowserPrint is not null then we are printing // so we want to pass back NS_ERROR_ABORT on cancel if (NS_SUCCEEDED(rv)) {
int32_t status;
block->GetInt(0, &status); return status == 0 ? NS_ERROR_ABORT : NS_OK;
}
// We don't call nsPrintSettingsService::MaybeSavePrintSettingsToPrefs here // since it's called for us in printPageSetup.js. Maybe we should move that // call here for consistency with the other platforms though?
// get a parent, if at all possible // (though we'd rather this didn't fail, it's OK if it does. so there's // no failure or null check.) // retain ownership for method lifetime
nsCOMPtr<mozIDOMWindowProxy> activeParent; if (!aParent) {
mWatcher->GetActiveWindow(getter_AddRefs(activeParent));
aParent = activeParent;
}
// create a nsIMutableArray 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);
nsCOMPtr<nsISupports> blkSupps(do_QueryInterface(aParamBlock));
NS_ASSERTION(blkSupps, "IOBlk must be a supports");
array->AppendElement(blkSupps);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.