[Libreoffice-commits] core.git: include/vcl sd/source svx/source sw/source vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 22 21:17:46 UTC 2020


 include/vcl/mapmod.hxx                             |    3 +--
 sd/source/ui/view/DocumentRenderer.cxx             |    1 -
 svx/source/sdr/contact/objectcontactofpageview.cxx |    3 ---
 sw/source/core/access/accpara.cxx                  |    1 -
 vcl/source/graphic/GraphicObject.cxx               |    1 -
 5 files changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 2db9a6813a3640005d9b38e419d5cc55f70b03cc
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 22 17:16:01 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jan 22 22:17:12 2020 +0100

    flush out unused MapModes
    
    Change-Id: I691143162bf9a26171f3ede3bded34c7fb985244
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87207
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/mapmod.hxx b/include/vcl/mapmod.hxx
index 487f039687ab..e6c96048c90c 100644
--- a/include/vcl/mapmod.hxx
+++ b/include/vcl/mapmod.hxx
@@ -30,8 +30,7 @@ class Point;
 class Fraction;
 class SvStream;
 
-
-class VCL_DLLPUBLIC MapMode
+class SAL_WARN_UNUSED VCL_DLLPUBLIC MapMode
 {
     friend class        OutputDevice;
 
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index b649c4c22484..70651b81b51b 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1044,7 +1044,6 @@ namespace {
             }
             rViewShell.SetPrintedHandoutPageNum( mnHandoutPageIndex + 1 );
 
-            MapMode aMap (rPrinter.GetMapMode());
             rPrinter.SetMapMode(maMap);
 
             PrintPage(
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 9a1acfc71b88..a1b72feb6b87 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -274,9 +274,6 @@ namespace sdr::contact
                 rDisplayInfo.ClearGhostedDrawMode(); // reset, else the VCL-paint with the processor will not do the right thing
                 pOutDev->SetLayoutMode(ComplexTextLayoutFlags::Default); // reset, default is no BiDi/RTL
 
-                // Save the map-mode since creating the 2D processor will replace it.
-                const MapMode aOrigMapMode = pOutDev->GetMapMode();
-
                 // create renderer
                 std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(
                     drawinglayer::processor2d::createProcessor2DFromOutputDevice(
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 0ffeea847e82..8b4a1658d5e4 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -2123,7 +2123,6 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
     Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() );
     aPoint.setX(aPoint.getX() + aPixPos.getX());
     aPoint.setY(aPoint.getY() + aPixPos.getY());
-    MapMode aMapMode = pWin->GetMapMode();
     Point aCorePoint( GetMap()->PixelToCore( aPoint ) );
     if( !aLogBounds.IsInside( aCorePoint ) )
     {
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index 7f6a343b0050..1cf7ccd8bb0f 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -530,7 +530,6 @@ void GraphicObject::DrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea
         return;
 
     const MapMode   aOutMapMode( pOut->GetMapMode() );
-    const MapMode   aMapMode( aOutMapMode.GetMapUnit(), Point(), aOutMapMode.GetScaleX(), aOutMapMode.GetScaleY() );
     // #106258# Clamp size to 1 for zero values. This is okay, since
     // logical size of zero is handled above already
     const Size      aOutTileSize( ::std::max( 1L, pOut->LogicToPixel( rSize, aOutMapMode ).Width() ),


More information about the Libreoffice-commits mailing list