diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-23 16:45:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-25 13:51:24 +0100 |
commit | 0f28c8612f4269cec95688b53d182c7c0169236d (patch) | |
tree | d840fa85243c10376fc4fb60b4972c028953483a /canvas | |
parent | ooxmlimport: support inherited listid (diff) | |
download | core-0f28c8612f4269cec95688b53d182c7c0169236d.tar.gz core-0f28c8612f4269cec95688b53d182c7c0169236d.zip |
loplugin:unused-returns in basegfx..cppcanvas
Change-Id: I32dc8c92871c8349651d2f4204a332d387e6e1b2
Reviewed-on: https://gerrit.libreoffice.org/48428
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_textlayout.cxx | 11 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_textlayout.hxx | 2 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_buffercontext.hxx | 4 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_spritecanvas.cxx | 4 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_spritecanvas.hxx | 2 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_spritedevicehelper.cxx | 6 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_textlayout.cxx | 4 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_textlayout.hxx | 2 | ||||
-rw-r--r-- | canvas/source/tools/surface.hxx | 2 |
9 files changed, 15 insertions, 22 deletions
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 5fb4db08dd2e..2e4e08cfd8c1 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -292,10 +292,8 @@ namespace cairocanvas * * Note: some text effects are not rendered due to lacking generic canvas or cairo canvas * implementation. See issues 92657, 92658, 92659, 92660, 97529 - * - * @return true, if successful **/ - bool TextLayout::draw( CairoSharedPtr const & pSCairo, + void TextLayout::draw( CairoSharedPtr const & pSCairo, OutputDevice& rOutDev, const Point& rOutpos, const rendering::ViewState& viewState, @@ -360,19 +358,19 @@ namespace cairocanvas rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets.get(), ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ); - return true; + return; } else // VCL FALLBACK - without advances { rOutDev.DrawText( rOutpos, maText.Text, ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ); - return true; + return; } } if (aSysLayoutData.rGlyphData.empty()) - return false; //??? false? + return; //??? false? /** * Setup platform independent glyph vector into cairo-based glyphs vector. @@ -503,7 +501,6 @@ namespace cairocanvas cairo_font_face_destroy(font_face); cairo_font_options_destroy(options); } - return true; } namespace diff --git a/canvas/source/cairo/cairo_textlayout.hxx b/canvas/source/cairo/cairo_textlayout.hxx index aa02296d6f44..13d31a7077a1 100644 --- a/canvas/source/cairo/cairo_textlayout.hxx +++ b/canvas/source/cairo/cairo_textlayout.hxx @@ -82,7 +82,7 @@ namespace cairocanvas virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; - bool draw( ::cairo::CairoSharedPtr const & pSCairo, + void draw( ::cairo::CairoSharedPtr const & pSCairo, OutputDevice& rOutDev, const Point& rOutpos, const css::rendering::ViewState& viewState, diff --git a/canvas/source/opengl/ogl_buffercontext.hxx b/canvas/source/opengl/ogl_buffercontext.hxx index 7f2066a0e075..717adb1d6f56 100644 --- a/canvas/source/opengl/ogl_buffercontext.hxx +++ b/canvas/source/opengl/ogl_buffercontext.hxx @@ -22,10 +22,10 @@ namespace oglcanvas virtual ~IBufferContext() {} /// start render to buffer. changes current framebuffer - virtual bool startBufferRendering() = 0; + virtual void startBufferRendering() = 0; /// end render to buffer. switches to default framebuffer - virtual bool endBufferRendering() = 0; + virtual void endBufferRendering() = 0; virtual GLuint getTextureId() = 0; }; diff --git a/canvas/source/opengl/ogl_spritecanvas.cxx b/canvas/source/opengl/ogl_spritecanvas.cxx index 3f913fd64ab4..dfa6134a4dbe 100644 --- a/canvas/source/opengl/ogl_spritecanvas.cxx +++ b/canvas/source/opengl/ogl_spritecanvas.cxx @@ -154,9 +154,9 @@ namespace oglcanvas maDeviceHelper.hide(xSprite); } - bool SpriteCanvas::renderRecordedActions() const + void SpriteCanvas::renderRecordedActions() const { - return maCanvasHelper.renderRecordedActions(); + maCanvasHelper.renderRecordedActions(); } static uno::Reference<uno::XInterface> initCanvas( SpriteCanvas* pCanvas ) diff --git a/canvas/source/opengl/ogl_spritecanvas.hxx b/canvas/source/opengl/ogl_spritecanvas.hxx index 66c3383bc1da..2ab985143dc8 100644 --- a/canvas/source/opengl/ogl_spritecanvas.hxx +++ b/canvas/source/opengl/ogl_spritecanvas.hxx @@ -103,7 +103,7 @@ namespace oglcanvas /** Write out recorded actions */ - bool renderRecordedActions() const; + void renderRecordedActions() const; private: css::uno::Sequence< css::uno::Any > maArguments; diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx index 3043deeaec3f..bab170e37d24 100644 --- a/canvas/source/opengl/ogl_spritedevicehelper.cxx +++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx @@ -520,16 +520,14 @@ namespace oglcanvas GLuint mnDepthId; GLuint mnTextureId; - virtual bool startBufferRendering() override + virtual void startBufferRendering() override { glBindFramebuffer(GL_FRAMEBUFFER, mnFrambufferId); - return true; } - virtual bool endBufferRendering() override + virtual void endBufferRendering() override { glBindFramebuffer(GL_FRAMEBUFFER, 0); - return true; } virtual GLuint getTextureId() override diff --git a/canvas/source/opengl/ogl_textlayout.cxx b/canvas/source/opengl/ogl_textlayout.cxx index 5857367938e5..1f966d16a9cf 100644 --- a/canvas/source/opengl/ogl_textlayout.cxx +++ b/canvas/source/opengl/ogl_textlayout.cxx @@ -176,13 +176,11 @@ namespace oglcanvas return maText; } - bool TextLayout::draw( const rendering::ViewState& /*rViewState*/, + void TextLayout::draw( const rendering::ViewState& /*rViewState*/, const rendering::RenderState& /*rRenderState*/, const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/ ) const { // TODO - - return true; } } diff --git a/canvas/source/opengl/ogl_textlayout.hxx b/canvas/source/opengl/ogl_textlayout.hxx index c98cdcf5d465..e9c04e1635ea 100644 --- a/canvas/source/opengl/ogl_textlayout.hxx +++ b/canvas/source/opengl/ogl_textlayout.hxx @@ -61,7 +61,7 @@ namespace oglcanvas virtual css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL getFont( ) override; virtual css::rendering::StringContext SAL_CALL getText( ) override; - bool draw( const css::rendering::ViewState& rViewState, + void draw( const css::rendering::ViewState& rViewState, const css::rendering::RenderState& rRenderState, const css::uno::Reference< css::rendering::XGraphicDevice >& xGraphicDevice ) const; diff --git a/canvas/source/tools/surface.hxx b/canvas/source/tools/surface.hxx index 1b7a463fc588..436e96648d78 100644 --- a/canvas/source/tools/surface.hxx +++ b/canvas/source/tools/surface.hxx @@ -134,7 +134,7 @@ namespace canvas bool mbIsDirty; private: - bool refresh( canvas::IColorBuffer& rBuffer ) const; + void refresh( canvas::IColorBuffer& rBuffer ) const; void prepareRendering(); basegfx::B2DRectangle getUVCoords() const; |