From 9a0303d3a448f7833d072ca4ddfa0bec86f2d3a4 Mon Sep 17 00:00:00 2001 From: "mcafee%netscape.com" Date: Thu, 22 Apr 1999 06:46:51 +0000 Subject: [PATCH] Removing NEW_CLIPBOARD_SUPPORT ifdef. git-svn-id: svn://10.0.0.236/trunk@28679 18797224-902f-48f8-a5cc-f745e15eee43 --- .../webshell/tests/viewer/nsBrowserWindow.cpp | 19 ------------------- .../webshell/tests/viewer/nsSetupRegistry.cpp | 5 ----- .../xpfe/AppCores/src/nsBrowserAppCore.cpp | 3 --- mozilla/xpfe/AppCores/src/nsEditorAppCore.cpp | 9 ++------- 4 files changed, 2 insertions(+), 34 deletions(-) diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp index c3687ab6aa4..de99fed143b 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp @@ -2014,14 +2014,7 @@ nsBrowserWindow::DoCopy() { nsIPresShell* shell = GetPresShell(); if (nsnull != shell) { - -#ifndef NEW_CLIPBOARD_SUPPORT - nsISelectionMgr* selectionMgr; - if (NS_SUCCEEDED(mAppShell->GetSelectionMgr(&selectionMgr))) - shell->DoCopy(selectionMgr); -#else shell->DoCopy(); -#endif NS_RELEASE(shell); } } @@ -2032,19 +2025,7 @@ nsBrowserWindow::DoPaste() nsIPresShell* shell = GetPresShell(); if (nsnull != shell) { -#ifndef NEW_CLIPBOARD_SUPPORT - nsISelectionMgr* selectionMgr; - if (NS_SUCCEEDED(mAppShell->GetSelectionMgr(&selectionMgr))) - { - nsString newString; - selectionMgr->PasteTextBlocking(&newString); - char* cstring = newString.ToNewCString(); - printf("Would paste: '%s'\n", cstring); - delete[] cstring; - } -#else printf("nsBrowserWindow::DoPaste()\n"); -#endif NS_RELEASE(shell); } diff --git a/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp b/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp index cb1e22634de..1c1e06d6f6b 100644 --- a/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp +++ b/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp @@ -212,14 +212,11 @@ static NS_DEFINE_IID(kObserverCID, NS_OBSERVER_CID); static NS_DEFINE_IID(kProfileCID, NS_PROFILE_CID); #endif - -#ifdef NEW_CLIPBOARD_SUPPORT static NS_DEFINE_IID(kClipboardCID, NS_CLIPBOARD_CID); static NS_DEFINE_CID(kCGenericTransferableCID, NS_GENERICTRANSFERABLE_CID); static NS_DEFINE_IID(kDataFlavorCID, NS_DATAFLAVOR_CID); static NS_DEFINE_IID(kCXIFFormatConverterCID, NS_XIFFORMATCONVERTER_CID); static NS_DEFINE_IID(kCDragServiceCID, NS_DRAGSERVICE_CID); -#endif #if 0 // autoregistration now works on all platforms, and RDF self-registers, so commenting out #if defined(XP_MAC) || defined (XP_UNIX) @@ -377,14 +374,12 @@ NS_SetupRegistry() #endif #endif -#ifdef NEW_CLIPBOARD_SUPPORT nsComponentManager::RegisterComponent(kClipboardCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kCGenericTransferableCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kDataFlavorCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kCXIFFormatConverterCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kCDragServiceCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE); -#endif nsComponentManager::RegisterComponent(kCSSParserCID, NULL, NULL, LAYOUT_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kPresShellCID, NULL, NULL, LAYOUT_DLL, PR_FALSE, PR_FALSE); diff --git a/mozilla/xpfe/AppCores/src/nsBrowserAppCore.cpp b/mozilla/xpfe/AppCores/src/nsBrowserAppCore.cpp index 0af22d7b30c..2d9a2438607 100644 --- a/mozilla/xpfe/AppCores/src/nsBrowserAppCore.cpp +++ b/mozilla/xpfe/AppCores/src/nsBrowserAppCore.cpp @@ -1,4 +1,3 @@ - /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * The contents of this file are subject to the Netscape Public License @@ -1475,12 +1474,10 @@ nsBrowserAppCore::PrintPreview() NS_IMETHODIMP nsBrowserAppCore::Copy() { -#ifdef NEW_CLIPBOARD_SUPPORT nsIPresShell * presShell = GetPresShellFor(mContentAreaWebShell); if (nsnull != presShell) { presShell->DoCopy(); } -#endif return NS_OK; } diff --git a/mozilla/xpfe/AppCores/src/nsEditorAppCore.cpp b/mozilla/xpfe/AppCores/src/nsEditorAppCore.cpp index 882306bff7b..accf04dbf3c 100755 --- a/mozilla/xpfe/AppCores/src/nsEditorAppCore.cpp +++ b/mozilla/xpfe/AppCores/src/nsEditorAppCore.cpp @@ -1,4 +1,3 @@ - /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * The contents of this file are subject to the Netscape Public License @@ -77,7 +76,6 @@ #include "nsIServiceManager.h" /////////////////////////////////////// -#ifdef NEW_CLIPBOARD_SUPPORT // Drag & Drop, Clipboard #include "nsWidgetsCID.h" #include "nsIClipboard.h" @@ -89,7 +87,6 @@ static NS_DEFINE_IID(kIClipboardIID, NS_ICLIPBOARD_IID); static NS_DEFINE_IID(kIDataFlavorIID, NS_IDATAFLAVOR_IID); static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID); -#endif /* Define Class IDs */ @@ -1247,12 +1244,12 @@ static void GenerateBarItem(FILE * fd, char * aFileName, const nsString & aDesc, NS_IMETHODIMP nsEditorAppCore::ShowClipboard() { - -#ifdef NEW_CLIPBOARD_SUPPORT nsIClipboard* clipboard; + nsresult rvv = nsServiceManager::GetService(kCClipboardCID, kIClipboardIID, (nsISupports **)&clipboard); + FILE * fd = fopen("res/samples/ClipboardViewer.xul", "w"); fprintf(fd, " \n"); fprintf(fd, " \n"); @@ -1360,8 +1357,6 @@ nsEditorAppCore::ShowClipboard() MakeNewWindow("resource:/res/samples/ClipboardViewer.xul"); -#endif - return NS_OK; }