changing use of selection

This commit is contained in:
mjudge%netscape.com 1998-12-03 21:45:26 +00:00
parent 2d6a42cd38
commit ee9dc5ef18
3 changed files with 12 additions and 0 deletions

View File

@ -21,6 +21,9 @@ LIBRARY_NAME = nglhtmlcon_s
MODULE=raptor
REQUIRES=xpcom raptor js
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
!if defined(XP_NEW_SELECTION)
DEFINES = $(DEFINES) -DXP_NEW_SELECTION
!endif
CPPSRCS= \
nsCommentNode.cpp \

View File

@ -21,6 +21,9 @@ LIBRARY_NAME = nglhtmlcon_s
MODULE=raptor
REQUIRES=xpcom raptor js
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
!if defined(XP_NEW_SELECTION)
DEFINES = $(DEFINES) -DXP_NEW_SELECTION
!endif
CPPSRCS= \
nsCommentNode.cpp \

View File

@ -22,7 +22,10 @@
#include "nsIDocument.h"
#include "nsXIFConverter.h"
#include "nsSelectionRange.h"
#if XP_NEW_SELECTION
#else
#include "nsISelection.h"
#endif
#include "nsCRT.h"
#include "nsIEventStateManager.h"
#include "nsIPrivateDOMEvent.h"
@ -422,7 +425,10 @@ nsGenericDOMDataNode::ConvertContentToXIF(nsXIFConverter& aConverter) const
if (aConverter.GetUseSelection() == PR_TRUE && mDocument->IsInSelection(content))
{
#if XP_NEW_SELECTION
#else
nsISelection* sel;
#endif
mDocument->GetSelection(sel);
if (sel != nsnull)
{