Change the reference to the global selection mgr to fix windows build

This commit is contained in:
akkana%netscape.com 1999-03-11 00:08:10 +00:00
Родитель 2874bb3300
Коммит a293292ac6
5 изменённых файлов: 26 добавлений и 26 удалений

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

@ -787,6 +787,8 @@ NS_IMETHODIMP nsEditor::Cut()
return res;
}
extern "C" NS_EXPORT nsISelectionMgr* GetSelectionMgr();
NS_IMETHODIMP nsEditor::Copy()
{
//printf("nsEditor::Copy\n");
@ -797,13 +799,7 @@ NS_IMETHODIMP nsEditor::Copy()
// See http://bugzilla.mozilla.org/show_bug.cgi?id=3509.
// In the meantime, so I'm not blocked on writing the rest of the code,
// nsSelectionMgr uses the egregious hack of a global variable:
#define EXTERNAL_SELECTION_MGR 1
#ifdef EXTERNAL_SELECTION_MGR
extern nsISelectionMgr* theSelectionMgr;
nsISelectionMgr* selectionMgr = theSelectionMgr;
#else /* EXTERNAL_SELECTION_MGR */
nsISelectionMgr* selectionMgr = 0;
#endif /* EXTERNAL_SELECTION_MGR */
nsISelectionMgr* selectionMgr = GetSelectionMgr();
if (!selectionMgr)
{
printf("Can't get selection mgr!\n");
@ -824,12 +820,7 @@ NS_IMETHODIMP nsEditor::Paste()
// See http://bugzilla.mozilla.org/show_bug.cgi?id=3509.
// In the meantime, so I'm not blocked on writing the rest of the code,
// nsSelectionMgr uses the egregious hack of a global variable:
#ifdef EXTERNAL_SELECTION_MGR
extern nsISelectionMgr* theSelectionMgr;
nsISelectionMgr* selectionMgr = theSelectionMgr;
#else /* EXTERNAL_SELECTION_MGR */
nsISelectionMgr* selectionMgr = 0;
#endif /* EXTERNAL_SELECTION_MGR */
nsISelectionMgr* selectionMgr = GetSelectionMgr();
if (!selectionMgr)
{
printf("Can't get selection mgr!\n");

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

@ -787,6 +787,8 @@ NS_IMETHODIMP nsEditor::Cut()
return res;
}
extern "C" NS_EXPORT nsISelectionMgr* GetSelectionMgr();
NS_IMETHODIMP nsEditor::Copy()
{
//printf("nsEditor::Copy\n");
@ -797,13 +799,7 @@ NS_IMETHODIMP nsEditor::Copy()
// See http://bugzilla.mozilla.org/show_bug.cgi?id=3509.
// In the meantime, so I'm not blocked on writing the rest of the code,
// nsSelectionMgr uses the egregious hack of a global variable:
#define EXTERNAL_SELECTION_MGR 1
#ifdef EXTERNAL_SELECTION_MGR
extern nsISelectionMgr* theSelectionMgr;
nsISelectionMgr* selectionMgr = theSelectionMgr;
#else /* EXTERNAL_SELECTION_MGR */
nsISelectionMgr* selectionMgr = 0;
#endif /* EXTERNAL_SELECTION_MGR */
nsISelectionMgr* selectionMgr = GetSelectionMgr();
if (!selectionMgr)
{
printf("Can't get selection mgr!\n");
@ -824,12 +820,7 @@ NS_IMETHODIMP nsEditor::Paste()
// See http://bugzilla.mozilla.org/show_bug.cgi?id=3509.
// In the meantime, so I'm not blocked on writing the rest of the code,
// nsSelectionMgr uses the egregious hack of a global variable:
#ifdef EXTERNAL_SELECTION_MGR
extern nsISelectionMgr* theSelectionMgr;
nsISelectionMgr* selectionMgr = theSelectionMgr;
#else /* EXTERNAL_SELECTION_MGR */
nsISelectionMgr* selectionMgr = 0;
#endif /* EXTERNAL_SELECTION_MGR */
nsISelectionMgr* selectionMgr = GetSelectionMgr();
if (!selectionMgr)
{
printf("Can't get selection mgr!\n");

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

@ -74,6 +74,12 @@
// has a way of registering instances
// (see http://bugzilla.mozilla.org/show_bug.cgi?id=3509 ).
nsISelectionMgr* theSelectionMgr = 0;
extern "C" NS_EXPORT nsISelectionMgr*
GetSelectionMgr()
{
return theSelectionMgr;
}
// BWEEP BWEEP
//

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

@ -31,6 +31,12 @@ NS_IMPL_RELEASE(nsSelectionMgr)
// has a way of registering instances
// (see http://bugzilla.mozilla.org/show_bug.cgi?id=3509 ).
nsISelectionMgr* theSelectionMgr = 0;
extern "C" NS_EXPORT nsISelectionMgr*
GetSelectionMgr()
{
return theSelectionMgr;
}
// BWEEP BWEEP
nsSelectionMgr::nsSelectionMgr()

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

@ -26,6 +26,12 @@
// has a way of registering instances
// (see http://bugzilla.mozilla.org/show_bug.cgi?id=3509 ).
nsISelectionMgr* theSelectionMgr = 0;
extern "C" NS_EXPORT nsISelectionMgr*
GetSelectionMgr()
{
return theSelectionMgr;
}
// BWEEP BWEEP
/**