Use macros from nsTextFragment

This commit is contained in:
kipp%netscape.com 1999-01-05 23:02:27 +00:00
Родитель eedfe48223
Коммит 8fc647b798
8 изменённых файлов: 4 добавлений и 66 удалений

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

@ -45,17 +45,14 @@
#include "nsIDOMHTMLImageElement.h"
#include "nsIDeviceContext.h"
#include "nsINameSpaceManager.h"
#include "nsTextFragment.h"
#ifndef _WIN32
#define BROKEN_IMAGE_URL "resource:/res/html/broken-image.gif"
#endif
#define XP_IS_SPACE(_ch) \
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID);
// Value's for mSuppress
#define SUPPRESS_UNSET 0
#define DONT_SUPPRESS 1

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

@ -24,6 +24,7 @@
#include "nsIURL.h"
#include "nsXIFConverter.h"
#include "nsISizeOfHandler.h"
#include "nsTextFragment.h"
class Area {
public:
@ -97,10 +98,6 @@ Area::SizeOf(nsISizeOfHandler* aHandler) const
aHandler->Add(mNumCoords * sizeof(nscoord));
}
// XXX move into nsCRT
#define XP_IS_SPACE(_ch) \
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\r') || ((_ch) == '\n'))
#include <stdlib.h>
#define XP_ATOI(_s) ::atoi(_s)

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

@ -61,15 +61,6 @@ static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID);
#define WORD_BUF_SIZE 100
#define TEXT_BUF_SIZE 1000
// XXX these are a copy of nsTextTransformer's version and they aren't I18N'd!
#define XP_IS_LOWERCASE(_ch) \
(((_ch) >= 'a') && ((_ch) <= 'z'))
#define XP_TO_UPPER(_ch) ((_ch) & ~32)
#define XP_IS_SPACE(_ch) \
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
class TextFrame;
@ -681,8 +672,6 @@ TextFrame::ComputeSelectionInfo(nsIRenderingContext& aRenderingContext,
}
#endif //0
#define XP_IS_SPACE_W XP_IS_SPACE
/**
* Prepare the text in the content for rendering. If aIndexes is not nsnull
* then fill in aIndexes's with the mapping from the original input to

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

@ -26,20 +26,6 @@
// XXX put a copy in nsHTMLIIDs
static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
// XXX these need I18N spankage
#define XP_IS_SPACE(_ch) \
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
#define XP_IS_UPPERCASE(_ch) \
(((_ch) >= 'A') && ((_ch) <= 'Z'))
#define XP_IS_LOWERCASE(_ch) \
(((_ch) >= 'a') && ((_ch) <= 'z'))
#define XP_TO_LOWER(_ch) ((_ch) | 32)
#define XP_TO_UPPER(_ch) ((_ch) & ~32)
// XXX I'm sure there are other special characters
#define CH_NBSP 160

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

@ -45,17 +45,14 @@
#include "nsIDOMHTMLImageElement.h"
#include "nsIDeviceContext.h"
#include "nsINameSpaceManager.h"
#include "nsTextFragment.h"
#ifndef _WIN32
#define BROKEN_IMAGE_URL "resource:/res/html/broken-image.gif"
#endif
#define XP_IS_SPACE(_ch) \
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID);
// Value's for mSuppress
#define SUPPRESS_UNSET 0
#define DONT_SUPPRESS 1

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

@ -24,6 +24,7 @@
#include "nsIURL.h"
#include "nsXIFConverter.h"
#include "nsISizeOfHandler.h"
#include "nsTextFragment.h"
class Area {
public:
@ -97,10 +98,6 @@ Area::SizeOf(nsISizeOfHandler* aHandler) const
aHandler->Add(mNumCoords * sizeof(nscoord));
}
// XXX move into nsCRT
#define XP_IS_SPACE(_ch) \
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\r') || ((_ch) == '\n'))
#include <stdlib.h>
#define XP_ATOI(_s) ::atoi(_s)

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

@ -61,15 +61,6 @@ static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID);
#define WORD_BUF_SIZE 100
#define TEXT_BUF_SIZE 1000
// XXX these are a copy of nsTextTransformer's version and they aren't I18N'd!
#define XP_IS_LOWERCASE(_ch) \
(((_ch) >= 'a') && ((_ch) <= 'z'))
#define XP_TO_UPPER(_ch) ((_ch) & ~32)
#define XP_IS_SPACE(_ch) \
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
class TextFrame;
@ -681,8 +672,6 @@ TextFrame::ComputeSelectionInfo(nsIRenderingContext& aRenderingContext,
}
#endif //0
#define XP_IS_SPACE_W XP_IS_SPACE
/**
* Prepare the text in the content for rendering. If aIndexes is not nsnull
* then fill in aIndexes's with the mapping from the original input to

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

@ -26,20 +26,6 @@
// XXX put a copy in nsHTMLIIDs
static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
// XXX these need I18N spankage
#define XP_IS_SPACE(_ch) \
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
#define XP_IS_UPPERCASE(_ch) \
(((_ch) >= 'A') && ((_ch) <= 'Z'))
#define XP_IS_LOWERCASE(_ch) \
(((_ch) >= 'a') && ((_ch) <= 'z'))
#define XP_TO_LOWER(_ch) ((_ch) | 32)
#define XP_TO_UPPER(_ch) ((_ch) & ~32)
// XXX I'm sure there are other special characters
#define CH_NBSP 160