This fixes the NS_PRINTING configure option which got broken at some point. b=308629 r/sr=jst@mozilla.org

This commit is contained in:
dougt%meer.net 2005-09-16 02:25:37 +00:00
parent 2f303ef684
commit 4435542681
14 changed files with 125 additions and 79 deletions

View File

@ -137,6 +137,7 @@ MOZ_PROFILESHARING = @MOZ_PROFILESHARING@
MOZ_PROFILELOCKING = @MOZ_PROFILELOCKING@
MOZ_STORAGE = @MOZ_STORAGE@
MOZ_NO_XPCOM_OBSOLETE = @MOZ_NO_XPCOM_OBSOLETE@
NS_PRINTING = @NS_PRINTING@
MOZ_ENABLE_JAVAXPCOM = @MOZ_ENABLE_JAVAXPCOM@
JAVA_INCLUDE_PATH=@JAVA_INCLUDE_PATH@

View File

@ -4002,6 +4002,7 @@ MOZ_XPFE_COMPONENTS=1
MOZ_XPINSTALL=1
MOZ_XTF=1
MOZ_XUL=1
NS_PRINTING=1
NECKO_COOKIES=1
NECKO_DISK_CACHE=1
NECKO_PROTOCOLS_DEFAULT="about data file ftp gopher http keyword res viewsource"
@ -4096,6 +4097,7 @@ minimo)
NECKO_PROTOCOLS_DEFAULT=="about data http file res jar"
NECKO_SMALL_BUFFERS=1
NS_DISABLE_LOGGING=1
NS_PRINTING=
;;
mail)
@ -4671,6 +4673,19 @@ if test "$MOZ_JSLOADER"; then
AC_DEFINE(MOZ_JSLOADER)
fi
dnl ========================================================
dnl Disable printing
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(printing,
[ --disable-printing Disable printing support],
NS_PRINTING=,
NS_PRINTING=1 )
if test "$NS_PRINTING"; then
AC_DEFINE(NS_PRINTING)
AC_DEFINE(NS_PRINT_PREVIEW)
fi
dnl ========================================================
dnl use native unicode converters
dnl ========================================================
@ -6675,6 +6690,7 @@ AC_SUBST(LDAP_CFLAGS)
AC_SUBST(LDAP_LIBS)
AC_SUBST(LIBICONV)
AC_SUBST(MOZ_STORAGE)
AC_SUBST(NS_PRINTING)
AC_SUBST(MOZ_ENABLE_JAVAXPCOM)
AC_SUBST(JAVA_INCLUDE_PATH)
@ -6916,8 +6932,6 @@ fi
AC_SUBST(MOZ_MOVEMAIL)
AC_DEFINE(JS_THREADSAFE)
AC_DEFINE(NS_PRINT_PREVIEW)
AC_DEFINE(NS_PRINTING)
if test "$MOZ_DEBUG"; then
AC_DEFINE(MOZ_REFLOW_PERF)

View File

