loplugin:casttovoid: canvas

Change-Id: I2b719ff5fc03a74ba0f657351343462aaa9c7296
This commit is contained in:
Stephan Bergmann
2017-07-02 22:35:01 +02:00
parent 88b4ec9afb
commit aa2b7d55c6
5 changed files with 19 additions and 53 deletions

View File

@@ -63,8 +63,6 @@ namespace canvas
const uno::Reference< uno::XInterface >& xIf,
::sal_Int16 nArgPos )
{
(void)pStr; (void)xIf; (void)nArgPos;
#if OSL_DEBUG_LEVEL > 0
if( !::rtl::math::isFinite( rPoint.X ) )
{
@@ -80,6 +78,7 @@ namespace canvas
xIf, nArgPos );
}
#else
(void)pStr; (void)xIf; (void)nArgPos;
if( !::rtl::math::isFinite( rPoint.X ) ||
!::rtl::math::isFinite( rPoint.Y ) )
{
@@ -93,8 +92,6 @@ namespace canvas
const uno::Reference< uno::XInterface >& xIf,
::sal_Int16 nArgPos )
{
(void)pStr; (void)xIf; (void)nArgPos;
#if OSL_DEBUG_LEVEL > 0
if( !::rtl::math::isFinite( rSegment.Px ) )
{
@@ -144,6 +141,7 @@ namespace canvas
xIf, nArgPos );
}
#else
(void)pStr; (void)xIf; (void)nArgPos;
if( !::rtl::math::isFinite( rSegment.Px ) ||
!::rtl::math::isFinite( rSegment.Py ) ||
!::rtl::math::isFinite( rSegment.C1x ) ||
@@ -161,8 +159,6 @@ namespace canvas
const uno::Reference< uno::XInterface >& xIf,
::sal_Int16 nArgPos )
{
(void)pStr; (void)xIf; (void)nArgPos;
#if OSL_DEBUG_LEVEL > 0
if( !::rtl::math::isFinite( rRect.X1 ) )
{
@@ -196,6 +192,7 @@ namespace canvas
xIf, nArgPos );
}
#else
(void)pStr; (void)xIf; (void)nArgPos;
if( !::rtl::math::isFinite( rRect.X1 ) ||
!::rtl::math::isFinite( rRect.Y1 ) ||
!::rtl::math::isFinite( rRect.X2 ) ||
@@ -211,8 +208,6 @@ namespace canvas
const uno::Reference< uno::XInterface >& xIf,
::sal_Int16 nArgPos )
{
(void)pStr; (void)xIf; (void)nArgPos;
#if OSL_DEBUG_LEVEL > 0
const sal_Int32 nBinaryState(
100000 * int(!::rtl::math::isFinite( matrix.m00 )) +
@@ -231,6 +226,7 @@ namespace canvas
xIf, nArgPos );
}
#else
(void)pStr; (void)xIf; (void)nArgPos;
if( !::rtl::math::isFinite( matrix.m00 ) ||
!::rtl::math::isFinite( matrix.m01 ) ||
!::rtl::math::isFinite( matrix.m02 ) ||
@@ -248,8 +244,6 @@ namespace canvas
const uno::Reference< uno::XInterface >& xIf,
::sal_Int16 nArgPos )
{
(void)pStr; (void)xIf; (void)nArgPos;
#if OSL_DEBUG_LEVEL > 0
const sal_Int32 nBinaryState(
1000 * int(!::rtl::math::isFinite( matrix.m00 )) +
@@ -266,6 +260,7 @@ namespace canvas
xIf, nArgPos );
}
#else
(void)pStr; (void)xIf; (void)nArgPos;
if( !::rtl::math::isFinite( matrix.m00 ) ||
!::rtl::math::isFinite( matrix.m01 ) ||
!::rtl::math::isFinite( matrix.m10 ) ||
@@ -519,8 +514,6 @@ namespace canvas
const uno::Reference< uno::XInterface >& xIf,
::sal_Int16 nArgPos )
{
(void)pStr; (void)xIf; (void)nArgPos;
if( bitmapLayout.ScanLines < 0 )
{
#if OSL_DEBUG_LEVEL > 0
@@ -529,6 +522,7 @@ namespace canvas
": verifyInput(): bitmap layout's ScanLines is negative",
xIf, nArgPos );
#else
(void)pStr; (void)xIf; (void)nArgPos;
throw lang::IllegalArgumentException();
#endif
}
@@ -674,8 +668,6 @@ namespace canvas
const char* pStr,
const uno::Reference< uno::XInterface >& xIf )
{
(void)pStr; (void)xIf;
if( size.Width <= 0 )
{
#if OSL_DEBUG_LEVEL > 0
@@ -685,6 +677,7 @@ namespace canvas
OUString::number(size.Width) + ")",
xIf, 0 );
#else
(void)pStr; (void)xIf;
throw lang::IllegalArgumentException();
#endif
}
@@ -708,8 +701,6 @@ namespace canvas
const char* pStr,
const uno::Reference< uno::XInterface >& xIf )
{
(void)pStr; (void)xIf;
if( size.Width <= 0.0 )
{
#if OSL_DEBUG_LEVEL > 0
@@ -719,6 +710,7 @@ namespace canvas
OUString::number(size.Width) + ")",
xIf, 0 );
#else
(void)pStr; (void)xIf;
throw lang::IllegalArgumentException();
#endif
}

View File

@@ -92,7 +92,7 @@ namespace vclcanvas
mpRefDevice.clear();
}
uno::Reference< rendering::XTextLayout > SAL_CALL CanvasFont::createTextLayout( const rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed )
uno::Reference< rendering::XTextLayout > SAL_CALL CanvasFont::createTextLayout( const rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 )
{
SolarMutexGuard aGuard;
@@ -101,7 +101,6 @@ namespace vclcanvas
return new TextLayout( aText,
nDirection,
nRandomSeed,
Reference( this ),
mpRefDevice,
mpOutDevProvider);

View File

@@ -74,7 +74,6 @@ namespace vclcanvas
TextLayout::TextLayout( const rendering::StringContext& aText,
sal_Int8 nDirection,
sal_Int64 nRandomSeed,
const CanvasFont::Reference& rFont,
const uno::Reference<rendering::XGraphicDevice>& xDevice,
const OutDevProviderSharedPtr& rOutDev ) :
@@ -85,9 +84,7 @@ namespace vclcanvas
mxDevice( xDevice ),
mpOutDevProvider( rOutDev ),
mnTextDirection( nDirection )
{
(void)nRandomSeed;
}
{}
void SAL_CALL TextLayout::disposing()
{
@@ -262,65 +259,45 @@ namespace vclcanvas
}
}
double SAL_CALL TextLayout::justify( double nSize )
double SAL_CALL TextLayout::justify( double )
{
(void)nSize;
// TODO(F1)
return 0.0;
}
double SAL_CALL TextLayout::combinedJustify( const uno::Sequence< uno::Reference< rendering::XTextLayout > >& aNextLayouts,
double nSize )
double SAL_CALL TextLayout::combinedJustify( const uno::Sequence< uno::Reference< rendering::XTextLayout > >&,
double )
{
(void)aNextLayouts;
(void)nSize;
// TODO(F1)
return 0.0;
}
rendering::TextHit SAL_CALL TextLayout::getTextHit( const geometry::RealPoint2D& aHitPoint )
rendering::TextHit SAL_CALL TextLayout::getTextHit( const geometry::RealPoint2D& )
{
(void)aHitPoint;
// TODO(F1)
return rendering::TextHit();
}
rendering::Caret SAL_CALL TextLayout::getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures )
rendering::Caret SAL_CALL TextLayout::getCaret( sal_Int32, sal_Bool )
{
(void)nInsertionIndex;
(void)bExcludeLigatures;
// TODO(F1)
return rendering::Caret();
}
sal_Int32 SAL_CALL TextLayout::getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures )
sal_Int32 SAL_CALL TextLayout::getNextInsertionIndex( sal_Int32, sal_Int32, sal_Bool )
{
(void)nStartIndex;
(void)nCaretAdvancement;
(void)bExcludeLigatures;
// TODO(F1)
return 0;
}
uno::Reference< rendering::XPolyPolygon2D > SAL_CALL TextLayout::queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
uno::Reference< rendering::XPolyPolygon2D > SAL_CALL TextLayout::queryVisualHighlighting( sal_Int32, sal_Int32 )
{
(void)nStartIndex;
(void)nEndIndex;
// TODO(F1)
return uno::Reference< rendering::XPolyPolygon2D >();
}
uno::Reference< rendering::XPolyPolygon2D > SAL_CALL TextLayout::queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
uno::Reference< rendering::XPolyPolygon2D > SAL_CALL TextLayout::queryLogicalHighlighting( sal_Int32, sal_Int32 )
{
(void)nStartIndex;
(void)nEndIndex;
// TODO(F1)
return uno::Reference< rendering::XPolyPolygon2D >();
}

View File

@@ -50,7 +50,6 @@ namespace vclcanvas
TextLayout( const css::rendering::StringContext& aText,
sal_Int8 nDirection,
sal_Int64 nRandomSeed,
const CanvasFont::Reference& rFont,
const css::uno::Reference<
css::rendering::XGraphicDevice>& xDevice,

View File

@@ -352,8 +352,6 @@ namespace canvas
const css::uno::Reference< css::uno::XInterface >& xIf,
::sal_Int16 nArgPos )
{
(void)pStr; (void)xIf; (void)nArgPos;
if( !rRef.is() )
{
#if OSL_DEBUG_LEVEL > 0
@@ -362,6 +360,7 @@ namespace canvas
xIf,
nArgPos );
#else
(void)pStr; (void)xIf; (void)nArgPos;
throw css::lang::IllegalArgumentException();
#endif
}