This commit is contained in:
peterv%propagandism.org 2005-06-16 22:57:46 +00:00
Родитель c070659a9b
Коммит fbc8799da6
4 изменённых файлов: 12 добавлений и 25 удалений

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

@ -128,7 +128,8 @@ static PRBool gDontCareForIMEOnFocusPassword = PR_FALSE;
// Value of "ime.password.onBlur.dontCare"
static PRBool gDontCareForIMEOnBlurPassword = PR_FALSE;
nsIParserService* sParserService;
// Defined in nsEditorRegistration.cpp
extern nsIParserService *sParserService;
//---------------------------------------------------------------------------
//
@ -250,21 +251,6 @@ nsEditor::~nsEditor()
NS_IF_RELEASE(mViewManager);
}
/* static */
nsresult
nsEditor::Init()
{
return CallGetService("@mozilla.org/parser/parser-service;1",
&sParserService);
}
/* static */
void
nsEditor::Shutdown()
{
NS_IF_RELEASE(sParserService);
}
NS_IMPL_ISUPPORTS4(nsEditor, nsIEditor, nsIEditorIMESupport, nsISupportsWeakReference, nsIPhonetic)
#ifdef XP_MAC

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

@ -86,10 +86,6 @@ class RemoveStyleSheetTxn;
class nsIFile;
class nsISelectionController;
class nsIDOMEventReceiver;
class nsIParserService;
// Defined in nsEditor.cpp
extern nsIParserService *sParserService;
#define kMOZEditorBogusNodeAttr NS_LITERAL_STRING("_moz_editor_bogus_node")
#define kMOZEditorBogusNodeValue NS_LITERAL_STRING("TRUE")
@ -140,9 +136,6 @@ public:
*/
virtual ~nsEditor();
static nsresult Init();
static void Shutdown();
//Interfaces for addref and release and queryinterface
//NOTE: Use NS_DECL_ISUPPORTS_INHERITED in any class inherited from nsEditor
NS_DECL_ISUPPORTS

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

@ -49,6 +49,7 @@
#include "nsIObserver.h"
#include "nsIObserverService.h"
#include "nsCOMPtr.h"
#include "nsIParserService.h"
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
#include "nsHTMLEditor.h"
@ -85,6 +86,8 @@ EditorShutdownObserver::Observe(nsISupports *aSubject,
static PRBool gInitialized = PR_FALSE;
nsIParserService *sParserService;
PR_STATIC_CALLBACK(nsresult)
Initialize(nsIModule* self)
{
@ -95,7 +98,8 @@ Initialize(nsIModule* self)
gInitialized = PR_TRUE;
nsresult rv = nsEditor::Init();
nsresult rv = CallGetService("@mozilla.org/parser/parser-service;1",
&sParserService);
if (NS_FAILED(rv)) {
gInitialized = PR_FALSE;
@ -136,7 +140,8 @@ Shutdown()
if (!gInitialized)
return;
nsEditor::Shutdown();
NS_IF_RELEASE(sParserService);
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
nsHTMLEditor::Shutdown();
nsTextServicesDocument::Shutdown();

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

@ -141,6 +141,9 @@ static char namedanchorText[] = "namedanchor";
nsIRangeUtils* nsHTMLEditor::sRangeHelper;
// Defined in nsEditorRegistration.cpp
extern nsIParserService *sParserService;
// some prototypes for rules creation shortcuts
nsresult NS_NewTextEditRules(nsIEditRules** aInstancePtrResult);
nsresult NS_NewHTMLEditRules(nsIEditRules** aInstancePtrResult);