1) Removes most all the unneeded data from nsPrintOptions service. All data

should be in the PrintSettings.
2) Removed unneeded methods from PrintOptions
3) PrintOption can now read and write (most) all the data in a PrintSettings
   object. The items not saved are those used during the printing process and
   it wouldn't make any sense to save them.
4) Adds a prefs for turning on and off the automatic saving of PrintSettings.
   If this is turned on it is almost the same as using the global PS.
5) On Linux it turns on the saving of PS prefs and turns on the global PS.
   Meaning it will always use a single Global PS object.
6) The PrintSettings can be initialized from a generic non-printer specific
   set of prefs. Then if a printer name is available in the PS then it tries
   to initialize itself from the printer specific prefs. This enables to define
   "back stop" prefs for picking up first. Then the printer specific prefs
   can override those settings.
   For example, we may define in prefs that the default paper size 8.5x11,
   then if if the "save PS prefs" is turned on, for a given printer it might
   save 8.5x16 as the size.
7) A "flags" arg has been added so you can indicate which prefs you want read
   or written.


git-svn-id: svn://10.0.0.236/trunk@116641 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com
2002-03-15 13:55:54 +00:00
parent 53cfe0de8c
commit 58cfbb8ad2
16 changed files with 936 additions and 1345 deletions

View File

@@ -843,18 +843,6 @@ PluginViewerImpl::GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSetting
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute nsIPrintSettings globalPrintSettingsValues; */
NS_IMETHODIMP
PluginViewerImpl::GetGlobalPrintSettingsValues(nsIPrintSettings * *aGlobalPrintSettingsValues)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
PluginViewerImpl::SetGlobalPrintSettingsValues(nsIPrintSettings * aGlobalPrintSettingsValues)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void printPreview (in nsIPrintSettings aThePrintSettings); */
NS_IMETHODIMP
PluginViewerImpl::PrintPreview(nsIPrintSettings *aThePrintSettings)
@@ -890,6 +878,20 @@ PluginViewerImpl::Cancel()
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void initPrintSettingsFromPrefs (in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags); */
NS_IMETHODIMP
PluginViewerImpl::InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void savePrintSettingsToPrefs (in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags); */
NS_IMETHODIMP
PluginViewerImpl::SavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void enumerateDocumentNames (out PRUint32 aCount, [array, size_is (aCount), retval] out wstring aResult); */
NS_IMETHODIMP
PluginViewerImpl::EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult)