loplugin:unusedenumconstants read-only constants in vcl (2)
Change-Id: Ia3da23e0ef2fa710403745bd11255ed001516da4 Reviewed-on: https://gerrit.libreoffice.org/34020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -103,6 +103,7 @@ for d in definitionSet:
|
|||||||
"vcl/source/filter/wmf/winmtf.hxx",
|
"vcl/source/filter/wmf/winmtf.hxx",
|
||||||
"vcl/source/filter/sgvmain.hxx",
|
"vcl/source/filter/sgvmain.hxx",
|
||||||
"vcl/source/filter/jpeg/transupp.h",
|
"vcl/source/filter/jpeg/transupp.h",
|
||||||
|
"include/vcl/bitmapex.hxx", # TransparentType
|
||||||
# unit test code
|
# unit test code
|
||||||
"cppu/source/uno/check.cxx",
|
"cppu/source/uno/check.cxx",
|
||||||
# general weird nonsense going on
|
# general weird nonsense going on
|
||||||
@@ -121,6 +122,7 @@ for d in definitionSet:
|
|||||||
"vcl/inc/salwtype.hxx",
|
"vcl/inc/salwtype.hxx",
|
||||||
"include/vcl/svapp.hxx",
|
"include/vcl/svapp.hxx",
|
||||||
"include/vcl/salbtype.hxx",
|
"include/vcl/salbtype.hxx",
|
||||||
|
"include/vcl/commandevent.hxx", # CommandEvent, MediaCommand, ShowDialogId
|
||||||
# must match some other enum
|
# must match some other enum
|
||||||
"include/editeng/bulletitem.hxx",
|
"include/editeng/bulletitem.hxx",
|
||||||
"include/editeng/svxenum.hxx",
|
"include/editeng/svxenum.hxx",
|
||||||
@@ -130,6 +132,7 @@ for d in definitionSet:
|
|||||||
"include/svl/nfkeytab.hx",
|
"include/svl/nfkeytab.hx",
|
||||||
"include/svl/zforlist.hxx",
|
"include/svl/zforlist.hxx",
|
||||||
"include/svtools/svtabbx.hxx",
|
"include/svtools/svtabbx.hxx",
|
||||||
|
"include/vcl/print.hxx", # NupOrderType, from UI combobox
|
||||||
# represents constants from an external API
|
# represents constants from an external API
|
||||||
"opencl/inc/opencl_device_selection.h",
|
"opencl/inc/opencl_device_selection.h",
|
||||||
"vcl/inc/sft.hxx",
|
"vcl/inc/sft.hxx",
|
||||||
|
@@ -44,18 +44,15 @@ namespace o3tl
|
|||||||
|
|
||||||
enum class BmpScaleFlag
|
enum class BmpScaleFlag
|
||||||
{
|
{
|
||||||
NONE = 0,
|
|
||||||
// Try to preferably use these.
|
// Try to preferably use these.
|
||||||
Default = 1,
|
Default = 1,
|
||||||
Fast = 2,
|
Fast,
|
||||||
BestQuality = 3,
|
BestQuality,
|
||||||
// Specific algorithms, use only if you really need to.
|
// Specific algorithms, use only if you really need to.
|
||||||
Interpolate = 4,
|
Interpolate,
|
||||||
Super = 5,
|
Lanczos,
|
||||||
Lanczos = 6,
|
BiCubic,
|
||||||
BiCubic = 7,
|
BiLinear
|
||||||
BiLinear = 8,
|
|
||||||
Box = 9,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -318,7 +318,6 @@ enum class CommandEventId
|
|||||||
CursorPos = 11,
|
CursorPos = 11,
|
||||||
PasteSelection = 12,
|
PasteSelection = 12,
|
||||||
ModKeyChange = 13,
|
ModKeyChange = 13,
|
||||||
HangulHanjaConversion = 14,
|
|
||||||
InputLanguageChange = 15,
|
InputLanguageChange = 15,
|
||||||
ShowDialog = 16,
|
ShowDialog = 16,
|
||||||
Media = 17,
|
Media = 17,
|
||||||
|
@@ -45,9 +45,8 @@ class Gradient;
|
|||||||
|
|
||||||
enum class MtfConversion
|
enum class MtfConversion
|
||||||
{
|
{
|
||||||
NONE = 0,
|
N1BitThreshold,
|
||||||
N1BitThreshold = 1,
|
N8BitGreys
|
||||||
N8BitGreys = 2
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -52,10 +52,10 @@ namespace vcl {
|
|||||||
|
|
||||||
enum class PrinterSupport
|
enum class PrinterSupport
|
||||||
{
|
{
|
||||||
SetOrientation, SetPaperBin,
|
SetOrientation,
|
||||||
SetPaperSize, SetPaper,
|
SetPaperSize, SetPaper,
|
||||||
Copy, CollateCopy,
|
CollateCopy,
|
||||||
SetupDialog, Fax, Pdf
|
SetupDialog
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5524,9 +5524,6 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CommandEventId::HangulHanjaConversion :
|
|
||||||
GetView().GetViewFrame()->GetDispatcher()->Execute(SID_HANGUL_HANJA_CONVERSION);
|
|
||||||
break;
|
|
||||||
case CommandEventId::InputLanguageChange :
|
case CommandEventId::InputLanguageChange :
|
||||||
// i#42732 - update state of fontname if input language changes
|
// i#42732 - update state of fontname if input language changes
|
||||||
g_bInputLanguageSwitched = true;
|
g_bInputLanguageSwitched = true;
|
||||||
|
@@ -350,7 +350,7 @@ bool OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, B
|
|||||||
{
|
{
|
||||||
return ImplScaleFilter( xContext, rScaleX, rScaleY, GL_LINEAR );
|
return ImplScaleFilter( xContext, rScaleX, rScaleY, GL_LINEAR );
|
||||||
}
|
}
|
||||||
else if( nScaleFlag == BmpScaleFlag::Super || nScaleFlag == BmpScaleFlag::Default )
|
else if( nScaleFlag == BmpScaleFlag::Default )
|
||||||
{
|
{
|
||||||
const Lanczos3Kernel aKernel;
|
const Lanczos3Kernel aKernel;
|
||||||
|
|
||||||
@@ -381,7 +381,6 @@ bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, BmpSc
|
|||||||
|
|
||||||
if( nScaleFlag == BmpScaleFlag::Fast ||
|
if( nScaleFlag == BmpScaleFlag::Fast ||
|
||||||
nScaleFlag == BmpScaleFlag::BiLinear ||
|
nScaleFlag == BmpScaleFlag::BiLinear ||
|
||||||
nScaleFlag == BmpScaleFlag::Super ||
|
|
||||||
nScaleFlag == BmpScaleFlag::Lanczos ||
|
nScaleFlag == BmpScaleFlag::Lanczos ||
|
||||||
nScaleFlag == BmpScaleFlag::Default ||
|
nScaleFlag == BmpScaleFlag::Default ||
|
||||||
nScaleFlag == BmpScaleFlag::BestQuality )
|
nScaleFlag == BmpScaleFlag::BestQuality )
|
||||||
|
@@ -62,7 +62,7 @@ bool VclFiltersTest::load(const OUString &,
|
|||||||
|
|
||||||
void VclFiltersTest::testScaling()
|
void VclFiltersTest::testScaling()
|
||||||
{
|
{
|
||||||
for (BmpScaleFlag i = BmpScaleFlag::Default; i <= BmpScaleFlag::Box; i = (BmpScaleFlag)((int)i + 1))
|
for (BmpScaleFlag i = BmpScaleFlag::Default; i <= BmpScaleFlag::BiLinear; i = (BmpScaleFlag)((int)i + 1))
|
||||||
{
|
{
|
||||||
Bitmap aBitmap( Size( 413, 409 ), 24 );
|
Bitmap aBitmap( Size( 413, 409 ), 24 );
|
||||||
BitmapEx aBitmapEx( aBitmap );
|
BitmapEx aBitmapEx( aBitmap );
|
||||||
|
@@ -922,18 +922,13 @@ bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag n
|
|||||||
//just use the fast scale rather than attempting to count unique colors in
|
//just use the fast scale rather than attempting to count unique colors in
|
||||||
//the other converters and pass all the info down through
|
//the other converters and pass all the info down through
|
||||||
//Bitmap::ImplMakeMono
|
//Bitmap::ImplMakeMono
|
||||||
if (nStartCount == 1 && nScaleFlag != BmpScaleFlag::NONE)
|
if (nStartCount == 1)
|
||||||
nScaleFlag = BmpScaleFlag::Fast;
|
nScaleFlag = BmpScaleFlag::Fast;
|
||||||
|
|
||||||
bool bRetval(false);
|
bool bRetval(false);
|
||||||
|
|
||||||
switch(nScaleFlag)
|
switch(nScaleFlag)
|
||||||
{
|
{
|
||||||
case BmpScaleFlag::NONE :
|
|
||||||
{
|
|
||||||
bRetval = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case BmpScaleFlag::Fast :
|
case BmpScaleFlag::Fast :
|
||||||
{
|
{
|
||||||
bRetval = ImplScaleFast( rScaleX, rScaleY );
|
bRetval = ImplScaleFast( rScaleX, rScaleY );
|
||||||
@@ -944,7 +939,6 @@ bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag n
|
|||||||
bRetval = ImplScaleInterpolate( rScaleX, rScaleY );
|
bRetval = ImplScaleInterpolate( rScaleX, rScaleY );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BmpScaleFlag::Super:
|
|
||||||
case BmpScaleFlag::Default:
|
case BmpScaleFlag::Default:
|
||||||
{
|
{
|
||||||
if (GetSizePixel().Width() < 2 || GetSizePixel().Height() < 2)
|
if (GetSizePixel().Width() < 2 || GetSizePixel().Height() < 2)
|
||||||
@@ -978,12 +972,6 @@ bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag n
|
|||||||
bRetval = aScaleConvolution.filter(*this);
|
bRetval = aScaleConvolution.filter(*this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BmpScaleFlag::Box :
|
|
||||||
{
|
|
||||||
vcl::BitmapScaleConvolution aScaleConvolution(rScaleX, rScaleY, vcl::ConvolutionKernelType::Box);
|
|
||||||
bRetval = aScaleConvolution.filter(*this);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OSL_ENSURE(!bRetval || nStartCount == GetBitCount(), "Bitmap::Scale has changed the ColorDepth, this should *not* happen (!)");
|
OSL_ENSURE(!bRetval || nStartCount == GetBitCount(), "Bitmap::Scale has changed the ColorDepth, this should *not* happen (!)");
|
||||||
|
@@ -2190,17 +2190,13 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
|
|||||||
|
|
||||||
void GDIMetaFile::Convert( MtfConversion eConversion )
|
void GDIMetaFile::Convert( MtfConversion eConversion )
|
||||||
{
|
{
|
||||||
// nothing to do? => return quickly
|
ImplColConvertParam aColParam;
|
||||||
if( eConversion != MtfConversion::NONE )
|
ImplBmpConvertParam aBmpParam;
|
||||||
{
|
|
||||||
ImplColConvertParam aColParam;
|
|
||||||
ImplBmpConvertParam aBmpParam;
|
|
||||||
|
|
||||||
aColParam.eConversion = eConversion;
|
aColParam.eConversion = eConversion;
|
||||||
aBmpParam.eConversion = ( MtfConversion::N1BitThreshold == eConversion ) ? BMP_CONVERSION_1BIT_THRESHOLD : BMP_CONVERSION_8BIT_GREYS;
|
aBmpParam.eConversion = ( MtfConversion::N1BitThreshold == eConversion ) ? BMP_CONVERSION_1BIT_THRESHOLD : BMP_CONVERSION_8BIT_GREYS;
|
||||||
|
|
||||||
ImplExchangeColors( ImplColConvertFnc, &aColParam, ImplBmpConvertFnc, &aBmpParam );
|
ImplExchangeColors( ImplColConvertFnc, &aColParam, ImplBmpConvertFnc, &aBmpParam );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount )
|
void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount )
|
||||||
|
@@ -1022,22 +1022,14 @@ bool Printer::HasSupport( PrinterSupport eFeature ) const
|
|||||||
{
|
{
|
||||||
case PrinterSupport::SetOrientation:
|
case PrinterSupport::SetOrientation:
|
||||||
return GetCapabilities( PrinterCapType::SetOrientation ) != 0;
|
return GetCapabilities( PrinterCapType::SetOrientation ) != 0;
|
||||||
case PrinterSupport::SetPaperBin:
|
|
||||||
return GetCapabilities( PrinterCapType::SetPaperBin ) != 0;
|
|
||||||
case PrinterSupport::SetPaperSize:
|
case PrinterSupport::SetPaperSize:
|
||||||
return GetCapabilities( PrinterCapType::SetPaperSize ) != 0;
|
return GetCapabilities( PrinterCapType::SetPaperSize ) != 0;
|
||||||
case PrinterSupport::SetPaper:
|
case PrinterSupport::SetPaper:
|
||||||
return GetCapabilities( PrinterCapType::SetPaper ) != 0;
|
return GetCapabilities( PrinterCapType::SetPaper ) != 0;
|
||||||
case PrinterSupport::Copy:
|
|
||||||
return (GetCapabilities( PrinterCapType::Copies ) != 0);
|
|
||||||
case PrinterSupport::CollateCopy:
|
case PrinterSupport::CollateCopy:
|
||||||
return (GetCapabilities( PrinterCapType::CollateCopies ) != 0);
|
return (GetCapabilities( PrinterCapType::CollateCopies ) != 0);
|
||||||
case PrinterSupport::SetupDialog:
|
case PrinterSupport::SetupDialog:
|
||||||
return GetCapabilities( PrinterCapType::SupportDialog ) != 0;
|
return GetCapabilities( PrinterCapType::SupportDialog ) != 0;
|
||||||
case PrinterSupport::Fax:
|
|
||||||
return GetCapabilities( PrinterCapType::Fax ) != 0;
|
|
||||||
case PrinterSupport::Pdf:
|
|
||||||
return GetCapabilities( PrinterCapType::PDF ) != 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user