diff options
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index de1605837..19f6670f6 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -358,6 +358,19 @@ char CellBuffer::StyleAt(int position) const { return style.ValueAt(position); } +void CellBuffer::GetStyleRange(unsigned char *buffer, int position, int lengthRetrieve) const { + if (lengthRetrieve < 0) + return; + if (position < 0) + return; + if ((position + lengthRetrieve) > style.Length()) { + Platform::DebugPrintf("Bad GetStyleRange %d for %d of %d\n", position, + lengthRetrieve, style.Length()); + return; + } + style.GetRange(reinterpret_cast<char *>(buffer), position, lengthRetrieve); +} + const char *CellBuffer::BufferPointer() { return substance.BufferPointer(); } |