summaryrefslogtreecommitdiff
path: root/sw
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 /sw
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 'sw')
-rw-r--r--sw/source/uibase/sidebar/StylePresetsPanel.cxx18
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx6
2 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
index e8caaca34efa..31efd8e3bc7d 100644
--- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx
+++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
@@ -66,19 +66,19 @@ BitmapEx GenerateStylePreview(SfxObjectShell& rSource, OUString& aName)
ScopedVclPtrInstance<VirtualDevice> pVirtualDev(*Application::GetDefaultDevice());
- sal_Int32 nScalingFactor = pVirtualDev->GetDPIScaleFactor();
+ float fScalingFactor = pVirtualDev->GetDPIScaleFactor();
- sal_Int32 nMargin = 6 * nScalingFactor;
+ sal_Int32 nMargin = 6 * fScalingFactor;
- sal_Int32 nPreviewWidth = 144 * nScalingFactor;
+ sal_Int32 nPreviewWidth = 144 * fScalingFactor;
- sal_Int32 nNameHeight = 16 * nScalingFactor;
- sal_Int32 nTitleHeight = 32 * nScalingFactor;
- sal_Int32 nHeadingHeight = 24 * nScalingFactor;
- sal_Int32 nTextBodyHeight = 16 * nScalingFactor;
- sal_Int32 nBottomMargin = 2 * nScalingFactor;
+ sal_Int32 nNameHeight = 16 * fScalingFactor;
+ sal_Int32 nTitleHeight = 32 * fScalingFactor;
+ sal_Int32 nHeadingHeight = 24 * fScalingFactor;
+ sal_Int32 nTextBodyHeight = 16 * fScalingFactor;
+ sal_Int32 nBottomMargin = 2 * fScalingFactor;
- sal_Int32 nNameFontSize = 12 * nScalingFactor;
+ sal_Int32 nNameFontSize = 12 * fScalingFactor;
sal_Int32 nPreviewHeight = nNameHeight + nTitleHeight + nHeadingHeight + nTextBodyHeight + nBottomMargin;
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index 20d418c62029..7fd1fd5756e6 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -394,9 +394,9 @@ void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, cons
BitmapEx GenerateColorPreview(const svx::ColorSet& rColorSet)
{
ScopedVclPtrInstance<VirtualDevice> pVirtualDev(*Application::GetDefaultDevice());
- sal_Int32 nScaleFactor = pVirtualDev->GetDPIScaleFactor();
- long BORDER = 2 * nScaleFactor;
- long SIZE = 12 * nScaleFactor;
+ float fScaleFactor = pVirtualDev->GetDPIScaleFactor();
+ long BORDER = 2 * fScaleFactor;
+ long SIZE = 12 * fScaleFactor;
Size aSize(BORDER * 7 + SIZE * 6, BORDER * 3 + SIZE * 2);
pVirtualDev->SetOutputSizePixel(aSize);