As stated in "Conventions of an RTF Reader" of RTF Specification v.1.9.1: > If a parameter is needed and not specified, then a default value is used. > The default value used depends on the control word. If the control word > does not specify a default, then RTF readers should assume a default of 0 > except for the toggle control words (like \b), which have a default of 1 Before 2a49c656e7d7643f8e47f1bae43f5540e80c1bf3, any control word that requires parameter behaved as if it had 0 as default. Currently, RTFTokenizer::dispatchKeyword (writerfilter/source/rtftok/rtftokenizer.cxx) ignores control words that need parameters (CONTROL_VALUE) without parameter specified explicitly (except \dibitmap). This may cause different RTF import problems. It is not a regression, because it didn't work properly in OOo. The proposal is to extend RTFSymbol struct (writerfilter/source/rtftok/rtfcontrolwords.hxx) to include a default value (will be 0 for most), and specify actual defaults in aRTFControlWords (writerfilter/source/rtftok/rtfcontrolwords.cxx). Then use the default as parameter to RTFListener::dispatchValue in case when there's no explicit parameter (bParam==false) in RTFTokenizer::dispatchKeyword. The task requires C++ knowledge on beginner level, and careful reading of RTF documentation: https://download.microsoft.com/download/2/f/5/2f599e18-07ee-4ec5-a1e7-f4e6a9423592/Word2007RTFSpec9.docx
Hey, I'd like to work on this and this would be my first easyHack. It would be very helpful if I can talk to you once before I start working on it?
(In reply to Kunal Jain from comment #1) Welcome to LibreOffice! Please join #libreoffice-dev, and don't hesitate to ask if you have any questions. I'll try to provide any help necessary to get you going.
ekuiitr committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=061145e2172886f0bd8b33f16ede7c21dba6f3f6 tdf#105910 Allow defaults to be used as parameters for RTF control words. It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=21a15d5106bf081d3c896f9f1b01702b2c61d135 Unit test for tdf#105910, tdf#115276, tdf#115278 It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.