It turns out that nothing was broken in TextView.cpp, and the fact that BTranslationUtils::GetStyledText()

crashed when used with our BTextView if the STELine struct was 12 byte in size, was just because
libtranslation.so was using BeOS's BTextView, where the size of that struct is 16. In fact, linking against our
 libtranslation.so doesn't avoid the crash, while compiling that lib against our BTextView and then linking
against it makes the crash disappear.
Changed the comment near that struct.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9646 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2004-10-29 06:38:26 +00:00
parent eeb4323204
commit 08db68e8ee

View File

@ -27,12 +27,14 @@
#include <SupportDefs.h>
#include "TextViewSupportBuffer.h"
// It's important that this struct remains as is,
// as it's the way it is in BeOS, and if we change it,
// it would lead to some issues as long as we use "mixed" libraries.
typedef struct STELine {
long offset; // offset of first character of line
float origin; // pixel position of top of line
float ascent; // maximum ascent for line
float padding; // TODO: Don't remove this, as something in
// TextView.cpp is broken and will crash
float width; // not used for now, but could be
} STELine, *STELinePtr;
@ -70,11 +72,3 @@ _BLineBuffer_::operator[](int32 index) const
{
return &fBuffer[index];
}
/*
* $Log $
*
* $Id $
*
*/