diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2019-01-15 14:11:49 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-03-12 22:24:47 +0100 |
commit | e70b2e2bb30bde3d8c60efdd4c588ebb3c5a2481 (patch) | |
tree | 2df6c36ef82a6af4217c59f22c5e8befe41a2446 | |
parent | ef03e3a0b10104d0ff4dd96d9d14f00d8bc7a972 (diff) |
Different way to determine if paragraph is within a list
pptx import seems little flaky in this regard, EE_PARA_OUTLLEVEL
isn't always set (no such problem with odp). Instead, we'll query
paragraph's depth and visibility of bullets/numbering
Change-Id: Ia8cf6b7bb0e065a1378875442a99d79b006e2d77
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 05490ba7960d..ff83f15c4274 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -500,15 +500,15 @@ namespace void impTextBreakupHandler::impFlushLinePrimitivesToParagraphPrimitives(sal_Int32 nPara) { + sal_Int16 nDepth = mrOutliner.GetDepth(nPara); + EBulletInfo eInfo = mrOutliner.GetBulletInfo(nPara); + // Pass -1 to signal VclMetafileProcessor2D that there is no active + // bullets/numbering in this paragraph (i.e. this is normal text) + const sal_Int16 nOutlineLevel( eInfo.bVisible ? nDepth : -1); + // ALWAYS create a paragraph primitive, even when no content was added. This is done to // have the correct paragraph count even with empty paragraphs. Those paragraphs will // have an empty sub-PrimitiveSequence. - const sal_Int16 nOutlineLevel(nPara >= 0 && nPara < mrOutliner.GetParagraphCount() - ? mrOutliner.GetParaAttribs(nPara).Get(EE_PARA_OUTLLEVEL).GetValue() - : -1); - - //Z This basically makes OutlineLevel information available in VclMetafileProcessor2D, - //Z so may be used similar to 'SetAlternateText' in processGraphicPrimitive2D for PDF export maParagraphPrimitives.push_back( new drawinglayer::primitive2d::TextHierarchyParagraphPrimitive2D( maLinePrimitives, |