From aa2b7d55c6f8e1d8390b0e820b1e5586bb5a7d4c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 2 Jul 2017 22:35:01 +0200 Subject: loplugin:casttovoid: canvas Change-Id: I2b719ff5fc03a74ba0f657351343462aaa9c7296 --- canvas/source/tools/verifyinput.cxx | 24 ++++++++-------------- canvas/source/vcl/canvasfont.cxx | 3 +-- canvas/source/vcl/textlayout.cxx | 41 ++++++++----------------------------- canvas/source/vcl/textlayout.hxx | 1 - 4 files changed, 18 insertions(+), 51 deletions(-) (limited to 'canvas') diff --git a/canvas/source/tools/verifyinput.cxx b/canvas/source/tools/verifyinput.cxx index 595d5dd0c6f0..5d9716ef50a6 100644 --- a/canvas/source/tools/verifyinput.cxx +++ b/canvas/source/tools/verifyinput.cxx @@ -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 } diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index 94798710f829..2f1dabfe8216 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -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); diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx index 03f2fbaebd24..1a52371029a4 100644 --- a/canvas/source/vcl/textlayout.cxx +++ b/canvas/source/vcl/textlayout.cxx @@ -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& 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 >(); } diff --git a/canvas/source/vcl/textlayout.hxx b/canvas/source/vcl/textlayout.hxx index 9994ac70ff6d..e6a661331101 100644 --- a/canvas/source/vcl/textlayout.hxx +++ b/canvas/source/vcl/textlayout.hxx @@ -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, -- cgit