summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2022-11-05 14:51:14 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2022-11-06 11:57:01 +0100
commita28f89581c0395f4af76161e1c99302d9f665a8f (patch)
tree0799808904ac3eb7bc63bc26f5da0669111c80bc /drawinglayer
parent64469bb1a7383da6e7ff1150d693b3e08f54bc91 (diff)
Remove double functionality
There was processorfromoutputdevice.cxx|hxx containing createBaseProcessor2DFromOutputDevice that does exactly the same thing as createProcessor2DFromOutputDevice in processor2dtools.cxx|hxx, so I removed one onf them to make handling of future changes easier. Change-Id: Id8d49d1572a1bc39f1d330a742d4697c8c030e75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142320 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/Library_drawinglayer.mk1
-rw-r--r--drawinglayer/qa/unit/border.cxx4
-rw-r--r--drawinglayer/qa/unit/vclmetafileprocessor2d.cxx4
-rw-r--r--drawinglayer/qa/unit/vclpixelprocessor2d.cxx4
-rw-r--r--drawinglayer/source/processor2d/processorfromoutputdevice.cxx50
5 files changed, 6 insertions, 57 deletions
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 28e073f983c8..8945e1c462c8 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -165,7 +165,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
drawinglayer/source/processor2d/hittestprocessor2d \
drawinglayer/source/processor2d/linegeometryextractor2d \
drawinglayer/source/processor2d/objectinfoextractor2d \
- drawinglayer/source/processor2d/processorfromoutputdevice \
drawinglayer/source/processor2d/textaspolygonextractor2d \
drawinglayer/source/processor2d/vclhelperbufferdevice \
drawinglayer/source/processor2d/vclmetafileprocessor2d \
diff --git a/drawinglayer/qa/unit/border.cxx b/drawinglayer/qa/unit/border.cxx
index 53bd420ee726..f6f9feba5427 100644
--- a/drawinglayer/qa/unit/border.cxx
+++ b/drawinglayer/qa/unit/border.cxx
@@ -15,7 +15,7 @@
#include <drawinglayer/primitive2d/borderlineprimitive2d.hxx>
#include <drawinglayer/primitive2d/PolygonStrokePrimitive2D.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
-#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
#include <rtl/ref.hxx>
#include <test/bootstrapfixture.hxx>
#include <vcl/metaact.hxx>
@@ -93,7 +93,7 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoublePixelProcessing)
ScopedVclPtrInstance<VirtualDevice> pDev;
drawinglayer::geometry::ViewInformation2D aView;
std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(
- drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(*pDev, aView));
+ drawinglayer::processor2d::createProcessor2DFromOutputDevice(*pDev, aView));
CPPUNIT_ASSERT(pProcessor);
GDIMetaFile aMetaFile;
// Start recording after the processor is created, so we can test the pixel processor.
diff --git a/drawinglayer/qa/unit/vclmetafileprocessor2d.cxx b/drawinglayer/qa/unit/vclmetafileprocessor2d.cxx
index 0467df867f63..4f0a312ec1d7 100644
--- a/drawinglayer/qa/unit/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/qa/unit/vclmetafileprocessor2d.cxx
@@ -19,7 +19,7 @@
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <drawinglayer/primitive2d/PolygonStrokePrimitive2D.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
-#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
#include <cppcanvas/vclfactory.hxx>
#include <com/sun/star/rendering/XCanvas.hpp>
@@ -83,7 +83,7 @@ public:
metafile.Record(metadevice);
drawinglayer::geometry::ViewInformation2D view;
std::unique_ptr<processor2d::BaseProcessor2D> processor(
- processor2d::createBaseProcessor2DFromOutputDevice(*metadevice, view));
+ processor2d::createProcessor2DFromOutputDevice(*metadevice, view));
CPPUNIT_ASSERT(processor);
// Match the values Impress uses.
basegfx::B2DPolygon polygon = { { 15601, 0 }, { 15602, 5832 } };
diff --git a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
index 17ef17969fe4..daf54c910e29 100644
--- a/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
+++ b/drawinglayer/qa/unit/vclpixelprocessor2d.cxx
@@ -17,7 +17,7 @@
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
-#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
using namespace drawinglayer;
@@ -53,7 +53,7 @@ public:
drawinglayer::geometry::ViewInformation2D view;
std::unique_ptr<processor2d::BaseProcessor2D> processor(
- processor2d::createBaseProcessor2DFromOutputDevice(*device, view));
+ processor2d::createProcessor2DFromOutputDevice(*device, view));
CPPUNIT_ASSERT(processor);
basegfx::B2DRange definitionRange(0, 0, 100, 200);
diff --git a/drawinglayer/source/processor2d/processorfromoutputdevice.cxx b/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
deleted file mode 100644
index c8433753aeff..000000000000
--- a/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <vcl/outdev.hxx>
-#include <vcl/gdimtf.hxx>
-#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
-#include "vclmetafileprocessor2d.hxx"
-#include "vclpixelprocessor2d.hxx"
-
-using namespace com::sun::star;
-
-namespace drawinglayer::processor2d
-{
- std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> createBaseProcessor2DFromOutputDevice(
- OutputDevice& rTargetOutDev,
- const drawinglayer::geometry::ViewInformation2D& rViewInformation2D)
- {
- const GDIMetaFile* pMetaFile = rTargetOutDev.GetConnectMetaFile();
- const bool bOutputToRecordingMetaFile(pMetaFile && pMetaFile->IsRecord() && !pMetaFile->IsPause());
-
- if(bOutputToRecordingMetaFile)
- {
- // create MetaFile Vcl-Processor and process
- return std::make_unique<drawinglayer::processor2d::VclMetafileProcessor2D>(rViewInformation2D, rTargetOutDev);
- }
- else
- {
- // create Pixel Vcl-Processor
- return std::make_unique<drawinglayer::processor2d::VclPixelProcessor2D>(rViewInformation2D, rTargetOutDev);
- }
- }
-} // end of namespace
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */