Simplify a bit
Change-Id: If30cac2426fe6de498066dbe9ec8465450d7ce0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176001 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
3a9caad863
commit
491d6ef7f2
2 changed files with 2 additions and 45 deletions
|
@ -68,13 +68,10 @@ public:
|
|||
namespace basctl
|
||||
{
|
||||
|
||||
using namespace ::cppu;
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::uno;
|
||||
using namespace ::com::sun::star::lang;
|
||||
|
||||
SIDEModel::SIDEModel( SfxObjectShell *pObjSh )
|
||||
: SfxBaseModel(pObjSh)
|
||||
: cppu::ImplInheritanceHelper<SfxBaseModel, css::lang::XServiceInfo>(pObjSh)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -82,37 +79,6 @@ SIDEModel::~SIDEModel()
|
|||
{
|
||||
}
|
||||
|
||||
uno::Any SAL_CALL SIDEModel::queryInterface( const uno::Type& rType )
|
||||
{
|
||||
uno::Any aRet = ::cppu::queryInterface ( rType,
|
||||
// OWeakObject interfaces
|
||||
static_cast< XInterface* >( static_cast< OWeakObject* >( this ) ),
|
||||
static_cast< XWeak* > ( this ),
|
||||
static_cast< XServiceInfo* > ( this ) );
|
||||
if (!aRet.hasValue())
|
||||
aRet = SfxBaseModel::queryInterface ( rType );
|
||||
return aRet;
|
||||
}
|
||||
|
||||
void SAL_CALL SIDEModel::acquire() noexcept
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
OWeakObject::acquire();
|
||||
}
|
||||
|
||||
void SAL_CALL SIDEModel::release() noexcept
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
OWeakObject::release();
|
||||
}
|
||||
|
||||
uno::Sequence< uno::Type > SAL_CALL SIDEModel::getTypes( )
|
||||
{
|
||||
return comphelper::concatSequences(
|
||||
SfxBaseModel::getTypes(),
|
||||
uno::Sequence { cppu::UnoType<XServiceInfo>::get() });
|
||||
}
|
||||
|
||||
OUString SIDEModel::getImplementationName()
|
||||
{
|
||||
return u"com.sun.star.comp.basic.BasicIDE"_ustr;
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
namespace basctl
|
||||
{
|
||||
|
||||
class SIDEModel : public SfxBaseModel,
|
||||
public com::sun::star::lang::XServiceInfo
|
||||
class SIDEModel : public cppu::ImplInheritanceHelper<SfxBaseModel, css::lang::XServiceInfo>
|
||||
{
|
||||
/// @throws css::io::IOException
|
||||
static void notImplemented();
|
||||
|
@ -33,14 +32,6 @@ public:
|
|||
explicit SIDEModel(SfxObjectShell *pObjSh);
|
||||
virtual ~SIDEModel() override;
|
||||
|
||||
//XInterface
|
||||
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
|
||||
virtual void SAL_CALL acquire( ) noexcept override;
|
||||
virtual void SAL_CALL release( ) noexcept override;
|
||||
|
||||
//XTypeProvider
|
||||
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
|
||||
|
||||
//XServiceInfo
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
|
||||
|
|
Loading…
Reference in a new issue