diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2019-01-15 14:11:49 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-02-06 16:46:08 +0100 |
commit | f891420f1689711e819f87e10dcfe38fe64eb038 (patch) | |
tree | 41b25311799d84133a48a3efe330e09b032563e9 /svx | |
parent | 2840352ba56a212d191cc16e08378c87672d7b73 (diff) |
Use different way to determine if paragraph is in 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
Diffstat (limited to 'svx')
-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 fb02ac86b79a..a4b7163d1977 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -484,15 +484,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, |