strip hard coded numbering off outline master previews

f41
Caolán McNamara 10 years ago
parent 0e560ad933
commit db2be71ab7

@ -0,0 +1,67 @@
From 0f1fc84029475565fda1bad43d99a114391afdc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 11 Nov 2014 13:33:53 +0000
Subject: [PATCH] strip off hard-coded numbering from outliner preview on load
how to reproduce an outline which won't update wrt the numbering style
file->new->presentation
view->master->slide master
select first entry of outliner, i.e. "Click to edit the outline text format"
make it underlined, save, reload
view->master->slide master
now use bullet and numbering
set level 1 to e.g. none, ok
nothing happens to the outliner. It remains "stuck" with its default numbering
Change-Id: I95708b1f1c9cc74ae5129dbfad8ca0d37b00fa13
---
sd/source/filter/xml/sdxmlwrp.cxx | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index fd8cacc..ad1cd23 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -55,6 +55,7 @@
#include <com/sun/star/io/XActiveDataControl.hpp>
#include <comphelper/genericpropertyset.hxx>
#include <comphelper/propertysetinfo.hxx>
+#include <editeng/eeitem.hxx>
#include <unotools/saveopt.hxx>
// include necessary for XML progress bar at load time
@@ -444,6 +445,7 @@ void fixupOutlinePlaceholderNumberingDepths(SdDrawDocument* pDoc)
const sal_Int32 nParaCount = pOutliner->GetParagraphCount();
for (sal_Int32 j = 0; j < nParaCount; ++j)
{
+ //Make sure the depth of the paragraph matches that of the outline style it previews
const sal_Int16 nExpectedDepth = j;
if (nExpectedDepth != pOutliner->GetDepth(j))
{
@@ -451,10 +453,21 @@ void fixupOutlinePlaceholderNumberingDepths(SdDrawDocument* pDoc)
pOutliner->SetDepth(p, nExpectedDepth);
bInconsistent = true;
}
+
+ //If the preview has hard-coded bullets/numbering then they must
+ //be stripped to reveal the true underlying styles attributes
+ SfxItemSet aAttrs(pOutliner->GetParaAttribs(j));
+ if (aAttrs.GetItemState(EE_PARA_NUMBULLET) == SfxItemState::SET)
+ {
+ aAttrs.ClearItem(EE_PARA_NUMBULLET);
+ pOutliner->SetParaAttribs(j, aAttrs);
+ bInconsistent = true;
+ }
+
}
if (bInconsistent)
{
- SAL_WARN("sd.filter", "Fixing inconsistent outline numbering placeholder preview depth");
+ SAL_WARN("sd.filter", "Fixing inconsistent outline numbering placeholder preview");
pMasterOutline->SetOutlinerParaObject(pOutliner->CreateParaObject(0, nParaCount));
}
pOutliner->Clear();
--
1.9.3

@ -46,7 +46,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice Name: libreoffice
Epoch: 1 Epoch: 1
Version: %{libo_version}.2 Version: %{libo_version}.2
Release: 5%{?libo_prerelease}%{?dist} Release: 6%{?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 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
Group: Applications/Productivity Group: Applications/Productivity
URL: http://www.libreoffice.org/ URL: http://www.libreoffice.org/
@ -355,6 +355,7 @@ Patch57: 0001-fdo-80284-Avoid-broadcasting-during-cell-delete-shif.patch
Patch58: 0001-fdo-82047-Correctly-adjust-references-in-range-names.patch Patch58: 0001-fdo-82047-Correctly-adjust-references-in-range-names.patch
Patch59: 0001-fdo-85215-Don-t-adjust-references-wrt-cell-position-.patch Patch59: 0001-fdo-85215-Don-t-adjust-references-wrt-cell-position-.patch
Patch60: 0001-fdo-85403-broadcast-changes-after-TextToColumn.patch Patch60: 0001-fdo-85403-broadcast-changes-after-TextToColumn.patch
Patch61: 0001-strip-off-hard-coded-numbering-from-outliner-preview.patch
%define instdir %{_libdir} %define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice %define baseinstdir %{instdir}/libreoffice
@ -2321,6 +2322,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif %endif
%changelog %changelog
* Tue Nov 11 2014 Caolán McNamara <caolanm@redhat.com> - 1:4.3.3.2-6
- strip hard coded numbering off outline master previews
* Tue Nov 11 2014 Caolán McNamara <caolanm@redhat.com> - 1:4.3.3.2-5 * Tue Nov 11 2014 Caolán McNamara <caolanm@redhat.com> - 1:4.3.3.2-5
- Resolves: rhbz#1161238 sync PRESOBJ_OUTLINE para depth on load - Resolves: rhbz#1161238 sync PRESOBJ_OUTLINE para depth on load

Loading…
Cancel
Save