xmloff/source/draw/ximpstyl.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ea7cf71ad297e55750eb3df3f9eee9aca906d22c
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Oct 18 21:39:46 2024 +0200
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Oct 21 15:49:38 2024 +0200

    only set parent style name if necessary
    
    a similar mega-master-page scenario as reported in tdf#158773
    
    17s - 13.5s
    
    Change-Id: Ic20fc0a269ce59094732b1ea5292b24a18777a2d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175180
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 2014ea5aec8c..b3b0bc8978d3 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -1374,7 +1374,8 @@ void SdXMLStylesContext::ImpSetGraphicStyles( 
uno::Reference< container::XNameAc
 
                     sParentStyleDisplayName = sParentStyleDisplayName.copy( 
nPrefLen );
                 }
-                xStyle->setParentStyle( sParentStyleDisplayName );
+                if (xStyle->getParentStyle() != sParentStyleDisplayName)
+                    xStyle->setParentStyle( sParentStyleDisplayName );
             }
         }
         catch( const Exception& e )

Reply via email to