diff options
Diffstat (limited to 'src/Document.cxx')
| -rw-r--r-- | src/Document.cxx | 18 | 
1 files changed, 17 insertions, 1 deletions
| diff --git a/src/Document.cxx b/src/Document.cxx index 4a7546cf1..86d5c6077 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -169,7 +169,7 @@ int Document::AddRef() {  // Decrease reference count and return its previous value.  // Delete the document if reference count reaches zero. -int Document::Release() { +int SCI_METHOD Document::Release() {  	int curRefCount = --refCount;  	if (curRefCount == 0)  		delete this; @@ -825,6 +825,22 @@ bool Document::InsertString(int position, const char *s, int insertLength) {  	return !cb.IsReadOnly();  } +int SCI_METHOD Document::AddData(char *data, int length) { +	try { +		int position = Length(); +		InsertString(position,data, length); +	} catch (std::bad_alloc &) { +		return SC_STATUS_BADALLOC; +	} catch (...) { +		return SC_STATUS_FAILURE; +	} +	return 0; +} + +void * SCI_METHOD Document::ConvertToDocument() { +	return this; +} +  int Document::Undo() {  	int newPos = -1;  	CheckReadOnly(); | 
