From 22f780b41bea33d0465ba5c7a6e43ec220cdfb52 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 8 Dec 2014 19:12:17 +0100 Subject: [PATCH] fix saving of copied styles --- ...ylesheet-s-HelpID-if-this-s-a-rename.patch | 33 +++++++++++++++++++ libreoffice.spec | 1 + 2 files changed, 34 insertions(+) create mode 100644 0001-don-t-copy-stylesheet-s-HelpID-if-this-s-a-rename.patch diff --git a/0001-don-t-copy-stylesheet-s-HelpID-if-this-s-a-rename.patch b/0001-don-t-copy-stylesheet-s-HelpID-if-this-s-a-rename.patch new file mode 100644 index 0000000..631ac91 --- /dev/null +++ b/0001-don-t-copy-stylesheet-s-HelpID-if-this-s-a-rename.patch @@ -0,0 +1,33 @@ +From e4cf5d1a98469c17133f33fc8220e6b41f65e9a0 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Mon, 8 Dec 2014 18:06:01 +0100 +Subject: [PATCH] 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 +--- + sd/source/core/stlpool.cxx | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +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() ) ) ); +-- +2.1.0 + diff --git a/libreoffice.spec b/libreoffice.spec index cede3d2..5f64ae3 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -324,6 +324,7 @@ Patch16: 0001-disable-PSD-import-test-which-deadlocks-on-ARM.patch Patch17: 0001-Resolves-fdo-37559-revert-adding-extra-dummy-polygon.patch Patch18: 0001-Revert-No-need-to-have-OpenCL-optional-at-configure-.patch Patch19: 0001-Don-t-treat-clew-as-part-of-an-external-clcc-module.patch +Patch20: 0001-don-t-copy-stylesheet-s-HelpID-if-this-s-a-rename.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice