diff options
-rw-r--r-- | drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 30 | ||||
-rw-r--r-- | drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx | 2 |
2 files changed, 29 insertions, 3 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index ce5c579b5646..71a6125e2ff1 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -563,7 +563,9 @@ namespace drawinglayer mnSvtGraphicStrokeCount(0), mfCurrentUnifiedTransparence(0.0), mpPDFExtOutDevData(dynamic_cast< vcl::PDFExtOutDevData* >(rOutDev.GetExtOutDevData())), - mnCurrentOutlineLevel(-1) + mnCurrentOutlineLevel(-1), + mbInListItem(false), + mbBulletPresent(false) { OSL_ENSURE(rOutDev.GetConnectMetaFile(), "VclMetafileProcessor2D: Used on OutDev which has no MetaFile Target (!)"); // draw to logic coordinates, do not initialize maCurrentTransformation to viewTransformation @@ -1232,9 +1234,19 @@ namespace drawinglayer // "XTEXT_EOC" is used, use here, too. const OString aCommentString("XTEXT_EOC"); + // this is a part of list item, start LILabel ( = bullet) + if(mbInListItem) + mpPDFExtOutDevData->BeginStructureElement(vcl::PDFWriter::LILabel); + // process recursively and add MetaFile comment process(rBulletPrimitive); mpMetaFile->AddAction(new MetaCommentAction(aCommentString)); + + if(mbInListItem) + { + mpPDFExtOutDevData->EndStructureElement(); // end LILabel + mbBulletPresent = true; + } } void VclMetafileProcessor2D::processTextHierarchyParagraphPrimitive2D(const primitive2d::TextHierarchyParagraphPrimitive2D& rParagraphPrimitive) @@ -1301,7 +1313,7 @@ namespace drawinglayer { // Dump as ListItem mpPDFExtOutDevData->BeginStructureElement( vcl::PDFWriter::ListItem ); - mpPDFExtOutDevData->BeginStructureElement( vcl::PDFWriter::LIBody ); + mbInListItem = true; } else { @@ -1315,7 +1327,8 @@ namespace drawinglayer if(bDumpAsListItem) { - mpPDFExtOutDevData->EndStructureElement(); + mpPDFExtOutDevData->EndStructureElement(); // end ListItem + mbInListItem = false; } mpPDFExtOutDevData->EndStructureElement(); @@ -1338,9 +1351,20 @@ namespace drawinglayer const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode()); adaptTextToFillDrawMode(); + // this is a 2nd portion of list item + // bullet has been already processed, start LIBody + if (mbInListItem && mbBulletPresent) + mpPDFExtOutDevData->BeginStructureElement(vcl::PDFWriter::LIBody); + // directdraw of text simple portion; use default processing RenderTextSimpleOrDecoratedPortionPrimitive2D(rTextCandidate); + if (mbInListItem && mbBulletPresent) + { + mpPDFExtOutDevData->EndStructureElement(); // end LIBody + mbBulletPresent = false; + } + // restore DrawMode mpOutputDevice->SetDrawMode(nOriginalDrawMode); diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx index 410f332cbd76..3806a683b4da 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx @@ -174,6 +174,8 @@ namespace drawinglayer // like '/L', '/LI', 'LBody' instead of simple '/P' (Paragraph). // The value -1 means 'no OutlineLevel' and values >= 0 express the level. sal_Int16 mnCurrentOutlineLevel; + bool mbInListItem; + bool mbBulletPresent; protected: /* the local processor for BasePrimitive2D-Implementation based primitives, |