During import, hidden is set on every page style. Each time, every sheet using that style is repaginated, which lays out the header and footer again. In the fuzzed document those 44 repaginations took 48.75s of its 49s, and now 1.8s. SetFollow gets the same check for consistency. Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: Ibdacc93203873d2c6498bf4444d5cc64e929aa83 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14217 Tested-by: Jenkins CPCI <releng@collaboraoffice.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.com> (cherry picked from commit d84523bd599f0fabc46ce4f82a6907f938aef55e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211811 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins