I accidently prevented the STXTTranslator from adding the styles section to the styled text output.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19932 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-01-23 21:15:07 +00:00
parent 03ce18544b
commit 7b93487d2d
@@ -1233,9 +1233,10 @@ translate_from_text(BPositionIO* source, const char* encoding, bool forceEncodin
} }
} while (bytesRead > 0); } while (bytesRead > 0);
if (outType == B_STYLED_TEXT_FORMAT) { if (outType != B_STYLED_TEXT_FORMAT)
if (encodingBuffer.Size() == 0 || size == outputSize) return B_OK;
return B_OK;
if (encodingBuffer.Size() != 0 && size != outputSize) {
if (outputSize > UINT32_MAX) if (outputSize > UINT32_MAX)
return B_NOT_SUPPORTED; return B_NOT_SUPPORTED;
@@ -1243,8 +1244,11 @@ translate_from_text(BPositionIO* source, const char* encoding, bool forceEncodin
status = destination->Seek(0, SEEK_SET); status = destination->Seek(0, SEEK_SET);
if (status == B_OK) if (status == B_OK)
status = output_headers(destination, (uint32)outputSize); status = output_headers(destination, (uint32)outputSize);
if (status == B_OK)
status = destination->Seek(0, SEEK_END);
return status; if (status < B_OK)
return status;
} }
// Read file attributes if outputting styled data // Read file attributes if outputting styled data