Created attachment 179808 [details] Comparison LibreOffice 7.4 master and PP 2016 This is a follow-up of bug 148665 that I found while creating the unittest 1. Open attachment 179734 [details] from bug 148735 -> Text 'Fufufu' is missing. See comparison
Regression introduced by: author Szymon Kłos <szymon.klos@collabora.com> 2022-02-23 11:18:59 +0100 committer Szymon Kłos <szymon.klos@collabora.com> 2022-02-24 11:36:56 +0100 commit cf2449aac0141711a7610d67f7c50cd108e12443 (patch) tree 680d11518c093a4e0730ad3f3e013cf8a67b4c91 parent 76e11015a877da0eee21bb97b84a0f17bce41760 (diff) tdf#72776 Allow text removal in the shapes Bisected with: bibisect-linux64-7.4 Adding Cc: to Szymon Kłos
The issue is fixed if '&& mpOutliner->GetParagraphCount() != 2)' is removed in svx/source/unodraw/unoshtxt.cxx:778
(In reply to Xisco Faulí from comment #2) > The issue is fixed if '&& mpOutliner->GetParagraphCount() != 2)' is removed > in svx/source/unodraw/unoshtxt.cxx:778 Good starting point. But this change actually fails to pass checks: (patch set 1) tdf#148818 Fix missing text in shapes https://gerrit.libreoffice.org/c/core/+/133527 If you load this file: sd/qa/unit/data/odp/shapes-test.odp in page 3, the rightmost shape (a flower like shape) is displayed incorrectly with a too long height. When trying to type a word over the shape, it then goes back to the correct shape. In patch set 2, I have negated the condition to provide a better explanation of what the condition should be. Checked first paragraph to be of zero length if the paragraph count is 1 (like before), and also checked both the first and second paragraph to be of zero length if the paragraph count is 2. This is the new conditional sentence: if ( (mpOutliner->GetParagraphCount() == 1 && mpOutliner->GetEditEngine().GetTextLen( 0 ) == 0 ) || (mpOutliner->GetParagraphCount() == 2 && mpOutliner->GetEditEngine().GetTextLen( 0 ) == 0 && mpOutliner->GetEditEngine().GetTextLen( 1 ) == 0) ) { ... } else { ... } I will try to write a generalized solution not limited to paragraph count of 1 and 2, to see if it works.
attachment 156608 [details] from bug 129430 is also affected by this issue. The slide is completely blank, while it should have text.
(In reply to Xisco Faulí from comment #4) > attachment 156608 [details] from bug 129430 is also affected by this issue. > The slide is completely blank, while it should have text. not reproducible with Hossein's commit in place.
Created attachment 179918 [details] Another file affected
Hossein committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/759792e40aceb17a621c37ed725d1e998acbd30d tdf#148818 Fix missing text in boxes with empty first paragraph It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
It's ok. Fufufu is here. ;) Version: 7.4.0.0.alpha1+ / LibreOffice Community Build ID: 75f7e057039aaa49558e22d18cad651d11589da9 CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded