diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-22 15:52:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-24 07:56:01 +0100 |
commit | de8f6b25de6fbe813fe172542e7eff1596b37335 (patch) | |
tree | 4a2864c87395463391cd2ad40c4f1ada962f44e9 | |
parent | 182a3c7e12a0f56d664deaf67d17bc51eef6299d (diff) |
loplugin:unused-returns in vcl
Change-Id: I507320900a47f604d17ed7d402d531a7cbdf744e
Reviewed-on: https://gerrit.libreoffice.org/48331
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
97 files changed, 239 insertions, 385 deletions
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index bb3d243b4beb..db1bac7d4f91 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -131,10 +131,9 @@ namespace drawinglayer } // from MetafileAccessor - bool MetafilePrimitive2D::accessMetafile(GDIMetaFile& rTargetMetafile) const + void MetafilePrimitive2D::accessMetafile(GDIMetaFile& rTargetMetafile) const { rTargetMetafile = maMetaFile; - return true; } // provide unique ID diff --git a/editeng/source/editeng/editsel.cxx b/editeng/source/editeng/editsel.cxx index 02d4355306dd..73bdc4a7e414 100644 --- a/editeng/source/editeng/editsel.cxx +++ b/editeng/source/editeng/editsel.cxx @@ -44,12 +44,10 @@ void EditSelFunctionSet::DestroyAnchor() // Only with multiple selection } -bool EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool ) +void EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool ) { if ( pCurView ) - return pCurView->pImpEditView->SetCursorAtPoint( rPointPixel ); - - return false; + pCurView->pImpEditView->SetCursorAtPoint( rPointPixel ); } bool EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) diff --git a/editeng/source/editeng/editsel.hxx b/editeng/source/editeng/editsel.hxx index bc3a0310eab0..f59a9ea05880 100644 --- a/editeng/source/editeng/editsel.hxx +++ b/editeng/source/editeng/editsel.hxx @@ -37,7 +37,7 @@ public: virtual void CreateAnchor() override; virtual void DestroyAnchor() override; - virtual bool SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override; + virtual void SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override; virtual bool IsSelectionAtPoint( const Point& rPointPixel ) override; virtual void DeselectAtPoint( const Point& rPointPixel ) override; diff --git a/include/drawinglayer/primitive2d/metafileprimitive2d.hxx b/include/drawinglayer/primitive2d/metafileprimitive2d.hxx index a6d6c34338bd..62d113d034a9 100644 --- a/include/drawinglayer/primitive2d/metafileprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/metafileprimitive2d.hxx @@ -83,7 +83,7 @@ namespace drawinglayer virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; /// from MetafileAccessor - virtual bool accessMetafile(GDIMetaFile& rTargetMetafile) const override; + virtual void accessMetafile(GDIMetaFile& rTargetMetafile) const override; /// provide unique ID DeclPrimitive2DIDBlock() diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx index 06da6f412e6c..fb2eeac49707 100644 --- a/include/sfx2/sfxhelp.hxx +++ b/include/sfx2/sfxhelp.hxx @@ -34,7 +34,7 @@ class SFX2_DLLPUBLIC SfxHelp : public Help private: SAL_DLLPRIVATE static bool Start_Impl( const OUString& rURL, const vcl::Window* pWindow, const OUString& rKeyword ); - SAL_DLLPRIVATE virtual bool SearchKeyword( const OUString& rKeyWord ) override; + SAL_DLLPRIVATE virtual void SearchKeyword( const OUString& rKeyWord ) override; SAL_DLLPRIVATE virtual bool Start( const OUString& rURL, const vcl::Window* pWindow ) override; SAL_DLLPRIVATE static OUString GetHelpModuleName_Impl(const OUString &rHelpId); SAL_DLLPRIVATE static OUString CreateHelpURL_Impl( const OUString& aCommandURL, const OUString& rModuleName ); diff --git a/include/vcl/GraphicNativeTransform.hxx b/include/vcl/GraphicNativeTransform.hxx index 1ec965a2d8fd..f2f142f5ba57 100644 --- a/include/vcl/GraphicNativeTransform.hxx +++ b/include/vcl/GraphicNativeTransform.hxx @@ -34,7 +34,7 @@ public: GraphicNativeTransform(Graphic& rGraphic); ~GraphicNativeTransform(); - bool rotate(sal_uInt16 aRotation); + void rotate(sal_uInt16 aRotation); }; #endif // INCLUDED_VCL_GRAPHICNATIVETRANSFORM_HXX diff --git a/include/vcl/alpha.hxx b/include/vcl/alpha.hxx index e3fd8ee43ec5..396e437cf93f 100644 --- a/include/vcl/alpha.hxx +++ b/include/vcl/alpha.hxx @@ -57,9 +57,9 @@ public: Bitmap const & GetBitmap() const; - bool Erase( sal_uInt8 cTransparency ); + void Erase( sal_uInt8 cTransparency ); bool Replace( const Bitmap& rMask, sal_uInt8 rReplaceTransparency ); - bool Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency ); + void Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency ); BitmapReadAccess* AcquireReadAccess() { return Bitmap::AcquireReadAccess(); } BitmapWriteAccess* AcquireWriteAccess() { return Bitmap::AcquireWriteAccess(); } diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx index 1b8844f2c959..23d7e1e05a44 100644 --- a/include/vcl/animate.hxx +++ b/include/vcl/animate.hxx @@ -136,12 +136,12 @@ public: public: - bool Convert( BmpConversion eConversion ); + void Convert( BmpConversion eConversion ); bool ReduceColors( sal_uInt16 nNewColorCount ); bool Invert(); - bool Mirror( BmpMirrorFlags nMirrorFlags ); - bool Adjust( + void Mirror( BmpMirrorFlags nMirrorFlags ); + void Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent, diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index ec14ae52b59f..2f74b71dd7b3 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -263,7 +263,7 @@ public: public: - bool MakeMono( sal_uInt8 cThreshold ); + void MakeMono( sal_uInt8 cThreshold ); /** Convert bitmap format @@ -590,10 +590,8 @@ public: @param pProgress A callback for showing the progress of the vectorization - - @return true, if the operation was completed successfully. */ - bool Vectorize( + void Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, const Link<long,void>* pProgress ); diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx index a850572357e9..1857e7608314 100644 --- a/include/vcl/bitmapex.hxx +++ b/include/vcl/bitmapex.hxx @@ -147,12 +147,8 @@ public: @param bExpandTransparent Whether to expand the transparency color or not. - - @return true, if padding was performed successfully. false is - not only returned when the operation failed, but also if - nothing had to be done, e.g. because nDX and nDY were zero. */ - bool Expand( + void Expand( sal_uLong nDX, sal_uLong nDY, bool bExpandTransparent = false ); @@ -264,10 +260,8 @@ public: @param rReplaceColor Color to be placed in all changed pixel - - @return true, if the operation was completed successfully. */ - bool Replace( + void Replace( const Color& rSearchColor, const Color& rReplaceColor ); @@ -286,10 +280,8 @@ public: Tolerance value. Specifies the maximal difference between pSearchColor colors and the individual pixel values, such that the corresponding pixel is still regarded a match. - - @return true, if the operation was completed successfully. */ - bool Replace( + void Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index e696c1dc04d8..21a586718e55 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -327,12 +327,12 @@ private: void connectTimeFormatterAdjustment(const OString &id, const OUString &rAdjustment); void connectDateFormatterAdjustment(const OString &id, const OUString &rAdjustment); - bool extractGroup(const OString &id, stringmap &rVec); - bool extractModel(const OString &id, stringmap &rVec); - bool extractBuffer(const OString &id, stringmap &rVec); + void extractGroup(const OString &id, stringmap &rVec); + void extractModel(const OString &id, stringmap &rVec); + void extractBuffer(const OString &id, stringmap &rVec); static bool extractAdjustmentToMap(const OString &id, stringmap &rVec, std::vector<WidgetAdjustmentMap>& rAdjustmentMap); - bool extractButtonImage(const OString &id, stringmap &rMap, bool bRadio); - bool extractStock(const OString &id, stringmap &rMap); + void extractButtonImage(const OString &id, stringmap &rMap, bool bRadio); + void extractStock(const OString &id, stringmap &rMap); void extractMnemonicWidget(const OString &id, stringmap &rMap); void handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader); diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index af10bceef5d5..d3d792d476a3 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -119,7 +119,7 @@ public: ~ImplDockingWindowWrapper(); vcl::Window* GetWindow() { return mpDockingWindow; } - bool ImplStartDocking( const Point& rPos ); + void ImplStartDocking( const Point& rPos ); // those methods actually call the corresponding handlers void StartDocking( const Point& rPos, tools::Rectangle const & rRect ); @@ -270,7 +270,7 @@ public: bool isLayoutEnabled() const; void setOptimalLayoutSize(); - SAL_DLLPRIVATE bool ImplStartDocking( const Point& rPos ); + SAL_DLLPRIVATE void ImplStartDocking( const Point& rPos ); SAL_DLLPRIVATE bool isDeferredInit() const { return mbIsDeferredInit; } virtual void doDeferredInit(WinBits nBits); protected: diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx index df7deaf9408c..49fdef75ddef 100644 --- a/include/vcl/fixed.hxx +++ b/include/vcl/fixed.hxx @@ -174,7 +174,7 @@ public: void SetImage( const Image& rImage ); const Image& GetImage() const { return maImage; } - bool SetModeImage( const Image& rImage ); + void SetModeImage( const Image& rImage ); const Image& GetModeImage( ) const { return maImage;} virtual bool set_property(const OString &rKey, const OUString &rValue) override; diff --git a/include/vcl/gdimetafiletools.hxx b/include/vcl/gdimetafiletools.hxx index 2296ab219e22..300d183e9fdc 100644 --- a/include/vcl/gdimetafiletools.hxx +++ b/include/vcl/gdimetafiletools.hxx @@ -45,7 +45,7 @@ bool VCL_DLLPUBLIC usesClipActions(const GDIMetaFile& rSource); class VCL_DLLPUBLIC MetafileAccessor { public: - virtual bool accessMetafile(GDIMetaFile& rTargetMetafile) const = 0; + virtual void accessMetafile(GDIMetaFile& rTargetMetafile) const = 0; virtual ~MetafileAccessor(); }; diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx index 2a0baaded027..e7372e159236 100644 --- a/include/vcl/gdimtf.hxx +++ b/include/vcl/gdimtf.hxx @@ -108,7 +108,7 @@ public: bool operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); } void Clear(); - bool Mirror( BmpMirrorFlags nMirrorFlags ); + void Mirror( BmpMirrorFlags nMirrorFlags ); void Move( long nX, long nY ); // additional Move method getting specifics how to handle MapMode( MapUnit::MapPixel ) void Move( long nX, long nY, long nDPIX, long nDPIY ); diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx index 00e46ebb5663..ee51fe40014f 100644 --- a/include/vcl/help.hxx +++ b/include/vcl/help.hxx @@ -63,7 +63,7 @@ public: virtual ~Help(); virtual bool Start( const OUString& rHelpId, const vcl::Window* pWindow ); - virtual bool SearchKeyword( const OUString& rKeyWord ); + virtual void SearchKeyword( const OUString& rKeyWord ); virtual OUString GetHelpText( const OUString& aHelpURL, const vcl::Window* pWindow ); static void EnableContextHelp(); diff --git a/include/vcl/jobdata.hxx b/include/vcl/jobdata.hxx index 65a050f80423..28d1115c9fc8 100644 --- a/include/vcl/jobdata.hxx +++ b/include/vcl/jobdata.hxx @@ -68,8 +68,8 @@ struct VCL_DLLPUBLIC JobData JobData( const JobData& rData ) { *this = rData; } void setCollate( bool bCollate ); - bool setPaper( int nWidth, int nHeight ); // dimensions in pt - bool setPaperBin( int nPaperBin ); + void setPaper( int nWidth, int nHeight ); // dimensions in pt + void setPaperBin( int nPaperBin ); void resolveDefaultBackend(); void setDefaultBackend(bool bUsePDF); diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index d973704f8802..d73fa7166ce2 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -607,7 +607,7 @@ public: { return m_eMode; } - bool set_property(const OString &rKey, const OUString &rValue); + void set_property(const OString &rKey, const OUString &rValue); }; class VCL_DLLPUBLIC MessageDialog : public Dialog diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 428484d0859c..3ada2762fb6a 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -352,7 +352,7 @@ public: // returns the system's menu handle if native menus are supported // pData must point to a SystemMenuData structure - bool GetSystemMenuData( SystemMenuData* pData ) const; + void GetSystemMenuData( SystemMenuData* pData ) const; // accessibility helpers diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 947384badda8..62a526a09a80 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -83,7 +83,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 ); - bool AcquireDefaultFramebuffer(); + void AcquireDefaultFramebuffer(); OpenGLFramebuffer* AcquireFramebuffer( const OpenGLTexture& rTexture ); static void ReleaseFramebuffer( OpenGLFramebuffer* pFramebuffer ); void UnbindTextureFromFramebuffers( GLuint nTexture ); @@ -153,7 +153,7 @@ public: virtual SystemWindowData generateWinData(vcl::Window* pParent, bool bRequestLegacyContext); private: - virtual bool initWindow(); + virtual void initWindow(); virtual void destroyCurrentContext(); virtual void adjustToNewSize(); diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index a22f8a12a811..f9377bb655d2 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1152,7 +1152,7 @@ public: vcl::TextLayoutCache const* = nullptr, SalLayout const*const pLayoutCache = nullptr) const; - bool GetCaretPositions( const OUString&, long* pCaretXArray, + void GetCaretPositions( const OUString&, long* pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen ) const; void DrawStretchText( const Point& rStartPt, sal_uLong nWidth, const OUString& rStr, @@ -1512,7 +1512,7 @@ private: Size& aOutSz, Point& aOutPt); - SAL_DLLPRIVATE bool BlendBitmap( + SAL_DLLPRIVATE void BlendBitmap( const SalTwoRect& rPosAry, const Bitmap& rBmp ); diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index 9ff7e4e46ae3..302d98fc85b0 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -1103,13 +1103,8 @@ The following structure describes the permissions used in PDF security @param nElement the id of the new current structure element - - @returns - True if the current structure element could be set successfully - False if the current structure element could not be changed - (e.g. if the passed element id is invalid) */ - bool SetCurrentStructureElement( sal_Int32 nElement ); + void SetCurrentStructureElement( sal_Int32 nElement ); /** set a structure attribute on the current structural element @@ -1123,12 +1118,8 @@ The following structure describes the permissions used in PDF security @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( enum StructAttribute eAttr, enum StructAttributeValue eVal ); + void SetStructureAttribute( enum StructAttribute eAttr, enum StructAttributeValue eVal ); /** set a structure attribute on the current structural element SetStructureAttributeNumerical sets an attribute of the current structural element @@ -1141,12 +1132,8 @@ The following structure describes the permissions used in PDF security @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( enum StructAttribute eAttr, sal_Int32 nValue ); + void SetStructureAttributeNumerical( enum 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/print.hxx b/include/vcl/print.hxx index eb81145ca440..ac15f1de4d0b 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -170,9 +170,8 @@ public: parameter decides whether the set for print "to printer" or "to file" should be read. - @return True if config was read, false if an error occurred */ - bool ReadFromConfig( bool bFile ); + void ReadFromConfig( bool bFile ); }; @@ -221,7 +220,7 @@ private: ImplSalPrinterErrorCodeToVCL( SalPrinterError nError ); private: - SAL_DLLPRIVATE bool EndJob(); + SAL_DLLPRIVATE void EndJob(); Printer( const Printer& rPrinter ) = delete; Printer& operator =( const Printer& rPrinter ) = delete; @@ -308,11 +307,11 @@ public: bool SetOrientation( Orientation eOrient ); Orientation GetOrientation() const; - bool SetDuplexMode( DuplexMode ); + void SetDuplexMode( DuplexMode ); bool SetPaperBin( sal_uInt16 nPaperBin ); sal_uInt16 GetPaperBin() const; - bool SetPaper( Paper ePaper ); + void SetPaper( Paper ePaper ); bool SetPaperSizeUser( const Size& rSize ); bool SetPaperSizeUser( const Size& rSize, bool bMatchNearest ); Paper GetPaper() const; @@ -337,7 +336,7 @@ public: const Point& GetPageOffsetPixel() const { return maPageOffset; } Point GetPageOffset() const { return PixelToLogic( maPageOffset ); } - bool SetCopyCount( sal_uInt16 nCopy, bool bCollate ); + void SetCopyCount( sal_uInt16 nCopy, bool bCollate ); sal_uInt16 GetCopyCount() const { return mnCopyCount; } bool IsCollateCopy() const { return mbCollateCopy; } @@ -559,7 +558,7 @@ public: SAL_DLLPRIVATE void pushPropertiesToPrinter(); SAL_DLLPRIVATE void resetPaperToLastConfigured(); VCL_PLUGIN_PUBLIC void setJobState( css::view::PrintableState ); - SAL_DLLPRIVATE bool setupPrinter( vcl::Window* i_pDlgParent ); + SAL_DLLPRIVATE void setupPrinter( vcl::Window* i_pDlgParent ); SAL_DLLPRIVATE int getPageCountProtected() const; SAL_DLLPRIVATE css::uno::Sequence< css::beans::PropertyValue > diff --git a/include/vcl/seleng.hxx b/include/vcl/seleng.hxx index 69b58e94a142..e3642330276d 100644 --- a/include/vcl/seleng.hxx +++ b/include/vcl/seleng.hxx @@ -49,7 +49,7 @@ public: // move cursor, at the same time match cursor position to the selection // starting at anchor. true == Ok - virtual bool SetCursorAtPoint( const Point& rPointPixel, + virtual void SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) = 0; virtual bool IsSelectionAtPoint( const Point& rPointPixel ) = 0; diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx index 7d642ee7e116..671054b8401f 100644 --- a/include/vcl/texteng.hxx +++ b/include/vcl/texteng.hxx @@ -284,7 +284,7 @@ public: bool Read( SvStream& rInput, const TextSelection* pSel = nullptr ); - bool Write( SvStream& rOutput ); + void Write( SvStream& rOutput ); TextPaM GetPaM( const Point& rDocPos ); tools::Rectangle PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial = false ); diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx index 545b1ba9030f..d34b53bba927 100644 --- a/include/vcl/textview.hxx +++ b/include/vcl/textview.hxx @@ -170,7 +170,7 @@ public: void Undo(); void Redo(); - bool Read( SvStream& rInput ); + void Read( SvStream& rInput ); void SetStartDocPos( const Point& rPos ); const Point& GetStartDocPos() const; @@ -224,7 +224,7 @@ public: */ sal_Int32 GetLineNumberOfCursorInSelection() const; - bool MatchGroup(); + void MatchGroup(); bool Search( const i18nutil::SearchOptions& rSearchOptions, bool bForward ); sal_uInt16 Replace( const i18nutil::SearchOptions& rSearchOptions, bool bAll, bool bForward ); diff --git a/include/vcl/wrkwin.hxx b/include/vcl/wrkwin.hxx index 3d2c22840f44..e062a6c48090 100644 --- a/include/vcl/wrkwin.hxx +++ b/include/vcl/wrkwin.hxx @@ -93,7 +93,7 @@ public: bool IsMinimized() const; - bool SetPluginParent( SystemParentData* pParent ); + void SetPluginParent( SystemParentData* pParent ); void Minimize(); void Restore(); diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx index b78538ca4592..0a2f37003956 100644 --- a/sc/source/ui/inc/select.hxx +++ b/sc/source/ui/inc/select.hxx @@ -65,7 +65,7 @@ public: virtual void BeginDrag() override; virtual void CreateAnchor() override; virtual void DestroyAnchor() override; - virtual bool SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override; + virtual void SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override; virtual bool IsSelectionAtPoint( const Point& rPointPixel ) override; virtual void DeselectAtPoint( const Point& rPointPixel ) override; virtual void DeselectAll() override; @@ -92,7 +92,7 @@ public: virtual void BeginDrag() override; virtual void CreateAnchor() override; virtual void DestroyAnchor() override; - virtual bool SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override; + virtual void SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override; virtual bool IsSelectionAtPoint( const Point& rPointPixel ) override; virtual void DeselectAtPoint( const Point& rPointPixel ) override; virtual void DeselectAll() override; diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index 34edfe50b2c7..a7da3ed68196 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -286,12 +286,12 @@ void ScViewFunctionSet::SetAnchorFlag( bool bSet ) bAnchor = bSet; } -bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDontSelectAtCursor */ ) +void ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDontSelectAtCursor */ ) { if ( bDidSwitch ) { if ( rPointPixel == aSwitchPos ) - return false; // don't scroll in wrong window + return; // don't scroll in wrong window else bDidSwitch = false; } @@ -400,7 +400,7 @@ bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDon } pViewData->ResetOldCursor(); - return SetCursorAtCell( nPosX, nPosY, bScroll ); + SetCursorAtCell( nPosX, nPosY, bScroll ); } bool ScViewFunctionSet::SetCursorAtCell( SCCOL nPosX, SCROW nPosY, bool bScroll ) @@ -810,13 +810,13 @@ void ScHeaderFunctionSet::DestroyAnchor() bAnchor = false; } -bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDontSelectAtCursor */ ) +void ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDontSelectAtCursor */ ) { if ( bDidSwitch ) { // next valid position has to be originated from another window if ( rPointPixel == aSwitchPos ) - return false; // don't scroll in the wrong window + return; // don't scroll in the wrong window else bDidSwitch = false; } @@ -873,7 +873,7 @@ bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bD { aSwitchPos = rPointPixel; bDidSwitch = true; - return false; // do not crunch with wrong positions + return; // do not crunch with wrong positions } SCCOL nPosX; @@ -917,8 +917,6 @@ bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bD if (bHide) pView->ShowAllCursors(); - - return true; } bool ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index f90e2e7d0a6b..971e6f6e263d 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -623,9 +623,9 @@ OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const vcl::Window* p return sHelpText; } -bool SfxHelp::SearchKeyword( const OUString& rKeyword ) +void SfxHelp::SearchKeyword( const OUString& rKeyword ) { - return Start_Impl( OUString(), nullptr, rKeyword ); + Start_Impl( OUString(), nullptr, rKeyword ); } bool SfxHelp::Start( const OUString& rURL, const vcl::Window* pWindow ) diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 8f4e6b0fe443..88f6dc6d691e 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2611,7 +2611,7 @@ void ImpLBSelEng::DestroyAnchor() pImp->pAnchor = nullptr; } -bool ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor) +void ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor) { SvTreeListEntry* pNewCursor = pImp->MakePointVisible( rPoint ); if( pNewCursor != pImp->pCursor ) @@ -2624,9 +2624,7 @@ bool ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor //if( !bDontSelectAtCursor && !pImp->bSimpleTravel ) // pImp->SelectEntry( pNewCursor, true ); pImp->SetCursor( pNewCursor, bDontSelectAtCursor ); - return true; } - return false; } bool ImpLBSelEng::IsSelectionAtPoint( const Point& rPoint ) diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 5b69e16c479f..28fa2ed4b427 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -54,7 +54,7 @@ public: void BeginDrag() override; void CreateAnchor() override; void DestroyAnchor() override; - bool SetCursorAtPoint( const Point& rPoint, + void SetCursorAtPoint( const Point& rPoint, bool bDontSelectAtCursor=false ) override; bool IsSelectionAtPoint( const Point& rPoint ) override; void DeselectAtPoint( const Point& rPoint ) override; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 837e3f61aec9..45d5b3bb5265 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -2451,9 +2451,8 @@ namespace svt { namespace table } - bool TableFunctionSet::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor) + void TableFunctionSet::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor) { - bool bHandled = false; // newRow is the row which includes the point, getCurRow() is the last selected row, before the mouse click RowPos newRow = m_pTableControl->getRowAtPoint( rPoint ); if ( newRow == ROW_COL_HEADERS ) @@ -2464,13 +2463,12 @@ namespace svt { namespace table newCol = m_pTableControl->getLeftColumn(); if ( ( newRow == ROW_INVALID ) || ( newCol == COL_INVALID ) ) - return false; + return; if ( bDontSelectAtCursor ) { if ( m_pTableControl->getSelectedRowCount() > 1 ) m_pTableControl->getSelEngine()->AddAlways(true); - bHandled = true; } else if ( m_pTableControl->getAnchor() == m_pTableControl->getCurRow() ) { @@ -2496,7 +2494,6 @@ namespace svt { namespace table m_pTableControl->setAnchor( m_pTableControl->getAnchor() - 1 ); } m_pTableControl->invalidateSelectedRegion( m_pTableControl->getCurRow(), newRow ); - bHandled = true; } //no region selected else @@ -2519,10 +2516,8 @@ namespace svt { namespace table m_pTableControl->getSelEngine()->AddAlways(true); m_pTableControl->invalidateRow( newRow ); - bHandled = true; } m_pTableControl->goTo( newCol, newRow ); - return bHandled; } bool TableFunctionSet::IsSelectionAtPoint( const Point& rPoint ) diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 4a0c5a78974f..a679bf646b46 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -465,7 +465,7 @@ namespace svt { namespace table virtual void BeginDrag() override; virtual void CreateAnchor() override; virtual void DestroyAnchor() override; - virtual bool SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor = false) override; + virtual void SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor = false) override; virtual bool IsSelectionAtPoint( const Point& rPoint ) override; virtual void DeselectAtPoint( const Point& rPoint ) override; virtual void DeselectAll() override; diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx index 0ba815998d8f..7fee229c2c9d 100644 --- a/vcl/headless/svpbmp.cxx +++ b/vcl/headless/svpbmp.cxx @@ -166,11 +166,10 @@ BitmapBuffer* ImplCreateDIB( return pDIB; } -bool SvpSalBitmap::Create(BitmapBuffer *pBuf) +void SvpSalBitmap::Create(BitmapBuffer *pBuf) { Destroy(); mpDIB = pBuf; - return mpDIB != nullptr; } bool SvpSalBitmap::Create(const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal) diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx index 6705361d6ddb..7973061eafd8 100644 --- a/vcl/inc/fontsubset.hxx +++ b/vcl/inc/fontsubset.hxx @@ -50,9 +50,9 @@ public: explicit FontSubsetInfo(); ~FontSubsetInfo(); - bool LoadFont( FontType eInFontType, + void LoadFont( FontType eInFontType, const unsigned char* pFontBytes, int nByteLength ); - bool LoadFont( vcl::TrueTypeFont* pSftTrueTypeFont ); + void LoadFont( vcl::TrueTypeFont* pSftTrueTypeFont ); bool CreateFontSubset( FontType nOutFontTypeMask, FILE* pOutFile, const char* pOutFontName, diff --git a/vcl/inc/headless/svpbmp.hxx b/vcl/inc/headless/svpbmp.hxx index efdd2c2bb2af..da73555d096c 100644 --- a/vcl/inc/headless/svpbmp.hxx +++ b/vcl/inc/headless/svpbmp.hxx @@ -44,7 +44,7 @@ public: virtual bool Create( const css::uno::Reference< css::rendering::XBitmapCanvas >& rBitmapCanvas, Size& rSize, bool bMask = false ) override; - bool Create(BitmapBuffer *pBuf); + void Create(BitmapBuffer *pBuf); const BitmapBuffer* GetBuffer() const { return mpDIB; diff --git a/vcl/inc/impbmp.hxx b/vcl/inc/impbmp.hxx index 9465771332e8..3cb532bc9cfb 100644 --- a/vcl/inc/impbmp.hxx +++ b/vcl/inc/impbmp.hxx @@ -53,7 +53,7 @@ public: SalBitmap* ImplGetSalBitmap() const { return mpSalBitmap.get(); } - bool ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ); + void ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ); bool ImplCreate( const ImpBitmap& rImpBitmap ); bool ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics ); bool ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount ); diff --git a/vcl/inc/opengl/RenderList.hxx b/vcl/inc/opengl/RenderList.hxx index 21c8ef30f85b..c356def2ff93 100644 --- a/vcl/inc/opengl/RenderList.hxx +++ b/vcl/inc/opengl/RenderList.hxx @@ -150,7 +150,7 @@ public: return maRenderEntries; } - bool addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, SalColor nColor, const SalTwoRect& r2Rect); + void addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, SalColor nColor, const SalTwoRect& r2Rect); void addDrawPixel(long nX, long nY, SalColor nColor); diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx index 9d6340cebf11..95d1c0e762d8 100644 --- a/vcl/inc/opengl/program.hxx +++ b/vcl/inc/opengl/program.hxx @@ -70,7 +70,7 @@ public: bool Load( const OUString& rVertexShader, const OUString& rFragmentShader, const rtl::OString& preamble, const rtl::OString& rDigest ); - bool Use(); + void Use(); void Reuse(); bool Clean(); @@ -102,7 +102,7 @@ public: void ApplyMatrix(float fWidth, float fHeight, float fPixelOffset = 0.0f); - bool DrawTexture( const OpenGLTexture& rTexture ); + void DrawTexture( const OpenGLTexture& rTexture ); void DrawArrays(GLenum aMode, std::vector<GLfloat>& aVertices); void DrawElements(GLenum aMode, GLuint nNumberOfVertices); diff --git a/vcl/inc/opengl/salbmp.hxx b/vcl/inc/opengl/salbmp.hxx index 5c4fcd053464..f44176c24e80 100644 --- a/vcl/inc/opengl/salbmp.hxx +++ b/vcl/inc/opengl/salbmp.hxx @@ -101,7 +101,7 @@ private: public: - bool ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ); + void ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ); }; #endif // INCLUDED_VCL_INC_OPENGL_SALBMP_H diff --git a/vcl/inc/opengl/texture.hxx b/vcl/inc/opengl/texture.hxx index 35db94236556..7c3ea9a65c8e 100644 --- a/vcl/inc/opengl/texture.hxx +++ b/vcl/inc/opengl/texture.hxx @@ -52,7 +52,7 @@ public: void IncreaseRefCount(int nSlotNumber); void DecreaseRefCount(int nSlotNumber); - bool InitializeSlotMechanism(int nInitialSlotSize); + void InitializeSlotMechanism(int nInitialSlotSize); void SetSlotDeallocateCallback(std::function<void(int)> aCallback) { @@ -76,7 +76,7 @@ private: std::shared_ptr<ImplOpenGLTexture> mpImpl; int mnSlotNumber; - inline bool GetTextureRect(const SalTwoRect& rPosAry, bool bInverted, GLfloat& x1, GLfloat& x2, GLfloat& y1, GLfloat& y2) const; + inline void GetTextureRect(const SalTwoRect& rPosAry, bool bInverted, GLfloat& x1, GLfloat& x2, GLfloat& y1, GLfloat& y2) const; bool IsValid() const { diff --git a/vcl/inc/opengl/x11/gdiimpl.hxx b/vcl/inc/opengl/x11/gdiimpl.hxx index 5df1a618d94a..2e136129303e 100644 --- a/vcl/inc/opengl/x11/gdiimpl.hxx +++ b/vcl/inc/opengl/x11/gdiimpl.hxx @@ -40,7 +40,7 @@ public: virtual void Init() override; - bool FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) override; + void FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) override; bool RenderPixmapToScreen(X11Pixmap* pPixmap, X11Pixmap* pMask, int nX, int nY) override; bool RenderAndCacheNativeControl(X11Pixmap* pPixmap, X11Pixmap* pMask, int nX, int nY, diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx index aa55b970e64c..97f2d3bec9b2 100644 --- a/vcl/inc/openglgdiimpl.hxx +++ b/vcl/inc/openglgdiimpl.hxx @@ -107,7 +107,7 @@ protected: void ImplInitClipRegion(); void ImplSetClipBit( const vcl::Region& rClip, GLuint nMask ); void ImplDrawLineAA( double nX1, double nY1, double nX2, double nY2, bool edge ); - bool CheckOffscreenTexture(); + void CheckOffscreenTexture(); void ApplyProgramMatrices(float fPixelOffset = 0.0); @@ -116,9 +116,9 @@ public: bool UseSolid( SalColor nColor, sal_uInt8 nTransparency ); bool UseSolid( SalColor nColor, double fTransparency ); bool UseSolid( SalColor nColor ); - bool UseSolid(); + void UseSolid(); bool UseLine(SalColor nColor, double fTransparency, GLfloat fLineWidth, bool bUseAA); - bool UseLine(GLfloat fLineWidth, bool bUseAA); + void UseLine(GLfloat fLineWidth, bool bUseAA); bool UseInvert50(); bool UseInvert(SalInvert nFlags); @@ -145,7 +145,7 @@ public: void DeferredTextDraw(OpenGLTexture const & rTexture, const SalColor nMaskColor, const SalTwoRect& rPosAry); void FlushDeferredDrawing(); - bool FlushLinesOrTriangles(DrawShaderType eType, RenderParameters const & rParameters); + void FlushLinesOrTriangles(DrawShaderType eType, RenderParameters const & rParameters); public: // get the width of the device diff --git a/vcl/inc/salusereventlist.hxx b/vcl/inc/salusereventlist.hxx index 92aaada771b3..1222b8751807 100644 --- a/vcl/inc/salusereventlist.hxx +++ b/vcl/inc/salusereventlist.hxx @@ -87,7 +87,7 @@ public: inline bool isFrameAlive( const SalFrame* pFrame ) const; void PostEvent( SalFrame* pFrame, void* pData, SalEvent nEvent ); - bool RemoveEvent( SalFrame* pFrame, void* pData, SalEvent nEvent ); + void RemoveEvent( SalFrame* pFrame, void* pData, SalEvent nEvent ); inline bool HasUserEvents() const; bool DispatchUserEvents( bool bHandleAllCurrentEvents ); diff --git a/vcl/inc/unx/cairotextrender.hxx b/vcl/inc/unx/cairotextrender.hxx index 5cc641a945d8..2ee28bdb3837 100644 --- a/vcl/inc/unx/cairotextrender.hxx +++ b/vcl/inc/unx/cairotextrender.hxx @@ -42,7 +42,7 @@ protected: virtual void getSurfaceOffset(double& nDX, double& nDY) = 0; virtual void releaseCairoContext(cairo_t* cr) = 0; - bool setFont( const FontSelectPattern *pEntry, int nFallbackLevel ); + void setFont( const FontSelectPattern *pEntry, int nFallbackLevel ); virtual void clipRegion(cairo_t* cr) = 0; diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index 31440f0f3655..d612ef64a151 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -185,7 +185,7 @@ public: virtual void TriggerAllUserEventsProcessed() override; #if !GTK_CHECK_VERSION(3,0,0) - virtual bool Dispatch( XEvent *pEvent ) override; + virtual void Dispatch( XEvent *pEvent ) override; #endif #if GTK_CHECK_VERSION(3,0,0) void RefreshMenusUnity(); diff --git a/vcl/inc/unx/printerjob.hxx b/vcl/inc/unx/printerjob.hxx index d1de1f02f1c3..937c59fe00f0 100644 --- a/vcl/inc/unx/printerjob.hxx +++ b/vcl/inc/unx/printerjob.hxx @@ -119,7 +119,7 @@ public: bool EndJob (); void StartPage (const JobData& rJobSetup); - bool EndPage (); + void EndPage (); }; } // namespace psp diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index 259af28e63a8..e91efe244b44 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -291,7 +291,7 @@ protected: mutable Time m_nLastUserEventTime; // mutable because changed on first access - virtual bool Dispatch( XEvent *pEvent ) = 0; + virtual void Dispatch( XEvent *pEvent ) = 0; void InitXinerama(); void InitRandR( ::Window aRoot ) const; void DeInitRandR(); @@ -389,7 +389,7 @@ public: SalX11Display( Display* pDisp ); virtual ~SalX11Display() override; - virtual bool Dispatch( XEvent *pEvent ) override; + virtual void Dispatch( XEvent *pEvent ) override; virtual void Yield(); virtual void TriggerUserEventProcessing() override; diff --git a/vcl/inc/unx/x11/x11gdiimpl.h b/vcl/inc/unx/x11/x11gdiimpl.h index 76636a75694d..3c33c5415eef 100644 --- a/vcl/inc/unx/x11/x11gdiimpl.h +++ b/vcl/inc/unx/x11/x11gdiimpl.h @@ -20,7 +20,7 @@ class X11GraphicsImpl public: virtual ~X11GraphicsImpl() {}; - virtual bool FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) = 0; + virtual void FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) = 0; virtual bool RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixmap* pMask, int nX, int nY ) = 0; virtual bool TryRenderCachedNativeControl(ControlCacheKey& rControlCacheKey, int nX, int nY) = 0; diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx index 1b15e78e26ef..9a9924768a5a 100644 --- a/vcl/opengl/RenderList.cxx +++ b/vcl/opengl/RenderList.cxx @@ -348,10 +348,10 @@ void RenderList::addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, } } -bool RenderList::addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, SalColor nColor, const SalTwoRect& r2Rect) +void RenderList::addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, SalColor nColor, const SalTwoRect& r2Rect) { if (!rTexture) - return false; + return; GLfloat fX1 = r2Rect.mnDestX; GLfloat fY1 = r2Rect.mnDestY; @@ -369,8 +369,6 @@ bool RenderList::addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, Sal vcl::vertex::addRectangle<GL_TRIANGLES>(rTextureParameter.maVertices, fX1, fY1, fX2, fY2); vcl::vertex::addQuadColors<GL_TRIANGLES>(rTextureParameter.maColors, nColor, 0.0f); - - return true; } void RenderList::addDrawPolyLine(const basegfx::B2DPolygon& rPolygon, double fTransparency, diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index db8117193e38..359c4da67957 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -514,7 +514,7 @@ void OpenGLSalGraphicsImpl::SetROPFillColor(SalROPColor nROPColor) } } -bool OpenGLSalGraphicsImpl::CheckOffscreenTexture() +void OpenGLSalGraphicsImpl::CheckOffscreenTexture() { bool bClearTexture = false; @@ -578,7 +578,6 @@ bool OpenGLSalGraphicsImpl::CheckOffscreenTexture() assert( maOffscreenTex ); CHECK_GL_ERROR(); - return true; } bool OpenGLSalGraphicsImpl::UseProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const OString& preamble ) @@ -621,12 +620,11 @@ bool OpenGLSalGraphicsImpl::UseSolid( SalColor nColor, double fTransparency ) return true; } -bool OpenGLSalGraphicsImpl::UseSolid() +void OpenGLSalGraphicsImpl::UseSolid() { if (!UseProgram("combinedVertexShader", "combinedFragmentShader")) - return false; + return; mpProgram->SetShaderType(DrawShaderType::Normal); - return true; } bool OpenGLSalGraphicsImpl::UseInvert50() @@ -699,10 +697,10 @@ bool OpenGLSalGraphicsImpl::UseLine(SalColor nColor, double fTransparency, GLflo return true; } -bool OpenGLSalGraphicsImpl::UseLine(GLfloat fLineWidth, bool bUseAA) +void OpenGLSalGraphicsImpl::UseLine(GLfloat fLineWidth, bool bUseAA) { if (!UseProgram("combinedVertexShader", "combinedFragmentShader")) - return false; + return; mpProgram->SetShaderType(DrawShaderType::Line); mpProgram->SetUniform1f("line_width", fLineWidth); // The width of the feather - area we make lineary transparent in VS. @@ -710,7 +708,6 @@ bool OpenGLSalGraphicsImpl::UseLine(GLfloat fLineWidth, bool bUseAA) mpProgram->SetUniform1f("feather", bUseAA ? 0.5f : 0.0f); // We need blending or AA won't work correctly mpProgram->SetBlendMode(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - return true; } void OpenGLSalGraphicsImpl::DrawConvexPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, bool blockAA ) @@ -1322,10 +1319,10 @@ void OpenGLSalGraphicsImpl::DeferredTextDraw(OpenGLTexture const & rTexture, Sal PostBatchDraw(); } -bool OpenGLSalGraphicsImpl::FlushLinesOrTriangles(DrawShaderType eType, RenderParameters const & rParameters) +void OpenGLSalGraphicsImpl::FlushLinesOrTriangles(DrawShaderType eType, RenderParameters const & rParameters) { if (!UseProgram("combinedVertexShader", "combinedFragmentShader", "#define USE_VERTEX_COLORS")) - return false; + return; mpProgram->SetShaderType(eType); mpProgram->SetBlendMode(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -1355,7 +1352,6 @@ bool OpenGLSalGraphicsImpl::FlushLinesOrTriangles(DrawShaderType eType, RenderPa CHECK_GL_ERROR(); mpProgram->Clean(); - return true; } void OpenGLSalGraphicsImpl::FlushDeferredDrawing() diff --git a/vcl/opengl/program.cxx b/vcl/opengl/program.cxx index 6c3a03df14b4..ba5c2523344d 100644 --- a/vcl/opengl/program.cxx +++ b/vcl/opengl/program.cxx @@ -57,15 +57,14 @@ void OpenGLProgram::Reuse() mbBlending = false; } -bool OpenGLProgram::Use() +void OpenGLProgram::Use() { if (!mnId) - return false; + return; glUseProgram(mnId); CHECK_GL_ERROR(); Reuse(); - return true; } bool OpenGLProgram::Clean() @@ -362,10 +361,10 @@ void OpenGLProgram::SetBlendMode(GLenum nSFactor, GLenum nDFactor) mbBlending = true; } -bool OpenGLProgram::DrawTexture( const OpenGLTexture& rTexture ) +void OpenGLProgram::DrawTexture( const OpenGLTexture& rTexture ) { if (!rTexture) - return false; + return; float fWidth = rTexture.GetWidth(); float fHeight = rTexture.GetHeight(); @@ -388,8 +387,6 @@ bool OpenGLProgram::DrawTexture( const OpenGLTexture& rTexture ) ApplyMatrix(fWidth, fHeight); DrawArrays(GL_TRIANGLE_FAN, aPosition); CHECK_GL_ERROR(); - - return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx index 6da1526e7c01..433ad19f2e8b 100644 --- a/vcl/opengl/scale.cxx +++ b/vcl/opengl/scale.cxx @@ -327,7 +327,7 @@ bool OpenGLSalBitmap::ImplScaleArea( const rtl::Reference< OpenGLContext > &xCon return true; } -bool OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) +void OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) { VCL_GL_INFO( "::ImplScale" ); @@ -344,31 +344,30 @@ bool OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, B if( nScaleFlag == BmpScaleFlag::Fast ) { - return ImplScaleFilter( xContext, rScaleX, rScaleY, GL_NEAREST ); + ImplScaleFilter( xContext, rScaleX, rScaleY, GL_NEAREST ); } if( nScaleFlag == BmpScaleFlag::BiLinear ) { - return ImplScaleFilter( xContext, rScaleX, rScaleY, GL_LINEAR ); + ImplScaleFilter( xContext, rScaleX, rScaleY, GL_LINEAR ); } else if( nScaleFlag == BmpScaleFlag::Default ) { const Lanczos3Kernel aKernel; - return ImplScaleConvolution( xContext, rScaleX, rScaleY, aKernel ); + ImplScaleConvolution( xContext, rScaleX, rScaleY, aKernel ); } else if( nScaleFlag == BmpScaleFlag::BestQuality && rScaleX <= 1 && rScaleY <= 1 ) { // Use are scaling for best quality, but only if downscaling. - return ImplScaleArea( xContext, rScaleX, rScaleY ); + ImplScaleArea( xContext, rScaleX, rScaleY ); } else if( nScaleFlag == BmpScaleFlag::Lanczos || nScaleFlag == BmpScaleFlag::BestQuality ) { const Lanczos3Kernel aKernel; - return ImplScaleConvolution( xContext, rScaleX, rScaleY, aKernel ); + ImplScaleConvolution( xContext, rScaleX, rScaleY, aKernel ); } - - SAL_WARN( "vcl.opengl", "Invalid flag for scaling operation" ); - return false; + else + SAL_WARN( "vcl.opengl", "Invalid flag for scaling operation" ); } bool OpenGLSalBitmap::ScalingSupported() const diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx index bed1171e5604..c26017e79118 100644 --- a/vcl/opengl/texture.cxx +++ b/vcl/opengl/texture.cxx @@ -211,13 +211,12 @@ bool ImplOpenGLTexture::InsertBuffer(int nX, int nY, int nWidth, int nHeight, in return true; } -bool ImplOpenGLTexture::InitializeSlotMechanism(int nInitialSlotSize) +void ImplOpenGLTexture::InitializeSlotMechanism(int nInitialSlotSize) { if (mpSlotReferences) - return false; + return; mpSlotReferences.reset(new std::vector<int>(nInitialSlotSize, 0)); - return true; } void ImplOpenGLTexture::IncreaseRefCount(int nSlotNumber) @@ -380,7 +379,7 @@ void OpenGLTexture::GetCoord( GLfloat* pCoord, const SalTwoRect& rPosAry, bool b } } -bool OpenGLTexture::GetTextureRect(const SalTwoRect& rPosAry, bool bInverted, GLfloat& x1, GLfloat& x2, GLfloat& y1, GLfloat& y2) const +void OpenGLTexture::GetTextureRect(const SalTwoRect& rPosAry, bool bInverted, GLfloat& x1, GLfloat& x2, GLfloat& y1, GLfloat& y2) const { if (IsValid()) { @@ -400,9 +399,7 @@ bool OpenGLTexture::GetTextureRect(const SalTwoRect& rPosAry, bool bInverted, GL y1 = 1.0f - (maRect.Top() + rPosAry.mnSrcY) / fTextureHeight; y2 = 1.0f - (maRect.Top() + rPosAry.mnSrcY + rPosAry.mnSrcHeight) / fTextureHeight; } - return true; } - return false; } template <> diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx index 8329fbd83b5b..86e5bd4b958a 100644 --- a/vcl/opengl/win/gdiimpl.cxx +++ b/vcl/opengl/win/gdiimpl.cxx @@ -43,7 +43,7 @@ class WinOpenGLContext : public OpenGLContext { public: bool init( HDC hDC, HWND hWnd ); - virtual bool initWindow() override; + virtual void initWindow() override; private: GLWinWindow m_aGLWin; virtual const GLWindow& getOpenGLWindow() const override { return m_aGLWin; } @@ -133,7 +133,7 @@ bool WinOpenGLContext::init(HDC hDC, HWND hWnd) return ImplInit(); } -bool WinOpenGLContext::initWindow() +void WinOpenGLContext::initWindow() { if( !m_pChildWindow ) { @@ -149,7 +149,6 @@ bool WinOpenGLContext::initWindow() } m_aGLWin.hDC = GetDC(m_aGLWin.hWnd); - return true; } void WinOpenGLContext::destroyCurrentContext() diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx index dc9ad168e4e8..2e8fffe7c0f6 100644 --- a/vcl/opengl/x11/gdiimpl.cxx +++ b/vcl/opengl/x11/gdiimpl.cxx @@ -39,8 +39,8 @@ static bool g_bAnyCurrent; class X11OpenGLContext : public OpenGLContext { public: - bool init(Display* dpy, Window win, int screen); - virtual bool initWindow() override; + void init(Display* dpy, Window win, int screen); + virtual void initWindow() override; private: GLX11Window m_aGLWin; virtual const GLWindow& getOpenGLWindow() const override { return m_aGLWin; } @@ -450,13 +450,13 @@ void X11OpenGLContext::destroyCurrentContext() } } -bool X11OpenGLContext::init(Display* dpy, Window win, int screen) +void X11OpenGLContext::init(Display* dpy, Window win, int screen) { if (isInitialized()) - return true; + return; if (!dpy) - return false; + return; OpenGLZone aZone; @@ -468,7 +468,7 @@ bool X11OpenGLContext::init(Display* dpy, Window win, int screen) initGLWindow(pVisual); - return ImplInit(); + ImplInit(); } void X11OpenGLContext::initGLWindow(Visual* pVisual) @@ -498,7 +498,7 @@ void X11OpenGLContext::initGLWindow(Visual* pVisual) SAL_INFO("vcl.opengl", "available GLX extensions: " << m_aGLWin.GLXExtensions); } -bool X11OpenGLContext::initWindow() +void X11OpenGLContext::initWindow() { const SystemEnvData* pChildSysData = nullptr; SystemWindowData winData = generateWinData(mpWindow, false); @@ -512,7 +512,7 @@ bool X11OpenGLContext::initWindow() } if (!m_pChildWindow || !pChildSysData) - return false; + return; InitChildWindow(m_pChildWindow.get()); @@ -522,8 +522,6 @@ bool X11OpenGLContext::initWindow() Visual* pVisual = static_cast<Visual*>(pChildSysData->pVisual); initGLWindow(pVisual); - - return true; } GLX11Window::GLX11Window() @@ -599,7 +597,7 @@ void X11OpenGLSalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, SalGraphics* OpenGLSalGraphicsImpl::DoCopyBits( rPosAry, *pImpl ); } -bool X11OpenGLSalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) +void X11OpenGLSalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) { Display* pDisplay = mrX11Parent.GetXDisplay(); SalX11Screen nScreen = mrX11Parent.GetScreenNumber(); @@ -610,7 +608,7 @@ bool X11OpenGLSalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, SAL_INFO( "vcl.opengl", "FillPixmapFromScreen" ); if (!SalDisplay::BestOpenGLVisual(pDisplay, nScreen.getXScreen(), aVisualInfo)) - return false; + return; // make sure everything is synced up before reading back mpContext->makeCurrent(); @@ -632,8 +630,6 @@ bool X11OpenGLSalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, 0, 0, 0, 0, pPixmap->GetWidth(), pPixmap->GetHeight() ); XFreeGC( pDisplay, aGC ); XDestroyImage( pImage ); - - return true; } typedef typename std::pair<ControlCacheKey, std::unique_ptr<TextureCombo>> ControlCachePair; diff --git a/vcl/osx/salobj.cxx b/vcl/osx/salobj.cxx index fcee4596037c..85eb5bae2708 100644 --- a/vcl/osx/salobj.cxx +++ b/vcl/osx/salobj.cxx @@ -243,7 +243,7 @@ const SystemEnvData* AquaSalObject::GetSystemData() const class AquaOpenGLContext : public OpenGLContext { public: - virtual bool initWindow() override; + virtual void initWindow() override; private: GLWindow m_aGLWin; @@ -314,9 +314,9 @@ void AquaOpenGLContext::destroyCurrentContext() [NSOpenGLContext clearCurrentContext]; } -bool AquaOpenGLContext::initWindow() +void AquaOpenGLContext::initWindow() { - OSX_SALDATA_RUNINMAIN_UNION( initWindow(), boolean ) + OSX_SALDATA_RUNINMAIN( initWindow() ) if( !m_pChildWindow ) { @@ -328,8 +328,6 @@ bool AquaOpenGLContext::initWindow() { InitChildWindow(m_pChildWindow.get()); } - - return true; } bool AquaOpenGLContext::ImplInit() diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 081c3612abb8..8d3f406bd30e 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -58,9 +58,8 @@ bool Help::Start( const OUString&, const vcl::Window* ) return false; } -bool Help::SearchKeyword( const OUString& ) +void Help::SearchKeyword( const OUString& ) { - return false; } OUString Help::GetHelpText( const OUString&, const vcl::Window* ) diff --git a/vcl/source/app/salusereventlist.cxx b/vcl/source/app/salusereventlist.cxx index bd58a508464f..ed66602ca549 100644 --- a/vcl/source/app/salusereventlist.cxx +++ b/vcl/source/app/salusereventlist.cxx @@ -140,17 +140,15 @@ bool SalUserEventList::DispatchUserEvents( bool bHandleAllCurrentEvents ) return bWasEvent; } -bool SalUserEventList::RemoveEvent( SalFrame* pFrame, void* pData, SalEvent nEvent ) +void SalUserEventList::RemoveEvent( SalFrame* pFrame, void* pData, SalEvent nEvent ) { SalUserEvent aEvent( pFrame, pData, nEvent ); - bool bResult = false; osl::MutexGuard aGuard( m_aUserEventsMutex ); auto it = std::find( m_aUserEvents.begin(), m_aUserEvents.end(), aEvent ); if ( it != m_aUserEvents.end() ) { m_aUserEvents.erase( it ); - bResult = true; } else { @@ -158,7 +156,6 @@ bool SalUserEventList::RemoveEvent( SalFrame* pFrame, void* pData, SalEvent nEve if ( it != m_aProcessingUserEvents.end() ) { m_aProcessingUserEvents.erase( it ); - bResult = true; } } @@ -167,8 +164,6 @@ bool SalUserEventList::RemoveEvent( SalFrame* pFrame, void* pData, SalEvent nEve m_bAllUserEventProcessedSignaled = true; TriggerAllUserEventsProcessed(); } - - return bResult; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index f75ba2dd4751..a38f2e7a6506 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -954,10 +954,9 @@ void FixedImage::SetImage( const Image& rImage ) } } -bool FixedImage::SetModeImage( const Image& rImage ) +void FixedImage::SetModeImage( const Image& rImage ) { SetImage( rImage ); - return true; } Image FixedImage::loadThemeImage(const OUString &rFileName) diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx index 3c60509594d7..cef44ae687b2 100644 --- a/vcl/source/edit/textdat2.hxx +++ b/vcl/source/edit/textdat2.hxx @@ -236,7 +236,7 @@ public: virtual void CreateAnchor() override; - virtual bool SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override; + virtual void SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override; virtual bool IsSelectionAtPoint( const Point& rPointPixel ) override; virtual void DeselectAll() override; diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index f8faf331ccf2..6baa37e08d0a 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -2440,7 +2440,7 @@ bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel ) return rInput.GetError() == ERRCODE_NONE; } -bool TextEngine::Write( SvStream& rOutput ) +void TextEngine::Write( SvStream& rOutput ) { TextSelection aSel; const sal_uInt32 nParas = static_cast<sal_uInt32>(mpDoc->GetNodes().size()); @@ -2460,8 +2460,6 @@ bool TextEngine::Write( SvStream& rOutput ) const OUString aText = pNode->GetText().copy( nStartPos, nEndPos-nStartPos ); rOutput.WriteLine(OUStringToOString(aText, rOutput.GetStreamCharSet())); } - - return rOutput.GetError() == ERRCODE_NONE; } void TextEngine::RemoveAttribs( sal_uInt32 nPara ) diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index c092ecd7ae72..1e27ab15e340 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -1796,11 +1796,10 @@ void TextView::SetPaintSelection( bool bPaint ) } } -bool TextView::Read( SvStream& rInput ) +void TextView::Read( SvStream& rInput ) { - bool bDone = mpImpl->mpTextEngine->Read( rInput, &mpImpl->maSelection ); + mpImpl->mpTextEngine->Read( rInput, &mpImpl->maSelection ); ShowCursor(); - return bDone; } bool TextView::ImplTruncateNewText( OUString& rNewText ) const @@ -2120,9 +2119,9 @@ void TextSelFunctionSet::CreateAnchor() mpView->ImpSetSelection( mpView->mpImpl->maSelection.GetEnd() ); } -bool TextSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool ) +void TextSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool ) { - return mpView->SetCursorAtPoint( rPointPixel ); + mpView->SetCursorAtPoint( rPointPixel ); } bool TextSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) @@ -2171,21 +2170,19 @@ bool TextView::IsInsertMode() const void TextView::SupportProtectAttribute(bool bSupport) { mpImpl->mbSupportProtectAttribute = bSupport;} -bool TextView::MatchGroup() +void TextView::MatchGroup() { TextSelection aTmpSel( GetSelection() ); aTmpSel.Justify(); if ( ( aTmpSel.GetStart().GetPara() != aTmpSel.GetEnd().GetPara() ) || ( ( aTmpSel.GetEnd().GetIndex() - aTmpSel.GetStart().GetIndex() ) > 1 ) ) { - return false; + return; } TextSelection aMatchSel = static_cast<ExtTextEngine*>(GetTextEngine())->MatchGroup( aTmpSel.GetStart() ); if ( aMatchSel.HasRange() ) SetSelection( aMatchSel ); - - return aMatchSel.HasRange(); } bool TextView::Search( const i18nutil::SearchOptions& rSearchOptions, bool bForward ) diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx index 84ab1d5d4f6d..b9fdefa3f7ff 100644 --- a/vcl/source/filter/GraphicNativeTransform.cxx +++ b/vcl/source/filter/GraphicNativeTransform.cxx @@ -34,38 +34,37 @@ GraphicNativeTransform::GraphicNativeTransform(Graphic& rGraphic) : GraphicNativeTransform::~GraphicNativeTransform() {} -bool GraphicNativeTransform::rotate(sal_uInt16 aInputRotation) +void GraphicNativeTransform::rotate(sal_uInt16 aInputRotation) { // Rotation can be between 0 and 3600 sal_uInt16 aRotation = aInputRotation % 3600; if (aRotation == 0) { - return true; // No rotation is needed + return; // No rotation is needed } else if (aRotation != 900 && aRotation != 1800 && aRotation != 2700) { - return false; + return; } GfxLink aLink = mrGraphic.GetLink(); if ( aLink.GetType() == GfxLinkType::NativeJpg ) { - return rotateJPEG(aRotation); + rotateJPEG(aRotation); } else if ( aLink.GetType() == GfxLinkType::NativePng ) { - return rotateGeneric(aRotation, "png"); + rotateGeneric(aRotation, "png"); } else if ( aLink.GetType() == GfxLinkType::NativeGif ) { - return rotateGeneric(aRotation, "gif"); + rotateGeneric(aRotation, "gif"); } else if ( aLink.GetType() == GfxLinkType::NONE ) { - return rotateBitmapOnly(aRotation); + rotateBitmapOnly(aRotation); } - return false; } bool GraphicNativeTransform::rotateBitmapOnly(sal_uInt16 aRotation) diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx index c9cfd1213e42..b15b0956e971 100644 --- a/vcl/source/fontsubset/fontsubset.cxx +++ b/vcl/source/fontsubset/fontsubset.cxx @@ -46,7 +46,7 @@ FontSubsetInfo::~FontSubsetInfo() } // prepare subsetting for fonts where the input font file is mapped -bool FontSubsetInfo::LoadFont( +void FontSubsetInfo::LoadFont( FontType eInFontType, const unsigned char* pInFontBytes, int nInByteLength) { @@ -54,16 +54,14 @@ bool FontSubsetInfo::LoadFont( meInFontType = eInFontType; mpInFontBytes = pInFontBytes; mnInByteLength = nInByteLength; - return (mnInByteLength > 0); } // prepare subsetting for fonts that are known to the SFT-parser -bool FontSubsetInfo::LoadFont( vcl::TrueTypeFont* pSftTTFont ) +void FontSubsetInfo::LoadFont( vcl::TrueTypeFont* pSftTTFont ) { SAL_WARN_IF( (mpInFontBytes != nullptr), "vcl", "Subset from SFT and from mapped font-file requested"); mpSftTTFont = pSftTTFont; meInFontType = FontType::ANY_SFNT; - return (mpSftTTFont == nullptr); } bool FontSubsetInfo::CreateFontSubset( diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx index dbb584e45dda..e9bcdf24660d 100644 --- a/vcl/source/gdi/alpha.cxx +++ b/vcl/source/gdi/alpha.cxx @@ -80,9 +80,9 @@ Bitmap const & AlphaMask::GetBitmap() const return ImplGetBitmap(); } -bool AlphaMask::Erase( sal_uInt8 cTransparency ) +void AlphaMask::Erase( sal_uInt8 cTransparency ) { - return Bitmap::Erase( Color( cTransparency, cTransparency, cTransparency ) ); + Bitmap::Erase( Color( cTransparency, cTransparency, cTransparency ) ); } bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) @@ -105,10 +105,9 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) return false; } -bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency ) +void AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency ) { AlphaMask::ScopedWriteAccess pAcc(*this); - bool bRet = false; if( pAcc && pAcc->GetBitCount() == 8 ) { @@ -140,11 +139,7 @@ bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransp } } } - - bRet = true; } - - return bRet; } void AlphaMask::ReleaseAccess( BitmapReadAccess* pAccess ) diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx index 0cb67808398a..f226b9d699c5 100644 --- a/vcl/source/gdi/animate.cxx +++ b/vcl/source/gdi/animate.cxx @@ -503,7 +503,7 @@ void Animation::ResetLoopCount() mbLoopTerminated = false; } -bool Animation::Convert( BmpConversion eConversion ) +void Animation::Convert( BmpConversion eConversion ) { SAL_WARN_IF( IsInAnimation(), "vcl", "Animation modified while it is animated" ); @@ -518,10 +518,6 @@ bool Animation::Convert( BmpConversion eConversion ) maBitmapEx.Convert( eConversion ); } - else - bRet = false; - - return bRet; } bool Animation::ReduceColors( sal_uInt16 nNewColorCount ) @@ -566,7 +562,7 @@ bool Animation::Invert() return bRet; } -bool Animation::Mirror( BmpMirrorFlags nMirrorFlags ) +void Animation::Mirror( BmpMirrorFlags nMirrorFlags ) { SAL_WARN_IF( IsInAnimation(), "vcl", "Animation modified while it is animated" ); @@ -595,13 +591,9 @@ bool Animation::Mirror( BmpMirrorFlags nMirrorFlags ) maBitmapEx.Mirror( nMirrorFlags ); } } - else - bRet = false; - - return bRet; } -bool Animation::Adjust( short nLuminancePercent, short nContrastPercent, +void Animation::Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, double fGamma, bool bInvert ) { @@ -628,10 +620,6 @@ bool Animation::Adjust( short nLuminancePercent, short nContrastPercent, nChannelRPercent, nChannelGPercent, nChannelBPercent, fGamma, bInvert ); } - else - bRet = false; - - return bRet; } bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam ) diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 31f60297a8bc..5638025e1f58 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -1809,9 +1809,9 @@ bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) return bRet; } -bool Bitmap::MakeMono( sal_uInt8 cThreshold ) +void Bitmap::MakeMono( sal_uInt8 cThreshold ) { - return ImplMakeMono( cThreshold ); + ImplMakeMono( cThreshold ); } bool Bitmap::GetSystemData( BitmapSystemData& rData ) const diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 180e4acacbfd..efa498667c0c 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -1976,9 +1976,9 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, } } -bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, const Link<long,void>* pProgress ) +void Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, const Link<long,void>* pProgress ) { - return ImplVectorizer::ImplVectorize( *this, rMtf, cReduce, pProgress ); + ImplVectorizer::ImplVectorize( *this, rMtf, cReduce, pProgress ); } bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index 28ea7efe1c3b..63029ce65cf3 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -470,7 +470,7 @@ bool BitmapEx::ReduceColors( sal_uInt16 nNewColorCount ) return !!aBitmap && aBitmap.ReduceColors( nNewColorCount, BMP_REDUCE_POPULAR ); } -bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, bool bExpandTransparent ) +void BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, bool bExpandTransparent ) { bool bRet = false; @@ -489,8 +489,6 @@ bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, bool bExpandTransparent ) SAL_WARN_IF( !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel(), "vcl", "BitmapEx::Expand(): size mismatch for bitmap and alpha mask." ); } - - return bRet; } bool BitmapEx::CopyPixel( const tools::Rectangle& rRectDst, const tools::Rectangle& rRectSrc, @@ -612,14 +610,16 @@ bool BitmapEx::Dither() return !!aBitmap && aBitmap.Dither(); } -bool BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor ) +void BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor ) { - return !!aBitmap && aBitmap.Replace( rSearchColor, rReplaceColor ); + if (!!aBitmap) + aBitmap.Replace( rSearchColor, rReplaceColor ); } -bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, const sal_uInt8* pTols ) +void BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, const sal_uInt8* pTols ) { - return !!aBitmap && aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, pTols ); + if (!!aBitmap) + aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, pTols ); } bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent, diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index a55365914fb2..b754df4e2c6e 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -588,12 +588,11 @@ void GDIMetaFile::push_back( MetaAction* pAction ) m_aList.push_back( pAction ); } -bool GDIMetaFile::Mirror( BmpMirrorFlags nMirrorFlags ) +void GDIMetaFile::Mirror( BmpMirrorFlags nMirrorFlags ) { const Size aOldPrefSize( GetPrefSize() ); long nMoveX, nMoveY; double fScaleX, fScaleY; - bool bRet; if( nMirrorFlags & BmpMirrorFlags::Horizontal ) { @@ -622,12 +621,7 @@ bool GDIMetaFile::Mirror( BmpMirrorFlags nMirrorFlags ) Scale( fScaleX, fScaleY ); Move( nMoveX, nMoveY ); SetPrefSize( aOldPrefSize ); - bRet = true; } - else - bRet = false; - - return bRet; } void GDIMetaFile::Move( long nX, long nY ) diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx index 97b5182a7927..f82d80d88a4c 100644 --- a/vcl/source/gdi/impbmp.cxx +++ b/vcl/source/gdi/impbmp.cxx @@ -45,9 +45,9 @@ bool ImpBitmap::ImplIsEqual(const ImpBitmap& rBmp) const rBmp.ImplGetChecksum() == ImplGetChecksum()); } -bool ImpBitmap::ImplCreate(const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal) +void ImpBitmap::ImplCreate(const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal) { - return mpSalBitmap->Create( rSize, nBitCount, rPal ); + mpSalBitmap->Create( rSize, nBitCount, rPal ); } bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap ) diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx index a360e6230231..3b9dc7f65c99 100644 --- a/vcl/source/gdi/pdfwriter.cxx +++ b/vcl/source/gdi/pdfwriter.cxx @@ -408,19 +408,19 @@ void PDFWriter::EndStructureElement() xImplementation->endStructureElement(); } -bool PDFWriter::SetCurrentStructureElement( sal_Int32 nID ) +void PDFWriter::SetCurrentStructureElement( sal_Int32 nID ) { - return xImplementation->setCurrentStructureElement( nID ); + xImplementation->setCurrentStructureElement( nID ); } -bool PDFWriter::SetStructureAttribute( enum StructAttribute eAttr, enum StructAttributeValue eVal ) +void PDFWriter::SetStructureAttribute( enum StructAttribute eAttr, enum StructAttributeValue eVal ) { - return xImplementation->setStructureAttribute( eAttr, eVal ); + xImplementation->setStructureAttribute( eAttr, eVal ); } -bool PDFWriter::SetStructureAttributeNumerical( enum StructAttribute eAttr, sal_Int32 nValue ) +void PDFWriter::SetStructureAttributeNumerical( enum StructAttribute eAttr, sal_Int32 nValue ) { - return xImplementation->setStructureAttributeNumerical( eAttr, nValue ); + xImplementation->setStructureAttributeNumerical( eAttr, nValue ); } void PDFWriter::SetStructureBoundingBox( const tools::Rectangle& rRect ) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 7d0d12772c42..6435a6a18dd5 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -10389,7 +10389,7 @@ void PDFWriterImpl::intersectClipRegion( const tools::Rectangle& rRect ) intersectClipRegion( aRect ); } -bool PDFWriterImpl::intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion ) +void PDFWriterImpl::intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion ) { basegfx::B2DPolyPolygon aRegion( getReferenceDevice()->LogicToPixel( rRegion, m_aGraphicsStack.front().m_aMapMode ) ); aRegion = getReferenceDevice()->PixelToLogic( aRegion, m_aMapMode ); @@ -10405,7 +10405,6 @@ bool PDFWriterImpl::intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion m_aGraphicsStack.front().m_aClipRegion = aRegion; m_aGraphicsStack.front().m_bClipRegion = true; } - return true; } void PDFWriterImpl::createNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ) diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index e8f477f2bc81..ad52e8d29217 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -1163,7 +1163,7 @@ public: void intersectClipRegion( const tools::Rectangle& rRect ); - bool intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion ); + void intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion ); void setLayoutMode( ComplexTextLayoutFlags nLayoutMode ) { diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 28ff84b8bfd1..d6017bf80f44 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -106,7 +106,7 @@ PrinterOptions::~PrinterOptions() { } -bool PrinterOptions::ReadFromConfig( bool i_bFile ) +void PrinterOptions::ReadFromConfig( bool i_bFile ) { bool bSuccess = false; // save old state in case something goes wrong @@ -180,7 +180,6 @@ bool PrinterOptions::ReadFromConfig( bool i_bFile ) if( ! bSuccess ) *this = aOldValues; - return bSuccess; } bool Printer::DrawTransformBitmapExDirect( @@ -1397,10 +1396,10 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe } } -bool Printer::SetPaper( Paper ePaper ) +void Printer::SetPaper( Paper ePaper ) { if ( mbInPrintPage ) - return false; + return; if ( maJobSetup.ImplGetConstData().GetPaperFormat() != ePaper ) { @@ -1419,7 +1418,7 @@ bool Printer::SetPaper( Paper ePaper ) { mbNewJobSetup = true; maJobSetup = aJobSetup; - return true; + return; } ReleaseGraphics(); @@ -1432,13 +1431,8 @@ bool Printer::SetPaper( Paper ePaper ) maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return true; } - else - return false; } - - return true; } bool Printer::SetPaperSizeUser( const Size& rSize ) @@ -1559,10 +1553,10 @@ const PaperInfo& Printer::GetPaperInfo( int nPaper ) const return mpInfoPrinter->m_aPaperFormats[nPaper]; } -bool Printer::SetDuplexMode( DuplexMode eDuplex ) +void Printer::SetDuplexMode( DuplexMode eDuplex ) { if ( mbInPrintPage ) - return false; + return; if ( maJobSetup.ImplGetConstData().GetDuplexMode() != eDuplex ) { @@ -1575,7 +1569,7 @@ bool Printer::SetDuplexMode( DuplexMode eDuplex ) { mbNewJobSetup = true; maJobSetup = aJobSetup; - return true; + return; } ReleaseGraphics(); @@ -1586,13 +1580,8 @@ bool Printer::SetDuplexMode( DuplexMode eDuplex ) maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return true; } - else - return false; } - - return true; } Paper Printer::GetPaper() const @@ -1619,11 +1608,10 @@ OUString Printer::GetPaperBinName( sal_uInt16 nPaperBin ) const return OUString(); } -bool Printer::SetCopyCount( sal_uInt16 nCopy, bool bCollate ) +void Printer::SetCopyCount( sal_uInt16 nCopy, bool bCollate ) { mnCopyCount = nCopy; mbCollateCopy = bCollate; - return true; } ErrCode Printer::ImplSalPrinterErrorCodeToVCL( SalPrinterError nError ) @@ -1645,11 +1633,10 @@ ErrCode Printer::ImplSalPrinterErrorCodeToVCL( SalPrinterError nError ) return nVCLError; } -bool Printer::EndJob() +void Printer::EndJob() { - bool bRet = false; if ( !IsJobActive() ) - return bRet; + return; SAL_WARN_IF( mbInPrintPage, "vcl.gdi", "Printer::EndJob() - StartPage() without EndPage() called" ); @@ -1663,15 +1650,13 @@ bool Printer::EndJob() maJobName.clear(); mbDevOutput = false; - bRet = mpPrinter->EndJob(); + mpPrinter->EndJob(); // FIXME: Do not destroy the printer asynchronously as Win95 // can't handle destroying a printer object and printing // at the same time ImplGetSVData()->mpDefInst->DestroyPrinter( mpPrinter ); mpPrinter = nullptr; } - - return bRet; } void Printer::ImplStartPage() diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index cbdd88bc00be..8659de290fb7 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -788,7 +788,7 @@ void PrinterController::resetPrinterOptions( bool i_bFileOutput ) mpImplData->mxPrinter->SetPrinterOptions( aOpt ); } -bool PrinterController::setupPrinter( vcl::Window* i_pParent ) +void PrinterController::setupPrinter( vcl::Window* i_pParent ) { bool bRet = false; @@ -854,7 +854,6 @@ bool PrinterController::setupPrinter( vcl::Window* i_pParent ) } xPrinter->Pop(); } - return bRet; } PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( const css::uno::Sequence< css::beans::PropertyValue >& i_rProps ) diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 886c8fbe80d3..e8985dd36d9e 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -368,9 +368,8 @@ void OpenGLContext::InitChildWindow(SystemChildWindow *pChildWindow) pChildWindow->SetControlBackground(); } -bool OpenGLContext::initWindow() +void OpenGLContext::initWindow() { - return false; } void OpenGLContext::destroyCurrentContext() @@ -624,9 +623,9 @@ bool OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer ) return true; } -bool OpenGLContext::AcquireDefaultFramebuffer() +void OpenGLContext::AcquireDefaultFramebuffer() { - return BindFramebuffer( nullptr ); + BindFramebuffer( nullptr ); } OpenGLFramebuffer* OpenGLContext::AcquireFramebuffer( const OpenGLTexture& rTexture ) diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 35c5e8098741..92c603487396 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -1380,11 +1380,11 @@ namespace } } -bool OutputDevice::BlendBitmap( +void OutputDevice::BlendBitmap( const SalTwoRect& rPosAry, const Bitmap& rBmp ) { - return mpGraphics->BlendBitmap( rPosAry, *rBmp.ImplGetImpBitmap()->ImplGetSalBitmap(), this ); + mpGraphics->BlendBitmap( rPosAry, *rBmp.ImplGetImpBitmap()->ImplGetSalBitmap(), this ); } Bitmap OutputDevice::BlendBitmapWithAlpha( diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index e6426fc24278..88ba96a36ce4 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1079,19 +1079,19 @@ long OutputDevice::GetTextArray( const OUString& rStr, long* pDXAry, #endif /* VCL_FLOAT_DEVICE_PIXEL */ } -bool OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray, +void OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen ) const { if( nIndex >= rStr.getLength() ) - return false; + return; if( nIndex+nLen >= rStr.getLength() ) nLen = rStr.getLength() - nIndex; // layout complex text std::unique_ptr<SalLayout> pSalLayout = ImplLayout( rStr, nIndex, nLen, Point(0,0) ); if( !pSalLayout ) - return false; + return; int nWidthFactor = pSalLayout->GetUnitsPerPixel(); pSalLayout->GetCaretPositions( 2*nLen, pCaretXArray ); @@ -1130,8 +1130,6 @@ bool OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray, for( i = 0; i < 2*nLen; ++i ) pCaretXArray[i] /= nWidthFactor; } - - return true; } void OutputDevice::DrawStretchText( const Point& rStartPt, sal_uLong nWidth, diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 0a10d7a4ded6..7b104129c2cc 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -940,7 +940,7 @@ namespace } } -bool VclBuilder::extractGroup(const OString &id, stringmap &rMap) +void VclBuilder::extractGroup(const OString &id, stringmap &rMap) { VclBuilder::stringmap::iterator aFind = rMap.find(OString("group")); if (aFind != rMap.end()) @@ -951,9 +951,7 @@ bool VclBuilder::extractGroup(const OString &id, stringmap &rMap) sID = sID.copy(0, nDelim); m_pParserState->m_aGroupMaps.emplace_back(id, sID.toUtf8()); rMap.erase(aFind); - return true; } - return false; } void VclBuilder::connectNumericFormatterAdjustment(const OString &id, const OUString &rAdjustment) @@ -1026,7 +1024,7 @@ namespace } } -bool VclBuilder::extractModel(const OString &id, stringmap &rMap) +void VclBuilder::extractModel(const OString &id, stringmap &rMap) { VclBuilder::stringmap::iterator aFind = rMap.find(OString("model")); if (aFind != rMap.end()) @@ -1034,24 +1032,20 @@ bool VclBuilder::extractModel(const OString &id, stringmap &rMap) m_pParserState->m_aModelMaps.emplace_back(id, aFind->second, extractActive(rMap)); rMap.erase(aFind); - return true; } - return false; } -bool VclBuilder::extractBuffer(const OString &id, stringmap &rMap) +void VclBuilder::extractBuffer(const OString &id, stringmap &rMap) { VclBuilder::stringmap::iterator aFind = rMap.find(OString("buffer")); if (aFind != rMap.end()) { m_pParserState->m_aTextBufferMaps.emplace_back(id, aFind->second); rMap.erase(aFind); - return true; } - return false; } -bool VclBuilder::extractStock(const OString &id, stringmap &rMap) +void VclBuilder::extractStock(const OString &id, stringmap &rMap) { VclBuilder::stringmap::iterator aFind = rMap.find(OString("stock")); if (aFind != rMap.end()) @@ -1066,21 +1060,17 @@ bool VclBuilder::extractStock(const OString &id, stringmap &rMap) rMap.erase(aFind); } m_pParserState->m_aStockMap[id] = aInfo; - return true; } - return false; } -bool VclBuilder::extractButtonImage(const OString &id, stringmap &rMap, bool bRadio) +void VclBuilder::extractButtonImage(const OString &id, stringmap &rMap, bool bRadio) { VclBuilder::stringmap::iterator aFind = rMap.find(OString("image")); if (aFind != rMap.end()) { m_pParserState->m_aButtonImageWidgetMaps.emplace_back(id, aFind->second, bRadio); rMap.erase(aFind); - return true; } - return false; } void VclBuilder::extractMnemonicWidget(const OString &rLabelID, stringmap &rMap) diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 7b7e3e52789f..36fee5fe60cf 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -486,10 +486,10 @@ ImplDockingWindowWrapper::~ImplDockingWindowWrapper() } } -bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) +void ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) { if( !mbStartDockingEnabled ) - return false; + return; maMouseOff = rPos; maMouseStart = maMouseOff; @@ -536,7 +536,6 @@ bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) GetWindow()->ImplGetFrameWindow()->ImplUpdateAll(); GetWindow()->StartTracking( StartTrackingFlags::KeyMod ); - return true; } void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 26a43bbde581..8ddc3bed8413 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -220,10 +220,10 @@ bool ImplDockFloatWin::Close() return mpDockWin->Close(); } -bool DockingWindow::ImplStartDocking( const Point& rPos ) +void DockingWindow::ImplStartDocking( const Point& rPos ) { if ( !mbDockable ) - return false; + return; maMouseOff = rPos; maMouseStart = maMouseOff; @@ -270,7 +270,6 @@ bool DockingWindow::ImplStartDocking( const Point& rPos ) } StartTracking( StartTrackingFlags::KeyMod ); - return true; } void DockingWindow::ImplInitDockingWindowData() diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 63728f65e0b2..dc305dba02f8 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2121,7 +2121,7 @@ void VclSizeGroup::set_mode(VclSizeGroupMode eMode) } -bool VclSizeGroup::set_property(const OString &rKey, const OUString &rValue) +void VclSizeGroup::set_property(const OString &rKey, const OUString &rValue) { if (rKey == "ignore-hidden") set_ignore_hidden(toBool(rValue)); @@ -2145,9 +2145,7 @@ bool VclSizeGroup::set_property(const OString &rKey, const OUString &rValue) else { SAL_INFO("vcl.layout", "unhandled property: " << rKey); - return false; } - return true; } void MessageDialog::create_owned_areas() diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 7079cd01a79b..58f02c0aa033 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2307,16 +2307,13 @@ void Menu::ImplClearSalMenu() mpSalMenu = nullptr; } -bool Menu::GetSystemMenuData( SystemMenuData* pData ) const +void Menu::GetSystemMenuData( SystemMenuData* pData ) const { Menu* pMenu = const_cast<Menu*>(this); if( pData && pMenu->ImplGetSalMenu() ) { pMenu->ImplGetSalMenu()->GetSystemMenuData( pData ); - return true; } - else - return false; } bool Menu::IsHighlighted( sal_uInt16 nItemPos ) const diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx index 7cc002b0f041..7352f215a1b3 100644 --- a/vcl/source/window/wrkwin.cxx +++ b/vcl/source/window/wrkwin.cxx @@ -214,7 +214,7 @@ bool WorkWindow::IsMinimized() const return false; } -bool WorkWindow::SetPluginParent( SystemParentData* pParent ) +void WorkWindow::SetPluginParent( SystemParentData* pParent ) { SAL_WARN_IF( mbPresentationMode || mbFullScreenMode, "vcl", "SetPluginParent in fullscreen or presentation mode !" ); @@ -222,13 +222,11 @@ bool WorkWindow::SetPluginParent( SystemParentData* pParent ) bool bShown = IsVisible(); Show( false ); - bool bRet = mpWindowImpl->mpFrame->SetPluginParent( pParent ); + mpWindowImpl->mpFrame->SetPluginParent( pParent ); Show( bShown ); if( bWasDnd ) Window::ImplStartDnd(); - - return bRet; } void WorkWindow::ImplSetFrameState( WindowStateState aFrameState ) diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 767cf81aa239..75c1862803df 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -1924,7 +1924,7 @@ void SalX11Display::Yield() GetX11SalData()->ResetXErrorOccurred(); } -bool SalX11Display::Dispatch( XEvent *pEvent ) +void SalX11Display::Dispatch( XEvent *pEvent ) { SalI18N_InputMethod* const pInputMethod = ( pXLib_ ) ? pXLib_->GetInputMethod() : nullptr; @@ -1947,7 +1947,7 @@ bool SalX11Display::Dispatch( XEvent *pEvent ) } } if( pInputMethod->FilterEvent( pEvent, aFrameWindow ) ) - return false; + return; } SalInstance* pInstance = GetSalData()->m_pInstance; @@ -1972,7 +1972,7 @@ bool SalX11Display::Dispatch( XEvent *pEvent ) { for (auto pSalFrame : m_aFrames ) pSalFrame->CallCallback( SalEvent::SettingsChanged, nullptr ); - return false; + return; } } } @@ -1998,7 +1998,7 @@ bool SalX11Display::Dispatch( XEvent *pEvent ) && GetKbdExtension()->GetEventBase() == pEvent->type ) { GetKbdExtension()->Dispatch( pEvent ); - return true; + return; } break; } @@ -2013,11 +2013,11 @@ bool SalX11Display::Dispatch( XEvent *pEvent ) || pFrame->GetForeignParent() == aDispatchWindow ) { - return pFrame->Dispatch( pEvent ); + pFrame->Dispatch( pEvent ); } if( pEvent->type == ConfigureNotify && pEvent->xconfigure.window == pFrame->GetStackingWindow() ) { - return pFrame->Dispatch( pEvent ); + pFrame->Dispatch( pEvent ); } } @@ -2026,8 +2026,6 @@ bool SalX11Display::Dispatch( XEvent *pEvent ) // is this perhaps a root window that changed size ? processRandREvent( pEvent ); - - return false; } #ifdef DBG_UTIL diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 86b700f7aa58..e81202334e65 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -82,7 +82,7 @@ CairoTextRender::CairoTextRender() rp = nullptr; } -bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLevel ) +void CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLevel ) { // release all no longer needed font resources for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) @@ -97,11 +97,11 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev // return early if there is no new font if( !pEntry ) - return false; + return; // return early if this is not a valid font for this graphics if( !pEntry->mpFontData ) - return false; + return; // handle the request for a non-native X11-font => use the GlyphCache FreetypeFont* pFreetypeFont = GlyphCache::GetInstance().CacheFont( *pEntry ); @@ -111,16 +111,12 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev if( !pFreetypeFont->TestFont() ) { GlyphCache::GetInstance().UncacheFont( *pFreetypeFont ); - return false; + return; } // register to use the font mpFreetypeFont[ nFallbackLevel ] = pFreetypeFont; - - return true; } - - return false; } void CairoFontsCache::CacheFont(void *pFont, const CairoFontsCache::CacheId &rId) diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index 870b53b5232b..5eed1f59232a 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -157,7 +157,7 @@ void X11SalGraphicsImpl::Init() mnBrushPixel = mrParent.GetPixel( mnBrushColor ); } -bool X11SalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) +void X11SalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) { //TODO lfrb: don't hardcode the depth Display* pDpy = mrParent.GetXDisplay(); @@ -166,7 +166,7 @@ bool X11SalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int n if( !aTmpGC ) { SAL_WARN( "vcl", "Could not create GC from screen" ); - return false; + return; } // Copy the background of the screen into a composite pixmap @@ -180,7 +180,6 @@ bool X11SalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int n 0, 0 ); XFreeGC( pDpy, aTmpGC ); - return true; } bool X11SalGraphicsImpl::RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixmap* /*Mask*/, int nX, int nY ) diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx index 3c7c98427034..34811db5d3f6 100644 --- a/vcl/unx/generic/gdi/gdiimpl.hxx +++ b/vcl/unx/generic/gdi/gdiimpl.hxx @@ -278,7 +278,7 @@ public: // implementation of X11GraphicsImpl void Init() override; - bool FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) override; + void FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) override; bool RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixmap* pMask, int nX, int nY ) override; virtual bool TryRenderCachedNativeControl(ControlCacheKey& rControlCacheKey, diff --git a/vcl/unx/generic/print/glyphset.cxx b/vcl/unx/generic/print/glyphset.cxx index 1d60d7510145..5e1ff90aa737 100644 --- a/vcl/unx/generic/print/glyphset.cxx +++ b/vcl/unx/generic/print/glyphset.cxx @@ -58,15 +58,15 @@ GlyphSet::~GlyphSet () /* FIXME delete the glyphlist ??? */ } -bool +void GlyphSet::GetGlyphID ( sal_GlyphId nGlyph, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID ) { - return LookupGlyphID (nGlyph, nOutGlyphID, nOutGlyphSetID) - || AddGlyphID (nGlyph, nOutGlyphID, nOutGlyphSetID); + if (LookupGlyphID(nGlyph, nOutGlyphID, nOutGlyphSetID)) + AddGlyphID(nGlyph, nOutGlyphID, nOutGlyphSetID); } bool diff --git a/vcl/unx/generic/print/glyphset.hxx b/vcl/unx/generic/print/glyphset.hxx index 45d0c81d6474..a8484bd7a5a8 100644 --- a/vcl/unx/generic/print/glyphset.hxx +++ b/vcl/unx/generic/print/glyphset.hxx @@ -51,7 +51,7 @@ private: OString GetGlyphSetName (sal_Int32 nGlyphSetID); - bool GetGlyphID (sal_GlyphId nGlyphId, + void GetGlyphID (sal_GlyphId nGlyphId, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); bool LookupGlyphID (sal_GlyphId nGlyphId, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx index 4aaa737d12e4..aa6a6f088d64 100644 --- a/vcl/unx/generic/print/printerjob.cxx +++ b/vcl/unx/generic/print/printerjob.cxx @@ -623,14 +623,14 @@ PrinterJob::StartPage (const JobData& rJobSetup) } } -bool +void PrinterJob::EndPage () { osl::File* pPageHeader = maHeaderVector.back().get(); osl::File* pPageBody = maPageVector.back().get(); if( ! (pPageBody && pPageHeader) ) - return false; + return; // copy page to paper and write page trailer according to DSC @@ -645,8 +645,6 @@ PrinterJob::EndPage () pPageHeader->close(); pPageBody->close(); - - return true; } struct less_ppd_key diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx index 31275762ac2a..1206a7b5efca 100644 --- a/vcl/unx/generic/printer/jobdata.cxx +++ b/vcl/unx/generic/printer/jobdata.cxx @@ -80,9 +80,8 @@ void JobData::setCollate( bool bCollate ) } } -bool JobData::setPaper( int i_nWidth, int i_nHeight ) +void JobData::setPaper( int i_nWidth, int i_nHeight ) { - bool bSuccess = false; if( m_pParser ) { OUString aPaper( m_pParser->matchPaper( i_nWidth, i_nHeight ) ); @@ -90,22 +89,21 @@ bool JobData::setPaper( int i_nWidth, int i_nHeight ) const PPDKey* pKey = m_pParser->getKey( OUString( "PageSize" ) ); const PPDValue* pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : nullptr; - bSuccess = pKey && pValue && m_aContext.setValue( pKey, pValue ); + if (pKey && pValue) + m_aContext.setValue( pKey, pValue ); } - return bSuccess; } -bool JobData::setPaperBin( int i_nPaperBin ) +void JobData::setPaperBin( int i_nPaperBin ) { - bool bSuccess = false; if( m_pParser ) { const PPDKey* pKey = m_pParser->getKey( OUString( "InputSlot" ) ); const PPDValue* pValue = pKey ? pKey->getValue( i_nPaperBin ) : nullptr; - bSuccess = pKey && pValue && m_aContext.setValue( pKey, pValue ); + if (pKey && pValue) + m_aContext.setValue( pKey, pValue ); } - return bSuccess; } bool JobData::getStreamBuffer( void*& pData, sal_uInt32& bytes ) diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx index 7c9a3d1e0fbc..9c96b8fde049 100644 --- a/vcl/unx/gtk/gtkdata.cxx +++ b/vcl/unx/gtk/gtkdata.cxx @@ -205,7 +205,7 @@ GtkSalDisplay::initScreen( SalX11Screen nXScreen ) const return pSD; } -bool GtkSalDisplay::Dispatch( XEvent* pEvent ) +void GtkSalDisplay::Dispatch( XEvent* pEvent ) { if( GetDisplay() == pEvent->xany.display ) { @@ -214,11 +214,12 @@ bool GtkSalDisplay::Dispatch( XEvent* pEvent ) for (auto pSalFrame : m_aFrames ) { if (pSalFrame->GetSystemData()->aWindow == pEvent->xany.window) - return static_cast<GtkSalFrame*>( pSalFrame )->Dispatch( pEvent ); + { + static_cast<GtkSalFrame*>( pSalFrame )->Dispatch( pEvent ); + return; + } } } - - return false; } GdkCursor* GtkSalDisplay::getFromXBM( const unsigned char *pBitmap, diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 8ef4b983077c..5497a3d7de4b 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -936,7 +936,7 @@ public: { } - virtual bool initWindow() override + virtual void initWindow() override { if( !m_pChildWindow ) { @@ -948,8 +948,6 @@ public: { InitChildWindow(m_pChildWindow.get()); } - - return true; } private: |