Removing NEW_CLIPBOARD_SUPPORT ifdef.

This commit is contained in:
mcafee%netscape.com 1999-04-22 06:46:51 +00:00
Родитель 60d6e75581
Коммит eab12d1df3
4 изменённых файлов: 2 добавлений и 34 удалений

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -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);

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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, "<?xml version=\"1.0\"?> \n");
fprintf(fd, "<?xml-stylesheet href=\"xul.css\" type=\"text/css\"?> \n");
@ -1360,8 +1357,6 @@ nsEditorAppCore::ShowClipboard()
MakeNewWindow("resource:/res/samples/ClipboardViewer.xul");
#endif
return NS_OK;
}