summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2019-01-15 14:11:49 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2019-02-05 13:16:23 +0100
commit45d324d05f93253085d4c9718480107c4ac728d4 (patch)
tree31eb55e47c7e1f5110401e5a3a502a233fabbd37
parentee348665f268322243884b23fd7be039c2d31e6f (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 (cherry picked from commit 2f5c61ce217c5db20059b16f681d65580a7577c7)
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx12
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,