https://bugs.documentfoundation.org/show_bug.cgi?id=148818

--- Comment #3 from Hossein <[email protected]> ---
(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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to