Kaydet (Commit) 98b77ad1 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:expandablemethods in UnoControls..vbahelper

Change-Id: Iec2c5e13119d97c9ca87e083c0f7cb00227e5231
Reviewed-on: https://gerrit.libreoffice.org/29997Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 7e488767
...@@ -352,12 +352,6 @@ public: ...@@ -352,12 +352,6 @@ public:
virtual void SAL_CALL windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException, std::exception ) override;
virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException, std::exception ) override;
// impl but public method to register service
static const css::uno::Sequence< OUString > impl_getStaticSupportedServiceNames();
static const OUString impl_getStaticImplementationName();
protected: protected:
using OComponentHelper::disposing; using OComponentHelper::disposing;
......
...@@ -196,7 +196,7 @@ Any SAL_CALL BaseControl::queryAggregation( const Type& aType ) throw( RuntimeEx ...@@ -196,7 +196,7 @@ Any SAL_CALL BaseControl::queryAggregation( const Type& aType ) throw( RuntimeEx
OUString SAL_CALL BaseControl::getImplementationName() throw( RuntimeException, std::exception ) OUString SAL_CALL BaseControl::getImplementationName() throw( RuntimeException, std::exception )
{ {
return impl_getStaticImplementationName(); return OUString();
} }
// XServiceInfo // XServiceInfo
...@@ -210,7 +210,7 @@ sal_Bool SAL_CALL BaseControl::supportsService( const OUString& sServiceName ) t ...@@ -210,7 +210,7 @@ sal_Bool SAL_CALL BaseControl::supportsService( const OUString& sServiceName ) t
Sequence< OUString > SAL_CALL BaseControl::getSupportedServiceNames() throw( RuntimeException, std::exception ) Sequence< OUString > SAL_CALL BaseControl::getSupportedServiceNames() throw( RuntimeException, std::exception )
{ {
return impl_getStaticSupportedServiceNames(); return Sequence< OUString >();
} }
// XComponent // XComponent
...@@ -702,22 +702,6 @@ void SAL_CALL BaseControl::windowHidden( const EventObject& /*aEvent*/ ) throw( ...@@ -702,22 +702,6 @@ void SAL_CALL BaseControl::windowHidden( const EventObject& /*aEvent*/ ) throw(
{ {
} }
// impl but public method to register service in DLL
// (In this BASE-implementation not implemented! Overwrite it in derived classes.)
const Sequence< OUString > BaseControl::impl_getStaticSupportedServiceNames()
{
return Sequence< OUString >();
}
// impl but public method to register service in DLL
// (In this BASE-implementation not implemented! Overwrite it in derived classes.)
const OUString BaseControl::impl_getStaticImplementationName()
{
return OUString();
}
// protected method // protected method
WindowDescriptor* BaseControl::impl_getWindowDescriptor( const Reference< XWindowPeer >& xParentPeer ) WindowDescriptor* BaseControl::impl_getWindowDescriptor( const Reference< XWindowPeer >& xParentPeer )
......
...@@ -315,7 +315,7 @@ bool ExpandableMethods::isCalleeFunctionInteresting(const FunctionDecl* function ...@@ -315,7 +315,7 @@ bool ExpandableMethods::isCalleeFunctionInteresting(const FunctionDecl* function
return true; return true;
} }
loplugin::Plugin::Registration< ExpandableMethods > X("expandablemethods", false); loplugin::Plugin::Registration< ExpandableMethods > X("expandablemethods", true);
} }
......
...@@ -186,7 +186,7 @@ UcbStore::createPropertySetRegistry( const OUString& ) ...@@ -186,7 +186,7 @@ UcbStore::createPropertySetRegistry( const OUString& )
{ {
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex ); osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
if ( !m_pImpl->m_xTheRegistry.is() ) if ( !m_pImpl->m_xTheRegistry.is() )
m_pImpl->m_xTheRegistry = new PropertySetRegistry( m_xContext, getInitArgs() ); m_pImpl->m_xTheRegistry = new PropertySetRegistry( m_xContext, m_pImpl->m_aInitArgs );
} }
return m_pImpl->m_xTheRegistry; return m_pImpl->m_xTheRegistry;
...@@ -205,11 +205,6 @@ void SAL_CALL UcbStore::initialize( const Sequence< Any >& aArguments ) ...@@ -205,11 +205,6 @@ void SAL_CALL UcbStore::initialize( const Sequence< Any >& aArguments )
} }
const Sequence< Any >& UcbStore::getInitArgs() const
{
return m_pImpl->m_aInitArgs;
}
// PropertySetRegistry_Impl. // PropertySetRegistry_Impl.
......
...@@ -83,9 +83,6 @@ public: ...@@ -83,9 +83,6 @@ public:
initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
throw( css::uno::Exception, throw( css::uno::Exception,
css::uno::RuntimeException, std::exception ) override; css::uno::RuntimeException, std::exception ) override;
const css::uno::Sequence< css::uno::Any >&
getInitArgs() const;
}; };
......
...@@ -1333,8 +1333,8 @@ void SortedResultSet::PropertyChanged( const PropertyChangeEvent& rEvt ) ...@@ -1333,8 +1333,8 @@ void SortedResultSet::PropertyChanged( const PropertyChangeEvent& rEvt )
void SortedResultSet::CopyData( SortedResultSet *pSource ) void SortedResultSet::CopyData( SortedResultSet *pSource )
{ {
const SortedEntryList& rSrcS2O = pSource->GetS2OList(); const SortedEntryList& rSrcS2O = pSource->maS2O;
const SimpleList& rSrcO2S = pSource->GetO2SList(); const SimpleList& rSrcO2S = pSource->maO2S;
sal_IntPtr i, nCount; sal_IntPtr i, nCount;
...@@ -1354,11 +1354,11 @@ void SortedResultSet::CopyData( SortedResultSet *pSource ) ...@@ -1354,11 +1354,11 @@ void SortedResultSet::CopyData( SortedResultSet *pSource )
} }
mnLastSort = maS2O.Count(); mnLastSort = maS2O.Count();
mxOther = pSource->GetResultSet(); mxOther = pSource->mxOriginal;
if ( !mpSortInfo ) if ( !mpSortInfo )
{ {
mpSortInfo = pSource->GetSortInfo(); mpSortInfo = pSource->mpSortInfo;
mbIsCopy = true; mbIsCopy = true;
} }
} }
......
...@@ -164,11 +164,7 @@ public: ...@@ -164,11 +164,7 @@ public:
SortedResultSet( css::uno::Reference< css::sdbc::XResultSet > const & aResult ); SortedResultSet( css::uno::Reference< css::sdbc::XResultSet > const & aResult );
virtual ~SortedResultSet() override; virtual ~SortedResultSet() override;
const SortedEntryList& GetS2OList() const { return maS2O; } sal_IntPtr GetCount() const { return mnCount; }
const SimpleList& GetO2SList() const { return maO2S; }
const css::uno::Reference < css::sdbc::XResultSet >& GetResultSet() const { return mxOriginal; }
SortInfo* GetSortInfo() const { return mpSortInfo; }
sal_IntPtr GetCount() const { return mnCount; }
void CopyData( SortedResultSet* pSource ); void CopyData( SortedResultSet* pSource );
void Initialize( const css::uno::Sequence < css::ucb::NumberedSortingInfo > &xSortInfo, void Initialize( const css::uno::Sequence < css::ucb::NumberedSortingInfo > &xSortInfo,
......
...@@ -119,7 +119,7 @@ Storage::~Storage() ...@@ -119,7 +119,7 @@ Storage::~Storage()
m_xAggProxy->setDelegator( uno::Reference< uno::XInterface >() ); m_xAggProxy->setDelegator( uno::Reference< uno::XInterface >() );
// Never dispose a document storage. Not owner! // Never dispose a document storage. Not owner!
if ( !isDocumentStorage() ) if ( !m_bIsDocumentStorage )
{ {
if ( m_xWrappedComponent.is() ) if ( m_xWrappedComponent.is() )
{ {
......
...@@ -81,8 +81,6 @@ public: ...@@ -81,8 +81,6 @@ public:
const css::uno::Reference< css::embed::XStorage > & xStorageToWrap ); const css::uno::Reference< css::embed::XStorage > & xStorageToWrap );
virtual ~Storage() override; virtual ~Storage() override;
bool isDocumentStorage() const { return m_bIsDocumentStorage; }
// XInterface // XInterface
virtual css::uno::Any SAL_CALL queryInterface( virtual css::uno::Any SAL_CALL queryInterface(
const css::uno::Type& aType ) const css::uno::Type& aType )
......
...@@ -249,7 +249,7 @@ UUIInteractionHelper::handleErrorHandlerRequest( ...@@ -249,7 +249,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
return; return;
//TODO! remove this backwards compatibility? //TODO! remove this backwards compatibility?
OUString aContext(getContextProperty()); OUString aContext(m_aContextParam);
if (aContext.isEmpty() && nErrorCode != 0) if (aContext.isEmpty() && nErrorCode != 0)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
......
...@@ -977,12 +977,6 @@ UUIInteractionHelper::getParentXWindow() const ...@@ -977,12 +977,6 @@ UUIInteractionHelper::getParentXWindow() const
return m_xWindowParam; return m_xWindowParam;
} }
const OUString&
UUIInteractionHelper::getContextProperty()
{
return m_aContextParam;
}
uno::Reference< task::XInteractionHandler2 > uno::Reference< task::XInteractionHandler2 >
UUIInteractionHelper::getInteractionHandler() UUIInteractionHelper::getInteractionHandler()
{ {
......
...@@ -130,9 +130,6 @@ private: ...@@ -130,9 +130,6 @@ private:
const css::uno::Reference< css::awt::XWindow>& const css::uno::Reference< css::awt::XWindow>&
getParentXWindow() const; getParentXWindow() const;
const OUString&
getContextProperty();
css::uno::Reference< css::task::XInteractionHandler2 > css::uno::Reference< css::task::XInteractionHandler2 >
getInteractionHandler(); getInteractionHandler();
......
...@@ -33,7 +33,7 @@ void SSLWarnDialog::ViewCert() ...@@ -33,7 +33,7 @@ void SSLWarnDialog::ViewCert()
xDocumentDigitalSignatures = css::security::DocumentDigitalSignatures::createDefault( m_xContext ); xDocumentDigitalSignatures = css::security::DocumentDigitalSignatures::createDefault( m_xContext );
xDocumentDigitalSignatures.get()->showCertificate(getCert()); xDocumentDigitalSignatures.get()->showCertificate(m_rXCert);
} }
......
...@@ -42,8 +42,6 @@ public: ...@@ -42,8 +42,6 @@ public:
const css::uno::Reference< css::security::XCertificate >& rXCert, const css::uno::Reference< css::security::XCertificate >& rXCert,
const css::uno::Reference< css::uno::XComponentContext >& xContext ); const css::uno::Reference< css::uno::XComponentContext >& xContext );
const css::uno::Reference< css::security::XCertificate >& getCert() { return m_rXCert; }
virtual void response(short nResponseId) override; virtual void response(short nResponseId) override;
void setDescription1Text(const OUString &aText) { set_primary_text(aText); } void setDescription1Text(const OUString &aText) { set_primary_text(aText); }
......
...@@ -45,7 +45,7 @@ IMPL_LINK_NOARG(UnknownAuthDialog, ViewCertHdl_Impl, Button*, void) ...@@ -45,7 +45,7 @@ IMPL_LINK_NOARG(UnknownAuthDialog, ViewCertHdl_Impl, Button*, void)
uno::Reference< css::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures( uno::Reference< css::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures(
css::security::DocumentDigitalSignatures::createDefault(m_xContext) ); css::security::DocumentDigitalSignatures::createDefault(m_xContext) );
xDocumentDigitalSignatures.get()->showCertificate(getCert()); xDocumentDigitalSignatures.get()->showCertificate(m_rXCert);
} }
......
...@@ -49,11 +49,6 @@ public: ...@@ -49,11 +49,6 @@ public:
virtual ~UnknownAuthDialog() override; virtual ~UnknownAuthDialog() override;
virtual void dispose() override; virtual void dispose() override;
const css::uno::Reference< css::security::XCertificate >& getCert()
{
return m_rXCert;
}
void setDescriptionText(const OUString &rText) void setDescriptionText(const OUString &rText)
{ {
set_primary_text(rText); set_primary_text(rText);
......
...@@ -51,11 +51,6 @@ public: ...@@ -51,11 +51,6 @@ public:
return ( mnPages > 0 ); return ( mnPages > 0 );
} }
}; };
uno::Reference< container::XIndexAccess >
ScVbaMultiPage::getPages( sal_Int32 nPages )
{
return new PagesImpl( nPages );
}
ScVbaMultiPage::ScVbaMultiPage( ScVbaMultiPage::ScVbaMultiPage(
const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< ov::XHelperInterface >& xParent,
...@@ -99,7 +94,7 @@ ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException, std ...@@ -99,7 +94,7 @@ ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException, std
{ {
// get the container model // get the container model
uno::Reference< container::XNameContainer > xContainer( m_xProps, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameContainer > xContainer( m_xProps, uno::UNO_QUERY_THROW );
uno::Reference< XCollection > xColl( new ScVbaPages( this, mxContext, getPages( xContainer->getElementNames().getLength() ) ) ); uno::Reference< XCollection > xColl( new ScVbaPages( this, mxContext, new PagesImpl( xContainer->getElementNames().getLength() ) ) );
if ( !index.hasValue() ) if ( !index.hasValue() )
return uno::makeAny( xColl ); return uno::makeAny( xColl );
return xColl->Item( index, uno::Any() ); return xColl->Item( index, uno::Any() );
......
...@@ -31,7 +31,6 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XMultiPage > Mul ...@@ -31,7 +31,6 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XMultiPage > Mul
class ScVbaMultiPage : public MultiPageImpl_BASE class ScVbaMultiPage : public MultiPageImpl_BASE
{ {
static css::uno::Reference< css::container::XIndexAccess > getPages( sal_Int32 nPages );
public: public:
ScVbaMultiPage( ScVbaMultiPage(
const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< ov::XHelperInterface >& xParent,
......
...@@ -208,7 +208,7 @@ ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const un ...@@ -208,7 +208,7 @@ ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const un
uno::Sequence< beans::PropertyValue > aProps; uno::Sequence< beans::PropertyValue > aProps;
OUString sHelpUrl; OUString sHelpUrl;
sal_uInt16 nItemType = 0; sal_uInt16 nItemType = 0;
if( IsMenu() ) if( m_bIsMenu )
{ {
aProps = CreateMenuItemData( sCommandUrl, sHelpUrl, sLabel, nItemType, aSubMenu, true, true ); aProps = CreateMenuItemData( sCommandUrl, sHelpUrl, sLabel, nItemType, aSubMenu, true, true );
} }
......
...@@ -46,7 +46,6 @@ private: ...@@ -46,7 +46,6 @@ private:
public: public:
ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, VbaCommandBarHelperRef const & pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl ) throw( css::uno::RuntimeException ); ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, VbaCommandBarHelperRef const & pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl ) throw( css::uno::RuntimeException );
bool IsMenu(){ return m_bIsMenu; }
// XEnumerationAccess // XEnumerationAccess
virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) override; virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment