From bd28564be85ee51dc08cb2591840e1cb00263e28 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 26 Jul 2018 12:27:10 +0200 Subject: loplugin:returnconstant in vcl Change-Id: I597ef6d75d1c21cdc15a91bf7f549bc14c851506 Reviewed-on: https://gerrit.libreoffice.org/58086 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/vcl/GraphicNativeTransform.hxx | 2 +- include/vcl/alpha.hxx | 2 +- include/vcl/button.hxx | 4 +- include/vcl/field.hxx | 8 +- include/vcl/help.hxx | 8 +- include/vcl/opengl/OpenGLContext.hxx | 2 +- include/vcl/pdfextoutdevdata.hxx | 24 +----- include/vcl/region.hxx | 14 ++-- include/vcl/textview.hxx | 2 +- sd/source/ui/func/futext.cxx | 6 +- vcl/inc/brdwin.hxx | 2 +- vcl/inc/opengl/program.hxx | 2 +- vcl/inc/opengl/salbmp.hxx | 2 +- vcl/inc/opengl/x11/gdiimpl.hxx | 2 +- vcl/inc/openglgdiimpl.hxx | 2 +- vcl/inc/unx/printerjob.hxx | 2 +- vcl/opengl/gdiimpl.cxx | 9 +- vcl/opengl/program.cxx | 4 +- vcl/opengl/salbmp.cxx | 4 +- vcl/opengl/x11/gdiimpl.cxx | 13 ++- vcl/source/app/help.cxx | 7 +- vcl/source/app/salvtables.cxx | 6 +- vcl/source/control/button.cxx | 6 +- vcl/source/control/field.cxx | 51 +++++------- vcl/source/control/field2.cxx | 20 ++--- vcl/source/edit/textview.cxx | 3 +- vcl/source/filter/GraphicNativeTransform.cxx | 4 +- vcl/source/filter/ixbm/xbmread.cxx | 8 +- vcl/source/fontsubset/cff.cxx | 10 +-- vcl/source/gdi/alpha.cxx | 3 +- vcl/source/gdi/pdfextoutdevdata.cxx | 12 +-- vcl/source/gdi/region.cxx | 120 +++++++++++++-------------- vcl/source/opengl/OpenGLContext.cxx | 4 +- vcl/source/window/brdwin.cxx | 7 +- vcl/source/window/winproc.cxx | 6 +- vcl/unx/generic/print/glyphset.cxx | 4 +- vcl/unx/generic/print/glyphset.hxx | 2 +- vcl/unx/generic/print/printerjob.cxx | 4 +- 38 files changed, 157 insertions(+), 234 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

will change a dest type link to an URL type link if necessary

@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); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index f5e797c2d674..8ce4589973d6 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -1209,11 +1209,13 @@ bool FuText::RequestHelp(const HelpEvent& rHEvt) if (Help::IsBalloonHelpEnabled()) { - bReturn = Help::ShowBalloon( static_cast(mpWindow), rHEvt.GetMousePosPixel(), aScreenRect, aHelpText); + Help::ShowBalloon( static_cast(mpWindow), rHEvt.GetMousePosPixel(), aScreenRect, aHelpText); + bReturn = true; } else if (Help::IsQuickHelpEnabled()) { - bReturn = Help::ShowQuickHelp( static_cast(mpWindow), aScreenRect, aHelpText); + Help::ShowQuickHelp( static_cast(mpWindow), aScreenRect, aHelpText); + bReturn = true; } } } diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx index 8e3846a07c74..431b839aadce 100644 --- a/vcl/inc/brdwin.hxx +++ b/vcl/inc/brdwin.hxx @@ -227,7 +227,7 @@ public: static void ImplInitTitle( ImplBorderFrameData* pData ); static BorderWindowHitTest ImplHitTest( ImplBorderFrameData const * pData, const Point& rPos ); - static bool ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); + static void ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); static OUString ImplRequestHelp( ImplBorderFrameData const * pData, const Point& rPos, tools::Rectangle& rHelpRect ); static long ImplCalcTitleWidth( const ImplBorderFrameData* pData ); }; diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx index e18db93d57c4..ec51c18d9469 100644 --- a/vcl/inc/opengl/program.hxx +++ b/vcl/inc/opengl/program.hxx @@ -72,7 +72,7 @@ public: const rtl::OString& preamble, const rtl::OString& rDigest ); void Use(); void Reuse(); - bool Clean(); + void Clean(); void SetVertices( const GLvoid* pData ); void SetTextureCoord( const GLvoid* pData ); diff --git a/vcl/inc/opengl/salbmp.hxx b/vcl/inc/opengl/salbmp.hxx index 68d79d8af404..587d2823e0b7 100644 --- a/vcl/inc/opengl/salbmp.hxx +++ b/vcl/inc/opengl/salbmp.hxx @@ -81,7 +81,7 @@ public: public: - bool Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight ); + void Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight ); OpenGLTexture& GetTexture() const; const BitmapPalette& GetBitmapPalette() const { return maPalette; } diff --git a/vcl/inc/opengl/x11/gdiimpl.hxx b/vcl/inc/opengl/x11/gdiimpl.hxx index 2e136129303e..bff6f4881629 100644 --- a/vcl/inc/opengl/x11/gdiimpl.hxx +++ b/vcl/inc/opengl/x11/gdiimpl.hxx @@ -31,7 +31,7 @@ public: protected: virtual rtl::Reference CreateWinContext() override; - bool RenderPixmap(X11Pixmap const * pPixmap, X11Pixmap const * pMask, int nX, int nY, TextureCombo& rCombo); + void RenderPixmap(X11Pixmap const * pPixmap, X11Pixmap const * pMask, int nX, int nY, TextureCombo& rCombo); public: // implementation of X11GraphicsImpl diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx index af2f7045a2b3..952a91e481e2 100644 --- a/vcl/inc/openglgdiimpl.hxx +++ b/vcl/inc/openglgdiimpl.hxx @@ -176,7 +176,7 @@ public: protected: bool AcquireContext(bool bForceCreate = false); - bool ReleaseContext(); + void ReleaseContext(); /// create a new context for rendering to the underlying window virtual rtl::Reference CreateWinContext() = 0; diff --git a/vcl/inc/unx/printerjob.hxx b/vcl/inc/unx/printerjob.hxx index 937c59fe00f0..7052a1416e37 100644 --- a/vcl/inc/unx/printerjob.hxx +++ b/vcl/inc/unx/printerjob.hxx @@ -77,7 +77,7 @@ private: bool writeSetup( osl::File* pFile, const JobData& ); bool writePageSetup( osl::File* pFile, const JobData&, bool bWriteFeatures ); static void writeJobPatch( osl::File* File, const JobData& ); - static bool writeProlog (osl::File* pFile, const JobData& ); + static void writeProlog (osl::File* pFile, const JobData& ); public: // for usage in PrinterGfx sal_uInt32 GetResolution () const { return mnResolution; } diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index bad495bdb1b6..d7965883d2d7 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -132,11 +132,9 @@ bool OpenGLSalGraphicsImpl::AcquireContext( bool bForceCreate ) return mpContext.is(); } -bool OpenGLSalGraphicsImpl::ReleaseContext() +void OpenGLSalGraphicsImpl::ReleaseContext() { mpContext.clear(); - - return true; } void OpenGLSalGraphicsImpl::Init() @@ -1738,10 +1736,7 @@ std::shared_ptr OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, l " " << nWidth << "x" << nHeight ); //TODO really needed? PreDraw(); - if( !pBitmap->Create( maOffscreenTex, nX, nY, nWidth, nHeight ) ) - { - pBitmap = nullptr; - } + pBitmap->Create( maOffscreenTex, nX, nY, nWidth, nHeight ); PostDraw(); return pBitmap; } diff --git a/vcl/opengl/program.cxx b/vcl/opengl/program.cxx index 09a8a0d98d0b..5f677f1a5655 100644 --- a/vcl/opengl/program.cxx +++ b/vcl/opengl/program.cxx @@ -67,7 +67,7 @@ void OpenGLProgram::Use() Reuse(); } -bool OpenGLProgram::Clean() +void OpenGLProgram::Clean() { // unbind all textures for (OpenGLTexture& rTexture : maTextures) @@ -89,8 +89,6 @@ bool OpenGLProgram::Clean() } mnEnabledAttribs = 0; } - - return true; } bool OpenGLProgram::EnableVertexAttrib(GLuint& rAttrib, const OString& rName) diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 33fc720ef497..20d0ac1fadd3 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -115,7 +115,7 @@ OpenGLSalBitmap::~OpenGLSalBitmap() VCL_GL_INFO( "~OpenGLSalBitmap" ); } -bool OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight ) +void OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight ) { DBG_TESTSOLARMUTEX(); static const BitmapPalette aEmptyPalette; @@ -155,8 +155,6 @@ bool OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, long assert(mnWidth == maTexture.GetWidth() && mnHeight == maTexture.GetHeight()); - - return true; } bool OpenGLSalBitmap::Create( const Size& rSize, sal_uInt16 nBits, const BitmapPalette& rBitmapPalette ) diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx index 2e8fffe7c0f6..5104d6302973 100644 --- a/vcl/opengl/x11/gdiimpl.cxx +++ b/vcl/opengl/x11/gdiimpl.cxx @@ -697,7 +697,7 @@ namespace } } -bool X11OpenGLSalGraphicsImpl::RenderPixmap(X11Pixmap const * pPixmap, X11Pixmap const * pMask, int nX, int nY, TextureCombo& rCombo) +void X11OpenGLSalGraphicsImpl::RenderPixmap(X11Pixmap const * pPixmap, X11Pixmap const * pMask, int nX, int nY, TextureCombo& rCombo) { const int aAttribs[] = { @@ -764,8 +764,6 @@ bool X11OpenGLSalGraphicsImpl::RenderPixmap(X11Pixmap const * pPixmap, X11Pixmap PostDraw(); CHECK_GL_ERROR(); - - return true; } bool X11OpenGLSalGraphicsImpl::RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixmap* pMask, int nX, int nY ) @@ -773,7 +771,8 @@ bool X11OpenGLSalGraphicsImpl::RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixm SAL_INFO( "vcl.opengl", "RenderPixmapToScreen (" << nX << " " << nY << ")" ); TextureCombo aCombo; - return RenderPixmap(pPixmap, pMask, nX, nY, aCombo); + RenderPixmap(pPixmap, pMask, nX, nY, aCombo); + return true; } bool X11OpenGLSalGraphicsImpl::TryRenderCachedNativeControl(ControlCacheKey& rControlCacheKey, int nX, int nY) @@ -811,9 +810,7 @@ bool X11OpenGLSalGraphicsImpl::RenderAndCacheNativeControl(X11Pixmap* pPixmap, X ControlCacheKey& aControlCacheKey) { std::unique_ptr pCombo(new TextureCombo); - bool bResult = RenderPixmap(pPixmap, pMask, nX, nY, *pCombo); - if (!bResult) - return false; + RenderPixmap(pPixmap, pMask, nX, nY, *pCombo); if (!aControlCacheKey.canCacheControl()) return true; @@ -822,7 +819,7 @@ bool X11OpenGLSalGraphicsImpl::RenderAndCacheNativeControl(X11Pixmap* pPixmap, X if (gTextureCache.get()) gTextureCache.get()->insert(std::move(pair)); - return bResult; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 7ce441686355..35ef7ca2a476 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -150,14 +150,12 @@ bool Help::IsBalloonHelpEnabled() return ImplGetSVData()->maHelpData.mbBalloonHelp; } -bool Help::ShowBalloon( vcl::Window* pParent, +void Help::ShowBalloon( vcl::Window* pParent, const Point& rScreenPos, const tools::Rectangle& rRect, const OUString& rHelpText ) { ImplShowHelpWindow( pParent, HELPWINSTYLE_BALLOON, QuickHelpFlags::NONE, rHelpText, OUString(), rScreenPos, rRect ); - - return true; } void Help::EnableQuickHelp() @@ -175,7 +173,7 @@ bool Help::IsQuickHelpEnabled() return ImplGetSVData()->maHelpData.mbQuickHelp; } -bool Help::ShowQuickHelp( vcl::Window* pParent, +void Help::ShowQuickHelp( vcl::Window* pParent, const tools::Rectangle& rScreenRect, const OUString& rHelpText, const OUString& rLongHelpText, @@ -185,7 +183,6 @@ bool Help::ShowQuickHelp( vcl::Window* pParent, ImplShowHelpWindow( pParent, nHelpWinStyle, nStyle, rHelpText, rLongHelpText, pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), rScreenRect ); - return true; } void Help::HideBalloonAndQuickHelp() diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index a448703252bd..dfe3cf552e81 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -563,7 +563,7 @@ public: return m_xWindow->GetText(); } - bool help() + void help() { //show help for widget with keyboard focus vcl::Window* pWidget = ImplGetSVData()->maWinData.mpFocusWin; @@ -583,7 +583,6 @@ public: Help* pHelp = bRunNormalHelpRequest ? Application::GetHelp() : nullptr; if (pHelp) pHelp->Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), pSource); - return false; } virtual void set_busy_cursor(bool bBusy) override @@ -648,7 +647,8 @@ public: IMPL_LINK_NOARG(SalInstanceWindow, HelpHdl, vcl::Window&, bool) { - return help(); + help(); + return false; } class SalInstanceDialog : public SalInstanceWindow, public virtual weld::Dialog diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 50b62c50b020..87d7b795e0fc 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -151,7 +151,7 @@ OUString Button::GetStandardText(StandardButtonType eButton) return VclResId(aResIdAry[static_cast(eButton)]); } -bool Button::SetModeImage( const Image& rImage ) +void Button::SetModeImage( const Image& rImage ) { if ( rImage != mpButtonData->maImage ) { @@ -159,7 +159,6 @@ bool Button::SetModeImage( const Image& rImage ) StateChanged( StateChangedType::Data ); queue_resize(); } - return true; } Image const & Button::GetModeImage( ) const @@ -2617,7 +2616,7 @@ void RadioButton::Toggle() ImplCallEventListenersAndHandler( VclEventId::RadiobuttonToggle, [this] () { maToggleHdl.Call(*this); } ); } -bool RadioButton::SetModeRadioImage( const Image& rImage ) +void RadioButton::SetModeRadioImage( const Image& rImage ) { if ( rImage != maImage ) { @@ -2625,7 +2624,6 @@ bool RadioButton::SetModeRadioImage( const Image& rImage ) CompatStateChanged( StateChangedType::Data ); queue_resize(); } - return true; } diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 1ebcfe95e9ad..2efb11938131 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -1332,22 +1332,18 @@ static bool ImplMetricGetValue( const OUString& rStr, double& rValue, sal_Int64 return true; } -bool MetricFormatter::ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr ) +void MetricFormatter::ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr ) { if ( !ImplMetricGetValue( rStr, rValue, mnBaseValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), meUnit ) ) - return true; - else - { - double nTempVal = rValue; - // caution: precision loss in double cast - if ( nTempVal > GetMax() ) - nTempVal = static_cast(GetMax()); - else if ( nTempVal < GetMin()) - nTempVal = static_cast(GetMin()); + return; - rOutStr = CreateFieldText( static_cast(nTempVal) ); - return true; - } + double nTempVal = rValue; + // caution: precision loss in double cast + if ( nTempVal > GetMax() ) + nTempVal = static_cast(GetMax()); + else if ( nTempVal < GetMin()) + nTempVal = static_cast(GetMin()); + rOutStr = CreateFieldText( static_cast(nTempVal) ); } inline void MetricFormatter::ImplInit() @@ -1507,12 +1503,9 @@ void MetricFormatter::Reformat() OUString aStr; // caution: precision loss in double cast double nTemp = static_cast(mnLastValue); - bool bOK = ImplMetricReformat( aText, nTemp, aStr ); + ImplMetricReformat( aText, nTemp, aStr ); mnLastValue = static_cast(nTemp); - if ( !bOK ) - return; - if ( !aStr.isEmpty() ) { ImplSetText( aStr ); @@ -1820,22 +1813,18 @@ inline bool ImplCurrencyGetValue( const OUString& rStr, sal_Int64& rValue, return ImplNumericGetValue( rStr, rValue, nDecDigits, rWrapper, true ); } -bool CurrencyFormatter::ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr ) +void CurrencyFormatter::ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr ) { sal_Int64 nValue; if ( !ImplNumericGetValue( rStr, nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), true ) ) - return true; - else - { - sal_Int64 nTempVal = nValue; - if ( nTempVal > GetMax() ) - nTempVal = GetMax(); - else if ( nTempVal < GetMin()) - nTempVal = GetMin(); + return; - rOutStr = CreateFieldText( nTempVal ); - return true; - } + sal_Int64 nTempVal = nValue; + if ( nTempVal > GetMax() ) + nTempVal = GetMax(); + else if ( nTempVal < GetMin()) + nTempVal = GetMin(); + rOutStr = CreateFieldText( nTempVal ); } CurrencyFormatter::CurrencyFormatter() @@ -1877,9 +1866,7 @@ void CurrencyFormatter::Reformat() return; OUString aStr; - bool bOK = ImplCurrencyReformat( GetField()->GetText(), aStr ); - if ( !bOK ) - return; + ImplCurrencyReformat( GetField()->GetText(), aStr ); if ( !aStr.isEmpty() ) { diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 888ce6c20497..e093d15d2cb9 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -1115,11 +1115,11 @@ static bool ImplDateGetValue( const OUString& rStr, Date& rDate, ExtDateFieldFor return false; } -bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr ) +void DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr ) { Date aDate( Date::EMPTY ); if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper() ) ) - return true; + return; Date aTempDate = aDate; if ( aTempDate > GetMax() ) @@ -1128,8 +1128,6 @@ bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr ) aTempDate = GetMin(); rOutStr = ImplGetDateAsText( aTempDate ); - - return true; } OUString DateFormatter::ImplGetDateAsText( const Date& rDate ) const @@ -1670,9 +1668,7 @@ void DateFormatter::Reformat() return; OUString aStr; - bool bOK = ImplDateReformat( GetField()->GetText(), aStr ); - if( !bOK ) - return; + ImplDateReformat( GetField()->GetText(), aStr ); if ( !aStr.isEmpty() ) { @@ -2157,11 +2153,11 @@ bool TimeFormatter::TextToTime(const OUString& rStr, tools::Time& rTime, TimeFie return true; } -bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr ) +void TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr ) { tools::Time aTime( 0, 0, 0 ); if ( !TextToTime( rStr, aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper() ) ) - return true; + return; tools::Time aTempTime = aTime; if ( aTempTime > GetMax() ) @@ -2207,8 +2203,6 @@ bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr ) rOutStr += "PM"; // ImplGetLocaleDataWrapper().getTimePM(); } } - - return true; } bool TimeFormatter::ImplAllowMalformedInput() const @@ -2507,9 +2501,7 @@ void TimeFormatter::Reformat() return; OUString aStr; - bool bOK = ImplTimeReformat( GetField()->GetText(), aStr ); - if ( !bOK ) - return; + ImplTimeReformat( GetField()->GetText(), aStr ); if ( !aStr.isEmpty() ) { diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 8865b7ec3769..d18797493341 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -1697,7 +1697,7 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec mpImpl->mpCursor->Show(); } -bool TextView::SetCursorAtPoint( const Point& rPosPixel ) +void TextView::SetCursorAtPoint( const Point& rPosPixel ) { mpImpl->mpTextEngine->CheckIdleFormatter(); @@ -1725,7 +1725,6 @@ bool TextView::SetCursorAtPoint( const Point& rPosPixel ) bool bForceCursor = !mpImpl->mpDDInfo; // && !mbInSelection ImpShowCursor( mpImpl->mbAutoScroll, bForceCursor, false ); - return true; } bool TextView::IsSelectionAtPoint( const Point& rPosPixel ) diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx index 50a472903005..db4a1078a70d 100644 --- a/vcl/source/filter/GraphicNativeTransform.cxx +++ b/vcl/source/filter/GraphicNativeTransform.cxx @@ -116,7 +116,7 @@ bool GraphicNativeTransform::rotateGeneric(sal_uInt16 aRotation, const OUString& return true; } -bool GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation) +void GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation) { BitmapEx aBitmap = mrGraphic.GetBitmapEx(); @@ -162,8 +162,6 @@ bool GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation) rFilter.ImportGraphic( aGraphic, OUString("import"), aTargetStream ); mrGraphic = aGraphic; } - - return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx index 97c5d9ae5bd2..9a282a6defe9 100644 --- a/vcl/source/filter/ixbm/xbmread.cxx +++ b/vcl/source/filter/ixbm/xbmread.cxx @@ -55,7 +55,7 @@ class XBMReader : public GraphicReader void InitTable(); OString FindTokenLine( SvStream* pInStm, const char* pTok1, const char* pTok2 ); int ParseDefine( const sal_Char* pDefine ); - bool ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat ); + void ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat ); public: @@ -184,7 +184,7 @@ int XBMReader::ParseDefine( const sal_Char* pDefine ) return nRet; } -bool XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat ) +void XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat ) { OString aLine; long nRow = 0; @@ -257,8 +257,6 @@ bool XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat } } } - - return true; } ReadState XBMReader::ReadXBM( Graphic& rGraphic ) @@ -329,7 +327,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) { aWhite = pAcc1->GetBestMatchingColor( COL_WHITE ); aBlack = pAcc1->GetBestMatchingColor( COL_BLACK ); - bStatus = ParseData( &rIStm, aLine, eFormat ); + ParseData( &rIStm, aLine, eFormat ); } else bStatus = false; diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index 13ed076d1ff6..c573c88b5737 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -270,7 +270,7 @@ public: explicit CffSubsetterContext( const U8* pBasePtr, int nBaseLen); bool initialCffRead(); - bool emitAsType1( class Type1Emitter&, + void emitAsType1( class Type1Emitter&, const sal_GlyphId* pGlyphIds, const U8* pEncoding, GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& ); @@ -1732,7 +1732,7 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail, mpPtr += sprintf( mpPtr, "%s", pLineTail); } -bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, +void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, const sal_GlyphId* pReqGlyphIds, const U8* pReqEncoding, GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rFSInfo) { @@ -2027,8 +2027,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, rFSInfo.m_nFontType = rEmitter.mbPfbSubset ? FontType::TYPE1_PFB : FontType::TYPE1_PFA; rFSInfo.m_aPSName = OUString( rEmitter.maSubsetName, strlen(rEmitter.maSubsetName), RTL_TEXTENCODING_UTF8 ); - - return true; } bool FontSubsetInfo::CreateFontSubsetFromCff( GlyphWidth* pOutGlyphWidths ) @@ -2043,10 +2041,10 @@ bool FontSubsetInfo::CreateFontSubsetFromCff( GlyphWidth* pOutGlyphWidths ) const bool bPfbSubset(mnReqFontTypeMask & FontType::TYPE1_PFB); Type1Emitter aType1Emitter( mpOutFile, bPfbSubset); aType1Emitter.setSubsetName( mpReqFontName); - bRC = aCff.emitAsType1( aType1Emitter, + aCff.emitAsType1( aType1Emitter, mpReqGlyphIds, mpReqEncodedIds, pOutGlyphWidths, mnReqGlyphCount, *this); - return bRC; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx index 4f39015287a9..ae385ace0107 100644 --- a/vcl/source/gdi/alpha.cxx +++ b/vcl/source/gdi/alpha.cxx @@ -76,7 +76,7 @@ void AlphaMask::Erase( sal_uInt8 cTransparency ) Bitmap::Erase( Color( cTransparency, cTransparency, cTransparency ) ); } -bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) +void AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) { Bitmap::ScopedReadAccess pMaskAcc( const_cast(rMask) ); AlphaScopedWriteAccess pAcc(*this); @@ -97,7 +97,6 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) pAcc->SetPixelOnData( pScanline, nX, aReplace ); } } - return false; } void AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency ) diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index f486584f9103..4384d96e1a47 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -672,19 +672,17 @@ sal_Int32 PDFExtOutDevData::CreateScreen(const tools::Rectangle& rRect, sal_Int3 return mpGlobalSyncData->mCurId++; } -sal_Int32 PDFExtOutDevData::SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ) +void PDFExtOutDevData::SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ) { mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::SetLinkDest ); mpGlobalSyncData->mParaInts.push_back( nLinkId ); mpGlobalSyncData->mParaInts.push_back( nDestId ); - return 0; } -sal_Int32 PDFExtOutDevData::SetLinkURL( sal_Int32 nLinkId, const OUString& rURL ) +void PDFExtOutDevData::SetLinkURL( sal_Int32 nLinkId, const OUString& rURL ) { mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::SetLinkURL ); mpGlobalSyncData->mParaInts.push_back( nLinkId ); mpGlobalSyncData->mParaOUStrings.push_back( rURL ); - return 0; } void PDFExtOutDevData::SetScreenURL(sal_Int32 nScreenId, const OUString& rURL) @@ -763,19 +761,17 @@ sal_Int32 PDFExtOutDevData::GetCurrentStructureElement() { return mpGlobalSyncData->mCurrentStructElement; } -bool PDFExtOutDevData::SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal ) +void PDFExtOutDevData::SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal ) { mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureAttribute ); mpPageSyncData->mParaStructAttributes.push_back( eAttr ); mpPageSyncData->mParaStructAttributeValues.push_back( eVal ); - return true; } -bool PDFExtOutDevData::SetStructureAttributeNumerical( PDFWriter::StructAttribute eAttr, sal_Int32 nValue ) +void PDFExtOutDevData::SetStructureAttributeNumerical( PDFWriter::StructAttribute eAttr, sal_Int32 nValue ) { mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureAttributeNumerical ); mpPageSyncData->mParaStructAttributes.push_back( eAttr ); mpPageSyncData->mParaInts.push_back( nValue ); - return true; } void PDFExtOutDevData::SetStructureBoundingBox( const tools::Rectangle& rRect ) { diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index e56228be8468..3beb8864db6b 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -507,19 +507,19 @@ void vcl::Region::Scale( double fScaleX, double fScaleY ) } } -bool vcl::Region::Union( const tools::Rectangle& rRect ) +void vcl::Region::Union( const tools::Rectangle& rRect ) { if(rRect.IsEmpty()) { // empty rectangle will not expand the existing union, nothing to do - return true; + return; } if(IsEmpty()) { // no local data, the union will be equal to source. Create using rectangle *this = rRect; - return true; + return; } if(HasPolyPolygonOrB2DPolyPolygon()) @@ -551,7 +551,7 @@ bool vcl::Region::Union( const tools::Rectangle& rRect ) *this = vcl::Region(aClip); } - return true; + return; } // only region band mode possibility left here or null/empty @@ -561,7 +561,7 @@ bool vcl::Region::Union( const tools::Rectangle& rRect ) { // no region band, create using the rectangle *this = rRect; - return true; + return; } std::unique_ptr pNew( o3tl::make_unique(*pCurrent)); @@ -585,29 +585,28 @@ bool vcl::Region::Union( const tools::Rectangle& rRect ) } mpRegionBand = std::move(pNew); - return true; } -bool vcl::Region::Intersect( const tools::Rectangle& rRect ) +void vcl::Region::Intersect( const tools::Rectangle& rRect ) { if ( rRect.IsEmpty() ) { // empty rectangle will create empty region SetEmpty(); - return true; + return; } if(IsNull()) { // null region (everything) intersect with rect will give rect *this = rRect; - return true; + return; } if(IsEmpty()) { // no content, cannot get more empty - return true; + return; } if(HasPolyPolygonOrB2DPolyPolygon()) @@ -644,7 +643,7 @@ bool vcl::Region::Intersect( const tools::Rectangle& rRect ) mpRegionBand.reset(); } - return true; + return; } // only region band mode possibility left here or null/empty @@ -653,7 +652,7 @@ bool vcl::Region::Intersect( const tools::Rectangle& rRect ) if(!pCurrent) { // region is empty -> nothing to do! - return true; + return; } std::unique_ptr pNew( o3tl::make_unique(*pCurrent)); @@ -677,21 +676,20 @@ bool vcl::Region::Intersect( const tools::Rectangle& rRect ) } mpRegionBand = std::move(pNew); - return true; } -bool vcl::Region::Exclude( const tools::Rectangle& rRect ) +void vcl::Region::Exclude( const tools::Rectangle& rRect ) { if ( rRect.IsEmpty() ) { // excluding nothing will do no change - return true; + return; } if(IsEmpty()) { // cannot exclude from empty, done - return true; + return; } if(IsNull()) @@ -699,7 +697,7 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect ) // error; cannot exclude from null region since this is not representable // in the data OSL_ENSURE(false, "Region::Exclude error: Cannot exclude from null region (!)"); - return true; + return; } if( HasPolyPolygonOrB2DPolyPolygon() ) @@ -712,7 +710,7 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect ) if(!aThisPolyPoly.count()) { // when local polygon is empty, nothing can be excluded - return true; + return; } // get the other B2DPolyPolygon @@ -724,7 +722,7 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect ) *this = vcl::Region(aClip); - return true; + return; } // only region band mode possibility left here or null/empty @@ -733,7 +731,7 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect ) if(!pCurrent) { // empty? -> done! - return true; + return; } std::unique_ptr pNew( o3tl::make_unique(*pCurrent)); @@ -757,22 +755,21 @@ bool vcl::Region::Exclude( const tools::Rectangle& rRect ) } mpRegionBand = std::move(pNew); - return true; } -bool vcl::Region::XOr( const tools::Rectangle& rRect ) +void vcl::Region::XOr( const tools::Rectangle& rRect ) { if ( rRect.IsEmpty() ) { // empty rectangle will not change local content - return true; + return; } if(IsEmpty()) { // rRect will be the xored-form (local off, rect on) *this = rRect; - return true; + return; } if(IsNull()) @@ -780,7 +777,7 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect ) // error; cannot exclude from null region since this is not representable // in the data OSL_ENSURE(false, "Region::XOr error: Cannot XOr with null region (!)"); - return true; + return; } if( HasPolyPolygonOrB2DPolyPolygon() ) @@ -794,7 +791,7 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect ) { // no local content, XOr will be equal to rectangle *this = rRect; - return true; + return; } // get the other B2DPolyPolygon @@ -806,7 +803,7 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect ) *this = vcl::Region(aClip); - return true; + return; } // only region band mode possibility left here or null/empty @@ -816,7 +813,7 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect ) { // rRect will be the xored-form (local off, rect on) *this = rRect; - return true; + return; } // only region band mode possibility left here or null/empty @@ -841,35 +838,34 @@ bool vcl::Region::XOr( const tools::Rectangle& rRect ) } mpRegionBand = std::move(pNew); - return true; } -bool vcl::Region::Union( const vcl::Region& rRegion ) +void vcl::Region::Union( const vcl::Region& rRegion ) { if(rRegion.IsEmpty()) { // no extension at all - return true; + return; } if(rRegion.IsNull()) { // extending with null region -> null region *this = vcl::Region(true); - return true; + return; } if(IsEmpty()) { // local is empty, union will give source region *this = rRegion; - return true; + return; } if(IsNull()) { // already fully expanded (is null region), cannot be extended - return true; + return; } if( rRegion.HasPolyPolygonOrB2DPolyPolygon() || HasPolyPolygonOrB2DPolyPolygon() ) @@ -883,7 +879,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion ) { // when no local content, union will be equal to rRegion *this = rRegion; - return true; + return; } // get the other B2DPolyPolygon @@ -894,7 +890,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion ) basegfx::B2DPolyPolygon aClip(basegfx::utils::solvePolygonOperationOr(aThisPolyPoly, aOtherPolyPoly)); *this = vcl::Region( aClip ); - return true; + return; } // only region band mode possibility left here or null/empty @@ -904,7 +900,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion ) { // local is empty, union will give source region *this = rRegion; - return true; + return; } const RegionBand* pSource = rRegion.getRegionBand(); @@ -912,7 +908,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion ) if(!pSource) { // no extension at all - return true; + return; } // prepare source and target @@ -928,51 +924,50 @@ bool vcl::Region::Union( const vcl::Region& rRegion ) } mpRegionBand = std::move(pNew); - return true; } -bool vcl::Region::Intersect( const vcl::Region& rRegion ) +void vcl::Region::Intersect( const vcl::Region& rRegion ) { // same instance data? -> nothing to do! if(getB2DPolyPolygon() && getB2DPolyPolygon() == rRegion.getB2DPolyPolygon()) { - return true; + return; } if(getPolyPolygon() && getPolyPolygon() == rRegion.getPolyPolygon()) { - return true; + return; } if(getRegionBand() && getRegionBand() == rRegion.getRegionBand()) { - return true; + return; } if(rRegion.IsNull()) { // source region is null-region, intersect will not change local region - return true; + return; } if(IsNull()) { // when local region is null-region, intersect will be equal to source *this = rRegion; - return true; + return; } if(rRegion.IsEmpty()) { // source region is empty, intersection will always be empty SetEmpty(); - return true; + return; } if(IsEmpty()) { // local region is empty, cannot get more empty than that. Nothing to do - return true; + return; } if( rRegion.HasPolyPolygonOrB2DPolyPolygon() || HasPolyPolygonOrB2DPolyPolygon() ) @@ -983,7 +978,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion ) if(!aThisPolyPoly.count()) { // local region is empty, cannot get more empty than that. Nothing to do - return true; + return; } // get the other B2DPolyPolygon @@ -993,7 +988,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion ) { // source region is empty, intersection will always be empty SetEmpty(); - return true; + return; } const basegfx::B2DPolyPolygon aClip( @@ -1003,7 +998,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion ) true, false)); *this = vcl::Region( aClip ); - return true; + return; } // only region band mode possibility left here or null/empty @@ -1012,7 +1007,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion ) if(!pCurrent) { // local region is empty, cannot get more empty than that. Nothing to do - return true; + return; } const RegionBand* pSource = rRegion.getRegionBand(); @@ -1021,7 +1016,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion ) { // source region is empty, intersection will always be empty SetEmpty(); - return true; + return; } // both RegionBands exist and are not empty @@ -1048,29 +1043,27 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion ) mpRegionBand = std::move(pNew); } - - return true; } -bool vcl::Region::Exclude( const vcl::Region& rRegion ) +void vcl::Region::Exclude( const vcl::Region& rRegion ) { if ( rRegion.IsEmpty() ) { // excluding nothing will do no change - return true; + return; } if ( rRegion.IsNull() ) { // excluding everything will create empty region SetEmpty(); - return true; + return; } if(IsEmpty()) { // cannot exclude from empty, done - return true; + return; } if(IsNull()) @@ -1078,7 +1071,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion ) // error; cannot exclude from null region since this is not representable // in the data OSL_ENSURE(false, "Region::Exclude error: Cannot exclude from null region (!)"); - return true; + return; } if( rRegion.HasPolyPolygonOrB2DPolyPolygon() || HasPolyPolygonOrB2DPolyPolygon() ) @@ -1089,7 +1082,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion ) if(!aThisPolyPoly.count()) { // cannot exclude from empty, done - return true; + return; } aThisPolyPoly = basegfx::utils::prepareForPolygonOperation( aThisPolyPoly ); @@ -1100,7 +1093,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion ) basegfx::B2DPolyPolygon aClip = basegfx::utils::solvePolygonOperationDiff( aThisPolyPoly, aOtherPolyPoly ); *this = vcl::Region( aClip ); - return true; + return; } // only region band mode possibility left here or null/empty @@ -1109,7 +1102,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion ) if(!pCurrent) { // cannot exclude from empty, done - return true; + return; } const RegionBand* pSource = rRegion.getRegionBand(); @@ -1117,7 +1110,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion ) if(!pSource) { // excluding nothing will do no change - return true; + return; } // prepare source and target @@ -1133,7 +1126,6 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion ) } mpRegionBand = std::move(pNew); - return true; } bool vcl::Region::XOr( const vcl::Region& rRegion ) diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index b91cce41f264..9d3ad9497ccb 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -605,7 +605,7 @@ const SystemChildWindow* OpenGLContext::getChildWindow() const return m_pChildWindow; } -bool OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer ) +void OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer ) { OpenGLZone aZone; @@ -617,8 +617,6 @@ bool OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer ) OpenGLFramebuffer::Unbind(); mpCurrentFramebuffer = pFramebuffer; } - - return true; } void OpenGLContext::AcquireDefaultFramebuffer() diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index c28b6ff4cd5a..418d99a04520 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -250,7 +250,7 @@ BorderWindowHitTest ImplBorderWindowView::ImplHitTest( ImplBorderFrameData const return BorderWindowHitTest::NONE; } -bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) +void ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) { DrawButtonFlags oldCloseState = pData->mnCloseState; DrawButtonFlags oldMenuState = pData->mnMenuState; @@ -289,8 +289,6 @@ bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const Mous pData->mpBorderWindow->Invalidate( pData->maCloseRect ); if( pData->mnMenuState != oldMenuState ) pData->mpBorderWindow->Invalidate( pData->maMenuRect ); - - return true; } OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData const * pData, @@ -764,7 +762,8 @@ ImplStdBorderWindowView::~ImplStdBorderWindowView() bool ImplStdBorderWindowView::MouseMove( const MouseEvent& rMEvt ) { - return ImplMouseMove( &maFrameData, rMEvt ); + ImplMouseMove( &maFrameData, rMEvt ); + return true; } bool ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt ) diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 7135321f3a78..8a4c4c075242 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -2021,10 +2021,12 @@ static bool ImplHandleMenuEvent( vcl::Window const * pWindow, SalMenuEvent* pEve switch( nEvent ) { case SalEvent::MenuActivate: - bRet = pMenuBar->HandleMenuActivateEvent( static_cast(pEvent->mpMenu) ); + pMenuBar->HandleMenuActivateEvent( static_cast(pEvent->mpMenu) ); + bRet = true; break; case SalEvent::MenuDeactivate: - bRet = pMenuBar->HandleMenuDeActivateEvent( static_cast(pEvent->mpMenu) ); + pMenuBar->HandleMenuDeActivateEvent( static_cast(pEvent->mpMenu) ); + bRet = true; break; case SalEvent::MenuHighlight: bRet = pMenuBar->HandleMenuHighlightEvent( static_cast(pEvent->mpMenu), pEvent->mnId ); diff --git a/vcl/unx/generic/print/glyphset.cxx b/vcl/unx/generic/print/glyphset.cxx index f688cb252dc1..28b8facfced3 100644 --- a/vcl/unx/generic/print/glyphset.cxx +++ b/vcl/unx/generic/print/glyphset.cxx @@ -105,7 +105,7 @@ GlyphSet::AddNotdef (glyph_map_t &rGlyphMap) rGlyphMap[0] = 0; } -bool +void GlyphSet::AddGlyphID ( sal_GlyphId nGlyph, unsigned char* nOutGlyphID, @@ -136,8 +136,6 @@ GlyphSet::AddGlyphID ( aGlyphSet [nGlyph] = nSize; *nOutGlyphSetID = maGlyphList.size(); *nOutGlyphID = aGlyphSet [nGlyph]; - - return true; } OString diff --git a/vcl/unx/generic/print/glyphset.hxx b/vcl/unx/generic/print/glyphset.hxx index a8484bd7a5a8..ff9310523ce7 100644 --- a/vcl/unx/generic/print/glyphset.hxx +++ b/vcl/unx/generic/print/glyphset.hxx @@ -55,7 +55,7 @@ private: unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); bool LookupGlyphID (sal_GlyphId nGlyphId, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); - bool AddGlyphID (sal_GlyphId nGlyphId, + void AddGlyphID (sal_GlyphId nGlyphId, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); static void AddNotdef (glyph_map_t &rGlyphMap); diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx index 884bad2eace5..8b5cb726fdf9 100644 --- a/vcl/unx/generic/print/printerjob.cxx +++ b/vcl/unx/generic/print/printerjob.cxx @@ -833,7 +833,7 @@ void PrinterJob::writeJobPatch( osl::File* pFile, const JobData& rJobData ) } } -bool PrinterJob::writeProlog (osl::File* pFile, const JobData& rJobData ) +void PrinterJob::writeProlog (osl::File* pFile, const JobData& rJobData ) { WritePS( pFile, "%%BeginProlog\n" ); @@ -928,8 +928,6 @@ bool PrinterJob::writeProlog (osl::File* pFile, const JobData& rJobData ) "%%EndProlog\n" }; WritePS (pFile, pProlog); - - return true; } bool PrinterJob::writeSetup( osl::File* pFile, const JobData& rJob ) -- cgit v1.2.3