@ -74,7 +74,6 @@
#include "nsIBaseWindow.h"
#include "nsICharsetConverterManager.h"
#include "nsIContent.h"
#include "nsIWebBrowserPrint.h"
#include "nsIContentViewerEdit.h"
#include "nsIDocShell.h"
#include "nsIDocShellLoadInfo.h"
@ -144,8 +143,11 @@
#include "plbase64.h"
#ifdef NS_PRINTING
#include "nsIPrintSettings.h"
#include "nsIPrintSettingsService.h"
#include "nsIWebBrowserPrint.h"
#endif
#include "nsWindowRoot.h"
#include "nsNetCID.h"
@ -3501,6 +3503,7 @@ nsGlobalWindow::Stop()
NS_IMETHODIMP
nsGlobalWindow::Print()
{
#ifdef NS_PRINTING
FORWARD_TO_OUTER(Print, (), NS_ERROR_NOT_INITIALIZED);
nsCOMPtr<nsIWebBrowserPrint> webBrowserPrint;
@ -3550,6 +3553,9 @@ nsGlobalWindow::Print()
}
return NS_OK;
#else
return NS_ERROR_NOT_AVAILABLE;
#endif
}
NS_IMETHODIMP
@ -5485,6 +5491,7 @@ nsGlobalWindow::GetInterface(const nsIID & aIID, void **aSink)
}
}
}
#ifdef NS_PRINTING
else if (aIID.Equals(NS_GET_IID(nsIWebBrowserPrint))) {
FORWARD_TO_OUTER(GetInterface, (aIID, aSink), NS_ERROR_NOT_INITIALIZED);
@ -5500,6 +5507,7 @@ nsGlobalWindow::GetInterface(const nsIID & aIID, void **aSink)
}
}
}
#endif
else if (aIID.Equals(NS_GET_IID(nsIScriptEventManager))) {
nsCOMPtr<nsIDocument> doc(do_QueryInterface(mDocument));
if (doc) {

View File

@ -61,13 +61,16 @@
#include "nsIWebBrowserPersist.h"
#include "nsIClipboardCommands.h"
#include "nsIProfile.h"
#include "nsIPrintOptions.h"
#include "nsIWebBrowserPrint.h"
#include "nsIWidget.h"
#include "nsIWebBrowserFocus.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsIComponentRegistrar.h"
#ifdef NS_PRINTING
#include "nsIPrintOptions.h"
#include "nsIWebBrowserPrint.h"
#endif
#include "nsIDOMWindow.h"
#include "nsIDOMHTMLAnchorElement.h"
#include "nsIDOMNSDocument.h"
@ -89,6 +92,7 @@ static HANDLE s_hHackedNonReentrancy = NULL;
static NS_DEFINE_CID(kPromptServiceCID, NS_PROMPTSERVICE_CID);
static NS_DEFINE_CID(kHelperAppLauncherDialogCID, NS_HELPERAPPLAUNCHERDIALOG_CID);
#ifdef NS_PRINTING
class PrintListener : public nsIWebProgressListener
{
PRBool mComplete;
@ -101,6 +105,7 @@ public:
void WaitForComplete();
};
#endif
class SimpleDirectoryProvider :
public nsIDirectoryServiceProvider
@ -566,6 +571,7 @@ LRESULT CMozillaBrowser::OnPageSetup(WORD wNotifyCode, WORD wID, HWND hWndCtl, B
NG_TRACE_METHOD(CMozillaBrowser::OnPageSetup);
#ifdef NS_PRINTING
nsCOMPtr<nsIWebBrowserPrint> print(do_GetInterface(mWebBrowser));
nsCOMPtr<nsIPrintSettings> printSettings;
if(!print ||
@ -577,6 +583,7 @@ LRESULT CMozillaBrowser::OnPageSetup(WORD wNotifyCode, WORD wID, HWND hWndCtl, B
// show the page setup dialog
CPageSetupDlg dlg(printSettings);
dlg.DoModal();
#endif
return 0;
}
@ -1482,6 +1489,7 @@ HRESULT CMozillaBrowser::UnloadBrowserHelpers()
// Print document
HRESULT CMozillaBrowser::PrintDocument(BOOL promptUser)
{
#ifdef NS_PRINTING
// Print the contents
nsCOMPtr<nsIWebBrowserPrint> browserAsPrint = do_GetInterface(mWebBrowser);
NS_ASSERTION(browserAsPrint, "No nsIWebBrowserPrint!");
@ -1516,7 +1524,7 @@ HRESULT CMozillaBrowser::PrintDocument(BOOL promptUser)
printSettings->SetPrintSilent(oldPrintSilent);
}
mPrefBranch->SetBoolPref(kShowPrintProgressPref, oldShowPrintProgress);
#endif
return S_OK;
}
@ -2057,6 +2065,8 @@ NS_IMETHODIMP SimpleDirectoryProvider::GetFile(const char *prop, PRBool *persist
// PrintListener implementation
#ifdef NS_PRINTING
NS_IMPL_ISUPPORTS1(PrintListener, nsIWebProgressListener)
PrintListener::PrintListener() : mComplete(PR_FALSE)
@ -2138,3 +2148,4 @@ NS_IMETHODIMP PrintListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIR
{
return NS_OK;
}
#endif

View File

@ -87,7 +87,6 @@ SDK_XPIDLSRCS = \
nsIWebBrowserChrome.idl \
nsIWebBrowserChromeFocus.idl \
nsIWebBrowserFocus.idl \
nsIWebBrowserPrint.idl \
nsIWebBrowserSetup.idl \
nsIWebBrowserStream.idl \
$(NULL)
@ -97,19 +96,22 @@ XPIDLSRCS = \
nsICommandHandler.idl \
nsIEmbeddingSiteWindow2.idl \
nsIContextMenuListener2.idl \
nsIPrintingPrompt.idl \
nsIPrintingPromptService.idl \
$(NULL)
CPPSRCS = \
nsDocShellTreeOwner.cpp \
nsWebBrowser.cpp \
nsCommandHandler.cpp \
nsWebBrowserContentPolicy.cpp \
nsWebBrowserContentPolicy.cpp \
nsContextMenuInfo.cpp \
nsEmbedStream.cpp \
$(NULL)
ifdef NS_PRINTING
SDK_XPIDLSRCS += nsIWebBrowserPrint.idl
XPIDLSRCS += nsIPrintingPrompt.idl nsIPrintingPromptService.idl
endif
# we don't want the shared lib, but we want to force the creation of a
# static lib.
FORCE_STATIC_LIB = 1

View File

@ -71,7 +71,6 @@
#include "nsIURI.h"
#include "nsIWebBrowserPersist.h"
#include "nsCWebBrowserPersist.h"
#include "nsIWebBrowserPrint.h"
#include "nsIServiceManager.h"
// for painting the background window
@ -80,7 +79,10 @@
#include "nsILookAndFeel.h"
// Printing Includes
#ifdef NS_PRINTING
#include "nsIWebBrowserPrint.h"
#include "nsIContentViewer.h"
#endif
// PSM2 includes
#include "nsISecureBrowserUI.h"
@ -208,20 +210,22 @@ NS_IMETHODIMP nsWebBrowser::GetInterface(const nsIID& aIID, void** aSink)
#endif
if (mDocShell) {
#ifdef NS_PRINTING
if (aIID.Equals(NS_GET_IID(nsIWebBrowserPrint))) {
nsCOMPtr<nsIContentViewer> viewer;
mDocShell->GetContentViewer(getter_AddRefs(viewer));
if (viewer) {
nsCOMPtr<nsIWebBrowserPrint> webBrowserPrint(do_QueryInterface(viewer));
nsIWebBrowserPrint* print = (nsIWebBrowserPrint*)webBrowserPrint.get();
NS_ASSERTION(print, "This MUST support this interface!");
NS_ADDREF(print);
*aSink = print;
return NS_OK;
}
} else {
return mDocShellAsReq->GetInterface(aIID, aSink);
if (!viewer)
return NS_NOINTERFACE;
nsCOMPtr<nsIWebBrowserPrint> webBrowserPrint(do_QueryInterface(viewer));
nsIWebBrowserPrint* print = (nsIWebBrowserPrint*)webBrowserPrint.get();
NS_ASSERTION(print, "This MUST support this interface!");
NS_ADDREF(print);
*aSink = print;
return NS_OK;
}
#endif
return mDocShellAsReq->GetInterface(aIID, aSink);
}
return NS_NOINTERFACE;

View File

@ -48,10 +48,12 @@ include $(DEPTH)/config/autoconf.mk
DIRS = windowwatcher appstartup find webbrowserpersist commandhandler ui jsconsole
ifdef MOZ_XUL
ifdef NS_PRINTING
ifndef WINCE
DIRS += printingui
endif
endif
endif
ifdef MOZ_PROFILESHARING
DIRS += profilesharingsetup

View File

@ -100,11 +100,13 @@ SHARED_LIBRARY_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)jsconsole_s.$(LIB_SUFFIX) \
$(NULL)
ifdef NS_PRINTING
ifndef WINCE
SHARED_LIBRARY_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)printingui_s.$(LIB_SUFFIX) \
$(NULL)
endif
endif
endif

View File

@ -48,14 +48,18 @@
#include "nsControllerCommandTable.h"
#include "nsCommandParams.h"
#include "nsCommandGroup.h"
#ifndef WINCE
#include "nsPrintingPromptService.h"
#endif
#include "nsBaseCommandController.h"
#include "nsPrompt.h"
#include "nsNetCID.h"
#include "nsEmbedCID.h"
#ifdef NS_PRINTING
#ifndef WINCE
#include "nsPrintingPromptService.h"
#endif
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowWatcher, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppStartupNotifier)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFind)
@ -119,10 +123,12 @@ nsDefaultAuthPromptConstructor(nsISupports *outer, const nsIID &iid, void **resu
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPromptService, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJSConsoleService)
#ifdef NS_PRINTING
#ifndef WINCE
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init)
#endif
#endif
#endif
#ifdef MOZ_PROFILESHARING
#include "nsProfileSharingSetup.h"
@ -135,9 +141,11 @@ static const nsModuleComponentInfo gComponents[] = {
{ "Dialog ParamBlock", NS_DIALOGPARAMBLOCK_CID, NS_DIALOGPARAMBLOCK_CONTRACTID, nsDialogParamBlockConstructor },
{ "Prompt Service", NS_PROMPTSERVICE_CID, NS_PROMPTSERVICE_CONTRACTID, nsPromptServiceConstructor },
{ "JS Console Service", NS_JSCONSOLESERVICE_CID, NS_JSCONSOLESERVICE_CONTRACTID, nsJSConsoleServiceConstructor },
#ifdef NS_PRINTING
#ifndef WINCE
{ "Printing Prompt Service", NS_PRINTINGPROMPTSERVICE_CID, NS_PRINTINGPROMPTSERVICE_CONTRACTID, nsPrintingPromptServiceConstructor },
#endif
#endif
#endif
{ "Window Watcher", NS_WINDOWWATCHER_CID, NS_WINDOWWATCHER_CONTRACTID, nsWindowWatcherConstructor },
{ "Find", NS_FIND_CID, NS_FIND_CONTRACTID, nsFindConstructor },

View File

@ -49,11 +49,14 @@ DIRS = \
base \
generic \
forms \
printing \
tables \
xul \
$(NULL)
ifdef NS_PRINTING
DIRS += printing
endif
ifdef MOZ_MATHML
DIRS += mathml
endif

View File

@ -129,14 +129,16 @@
#include "nsGfxCIID.h"
#include "nsStyleSheetService.h"
// Printing
#include "nsIWebBrowserPrint.h"
#include "nsIPrompt.h"
#include "imgIContainer.h" // image animation mode constants
//--------------------------
// Printing Include
//---------------------------
#ifdef NS_PRINTING
#include "nsIWebBrowserPrint.h"
#include "nsPrintEngine.h"
// Print Options
@ -162,15 +164,11 @@ static const char sPrintOptionsContractID[] = "@mozilla.org/gfx/printset
#include "nsIDOMHTMLObjectElement.h"
#include "nsIPluginDocument.h"
// Print Preview
#include "imgIContainer.h" // image animation mode constants
// Print Progress
#include "nsIPrintProgress.h"
#include "nsIPrintProgressParams.h"
// Print error dialog
#include "nsIPrompt.h"
#include "nsIWindowWatcher.h"
// Printing
@ -303,8 +301,12 @@ class DocumentViewerImpl : public nsIDocumentViewer,
public nsIContentViewerEdit,
public nsIContentViewerFile,
public nsIMarkupDocumentViewer,
public nsIWebBrowserPrint,
public nsIDocumentViewerPrint
#ifdef NS_PRINTING
, public nsIWebBrowserPrint
#endif
{
friend class nsDocViewerSelectionListener;
friend class nsPagePrintTimer;
@ -338,8 +340,10 @@ public:
// nsIMarkupDocumentViewer
NS_DECL_NSIMARKUPDOCUMENTVIEWER
#ifdef NS_PRINTING
// nsIWebBrowserPrint
NS_DECL_NSIWEBBROWSERPRINT
#endif
typedef void (*CallChildFunc)(nsIMarkupDocumentViewer* aViewer,
void* aClosure);
@ -430,10 +434,10 @@ protected:
unsigned mPrintDocIsFullyLoaded : 1;
nsCOMPtr<nsIPrintSettings> mCachedPrintSettings;
nsCOMPtr<nsIWebProgressListener> mCachedPrintWebProgressListner;
#endif // NS_PRINT_PREVIEW
nsPrintEngine* mPrintEngine;
nsCOMPtr<nsIDOMWindowInternal> mDialogParentWin;
#endif // NS_PRINT_PREVIEW
#ifdef NS_DEBUG
FILE* mDebugFile;
@ -509,14 +513,20 @@ DocumentViewerImpl::DocumentViewerImpl(nsPresContext* aPresContext)
PrepareToStartLoad();
}
NS_IMPL_ISUPPORTS7(DocumentViewerImpl,
nsIContentViewer,
nsIDocumentViewer,
nsIMarkupDocumentViewer,
nsIContentViewerFile,
nsIContentViewerEdit,
nsIWebBrowserPrint,
nsIDocumentViewerPrint)
NS_IMPL_ADDREF(DocumentViewerImpl)
NS_IMPL_RELEASE(DocumentViewerImpl)
NS_INTERFACE_MAP_BEGIN(DocumentViewerImpl)
NS_INTERFACE_MAP_ENTRY(nsIContentViewer)
NS_INTERFACE_MAP_ENTRY(nsIDocumentViewer)
NS_INTERFACE_MAP_ENTRY(nsIMarkupDocumentViewer)
NS_INTERFACE_MAP_ENTRY(nsIContentViewerFile)
NS_INTERFACE_MAP_ENTRY(nsIContentViewerEdit)
NS_INTERFACE_MAP_ENTRY(nsIDocumentViewerPrint)
#ifdef NS_PRINTING
NS_INTERFACE_MAP_ENTRY(nsIWebBrowserPrint)
#endif
NS_INTERFACE_MAP_END
DocumentViewerImpl::~DocumentViewerImpl()
{
@ -1799,6 +1809,7 @@ DocumentViewerImpl::Hide(void)
{
PRBool is_in_print_mode = PR_FALSE;
#ifdef NS_PRINTING
GetDoingPrint(&is_in_print_mode);
if (is_in_print_mode) {
@ -1822,6 +1833,7 @@ DocumentViewerImpl::Hide(void)
// in fact it always returns false for subdocuments.
return NS_OK;
}
#endif
NS_PRECONDITION(mWindow, "null window");
if (mWindow) {
@ -2448,8 +2460,12 @@ DocumentViewerImpl::Print(PRBool aSilent,
NS_IMETHODIMP
DocumentViewerImpl::PrintWithParent(nsIDOMWindowInternal *aParentWin, nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener)
{
#ifdef NS_PRINTING
mDialogParentWin = aParentWin;
return Print(aThePrintSettings, aWPListener);
#else
return NS_ERROR_FAILURE;
#endif
}
// nsIContentViewerFile interface
@ -3263,11 +3279,13 @@ nsDocViewerFocusListener::Init(DocumentViewerImpl *aDocViewer)
/** ---------------------------------------------------
* From nsIWebBrowserPrint
*/
#ifdef NS_PRINTING
NS_IMETHODIMP
DocumentViewerImpl::Print(nsIPrintSettings* aPrintSettings,
nsIWebProgressListener* aWebProgressListener)
{
#ifdef NS_PRINTING
INIT_RUNTIME_ERROR_CHECKING();
#ifdef MOZ_XUL
@ -3345,10 +3363,6 @@ DocumentViewerImpl::Print(nsIPrintSettings* aPrintSettings,
OnDonePrinting();
}
return rv;
#else
PR_PL(("NS_PRINTING not defined - printing not implemented in this build!"));
return NS_ERROR_GFX_PRINTING_NOT_IMPLEMENTED;
#endif /* NS_PRINTING */
}
/** ---------------------------------------------------
@ -3412,7 +3426,6 @@ DocumentViewerImpl::PrintPreview(nsIPrintSettings* aPrintSettings,
NS_IMETHODIMP
DocumentViewerImpl::PrintPreviewNavigate(PRInt16 aType, PRInt32 aPageNum)
{
#if defined(NS_PRINTING) && defined(NS_PRINT_PREVIEW)
if (GetIsPrinting()) return NS_ERROR_FAILURE;
if (!mPrintEngine) return NS_ERROR_FAILURE;
@ -3511,9 +3524,6 @@ DocumentViewerImpl::PrintPreviewNavigate(PRInt16 aType, PRInt32 aPageNum)
scrollableView->ScrollTo(0, fndPageFrame->GetPosition().y-deadSpaceGap, PR_TRUE);
}
return NS_OK;
#else
return NS_ERROR_FAILURE;
#endif // NS_PRINT_PREVIEW
}
@ -3521,14 +3531,10 @@ DocumentViewerImpl::PrintPreviewNavigate(PRInt16 aType, PRInt32 aPageNum)
NS_IMETHODIMP
DocumentViewerImpl::GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings)
{
#ifdef NS_PRINTING
NS_ENSURE_ARG_POINTER(aGlobalPrintSettings);
nsPrintEngine printEngine;
return printEngine.GetGlobalPrintSettings(aGlobalPrintSettings);
#else
return NS_ERROR_FAILURE;
#endif
}
/* readonly attribute boolean doingPrint; */
@ -3536,7 +3542,6 @@ DocumentViewerImpl::GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSetti
NS_IMETHODIMP
DocumentViewerImpl::GetDoingPrint(PRBool *aDoingPrint)
{
#ifdef NS_PRINTING
NS_ENSURE_ARG_POINTER(aDoingPrint);
*aDoingPrint = PR_FALSE;
@ -3545,9 +3550,6 @@ DocumentViewerImpl::GetDoingPrint(PRBool *aDoingPrint)
return mPrintEngine->GetDoingPrintPreview(aDoingPrint);
}
return NS_OK;
#else
return NS_ERROR_FAILURE;
#endif
}
/* readonly attribute boolean doingPrintPreview; */
@ -3555,7 +3557,6 @@ DocumentViewerImpl::GetDoingPrint(PRBool *aDoingPrint)
NS_IMETHODIMP
DocumentViewerImpl::GetDoingPrintPreview(PRBool *aDoingPrintPreview)
{
#ifdef NS_PRINTING
NS_ENSURE_ARG_POINTER(aDoingPrintPreview);
*aDoingPrintPreview = PR_FALSE;
@ -3563,27 +3564,21 @@ DocumentViewerImpl::GetDoingPrintPreview(PRBool *aDoingPrintPreview)
return mPrintEngine->GetDoingPrintPreview(aDoingPrintPreview);
}
return NS_OK;
#else
return NS_ERROR_FAILURE;
#endif
}
/* readonly attribute nsIPrintSettings currentPrintSettings; */
NS_IMETHODIMP
DocumentViewerImpl::GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings)
{
#ifdef NS_PRINTING
NS_ENSURE_ARG_POINTER(aCurrentPrintSettings);
*aCurrentPrintSettings = nsnull;
NS_ENSURE_TRUE(mPrintEngine, NS_ERROR_FAILURE);
return mPrintEngine->GetCurrentPrintSettings(aCurrentPrintSettings);
#else
return NS_ERROR_FAILURE;
#endif
}
/* readonly attribute nsIDOMWindow currentChildDOMWindow; */
NS_IMETHODIMP
DocumentViewerImpl::GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow)
@ -3597,19 +3592,14 @@ DocumentViewerImpl::GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWin
NS_IMETHODIMP
DocumentViewerImpl::Cancel()
{
#ifdef NS_PRINTING
NS_ENSURE_TRUE(mPrintEngine, NS_ERROR_FAILURE);
return mPrintEngine->Cancelled();
#else
return NS_ERROR_FAILURE;
#endif
}
/* void exitPrintPreview (); */
NS_IMETHODIMP
DocumentViewerImpl::ExitPrintPreview()
{
#ifdef NS_PRINTING
if (GetIsPrinting()) return NS_ERROR_FAILURE;
NS_ENSURE_TRUE(mPrintEngine, NS_ERROR_FAILURE);
@ -3617,9 +3607,6 @@ DocumentViewerImpl::ExitPrintPreview()
ReturnToGalleyPresentation();
}
return NS_OK;
#else
return NS_ERROR_FAILURE;
#endif
}
//----------------------------------------------------------------------------------
@ -3709,8 +3696,6 @@ DocumentViewerImpl::GetIsRangeSelection(PRBool *aIsRangeSelection)
#endif
}
#ifdef NS_PRINTING
//----------------------------------------------------------------------------------
// Printing/Print Preview Helpers
//----------------------------------------------------------------------------------

View File

@ -119,7 +119,6 @@ SHARED_LIBRARY_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)gkgeneric_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gkforms_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gkstyle_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gkprinting_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gktable_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gkxulbase_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gkconbase_s.$(LIB_SUFFIX) \
@ -138,6 +137,12 @@ SHARED_LIBRARY_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)jsurl_s.$(LIB_SUFFIX) \
$(NULL)
ifdef NS_PRINTING
SHARED_LIBRARY_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)gkprinting_s.$(LIB_SUFFIX) \
$(NULL)
endif
ifdef MOZ_XUL
SHARED_LIBRARY_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)gkxultree_s.$(LIB_SUFFIX) \

View File

@ -76,7 +76,6 @@
#include "nsIScrollable.h"
#include "nsINameSpaceManager.h"
#include "nsIWidget.h"
#include "nsIWebBrowserPrint.h"
#include "nsWeakReference.h"
#include "nsIDOMWindow.h"
#include "nsIDOMDocument.h"
@ -85,6 +84,9 @@
#include "nsAutoPtr.h"
#include "nsIDOMNSHTMLDocument.h"
#ifdef NS_PRINTING
#include "nsIWebBrowserPrint.h"
#endif
// For Accessibility
#ifdef ACCESSIBILITY
#include "nsIAccessibilityService.h"

View File

@ -70,7 +70,6 @@ LIBS = \
$(DIST)/lib/$(LIB_PREFIX)gkforms_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gkstyle_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gktable_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gkprinting_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gkbase_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gkgeneric_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)gkconbase_s.$(LIB_SUFFIX) \