diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-26 12:27:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-27 11:42:27 +0200 |
commit | bd28564be85ee51dc08cb2591840e1cb00263e28 (patch) | |
tree | 192a63ee3898075f7fe60738f65ec72421cb441c /include | |
parent | 02dc2cafbb0364556a4145633485f3c9f082b43d (diff) |
loplugin:returnconstant in vcl
Change-Id: I597ef6d75d1c21cdc15a91bf7f549bc14c851506
Reviewed-on: https://gerrit.libreoffice.org/58086
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/GraphicNativeTransform.hxx | 2 | ||||
-rw-r--r-- | include/vcl/alpha.hxx | 2 | ||||
-rw-r--r-- | include/vcl/button.hxx | 4 | ||||
-rw-r--r-- | include/vcl/field.hxx | 8 | ||||
-rw-r--r-- | include/vcl/help.hxx | 8 | ||||
-rw-r--r-- | include/vcl/opengl/OpenGLContext.hxx | 2 | ||||
-rw-r--r-- | include/vcl/pdfextoutdevdata.hxx | 24 | ||||
-rw-r--r-- | include/vcl/region.hxx | 14 | ||||
-rw-r--r-- | include/vcl/textview.hxx | 2 |
9 files changed, 25 insertions, 41 deletions
diff --git a/include/vcl/GraphicNativeTransform.hxx b/include/vcl/GraphicNativeTransform.hxx index f2f142f5ba57..04bdf4817dd0 100644 --- a/include/vcl/GraphicNativeTransform.hxx +++ b/include/vcl/GraphicNativeTransform.hxx @@ -27,7 +27,7 @@ class VCL_DLLPUBLIC GraphicNativeTransform final Graphic& mrGraphic; bool rotateBitmapOnly (sal_uInt16 aRotation); - bool rotateJPEG (sal_uInt16 aRotation); + void rotateJPEG (sal_uInt16 aRotation); bool rotateGeneric (sal_uInt16 aRotation, const OUString& aType); public: diff --git a/include/vcl/alpha.hxx b/include/vcl/alpha.hxx index e91845c638a8..b1133b967957 100644 --- a/include/vcl/alpha.hxx +++ b/include/vcl/alpha.hxx @@ -58,7 +58,7 @@ public: Bitmap const & GetBitmap() const; void Erase( sal_uInt8 cTransparency ); - bool Replace( const Bitmap& rMask, sal_uInt8 rReplaceTransparency ); + void Replace( const Bitmap& rMask, sal_uInt8 rReplaceTransparency ); void Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency ); BitmapReadAccess* AcquireReadAccess() { return Bitmap::AcquireReadAccess(); } diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 85f798af5c90..ddc61afdd02d 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -81,7 +81,7 @@ public: static OUString GetStandardText( StandardButtonType eButton ); - bool SetModeImage( const Image& rImage ); + void SetModeImage( const Image& rImage ); Image const & GetModeImage( ) const; bool HasImage() const; void SetImageAlign( ImageAlign eAlign ); @@ -341,7 +341,7 @@ public: void EnableRadioCheck( bool bRadioCheck ) { mbRadioCheck = bRadioCheck; } bool IsRadioCheckEnabled() const { return mbRadioCheck; } - bool SetModeRadioImage( const Image& rImage ); + void SetModeRadioImage( const Image& rImage ); const Image& GetModeRadioImage( ) const { return maImage;} void SetState( bool bCheck ); diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx index 4b79e4ad8ea9..ff9eae27377e 100644 --- a/include/vcl/field.hxx +++ b/include/vcl/field.hxx @@ -248,7 +248,7 @@ protected: MetricFormatter(); - SAL_DLLPRIVATE bool ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr ); + SAL_DLLPRIVATE void ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr ); virtual sal_Int64 GetValueFromString(const OUString& rStr) const override; virtual sal_Int64 GetValueFromStringUnit(const OUString& rStr, FieldUnit eOutUnit) const; @@ -265,7 +265,7 @@ class VCL_DLLPUBLIC CurrencyFormatter : public NumericFormatter { protected: CurrencyFormatter(); - SAL_DLLPRIVATE bool ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr ); + SAL_DLLPRIVATE void ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr ); virtual sal_Int64 GetValueFromString(const OUString& rStr) const override; public: @@ -297,7 +297,7 @@ protected: DateFormatter(); SAL_DLLPRIVATE const Date& ImplGetFieldDate() const { return maFieldDate; } - SAL_DLLPRIVATE bool ImplDateReformat( const OUString& rStr, OUString& rOutStr ); + SAL_DLLPRIVATE void ImplDateReformat( const OUString& rStr, OUString& rOutStr ); SAL_DLLPRIVATE void ImplSetUserDate( const Date& rNewDate, Selection const * pNewSelection = nullptr ); SAL_DLLPRIVATE OUString ImplGetDateAsText( const Date& rDate ) const; @@ -379,7 +379,7 @@ protected: TimeFormatter(); - SAL_DLLPRIVATE bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr ); + SAL_DLLPRIVATE void ImplTimeReformat( const OUString& rStr, OUString& rOutStr ); SAL_DLLPRIVATE void ImplNewFieldValue( const tools::Time& rTime ); SAL_DLLPRIVATE void ImplSetUserTime( const tools::Time& rNewTime, Selection const * pNewSelection = nullptr ); SAL_DLLPRIVATE bool ImplAllowMalformedInput() const; diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx index 47fcb0264623..80353b263c09 100644 --- a/include/vcl/help.hxx +++ b/include/vcl/help.hxx @@ -84,7 +84,7 @@ public: static void EnableBalloonHelp(); static void DisableBalloonHelp(); static bool IsBalloonHelpEnabled(); - static bool ShowBalloon( vcl::Window* pParent, + static void ShowBalloon( vcl::Window* pParent, const Point& rScreenPos, const tools::Rectangle&, const OUString& rHelpText ); @@ -92,16 +92,16 @@ public: static void EnableQuickHelp(); static void DisableQuickHelp(); static bool IsQuickHelpEnabled(); - static bool ShowQuickHelp( vcl::Window* pParent, + static void ShowQuickHelp( vcl::Window* pParent, const tools::Rectangle& rScreenRect, const OUString& rHelpText, const OUString& rLongHelpText, QuickHelpFlags nStyle ); - static bool ShowQuickHelp( vcl::Window* pParent, + static void ShowQuickHelp( vcl::Window* pParent, const tools::Rectangle& rScreenRect, const OUString& rHelpText, QuickHelpFlags nStyle = QuickHelpFlags::NONE ) - { return Help::ShowQuickHelp( pParent, rScreenRect, rHelpText, OUString(), nStyle ); } + { Help::ShowQuickHelp( pParent, rScreenRect, rHelpText, OUString(), nStyle ); } static void HideBalloonAndQuickHelp(); diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 814dba0fb195..621e425c8f5f 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -82,7 +82,7 @@ public: // use these methods right after setting a context to make sure drawing happens // in the right FBO (default one is for onscreen painting) - bool BindFramebuffer( OpenGLFramebuffer* pFramebuffer ); + void BindFramebuffer( OpenGLFramebuffer* pFramebuffer ); void AcquireDefaultFramebuffer(); OpenGLFramebuffer* AcquireFramebuffer( const OpenGLTexture& rTexture ); static void ReleaseFramebuffer( OpenGLFramebuffer* pFramebuffer ); diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx index 03fa22b77c4d..fa218655cb0c 100644 --- a/include/vcl/pdfextoutdevdata.hxx +++ b/include/vcl/pdfextoutdevdata.hxx @@ -270,12 +270,8 @@ public: @param nDestId the dest the link shall point to - @returns - 0 for success - -1 in case the link id does not exist - -2 in case the dest id does not exist */ - sal_Int32 SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ); + void SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ); /** Set the URL for a link <p>will change a dest type link to an URL type link if necessary</p> @param nLinkId @@ -287,12 +283,8 @@ public: conversion done to this parameter execept this: it will be output as 7bit Ascii. The URL will appear literally in the PDF file produced - - @returns - 0 for success - -1 in case the link id does not exist */ - sal_Int32 SetLinkURL( sal_Int32 nLinkId, const OUString& rURL ); + void SetLinkURL( sal_Int32 nLinkId, const OUString& rURL ); /// Set URL for a linked Screen annotation. void SetScreenURL(sal_Int32 nScreenId, const OUString& rURL); @@ -412,12 +404,8 @@ public: @param eVal the value to set the attribute to - - @returns - True if the value was valid and the change has been performed, - False if the attribute or value was invalid; attribute remains unchanged */ - bool SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal ); + void SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal ); /** set a structure attribute on the current structural element SetStructureAttributeNumerical sets an attribute of the current structural element @@ -430,12 +418,8 @@ public: @param nValue the value to set the attribute to - - @returns - True if the value was valid and the change has been performed, - False if the attribute or value was invalid; attribute remains unchanged */ - bool SetStructureAttributeNumerical( PDFWriter::StructAttribute eAttr, sal_Int32 nValue ); + void SetStructureAttributeNumerical( PDFWriter::StructAttribute eAttr, sal_Int32 nValue ); /** set the bounding box of a structural element SetStructureBoundingBox sets the BBox attribute to a new value. Since the BBox diff --git a/include/vcl/region.hxx b/include/vcl/region.hxx index a7458358127c..ba6715475115 100644 --- a/include/vcl/region.hxx +++ b/include/vcl/region.hxx @@ -90,13 +90,13 @@ public: // manipulators void Move( long nHorzMove, long nVertMove ); void Scale( double fScaleX, double fScaleY ); - bool Union( const tools::Rectangle& rRegion ); - bool Intersect( const tools::Rectangle& rRegion ); - bool Exclude( const tools::Rectangle& rRegion ); - bool XOr( const tools::Rectangle& rRegion ); - bool Union( const vcl::Region& rRegion ); - bool Intersect( const vcl::Region& rRegion ); - bool Exclude( const vcl::Region& rRegion ); + void Union( const tools::Rectangle& rRegion ); + void Intersect( const tools::Rectangle& rRegion ); + void Exclude( const tools::Rectangle& rRegion ); + void XOr( const tools::Rectangle& rRegion ); + void Union( const vcl::Region& rRegion ); + void Intersect( const vcl::Region& rRegion ); + void Exclude( const vcl::Region& rRegion ); bool XOr( const vcl::Region& rRegion ); bool IsEmpty() const; diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx index d34b53bba927..1b30c9904c04 100644 --- a/include/vcl/textview.hxx +++ b/include/vcl/textview.hxx @@ -189,7 +189,7 @@ public: void SetAutoScroll( bool bAutoScroll ); bool IsAutoScroll() const; - bool SetCursorAtPoint( const Point& rPointPixel ); + void SetCursorAtPoint( const Point& rPointPixel ); bool IsSelectionAtPoint( const Point& rPointPixel ); void SetPaintSelection( bool bPaint); |