[Libreoffice-commits] core.git: 2 commits - sd/source
David Tardon
dtardon at redhat.com
Mon Dec 8 09:35:08 PST 2014
sd/source/core/stlpool.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 447b9634a11c63bc8f08d6921a24d494d264daf6
Author: David Tardon <dtardon at redhat.com>
Date: Mon Dec 8 18:12:54 2014 +0100
limit scope of variable
Change-Id: I74ccd6c8a3cfd45929973f21418458f3a83243af
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 94f8f96..29d5e98 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -640,8 +640,6 @@ struct HasFamilyPredicate : svl::StyleSheetPredicate
void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, SdStyleSheetVector& rCreatedSheets, OUString& rRenameSuffix)
{
- OUString aHelpFile;
-
std::vector< std::pair< rtl::Reference< SfxStyleSheetBase >, OUString > > aNewStyles;
std::vector< std::pair< OUString, OUString > > aRenamedList;
@@ -700,7 +698,10 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
aNewStyles.push_back( std::pair< rtl::Reference< SfxStyleSheetBase >, OUString >( xNewSheet, aParent ) );
if( !bAddToList )
+ {
+ OUString aHelpFile;
xNewSheet->SetHelpId( aHelpFile, xSheet->GetHelpId( aHelpFile ) );
+ }
xNewSheet->GetItemSet().Put( xSheet->GetItemSet() );
rCreatedSheets.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( xNewSheet.get() ) ) );
commit e4cf5d1a98469c17133f33fc8220e6b41f65e9a0
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
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 095054e..94f8f96 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -699,7 +699,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