basegfx/source/curve/b2dcubicbezier.cxx                      |   24 +++----
 canvas/source/directx/dx_textlayout_drawhelper.cxx           |    4 -
 canvas/source/opengl/ogl_canvashelper.cxx                    |    2 
 canvas/source/tools/surface.cxx                              |    9 --
 canvas/source/vcl/canvasfont.cxx                             |    2 
 canvas/source/vcl/canvashelper.cxx                           |    4 -
 canvas/source/vcl/canvashelper_texturefill.cxx               |   36 +++++------
 canvas/source/vcl/impltools.cxx                              |    8 +-
 chart2/source/controller/main/SelectionHelper.cxx            |    2 
 cppcanvas/source/mtfrenderer/transparencygroupaction.cxx     |    4 -
 cui/source/tabpages/transfrm.cxx                             |    4 -
 drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx |    2 
 drawinglayer/source/processor2d/SDPRProcessor2dTools.cxx     |    6 +
 drawinglayer/source/processor2d/helperwrongspellrenderer.cxx |    6 +
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx   |   32 +++++----
 drawinglayer/source/processor2d/vclprocessor2d.cxx           |   19 +++--
 drawinglayer/source/tools/converters.cxx                     |    2 
 editeng/source/editeng/impedit3.cxx                          |    6 -
 editeng/source/editeng/impedit4.cxx                          |    3 
 editeng/source/outliner/outliner.cxx                         |    4 -
 emfio/source/reader/mtftools.cxx                             |    6 -
 filter/source/msfilter/escherex.cxx                          |    2 
 filter/source/msfilter/eschesdo.cxx                          |    4 -
 filter/source/svg/svgfilter.cxx                              |    2 
 include/basegfx/numeric/ftools.hxx                           |   16 ++++
 include/svx/transfrmhelper.hxx                               |    8 +-
 oox/source/export/drawingml.cxx                              |    2 
 sc/source/core/data/drwlayer.cxx                             |    4 -
 sc/source/ui/miscdlgs/autofmt.cxx                            |    8 +-
 sc/source/ui/view/drawview.cxx                               |    4 -
 sd/qa/unit/layout-tests.cxx                                  |    6 -
 sd/source/core/sdpage.cxx                                    |   16 ++--
 slideshow/source/engine/eventmultiplexer.cxx                 |    8 +-
 slideshow/source/engine/slideview.cxx                        |    4 -
 svx/source/customshapes/EnhancedCustomShape3d.cxx            |    2 
 svx/source/dialog/frmsel.cxx                                 |   12 +--
 svx/source/engine3d/obj3d.cxx                                |    2 
 svx/source/engine3d/view3d.cxx                               |    6 -
 svx/source/svdraw/svdcrtv.cxx                                |    4 -
 svx/source/svdraw/svddrgmt.cxx                               |   16 ++--
 svx/source/svdraw/svddrgv.cxx                                |   16 ++--
 svx/source/svdraw/svdedxv.cxx                                |    8 +-
 svx/source/svdraw/svdfmtf.cxx                                |    8 +-
 svx/source/svdraw/svdmrkv.cxx                                |   12 +--
 svx/source/svdraw/svdoedge.cxx                               |   16 ++--
 svx/source/svdraw/svdograf.cxx                               |   16 ++--
 svx/source/svdraw/svdomeas.cxx                               |    6 -
 svx/source/svdraw/svdpdf.cxx                                 |    8 +-
 svx/source/unodraw/UnoGraphicExporter.cxx                    |    8 +-
 svx/source/unodraw/unoshape.cxx                              |    8 +-
 sw/source/core/draw/dflyobj.cxx                              |   32 ++++-----
 sw/source/core/layout/wsfrm.cxx                              |   28 ++++----
 sw/source/ui/table/autoformatpreview.cxx                     |   15 ++--
 vcl/source/bitmap/BitmapEx.cxx                               |    2 
 vcl/source/bitmap/BitmapTools.cxx                            |   16 ++--
 vcl/source/gdi/gdimetafiletools.cxx                          |    8 +-
 vcl/source/gdi/impgraph.cxx                                  |    6 -
 vcl/source/gdi/region.cxx                                    |    4 -
 vcl/source/gdi/regionband.cxx                                |    4 -
 vcl/source/graphic/GraphicObject.cxx                         |    8 +-
 vcl/source/outdev/bitmapex.cxx                               |   18 ++---
 vcl/source/outdev/text.cxx                                   |    2 
 vcl/source/window/printdlg.cxx                               |    4 -
 vcl/win/gdi/gdiimpl.cxx                                      |    4 -
 64 files changed, 297 insertions(+), 271 deletions(-)

New commits:
commit 690526f95e3ee4fd25bb2c987e093543e4bc435b
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Apr 14 12:50:42 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Apr 15 06:34:33 2024 +0200

    Generalize basegfx::fround for templated return type
    
    And use it when assigning to tools::Long
    
    Change-Id: I0814d7bac9cdd48191ba69c64e3b12a4973b3417
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166071
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/basegfx/source/curve/b2dcubicbezier.cxx 
b/basegfx/source/curve/b2dcubicbezier.cxx
index fa7b69e1e5e8..3f5d87aa79f6 100644
--- a/basegfx/source/curve/b2dcubicbezier.cxx
+++ b/basegfx/source/curve/b2dcubicbezier.cxx
@@ -1011,33 +1011,33 @@ namespace basegfx
         if(maControlPointA == maStartPoint)
         {
             maControlPointA = maStartPoint = basegfx::B2DPoint(
-                basegfx::fround(maStartPoint.getX()),
-                basegfx::fround(maStartPoint.getY()));
+                std::round(maStartPoint.getX()),
+                std::round(maStartPoint.getY()));
         }
         else
         {
             maStartPoint = basegfx::B2DPoint(
-                basegfx::fround(maStartPoint.getX()),
-                basegfx::fround(maStartPoint.getY()));
+                std::round(maStartPoint.getX()),
+                std::round(maStartPoint.getY()));
             maControlPointA = basegfx::B2DPoint(
-                basegfx::fround(maControlPointA.getX()),
-                basegfx::fround(maControlPointA.getY()));
+                std::round(maControlPointA.getX()),
+                std::round(maControlPointA.getY()));
         }
 
         if(maControlPointB == maEndPoint)
         {
             maControlPointB = maEndPoint = basegfx::B2DPoint(
-                basegfx::fround(maEndPoint.getX()),
-                basegfx::fround(maEndPoint.getY()));
+                std::round(maEndPoint.getX()),
+                std::round(maEndPoint.getY()));
         }
         else
         {
             maEndPoint = basegfx::B2DPoint(
-                basegfx::fround(maEndPoint.getX()),
-                basegfx::fround(maEndPoint.getY()));
+                std::round(maEndPoint.getX()),
+                std::round(maEndPoint.getY()));
             maControlPointB = basegfx::B2DPoint(
-                basegfx::fround(maControlPointB.getX()),
-                basegfx::fround(maControlPointB.getY()));
+                std::round(maControlPointB.getX()),
+                std::round(maControlPointB.getY()));
         }
     }
 } // end of namespace basegfx
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx 
b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index 3a01af375ab1..efdf8bf03cfb 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -112,7 +112,7 @@ namespace dxcanvas
             vcl::Font aFont(
                 rFontRequest.FontDescription.FamilyName,
                 rFontRequest.FontDescription.StyleName,
-                Size( 0, ::basegfx::fround(rFontRequest.CellSize)));
+                Size( 0, 
::basegfx::fround<::tools::Long>(rFontRequest.CellSize)));
 
             aFont.SetAlignment( ALIGN_BASELINE );
             aFont.SetCharSet( 
(rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? 
RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
@@ -256,7 +256,7 @@ namespace dxcanvas
         vcl::Font aFont(
             rFontRequest.FontDescription.FamilyName,
             rFontRequest.FontDescription.StyleName,
-            Size( 0, ::basegfx::fround(rFontRequest.CellSize)));
+            Size( 0, ::basegfx::fround<::tools::Long>(rFontRequest.CellSize)));
 
         aFont.SetAlignment( ALIGN_BASELINE );
         aFont.SetCharSet( 
(rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? 
RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx 
b/canvas/source/opengl/ogl_canvashelper.cxx
index 47d46a9dfb9b..df85d1ab428f 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -690,7 +690,7 @@ namespace oglcanvas
                 vcl::Font aFont(
                     rFontRequest.FontDescription.FamilyName,
                     rFontRequest.FontDescription.StyleName,
-                    Size( 0, ::basegfx::fround(rFontRequest.CellSize)));
+                    Size( 0, 
::basegfx::fround<tools::Long>(rFontRequest.CellSize)));
 
                 aFont.SetAlignment( ALIGN_BASELINE );
                 aFont.SetCharSet( 
(rFontRequest.FontDescription.IsSymbolFont==util::TriState_YES) ? 
RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
diff --git a/canvas/source/tools/surface.cxx b/canvas/source/tools/surface.cxx
index 88d20bbcfed8..ff5dce985048 100644
--- a/canvas/source/tools/surface.cxx
+++ b/canvas/source/tools/surface.cxx
@@ -117,8 +117,7 @@ namespace canvas
         basegfx::B2DHomMatrix 
aTransform(basegfx::utils::createTranslateB2DHomMatrix(
             maSourceOffset.getX(), maSourceOffset.getY()));
         aTransform = aTransform * rTransform;
-        aTransform.translate(::basegfx::fround(rPos.getX()),
-                             ::basegfx::fround(rPos.getY()));
+        aTransform.translate(rPos);
 
         /*
             ######################################
@@ -237,8 +236,7 @@ namespace canvas
         // 3) translation to output position [rPos]
         basegfx::B2DHomMatrix 
aTransform(basegfx::utils::createTranslateB2DHomMatrix(aPos1.getX(), 
aPos1.getY()));
         aTransform = aTransform * rTransform;
-        aTransform.translate(::basegfx::fround(rPos.getX()),
-                             ::basegfx::fround(rPos.getY()));
+        aTransform.translate(rPos);
 
 
         /*
@@ -333,8 +331,7 @@ namespace canvas
         // be calculated from the result, and this is why we need to use
         // integer coordinates here...
         basegfx::B2DHomMatrix aTransform = rTransform;
-        aTransform.translate(::basegfx::fround(rPos.getX()),
-                             ::basegfx::fround(rPos.getY()));
+        aTransform.translate(rPos);
 
         /*
             ######################################
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index b587a5b64167..235f72fbb514 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -43,7 +43,7 @@ namespace vclcanvas
                             const OutDevProviderSharedPtr&                  
rOutDevProvider ) :
         maFont( vcl::Font( rFontRequest.FontDescription.FamilyName,
                       rFontRequest.FontDescription.StyleName,
-                      Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ),
+                      Size( 0, 
::basegfx::fround<::tools::Long>(rFontRequest.CellSize) ) ) ),
         maFontRequest( rFontRequest ),
         mpRefDevice( &rDevice ),
         mpOutDevProvider( rOutDevProvider ),
diff --git a/canvas/source/vcl/canvashelper.cxx 
b/canvas/source/vcl/canvashelper.cxx
index 1e47b02c84fc..861f74402134 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -842,8 +842,8 @@ namespace vclcanvas
 
                 // output GraphicObject
                 const ::Point aPt( vcl::unotools::pointFromB2DPoint( 
aOutputPos ) );
-                const ::Size  aSz( ::basegfx::fround( aScale.getX() * 
aBmpSize.Width() ),
-                                   ::basegfx::fround( aScale.getY() * 
aBmpSize.Height() ) );
+                const ::Size  aSz( ::basegfx::fround<::tools::Long>( 
aScale.getX() * aBmpSize.Width() ),
+                                   ::basegfx::fround<::tools::Long>( 
aScale.getY() * aBmpSize.Height() ) );
 
                 pGrfObj->Draw(mpOutDevProvider->getOutDev(),
                               aPt,
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx 
b/canvas/source/vcl/canvashelper_texturefill.cxx
index 5e9399f56841..6972066b47a5 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -211,12 +211,12 @@ namespace vclcanvas
             // loop below, we set the _right_ edge here, which will be
             // readily copied into the left edge in the loop below
             const ::basegfx::B2DPoint& rPoint1( aLeftTop - 
2.0*nDiagonalLength*aDirection );
-            aTempPoly[1] = ::Point( ::basegfx::fround( rPoint1.getX() ),
-                                    ::basegfx::fround( rPoint1.getY() ) );
+            aTempPoly[1] = ::Point( ::basegfx::fround<::tools::Long>( 
rPoint1.getX() ),
+                                    ::basegfx::fround<::tools::Long>( 
rPoint1.getY() ) );
 
             const ::basegfx::B2DPoint& rPoint2( aLeftBottom - 
2.0*nDiagonalLength*aDirection );
-            aTempPoly[2] = ::Point( ::basegfx::fround( rPoint2.getX() ),
-                                    ::basegfx::fround( rPoint2.getY() ) );
+            aTempPoly[2] = ::Point( ::basegfx::fround<::tools::Long>( 
rPoint2.getX() ),
+                                    ::basegfx::fround<::tools::Long>( 
rPoint2.getY() ) );
 
 
             // iteratively render all other strips
@@ -258,14 +258,14 @@ namespace vclcanvas
                 const ::basegfx::B2DPoint& rPoint3(
                     (nStepCount - i-1)/double(nStepCount)*aLeftTop +
                     (i+1)/double(nStepCount)*aRightTop );
-                aTempPoly[1] = ::Point( ::basegfx::fround( rPoint3.getX() ),
-                                        ::basegfx::fround( rPoint3.getY() ) );
+                aTempPoly[1] = ::Point( ::basegfx::fround<::tools::Long>( 
rPoint3.getX() ),
+                                        ::basegfx::fround<::tools::Long>( 
rPoint3.getY() ) );
 
                 const ::basegfx::B2DPoint& rPoint4(
                     (nStepCount - i-1)/double(nStepCount)*aLeftBottom +
                     (i+1)/double(nStepCount)*aRightBottom );
-                aTempPoly[2] = ::Point( ::basegfx::fround( rPoint4.getX() ),
-                                        ::basegfx::fround( rPoint4.getY() ) );
+                aTempPoly[2] = ::Point( ::basegfx::fround<::tools::Long>( 
rPoint4.getX() ),
+                                        ::basegfx::fround<::tools::Long>( 
rPoint4.getY() ) );
 
                 rOutDev.DrawPolygon( aTempPoly );
             }
@@ -283,12 +283,12 @@ namespace vclcanvas
             // gradient rect two times the bound rect's diagonal to
             // the 'right'.
             const ::basegfx::B2DPoint& rPoint3( aRightTop + 
2.0*nDiagonalLength*aDirection );
-            aTempPoly[0] = aTempPoly[4] = ::Point( ::basegfx::fround( 
rPoint3.getX() ),
-                                                   ::basegfx::fround( 
rPoint3.getY() ) );
+            aTempPoly[0] = aTempPoly[4] = ::Point( 
::basegfx::fround<::tools::Long>( rPoint3.getX() ),
+                                                   
::basegfx::fround<::tools::Long>( rPoint3.getY() ) );
 
             const ::basegfx::B2DPoint& rPoint4( aRightBottom + 
2.0*nDiagonalLength*aDirection );
-            aTempPoly[3] = ::Point( ::basegfx::fround( rPoint4.getX() ),
-                                    ::basegfx::fround( rPoint4.getY() ) );
+            aTempPoly[3] = ::Point( ::basegfx::fround<::tools::Long>( 
rPoint4.getX() ),
+                                    ::basegfx::fround<::tools::Long>( 
rPoint4.getY() ) );
 
             rOutDev.SetFillColor( rColors.back() );
 
@@ -418,8 +418,8 @@ namespace vclcanvas
                     const ::basegfx::B2DPoint& rInnerPoint( 
aInnerPoly.getB2DPoint(p) );
 
                     aTempPoly[static_cast<sal_uInt16>(p)] = ::Point(
-                        basegfx::fround( fT*rInnerPoint.getX() + 
(1-fT)*rOuterPoint.getX() ),
-                        basegfx::fround( fT*rInnerPoint.getY() + 
(1-fT)*rOuterPoint.getY() ) );
+                        basegfx::fround<::tools::Long>( fT*rInnerPoint.getX() 
+ (1-fT)*rOuterPoint.getX() ),
+                        basegfx::fround<::tools::Long>( fT*rInnerPoint.getY() 
+ (1-fT)*rOuterPoint.getY() ) );
                 }
 
                 // close polygon explicitly
@@ -898,15 +898,15 @@ namespace vclcanvas
 
                     const ::Point aPtRepeat( vcl::unotools::pointFromB2DPoint(
                                                  
aSingleDeviceTextureRect.getMinimum() ) );
-                    const ::Size  aSz( ::basegfx::fround( aScale.getX() * 
aBmpSize.Width ),
-                                       ::basegfx::fround( aScale.getY() * 
aBmpSize.Height ) );
+                    const ::Size  aSz( ::basegfx::fround<::tools::Long>( 
aScale.getX() * aBmpSize.Width ),
+                                       ::basegfx::fround<::tools::Long>( 
aScale.getY() * aBmpSize.Height ) );
                     const ::Size  aIntegerNextTileX( 
vcl::unotools::sizeFromB2DSize(aNextTileX) );
                     const ::Size  aIntegerNextTileY( 
vcl::unotools::sizeFromB2DSize(aNextTileY) );
 
                     const ::Point aPt( textures[0].RepeatModeX == 
rendering::TexturingMode::NONE ?
-                                       ::basegfx::fround( aOutputPos.getX() ) 
: aPtRepeat.X(),
+                                       ::basegfx::fround<::tools::Long>( 
aOutputPos.getX() ) : aPtRepeat.X(),
                                        textures[0].RepeatModeY == 
rendering::TexturingMode::NONE ?
-                                       ::basegfx::fround( aOutputPos.getY() ) 
: aPtRepeat.Y() );
+                                       ::basegfx::fround<::tools::Long>( 
aOutputPos.getY() ) : aPtRepeat.Y() );
                     const sal_Int32 nTilesX( textures[0].RepeatModeX == 
rendering::TexturingMode::NONE ?
                                              1 : nX2 - nX1 );
                     const sal_Int32 nTilesY( textures[0].RepeatModeX == 
rendering::TexturingMode::NONE ?
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index 0a44f22096f0..cafc59a9b83f 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -123,14 +123,14 @@ namespace vclcanvas::tools
             if( !::rtl::math::approxEqual(aScale.getY(), 1.0) )
             {
                 const sal_Int32 nFontHeight( io_rVCLFont.GetFontHeight() );
-                io_rVCLFont.SetFontHeight( ::basegfx::fround(nFontHeight * 
aScale.getY()) );
+                io_rVCLFont.SetFontHeight( 
::basegfx::fround<::tools::Long>(nFontHeight * aScale.getY()) );
             }
 
             io_rVCLFont.SetOrientation( Degree10( 
::basegfx::fround(-basegfx::rad2deg<10>(fmod(nRotate, 2*M_PI))) ) );
 
             // TODO(F2): Missing functionality in VCL: shearing
-            o_rPoint.setX( ::basegfx::fround(aTranslate.getX()) );
-            o_rPoint.setY( ::basegfx::fround(aTranslate.getY()) );
+            o_rPoint.setX( ::basegfx::fround<::tools::Long>(aTranslate.getX()) 
);
+            o_rPoint.setY( ::basegfx::fround<::tools::Long>(aTranslate.getY()) 
);
 
             return true;
         }
@@ -154,7 +154,7 @@ namespace vclcanvas::tools
                 if (!::basegfx::fTools::equalZero(fDividend))
                     fStretch /= fDividend;
 
-                const ::tools::Long nNewWidth = 
::basegfx::fround(aSize.Width() * fStretch);
+                const ::tools::Long nNewWidth = 
::basegfx::fround<::tools::Long>(aSize.Width() * fStretch);
 
                 rFont.SetAverageFontWidth(nNewWidth);
 
diff --git a/chart2/source/controller/main/SelectionHelper.cxx 
b/chart2/source/controller/main/SelectionHelper.cxx
index 864df9c2a95d..de2ad664abe5 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -598,7 +598,7 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
                 for( sal_uInt32 nM = 0; nM < aPolygon.count(); nM++)
                 {
                     const ::basegfx::B2DPoint aPoint(aPolygon.getB2DPoint(nM));
-                    
rHdlList.AddHdl(std::make_unique<SdrHdl>(Point(basegfx::fround(aPoint.getX()), 
basegfx::fround(aPoint.getY())), SdrHdlKind::Poly));
+                    
rHdlList.AddHdl(std::make_unique<SdrHdl>(Point(basegfx::fround<tools::Long>(aPoint.getX()),
 basegfx::fround<tools::Long>(aPoint.getY())), SdrHdlKind::Poly));
                 }
             }
             return true;
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx 
b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index d8bf50649b30..c3c1cfdf50f6 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -246,8 +246,8 @@ namespace cppcanvas::internal
                     }
 
                     // output size of metafile
-                    ::Size aOutputSizePixel( ::basegfx::fround( aScale.getX() 
* maDstSize.getWidth() ),
-                                             ::basegfx::fround( aScale.getY() 
* maDstSize.getHeight() ) );
+                    ::Size aOutputSizePixel( ::basegfx::fround<::tools::Long>( 
aScale.getX() * maDstSize.getWidth() ),
+                                             ::basegfx::fround<::tools::Long>( 
aScale.getY() * maDstSize.getHeight() ) );
 
                     sal_Int32 nBitmapExtra;
                     if ( bHasTextActions )
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 07fb0f26ff62..78294eb5d584 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -1140,8 +1140,8 @@ DeactivateRC SvxPositionSizeTabPage::DeactivatePage( 
SfxItemSet* _pSet )
 
         GetTopLeftPosition(fX, fY, maRange);
         const ::tools::Rectangle aOutRectangle(
-            basegfx::fround(fX), basegfx::fround(fY),
-            basegfx::fround(fX + maRange.getWidth()), basegfx::fround(fY + 
maRange.getHeight()));
+            basegfx::fround<tools::Long>(fX), basegfx::fround<tools::Long>(fY),
+            basegfx::fround<tools::Long>(fX + maRange.getWidth()), 
basegfx::fround<tools::Long>(fY + maRange.getHeight()));
         _pSet->Put(SfxRectangleItem(SID_ATTR_TRANSFORM_INTERN, aOutRectangle));
         _pSet->Put(SfxBoolItem( SID_ATTR_TRANSFORM_PROTECT_POS,
             m_xTsbPosProtect->get_state() == TRISTATE_TRUE ));
diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx 
b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index e2c76a79bbc6..22a20f095d24 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -154,7 +154,7 @@ namespace drawinglayer::unorenderer
                     if(!aBitmapEx.IsEmpty())
                     {
                         aBitmapEx.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
-                        aBitmapEx.SetPrefSize(Size(basegfx::fround(fWidth), 
basegfx::fround(fHeight)));
+                        
aBitmapEx.SetPrefSize(Size(basegfx::fround<tools::Long>(fWidth), 
basegfx::fround<tools::Long>(fHeight)));
                         XBitmap = 
vcl::unotools::xBitmapFromBitmapEx(aBitmapEx);
                     }
                 }
diff --git a/drawinglayer/source/processor2d/SDPRProcessor2dTools.cxx 
b/drawinglayer/source/processor2d/SDPRProcessor2dTools.cxx
index 3d738cd09c99..7d001cfd67fd 100644
--- a/drawinglayer/source/processor2d/SDPRProcessor2dTools.cxx
+++ b/drawinglayer/source/processor2d/SDPRProcessor2dTools.cxx
@@ -55,7 +55,8 @@ void takeCareOfOffsetXY(
         {
             const Size& rSize(rTarget.GetSizePixel());
             const tools::Long w(rSize.Width());
-            const tools::Long a(basegfx::fround(w * (1.0 - 
rFillGraphicAttribute.getOffsetX())));
+            const tools::Long a(
+                basegfx::fround<tools::Long>(w * (1.0 - 
rFillGraphicAttribute.getOffsetX())));
 
             if (0 != a && w != a)
             {
@@ -98,7 +99,8 @@ void takeCareOfOffsetXY(
         {
             const Size& rSize(rTarget.GetSizePixel());
             const tools::Long h(rSize.Height());
-            const tools::Long a(basegfx::fround(h * (1.0 - 
rFillGraphicAttribute.getOffsetY())));
+            const tools::Long a(
+                basegfx::fround<tools::Long>(h * (1.0 - 
rFillGraphicAttribute.getOffsetY())));
 
             if (0 != a && h != a)
             {
diff --git a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx 
b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
index 9f838a7e1b61..d4f14a13ce6c 100644
--- a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
+++ b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
@@ -50,8 +50,10 @@ bool renderWrongSpellPrimitive2D(const 
primitive2d::WrongSpellPrimitive2D& rWron
                                    * 
basegfx::B2DPoint(rWrongSpellCandidate.getStart(), 0.0));
     const basegfx::B2DPoint aStop(aLocalTransform
                                   * 
basegfx::B2DPoint(rWrongSpellCandidate.getStop(), 0.0));
-    const Point aVclStart(basegfx::fround(aStart.getX()), 
basegfx::fround(aStart.getY()));
-    const Point aVclStop(basegfx::fround(aStop.getX()), 
basegfx::fround(aStop.getY()));
+    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
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 0d4ee95470dc..7b3acd6a1e74 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -226,8 +226,10 @@ VclMetafileProcessor2D::impDumpToMetaFile(const 
primitive2d::Primitive2DContaine
     aPrimitiveRange.transform(maCurrentTransformation);
 
     const tools::Rectangle aPrimitiveRectangle(
-        basegfx::fround(aPrimitiveRange.getMinX()), 
basegfx::fround(aPrimitiveRange.getMinY()),
-        basegfx::fround(aPrimitiveRange.getMaxX()), 
basegfx::fround(aPrimitiveRange.getMaxY()));
+        basegfx::fround<tools::Long>(aPrimitiveRange.getMinX()),
+        basegfx::fround<tools::Long>(aPrimitiveRange.getMinY()),
+        basegfx::fround<tools::Long>(aPrimitiveRange.getMaxX()),
+        basegfx::fround<tools::Long>(aPrimitiveRange.getMaxY()));
     ScopedVclPtrInstance<VirtualDevice> aContentVDev;
     MapMode aNewMapMode(pLastOutputDevice->GetMapMode());
 
@@ -1183,9 +1185,10 @@ void VclMetafileProcessor2D::processControlPrimitive2D(
             
mpPDFExtOutDevData->WrapBeginStructureElement(vcl::PDFWriter::NonStructElement);
         mpPDFExtOutDevData->SetStructureAttribute(vcl::PDFWriter::Placement, 
vcl::PDFWriter::Block);
         auto const 
range(rControlPrimitive.getB2DRange(getViewInformation2D()));
-        tools::Rectangle const aLogicRect(
-            basegfx::fround(range.getMinX()), basegfx::fround(range.getMinY()),
-            basegfx::fround(range.getMaxX()), 
basegfx::fround(range.getMaxY()));
+        tools::Rectangle const 
aLogicRect(basegfx::fround<tools::Long>(range.getMinX()),
+                                          
basegfx::fround<tools::Long>(range.getMinY()),
+                                          
basegfx::fround<tools::Long>(range.getMaxX()),
+                                          
basegfx::fround<tools::Long>(range.getMaxY()));
         mpPDFExtOutDevData->SetStructureBoundingBox(aLogicRect);
         OUString const& rAltText(rControlPrimitive.GetAltText());
         if (!rAltText.isEmpty() && !bDecorative)
@@ -1641,7 +1644,7 @@ void 
VclMetafileProcessor2D::processPolygonStrokePrimitive2D(
 
             // use the transformed line width
             LineInfo aLineInfo(LineStyle::Solid,
-                               
basegfx::fround(getTransformedLineWidth(rLine.getWidth())));
+                               
std::round(getTransformedLineWidth(rLine.getWidth())));
             aLineInfo.SetLineJoin(rLine.getLineJoin());
             aLineInfo.SetLineCap(rLine.getLineCap());
 
@@ -1971,7 +1974,7 @@ void 
VclMetafileProcessor2D::processPolyPolygonHatchPrimitive2D(
         aToolsPolyPolygon,
         Hatch(aHatchStyle,
               
Color(maBColorModifierStack.getModifiedColor(rFillHatchAttribute.getColor())),
-              basegfx::fround(rFillHatchAttribute.getDistance()),
+              basegfx::fround<tools::Long>(rFillHatchAttribute.getDistance()),
               
Degree10(basegfx::fround(basegfx::rad2deg<10>(rFillHatchAttribute.getAngle())))));
 
     impEndSvtGraphicFill(pSvtGraphicFill.get());
@@ -2526,10 +2529,11 @@ void 
VclMetafileProcessor2D::processTransparencePrimitive2D(
         basegfx::fround(aDiscreteRange.getHeight()), nMaximumQuadraticPixels));
 
     // add to target metafile (will create MetaFloatTransparentAction)
-    mpOutputDevice->DrawBitmapEx(
-        Point(basegfx::fround(aLogicRange.getMinX()), 
basegfx::fround(aLogicRange.getMinY())),
-        Size(basegfx::fround(aLogicRange.getWidth()), 
basegfx::fround(aLogicRange.getHeight())),
-        aBitmapEx);
+    
mpOutputDevice->DrawBitmapEx(Point(basegfx::fround<tools::Long>(aLogicRange.getMinX()),
+                                       
basegfx::fround<tools::Long>(aLogicRange.getMinY())),
+                                 
Size(basegfx::fround<tools::Long>(aLogicRange.getWidth()),
+                                      
basegfx::fround<tools::Long>(aLogicRange.getHeight())),
+                                 aBitmapEx);
 }
 
 void VclMetafileProcessor2D::processStructureTagPrimitive2D(
@@ -2597,8 +2601,10 @@ void 
VclMetafileProcessor2D::processStructureTagPrimitive2D(
                 {
                     auto const 
range(rStructureTagCandidate.getB2DRange(getViewInformation2D()));
                     tools::Rectangle const aLogicRect(
-                        basegfx::fround(range.getMinX()), 
basegfx::fround(range.getMinY()),
-                        basegfx::fround(range.getMaxX()), 
basegfx::fround(range.getMaxY()));
+                        basegfx::fround<tools::Long>(range.getMinX()),
+                        basegfx::fround<tools::Long>(range.getMinY()),
+                        basegfx::fround<tools::Long>(range.getMaxX()),
+                        basegfx::fround<tools::Long>(range.getMaxY()));
                     mpPDFExtOutDevData->SetStructureBoundingBox(aLogicRect);
                     break;
                 }
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index d99893dbab98..8a960be8009d 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -372,8 +372,9 @@ void 
VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
                                              fIgnoreShearX);
 
                 const Point aOrigin(
-                    basegfx::fround(aCurrentTranslate.getX() / 
aCurrentScaling.getX()),
-                    basegfx::fround(aCurrentTranslate.getY() / 
aCurrentScaling.getY()));
+                    basegfx::fround<tools::Long>(aCurrentTranslate.getX() / 
aCurrentScaling.getX()),
+                    basegfx::fround<tools::Long>(aCurrentTranslate.getY()
+                                                 / aCurrentScaling.getY()));
 
                 Fraction aScaleX(aCurrentScaling.getX());
                 if (!aScaleX.IsValid())
@@ -394,7 +395,8 @@ void 
VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
 
                 if (fCurrentRotate)
                     aTextTranslate *= 
basegfx::utils::createRotateB2DHomMatrix(fCurrentRotate);
-                aStartPoint = Point(aTextTranslate.getX(), 
aTextTranslate.getY());
+                aStartPoint = 
Point(basegfx::fround<tools::Long>(aTextTranslate.getX()),
+                                    
basegfx::fround<tools::Long>(aTextTranslate.getY()));
 
                 bChangeMapMode = aMapMode != mpOutputDevice->GetMapMode();
                 if (bChangeMapMode)
@@ -406,7 +408,8 @@ void 
VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
             else
             {
                 const basegfx::B2DPoint aPoint(aLocalTransform * 
basegfx::B2DPoint(0.0, 0.0));
-                aStartPoint = Point(basegfx::fround(aPoint.getX()), 
basegfx::fround(aPoint.getY()));
+                aStartPoint = 
Point(basegfx::fround<tools::Long>(aPoint.getX()),
+                                    
basegfx::fround<tools::Long>(aPoint.getY()));
             }
 
             // tdf#152990 set the font after the MapMode is (potentially) set 
so canvas uses the desired
@@ -1060,8 +1063,8 @@ void VclProcessor2D::RenderMarkerArrayPrimitive2D(
     {
         const basegfx::B2DPoint aDiscreteTopLeft((maCurrentTransformation * 
pos)
                                                  - aDiscreteHalfSize);
-        const Point aDiscretePoint(basegfx::fround(aDiscreteTopLeft.getX()),
-                                   basegfx::fround(aDiscreteTopLeft.getY()));
+        const Point 
aDiscretePoint(basegfx::fround<tools::Long>(aDiscreteTopLeft.getX()),
+                                   
basegfx::fround<tools::Long>(aDiscreteTopLeft.getY()));
 
         mpOutputDevice->DrawBitmapEx(aDiscretePoint + aOrigin, rMarker);
     }
@@ -1081,8 +1084,8 @@ void VclProcessor2D::RenderPointArrayPrimitive2D(
     for (auto const& pos : rPositions)
     {
         const basegfx::B2DPoint aViewPosition(maCurrentTransformation * pos);
-        const Point aPos(basegfx::fround(aViewPosition.getX()),
-                         basegfx::fround(aViewPosition.getY()));
+        const Point aPos(basegfx::fround<tools::Long>(aViewPosition.getX()),
+                         basegfx::fround<tools::Long>(aViewPosition.getY()));
 
         mpOutputDevice->DrawPixel(aPos, aVCLColor);
     }
diff --git a/drawinglayer/source/tools/converters.cxx 
b/drawinglayer/source/tools/converters.cxx
index 3e32af49c508..cf339f8aaa20 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -362,7 +362,7 @@ BitmapEx 
convertPrimitive2DContainerToBitmapEx(primitive2d::Primitive2DContainer
         if (aBitmapEx.IsEmpty())
             return BitmapEx();
         aBitmapEx.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
-        aBitmapEx.SetPrefSize(Size(basegfx::fround(fWidth), 
basegfx::fround(fHeight)));
+        aBitmapEx.SetPrefSize(Size(basegfx::fround<tools::Long>(fWidth), 
basegfx::fround<tools::Long>(fHeight)));
 
         return aBitmapEx;
     }
diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 75fe99e684ee..72bc2022b1ea 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1070,7 +1070,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, 
sal_uInt32 nStartPosY )
                         // consider scaling
                         double fFontScalingX = maScalingParameters.fFontX;
                         if (maStatus.DoStretch() && (fFontScalingX != 1.0))
-                            nCurPos = basegfx::fround(double(nCurPos) / 
std::max(fFontScalingX, 0.01));
+                            nCurPos = 
basegfx::fround<tools::Long>(double(nCurPos) / std::max(fFontScalingX, 0.01));
 
                         short nAllSpaceBeforeText = 
short(rLRItem.GetTextLeft());
                         aCurrentTab.aTabStop = 
pNode->GetContentAttribs().FindTabStop( nCurPos - nAllSpaceBeforeText , 
maEditDoc.GetDefTab() );
@@ -3090,7 +3090,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, 
sal_Int32 nPos, SvxFont& rFo
                 double fHeightRounded = roundToNearestPt(aRealSz.Height());
                 double fNewHeight = fHeightRounded * 
maScalingParameters.fFontY;
                 fNewHeight = roundToNearestPt(fNewHeight);
-                aRealSz.setHeight(basegfx::fround(fNewHeight));
+                aRealSz.setHeight(basegfx::fround<tools::Long>(fNewHeight));
             }
             if (maScalingParameters.fFontX != 1.0)
             {
@@ -3105,7 +3105,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, 
sal_Int32 nPos, SvxFont& rFo
                     double fWidthRounded = roundToNearestPt(aRealSz.Width());
                     double fNewWidth = fWidthRounded * fFontX;
                     fNewWidth = roundToNearestPt(fNewWidth);
-                    aRealSz.setWidth(basegfx::fround(fNewWidth));
+                    aRealSz.setWidth(basegfx::fround<tools::Long>(fNewWidth));
 
                     // Also the Kerning: (long due to handle Interim results)
                     tools::Long nKerning = rFont.GetFixKerning();
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index b7d4be999016..121259f7e394 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -3139,8 +3139,7 @@ double ImpEditEngine::roundToNearestPt(double fInput) 
const
     if (mbRoundToNearestPt)
     {
         double fInputPt = o3tl::convert(fInput, o3tl::Length::mm100, 
o3tl::Length::pt);
-        auto nInputRounded = basegfx::fround(fInputPt);
-        return o3tl::convert(double(nInputRounded), o3tl::Length::pt, 
o3tl::Length::mm100);
+        return o3tl::convert(std::round(fInputPt), o3tl::Length::pt, 
o3tl::Length::mm100);
     }
     else
     {
diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index 2e8541e72051..671ecd017cfd 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -891,8 +891,8 @@ void Outliner::PaintBullet(sal_Int32 nPara, const Point& 
rStartPos, const Point&
 
     double fSpacingFactorX = getScalingParameters().fSpacingX;
 
-    tools::Long nStretchBulletX = basegfx::fround(double(aBulletArea.Left()) * 
fSpacingFactorX);
-    tools::Long nStretchBulletWidth = 
basegfx::fround(double(aBulletArea.GetWidth()) * fSpacingFactorX);
+    tools::Long nStretchBulletX = 
basegfx::fround<tools::Long>(double(aBulletArea.Left()) * fSpacingFactorX);
+    tools::Long nStretchBulletWidth = 
basegfx::fround<tools::Long>(double(aBulletArea.GetWidth()) * fSpacingFactorX);
     aBulletArea = tools::Rectangle(Point(nStretchBulletX, aBulletArea.Top()),
                              Size(nStretchBulletWidth, 
aBulletArea.GetHeight()) );
 
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 546a7595ced9..e6ac4893730b 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -588,7 +588,7 @@ namespace emfio
                 fX2 -= mrclFrame.Left();
                 fY2 -= mrclFrame.Top();
             }
-            return Point(basegfx::fround(fX2), basegfx::fround(fY2));
+            return Point(basegfx::fround<tools::Long>(fX2), 
basegfx::fround<tools::Long>(fY2));
         }
         else
             return Point();
@@ -677,7 +677,7 @@ namespace emfio
                     break;
                 }
             }
-            return Size(basegfx::fround(fWidth), basegfx::fround(fHeight));
+            return Size(basegfx::fround<tools::Long>(fWidth), 
basegfx::fround<tools::Long>(fHeight));
         }
         else
             return Size();
@@ -1672,7 +1672,7 @@ namespace emfio
                     const Size aSizeY(ImplMap(Size(0, nSumY)));
                     const basegfx::B2DVector aVectorY(aSizeY.Width(), 
aSizeY.Height());
                     // Reverse Y
-                    pDYArry[i] = basegfx::fround(aVectorY.getLength());
+                    pDYArry[i] = 
basegfx::fround<tools::Long>(aVectorY.getLength());
                     pDYArry[i] *= (nSumY >= 0 ? -1 : 1);
                 }
             }
diff --git a/filter/source/msfilter/escherex.cxx 
b/filter/source/msfilter/escherex.cxx
index 2e2e957e6cf0..b5be935d9b95 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -2863,7 +2863,7 @@ void 
EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
                         if ( rrProp.Value >>= fExtrusionShininess )
                         {
                             // ODF to MS Office conversion invers to 
msdffimp.cxx
-                            fExtrusionShininess = 
basegfx::fround(fExtrusionShininess / 10.0);
+                            fExtrusionShininess = 
std::round(fExtrusionShininess / 10.0);
                             AddOpt( DFF_Prop_c3DShininess, 
static_cast<sal_Int32>(fExtrusionShininess) );
                         }
                     }
diff --git a/filter/source/msfilter/eschesdo.cxx 
b/filter/source/msfilter/eschesdo.cxx
index 03346d727dc6..6a17fff242a0 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -1156,8 +1156,8 @@ void ImplEESdrObject::Init()
     {
         // if it's a group, the unrotated range is needed for that group
         const basegfx::B2DRange 
aUnrotatedRange(getUnrotatedGroupBoundRange(mXShape));
-        const Point aNewP(basegfx::fround(aUnrotatedRange.getMinX()), 
basegfx::fround(aUnrotatedRange.getMinY()));
-        const Size aNewS(basegfx::fround(aUnrotatedRange.getWidth()), 
basegfx::fround(aUnrotatedRange.getHeight()));
+        const Point 
aNewP(basegfx::fround<tools::Long>(aUnrotatedRange.getMinX()), 
basegfx::fround<tools::Long>(aUnrotatedRange.getMinY()));
+        const Size 
aNewS(basegfx::fround<tools::Long>(aUnrotatedRange.getWidth()), 
basegfx::fround<tools::Long>(aUnrotatedRange.getHeight()));
 
         SetRect(ImplEESdrWriter::ImplMapPoint(aNewP), 
ImplEESdrWriter::ImplMapSize(aNewS));
     }
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index 271d1b4397be..0d622b4e0fce 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -395,7 +395,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< 
PropertyValue >& rDescripto
                 static_cast< double >(pTargetSdrPage->GetRightBorder()) / 
aPageSize.Width() +
                 static_cast< double >(pTargetSdrPage->GetUpperBorder()) / 
aPageSize.Height() +
                 static_cast< double >(pTargetSdrPage->GetLowerBorder()) / 
aPageSize.Height()) / 4.0);
-            const tools::Long nAllBorder(basegfx::fround((aGraphicSize.Width() 
+ aGraphicSize.Height()) * fBorderRelation * 0.5));
+            const tools::Long 
nAllBorder(basegfx::fround<tools::Long>((aGraphicSize.Width() + 
aGraphicSize.Height()) * fBorderRelation * 0.5));
 
             // Adapt PageSize and Border stuff. To get all MasterPages and 
PresObjs
             // correctly adapted, do not just use
diff --git a/include/basegfx/numeric/ftools.hxx 
b/include/basegfx/numeric/ftools.hxx
index 1e7f0a34e71c..62850c32670b 100644
--- a/include/basegfx/numeric/ftools.hxx
+++ b/include/basegfx/numeric/ftools.hxx
@@ -35,7 +35,7 @@ namespace basegfx
 
         @return the nearest integer
     */
-    inline sal_Int32 fround( double fVal )
+    inline sal_Int32 fround32( double fVal )
     {
         if (fVal >= 0.0)
         {
@@ -57,6 +57,20 @@ namespace basegfx
         return fVal > 0.0 ? static_cast<sal_Int64>( fVal + .5 ) : 
-static_cast<sal_Int64>( -fVal + .5 );
     }
 
+    /** Round double to nearest integer
+
+        @return the nearest integer
+    */
+    template <class Int = sal_Int32>
+        requires std::is_integral_v<Int> && std::is_signed_v<Int>
+    inline Int fround(double fVal)
+    {
+        if constexpr (sizeof(Int) == sizeof(sal_Int64))
+            return fround64(fVal);
+        else
+            return fround32(fVal);
+    }
+
     /** Prune a small epsilon range around zero.
 
         Use this method e.g. for calculating scale values. There, it
diff --git a/include/svx/transfrmhelper.hxx b/include/svx/transfrmhelper.hxx
index 9e683d44522f..f544553d22a2 100644
--- a/include/svx/transfrmhelper.hxx
+++ b/include/svx/transfrmhelper.hxx
@@ -31,11 +31,11 @@ namespace TransfrmHelper
     inline void ConvertRect(basegfx::B2DRange& rRange, const sal_uInt16 
nDigits, const MapUnit ePoolUnit, const FieldUnit eDlgUnit)
     {
         const basegfx::B2DPoint aTopLeft(
-            
static_cast<double>(vcl::ConvertValue(basegfx::fround(rRange.getMinX()), 
nDigits, ePoolUnit, eDlgUnit)),
-            
static_cast<double>(vcl::ConvertValue(basegfx::fround(rRange.getMinY()), 
nDigits, ePoolUnit, eDlgUnit)));
+            
static_cast<double>(vcl::ConvertValue(basegfx::fround64(rRange.getMinX()), 
nDigits, ePoolUnit, eDlgUnit)),
+            
static_cast<double>(vcl::ConvertValue(basegfx::fround64(rRange.getMinY()), 
nDigits, ePoolUnit, eDlgUnit)));
         const basegfx::B2DPoint aBottomRight(
-            
static_cast<double>(vcl::ConvertValue(basegfx::fround(rRange.getMaxX()), 
nDigits, ePoolUnit, eDlgUnit)),
-            
static_cast<double>(vcl::ConvertValue(basegfx::fround(rRange.getMaxY()), 
nDigits, ePoolUnit, eDlgUnit)));
+            
static_cast<double>(vcl::ConvertValue(basegfx::fround64(rRange.getMaxX()), 
nDigits, ePoolUnit, eDlgUnit)),
+            
static_cast<double>(vcl::ConvertValue(basegfx::fround64(rRange.getMaxY()), 
nDigits, ePoolUnit, eDlgUnit)));
 
         rRange = basegfx::B2DRange(aTopLeft, aBottomRight);
     }
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index d14fd037f237..68a6d666b85f 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -594,7 +594,7 @@ bool DrawingML::WriteSchemeColor(OUString const& 
rPropertyName, const uno::Refer
 
 void DrawingML::WriteGradientStop(double fOffset, const basegfx::BColor& 
rColor, const basegfx::BColor& rAlpha)
 {
-    mpFS->startElementNS(XML_a, XML_gs, XML_pos, 
OString::number(basegfx::fround(fOffset * 100000)));
+    mpFS->startElementNS(XML_a, XML_gs, XML_pos, 
OString::number(basegfx::fround64(fOffset * 100000)));
     WriteColor(
         ::Color(rColor),
         basegfx::fround((1.0 - rAlpha.luminance()) * 
oox::drawingml::MAX_PERCENT));
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 00aa49f90712..f6f5737dbc54 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -956,8 +956,8 @@ void ScDrawLayer::ResizeLastRectFromAnchor(const SdrObject* 
pObj, ScDrawObjData&
 
                     // apply to aRect
                     aRect = tools::Rectangle(
-                        basegfx::fround(aNewRange.getMinX()), 
basegfx::fround(aNewRange.getMinY()),
-                        basegfx::fround(aNewRange.getMaxX()), 
basegfx::fround(aNewRange.getMaxY()));
+                        basegfx::fround<tools::Long>(aNewRange.getMinX()), 
basegfx::fround<tools::Long>(aNewRange.getMinY()),
+                        basegfx::fround<tools::Long>(aNewRange.getMaxX()), 
basegfx::fround<tools::Long>(aNewRange.getMaxY()));
                 }
             }
         }
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx 
b/sc/source/ui/miscdlgs/autofmt.cxx
index 877c412a5966..5707f8796526 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -249,7 +249,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& 
rRenderContext, size_t nCo
     Size aStrSize;
     sal_uInt16 nFmtIndex = GetFormatIndex( nCol, nRow );
     const basegfx::B2DRange cellRange(maArray.GetCellRange( nCol, nRow ));
-    Point aPos(basegfx::fround(cellRange.getMinX()), 
basegfx::fround(cellRange.getMinY()));
+    Point aPos(basegfx::fround<tools::Long>(cellRange.getMinX()), 
basegfx::fround<tools::Long>(cellRange.getMinY()));
     sal_uInt16 nRightX = 0;
     bool bJustify = pCurData->GetIncludeJustify();
     SvxCellHorJustify eJustification;
@@ -269,7 +269,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& 
rRenderContext, size_t nCo
 
         MakeFonts(rRenderContext, nFmtIndex, aFont, aCJKFont, aCTLFont);
 
-        theMaxStrSize = Size(basegfx::fround(cellRange.getWidth()), 
basegfx::fround(cellRange.getHeight()));
+        theMaxStrSize = 
Size(basegfx::fround<tools::Long>(cellRange.getWidth()), 
basegfx::fround<tools::Long>(cellRange.getHeight()));
         theMaxStrSize.AdjustWidth( -(FRAME_OFFSET) );
         theMaxStrSize.AdjustHeight( -(FRAME_OFFSET) );
 
@@ -375,8 +375,8 @@ void ScAutoFmtPreview::DrawBackground(vcl::RenderContext& 
rRenderContext)
             const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, 
nRow ));
             rRenderContext.DrawRect(
                 tools::Rectangle(
-                    basegfx::fround(aCellRange.getMinX()), 
basegfx::fround(aCellRange.getMinY()),
-                    basegfx::fround(aCellRange.getMaxX()), 
basegfx::fround(aCellRange.getMaxY())));
+                    basegfx::fround<tools::Long>(aCellRange.getMinX()), 
basegfx::fround<tools::Long>(aCellRange.getMinY()),
+                    basegfx::fround<tools::Long>(aCellRange.getMaxX()), 
basegfx::fround<tools::Long>(aCellRange.getMaxY())));
 
             rRenderContext.Pop();
         }
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index c1a48dc6df12..91ff6d7ac935 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -1064,8 +1064,8 @@ bool ScDrawView::calculateGridOffsetForB2DRange(
     // the object as we want to maintain page anchoring )
     ScDrawObjData aAnchor;
     const tools::Rectangle aRectangle(
-        basegfx::fround(rB2DRange.getMinX()), 
basegfx::fround(rB2DRange.getMinY()),
-        basegfx::fround(rB2DRange.getMaxX()), 
basegfx::fround(rB2DRange.getMaxY()));
+        basegfx::fround<tools::Long>(rB2DRange.getMinX()), 
basegfx::fround<tools::Long>(rB2DRange.getMinY()),
+        basegfx::fround<tools::Long>(rB2DRange.getMaxX()), 
basegfx::fround<tools::Long>(rB2DRange.getMaxY()));
     ScDrawLayer::GetCellAnchorFromPosition(
         aRectangle,
         aAnchor,
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx
index a93584b62f67..6aaed8b55ab4 100644
--- a/sd/qa/unit/layout-tests.cxx
+++ b/sd/qa/unit/layout-tests.cxx
@@ -109,10 +109,10 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf128212)
     xmlDocUniquePtr pXmlDoc = load("pptx/tdf128212.pptx");
 
     // Without the fix in place, this test would have failed with
-    // - Expected: 7792
+    // - Expected: 7793
     // - Actual  : 12068
-    assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray"_ostr, "x"_ostr, 
"4520");
-    assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray"_ostr, "y"_ostr, 
"7792");
+    assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray"_ostr, "x"_ostr, 
"4521");
+    assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray"_ostr, "y"_ostr, 
"7793");
 }
 
 CPPUNIT_TEST_FIXTURE(SdLayoutTest, testColumnsLayout)
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 020f1f6bbfd4..5c4eab5ee78c 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1430,19 +1430,19 @@ static void CalcAutoLayoutRectangles( SdPage const & 
rPage,::tools::Rectangle* r
             if(count == 0)
             {
                 Size aSize ( aTitleRect.GetSize() );
-                aSize.setHeight( basegfx::fround(aSize.Height() * 
propvalue[0]) );
-                aSize.setWidth( basegfx::fround(aSize.Width() * propvalue[1]) 
);
-                Point aPos( basegfx::fround(aTitlePos.X() +(aSize.Width() * 
propvalue[2])),
-                            basegfx::fround(aTitlePos.Y() + (aSize.Height() * 
propvalue[3])) );
+                aSize.setHeight( basegfx::fround<::tools::Long>(aSize.Height() 
* propvalue[0]) );
+                aSize.setWidth( basegfx::fround<::tools::Long>(aSize.Width() * 
propvalue[1]) );
+                Point aPos( basegfx::fround<::tools::Long>(aTitlePos.X() 
+(aSize.Width() * propvalue[2])),
+                            basegfx::fround<::tools::Long>(aTitlePos.Y() + 
(aSize.Height() * propvalue[3])) );
                 rRectangle[count] = ::tools::Rectangle(aPos, aSize);
                 count = count+1;
             }
             else
             {
-                Size aSize( basegfx::fround(aLayoutSize.Width() * 
propvalue[1]),
-                            basegfx::fround(aLayoutSize.Height() * 
propvalue[0]) );
-                Point aPos( basegfx::fround(aLayoutPos.X() +(aSize.Width() * 
propvalue[2])),
-                            basegfx::fround(aLayoutPos.Y() + (aSize.Height() * 
propvalue[3])) );
+                Size aSize( basegfx::fround<::tools::Long>(aLayoutSize.Width() 
* propvalue[1]),
+                            
basegfx::fround<::tools::Long>(aLayoutSize.Height() * propvalue[0]) );
+                Point aPos( basegfx::fround<::tools::Long>(aLayoutPos.X() 
+(aSize.Width() * propvalue[2])),
+                            basegfx::fround<::tools::Long>(aLayoutPos.Y() + 
(aSize.Height() * propvalue[3])) );
                 rRectangle[count] = ::tools::Rectangle (aPos, aSize);
                 count = count+1;
             }
diff --git a/slideshow/source/engine/eventmultiplexer.cxx 
b/slideshow/source/engine/eventmultiplexer.cxx
index 2419b2da8677..441fb71ed184 100644
--- a/slideshow/source/engine/eventmultiplexer.cxx
+++ b/slideshow/source/engine/eventmultiplexer.cxx
@@ -595,8 +595,8 @@ EventMultiplexerImpl::toNormalPoint(const 
uno::Reference<presentation::XSlideSho
     basegfx::B2DHomMatrix aMatrix((*aIter)->getTransformation());
     aPosition *= aMatrix;
 
-    aPosition.setX(basegfx::fround(aPosition.getX()));
-    aPosition.setY(basegfx::fround(aPosition.getY()));
+    aPosition.setX(std::round(aPosition.getX()));
+    aPosition.setY(std::round(aPosition.getY()));
     return aPosition;
 }
 
@@ -621,8 +621,8 @@ EventMultiplexerImpl::toMatrixPoint(const 
uno::Reference<presentation::XSlideSho
                                " view matrix singular");
     aPosition *= aMatrix;
 
-    aPosition.setX(basegfx::fround(aPosition.getX()));
-    aPosition.setY(basegfx::fround(aPosition.getY()));
+    aPosition.setX(std::round(aPosition.getX()));
+    aPosition.setY(std::round(aPosition.getY()));
     return aPosition;
 }
 
diff --git a/slideshow/source/engine/slideview.cxx 
b/slideshow/source/engine/slideview.cxx
index 6db623468ac7..2b84a0f75542 100644
--- a/slideshow/source/engine/slideview.cxx
+++ b/slideshow/source/engine/slideview.cxx
@@ -523,8 +523,8 @@ private:
         // translation when aTmpRect was not properly initialized.
         if ( ! aTmpRect.isEmpty())
         {
-            aMatrix.translate( -basegfx::fround(aTmpRect.getMinX()),
-                               -basegfx::fround(aTmpRect.getMinY()) );
+            aMatrix.translate( -std::round(aTmpRect.getMinX()),
+                               -std::round(aTmpRect.getMinY()) );
         }
 
         return aMatrix;
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx 
b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index d2f9de215f65..eadc201c7ae6 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -510,7 +510,7 @@ rtl::Reference<SdrObject> 
EnhancedCustomShape3d::Create3DObject(
                 }
 
                 const basegfx::B2DRange 
aTempRange(basegfx::utils::getRange(aPolyPoly));
-                const tools::Rectangle 
aBoundRect(basegfx::fround(aTempRange.getMinX()), 
basegfx::fround(aTempRange.getMinY()), basegfx::fround(aTempRange.getMaxX()), 
basegfx::fround(aTempRange.getMaxY()));
+                const tools::Rectangle 
aBoundRect(basegfx::fround<tools::Long>(aTempRange.getMinX()), 
basegfx::fround<tools::Long>(aTempRange.getMinY()), 
basegfx::fround<tools::Long>(aTempRange.getMaxX()), 
basegfx::fround<tools::Long>(aTempRange.getMaxY()));
                 aTotalPolyPoly.append(aPolyPoly);
                 aBoundRect2d.Union( aBoundRect );
 
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 337013e55d34..4e02c1f76e94 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -429,12 +429,12 @@ void FrameSelectorImpl::InitBorderGeometry()
         {
             const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, 
nRow ));
             const tools::Rectangle aRect(
-                basegfx::fround(aCellRange.getMinX()), 
basegfx::fround(aCellRange.getMinY()),
-                basegfx::fround(aCellRange.getMaxX()), 
basegfx::fround(aCellRange.getMaxY()));
+                basegfx::fround<tools::Long>(aCellRange.getMinX()), 
basegfx::fround<tools::Long>(aCellRange.getMinY()),
+                basegfx::fround<tools::Long>(aCellRange.getMaxX()), 
basegfx::fround<tools::Long>(aCellRange.getMaxY()));
             const double fHorDiagAngle(atan2(fabs(aCellRange.getHeight()), 
fabs(aCellRange.getWidth())));
             const double fVerDiagAngle(fHorDiagAngle > 0.0 ? M_PI_2 - 
fHorDiagAngle : 0.0);
-            const tools::Long nDiagFocusOffsX(basegfx::fround(-mnFocusOffs / 
tan(fHorDiagAngle) + mnFocusOffs / sin(fHorDiagAngle)));
-            const tools::Long nDiagFocusOffsY(basegfx::fround(-mnFocusOffs / 
tan(fVerDiagAngle) + mnFocusOffs / sin(fVerDiagAngle)));
+            const tools::Long 
nDiagFocusOffsX(basegfx::fround<tools::Long>(-mnFocusOffs / tan(fHorDiagAngle) 
+ mnFocusOffs / sin(fHorDiagAngle)));
+            const tools::Long 
nDiagFocusOffsY(basegfx::fround<tools::Long>(-mnFocusOffs / tan(fVerDiagAngle) 
+ mnFocusOffs / sin(fVerDiagAngle)));
 
             std::vector< Point > aFocusVec;
             aFocusVec.emplace_back( aRect.Left()  - mnFocusOffs,     
aRect.Top()    + nDiagFocusOffsY );
@@ -489,8 +489,8 @@ void FrameSelectorImpl::InitBorderGeometry()
             // the usable area between horizontal/vertical frame borders of 
current quadrant
             const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, 
nRow ));
             const tools::Rectangle aRect(
-                basegfx::fround(aCellRange.getMinX()) + nClV + 1, 
basegfx::fround(aCellRange.getMinY()) + nClH + 1,
-                basegfx::fround(aCellRange.getMaxX()) - nClV + 1, 
basegfx::fround(aCellRange.getMaxY()) - nClH + 1);
+                basegfx::fround<tools::Long>(aCellRange.getMinX()) + nClV + 1, 
basegfx::fround<tools::Long>(aCellRange.getMinY()) + nClH + 1,
+                basegfx::fround<tools::Long>(aCellRange.getMaxX()) - nClV + 1, 
basegfx::fround<tools::Long>(aCellRange.getMaxY()) - nClH + 1);
 
             /*  Both diagonal frame borders enabled. */
             if( mbTLBR && mbBLTR )
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index 31bd7acf9280..57eb2f9f5e29 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -529,7 +529,7 @@ void E3dCompoundObject::AddToHdlList(SdrHdlList& rHdlList) 
const
                 // to 2d world coor
                 aPos2D *= rVCScene.getObjectTransformation();
 
-                
rHdlList.AddHdl(std::make_unique<SdrHdl>(Point(basegfx::fround(aPos2D.getX()), 
basegfx::fround(aPos2D.getY())), SdrHdlKind::BezierWeight));
+                
rHdlList.AddHdl(std::make_unique<SdrHdl>(Point(basegfx::fround<tools::Long>(aPos2D.getX()),
 basegfx::fround<tools::Long>(aPos2D.getY())), SdrHdlKind::BezierWeight));
             }
         }
     }
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index f41fc47a8ad2..7cfe5edcfc94 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -1332,12 +1332,12 @@ void E3dView::Start3DCreation()
     }
 
     basegfx::B2DPoint aCenter(aR.getCenter());
-    tools::Long      nMarkHgt = basegfx::fround(aR.getHeight()) - 1;
+    tools::Long      nMarkHgt = basegfx::fround<tools::Long>(aR.getHeight()) - 
1;
     tools::Long      nHgt     = nMarkHgt + nObjDst * 2;
 
     if (nHgt < nMinLen) nHgt = nMinLen;
 
-    tools::Long nY1 = basegfx::fround(aCenter.getY()) - (nHgt + 1) / 2;
+    tools::Long nY1 = basegfx::fround<tools::Long>(aCenter.getY()) - (nHgt + 
1) / 2;
     tools::Long nY2 = nY1 + nHgt;
 
     if (pOut && (nMinLen > nOutHgt)) nMinLen = nOutHgt;
@@ -1355,7 +1355,7 @@ void E3dView::Start3DCreation()
         }
     }
 
-    maRef1.setX( basegfx::fround(aR.getMinX()) );    // Initial move axis 
2/100mm to the left
+    maRef1.setX( basegfx::fround<tools::Long>(aR.getMinX()) );    // Initial 
move axis 2/100mm to the left
     maRef1.setY( nY1 );
     maRef2.setX( maRef1.X() );
     maRef2.setY( nY2 );
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 7bff18563bc3..04e6f15df2aa 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -650,8 +650,8 @@ bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
                     if(getPossibleGridOffsetForSdrObject(aGridOffset, 
pObj.get(), mpCreatePV))
                     {
                         const Size aOffset(
-                            basegfx::fround(-aGridOffset.getX()),
-                            basegfx::fround(-aGridOffset.getY()));
+                            basegfx::fround<tools::Long>(-aGridOffset.getX()),
+                            basegfx::fround<tools::Long>(-aGridOffset.getY()));
 
                         pObj->NbcMove(aOffset);
                     }
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 4bd3c138a7d0..b927f5ebb255 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -3770,15 +3770,15 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
 
         // extract the old Rectangle structures
         tools::Rectangle aOldRect(
-            basegfx::fround(aRangeOriginalNoShearNoRotate.getMinX()),
-            basegfx::fround(aRangeOriginalNoShearNoRotate.getMinY()),
-            basegfx::fround(aRangeOriginalNoShearNoRotate.getMaxX()),
-            basegfx::fround(aRangeOriginalNoShearNoRotate.getMaxY()));
+            
basegfx::fround<tools::Long>(aRangeOriginalNoShearNoRotate.getMinX()),
+            
basegfx::fround<tools::Long>(aRangeOriginalNoShearNoRotate.getMinY()),
+            
basegfx::fround<tools::Long>(aRangeOriginalNoShearNoRotate.getMaxX()),
+            
basegfx::fround<tools::Long>(aRangeOriginalNoShearNoRotate.getMaxY()));
         tools::Rectangle aNewRect(
-            basegfx::fround(aRangeNewNoShearNoRotate.getMinX()),
-            basegfx::fround(aRangeNewNoShearNoRotate.getMinY()),
-            basegfx::fround(aRangeNewNoShearNoRotate.getMaxX()),
-            basegfx::fround(aRangeNewNoShearNoRotate.getMaxY()));
+            basegfx::fround<tools::Long>(aRangeNewNoShearNoRotate.getMinX()),
+            basegfx::fround<tools::Long>(aRangeNewNoShearNoRotate.getMinY()),
+            basegfx::fround<tools::Long>(aRangeNewNoShearNoRotate.getMaxX()),
+            basegfx::fround<tools::Long>(aRangeNewNoShearNoRotate.getMaxY()));
 
         // continue with the old original stuff
         if (!aOldRect.GetWidth() || !aOldRect.GetHeight())
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index afa8efd0b779..a91f88df3159 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -123,8 +123,8 @@ void SdrDragView::TakeActionRect(tools::Rectangle& rRect) 
const
                 else
                 {
                     rRect = tools::Rectangle(
-                        basegfx::fround(aBoundRange.getMinX()), 
basegfx::fround(aBoundRange.getMinY()),
-                        basegfx::fround(aBoundRange.getMaxX()), 
basegfx::fround(aBoundRange.getMaxY()));
+                        basegfx::fround<tools::Long>(aBoundRange.getMinX()), 
basegfx::fround<tools::Long>(aBoundRange.getMinY()),
+                        basegfx::fround<tools::Long>(aBoundRange.getMaxX()), 
basegfx::fround<tools::Long>(aBoundRange.getMaxY()));
                 }
             }
         }
@@ -164,8 +164,8 @@ bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, bool 
bTR ) const
                 {
                     // drag the whole Object (Move, Resize, ...)
                     const basegfx::B2DPoint 
aTransformed(mpCurrentSdrDragMethod->getCurrentTransformation() * 
basegfx::B2DPoint(aPt.X(), aPt.Y()));
-                    rPos.setX( basegfx::fround(aTransformed.getX()) );
-                    rPos.setY( basegfx::fround(aTransformed.getY()) );
+                    rPos.setX( 
basegfx::fround<tools::Long>(aTransformed.getX()) );
+                    rPos.setY( 
basegfx::fround<tools::Long>(aTransformed.getY()) );
                 }
             }
         }
@@ -216,8 +216,8 @@ bool SdrDragView::BegDragObj(const Point& rPnt, 
OutputDevice* pOut, SdrHdl* pHdl
             basegfx::B2DPoint(aPnt.X(), aPnt.Y()),
             GetSdrPageView())))
         {
-            aPnt.AdjustX(basegfx::fround(-aGridOffset.getX()));
-            aPnt.AdjustY(basegfx::fround(-aGridOffset.getY()));
+            aPnt.AdjustX(basegfx::fround<tools::Long>(-aGridOffset.getX()));
+            aPnt.AdjustY(basegfx::fround<tools::Long>(-aGridOffset.getY()));
         }
 
         if(pHdl == nullptr
@@ -520,8 +520,8 @@ void SdrDragView::MovDragObj(const Point& rPnt)
         basegfx::B2DPoint(aPnt.X(), aPnt.Y()),
         GetSdrPageView())))
     {
-        aPnt.AdjustX(basegfx::fround(-aGridOffset.getX()));
-        aPnt.AdjustY(basegfx::fround(-aGridOffset.getY()));
+        aPnt.AdjustX(basegfx::fround<tools::Long>(-aGridOffset.getX()));
+        aPnt.AdjustY(basegfx::fround<tools::Long>(-aGridOffset.getY()));
     }
 
     ImpLimitToWorkArea(aPnt);
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 799d51f85930..c03ae253d6c6 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -347,8 +347,8 @@ void SdrObjEditView::ModelHasChanged()
             basegfx::B2DVector aGridOffset(0.0, 0.0);
             if (getPossibleGridOffsetForSdrObject(aGridOffset, pTextObj.get(), 
GetSdrPageView()))
             {
-                const Point aOffset(basegfx::fround(aGridOffset.getX()),
-                                    basegfx::fround(aGridOffset.getY()));
+                const Point 
aOffset(basegfx::fround<tools::Long>(aGridOffset.getX()),
+                                    
basegfx::fround<tools::Long>(aGridOffset.getY()));
 
                 aEditArea1 += aOffset;
                 aMinArea1 += aOffset;
@@ -1432,8 +1432,8 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, 
SdrPageView* pPV, vcl::W
             basegfx::B2DVector aGridOffset(0.0, 0.0);
             if (getPossibleGridOffsetForSdrObject(aGridOffset, pTextObj.get(), 
pPV))
             {
-                const Point aOffset(basegfx::fround(aGridOffset.getX()),
-                                    basegfx::fround(aGridOffset.getY()));
+                const Point 
aOffset(basegfx::fround<tools::Long>(aGridOffset.getX()),
+                                    
basegfx::fround<tools::Long>(aGridOffset.getY()));
 
                 aTextEditArea += aOffset;
                 aMinTextEditArea += aOffset;
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 87865e6a0b04..84bb470b5741 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -571,11 +571,11 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj1, 
bool bScale)
 
                         const Size aOrigSizePixel(aBitmapEx.GetSizePixel());
                         const Point aClipTopLeft(
-                            basegfx::fround(floor(std::max(0.0, 
aPixel.getMinX()))),
-                            basegfx::fround(floor(std::max(0.0, 
aPixel.getMinY()))));
+                            basegfx::fround<tools::Long>(floor(std::max(0.0, 
aPixel.getMinX()))),
+                            basegfx::fround<tools::Long>(floor(std::max(0.0, 
aPixel.getMinY()))));
                         const Size aClipSize(
-                            
basegfx::fround(ceil(std::min(static_cast<double>(aOrigSizePixel.Width()), 
aPixel.getWidth()))),
-                            
basegfx::fround(ceil(std::min(static_cast<double>(aOrigSizePixel.Height()), 
aPixel.getHeight()))));
+                            
basegfx::fround<tools::Long>(ceil(std::min(static_cast<double>(aOrigSizePixel.Width()),
 aPixel.getWidth()))),
+                            
basegfx::fround<tools::Long>(ceil(std::min(static_cast<double>(aOrigSizePixel.Height()),
 aPixel.getHeight()))));
                         const BitmapEx aClippedBitmap(
                             aBitmapEx,
                             aClipTopLeft,
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 49c67aa8f21f..d2b85d32161a 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1658,8 +1658,8 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
                 GradTransformer::GradToVec(aGradTransGradient, 
aGradTransVector, pObj);
 
                 // build handles
-                const Point 
aTmpPos1(basegfx::fround(aGradTransVector.maPositionA.getX()), 
basegfx::fround(aGradTransVector.maPositionA.getY()));
-                const Point 
aTmpPos2(basegfx::fround(aGradTransVector.maPositionB.getX()), 
basegfx::fround(aGradTransVector.maPositionB.getY()));
+                const Point 
aTmpPos1(basegfx::fround<tools::Long>(aGradTransVector.maPositionA.getX()), 
basegfx::fround<tools::Long>(aGradTransVector.maPositionA.getY()));
+                const Point 
aTmpPos2(basegfx::fround<tools::Long>(aGradTransVector.maPositionB.getX()), 
basegfx::fround<tools::Long>(aGradTransVector.maPositionB.getY()));
                 std::unique_ptr<SdrHdlColor> pColHdl1(new 
SdrHdlColor(aTmpPos1, aGradTransVector.aCol1, SDR_HANDLE_COLOR_SIZE_NORMAL, 
true));
                 std::unique_ptr<SdrHdlColor> pColHdl2(new 
SdrHdlColor(aTmpPos2, aGradTransVector.aCol2, SDR_HANDLE_COLOR_SIZE_NORMAL, 
true));
                 std::unique_ptr<SdrHdlGradient> pGradHdl(new 
SdrHdlGradient(aTmpPos1, aTmpPos2, false));
@@ -1699,8 +1699,8 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
                     GradTransformer::GradToVec(aGradTransGradient, 
aGradTransVector, pObj);
 
                     // build handles
-                    const Point 
aTmpPos1(basegfx::fround(aGradTransVector.maPositionA.getX()), 
basegfx::fround(aGradTransVector.maPositionA.getY()));
-                    const Point 
aTmpPos2(basegfx::fround(aGradTransVector.maPositionB.getX()), 
basegfx::fround(aGradTransVector.maPositionB.getY()));
+                    const Point 
aTmpPos1(basegfx::fround<tools::Long>(aGradTransVector.maPositionA.getX()), 
basegfx::fround<tools::Long>(aGradTransVector.maPositionA.getY()));
+                    const Point 
aTmpPos2(basegfx::fround<tools::Long>(aGradTransVector.maPositionB.getX()), 
basegfx::fround<tools::Long>(aGradTransVector.maPositionB.getY()));
                     std::unique_ptr<SdrHdlColor> pColHdl1(new 
SdrHdlColor(aTmpPos1, aGradTransVector.aCol1, aHdlSize, false));
                     std::unique_ptr<SdrHdlColor> pColHdl2(new 
SdrHdlColor(aTmpPos2, aGradTransVector.aCol2, aHdlSize, false));
                     std::unique_ptr<SdrHdlGradient> pGradHdl(new 
SdrHdlGradient(aTmpPos1, aTmpPos2, true));
@@ -2384,8 +2384,8 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const 
Point& rPnt, sal_uInt16 nT
     if(getPossibleGridOffsetForSdrObject(aGridOffset, pObj, pPV))
     {
         aRect += Point(
-            basegfx::fround(aGridOffset.getX()),
-            basegfx::fround(aGridOffset.getY()));
+            basegfx::fround<tools::Long>(aGridOffset.getX()),
+            basegfx::fround<tools::Long>(aGridOffset.getY()));
     }
 
     double nTol2(nTol);
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 19c498948dcd..414bc53ddea4 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2071,15 +2071,15 @@ basegfx::B2DPolygon 
SdrEdgeObj::ImplAddConnectorOverlay(const SdrDragMethod& rDr
         if (bTail1)
         {
             const basegfx::B2DPoint 
aTemp(rDragMethod.getCurrentTransformation() * 
basegfx::B2DPoint(aMyCon1.m_aObjOfs.X(), aMyCon1.m_aObjOfs.Y()));
-            aMyCon1.m_aObjOfs.setX( basegfx::fround(aTemp.getX()) );
-            aMyCon1.m_aObjOfs.setY( basegfx::fround(aTemp.getY()) );
+            aMyCon1.m_aObjOfs.setX( basegfx::fround<tools::Long>(aTemp.getX()) 
);
+            aMyCon1.m_aObjOfs.setY( basegfx::fround<tools::Long>(aTemp.getY()) 
);
         }
 
         if (bTail2)
         {
             const basegfx::B2DPoint 
aTemp(rDragMethod.getCurrentTransformation() * 
basegfx::B2DPoint(aMyCon2.m_aObjOfs.X(), aMyCon2.m_aObjOfs.Y()));
-            aMyCon2.m_aObjOfs.setX( basegfx::fround(aTemp.getX()) );
-            aMyCon2.m_aObjOfs.setY( basegfx::fround(aTemp.getY()) );
+            aMyCon2.m_aObjOfs.setX( basegfx::fround<tools::Long>(aTemp.getX()) 
);
+            aMyCon2.m_aObjOfs.setY( basegfx::fround<tools::Long>(aTemp.getY()) 
);
         }
 
         SdrEdgeInfoRec aInfo(m_aEdgeInfo);
@@ -2104,15 +2104,15 @@ basegfx::B2DPolygon 
SdrEdgeObj::ImplAddConnectorOverlay(const SdrDragMethod& rDr
         if (bTail1)
         {
             const basegfx::B2DPoint 
aTemp(rDragMethod.getCurrentTransformation() * basegfx::B2DPoint(aPt1.X(), 
aPt1.Y()));
-            aPt1.setX( basegfx::fround(aTemp.getX()) );
-            aPt1.setY( basegfx::fround(aTemp.getY()) );
+            aPt1.setX( basegfx::fround<tools::Long>(aTemp.getX()) );
+            aPt1.setY( basegfx::fround<tools::Long>(aTemp.getY()) );
         }
 
         if (bTail2)
         {
             const basegfx::B2DPoint 
aTemp(rDragMethod.getCurrentTransformation() * basegfx::B2DPoint(aPt2.X(), 
aPt2.Y()));
-            aPt2.setX( basegfx::fround(aTemp.getX()) );
-            aPt2.setY( basegfx::fround(aTemp.getY()) );
+            aPt2.setX( basegfx::fround<tools::Long>(aTemp.getX()) );
+            aPt2.setY( basegfx::fround<tools::Long>(aTemp.getY()) );
         }
 
         aResult.append(basegfx::B2DPoint(aPt1.X(), aPt1.Y()));
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 0f7151e2957e..0d03e5934fa7 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1232,21 +1232,21 @@ void SdrGrafObj::addCropHandles(SdrHdlList& rTarget) 
const
     basegfx::B2DPoint aPos;
 
     aPos = aMatrix * basegfx::B2DPoint(0.0, 0.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::UpperLeft, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::UpperLeft, fShearX, 
fRotate));
     aPos = aMatrix * basegfx::B2DPoint(0.5, 0.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::Upper, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::Upper, fShearX, 
fRotate));
     aPos = aMatrix * basegfx::B2DPoint(1.0, 0.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::UpperRight, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::UpperRight, fShearX, 
fRotate));
     aPos = aMatrix * basegfx::B2DPoint(0.0, 0.5);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::Left , fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::Left , fShearX, 
fRotate));
     aPos = aMatrix * basegfx::B2DPoint(1.0, 0.5);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::Right, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::Right, fShearX, 
fRotate));
     aPos = aMatrix * basegfx::B2DPoint(0.0, 1.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::LowerLeft, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::LowerLeft, fShearX, 
fRotate));
     aPos = aMatrix * basegfx::B2DPoint(0.5, 1.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::Lower, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::Lower, fShearX, 
fRotate));
     aPos = aMatrix * basegfx::B2DPoint(1.0, 1.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::LowerRight, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::LowerRight, fShearX, 
fRotate));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 9831cf9124c9..5778cbe5622d 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -339,7 +339,7 @@ static tools::Long impGetLineStartEndDistance(const 
basegfx::B2DPolyPolygon& rPo
     const basegfx::B2DRange aPolygonRange(rPolyPolygon.getB2DRange());
     const double fOldWidth(std::max(aPolygonRange.getWidth(), 1.0));
     const double fScale(static_cast<double>(nNewWidth) / fOldWidth);
-    tools::Long nHeight(basegfx::fround(aPolygonRange.getHeight() * fScale));
+    tools::Long nHeight(basegfx::fround<tools::Long>(aPolygonRange.getHeight() 
* fScale));
 
     if(bCenter)
     {
@@ -1407,8 +1407,8 @@ void SdrMeasureObj::TRSetBaseGeometry(const 
basegfx::B2DHomMatrix& rMatrix, cons
     }
 
     // derive new model data
-    const Point aNewPt1(basegfx::fround(aPosA.getX()), 
basegfx::fround(aPosA.getY()));
-    const Point aNewPt2(basegfx::fround(aPosB.getX()), 
basegfx::fround(aPosB.getY()));
+    const Point aNewPt1(basegfx::fround<tools::Long>(aPosA.getX()), 
basegfx::fround<tools::Long>(aPosA.getY()));
+    const Point aNewPt2(basegfx::fround<tools::Long>(aPosB.getX()), 
basegfx::fround<tools::Long>(aPosB.getY()));
 
     if(aNewPt1 == aPt1 && aNewPt2 == aPt2)
         return;
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index b99145d932be..102d7f8bf495 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -521,12 +521,12 @@ void ImpSdrPdfImport::InsertObj(SdrObject* pObj1, bool 
bScale)
 
                         const Size aOrigSizePixel(aBitmapEx.GetSizePixel());
                         const Point aClipTopLeft(
-                            basegfx::fround(floor(std::max(0.0, 
aPixel.getMinX()))),
-                            basegfx::fround(floor(std::max(0.0, 
aPixel.getMinY()))));
+                            basegfx::fround<tools::Long>(floor(std::max(0.0, 
aPixel.getMinX()))),
+                            basegfx::fround<tools::Long>(floor(std::max(0.0, 
aPixel.getMinY()))));
                         const Size aClipSize(
-                            basegfx::fround(ceil(std::min(
+                            basegfx::fround<tools::Long>(ceil(std::min(
                                 static_cast<double>(aOrigSizePixel.Width()), 
aPixel.getWidth()))),
-                            basegfx::fround(
+                            basegfx::fround<tools::Long>(
                                 
ceil(std::min(static_cast<double>(aOrigSizePixel.Height()),
                                               aPixel.getHeight()))));
                         const BitmapEx aClippedBitmap(aBitmapEx, aClipTopLeft, 
aClipSize);
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx 
b/svx/source/unodraw/UnoGraphicExporter.cxx
index 2dba11ae72d6..ba35119fcbe9 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -926,8 +926,8 @@ bool GraphicExporter::GetGraphic( ExportSettings const & 
rSettings, Graphic& aGr
             // that avoids to do it later by Metafile::Move what would be 
expensive
             aOutMap.SetOrigin(
                 Point(
-                    basegfx::fround(-aBound.getMinX() - 
aHalfPixelInMtf.getWidth()),
-                    basegfx::fround(-aBound.getMinY() - 
aHalfPixelInMtf.getHeight()) ) );
+                    basegfx::fround<tools::Long>(-aBound.getMinX() - 
aHalfPixelInMtf.getWidth()),
+                    basegfx::fround<tools::Long>(-aBound.getMinY() - 
aHalfPixelInMtf.getHeight()) ) );
             aOut->SetRelativeMapMode( aOutMap );
 
             sdr::contact::DisplayInfo aDisplayInfo;
@@ -965,8 +965,8 @@ bool GraphicExporter::GetGraphic( ExportSettings const & 
rSettings, Graphic& aGr
             // export is always a risky thing, so it will have to show if this 
will
             // not influence something else.
             const Size aBoundSize(
-                basegfx::fround(aBound.getWidth() + 1),
-                basegfx::fround(aBound.getHeight() + 1));
+                basegfx::fround<tools::Long>(aBound.getWidth() + 1),
+                basegfx::fround<tools::Long>(aBound.getHeight() + 1));
             aMtf.SetPrefMapMode( aMap );
             aMtf.SetPrefSize( aBoundSize );
 
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index de1590536d19..838d7e20b21c 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2015,8 +2015,8 @@ bool SvxShape::setPropertyValueImpl( const OUString&, 
const SfxItemPropertyMapEn
             basegfx::B2DHomMatrix aNewHomogenMatrix;
             pSdrObject->TRGetBaseGeometry(aNewHomogenMatrix, aNewPolyPolygon);
 
-            aVclPoint.AdjustX(basegfx::fround(aNewHomogenMatrix.get(0, 2)) );
-            aVclPoint.AdjustY(basegfx::fround(aNewHomogenMatrix.get(1, 2)) );
+            
aVclPoint.AdjustX(basegfx::fround<tools::Long>(aNewHomogenMatrix.get(0, 2)) );
+            
aVclPoint.AdjustY(basegfx::fround<tools::Long>(aNewHomogenMatrix.get(1, 2)) );
 
             // #88491# position relative to anchor
             if( pSdrObject->getSdrModelFromSdrObject().IsWriter() )
@@ -2542,8 +2542,8 @@ bool SvxShape::getPropertyValueImpl( const OUString&, 
const SfxItemPropertyMapEn
         basegfx::B2DHomMatrix aNewHomogenMatrix;
         GetSdrObject()->TRGetBaseGeometry(aNewHomogenMatrix, aNewPolyPolygon);
 
-        aVclPoint.AdjustX( -(basegfx::fround(aNewHomogenMatrix.get(0, 2))) );
-        aVclPoint.AdjustY( -(basegfx::fround(aNewHomogenMatrix.get(1, 2))) );
+        aVclPoint.AdjustX( 
-(basegfx::fround<tools::Long>(aNewHomogenMatrix.get(0, 2))) );
+        aVclPoint.AdjustY( 
-(basegfx::fround<tools::Long>(aNewHomogenMatrix.get(1, 2))) );
 
         // tdf#117145 metric of SdrModel is app-specific, metric of UNO API is 
100thmm
         // Need to adapt aVclPoint from app-specific to 100thmm
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 691de68289cc..26254ad9e9f2 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -866,8 +866,8 @@ void SwVirtFlyDrawObj::NbcCrop(const basegfx::B2DPoint& 
rRef, double fxFact, dou
     // rRef is relative to the Crop-Action, si in X/Y-Ranges of [0.0 .. 1.0],
     // to get the correct absolute position, transform using the old Rect
     const Point aRef(
-        aOldRect.Left() + basegfx::fround(aOldRect.GetWidth() * rRef.getX()),
-        aOldRect.Top() + basegfx::fround(aOldRect.GetHeight() * rRef.getY()));
+        aOldRect.Left() + basegfx::fround<tools::Long>(aOldRect.GetWidth() * 
rRef.getX()),
+        aOldRect.Top() + basegfx::fround<tools::Long>(aOldRect.GetHeight() * 
rRef.getY()));
 
     // apply transformation, use old ResizeRect for now
     tools::Rectangle aNewRect( aOldRect );
@@ -956,8 +956,8 @@ void SwVirtFlyDrawObj::NbcCrop(const basegfx::B2DPoint& 
rRef, double fxFact, dou
         // Create the new TopLeft of the unrotated, cropped object by creating
         // as if re-creating the unrotated geometry
         aNewTopLeft = Point(
-            basegfx::fround(aRotNewCenter.getX() - (0.5 * 
aNewRect.getOpenWidth())),
-            basegfx::fround(aRotNewCenter.getY() - (0.5 * 
aNewRect.getOpenHeight())));
+            basegfx::fround<tools::Long>(aRotNewCenter.getX() - (0.5 * 
aNewRect.getOpenWidth())),
+            basegfx::fround<tools::Long>(aRotNewCenter.getY() - (0.5 * 
aNewRect.getOpenHeight())));
     }
 
     // check if we have movement and execute if yes
@@ -1018,10 +1018,10 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, 
const Fraction& xFact, const
 
         // create new modified, but untransformed OutRect
         setOutRectangle(tools::Rectangle(
-            basegfx::fround(aCenter.getX() - (0.5 * aAbsScale.getX())),
-            basegfx::fround(aCenter.getY() - (0.5 * aAbsScale.getY())),
-            basegfx::fround(aCenter.getX() + (0.5 * aAbsScale.getX())),
-            basegfx::fround(aCenter.getY() + (0.5 * aAbsScale.getY()))));
+            basegfx::fround<tools::Long>(aCenter.getX() - (0.5 * 
aAbsScale.getX())),
+            basegfx::fround<tools::Long>(aCenter.getY() - (0.5 * 
aAbsScale.getY())),
+            basegfx::fround<tools::Long>(aCenter.getX() + (0.5 * 
aAbsScale.getX())),
+            basegfx::fround<tools::Long>(aCenter.getY() + (0.5 * 
aAbsScale.getY()))));
 
         // restore FrameAreas so that actions below not adapted to new
         // full transformations take the correct actions
@@ -1242,21 +1242,21 @@ void SwVirtFlyDrawObj::addCropHandles(SdrHdlList& 
rTarget) const
     basegfx::B2DPoint aPos;
 
     aPos = aTargetTransform * basegfx::B2DPoint(0.0, 0.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::UpperLeft, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::UpperLeft, fShearX, 
fRotate));
     aPos = aTargetTransform * basegfx::B2DPoint(0.5, 0.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::Upper, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::Upper, fShearX, 
fRotate));
     aPos = aTargetTransform * basegfx::B2DPoint(1.0, 0.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::UpperRight, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::UpperRight, fShearX, 
fRotate));
     aPos = aTargetTransform * basegfx::B2DPoint(0.0, 0.5);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::Left , fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::Left , fShearX, 
fRotate));
     aPos = aTargetTransform * basegfx::B2DPoint(1.0, 0.5);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::Right, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::Right, fShearX, 
fRotate));
     aPos = aTargetTransform * basegfx::B2DPoint(0.0, 1.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::LowerLeft, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::LowerLeft, fShearX, 
fRotate));
     aPos = aTargetTransform * basegfx::B2DPoint(0.5, 1.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::Lower, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::Lower, fShearX, 
fRotate));
     aPos = aTargetTransform * basegfx::B2DPoint(1.0, 1.0);
-    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), 
basegfx::fround(aPos.getY())), SdrHdlKind::LowerRight, fShearX, fRotate));
+    
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround<tools::Long>(aPos.getX()),
 basegfx::fround<tools::Long>(aPos.getY())), SdrHdlKind::LowerRight, fShearX, 
fRotate));
 }
 
 // Macro
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 0cda5673219e..28c3238b16d6 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -181,10 +181,10 @@ SwRect TransformableSwFrame::getUntransformedFrameArea() 
const
         const basegfx::B2DVector aAbsScale(basegfx::absolute(aScale));
 
         return SwRect(
-            basegfx::fround(aCenter.getX() - (0.5 * aAbsScale.getX())),
-            basegfx::fround(aCenter.getY() - (0.5 * aAbsScale.getY())),
-            basegfx::fround(aAbsScale.getX()),
-            basegfx::fround(aAbsScale.getY()));
+            basegfx::fround<tools::Long>(aCenter.getX() - (0.5 * 
aAbsScale.getX())),
+            basegfx::fround<tools::Long>(aCenter.getY() - (0.5 * 
aAbsScale.getY())),
+            basegfx::fround<tools::Long>(aAbsScale.getX()),
+            basegfx::fround<tools::Long>(aAbsScale.getY()));
     }
 }
 
@@ -206,10 +206,10 @@ SwRect 
TransformableSwFrame::getUntransformedFramePrintArea() const
         const SwRect aUntransformedFrameArea(getUntransformedFrameArea());
 
         return SwRect(
-            basegfx::fround(aCenter.getX() - (0.5 * aAbsScale.getX())) - 
aUntransformedFrameArea.Left(),
-            basegfx::fround(aCenter.getY() - (0.5 * aAbsScale.getY())) - 
aUntransformedFrameArea.Top(),
-            basegfx::fround(aAbsScale.getX()),
-            basegfx::fround(aAbsScale.getY()));
+            basegfx::fround<tools::Long>(aCenter.getX() - (0.5 * 
aAbsScale.getX())) - aUntransformedFrameArea.Left(),
+            basegfx::fround<tools::Long>(aCenter.getY() - (0.5 * 
aAbsScale.getY())) - aUntransformedFrameArea.Top(),
+            basegfx::fround<tools::Long>(aAbsScale.getX()),
+            basegfx::fround<tools::Long>(aAbsScale.getY()));
     }
 }
 
