diff options
Diffstat (limited to 'drawinglayer/source')
14 files changed, 34 insertions, 63 deletions
diff --git a/drawinglayer/source/primitive3d/groupprimitive3d.cxx b/drawinglayer/source/primitive3d/groupprimitive3d.cxx index a3056e3ed432..c50e29f04d8c 100644 --- a/drawinglayer/source/primitive3d/groupprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/groupprimitive3d.cxx @@ -22,9 +22,6 @@ #include <utility> -using namespace com::sun::star; - - namespace drawinglayer::primitive3d { GroupPrimitive3D::GroupPrimitive3D( Primitive3DContainer aChildren ) diff --git a/drawinglayer/source/primitive3d/hiddengeometryprimitive3d.cxx b/drawinglayer/source/primitive3d/hiddengeometryprimitive3d.cxx index 1a367e501d29..8d69d8741097 100644 --- a/drawinglayer/source/primitive3d/hiddengeometryprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hiddengeometryprimitive3d.cxx @@ -21,9 +21,6 @@ #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx> -using namespace com::sun::star; - - namespace drawinglayer::primitive3d { HiddenGeometryPrimitive3D::HiddenGeometryPrimitive3D( diff --git a/drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx b/drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx index 54fa166f055d..64ae9b949ca1 100644 --- a/drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx @@ -22,9 +22,6 @@ #include <utility> -using namespace com::sun::star; - - namespace drawinglayer::primitive3d { ModifiedColorPrimitive3D::ModifiedColorPrimitive3D( diff --git a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx index 09c8fb515933..5a03a89841e0 100644 --- a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx @@ -23,9 +23,6 @@ #include <utility> -using namespace com::sun::star; - - namespace drawinglayer::primitive3d { PolyPolygonMaterialPrimitive3D::PolyPolygonMaterialPrimitive3D( diff --git a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx index b4007f1a8705..7a6feb946ebc 100644 --- a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx @@ -23,9 +23,6 @@ #include <utility> -using namespace com::sun::star; - - namespace drawinglayer::primitive3d { basegfx::B3DRange SdrPrimitive3D::getStandard3DRange() const diff --git a/drawinglayer/source/primitive3d/shadowprimitive3d.cxx b/drawinglayer/source/primitive3d/shadowprimitive3d.cxx index 3c3a07ef7a2f..c32d17dbc69e 100644 --- a/drawinglayer/source/primitive3d/shadowprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/shadowprimitive3d.cxx @@ -22,9 +22,6 @@ #include <utility> -using namespace com::sun::star; - - namespace drawinglayer::primitive3d { ShadowPrimitive3D::ShadowPrimitive3D( diff --git a/drawinglayer/source/primitive3d/transformprimitive3d.cxx b/drawinglayer/source/primitive3d/transformprimitive3d.cxx index c7b926d8dc18..135cba2c55ab 100644 --- a/drawinglayer/source/primitive3d/transformprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/transformprimitive3d.cxx @@ -22,9 +22,6 @@ #include <utility> -using namespace com::sun::star; - - namespace drawinglayer::primitive3d { TransformPrimitive3D::TransformPrimitive3D( diff --git a/drawinglayer/source/processor2d/baseprocessor2d.cxx b/drawinglayer/source/processor2d/baseprocessor2d.cxx index 13d6b4c63b08..437faa3a5016 100644 --- a/drawinglayer/source/processor2d/baseprocessor2d.cxx +++ b/drawinglayer/source/processor2d/baseprocessor2d.cxx @@ -22,9 +22,6 @@ #include <utility> -using namespace com::sun::star; - - namespace drawinglayer::processor2d { void BaseProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& /*rCandidate*/) diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx index 65e8ef86a29e..e0b919464943 100644 --- a/drawinglayer/source/processor2d/contourextractor2d.cxx +++ b/drawinglayer/source/processor2d/contourextractor2d.cxx @@ -30,9 +30,6 @@ #include <drawinglayer/primitive2d/sceneprimitive2d.hxx> -using namespace com::sun::star; - - namespace drawinglayer::processor2d { ContourExtractor2D::ContourExtractor2D( diff --git a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx index 11af79725b41..1fd97ab110f6 100644 --- a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx +++ b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx @@ -24,9 +24,6 @@ #include <drawinglayer/primitive2d/transformprimitive2d.hxx> -using namespace com::sun::star; - - namespace drawinglayer::processor2d { LineGeometryExtractor2D::LineGeometryExtractor2D(const geometry::ViewInformation2D& rViewInformation) diff --git a/drawinglayer/source/processor2d/objectinfoextractor2d.cxx b/drawinglayer/source/processor2d/objectinfoextractor2d.cxx index 552406d53f68..d1162f6c2af3 100644 --- a/drawinglayer/source/processor2d/objectinfoextractor2d.cxx +++ b/drawinglayer/source/processor2d/objectinfoextractor2d.cxx @@ -21,8 +21,6 @@ #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> #include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx> -using namespace com::sun::star; - namespace drawinglayer::processor2d { void ObjectInfoPrimitiveExtractor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) diff --git a/drawinglayer/source/processor2d/processor2dtools.cxx b/drawinglayer/source/processor2d/processor2dtools.cxx index cf823b005ed8..585f312c7c60 100644 --- a/drawinglayer/source/processor2d/processor2dtools.cxx +++ b/drawinglayer/source/processor2d/processor2dtools.cxx @@ -29,8 +29,6 @@ #include <drawinglayer/processor2d/cairopixelprocessor2d.hxx> #endif -using namespace com::sun::star; - namespace drawinglayer::processor2d { std::unique_ptr<BaseProcessor2D> createPixelProcessor2DFromOutputDevice( diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 3cfec4af8b8d..e0a090cf9ecd 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -409,25 +409,29 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( const basegfx::B2DPoint aPoint(aLocalTransform * basegfx::B2DPoint(0.0, 0.0)); double aPointX = aPoint.getX(), aPointY = aPoint.getY(); - // aFont has an integer size; we must scale a bit for precision - double nFontScalingFixY = aFontScaling.getY() / aResultFontSize.Height(); - double nFontScalingFixX = aFontScaling.getX() - / (aResultFontSize.Width() ? aResultFontSize.Width() - : aResultFontSize.Height()); - - if (!rtl_math_approxEqual(nFontScalingFixY, 1.0) - || !rtl_math_approxEqual(nFontScalingFixX, 1.0)) + if (!comphelper::LibreOfficeKit::isActive()) { - MapMode aMapMode = mpOutputDevice->GetMapMode(); - aMapMode.SetScaleX(aMapMode.GetScaleX() * nFontScalingFixX); - aMapMode.SetScaleY(aMapMode.GetScaleY() * nFontScalingFixY); + // aFont has an integer size; we must scale a bit for precision + double nFontScalingFixY = aFontScaling.getY() / aResultFontSize.Height(); + double nFontScalingFixX + = aFontScaling.getX() + / (aResultFontSize.Width() ? aResultFontSize.Width() + : aResultFontSize.Height()); + + if (!rtl_math_approxEqual(nFontScalingFixY, 1.0) + || !rtl_math_approxEqual(nFontScalingFixX, 1.0)) + { + MapMode aMapMode = mpOutputDevice->GetMapMode(); + aMapMode.SetScaleX(aMapMode.GetScaleX() * nFontScalingFixX); + aMapMode.SetScaleY(aMapMode.GetScaleY() * nFontScalingFixY); - mpOutputDevice->Push(vcl::PushFlags::MAPMODE); - mpOutputDevice->SetRelativeMapMode(aMapMode); - bChangeMapMode = true; + mpOutputDevice->Push(vcl::PushFlags::MAPMODE); + mpOutputDevice->SetRelativeMapMode(aMapMode); + bChangeMapMode = true; - aPointX /= nFontScalingFixX; - aPointY /= nFontScalingFixY; + aPointX /= nFontScalingFixX; + aPointY /= nFontScalingFixY; + } } aStartPoint = Point(basegfx::fround<tools::Long>(aPointX), @@ -439,17 +443,21 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( mpOutputDevice->SetFont(aFont); mpOutputDevice->SetTextColor(Color(aRGBFontColor)); - if (!aDXArray.empty()) - { - const SalLayoutGlyphs* pGlyphs = SalLayoutGlyphsCache::self()->GetLayoutGlyphs( - mpOutputDevice, aText, nPos, nLen); - mpOutputDevice->DrawTextArray(aStartPoint, aText, aDXArray, - rTextCandidate.getKashidaArray(), nPos, nLen, - SalLayoutFlags::NONE, pGlyphs); - } - else { - mpOutputDevice->DrawText(aStartPoint, aText, nPos, nLen); + // For D2DWriteTextOutRenderer, we must pass a flag to not use font scaling + auto guard = mpOutputDevice->ScopedNoFontScaling(); + if (!aDXArray.empty()) + { + const SalLayoutGlyphs* pGlyphs = SalLayoutGlyphsCache::self()->GetLayoutGlyphs( + mpOutputDevice, aText, nPos, nLen); + mpOutputDevice->DrawTextArray(aStartPoint, aText, aDXArray, + rTextCandidate.getKashidaArray(), nPos, nLen, + SalLayoutFlags::NONE, pGlyphs); + } + else + { + mpOutputDevice->DrawText(aStartPoint, aText, nPos, nLen); + } } if (rTextCandidate.getFontAttribute().getRTL()) diff --git a/drawinglayer/source/processor3d/geometry2dextractor.cxx b/drawinglayer/source/processor3d/geometry2dextractor.cxx index 6959df6405e6..0d6dd53bb271 100644 --- a/drawinglayer/source/processor3d/geometry2dextractor.cxx +++ b/drawinglayer/source/processor3d/geometry2dextractor.cxx @@ -31,9 +31,6 @@ #include <utility> -using namespace com::sun::star; - - namespace drawinglayer::processor3d { // as tooling, the process() implementation takes over API handling and calls this |