From 8ed917b8c2e622a7471573c665d8cd78b2ef8a9e Mon Sep 17 00:00:00 2001 From: "kostello%netscape.com" Date: Mon, 15 Mar 1999 05:06:52 +0000 Subject: [PATCH] Add support to get a SelectiomManager if non exists. Waiting for Repository work git-svn-id: svn://10.0.0.236/trunk@24159 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/windows/nsSelectionMgr.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mozilla/widget/src/windows/nsSelectionMgr.cpp b/mozilla/widget/src/windows/nsSelectionMgr.cpp index e04dacc5654..65d5a71e9f1 100644 --- a/mozilla/widget/src/windows/nsSelectionMgr.cpp +++ b/mozilla/widget/src/windows/nsSelectionMgr.cpp @@ -32,6 +32,11 @@ nsISelectionMgr* theSelectionMgr = 0; extern "C" NS_EXPORT nsISelectionMgr* GetSelectionMgr() { + if (!theSelectionMgr) + { + nsresult result = NS_NewSelectionMgr(&theSelectionMgr); + NS_ASSERTION(NS_SUCCEEDED(result),"Could not allocate the selection manager"); + } return theSelectionMgr; } // BWEEP BWEEP @@ -105,7 +110,7 @@ static void PlaceHTMLOnClipboard(PRUint32 aFormat, char* aData, int aLength) char* preamble = ""; char* postamble = ""; - if (aFormat == cf_aol || aFormat == CF_TEXT) + if (aFormat == cf_aol) { preamble = ""; postamble = "";