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;
Karl-Heinz, thank you for reporting the bug. Could you please attach the rtf-file, that causes the bug? Thank you. => NEEDINFO
Created attachment 187599 [details] This file shows the bug. (In the file a } is missing.}
Created attachment 187600 [details] This file is NOT damaged, it has the '}' that is missing in bad_file.rtf.
Thank you for looking at this issue, I have attached two RTF files now.
I can reproduce the problem with the follwing steps 1. Open Writer 2. Open attachment 187599 [details] Actual result Error message "File format error found at 7,1(row,col)" So I would treat your report as enhancement request and I've changed bug summary and added desing-team.
The error message "File format error found at $(ARG1)(row,col)" is defined four times where we probably can exclude sc and sd. But it still needs a bit of debugging to find the right place to add the human-readable information.