[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sd/source

David Tardon dtardon at redhat.com
Sun Jan 4 12:55:03 PST 2015


 sd/source/core/stlpool.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 919719d02692d453c4140135a8da3e9508a88042
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Dec 8 18:06:01 2014 +0100

    don't copy stylesheet's HelpID if this's a rename
    
    This causes problems for renamed copies of std. styles, as they have
    special handling in SdStyleSheet::SetHelpId, which would set the API
    name to std. value too. That means that there would be two (or more)
    stylesheets with the same API name. On export, only one of them would be
    exported.
    
    Change-Id: I19d243bd3f73995e8de2d251e3d8b7f93219c3a9
    (cherry picked from commit e4cf5d1a98469c17133f33fc8220e6b41f65e9a0)
    Reviewed-on: https://gerrit.libreoffice.org/13574
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 5e4b30f..67f0346 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -697,7 +697,8 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
             if( !aParent.isEmpty() )
                 aNewStyles.push_back( std::pair< rtl::Reference< SfxStyleSheetBase >, OUString >( xNewSheet, aParent ) );
 
-            xNewSheet->SetHelpId( aHelpFile, xSheet->GetHelpId( aHelpFile ) );
+            if( !bAddToList )
+                xNewSheet->SetHelpId( aHelpFile, xSheet->GetHelpId( aHelpFile ) );
             xNewSheet->GetItemSet().Put( xSheet->GetItemSet() );
 
             rCreatedSheets.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( xNewSheet.get() ) ) );


More information about the Libreoffice-commits mailing list