summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-11 13:33:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-11 15:22:10 +0000
commit6811d2f85b49eafd0448de726d9a8287d81e7b1b (patch)
treef3b5b288574dedeed8def67c2a5e598b7df21119 /sd
parent7efde313c2b267714604120260f680aff276dc3c (diff)
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
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index fd8caccb25f5..ad1cd23fb9f1 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();