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

Justin L <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[email protected] |[email protected]
                   |desktop.org                 |

--- Comment #8 from Justin L <[email protected]> ---
(In reply to Justin L from comment #7)
> The glaring problem here is the loss of the section properties and the page
> break - which was the purpose of having the dummy paragraph. So what we want
> here is an invisible dummy paragraph.

Note that since 25.8.1 (thanks to bug 164500), the framePr will normally create
it's own dummy paragraph. However, for this particular document it doesn't,
since the table is also supposed to be framePr'd.

Of course, AddDummyParaForTableInSection is called before the table knows its
own frameProperties, so we can't know for sure that the dummy paragraph would
be created.

In fact, AddDummyParaForTableInSection is called even before framePr creates
its own dummy paragraph.

So there are a few options here. One would be to not delete the table's dummy
paragraph. Ideally then if that one is created-but-won't-be-deleted, then a
second dummy paragraph shouldn't be created. That should be possible but
somewhat complicated.

The other option is to not avoid creating the dummy paragraph when the table
thinks it is bIsFrameMode - since we don't actually float framePr tables. I'm
not sure why I added that bIsFrameMode exclusion. Probably on the theoretical
level that if the table is SUPPOSED to be floating, then it wouldn't need to
create a dummy paragraph inside the frame. Well, if tables are ever floated in
the future, that clause could be added back in.

So when I do option #2, the flow goes like this
-framePr frame has started and (prematurely, as always) ended
-table starts
-AddDummyParaForTableInSection fails because GetIsPreviousParagraphFramed
-finishParagraph tries to finish the first cell
-because the table is in a different frame, finishParagraph closes the previous
textbox. Because a table is starting, a dummy paragraph is inserted. Somehow
the section properties get applied to this paragraph.

I note that this approach will still fail in case the table is in the same
framePr as the previous paragraph. That could be handled by just forcing
bIsFrameMode to false for a table.

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

Reply via email to