summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-05 14:09:24 +0200
committerNoel Grandin <noel@peralex.com>2015-05-06 09:01:30 +0200
commitb13fbd19b7282a1210a2e14bb5ede9ecdf944c1c (patch)
tree3db528acc23250ddcc3dbdc9b1e35a817d8de9ee /svx/source
parentba121a3269d17f87c6d09b9e46aaaf921af40ef6 (diff)
convert BMP_SCALE constant to scoped enum
Change-Id: Ibc9f88d2588c028cd71aa86c26d970a73025ef22
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx12
-rw-r--r--svx/source/dialog/dlgctrl.cxx2
-rw-r--r--svx/source/gallery2/galobj.cxx10
-rw-r--r--svx/source/stbctrls/modctrl.cxx2
-rw-r--r--svx/source/stbctrls/pszctrl.cxx4
-rw-r--r--svx/source/stbctrls/selctrl.cxx2
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx2
-rw-r--r--svx/source/stbctrls/zoomsliderctrl.cxx2
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx2
-rw-r--r--svx/source/xoutdev/xtabdash.cxx2
10 files changed, 19 insertions, 21 deletions
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 53fc5635c587..0360ea2e4b0a 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -238,20 +238,20 @@ double CompressGraphicsDialog::GetViewHeightInch()
return (double) MetricField::ConvertValue(m_aViewSize100mm.Height(), 2, MAP_100TH_MM, FUNIT_INCH) / 100.0;
}
-sal_uLong CompressGraphicsDialog::GetSelectedInterpolationType()
+BmpScaleFlag CompressGraphicsDialog::GetSelectedInterpolationType()
{
OUString aSelectionText = OUString( m_pInterpolationCombo->GetSelectEntry() );
if( aSelectionText == "Lanczos" ) {
- return BMP_SCALE_LANCZOS;
+ return BmpScaleFlag::Lanczos;
} else if( aSelectionText == "Bilinear" ) {
- return BMP_SCALE_BILINEAR;
+ return BmpScaleFlag::BiLinear;
} else if( aSelectionText == "Bicubic" ) {
- return BMP_SCALE_BICUBIC;
+ return BmpScaleFlag::BiCubic;
} else if ( aSelectionText == "None" ) {
- return BMP_SCALE_FAST;
+ return BmpScaleFlag::Fast;
}
- return BMP_SCALE_BESTQUALITY;
+ return BmpScaleFlag::BestQuality;
}
void CompressGraphicsDialog::Compress(SvStream& aStream)
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 4a0cf8dffb5c..94e6aaae819c 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1464,7 +1464,7 @@ namespace
if(rBitmapEx.GetSizePixel().Width() >= rSize.Width() && rBitmapEx.GetSizePixel().Height() >= rSize.Height())
{
- rBitmapEx.Scale(rSize, BMP_SCALE_DEFAULT);
+ rBitmapEx.Scale(rSize, BmpScaleFlag::Default);
pVirtualDevice->DrawBitmapEx(Point(0, 0), rBitmapEx);
}
else
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 299abab1d28f..8a62689517e4 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -81,9 +81,7 @@ BitmapEx SgaObject::createPreviewBitmapEx(const Size& rSizePixel) const
// prevent scaling close to 1.0 which is not needed for pixel graphics
if(fScale < 1.0 && fabs(1.0 - fScale) > 0.005)
{
- static sal_uInt32 nScaleFlag = BMP_SCALE_BESTQUALITY;
-
- aRetval.Scale(fScale, fScale, nScaleFlag);
+ aRetval.Scale(fScale, fScale, BmpScaleFlag::BestQuality);
}
}
}
@@ -118,7 +116,7 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic )
else
aBmpSize.Height() = FRound( aBmpSize.Width() / fFactorLog );
- aBmpEx.SetSizePixel( aBmpSize, BMP_SCALE_BESTQUALITY );
+ aBmpEx.SetSizePixel( aBmpSize, BmpScaleFlag::BestQuality );
}
}
@@ -138,7 +136,7 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic )
if(aThumbBmp.Scale(
(double) aNewSize.Width() / aBmpSize.Width(),
(double) aNewSize.Height() / aBmpSize.Height(),
- BMP_SCALE_BESTQUALITY ) )
+ BmpScaleFlag::BestQuality ) )
{
aThumbBmp.Convert( BMP_CONVERSION_8BIT_COLORS );
bRet = true;
@@ -509,7 +507,7 @@ bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel )
if(!!aThumbBmp)
{
- aThumbBmp.Scale(Size(nTargetSizeX, nTargetSizeY), BMP_SCALE_BESTQUALITY);
+ aThumbBmp.Scale(Size(nTargetSizeX, nTargetSizeY), BmpScaleFlag::BestQuality);
aThumbBmp.Convert(BMP_CONVERSION_8BIT_COLORS);
bRet = true;
}
diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx
index 41d66e0c07f0..5374f369c5f7 100644
--- a/svx/source/stbctrls/modctrl.cxx
+++ b/svx/source/stbctrls/modctrl.cxx
@@ -72,7 +72,7 @@ SvxModifyControl::SvxModifyControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, Status
for (int i = 0; i < mxImpl->MODIFICATION_STATE_SIZE; i++)
{
BitmapEx b = mxImpl->maImages[i].GetBitmapEx();
- b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), BMP_SCALE_FAST);
+ b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), BmpScaleFlag::Fast);
mxImpl->maImages[i] = Image(b);
}
}
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index cde8ef5a3c10..e102a7f96455 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -174,11 +174,11 @@ SvxPosSizeStatusBarControl::SvxPosSizeStatusBarControl( sal_uInt16 _nSlotId,
if ( rStb.GetDPIScaleFactor() > 1)
{
BitmapEx b = pImp->aPosImage.GetBitmapEx();
- b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), BMP_SCALE_FAST);
+ b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), BmpScaleFlag::Fast);
pImp->aPosImage = Image(b);
b = pImp->aSizeImage.GetBitmapEx();
- b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), BMP_SCALE_FAST);
+ b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), BmpScaleFlag::Fast);
pImp->aSizeImage = Image(b);
}
diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx
index b4c795b13811..9fe589ac85b8 100644
--- a/svx/source/stbctrls/selctrl.cxx
+++ b/svx/source/stbctrls/selctrl.cxx
@@ -81,7 +81,7 @@ SvxSelectionModeControl::SvxSelectionModeControl( sal_uInt16 _nSlotId,
if ( GetStatusBar().GetDPIScaleFactor() > 1 )
{
BitmapEx b = maImage.GetBitmapEx();
- b.Scale(GetStatusBar().GetDPIScaleFactor(), GetStatusBar().GetDPIScaleFactor(), BMP_SCALE_FAST);
+ b.Scale(GetStatusBar().GetDPIScaleFactor(), GetStatusBar().GetDPIScaleFactor(), BmpScaleFlag::Fast);
maImage = Image(b);
}
//#endif
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index f49c25584738..8ae7cb8a8a19 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -67,7 +67,7 @@ XmlSecStatusBarControl::XmlSecStatusBarControl( sal_uInt16 _nSlotId, sal_uInt16
for (int i = 0; i < 3; i++)
{
BitmapEx b = arr[i].GetBitmapEx();
- b.Scale(_rStb.GetDPIScaleFactor(), _rStb.GetDPIScaleFactor(), BMP_SCALE_FAST);
+ b.Scale(_rStb.GetDPIScaleFactor(), _rStb.GetDPIScaleFactor(), BmpScaleFlag::Fast);
arr[i] = Image(b);
}
diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx
index 52ef58c81f30..0bb522c5d5dc 100644
--- a/svx/source/stbctrls/zoomsliderctrl.cxx
+++ b/svx/source/stbctrls/zoomsliderctrl.cxx
@@ -172,7 +172,7 @@ SvxZoomSliderControl::SvxZoomSliderControl( sal_uInt16 _nSlotId, sal_uInt16 _nI
{
BitmapEx aBitmap = arr[i].GetBitmapEx();
//Use Lanczos scaling for the slider button because it does a better job with circles
- aBitmap.Scale(nScaleFactor, nScaleFactor, i == 0 ? BMP_SCALE_LANCZOS : BMP_SCALE_FAST);
+ aBitmap.Scale(nScaleFactor, nScaleFactor, i == 0 ? BmpScaleFlag::Lanczos : BmpScaleFlag::Fast);
arr[i] = Image(aBitmap);
}
mxImpl->maSliderButton = arr[0];
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 26a7269d685a..4c91ae607d47 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -843,7 +843,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
{
BitmapEx aBmpEx( aGraphic.GetBitmapEx() );
// export: use highest quality
- aBmpEx.Scale( Size( rSettings.mnWidth, rSettings.mnHeight ), BMP_SCALE_LANCZOS );
+ aBmpEx.Scale( Size( rSettings.mnWidth, rSettings.mnHeight ), BmpScaleFlag::Lanczos );
aGraphic = aBmpEx;
}
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 4bfe888cca34..6dc7849917d0 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -176,7 +176,7 @@ Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
if(1 != nFactor)
{
- aRetval.Scale(Size((rSize.Width() * 5) / 2, rSize.Height()), BMP_SCALE_DEFAULT);
+ aRetval.Scale(Size((rSize.Width() * 5) / 2, rSize.Height()), BmpScaleFlag::Default);
}
return aRetval;