https://bugs.documentfoundation.org/show_bug.cgi?id=155371
Bug ID: 155371
Summary: RTF Import: Error message shown to user is less
precise than internal error
Product: LibreOffice
Version: 7.6.0.0 alpha1+ Master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: minor
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
When trying to import an RTF file into Writer I run into an error, that was
caused by me weak file:
The balance of { } pairs was wrong.
The importer detected this when reaching the very-last line of the file.
The error dialog told me, there is an error in the file format, and it told me
the code line and source filename where the error was detected.
Bug: The dialog did _not_ tell me the reason was an unmatched {.
I am filing this (minor) issue since it might be easy to fix: The respective
code knows about the reason:
Source file: rtfdocumentimpl.cxx
void RTFDocumentImpl::resolve(Stream& rMapper)
[…]
case RTFError::OK:
SAL_INFO("writerfilter.rtf", "RTFDocumentImpl::resolve: finished
without errors");
break;
case RTFError::GROUP_UNDER:
SAL_INFO("writerfilter.rtf", "RTFDocumentImpl::resolve: unmatched
'}'");
break;
case RTFError::GROUP_OVER:
SAL_INFO("writerfilter.rtf", "RTFDocumentImpl::resolve: unmatched
'{'");
throw io::WrongFormatException(m_pTokenizer->getPosition());
break;
case RTFError::UNEXPECTED_EOF:
SAL_INFO("writerfilter.rtf", "RTFDocumentImpl::resolve: unexpected
end of file");
throw io::WrongFormatException(m_pTokenizer->getPosition());
break;
case RTFError::HEX_INVALID:
SAL_INFO("writerfilter.rtf", "RTFDocumentImpl::resolve: invalid hex
char");
throw io::WrongFormatException(m_pTokenizer->getPosition());
break;
case RTFError::CHAR_OVER:
SAL_INFO("writerfilter.rtf", "RTFDocumentImpl::resolve: characters
after last '}'");
break;
case RTFError::CLASSIFICATION:
SAL_INFO("writerfilter.rtf",
"RTFDocumentImpl::resolve: classification prevented
paste");
break;
--
You are receiving this mail because:
You are the assignee for the bug.