Followup to tdf#148703 to fix issue discovered in tdf#159193
and tracked in tdf#171068
(I have verified that this patch fixes the original issue of
tdf#159193 around page orientation as well as the crash
observed in tdf#171068)
My patch in 68e1db614c missed
two issues related to stashed frame formats:
1. Stashed frame formats used the UIName "CopyDesc" which
broke the logic to find the associated page desc.
2. SwUndoCopyHeaderFooter didn't handle saving/restoring
stashed frame formats.
This was missed by my testing because I never tested copying
a page desc that included stashed frame formats.
For (1), I believe that it is more correct for frame formats
to match the UIName of their containing page desc. The
SwPageDesc constructor does that, for example.
Test plan:
I added a regression test covering the stashed frame format
case:
CPPUNIT_TEST_NAME="SwCoreUndoTest testTdf171068CopyPageDescWithStashedHeaderAcrossDocuments" make CppunitTest_sw_core_undo
I have also manually tested against the example doc from this
comment:
https://bugs.documentfoundation.org/show_bug.cgi?id=159193#c0
Change-Id: I7671e531293731c31846ffe26aa851f0ccfa7abb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207604
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>