Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Member Functions
nsPrintOptionsX Class Reference

#include <nsPrintOptionsX.h>

List of all members.

Public Member Functions

 nsPrintOptionsX ()
 

virtual ~nsPrintOptionsX ()
 

NS_IMETHOD ShowPrintSetupDialog (nsIPrintSettings *aThePrintSettings)
 

NS_IMETHOD GetNativeData (PRInt16 aDataType, void **_retval)

Protected Member Functions

nsresult _CreatePrintSettings (nsIPrintSettings **_retval)
 
See documentation in nsPrintOptionsImpl.h
nsresult ReadPrefs (nsIPrintSettings *aPS, const nsAString &aPrinterName, PRUint32 aFlags)
nsresult WritePrefs (nsIPrintSettings *aPS, const nsAString &aPrinterName, PRUint32 aFlags)

Detailed Description

Definition at line 49 of file nsPrintOptionsX.h.


Constructor & Destructor Documentation


Definition at line 54 of file nsPrintOptionsX.cpp.

{
}


Definition at line 60 of file nsPrintOptionsX.cpp.

{
}

Member Function Documentation


See documentation in nsPrintOptionsImpl.h

Definition at line 67 of file nsPrintOptionsX.cpp.

{
  nsresult rv;
  *_retval = nsnull;

  nsPrintSettingsX* printSettings = new nsPrintSettingsX; // does not initially ref count
  NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY);

  NS_ADDREF(*_retval = printSettings); // ref count

  rv = printSettings->Init();
  if (NS_FAILED(rv)) {
    NS_RELEASE(*_retval);
    return rv;
  }

  (void)InitPrintSettingsFromPrefs(*_retval, PR_FALSE,
                                   nsIPrintSettings::kInitSaveAll);
  return rv;
}

Here is the call graph for this function:

NS_IMETHODIMP nsPrintOptionsX::GetNativeData ( PRInt16  aDataType,
void **  _retval 
)

Definition at line 98 of file nsPrintOptionsX.cpp.

{
  NS_ENSURE_ARG_POINTER(_retval);
  *_retval = nsnull;

  return NS_ERROR_NOT_IMPLEMENTED;
}
nsresult nsPrintOptionsX::ReadPrefs ( nsIPrintSettings aPS,
const nsAString &  aPrinterName,
PRUint32  aFlags 
) [protected]

Definition at line 109 of file nsPrintOptionsX.cpp.

{
  nsresult rv;
  
  rv = nsPrintOptions::ReadPrefs(aPS, aPrinterName, aFlags);
  NS_ASSERTION(NS_SUCCEEDED(rv), "nsPrintOptions::ReadPrefs() failed");
  
  nsCOMPtr<nsIPrintSettingsX> printSettingsX(do_QueryInterface(aPS));
  if (!printSettingsX)
    return NS_ERROR_NO_INTERFACE;
  rv = printSettingsX->ReadPageFormatFromPrefs();
  NS_ASSERTION(NS_SUCCEEDED(rv), "nsIPrintSettingsX::ReadPageFormatFromPrefs() failed");
  
  return NS_OK;
}

Here is the call graph for this function:


Definition at line 91 of file nsPrintOptionsX.cpp.

nsresult nsPrintOptionsX::WritePrefs ( nsIPrintSettings aPS,
const nsAString &  aPrinterName,
PRUint32  aFlags 
) [protected]

Definition at line 126 of file nsPrintOptionsX.cpp.

{
  nsresult rv;
  
  rv = nsPrintOptions::WritePrefs(aPS, aPrinterName, aFlags);
  NS_ASSERTION(NS_SUCCEEDED(rv), "nsPrintOptions::WritePrefs() failed");
  
  nsCOMPtr<nsIPrintSettingsX> printSettingsX(do_QueryInterface(aPS));
  if (!printSettingsX)
    return NS_ERROR_NO_INTERFACE;
  rv = printSettingsX->WritePageFormatToPrefs();
  NS_ASSERTION(NS_SUCCEEDED(rv), "nsIPrintSettingsX::WritePageFormatToPrefs() failed");
  
  return NS_OK;
}

Here is the call graph for this function:


The documentation for this class was generated from the following files: