diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-08 10:38:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-08 09:49:48 +0000 |
commit | bbf6c5171706e55edcf8e011a536264f4f2efd99 (patch) | |
tree | 086e73ba7bcfb3a489b3e2523708e2a088245618 /forms | |
parent | bca707d0ec55c35e048405b05c9e283cf6b97239 (diff) |
loplugin:expandablemethods in forms..formula
Change-Id: Idc948ad06913def28cb642c3a4e5ea9322b9fb3b
Reviewed-on: https://gerrit.libreoffice.org/30688
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
26 files changed, 31 insertions, 206 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 26461d857322..74f3de8d3891 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -440,11 +440,6 @@ ODatabaseForm::~ODatabaseForm() // html tools -OUString ODatabaseForm::GetDataURLEncoded(const Reference<XControl>& SubmitButton, const css::awt::MouseEvent& MouseEvt) -{ - return GetDataEncoded(true,SubmitButton,MouseEvt); -} - OUString ODatabaseForm::GetDataEncoded(bool _bURLEncoded,const Reference<XControl>& SubmitButton, const css::awt::MouseEvent& MouseEvt) { // Fill List of successful Controls @@ -498,12 +493,6 @@ OUString ODatabaseForm::GetDataEncoded(bool _bURLEncoded,const Reference<XContro // html tools -OUString ODatabaseForm::GetDataTextEncoded(const Reference<XControl>& SubmitButton, const css::awt::MouseEvent& MouseEvt) -{ - return GetDataEncoded(false,SubmitButton,MouseEvt); -} - - Sequence<sal_Int8> ODatabaseForm::GetDataMultiPartEncoded(const Reference<XControl>& SubmitButton, const css::awt::MouseEvent& MouseEvt, OUString& rContentType) { @@ -2193,7 +2182,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const css::a OUString aData; { SolarMutexGuard aGuard; - aData = GetDataURLEncoded( Control, MouseEvt ); + aData = GetDataEncoded(true, Control, MouseEvt); } URL aURL; @@ -2265,7 +2254,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const css::a OUString aData; { SolarMutexGuard aGuard; - aData = GetDataTextEncoded( Reference<XControl> (), MouseEvt ); + aData = GetDataEncoded(false, Reference<XControl> (), MouseEvt); } lcl_dispatch(xFrame,xTransformer,aURLStr,aReferer,aTargetName,aData,osl_getThreadTextEncoding()); @@ -3730,23 +3719,9 @@ void SAL_CALL ODatabaseForm::propertyChange( const PropertyChangeEvent& evt ) th // css::lang::XServiceInfo -OUString SAL_CALL ODatabaseForm::getImplementationName_Static() -{ - return OUString( "com.sun.star.comp.forms.ODatabaseForm" ); -} - -Sequence< OUString > SAL_CALL ODatabaseForm::getSupportedServiceNames_Static() -{ - return css::uno::Sequence<OUString>{ - FRM_SUN_FORMCOMPONENT, "com.sun.star.form.FormComponents", - FRM_SUN_COMPONENT_FORM, FRM_SUN_COMPONENT_HTMLFORM, - FRM_SUN_COMPONENT_DATAFORM, FRM_COMPONENT_FORM}; -} - - OUString SAL_CALL ODatabaseForm::getImplementationName() throw( RuntimeException, std::exception ) { - return getImplementationName_Static(); + return OUString( "com.sun.star.comp.forms.ODatabaseForm" ); } @@ -3760,7 +3735,10 @@ Sequence< OUString > SAL_CALL ODatabaseForm::getSupportedServiceNames() throw( R // concat with out own services return ::comphelper::concatSequences( - getSupportedServiceNames_Static(), + css::uno::Sequence<OUString> { + FRM_SUN_FORMCOMPONENT, "com.sun.star.form.FormComponents", + FRM_SUN_COMPONENT_FORM, FRM_SUN_COMPONENT_HTMLFORM, + FRM_SUN_COMPONENT_DATAFORM, FRM_COMPONENT_FORM }, aServices ); } diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index efd64b111e10..c801f84e5a54 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -374,10 +374,6 @@ public: virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; - // css::lang::XServiceInfo - static version - static OUString SAL_CALL getImplementationName_Static(); - static css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(); - // css::io::XPersistObject virtual OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL write(const css::uno::Reference< css::io::XObjectOutputStream>& _rxOutStream) throw(css::io::IOException, css::uno::RuntimeException, std::exception) override; @@ -509,8 +505,6 @@ private: // html tools OUString GetDataEncoded(bool _bURLEncoded,const css::uno::Reference< css::awt::XControl>& SubmitButton, const css::awt::MouseEvent& MouseEvt); - OUString GetDataURLEncoded(const css::uno::Reference< css::awt::XControl>& SubmitButton, const css::awt::MouseEvent& MouseEvt); - OUString GetDataTextEncoded(const css::uno::Reference< css::awt::XControl>& SubmitButton, const css::awt::MouseEvent& MouseEvt); css::uno::Sequence<sal_Int8> GetDataMultiPartEncoded(const css::uno::Reference< css::awt::XControl>& SubmitButton, const css::awt::MouseEvent& MouseEvt, OUString& rContentType); diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx index 497aa6bfa2d6..2a112313b8d0 100644 --- a/forms/source/component/File.cxx +++ b/forms/source/component/File.cxx @@ -245,11 +245,10 @@ void SAL_CALL OFileControlModel::reset() throw ( css::uno::RuntimeException, std if (bContinue) { - { - // If Models are threadSafe - ::osl::MutexGuard aGuard(m_aMutex); - _reset(); - } + // don't lock our mutex as setting aggregate properties + // may cause any uno controls belonging to us to lock the solar mutex, which is potentially dangerous with + // our own mutex locked + m_xAggregateSet->setPropertyValue(PROPERTY_TEXT, makeAny(m_sDefaultValue)); m_aResetListeners.notifyEach( &XResetListener::resetted, aEvt ); } } @@ -267,16 +266,6 @@ void OFileControlModel::removeResetListener(const Reference<XResetListener>& _rx } -void OFileControlModel::_reset() -{ - { // release our mutex once (it's acquired in the calling method !), as setting aggregate properties - // may cause any uno controls belonging to us to lock the solar mutex, which is potentially dangerous with - // our own mutex locked - MutexRelease aRelease(m_aMutex); - m_xAggregateSet->setPropertyValue(PROPERTY_TEXT, makeAny(m_sDefaultValue)); - } -} - } // namespace frm extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL diff --git a/forms/source/component/File.hxx b/forms/source/component/File.hxx index a3888b5d14eb..2ac053d0ea1b 100644 --- a/forms/source/component/File.hxx +++ b/forms/source/component/File.hxx @@ -81,8 +81,6 @@ public: using OControlModel::getFastPropertyValue; protected: - void _reset(); - virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) throw (css::uno::RuntimeException, std::exception) override; }; diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index acafec2712ff..fd1ee7452bd8 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -873,7 +873,7 @@ namespace frm OUString SAL_CALL OFilterControl::getImplementationName( ) throw (RuntimeException, std::exception) { - return getImplementationName_Static(); + return OUString( "com.sun.star.comp.forms.OFilterControl" ); } sal_Bool SAL_CALL OFilterControl::supportsService( const OUString& ServiceName ) throw (RuntimeException, std::exception) @@ -883,20 +883,8 @@ namespace frm Sequence< OUString > SAL_CALL OFilterControl::getSupportedServiceNames( ) throw (RuntimeException, std::exception) { - return getSupportedServiceNames_Static(); - } - - OUString SAL_CALL OFilterControl::getImplementationName_Static() - { - return OUString( "com.sun.star.comp.forms.OFilterControl" ); - } - - Sequence< OUString > SAL_CALL OFilterControl::getSupportedServiceNames_Static() - { - Sequence< OUString > aNames( 2 ); - aNames[ 0 ] = "com.sun.star.form.control.FilterControl"; - aNames[ 1 ] = "com.sun.star.awt.UnoControl"; - return aNames; + return { "com.sun.star.form.control.FilterControl", + "com.sun.star.awt.UnoControl" }; } } // namespace frm diff --git a/forms/source/component/Filter.hxx b/forms/source/component/Filter.hxx index 63fd08e05dea..1267e1f55c91 100644 --- a/forms/source/component/Filter.hxx +++ b/forms/source/component/Filter.hxx @@ -127,10 +127,6 @@ namespace frm virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (css::uno::RuntimeException, std::exception) override; - // css::lang::XServiceInfo - static version - static OUString SAL_CALL getImplementationName_Static(); - static css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(); - protected: virtual void PrepareWindowDescriptor( css::awt::WindowDescriptor& rDesc ) override; virtual void ImplSetPeerProperty( const OUString& rPropName, const css::uno::Any& rVal ) override; diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index de1d7a51161e..80e85758801c 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -217,16 +217,8 @@ Sequence< OUString > OControl::getAggregateServiceNames() Sequence<OUString> SAL_CALL OControl::getSupportedServiceNames() throw(RuntimeException, std::exception) { - return ::comphelper::concatSequences( - getAggregateServiceNames(), - getSupportedServiceNames_Static() - ); -} - -Sequence< OUString > SAL_CALL OControl::getSupportedServiceNames_Static() throw( RuntimeException ) -{ // no own supported service names - return Sequence< OUString >(); + return getAggregateServiceNames(); } // XEventListener diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index fcfe5c8de178..4ad80031f502 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1062,7 +1062,7 @@ namespace frm sal_Int32 OListBoxModel::getValueType() const { - return impl_hasBoundComponent() ? m_nBoundColumnType : getFieldType(); + return (m_nBoundColumnType != css::sdbc::DataType::SQLNULL) ? m_nBoundColumnType : getFieldType(); } ValueList OListBoxModel::impl_getValues() const diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx index ec18eb9fa36d..e1977fe0cf08 100644 --- a/forms/source/component/ListBox.hxx +++ b/forms/source/component/ListBox.hxx @@ -234,8 +234,6 @@ private: sal_Int32 getValueType() const; void convertBoundValues(sal_Int32 nType) const; - - bool impl_hasBoundComponent() const { return m_nBoundColumnType != css::sdbc::DataType::SQLNULL; } }; diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx index 8b1a10219c8d..a5ca482f7d75 100644 --- a/forms/source/component/navigationbar.cxx +++ b/forms/source/component/navigationbar.cxx @@ -145,22 +145,12 @@ namespace frm OUString SAL_CALL ONavigationBarModel::getImplementationName() throw(RuntimeException, std::exception) { - return getImplementationName_Static(); + return OUString( "com.sun.star.comp.form.ONavigationBarModel" ); } Sequence< OUString > SAL_CALL ONavigationBarModel::getSupportedServiceNames() throw(RuntimeException, std::exception) { - return getSupportedServiceNames_Static(); - } - - OUString SAL_CALL ONavigationBarModel::getImplementationName_Static() - { - return OUString( "com.sun.star.comp.form.ONavigationBarModel" ); - } - - Sequence< OUString > SAL_CALL ONavigationBarModel::getSupportedServiceNames_Static() - { Sequence< OUString > aSupported = OControlModel::getSupportedServiceNames_Static(); aSupported.realloc( aSupported.getLength() + 2 ); diff --git a/forms/source/component/navigationbar.hxx b/forms/source/component/navigationbar.hxx index 7c165b17af30..862a2121cd83 100644 --- a/forms/source/component/navigationbar.hxx +++ b/forms/source/component/navigationbar.hxx @@ -67,10 +67,6 @@ namespace frm public: DECLARE_DEFAULT_LEAF_XTOR( ONavigationBarModel ); - // XServiceInfo - static version - static OUString SAL_CALL getImplementationName_Static(); - static css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(); - protected: // UNO DECLARE_UNO3_AGG_DEFAULTS( ONavigationBarModel, OControlModel ) diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx index 575aee78cdac..51c8f9a4bad3 100644 --- a/forms/source/inc/FormComponent.hxx +++ b/forms/source/inc/FormComponent.hxx @@ -131,14 +131,12 @@ namespace frm private: void impl_notifyAll_nothrow(); - private: OControlModel& m_rModel; bool m_bLocked; std::vector< sal_Int32 > m_aHandles; std::vector< css::uno::Any > m_aOldValues; std::vector< css::uno::Any > m_aNewValues; - private: ControlModelLock( const ControlModelLock& ) = delete; ControlModelLock& operator=( const ControlModelLock& ) = delete; }; @@ -235,9 +233,6 @@ protected: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override = 0; -// XServiceInfo - static version - static css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames_Static() throw(css::uno::RuntimeException); - // XControl virtual void SAL_CALL setContext(const css::uno::Reference<css::uno::XInterface>& Context) throw (css::uno::RuntimeException, std::exception) override; virtual css::uno::Reference<css::uno::XInterface> SAL_CALL getContext() throw (css::uno::RuntimeException, std::exception) override; diff --git a/forms/source/richtext/featuredispatcher.cxx b/forms/source/richtext/featuredispatcher.cxx index 30bb442ea414..6da6c8d9ba85 100644 --- a/forms/source/richtext/featuredispatcher.cxx +++ b/forms/source/richtext/featuredispatcher.cxx @@ -76,7 +76,7 @@ namespace frm if ( _rxControl.is() ) { m_aStatusListeners.addInterface( _rxControl ); - newStatusListener( _rxControl ); + doNotify( _rxControl, buildStatusEvent() ); } } @@ -113,12 +113,6 @@ namespace frm } - void ORichTextFeatureDispatcher::newStatusListener( const Reference< XStatusListener >& _rxListener ) - { - doNotify( _rxListener, buildStatusEvent() ); - } - - void ORichTextFeatureDispatcher::doNotify( const Reference< XStatusListener >& _rxListener, const FeatureStateEvent& _rEvent ) { OSL_PRECOND( _rxListener.is(), "ORichTextFeatureDispatcher::doNotify: invalid listener!" ); diff --git a/forms/source/richtext/featuredispatcher.hxx b/forms/source/richtext/featuredispatcher.hxx index 425735b582ac..4fc296272bd0 100644 --- a/forms/source/richtext/featuredispatcher.hxx +++ b/forms/source/richtext/featuredispatcher.hxx @@ -65,7 +65,6 @@ namespace frm void invalidate(); protected: - void newStatusListener( const css::uno::Reference< css::frame::XStatusListener >& _rxListener ); // overridables virtual void disposing( ::osl::ClearableMutexGuard& _rClearBeforeNotify ); virtual void invalidateFeatureState_Broadcast(); @@ -79,7 +78,6 @@ namespace frm const css::frame::FeatureStateEvent& _rEvent ); - protected: // XDispatch virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& _rxControl, const css::util::URL& _rURL ) throw (css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& _rxControl, const css::util::URL& _rURL ) throw (css::uno::RuntimeException, std::exception) override; diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index b961a320d638..a9f8775c415e 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -215,30 +215,16 @@ namespace frm } } - OUString SAL_CALL ORichTextControl::getImplementationName() throw( RuntimeException, std::exception ) { - return getImplementationName_Static(); - } - - - Sequence< OUString > SAL_CALL ORichTextControl::getSupportedServiceNames() throw( RuntimeException, std::exception ) - { - return getSupportedServiceNames_Static(); - } - - OUString SAL_CALL ORichTextControl::getImplementationName_Static() - { return OUString( "com.sun.star.comp.form.ORichTextControl" ); } - Sequence< OUString > SAL_CALL ORichTextControl::getSupportedServiceNames_Static() + Sequence< OUString > SAL_CALL ORichTextControl::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = "com.sun.star.awt.UnoControl"; - aServices[ 1 ] = "com.sun.star.awt.UnoControlEdit"; - aServices[ 2 ] = FRM_SUN_CONTROL_RICHTEXTCONTROL; - return aServices; + return { "com.sun.star.awt.UnoControl", + "com.sun.star.awt.UnoControlEdit", + FRM_SUN_CONTROL_RICHTEXTCONTROL }; } Reference< XDispatch > SAL_CALL ORichTextControl::queryDispatch( const css::util::URL& _rURL, const OUString& _rTargetFrameName, sal_Int32 _nSearchFlags ) throw (RuntimeException, std::exception) diff --git a/forms/source/richtext/richtextcontrol.hxx b/forms/source/richtext/richtextcontrol.hxx index 993bd21edff5..f0b9cb66c775 100644 --- a/forms/source/richtext/richtextcontrol.hxx +++ b/forms/source/richtext/richtextcontrol.hxx @@ -51,12 +51,6 @@ namespace frm protected: virtual ~ORichTextControl() override; - public: - // XServiceInfo - static version - static OUString SAL_CALL getImplementationName_Static(); - static css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(); - - protected: // UNO DECLARE_UNO3_AGG_DEFAULTS( ORichTextControl, UnoEditControl ) virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) throw ( css::uno::RuntimeException, std::exception ) override; diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index d072bad88927..5dcf54c7131f 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -160,7 +160,7 @@ namespace frm void RichTextControl::GetFocus() { - getViewport().GrabFocus(); + m_pImpl->getViewport( RichTextControlImpl::GrantAccess() )->GrabFocus(); } @@ -320,12 +320,6 @@ namespace frm } - vcl::Window& RichTextControl::getViewport() const - { - return *m_pImpl->getViewport( RichTextControlImpl::GrantAccess() ); - } - - void RichTextControl::SetReadOnly( bool _bReadOnly ) { m_pImpl->SetReadOnly( _bReadOnly ); diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx index 6725ab78bd5f..00c366369f3c 100644 --- a/forms/source/richtext/richtextvclcontrol.hxx +++ b/forms/source/richtext/richtextvclcontrol.hxx @@ -118,7 +118,6 @@ namespace frm private: EditEngine& getEngine() const; - vcl::Window& getViewport() const; }; diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index c59b805c67a0..75c56f19aee0 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -131,17 +131,6 @@ namespace frm { } - OUString FormOperations::getImplementationName_Static( ) throw(RuntimeException) - { - return OUString( "com.sun.star.comp.forms.FormOperations" ); - } - - Sequence< OUString > FormOperations::getSupportedServiceNames_Static( ) throw(RuntimeException) - { - Sequence< OUString > aNames { "com.sun.star.form.runtime.FormOperations" }; - return aNames; - } - void SAL_CALL FormOperations::initialize( const Sequence< Any >& _arguments ) throw (Exception, RuntimeException, std::exception) { if ( m_bConstructed ) @@ -165,7 +154,7 @@ namespace frm OUString SAL_CALL FormOperations::getImplementationName( ) throw (RuntimeException, std::exception) { - return getImplementationName_Static(); + return OUString( "com.sun.star.comp.forms.FormOperations" ); } sal_Bool SAL_CALL FormOperations::supportsService( const OUString& ServiceName ) throw (RuntimeException, std::exception) @@ -175,7 +164,7 @@ namespace frm Sequence< OUString > SAL_CALL FormOperations::getSupportedServiceNames( ) throw (RuntimeException, std::exception) { - return getSupportedServiceNames_Static(); + return { "com.sun.star.form.runtime.FormOperations" }; } Reference< XRowSet > SAL_CALL FormOperations::getCursor() throw (RuntimeException, std::exception) diff --git a/forms/source/runtime/formoperations.hxx b/forms/source/runtime/formoperations.hxx index 3d94b7aaea95..1e43dcd58801 100644 --- a/forms/source/runtime/formoperations.hxx +++ b/forms/source/runtime/formoperations.hxx @@ -78,10 +78,6 @@ namespace frm public: explicit FormOperations( const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); - // XServiceInfo - static versions - static OUString getImplementationName_Static( ) throw(css::uno::RuntimeException); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ) throw(css::uno::RuntimeException); - struct MethodAccess { friend class MethodGuard; private: MethodAccess() { } }; inline void enterMethod( MethodAccess ) const diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index 91f6a8a82f1c..c12b0e289118 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -165,28 +165,14 @@ namespace frm OUString SAL_CALL ONavigationBarControl::getImplementationName() throw( RuntimeException, std::exception ) { - return getImplementationName_Static(); - } - - - Sequence< OUString > SAL_CALL ONavigationBarControl::getSupportedServiceNames() throw( RuntimeException, std::exception ) - { - return getSupportedServiceNames_Static(); - } - - - OUString SAL_CALL ONavigationBarControl::getImplementationName_Static() - { return OUString( "com.sun.star.comp.form.ONavigationBarControl" ); } - Sequence< OUString > SAL_CALL ONavigationBarControl::getSupportedServiceNames_Static() + Sequence< OUString > SAL_CALL ONavigationBarControl::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = "com.sun.star.awt.UnoControl"; - aServices[ 1 ] = "com.sun.star.form.control.NavigationToolBar"; - return aServices; + return { "com.sun.star.awt.UnoControl", + "com.sun.star.form.control.NavigationToolBar" }; } diff --git a/forms/source/solar/component/navbarcontrol.hxx b/forms/source/solar/component/navbarcontrol.hxx index 3fa62b30ac7c..8f73cbe53a93 100644 --- a/forms/source/solar/component/navbarcontrol.hxx +++ b/forms/source/solar/component/navbarcontrol.hxx @@ -51,12 +51,6 @@ namespace frm protected: virtual ~ONavigationBarControl() override; - public: - // XServiceInfo - static version - static OUString SAL_CALL getImplementationName_Static(); - static css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(); - - protected: // UNO DECLARE_UNO3_AGG_DEFAULTS( ONavigationBarControl, UnoControl ) virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) throw ( css::uno::RuntimeException, std::exception ) override; diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index f0f6f0a80829..ae15046a045d 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -171,12 +171,7 @@ namespace frm if ( pPositionWindow ) pPositionWindow->setDispatcher( _pDispatcher ); - updateFeatureStates( ); - } - - - void NavigationToolBar::updateFeatureStates( ) - { + // update feature states for ( sal_uInt16 nPos = 0; nPos < m_pToolbar->GetItemCount(); ++nPos ) { sal_uInt16 nItemId = m_pToolbar->GetItemId( nPos ); diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx index b195f7ba9b55..5adae53dae9b 100644 --- a/forms/source/solar/inc/navtoolbar.hxx +++ b/forms/source/solar/inc/navtoolbar.hxx @@ -132,10 +132,6 @@ namespace frm /// enables or disables an item, plus possible dependent items void implEnableItem( sal_uInt16 _nItemId, bool _bEnabled ); - /** update the states of all features, using the callback - */ - void updateFeatureStates( ); - // iterating through item windows typedef void (NavigationToolBar::*ItemWindowHandler) (sal_uInt16, vcl::Window*) const; void forEachItemWindow( ItemWindowHandler _handler ); diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index 8b87a9984809..120cc66faebc 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -456,13 +456,6 @@ void Binding::checkLive() throw RuntimeException( EXCEPT("Binding not initialized") ); } -void Binding::checkModel() - throw( RuntimeException ) -{ - if( ! mxModel.is() ) - throw RuntimeException( EXCEPT("Binding has no Model") ); -} - bool Binding::isLive() const { const Model* pModel = getModelImpl(); @@ -548,7 +541,8 @@ static void lcl_removeListenerFromNode( const Reference<XNode>& xNode, void Binding::bind( bool bForceRebind ) { - checkModel(); + if( ! mxModel.is() ) + throw RuntimeException( EXCEPT("Binding has no Model") ); // bind() will evaluate this binding as follows: // 1) evaluate the binding expression diff --git a/forms/source/xforms/binding.hxx b/forms/source/xforms/binding.hxx index 42fba2ca7d72..169cdd100ac6 100644 --- a/forms/source/xforms/binding.hxx +++ b/forms/source/xforms/binding.hxx @@ -266,10 +266,6 @@ private: /// (to be used be API methods before acting on the object) void checkLive() throw( css::uno::RuntimeException ); - /// check whether binding has a model, and throw exception if not - /// (to be used be API methods before acting on the object) - void checkModel() throw( css::uno::RuntimeException ); - /// determine whether object is live /// live: has model, and model has been initialized bool isLive() const; |