From 57472ac50dd8e971054c1db52d6c68f4e5d64eff Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Nov 07 2016 13:23:13 +0000 Subject: ensure checkForUniqueItem on inserting a new slide --- diff --git a/0001-ensure-checkForUniqueItem-on-inserting-a-new-slide.patch b/0001-ensure-checkForUniqueItem-on-inserting-a-new-slide.patch new file mode 100644 index 0000000..3fdc14e --- /dev/null +++ b/0001-ensure-checkForUniqueItem-on-inserting-a-new-slide.patch @@ -0,0 +1,40 @@ +From 8aa07967e677433e6af7d16102ffc276b9207d97 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Mon, 7 Nov 2016 13:18:03 +0000 +Subject: [PATCH] ensure checkForUniqueItem on inserting a new slide + +On copying slides from another presentation into one, we end up +with two XBitmapItems with the same name and different properties. + +because the names are supposed to be unique, only one gets exported +so the presentation looses graphics on export + +there is a bunch of places which use checkForUniqueItem to block +this from happening, add another at the point where we insert +the new page into the model + +Change-Id: If708b1997c7e83e4787d9d54f84c8b0516e6cf6b +--- + svx/source/svdraw/svdpage.cxx | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx +index 3bb3fe9..91f9859c 100644 +--- a/svx/source/svdraw/svdpage.cxx ++++ b/svx/source/svdraw/svdpage.cxx +@@ -1483,7 +1483,11 @@ void SdrPage::SetModel(SdrModel* pNewModel) + + if(!IsMasterPage()) + { +- pNew->PutItemSet(getSdrPageProperties().GetItemSet()); ++ const SfxItemSet& rOldSet = getSdrPageProperties().GetItemSet(); ++ SfxItemSet* pNewSet = rOldSet.Clone(false, &pNewModel->GetItemPool()); ++ SdrModel::MigrateItemSet(&rOldSet, pNewSet, pNewModel); ++ pNew->PutItemSet(*pNewSet); ++ delete pNewSet; + } + + pNew->SetStyleSheet(getSdrPageProperties().GetStyleSheet()); +-- +2.9.3 + diff --git a/libreoffice.spec b/libreoffice.spec index 881aea5..6ea6306 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -54,7 +54,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.3 -Release: 4%{?libo_prerelease}%{?dist} +Release: 5%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 and CC0 URL: http://www.libreoffice.org/ @@ -247,6 +247,7 @@ Patch17: 0001-Resolves-tdf-98807-gtk3-isn-t-giving-utility-windows.patch Patch18: 0001-convert-angle-from-degrees-to-radians-for-glm.patch Patch19: 0001-Related-rhbz-1390607-our-side-of-per-monitor-fullscr.patch Patch20: 0001-remove-OpenGL-transitions-config.-file-from-scheme.patch +Patch21: 0001-ensure-checkForUniqueItem-on-inserting-a-new-slide.patch %if 0%{?fedora} >= 26 Patch400: 0001-Switch-from-orcus-0.11-to-orcus-0.12.patch @@ -2307,6 +2308,9 @@ done %endif %changelog +* Mon Nov 07 2016 Caolán McNamara - 1:5.2.3.3-5-UNBUILT +- ensure checkForUniqueItem on inserting a new slide + * Thu Nov 03 2016 Caolán McNamara - 1:5.2.3.3-4 - Related: rhbz#1390607 our side of per monitor fullscreen under wayland