[Libreoffice-commits] core.git: forms/source formula/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Nov 8 09:50:17 UTC 2016


 forms/source/component/DatabaseForm.cxx        |   36 ++++---------------------
 forms/source/component/DatabaseForm.hxx        |    6 ----
 forms/source/component/File.cxx                |   19 ++-----------
 forms/source/component/File.hxx                |    2 -
 forms/source/component/Filter.cxx              |   18 ++----------
 forms/source/component/Filter.hxx              |    4 --
 forms/source/component/FormComponent.cxx       |   10 ------
 forms/source/component/ListBox.cxx             |    2 -
 forms/source/component/ListBox.hxx             |    2 -
 forms/source/component/navigationbar.cxx       |   12 --------
 forms/source/component/navigationbar.hxx       |    4 --
 forms/source/inc/FormComponent.hxx             |    5 ---
 forms/source/richtext/featuredispatcher.cxx    |    8 -----
 forms/source/richtext/featuredispatcher.hxx    |    2 -
 forms/source/richtext/richtextcontrol.cxx      |   22 ++-------------
 forms/source/richtext/richtextcontrol.hxx      |    6 ----
 forms/source/richtext/richtextvclcontrol.cxx   |    8 -----
 forms/source/richtext/richtextvclcontrol.hxx   |    1 
 forms/source/runtime/formoperations.cxx        |   15 +---------
 forms/source/runtime/formoperations.hxx        |    4 --
 forms/source/solar/component/navbarcontrol.cxx |   20 ++-----------
 forms/source/solar/component/navbarcontrol.hxx |    6 ----
 forms/source/solar/control/navtoolbar.cxx      |    7 ----
 forms/source/solar/inc/navtoolbar.hxx          |    4 --
 forms/source/xforms/binding.cxx                |   10 +-----
 forms/source/xforms/binding.hxx                |    4 --
 formula/source/ui/dlg/funcpage.cxx             |    8 -----
 formula/source/ui/dlg/funcpage.hxx             |    1 
 formula/source/ui/dlg/parawin.cxx              |    7 ----
 formula/source/ui/dlg/parawin.hxx              |    1 
 30 files changed, 33 insertions(+), 221 deletions(-)

New commits:
commit bbf6c5171706e55edcf8e011a536264f4f2efd99
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Nov 8 10:38:54 2016 +0200

    loplugin:expandablemethods in forms..formula
    
    Change-Id: Idc948ad06913def28cb642c3a4e5ea9322b9fb3b
    Reviewed-on: https://gerrit.libreoffice.org/30688
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 26461d8..74f3de8 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 efd64b1..c801f84 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 497aa6b..2a11231 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 a3888b5..2ac053d 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 acafec2..fd1ee74 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 63fd08e..1267e1f 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 de1d7a5..80e8575 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 fcfe5c8..4ad8003 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 ec18eb9..e1977fe 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 8b1a102..a5ca482 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 7c165b1..862a212 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 575aee7..51c8f9a 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 30bb442..6da6c8d 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 425735b..4fc2962 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 b961a32..a9f8775 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 993bd21..f0b9cb6 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 d072bad..5dcf54c 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 6725ab7..00c3663 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 c59b805..75c56f1 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 3d94b7a..1e43dcd 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 91f6a8a..c12b0e2 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 3fa62b3..8f73cbe 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 f0f6f0a..ae15046a 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 b195f7b..5adae53 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 8b87a99..120cc66 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 42fba2c..169cdd1 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;
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index b2492eb..466857f 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -73,7 +73,7 @@ FuncPage::FuncPage(vcl::Window* pParent,const IFunctionManager* _pFunctionManage
     m_pLbFunction->set_width_request(aSize.Width());
     m_aHelpId = m_pLbFunction->GetHelpId();
 
-    InitLRUList();
+    m_pFunctionManager->fillLastRecentlyUsedFunctions(aLRUList);
 
     const sal_uInt32 nCategoryCount = m_pFunctionManager->getCount();
     for(sal_uInt32 j= 0; j < nCategoryCount; ++j)
@@ -296,12 +296,6 @@ const IFunctionDescription* FuncPage::GetFuncDesc( sal_Int32 nPos ) const
     return static_cast<const IFunctionDescription*>(m_pLbFunction->GetEntryData(nPos));
 }
 
-void FuncPage::InitLRUList()
-{
-    m_pFunctionManager->fillLastRecentlyUsedFunctions(aLRUList);
-}
-
-
 } // formula
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx
index a520b6c..efdd45b 100644
--- a/formula/source/ui/dlg/funcpage.hxx
+++ b/formula/source/ui/dlg/funcpage.hxx
@@ -78,7 +78,6 @@ private:
 protected:
 
     void            UpdateFunctionList(const OUString&);
-    void            InitLRUList();
 
 
 public:
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index a6d5f41..1e6823a 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -324,11 +324,6 @@ void ParaWin::SetArgument(sal_uInt16 no, const OUString& aString)
         aParaArray[no] = comphelper::string::stripStart(aString, ' ');
 }
 
-void ParaWin::DelParaArray()
-{
-    ::std::vector<OUString>().swap(aParaArray);
-}
-
 void ParaWin::SetArgumentFonts(const vcl::Font&aBoldFont,const vcl::Font&aLightFont)
 {
     aFntBold=aBoldFont;
@@ -432,7 +427,7 @@ void ParaWin::ClearAll()
 
 void ParaWin::SetArgumentOffset(sal_uInt16 nOffset)
 {
-    DelParaArray();
+    aParaArray.clear();
     m_pSlider->SetThumbPos(0);
 
     aParaArray.resize(nArgs);
diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx
index a1c1ad6..7fff5ae 100644
--- a/formula/source/ui/dlg/parawin.hxx
+++ b/formula/source/ui/dlg/parawin.hxx
@@ -106,7 +106,6 @@ protected:
         void            InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, PushButton& rBtnFx,
                                         ArgEdit& rEdArg, RefButton& rRefBtn);
 
-        void            DelParaArray();
         void            SetArgumentDesc(const OUString& aText);
         void            SetArgumentText(const OUString& aText);
 


More information about the Libreoffice-commits mailing list