Kaydet (Commit) f891420f authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Thorsten Behrens

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
üst 2840352b
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment