sw/source/writerfilter/dmapper/PropertyMap.cxx |   23 +++--------------------
 1 file changed, 3 insertions(+), 20 deletions(-)

New commits:
commit 14599c131345cc8847cdb72cfd6fe9e8239d5d1f
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Aug 19 14:23:16 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Aug 19 18:10:09 2024 +0200

    tdf#158556 only set header flags once
    
    which shaves 5% off the load time.
    
    I suspect this is a copy/paste of the similar logic in
       DomainMapper_Impl::PushPageHeaderFooter
    where it says
    // Set both sharing left and first to off so we can import the content
    regardless tha what value
    // the "titlePage" or "evenAndOdd" flags are set (which decide what
    the sharing is set to in the document)
    
    I suspect that
        commit 4b0fa253a4540f5461397815d290586f9ddabe61
        Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
        Date:   Tue Nov 28 13:46:21 2023 +0900
        tdf#136472 adjust ooxml import to handle first header/footer
    sufficiently cleaned up the header/footer handling that this is no
    longer necessary.
    
    Change-Id: I05145c0f3706bd100dc200a949b9a05a1600d370
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172038
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/writerfilter/dmapper/PropertyMap.cxx 
b/sw/source/writerfilter/dmapper/PropertyMap.cxx
index b2ed4176081d..62b872b0608f 100644
--- a/sw/source/writerfilter/dmapper/PropertyMap.cxx
+++ b/sw/source/writerfilter/dmapper/PropertyMap.cxx
@@ -1062,9 +1062,9 @@ void copyHeaderFooter(const DomainMapper_Impl& rDM_Impl,
     uno::Sequence<uno::Any> aValues = {
         uno::Any(bPreviousHasHeader || bHasHeader),
         uno::Any(bPreviousHasFooter || bHasFooter),
-        uno::Any(false),
-        uno::Any(false),
-        uno::Any(false),
+        uno::Any(!bEvenAndOdd),
+        uno::Any(!bEvenAndOdd),
+        uno::Any(!bTitlePage),
     };
     xStyle->setPropertyValues(aNames, aValues);
 
@@ -1087,23 +1087,6 @@ void copyHeaderFooter(const DomainMapper_Impl& rDM_Impl,
         if (bCopyFirstFooter && bTitlePage)
             copyHeaderFooterTextProperty(xPreviousStyle, xStyle, 
PROP_FOOTER_TEXT_FIRST);
     }
-
-    // Set all properties at once after the copy, to avoid needless SwPageDesc 
copying.
-    aNames = {
-        sHeaderIsOn,
-        sFooterIsOn,
-        sHeaderIsShared,
-        sFooterIsShared,
-        sFirstIsShared,
-    };
-    aValues = {
-        uno::Any(bPreviousHasHeader || bHasHeader),
-        uno::Any(bPreviousHasFooter || bHasFooter),
-        uno::Any(!bEvenAndOdd),
-        uno::Any(!bEvenAndOdd),
-        uno::Any(!bTitlePage),
-    };
-    xStyle->setPropertyValues(aNames, aValues);
 }
 
 } // end anonymous namespace

Reply via email to