include/svx/colorwindow.hxx | 1 include/svx/unoshape.hxx | 23 --- include/vcl/opengl/OpenGLContext.hxx | 1 include/vcl/opengl/OpenGLHelper.hxx | 1 include/vcl/openglwin.hxx | 63 ---------- sc/source/filter/inc/xcl97rec.hxx | 2 solenv/clang-format/blacklist | 1 svx/source/tbxctrls/tbcontrl.cxx | 5 svx/source/unodraw/unoshap4.cxx | 9 - sw/source/core/inc/rolbck.hxx | 2 sw/source/core/undo/rolbck.cxx | 6 vcl/Library_vcl.mk | 1 vcl/source/opengl/OpenGLContext.cxx | 12 - vcl/source/opengl/OpenGLHelper.cxx | 24 --- vcl/source/window/openglwin.cxx | 150 ------------------------ vcl/workben/icontest.cxx | 1 xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx | 4 xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx | 6 18 files changed, 2 insertions(+), 310 deletions(-)
New commits: commit 1e9bde7825a5b63c0f1502bd3ebf5173bdf57111 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Jul 18 13:30:00 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Jul 19 08:08:52 2018 +0200 loplugin:unusedmethods Change-Id: I2b7a055a44c63bfc072b82580811898e177fbb8e Reviewed-on: https://gerrit.libreoffice.org/57628 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx index 765739a7af48..7bfaa63466b4 100644 --- a/include/svx/colorwindow.hxx +++ b/include/svx/colorwindow.hxx @@ -152,7 +152,6 @@ public: ColorSelectFunction const& rColorSelectFunction); weld::Container* GetWidget() { return mxTopLevel.get(); } virtual ~ColorWindow() override; - void ShowNoneButton(); void SetNoSelection(); bool IsNoSelection() const; void SelectEntry(const NamedColor& rColor); diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index bbc7740a1725..f2b40fa32472 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -855,29 +855,6 @@ private: OUString referer_; }; -/* - * This is a really ugly hack for the chart2 OpenGL backend - * SvxShapeGroup::add only accepts objects derived from SvxShape and silently drops - * other objects. This fixes my life time problems but I will burn for it in hell. - * - * The object does nothing and should not be painted. It is just there to ensure that the - * wrapped object is not deleted prematurely. - */ -class SVX_DLLPUBLIC SvxDummyShapeContainer : public SvxShape -{ -private: - css::uno::Reference< css::drawing::XShapes > - m_xDummyObject; - -public: - SvxDummyShapeContainer( css::uno::Reference< css::drawing::XShapes > const & xWrappedObject ); - virtual ~SvxDummyShapeContainer() throw() override; - - const css::uno::Reference< css::drawing::XShapes >& getWrappedShape() - { return m_xDummyObject; } - -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 62a526a09a80..814dba0fb195 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -135,7 +135,6 @@ public: void show(); void setWinPosAndSize(const Point &rPos, const Size& rSize); - void setWinSize(const Size& rSize); virtual const GLWindow& getOpenGLWindow() const = 0; SystemChildWindow* getChildWindow(); diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx index ab3eca6d3acf..26b293262ae3 100644 --- a/include/vcl/opengl/OpenGLHelper.hxx +++ b/include/vcl/opengl/OpenGLHelper.hxx @@ -57,7 +57,6 @@ public: * The caller is responsible for allocate the memory for the RGBA buffer, before call * this method. RGBA buffer size is assumed to be 4*width*height. **/ - static void ConvertBitmapExToRGBATextureBuffer(const BitmapEx& rBitmapEx, sal_uInt8* o_pRGBABuffer); static BitmapEx ConvertBGRABufferToBitmapEx(const sal_uInt8* const pBuffer, long nWidth, long nHeight); static void renderToFile(long nWidth, long nHeight, const OUString& rFileName); diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx deleted file mode 100644 index 3775b62491e6..000000000000 --- a/include/vcl/openglwin.hxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_VCL_OPENGLWIN_HXX -#define INCLUDED_VCL_OPENGLWIN_HXX - -#include <memory> -#include <vcl/event.hxx> -#include <vcl/syschild.hxx> -#include <vcl/dllapi.h> - -class OpenGLContext; -class OpenGLWindowImpl; - -class VCL_DLLPUBLIC IRenderer -{ -public: - virtual ~IRenderer() {} - virtual void update() = 0; - virtual void clickedAt(const Point& rPos, sal_uInt16 nButtons) = 0; - virtual void mouseDragMove(const Point& rPosBegin, const Point& rPosEnd, sal_uInt16 nButtons) = 0; - virtual void scroll(long nDelta) = 0; - - virtual void contextDestroyed() = 0; -}; - -// pImpl Pattern to avoid linking against OpenGL libs when using the class without the context -class VCL_DLLPUBLIC OpenGLWindow : public vcl::Window -{ -public: - OpenGLWindow(vcl::Window* pParent, bool bInit); - virtual ~OpenGLWindow() override; - virtual void dispose() override; - - OpenGLContext& getContext(); - - void setRenderer(IRenderer* pRenderer); - - virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; - - virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; - virtual void MouseMove( const MouseEvent& rMEvt ) override; - virtual void Command( const CommandEvent& rCEvt ) override; - - void Initialize(); - -private: - std::unique_ptr<OpenGLWindowImpl> mxImpl; - IRenderer* mpRenderer; - - Point maStartPoint; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx index 8efaf9768ca7..a8491bc44791 100644 --- a/sc/source/filter/inc/xcl97rec.hxx +++ b/sc/source/filter/inc/xcl97rec.hxx @@ -46,8 +46,6 @@ public: ///! count>=0xFFFF: Obj will be deleted, return 0 sal_uInt16 Add( std::unique_ptr<XclObj> ); - XclObj* back () { return maObjs.empty() ? nullptr : maObjs.back().get(); } - /** * @brief Remove last element in the list. */ diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index ee236d590a9b..bdfe45ecc3e9 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -8018,7 +8018,6 @@ include/vcl/opengl/GLMHelper.hxx include/vcl/opengl/OpenGLContext.hxx include/vcl/opengl/OpenGLHelper.hxx include/vcl/opengl/OpenGLWrapper.hxx -include/vcl/openglwin.hxx include/vcl/outdev.hxx include/vcl/outdevmap.hxx include/vcl/outdevstate.hxx diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index a6f134a6c693..fb6a29b6a997 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1474,11 +1474,6 @@ void SvxColorWindow::ShowNoneButton() mpButtonNoneColor->Show(); } -void ColorWindow::ShowNoneButton() -{ - mxButtonNoneColor->show(); -} - SvxColorWindow::~SvxColorWindow() { disposeOnce(); diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 1f18559a464e..edc9b8ff5854 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -1011,13 +1011,4 @@ bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPr } } -SvxDummyShapeContainer::SvxDummyShapeContainer(uno::Reference< drawing::XShapes > const & xObject): - m_xDummyObject(xObject) -{ -} - -SvxDummyShapeContainer::~SvxDummyShapeContainer() throw() -{ -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx index 5163fd59ca0e..27e4b96d8c07 100644 --- a/sw/source/core/inc/rolbck.hxx +++ b/sw/source/core/inc/rolbck.hxx @@ -318,8 +318,6 @@ public: SwHistory(); ~SwHistory(); - // delete History - void Delete(); // call and delete all objects between nStart and array end bool Rollback( SwDoc* pDoc, sal_uInt16 nStart = 0 ); // call all objects between nStart and TmpEnd; store nStart as TmpEnd diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 9de53a698523..fcee6d3272b6 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -1073,12 +1073,6 @@ bool SwHistory::TmpRollback( SwDoc* pDoc, sal_uInt16 nStart, bool bToFirst ) return true; } -void SwHistory::Delete() -{ - m_SwpHstry.clear(); - m_nEndDiff = 0; -} - sal_uInt16 SwHistory::SetTmpEnd( sal_uInt16 nNewTmpEnd ) { OSL_ENSURE( nNewTmpEnd <= Count(), "SwHistory::SetTmpEnd: out of bounds" ); diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index ea2b6fac2aee..95c466d27f20 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -648,7 +648,6 @@ else vcl/opengl/LineRenderUtils \ vcl/source/opengl/OpenGLContext \ vcl/source/opengl/OpenGLHelper \ - vcl/source/window/openglwin \ )) ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS))) $(eval $(call gb_Library_add_libs,vcl,\ diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 5fd4c4e0b948..b91cce41f264 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -346,18 +346,6 @@ void OpenGLContext::adjustToNewSize() glViewport(0, 0, rGLWin.Width, rGLWin.Height); } -void OpenGLContext::setWinSize(const Size& rSize) -{ - if(m_xWindow) - m_xWindow->SetSizePixel(rSize); - if( m_pChildWindow ) - m_pChildWindow->SetSizePixel(rSize); - - GLWindow& rGLWin = getModifiableOpenGLWindow(); - rGLWin.Width = rSize.Width(); - rGLWin.Height = rSize.Height(); -} - void OpenGLContext::InitChildWindow(SystemChildWindow *pChildWindow) { pChildWindow->SetMouseTransparent(true); diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 3bad4ea44b87..06c24a597c2b 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -534,30 +534,6 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName, return LoadShaders(rVertexShaderName, rFragmentShaderName, OUString(), "", ""); } -void OpenGLHelper::ConvertBitmapExToRGBATextureBuffer(const BitmapEx& rBitmapEx, sal_uInt8* o_pRGBABuffer) -{ - long nBmpWidth = rBitmapEx.GetSizePixel().Width(); - long nBmpHeight = rBitmapEx.GetSizePixel().Height(); - - Bitmap aBitmap (rBitmapEx.GetBitmap()); - AlphaMask aAlpha (rBitmapEx.GetAlpha()); - Bitmap::ScopedReadAccess pReadAccces( aBitmap ); - AlphaMask::ScopedReadAccess pAlphaReadAccess( aAlpha ); - size_t i = 0; - for (long ny = 0; ny < nBmpHeight; ny++) - { - Scanline pAScan = pAlphaReadAccess ? pAlphaReadAccess->GetScanline(ny) : nullptr; - for(long nx = 0; nx < nBmpWidth; nx++) - { - BitmapColor aCol = pReadAccces->GetColor( ny, nx ); - o_pRGBABuffer[i++] = aCol.GetRed(); - o_pRGBABuffer[i++] = aCol.GetGreen(); - o_pRGBABuffer[i++] = aCol.GetBlue(); - o_pRGBABuffer[i++] = pAScan ? 255 - *pAScan++ : 255; - } - } -} - void OpenGLHelper::renderToFile(long nWidth, long nHeight, const OUString& rFileName) { OpenGLZone aZone; diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx deleted file mode 100644 index 1deb2e47618f..000000000000 --- a/vcl/source/window/openglwin.cxx +++ /dev/null @@ -1,150 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include <vcl/openglwin.hxx> -#include <vcl/opengl/OpenGLContext.hxx> -#include <vcl/event.hxx> -#include <vcl/sysdata.hxx> - -class OpenGLWindowImpl -{ -public: - explicit OpenGLWindowImpl(vcl::Window* pWindow, bool bInit); - ~OpenGLWindowImpl(); - OpenGLContext& getContext() { return *mxContext.get(); } - - bool IsInitialized() const; - - void Initialize(); - -private: - - rtl::Reference<OpenGLContext> mxContext; - VclPtr<SystemChildWindow> mxChildWindow; - - bool mbInitialized; -}; - -OpenGLWindowImpl::OpenGLWindowImpl(vcl::Window* pWindow, bool bInit) - : mxContext(OpenGLContext::Create()), - mbInitialized(bInit) -{ - SystemWindowData aData = mxContext->generateWinData(pWindow, false); - mxChildWindow.reset(VclPtr<SystemChildWindow>::Create(pWindow, 0, &aData)); - mxChildWindow->Show(); - - if (bInit) - mxContext->init(mxChildWindow.get()); - - pWindow->SetMouseTransparent(false); -} - -OpenGLWindowImpl::~OpenGLWindowImpl() -{ - mxContext->dispose(); - mxChildWindow.disposeAndClear(); -} - -bool OpenGLWindowImpl::IsInitialized() const -{ - return mbInitialized; -} - -void OpenGLWindowImpl::Initialize() -{ - mxContext->init(mxChildWindow.get()); - mbInitialized = true; -} - -OpenGLWindow::OpenGLWindow(vcl::Window* pParent, bool bInit): - Window(pParent, 0), - mxImpl(new OpenGLWindowImpl(this, bInit)), - mpRenderer(nullptr) -{ -} - -OpenGLWindow::~OpenGLWindow() -{ - disposeOnce(); -} - -void OpenGLWindow::dispose() -{ - if(mpRenderer) - mpRenderer->contextDestroyed(); - mpRenderer = nullptr; - mxImpl.reset(); - Window::dispose(); -} - -OpenGLContext& OpenGLWindow::getContext() -{ - return mxImpl->getContext(); -} - -void OpenGLWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle&) -{ - if(mpRenderer) - mpRenderer->update(); -} - -void OpenGLWindow::MouseButtonDown( const MouseEvent& rMEvt ) -{ - maStartPoint = rMEvt.GetPosPixel(); -} - -void OpenGLWindow::MouseButtonUp( const MouseEvent& rMEvt ) -{ - if(!mpRenderer) - return; - - Point aPoint = rMEvt.GetPosPixel(); - if(aPoint == maStartPoint) - { - mpRenderer->clickedAt(aPoint, rMEvt.GetButtons()); - } - else - { - mpRenderer->mouseDragMove(maStartPoint, aPoint, - rMEvt.GetButtons()); - } -} - -void OpenGLWindow::Command( const CommandEvent& rCEvt ) -{ - if(!mpRenderer) - return; - - if(rCEvt.GetCommand() == CommandEventId::Wheel) - { - const CommandWheelData* pData = rCEvt.GetWheelData(); - if(pData->GetMode() == CommandWheelMode::SCROLL) - { - long nDelta = pData->GetDelta(); - mpRenderer->scroll(nDelta); - } - } -} - -void OpenGLWindow::MouseMove( const MouseEvent& /*rMEvt*/ ) -{ -} - -void OpenGLWindow::setRenderer(IRenderer* pRenderer) -{ - mpRenderer = pRenderer; -} - -void OpenGLWindow::Initialize() -{ - if (!mxImpl->IsInitialized()) - mxImpl->Initialize(); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx index 35ea9510d442..9280ddeb9259 100644 --- a/vcl/workben/icontest.cxx +++ b/vcl/workben/icontest.cxx @@ -36,7 +36,6 @@ #include <vcl/graph.hxx> #include <vcl/graphicfilter.hxx> #include <vcl/image.hxx> -#include <vcl/openglwin.hxx> #include <vcl/opengl/OpenGLContext.hxx> #include <vcl/opengl/OpenGLHelper.hxx> #include <vcl/svapp.hxx> diff --git a/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx b/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx index 913053b7a4f0..e5b5099a6730 100644 --- a/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx +++ b/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx @@ -72,9 +72,7 @@ class XSECGPG_DLLPUBLIC XMLSignature_GpgImpl : public ::cppu::WeakImplHelper< //Helper for registry /// @throws css::uno::RuntimeException - static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ; - - static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ; + static css::uno::Reference< css::uno::XInterface > impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ; } ; #endif // INCLUDED_XMLSECURITY_SOURCE_GPG_XMLSIGNATURE_GPGIMPL_HXX diff --git a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx index c3323cee62b4..eb34beeec6d3 100644 --- a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx +++ b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx @@ -525,12 +525,8 @@ OUString XMLSignature_GpgImpl::impl_getImplementationName() { } //Helper for registry -Reference< XInterface > SAL_CALL XMLSignature_GpgImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) { +Reference< XInterface > XMLSignature_GpgImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) { return Reference< XInterface >( *new XMLSignature_GpgImpl ) ; } -Reference< XSingleServiceFactory > XMLSignature_GpgImpl::impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager ) { - return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits