summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2022-11-18 11:01:23 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2022-11-18 20:59:47 +0100
commit785aa638acb920316fe78bedab3a512fb384535a (patch)
treed5fac08e3a10625b427a1fb9f59833124a5f52a8 /drawinglayer
parent50d73574b6c3d71f9a539c895a15d6fcda22390b (diff)
Turn around usage of TextHierarchyEditPrimitive2D
This primitive is created if a text edit is active and contains it's current content, not from model data itself. Pixel renderers need to suppress that content, it gets displayed by the active TextEdit in the EditView. Suppression is done by decomposing to nothing by default. MetaFile renderers have to show it, so that the edited text is part of the MetaFile, e.g. needed for presentation previews and exports. So take action here and process it's content. Note: Former error was #i97628# Change-Id: I32c83c0ad7883a79fc40f5a21ac6ed7b1055b7df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142910 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx5
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx14
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx11
3 files changed, 17 insertions, 13 deletions
diff --git a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
index c7af9562adc1..93cb4e455d76 100644
--- a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
@@ -136,8 +136,9 @@ namespace drawinglayer::primitive2d
}
- TextHierarchyEditPrimitive2D::TextHierarchyEditPrimitive2D(Primitive2DContainer&& aChildren)
- : GroupPrimitive2D(std::move(aChildren))
+ TextHierarchyEditPrimitive2D::TextHierarchyEditPrimitive2D(Primitive2DContainer&& aContent)
+ : BasePrimitive2D()
+ , maContent(std::move(aContent))
{
}
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 539e01282a2f..eb5f32e0c678 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -926,6 +926,20 @@ void VclMetafileProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimi
static_cast<const primitive2d::StructureTagPrimitive2D&>(rCandidate));
break;
}
+ case PRIMITIVE2D_ID_TEXTHIERARCHYEDITPRIMITIVE2D:
+ {
+ // This primitive is created if a text edit is active and contains it's
+ // current content, not from model data itself.
+ // Pixel renderers need to suppress that content, it gets displayed by the active
+ // TextEdit in the EditView. Suppression is done by decomposing to nothing.
+ // MetaFile renderers have to show it, so that the edited text is part of the
+ // MetaFile, e.g. needed for presentation previews and exports.
+ // So take action here and process it's content:
+ // Note: Former error was #i97628#
+ process(static_cast<const primitive2d::TextHierarchyEditPrimitive2D&>(rCandidate)
+ .getContent());
+ break;
+ }
case PRIMITIVE2D_ID_EPSPRIMITIVE2D:
{
RenderEpsPrimitive2D(static_cast<const primitive2d::EpsPrimitive2D&>(rCandidate));
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index f701ad9bbeeb..7852131ee98f 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -355,17 +355,6 @@ void VclPixelProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitiv
static_cast<const primitive2d::BackgroundColorPrimitive2D&>(rCandidate));
break;
}
- case PRIMITIVE2D_ID_TEXTHIERARCHYEDITPRIMITIVE2D:
- {
- // #i97628#
- // This primitive means that the content is derived from an active text edit,
- // not from model data itself. Some renderers need to suppress this content, e.g.
- // the pixel renderer used for displaying the edit view (like this one). It's
- // not to be suppressed by the MetaFile renderers, so that the edited text is
- // part of the MetaFile, e.g. needed for presentation previews.
- // Action: Ignore here, do nothing.
- break;
- }
case PRIMITIVE2D_ID_INVERTPRIMITIVE2D:
{
processInvertPrimitive2D(rCandidate);