@@ -240,8 +240,8 @@ void 
TransformableSwFrame::adaptFrameAreasToTransformations()
         basegfx::B2DRange aRangeFrameArea(0.0, 0.0, 1.0, 1.0);
         aRangeFrameArea.transform(getLocalFrameAreaTransformation());
         const SwRect aNewFrm(
-            basegfx::fround(aRangeFrameArea.getMinX()), 
basegfx::fround(aRangeFrameArea.getMinY()),
-            basegfx::fround(aRangeFrameArea.getWidth()), 
basegfx::fround(aRangeFrameArea.getHeight()));
+            basegfx::fround<tools::Long>(aRangeFrameArea.getMinX()), 
basegfx::fround<tools::Long>(aRangeFrameArea.getMinY()),
+            basegfx::fround<tools::Long>(aRangeFrameArea.getWidth()), 
basegfx::fround<tools::Long>(aRangeFrameArea.getHeight()));
 
         if(aNewFrm != mrSwFrameAreaDefinition.getFrameArea())
         {
@@ -256,10 +256,10 @@ void 
TransformableSwFrame::adaptFrameAreasToTransformations()
     basegfx::B2DRange aRangeFramePrintArea(0.0, 0.0, 1.0, 1.0);
     aRangeFramePrintArea.transform(getLocalFramePrintAreaTransformation());
     const SwRect aNewPrt(
-        basegfx::fround(aRangeFramePrintArea.getMinX()) - 
mrSwFrameAreaDefinition.getFrameArea().Left(),
-        basegfx::fround(aRangeFramePrintArea.getMinY()) - 
mrSwFrameAreaDefinition.getFrameArea().Top(),
-        basegfx::fround(aRangeFramePrintArea.getWidth()),
-        basegfx::fround(aRangeFramePrintArea.getHeight()));
+        basegfx::fround<tools::Long>(aRangeFramePrintArea.getMinX()) - 
mrSwFrameAreaDefinition.getFrameArea().Left(),
+        basegfx::fround<tools::Long>(aRangeFramePrintArea.getMinY()) - 
mrSwFrameAreaDefinition.getFrameArea().Top(),
+        basegfx::fround<tools::Long>(aRangeFramePrintArea.getWidth()),
+        basegfx::fround<tools::Long>(aRangeFramePrintArea.getHeight()));
 
     if(aNewPrt != mrSwFrameAreaDefinition.getFramePrintArea())
     {
diff --git a/sw/source/ui/table/autoformatpreview.cxx 
b/sw/source/ui/table/autoformatpreview.cxx
index e04fffefcae4..08ec0e27d3d5 100644
--- a/sw/source/ui/table/autoformatpreview.cxx
+++ b/sw/source/ui/table/autoformatpreview.cxx
@@ -237,9 +237,10 @@ void AutoFormatPreview::DrawString(vcl::RenderContext& 
rRenderContext, size_t nC
     Size aStrSize;
     sal_uInt8 nFormatIndex = GetFormatIndex(nCol, nRow);
     const basegfx::B2DRange aCellRange(maArray.GetCellRange(nCol, nRow));
-    const tools::Rectangle cellRect(
-        basegfx::fround(aCellRange.getMinX()), 
basegfx::fround(aCellRange.getMinY()),
-        basegfx::fround(aCellRange.getMaxX()), 
basegfx::fround(aCellRange.getMaxY()));
+    const tools::Rectangle 
cellRect(basegfx::fround<tools::Long>(aCellRange.getMinX()),
+                                    
basegfx::fround<tools::Long>(aCellRange.getMinY()),
+                                    
basegfx::fround<tools::Long>(aCellRange.getMaxX()),
+                                    
basegfx::fround<tools::Long>(aCellRange.getMaxY()));
     Point aPos = cellRect.TopLeft();
     tools::Long nRightX = 0;
 
@@ -327,9 +328,11 @@ void AutoFormatPreview::DrawBackground(vcl::RenderContext& 
rRenderContext)
             rRenderContext.SetLineColor();
             rRenderContext.SetFillColor(aBrushItem.GetColor());
             const basegfx::B2DRange aCellRange(maArray.GetCellRange(nCol, 
nRow));
-            rRenderContext.DrawRect(tools::Rectangle(
-                basegfx::fround(aCellRange.getMinX()), 
basegfx::fround(aCellRange.getMinY()),
-                basegfx::fround(aCellRange.getMaxX()), 
basegfx::fround(aCellRange.getMaxY())));
+            rRenderContext.DrawRect(
+                
tools::Rectangle(basegfx::fround<tools::Long>(aCellRange.getMinX()),
+                                 
basegfx::fround<tools::Long>(aCellRange.getMinY()),
+                                 
basegfx::fround<tools::Long>(aCellRange.getMaxX()),
+                                 
basegfx::fround<tools::Long>(aCellRange.getMaxY())));
             rRenderContext.Pop();
         }
     }
diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx
index 87c500272160..dfad8876b315 100644
--- a/vcl/source/bitmap/BitmapEx.cxx
+++ b/vcl/source/bitmap/BitmapEx.cxx
@@ -739,7 +739,7 @@ BitmapEx BitmapEx::TransformBitmapEx(
         return BitmapEx();
 
     // force destination to 24 bit, we want to smooth output
-    const Size aDestinationSize(basegfx::fround(fWidth), 
basegfx::fround(fHeight));
+    const Size aDestinationSize(basegfx::fround<tools::Long>(fWidth), 
basegfx::fround<tools::Long>(fHeight));
     bool bSmooth = implTransformNeedsSmooth(rTransformation);
     const Bitmap aDestination(impTransformBitmap(GetBitmap(), 
aDestinationSize, rTransformation, bSmooth));
 
diff --git a/vcl/source/bitmap/BitmapTools.cxx 
b/vcl/source/bitmap/BitmapTools.cxx
index 41f8ff38992c..4045a107c814 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -376,8 +376,8 @@ BitmapEx CanvasTransformBitmap( const BitmapEx&             
    rBitmap,
                                 ::basegfx::B2DRectangle const & rDestRect,
                                 ::basegfx::B2DHomMatrix const & 
rLocalTransform )
 {
-    const Size aDestBmpSize( ::basegfx::fround( rDestRect.getWidth() ),
-                             ::basegfx::fround( rDestRect.getHeight() ) );
+    const Size aDestBmpSize( ::basegfx::fround<tools::Long>( 
rDestRect.getWidth() ),
+                             ::basegfx::fround<tools::Long>( 
rDestRect.getHeight() ) );
 
     if( aDestBmpSize.IsEmpty() )
         return BitmapEx();
@@ -460,8 +460,8 @@ BitmapEx CanvasTransformBitmap( const BitmapEx&             
    rBitmap,
                         ::basegfx::B2DPoint aPoint(x,y);
                         aPoint *= aTransform;
 
-                        const int nSrcX( ::basegfx::fround( aPoint.getX() ) );
-                        const int nSrcY( ::basegfx::fround( aPoint.getY() ) );
+                        const tools::Long nSrcX( 
::basegfx::fround<tools::Long>( aPoint.getX() ) );
+                        const tools::Long nSrcY( 
::basegfx::fround<tools::Long>( aPoint.getY() ) );
                         if( nSrcX < 0 || nSrcX >= aBmpSize.Width() ||
                             nSrcY < 0 || nSrcY >= aBmpSize.Height() )
                         {
@@ -484,8 +484,8 @@ BitmapEx CanvasTransformBitmap( const BitmapEx&             
    rBitmap,
                         ::basegfx::B2DPoint aPoint(x,y);
                         aPoint *= aTransform;
 
-                        const int nSrcX( ::basegfx::fround( aPoint.getX() ) );
-                        const int nSrcY( ::basegfx::fround( aPoint.getY() ) );
+                        const tools::Long nSrcX( 
::basegfx::fround<tools::Long>( aPoint.getX() ) );
+                        const tools::Long nSrcY( 
::basegfx::fround<tools::Long>( aPoint.getY() ) );
                         if( nSrcX < 0 || nSrcX >= aBmpSize.Width() ||
                             nSrcY < 0 || nSrcY >= aBmpSize.Height() )
                         {
@@ -519,8 +519,8 @@ BitmapEx DrawBitmapInRect( const BitmapEx& rBitmap,
     if( rBitmapRect.isEmpty() || rDestRect.isEmpty() )
         return BitmapEx();
 
-    const Size aDestBmpSize( ::basegfx::fround( rDestRect.getWidth() ),
-                             ::basegfx::fround( rDestRect.getHeight() ) );
+    const Size aDestBmpSize( ::basegfx::fround<tools::Long>( 
rDestRect.getWidth() ),
+                             ::basegfx::fround<tools::Long>( 
rDestRect.getHeight() ) );
 
     Bitmap aSrcBitmap( rBitmap.GetBitmap() );
     Bitmap aSrcAlpha;
diff --git a/vcl/source/gdi/gdimetafiletools.cxx 
b/vcl/source/gdi/gdimetafiletools.cxx
index 95c42c5df724..f503248dd7b2 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -221,11 +221,11 @@ namespace
         rTarget.AddAction(
             new MetaBmpExScaleAction(
                 Point(
-                    basegfx::fround(aLogicBitmapRange.getMinX()),
-                    basegfx::fround(aLogicBitmapRange.getMinY())),
+                    basegfx::fround<tools::Long>(aLogicBitmapRange.getMinX()),
+                    basegfx::fround<tools::Long>(aLogicBitmapRange.getMinY())),
                 Size(
-                    basegfx::fround(aLogicBitmapRange.getWidth()),
-                    basegfx::fround(aLogicBitmapRange.getHeight())),
+                    basegfx::fround<tools::Long>(aLogicBitmapRange.getWidth()),
+                    
basegfx::fround<tools::Long>(aLogicBitmapRange.getHeight())),
                 BitmapEx(rBitmapEx.GetBitmap(), aAlpha)));
 
         return true;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 57aece29bcd6..8bdcfb4146f6 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -546,13 +546,13 @@ Bitmap ImpGraphic::getBitmap(const 
GraphicConversionParameters& rParameters) con
 
                 if(fWH <= 1.0)
                 {
-                    aDrawSize.setWidth(basegfx::fround(GRAPHIC_MTFTOBMP_MAXEXT 
* fWH));
+                    
aDrawSize.setWidth(basegfx::fround<tools::Long>(GRAPHIC_MTFTOBMP_MAXEXT * fWH));
                     aDrawSize.setHeight(GRAPHIC_MTFTOBMP_MAXEXT);
                 }
                 else
                 {
                     aDrawSize.setWidth(GRAPHIC_MTFTOBMP_MAXEXT);
-                    
aDrawSize.setHeight(basegfx::fround(GRAPHIC_MTFTOBMP_MAXEXT / fWH));
+                    
aDrawSize.setHeight(basegfx::fround<tools::Long>(GRAPHIC_MTFTOBMP_MAXEXT / 
fWH));
                 }
             }
 
@@ -774,7 +774,7 @@ Size ImpGraphic::getPrefSize() const
                            aSize = Size(basegfx::fround(rRange.getWidth() / 
20.0f), basegfx::fround(rRange.getHeight() / 20.0f));
                         else
 #endif
-                            aSize = Size(basegfx::fround(rRange.getWidth()), 
basegfx::fround(rRange.getHeight()));
+                            aSize = 
Size(basegfx::fround<tools::Long>(rRange.getWidth()), 
basegfx::fround<tools::Long>(rRange.getHeight()));
                     }
                     else
                     {
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 6298e3052bee..6bb98e1398bd 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -1245,8 +1245,8 @@ tools::Rectangle vcl::Region::GetBoundRect() const
         {
             // #i122149# corrected rounding, no need for ceil() and floor() 
here
             return tools::Rectangle(
-                basegfx::fround(aRange.getMinX()), 
basegfx::fround(aRange.getMinY()),
-                basegfx::fround(aRange.getMaxX()), 
basegfx::fround(aRange.getMaxY()));
+                basegfx::fround<tools::Long>(aRange.getMinX()), 
basegfx::fround<tools::Long>(aRange.getMinY()),
+                basegfx::fround<tools::Long>(aRange.getMaxX()), 
basegfx::fround<tools::Long>(aRange.getMaxY()));
         }
     }
 
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index 7b48df7a0966..9e543ed06c26 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -701,8 +701,8 @@ void RegionBand::Scale(double fScaleX, double fScaleY)
         // process the vertical move
         if(0.0 != fScaleY)
         {
-            pBand->mnYTop = basegfx::fround(pBand->mnYTop * fScaleY);
-            pBand->mnYBottom = basegfx::fround(pBand->mnYBottom * fScaleY);
+            pBand->mnYTop = basegfx::fround<tools::Long>(pBand->mnYTop * 
fScaleY);
+            pBand->mnYBottom = basegfx::fround<tools::Long>(pBand->mnYBottom * 
fScaleY);
         }
 
         // process the horizontal move
diff --git a/vcl/source/graphic/GraphicObject.cxx 
b/vcl/source/graphic/GraphicObject.cxx
index 7abf3b3d3bfd..3ba9ef64ce94 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -743,10 +743,10 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& 
rDestSize, const MapMo
                 const double 
fFactorX(static_cast<double>(aBitmapEx.GetSizePixel().Width()) / 
aSrcSizePixel.Width());
                 const double 
fFactorY(static_cast<double>(aBitmapEx.GetSizePixel().Height()) / 
aSrcSizePixel.Height());
 
-                aCropLeftTop.setWidth( basegfx::fround(aCropLeftTop.Width() * 
fFactorX) );
-                aCropLeftTop.setHeight( basegfx::fround(aCropLeftTop.Height() 
* fFactorY) );
-                aCropRightBottom.setWidth( 
basegfx::fround(aCropRightBottom.Width() * fFactorX) );
-                aCropRightBottom.setHeight( 
basegfx::fround(aCropRightBottom.Height() * fFactorY) );
+                aCropLeftTop.setWidth( 
basegfx::fround<tools::Long>(aCropLeftTop.Width() * fFactorX) );
+                aCropLeftTop.setHeight( 
basegfx::fround<tools::Long>(aCropLeftTop.Height() * fFactorY) );
-e 
... etc. - the rest is truncated

Reply via email to