diff options
6 files changed, 0 insertions, 153 deletions
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk index e8e3dde7c952..6409e379df6b 100644 --- a/drawinglayer/Library_drawinglayer.mk +++ b/drawinglayer/Library_drawinglayer.mk @@ -194,7 +194,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\ drawinglayer/source/processor2d/processor2dtools \ drawinglayer/source/processor2d/contourextractor2d \ drawinglayer/source/processor2d/getdigitlanguage \ - drawinglayer/source/processor2d/helperwrongspellrenderer \ drawinglayer/source/processor2d/hittestprocessor2d \ drawinglayer/source/processor2d/linegeometryextractor2d \ drawinglayer/source/processor2d/objectinfoextractor2d \ diff --git a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx deleted file mode 100644 index d4f14a13ce6c..000000000000 --- a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx +++ /dev/null @@ -1,78 +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 "helperwrongspellrenderer.hxx" -#include <drawinglayer/primitive2d/wrongspellprimitive2d.hxx> -#include <tools/gen.hxx> -#include <vcl/outdev.hxx> -#include <basegfx/color/bcolormodifier.hxx> -#include <vcl/outdev/ScopedStates.hxx> - -using namespace css; - -namespace drawinglayer -{ -namespace -{ -constexpr sal_uInt32 constMinimumFontHeight = 5; // #define WRONG_SHOW_MIN 5 -} - -bool renderWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellCandidate, - OutputDevice& rOutputDevice, - const basegfx::B2DHomMatrix& rObjectToViewTransformation, - const basegfx::BColorModifierStack& rBColorModifierStack) -{ - const basegfx::B2DHomMatrix aLocalTransform(rObjectToViewTransformation - * rWrongSpellCandidate.getTransformation()); - const basegfx::B2DVector aFontVectorPixel(aLocalTransform * basegfx::B2DVector(0.0, 1.0)); - const sal_uInt32 nFontPixelHeight(basegfx::fround(aFontVectorPixel.getLength())); - - if (nFontPixelHeight <= constMinimumFontHeight) - return true; - - const basegfx::B2DPoint aStart(aLocalTransform - * basegfx::B2DPoint(rWrongSpellCandidate.getStart(), 0.0)); - const basegfx::B2DPoint aStop(aLocalTransform - * basegfx::B2DPoint(rWrongSpellCandidate.getStop(), 0.0)); - const Point aVclStart(basegfx::fround<tools::Long>(aStart.getX()), - basegfx::fround<tools::Long>(aStart.getY())); - const Point aVclStop(basegfx::fround<tools::Long>(aStop.getX()), - basegfx::fround<tools::Long>(aStop.getY())); - - // #i101075# draw it. Do not forget to use the evtl. offsetted origin of the target device, - // e.g. when used with mask/transparence buffer device - const Point aOrigin(rOutputDevice.GetMapMode().GetOrigin()); - - const basegfx::BColor aProcessedColor( - rBColorModifierStack.getModifiedColor(rWrongSpellCandidate.getColor())); - const bool bMapModeEnabledState(rOutputDevice.IsMapModeEnabled()); - - vcl::ScopedAntialiasing a(rOutputDevice, true); - rOutputDevice.EnableMapMode(false); - rOutputDevice.SetLineColor(Color(aProcessedColor)); - rOutputDevice.SetFillColor(); - rOutputDevice.DrawWaveLine(aOrigin + aVclStart, aOrigin + aVclStop); - rOutputDevice.EnableMapMode(bMapModeEnabledState); - - // cannot really go wrong - return true; -} -} // end of namespace drawinglayer - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/source/processor2d/helperwrongspellrenderer.hxx b/drawinglayer/source/processor2d/helperwrongspellrenderer.hxx deleted file mode 100644 index 886ce99bb7ff..000000000000 --- a/drawinglayer/source/processor2d/helperwrongspellrenderer.hxx +++ /dev/null @@ -1,47 +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 . - */ - -#pragma once - -class OutputDevice; - -namespace drawinglayer::primitive2d -{ -class WrongSpellPrimitive2D; -} - -namespace basegfx -{ -class B2DHomMatrix; -class BColorModifierStack; -} - -// support WrongSpell rendering using VCL from primitives due to VCLs nice -// and fast solution with wavelines - -namespace drawinglayer -{ -bool renderWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellCandidate, - OutputDevice& rOutputDevice, - const basegfx::B2DHomMatrix& rObjectToViewTransformation, - const basegfx::BColorModifierStack& rBColorModifierStack); - -} // end of namespace drawinglayer - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index f6d684c06c3f..0ed950e5ffdb 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -19,7 +19,6 @@ #include "vclpixelprocessor2d.hxx" #include "vclhelperbufferdevice.hxx" -#include "helperwrongspellrenderer.hxx" #include <comphelper/lok.hxx> #include <sal/log.hxx> @@ -46,7 +45,6 @@ #include <drawinglayer/primitive2d/transformprimitive2d.hxx> #include <drawinglayer/primitive2d/markerarrayprimitive2d.hxx> #include <drawinglayer/primitive2d/glowprimitive2d.hxx> -#include <drawinglayer/primitive2d/wrongspellprimitive2d.hxx> #include <drawinglayer/primitive2d/controlprimitive2d.hxx> #include <drawinglayer/primitive2d/borderlineprimitive2d.hxx> #include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx> @@ -197,12 +195,6 @@ void VclPixelProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitiv { switch (rCandidate.getPrimitive2DID()) { - case PRIMITIVE2D_ID_WRONGSPELLPRIMITIVE2D: - { - processWrongSpellPrimitive2D( - static_cast<const primitive2d::WrongSpellPrimitive2D&>(rCandidate)); - break; - } case PRIMITIVE2D_ID_TEXTSIMPLEPORTIONPRIMITIVE2D: { processTextSimplePortionPrimitive2D( @@ -389,17 +381,6 @@ void VclPixelProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitiv } } -void VclPixelProcessor2D::processWrongSpellPrimitive2D( - const primitive2d::WrongSpellPrimitive2D& rWrongSpellPrimitive) -{ - if (!renderWrongSpellPrimitive2D(rWrongSpellPrimitive, *mpOutputDevice, maCurrentTransformation, - maBColorModifierStack)) - { - // fallback to decomposition (MetaFile) - process(rWrongSpellPrimitive); - } -} - void VclPixelProcessor2D::processTextSimplePortionPrimitive2D( const primitive2d::TextSimplePortionPrimitive2D& rCandidate) { diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx index 185ed52ed897..3cecf6622228 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx @@ -72,8 +72,6 @@ class VclPixelProcessor2D final : public VclProcessor2D bool tryDrawPolygonStrokePrimitive2DDirect(const primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency); - void - processWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellPrimitive); void processTextSimplePortionPrimitive2D( const primitive2d::TextSimplePortionPrimitive2D& rCandidate); void processTextDecoratedPortionPrimitive2D( diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index e0068fd159c7..39e5431a2581 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -435,12 +435,6 @@ namespace fStart = fTextWidth - fStart; fEnd = fTextWidth - fEnd; - - // tdf#151968 - // if start < end, OutputDevice::DrawWaveLine() will - // think it is a rotated line, so we swap fStart and - // fEnd to avoid this. - std::swap(fStart, fEnd); } // need to take FontScaling out of values; it's already part of |