drawinglayer/source/primitive2d/Tools.cxx | 2 + drawinglayer/source/primitive2d/sceneprimitive2d.cxx | 2 - drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx | 9 +++++++ drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 11 --------- include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx | 12 +++++----- svx/source/sdr/contact/objectcontactofpageview.cxx | 6 +++-- 6 files changed, 23 insertions(+), 19 deletions(-)
New commits: commit 1f912bdbf7848f8d4073be62ccb589927d60a95f Author: Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de> AuthorDate: Thu Mar 21 17:02:54 2024 +0100 Commit: Armin Le Grand <armin.le.gr...@me.com> CommitDate: Thu Mar 21 21:39:45 2024 +0100 ITEM: Enable MultiThreaded 3D rendering Change-Id: I3155b075b150f04d0dc93833ab9b6f57eefe71db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165130 Tested-by: Jenkins Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index 5dac8e5c7223..11807e459b7f 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -422,7 +422,7 @@ namespace drawinglayer::primitive2d nOversampleValue ? nRasterHeight * nOversampleValue : nRasterHeight); // check for parallel execution possibilities - static bool bMultithreadAllowed = false; // loplugin:constvars:ignore + static bool bMultithreadAllowed = true; // loplugin:constvars:ignore sal_Int32 nThreadCount(0); comphelper::ThreadPool& rThreadPool(comphelper::ThreadPool::getSharedOptimalPool()); commit 0cc4333e6fce741c1316c7591e7a4a3e579cec49 Author: Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de> AuthorDate: Thu Mar 21 16:59:22 2024 +0100 Commit: Armin Le Grand <armin.le.gr...@me.com> CommitDate: Thu Mar 21 21:39:34 2024 +0100 Disable EditViewActive when Metafile output This was missing in the mechanism to suppress EditView exclusive content, so it is now also suppressed in PDF export. Also changed TextHierarchyEditPrimitive2D to also decide inside it's local get2DDecomposition implementation, so it does not need to be# supported in PrimitiveProcessors (and cannot be forgotten in future implementations). Also added support for EditView exclusive Primitive's name in idToString (missed that). Change-Id: I61efc9dddb7d6f0190c7b1fb4b0acf98ab5767f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165109 Tested-by: Jenkins Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> diff --git a/drawinglayer/source/primitive2d/Tools.cxx b/drawinglayer/source/primitive2d/Tools.cxx index 9c09ef24ee0c..e20c34a6c4f7 100644 --- a/drawinglayer/source/primitive2d/Tools.cxx +++ b/drawinglayer/source/primitive2d/Tools.cxx @@ -231,6 +231,8 @@ OUString idToString(sal_uInt32 nId) return "FILLEDRECTANGLEPRIMITIVE"; case PRIMITIVE2D_ID_SINGLELINEPRIMITIVE2D: return "SINGLELINEPRIMITIVE"; + case PRIMITIVE2D_ID_EXCLUSIVEEDITVIEWPRIMITIVE2D: + return "EXCLUSIVEEDITVIEWPRIMITIVE2D"; default: return OUString::number((nId >> 16) & 0xFF) + "|" + OUString::number(nId & 0xFF); } diff --git a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx index 172e8c758797..655918904cfb 100644 --- a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx @@ -141,6 +141,15 @@ namespace drawinglayer::primitive2d { } + void TextHierarchyEditPrimitive2D::get2DDecomposition( + Primitive2DDecompositionVisitor& rVisitor, + const geometry::ViewInformation2D& rViewInformation) const + { + // check if TextEdit is active. If not, process. If yes, suppress the content + if (!rViewInformation.getTextEditActive()) + GroupPrimitive2D::get2DDecomposition(rVisitor, rViewInformation); + } + // provide unique ID sal_uInt32 TextHierarchyEditPrimitive2D::getPrimitive2DID() const { diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index bb3e29bf8044..754b8cef2592 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -343,17 +343,6 @@ void VclPixelProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitiv processInvertPrimitive2D(rCandidate); break; } - case PRIMITIVE2D_ID_TEXTHIERARCHYEDITPRIMITIVE2D: - { - // check if TextEdit is active - if (getViewInformation2D().getTextEditActive()) - // suppress text display - break; - - // visualize text - process(rCandidate); - break; - } case PRIMITIVE2D_ID_EPSPRIMITIVE2D: { RenderEpsPrimitive2D(static_cast<const primitive2d::EpsPrimitive2D&>(rCandidate)); diff --git a/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx b/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx index dee28235f3b6..62cb9099c985 100644 --- a/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx @@ -159,12 +159,11 @@ namespace drawinglayer::primitive2d separate from other text data since some renderers need to suppress this output due to painting the edited text in e.g. an OutlinerEditView in the active text edit control. - It is derived from GroupPrimitive2D so decomposes to the contained - Text, thus it will get displayed everywhere except a renderer - checks for this Primitive and suppresses it actively. Remember that - this is also important e.g. for PDF export - if the object is in + It now uses get2DDecomposition to decide if to process or not, + thus it does not need to be processed in any B2DProcessor at all. + This is also important e.g. for PDF export - if the object is in edit mode, we need to include the most current text from EditEngine/ - Outliner to that export + Outliner to that export which is contained here. */ class DRAWINGLAYER_DLLPUBLIC TextHierarchyEditPrimitive2D final : public GroupPrimitive2D { @@ -172,6 +171,9 @@ namespace drawinglayer::primitive2d /// constructor explicit TextHierarchyEditPrimitive2D(Primitive2DContainer&& aContent); + /// local decomposition + virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override; + /// provide unique ID virtual sal_uInt32 getPrimitive2DID() const override; }; diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 33e3c3a1a637..ff79d5b88444 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -224,8 +224,10 @@ namespace sdr::contact if (static_cast<SdrPaintView&>(mrPageWindow.GetPageView().GetView()).IsTextEdit()) aNewViewInformation2D.setTextEditActive(true); - // this is the EditView repaint, provide that information - aNewViewInformation2D.setEditViewActive(true); + // this is the EditView repaint, provide that information, + // but only if we do not export to metafile + if (!isOutputToRecordingMetaFile()) + aNewViewInformation2D.setEditViewActive(true); updateViewInformation2D(aNewViewInformation2D);