• Mike Kaganski's avatar
    tdf#121168: Ensure page descriptions are correct in work document · ec928ac5
    Mike Kaganski yazdı
    When first node on a page is a section, then creation of a copy with
    lcl_CreateWorkingDocument initially produces a document with layout
    frames having wrong page descriptions applied (set to "Default Style").
    The reason is that when SfxViewFrame::LoadHiddenDocument indirectly
    calls SwRootFrame::Init, the sections in the document have hidden
    flag set, which causes SwNodes::GoNextSection return the first node
    after the first section. The returned node naturally doesn't have a
    page description set, thus the initialized page frame doesn't get it.
    
    This makes following copy to destination document use that wrong style;
    if the correct page style had header/footer, then it would not be
    properly copied per record in single-document output; headers/footers
    would be wrong/absent.
    
    This change forces check of page descriptions after the work document
    had been created and initialized.
    
    Change-Id: Ic196eb7fac0241f002eddd2c1d1b66dfb489bc60
    Reviewed-on: https://gerrit.libreoffice.org/65383Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
    Tested-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
    ec928ac5