Problem description: When i apply a style to a text in RTF format (pasted from WordPad, for example), the font remains the original one. Steps to reproduce: 1.Open WordPad (or Visual Studio, for example) 2.Insert text, copy and past to Writer 3.Apply a paragraph style with different font Current behavior: Font remains the original one Expected behavior: Font become one defined style.
(In reply to Paolo Meozzi from comment #0) > Problem description: > When i apply a style to a text in RTF format (pasted from WordPad, for > example), the font remains the original one. > > Steps to reproduce: > 1.Open WordPad (or Visual Studio, for example) > 2.Insert text, copy and past to Writer > 3.Apply a paragraph style with different font Hi Paolo, Can you reproduce the issue if you open an RTF file with LibreOffice directly? It would be great to be able to test in that fashion. Status -> NEEDINFO (Please change status back to UNCONFIRMED after you test it out. Thanks!)
I reproduce the issue. The problem remains. To reproduce: 1.Open WordPad, insert a text and save document. 2.Open the document with Writer. 3.Apply a paragraph style with different font Current behavior: Font remains the original one Expected behavior: Font become one defined style.
(In reply to Paolo Meozzi from comment #2) > I reproduce the issue. The problem remains. > > To reproduce: > > 1.Open WordPad, insert a text and save document. > 2.Open the document with Writer. > 3.Apply a paragraph style with different font > > Current behavior: > Font remains the original one > > Expected behavior: > Font become one defined style. Reproduced already in 3.5.0. Not reproduced in 3.3.0. In 3.3.0 the font family changes when applying style. Win 7 Pro 64-bit, LibO Version: 4.4.0.3 Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7 Locale: fi_FI Version: 4.5.0.0.alpha0+ Build ID: b13534de022972131b46f93f5ada90af155eec9e TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-02-19_00:21:37 Locale: fi_FI Ubuntu 14.10 64-bit Version: 4.4.0.3 Build ID: 40m0(Build:3) Locale: en_US LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4 LibreOffice 3.5.0rc3 Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Created attachment 113597 [details] RTF file saved from Wordpad for testing
(In reply to Beluga from comment #3) > Reproduced already in 3.5.0. Not reproduced in 3.3.0. In 3.3.0 the font > family changes when applying style. Ah, too early a regression for bibisect Whiteboard -> notBibisectable
The old internal RTF filter used to call SwTxtNode::SetAttr() without setting SetAttrMode::NOFORMATATTR, so character attributes which cover the whole node got converted to paragraph attributes. The new UNO filter goes through SwXText::insertTextPortion(), which sets SetAttrMode::NOFORMATATTR, so this doesn't happen. The result of this is that when the UI sets a new paragraph style on the text node, then such character attributes are no longer removed.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3c0805e1f4f4d14e92c7e655d59c87de5c207e48 tdf#86639 SwEditShell: when setting para style, reset char attrs if needed It will be available in 5.0.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.
Migrating Whiteboard tags to Keywords: (notBibisectable) [NinjaEdit]