summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-10-28 23:55:53 +0200
committerTomaž Vajngerl <quikee@gmail.com>2016-10-29 21:48:30 +0000
commitb7c2764145be2c3fc50397f241dbdb0c53f9befd (patch)
treef861b28305b99047f430d0c067447eb615c6641b /svx
parenta0cf18f58fd060dd3ef4f60ad7b17c8f8dc662dd (diff)
convert usages of DPIScalingFactor from int to float
Change-Id: I049b3d2cde4dcb8c8c0690d75a015a43cb71b0c0 Reviewed-on: https://gerrit.libreoffice.org/30381 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdcrtv.cxx4
-rw-r--r--svx/source/svdraw/svdhdl.cxx10
-rw-r--r--svx/source/table/tablehandles.cxx4
-rw-r--r--svx/source/tbxctrls/layctrl.cxx6
4 files changed, 11 insertions, 13 deletions
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index b6a7d568644a..c2311edb7b30 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -70,8 +70,8 @@ ImplConnectMarkerOverlay::ImplConnectMarkerOverlay(const SdrCreateView& rView, S
if(xTargetOverlay.is())
{
- sal_Int32 nScalingFactor = xTargetOverlay->getOutputDevice().GetDPIScaleFactor();
- Size aHalfLogicSize(xTargetOverlay->getOutputDevice().PixelToLogic(Size(4 * nScalingFactor, 4 * nScalingFactor)));
+ float fScalingFactor = xTargetOverlay->getOutputDevice().GetDPIScaleFactor();
+ Size aHalfLogicSize(xTargetOverlay->getOutputDevice().PixelToLogic(Size(4 * fScalingFactor, 4 * fScalingFactor)));
// object
sdr::overlay::OverlayPolyPolygonStripedAndFilled* pNew = new sdr::overlay::OverlayPolyPolygonStripedAndFilled(
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 642337d3e733..7115bba0355c 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -591,8 +591,8 @@ void SdrHdl::CreateB2dIAObject()
default:
break;
}
- sal_Int32 nScaleFactor = rOutDev.GetDPIScaleFactor();
- basegfx::B2DSize aB2DSize(fSize * nScaleFactor, fSize * nScaleFactor);
+ float fScalingFactor = rOutDev.GetDPIScaleFactor();
+ basegfx::B2DSize aB2DSize(fSize * fScalingFactor, fSize * fScalingFactor);
Color aHandleStrokeColor(COL_BLACK);
Color aHandleFillColor(COL_LIGHTGREEN);
@@ -681,7 +681,7 @@ BitmapEx SdrHdl::ImpGetBitmapEx( BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd
sdr::overlay::OverlayObject* SdrHdl::CreateOverlayObject(
const basegfx::B2DPoint& rPos,
- BitmapColorIndex eColIndex, BitmapMarkerKind eKindOfMarker, OutputDevice& rOutDev, Point aMoveOutsideOffset)
+ BitmapColorIndex eColIndex, BitmapMarkerKind eKindOfMarker, OutputDevice& /*rOutDev*/, Point aMoveOutsideOffset)
{
sdr::overlay::OverlayObject* pRetval = nullptr;
@@ -799,10 +799,6 @@ sdr::overlay::OverlayObject* SdrHdl::CreateOverlayObject(
aBmpEx.Erase(COL_BLACK);
}
- // Scale the handle with the DPI scale factor
- sal_Int32 nScaleFactor = rOutDev.GetDPIScaleFactor();
- aBmpEx.Scale(nScaleFactor, nScaleFactor);
-
if(eKindOfMarker == BitmapMarkerKind::Anchor || eKindOfMarker == BitmapMarkerKind::AnchorPressed)
{
// upper left as reference point inside the handle for AnchorPressed, too
diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx
index cae87f76ad05..53647e987910 100644
--- a/svx/source/table/tablehandles.cxx
+++ b/svx/source/table/tablehandles.cxx
@@ -290,8 +290,8 @@ void TableBorderHdl::CreateB2dIAObject()
const bool bAnimate = getAnimate();
OutputDevice& rOutDev = rPageWindow.GetPaintWindow().GetOutputDevice();
- sal_Int32 nScaleFactor = rOutDev.GetDPIScaleFactor();
- double fWidth = nScaleFactor * 6.0;
+ float fScaleFactor = rOutDev.GetDPIScaleFactor();
+ double fWidth = fScaleFactor * 6.0;
sdr::overlay::OverlayObject* pOverlayObject =
new sdr::overlay::OverlayRectangle(aRange.getMinimum(), aRange.getMaximum(),
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 868f834c2cfe..b0e707f58cfe 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -112,8 +112,10 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUStri
, mnTablePosX(2)
, mnTablePosY(2)
{
- mnTableCellWidth = 15 * GetDPIScaleFactor();
- mnTableCellHeight = 15 * GetDPIScaleFactor();
+ float fScaleFactor = GetDPIScaleFactor();
+
+ mnTableCellWidth = 15 * fScaleFactor;
+ mnTableCellHeight = 15 * fScaleFactor;
mnTableWidth = mnTablePosX + TABLE_CELLS_HORIZ*mnTableCellWidth;
mnTableHeight = mnTablePosY + TABLE_CELLS_VERT*mnTableCellHeight;