diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-11 09:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-11 14:01:00 +0200 |
commit | 7430dfe2a4a3b13ffa248bf14a3a2ca87993f48d (patch) | |
tree | 3b9607225ec2df9934b71df223c482ca7a069ff1 /sdext | |
parent | 3b835b8d546ca16d7edcb06eda017e276383ea0f (diff) |
loplugin:unusedmethods
Change-Id: I34009aabf0befb346470b5c0d96ad8fc476b7c4e
Reviewed-on: https://gerrit.libreoffice.org/60300
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/minimizer/pppoptimizer.cxx | 92 | ||||
-rw-r--r-- | sdext/source/minimizer/pppoptimizer.hxx | 30 |
2 files changed, 1 insertions, 121 deletions
diff --git a/sdext/source/minimizer/pppoptimizer.cxx b/sdext/source/minimizer/pppoptimizer.cxx index b0a5077c5a1e..4d21ca3aabc9 100644 --- a/sdext/source/minimizer/pppoptimizer.cxx +++ b/sdext/source/minimizer/pppoptimizer.cxx @@ -19,100 +19,8 @@ #include "pppoptimizer.hxx" -#include "impoptimizer.hxx" #include <osl/file.hxx> -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::util; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::beans; - - -PPPOptimizer::PPPOptimizer( - css::uno::Reference<css::uno::XComponentContext> const & xContext, - css::uno::Reference< css::frame::XFrame > const & xFrame): - mxContext( xContext ), - mxController( xFrame->getController() ) -{ -} - - -PPPOptimizer::~PPPOptimizer() -{ -} - - -// XDispatchProvider - - -Reference< css::frame::XDispatch > SAL_CALL PPPOptimizer::queryDispatch( - const URL& aURL, const OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) -{ - Reference < XDispatch > xRet; - if ( aURL.Protocol.equalsIgnoreAsciiCase( "vnd.com.sun.star.comp.PPPOptimizer:" ) ) - { -// if ( aURL.Path.equalsAscii( "Function1" ) ) - xRet = this; - } - return xRet; -} - - -Sequence< Reference< css::frame::XDispatch > > SAL_CALL PPPOptimizer::queryDispatches( - const Sequence< css::frame::DispatchDescriptor >& aDescripts ) -{ - Sequence< Reference< css::frame::XDispatch> > aReturn( aDescripts.getLength() ); - Reference< css::frame::XDispatch>* pReturn = aReturn.getArray(); - const css::frame::DispatchDescriptor* pDescripts = aDescripts.getConstArray(); - for (sal_Int32 i = 0; i < aDescripts.getLength(); ++i, ++pReturn, ++pDescripts ) - { - *pReturn = queryDispatch( pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags ); - } - return aReturn; -} - - -// XDispatch - - -void SAL_CALL PPPOptimizer::dispatch( const URL& rURL, const Sequence< PropertyValue >& lArguments ) -{ - if ( mxController.is() && rURL.Protocol.equalsIgnoreAsciiCase( "vnd.com.sun.star.comp.PPPOptimizer:" ) ) - { - if ( rURL.Path == "optimize" ) - { - Reference< XModel > xModel( mxController->getModel() ); - if ( xModel.is() ) - { - try - { - ImpOptimizer aOptimizer( mxContext, xModel ); - aOptimizer.Optimize( lArguments ); - } - catch( Exception& ) - { - } - } - } - } -} - - -void SAL_CALL PPPOptimizer::addStatusListener( const Reference< XStatusListener >&, const URL& ) -{ - // TODO - OSL_FAIL( "PPPOptimizer::addStatusListener()\nNot implemented yet!" ); -} - - -void SAL_CALL PPPOptimizer::removeStatusListener( const Reference< XStatusListener >&, const URL& ) -{ - // TODO - OSL_FAIL( "PPPOptimizer::removeStatusListener()\nNot implemented yet!" ); -} - - // returning filesize, on error zero is returned sal_Int64 PPPOptimizer::GetFileSize( const OUString& rURL ) { diff --git a/sdext/source/minimizer/pppoptimizer.hxx b/sdext/source/minimizer/pppoptimizer.hxx index ebac7d5babca..e3ab918cb2d5 100644 --- a/sdext/source/minimizer/pppoptimizer.hxx +++ b/sdext/source/minimizer/pppoptimizer.hxx @@ -28,36 +28,8 @@ #include <com/sun/star/frame/XController.hpp> -class PPPOptimizer : public cppu::WeakImplHelper< - css::frame::XDispatchProvider, - css::frame::XDispatch > +struct PPPOptimizer { - css::uno::Reference< css::uno::XComponentContext > mxContext; - css::uno::Reference< css::frame::XController > mxController; - -public: - - PPPOptimizer( - css::uno::Reference<css::uno::XComponentContext> const & xContext, - css::uno::Reference< css::frame::XFrame > const & xFrame); - virtual ~PPPOptimizer() override; - - // XDispatchProvider - virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( - const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags ) override; - - virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( - const css::uno::Sequence< css::frame::DispatchDescriptor >& aDescripts ) override; - - // XDispatch - virtual void SAL_CALL dispatch( const css::util::URL& aURL, - const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) override; - - virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xListener, - const css::util::URL& aURL ) override; - virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xListener, - const css::util::URL& aURL ) override; - static sal_Int64 GetFileSize( const OUString& rURL ); }; |