[Libreoffice-commits] core.git: 20 commits - chart2/source compilerplugins/clang dbaccess/source extensions/source forms/source formula/source include/formula include/sfx2 io/source sc/source sfx2/source sw/inc sw/source toolkit/source ucb/source xmlhelp/source

Noel Grandin noel at peralex.com
Mon Oct 12 00:14:09 PDT 2015


 chart2/source/controller/inc/ChartController.hxx         |   96 ++----
 chart2/source/controller/main/ChartController_Window.cxx |   26 -
 chart2/source/controller/main/ChartWindow.cxx            |   20 -
 compilerplugins/clang/mergeclasses.py                    |    5 
 compilerplugins/clang/mergeclasses.results               |   65 ----
 dbaccess/source/ui/app/AppController.cxx                 |   46 +-
 dbaccess/source/ui/app/AppController.hxx                 |   70 ++--
 dbaccess/source/ui/app/AppDetailPageHelper.cxx           |    8 
 dbaccess/source/ui/app/AppDetailPageHelper.hxx           |    1 
 dbaccess/source/ui/app/AppDetailView.cxx                 |    2 
 dbaccess/source/ui/app/AppSwapWindow.cxx                 |    2 
 dbaccess/source/ui/app/AppView.cxx                       |    4 
 dbaccess/source/ui/app/AppView.hxx                       |    9 
 dbaccess/source/ui/app/IApplicationController.hxx        |   90 -----
 extensions/source/propctrlr/commoncontrol.cxx            |   49 ---
 extensions/source/propctrlr/commoncontrol.hxx            |  232 +++------------
 extensions/source/propctrlr/standardcontrol.cxx          |   43 +-
 extensions/source/propctrlr/standardcontrol.hxx          |   50 +--
 extensions/source/propctrlr/usercontrol.cxx              |    3 
 extensions/source/propctrlr/usercontrol.hxx              |   16 -
 forms/source/richtext/richtextimplcontrol.cxx            |    2 
 forms/source/richtext/richtextimplcontrol.hxx            |    2 
 forms/source/richtext/rtattributehandler.cxx             |    4 
 forms/source/richtext/rtattributehandler.hxx             |   28 -
 formula/source/ui/dlg/formula.cxx                        |    8 
 formula/source/ui/dlg/structpg.hxx                       |    7 
 include/formula/IFunctionDescription.hxx                 |   13 
 include/sfx2/sfxstatuslistener.hxx                       |   10 
 include/sfx2/tbxctrl.hxx                                 |   24 -
 io/source/stm/omark.cxx                                  |    4 
 io/source/stm/opipe.cxx                                  |    4 
 io/source/stm/streamhelper.hxx                           |  104 ++----
 sc/source/filter/inc/excelhandlers.hxx                   |   22 -
 sc/source/filter/oox/excelhandlers.cxx                   |    4 
 sfx2/source/toolbox/tbxitem.cxx                          |   18 +
 sw/inc/docary.hxx                                        |   32 --
 sw/source/core/doc/docredln.cxx                          |   26 -
 toolkit/source/awt/vclxtoolkit.cxx                       |    4 
 ucb/source/ucp/ftp/ftpcontentprovider.hxx                |   17 -
 ucb/source/ucp/ftp/ftphandleprovider.hxx                 |   58 ---
 ucb/source/ucp/ftp/ftpurl.cxx                            |    4 
 ucb/source/ucp/ftp/ftpurl.hxx                            |    6 
 xmlhelp/source/cxxhelp/provider/db.hxx                   |   17 -
 43 files changed, 374 insertions(+), 881 deletions(-)

New commits:
commit b6273d930e70225c6671b3ecadac93be8b5e13d8
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 17:44:20 2015 +0200

    some small cleanups
    
    Change-Id: I03221fd5e618155dc093dd4dd7474f516d63761e

diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx
index 04030f2..325f129 100644
--- a/extensions/source/propctrlr/commoncontrol.cxx
+++ b/extensions/source/propctrlr/commoncontrol.cxx
@@ -97,7 +97,7 @@ namespace pcr
 
     IMPL_LINK( CommonBehaviourControlHelper, ModifiedHdl, vcl::Window*, /*_pWin*/ )
     {
-        modified();
+        setModified();
         return 0;
     }
 
diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx
index 379ce65..d1ab9ed 100644
--- a/extensions/source/propctrlr/commoncontrol.hxx
+++ b/extensions/source/propctrlr/commoncontrol.hxx
@@ -67,7 +67,7 @@ namespace pcr
 
         virtual ~CommonBehaviourControlHelper();
 
-        virtual void modified() { m_bModified = true; }
+        virtual void setModified() { m_bModified = true; }
 
         // XPropertyControl
         ::sal_Int16 SAL_CALL getControlType() throw (css::uno::RuntimeException) { return m_nControlType; }
@@ -108,7 +108,6 @@ namespace pcr
                                     ,public CommonBehaviourControlHelper
     {
     protected:
-        typedef ::comphelper::OBaseMutex                                MutexBaseClass;
         typedef ::cppu::WeakComponentImplHelper< TControlInterface >    ComponentBaseClass;
 
         inline CommonBehaviourControl( sal_Int16 _nControlType, vcl::Window* _pParentWindow, WinBits _nWindowStyle, bool _bDoSetHandlers = true );
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index e343a6c..3fa2462 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -217,9 +217,9 @@ namespace pcr
     }
 
 
-    void OEditControl::modified()
+    void OEditControl::setModified()
     {
-        OEditControl_Base::modified();
+        OEditControl_Base::setModified();
 
         // for password controls, we fire a commit for every single change
         if ( m_bIsPassword )
@@ -781,9 +781,9 @@ namespace pcr
     }
 
 
-    void OColorControl::modified()
+    void OColorControl::setModified()
     {
-        OColorControl_Base::modified();
+        OColorControl_Base::setModified();
 
         if ( !getTypedControlWindow()->IsTravelSelect() )
             // fire a commit
@@ -873,9 +873,9 @@ namespace pcr
     }
 
 
-    void OListboxControl::modified()
+    void OListboxControl::setModified()
     {
-        OListboxControl_Base::modified();
+        OListboxControl_Base::setModified();
 
         if ( !getTypedControlWindow()->IsTravelSelect() )
             // fire a commit
diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx
index e931921..4169fec 100644
--- a/extensions/source/propctrlr/standardcontrol.hxx
+++ b/extensions/source/propctrlr/standardcontrol.hxx
@@ -112,7 +112,7 @@ namespace pcr
 
     protected:
         // CommonBehaviourControlHelper::modified
-        virtual void modified() SAL_OVERRIDE;
+        virtual void setModified() SAL_OVERRIDE;
     };
 
 
@@ -271,8 +271,8 @@ namespace pcr
         virtual css::uno::Sequence< OUString > SAL_CALL getListEntries(  ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     protected:
-        // CommonBehaviourControlHelper::modified
-        virtual void modified() SAL_OVERRIDE;
+        // CommonBehaviourControlHelper::setModified
+        virtual void setModified() SAL_OVERRIDE;
     };
 
 
@@ -298,8 +298,8 @@ namespace pcr
         virtual css::uno::Sequence< OUString > SAL_CALL getListEntries(  ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     protected:
-        // CommonBehaviourControlHelper::modified
-        virtual void modified() SAL_OVERRIDE;
+        // CommonBehaviourControlHelper::setModified
+        virtual void setModified() SAL_OVERRIDE;
     };
 
 
commit 7912d5fb74ece92b2229c662a3a9aff8eb201c5a
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 17:40:07 2015 +0200

    now we can get rid of the convoluted ControlWindow template
    
    Change-Id: I4365e5819784a26f4a71eab8a64cc53ef35d9ad1

diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx
index 3a3509a..379ce65 100644
--- a/extensions/source/propctrlr/commoncontrol.hxx
+++ b/extensions/source/propctrlr/commoncontrol.hxx
@@ -35,27 +35,6 @@ namespace pcr
 {
 
 
-    class CommonBehaviourControlHelper;
-
-    template< class TControlWindow >
-    class ControlWindow : public TControlWindow
-    {
-    protected:
-        CommonBehaviourControlHelper*  m_pHelper;
-
-    public:
-        ControlWindow( vcl::Window* _pParent, WinBits _nStyle )
-            :TControlWindow( _pParent, _nStyle )
-            ,m_pHelper( NULL )
-        {
-        }
-
-        /// sets a CommonBehaviourControlHelper instance which some functionality is delegated to
-        virtual void setControlHelper( CommonBehaviourControlHelper& _rControlHelper )
-        { m_pHelper = &_rControlHelper; }
-    };
-
-
     //= CommonBehaviourControlHelper
 
     /** A helper class for implementing the <type scope="css::inspection">XPropertyControl</type>
@@ -121,7 +100,7 @@ namespace pcr
         @param TControlInterface
             an interface class which is derived from (or identical to) <type scope="css::inspection">XPropertyControl</type>
         @param TControlWindow
-            a class which is derived from ControlWindow
+            a class which is derived from vcl::Window
     */
     template < class TControlInterface, class TControlWindow >
     class CommonBehaviourControl    :public ::comphelper::OBaseMutex
@@ -180,7 +159,6 @@ namespace pcr
         ,CommonBehaviourControlHelper( _nControlType, *this )
         ,m_pControlWindow( new TControlWindow( _pParentWindow, _nWindowStyle ) )
     {
-        m_pControlWindow->setControlHelper( *this );
         if ( _bDoSetHandlers )
         {
             m_pControlWindow->SetModifyHdl( LINK( this, CommonBehaviourControlHelper, ModifiedHdl ) );
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 3620e38..e343a6c 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -115,7 +115,7 @@ namespace pcr
     ODateControl::ODateControl( vcl::Window* pParent, WinBits nWinStyle )
         :ODateControl_Base( PropertyControlType::DateField, pParent, nWinStyle | WB_DROPDOWN )
     {
-        ControlWindow<CalendarField>* pControlWindow = getTypedControlWindow();
+        CalendarField* pControlWindow = getTypedControlWindow();
         pControlWindow->SetStrictFormat(true);
 
         pControlWindow->SetMin( ::Date( 1,1,1600 ) );
@@ -1031,7 +1031,7 @@ namespace pcr
 
 
     DropDownEditControl::DropDownEditControl( vcl::Window* _pParent, WinBits _nStyle )
-        :DropDownEditControl_Base( _pParent, _nStyle )
+        :Edit( _pParent, _nStyle )
         ,m_pFloatingEdit( NULL )
         ,m_pDropdownButton( NULL )
         ,m_nOperationMode( eStringList )
@@ -1060,7 +1060,7 @@ namespace pcr
 
     void DropDownEditControl::setControlHelper( CommonBehaviourControlHelper& _rControlHelper )
     {
-        DropDownEditControl_Base::setControlHelper( _rControlHelper );
+        m_pHelper = &_rControlHelper;
         m_pFloatingEdit->getEdit().SetModifyHdl( LINK( &_rControlHelper, CommonBehaviourControlHelper, ModifiedHdl ) );
         m_pImplEdit->SetGetFocusHdl( LINK( &_rControlHelper, CommonBehaviourControlHelper, GetFocusHdl ) );
         m_pImplEdit->SetModifyHdl( LINK( &_rControlHelper, CommonBehaviourControlHelper, ModifiedHdl ) );
@@ -1079,7 +1079,7 @@ namespace pcr
         m_pImplEdit.disposeAndClear();
         m_pFloatingEdit.disposeAndClear();
         m_pDropdownButton.disposeAndClear();
-        DropDownEditControl_Base::dispose();
+        Edit::dispose();
     }
 
 
@@ -1127,7 +1127,7 @@ namespace pcr
                     ||  m_nOperationMode == eMultiLineText
                     )
             {
-                bResult = DropDownEditControl_Base::PreNotify( rNEvt );
+                bResult = Edit::PreNotify( rNEvt );
             }
             else if ( m_nOperationMode == eStringList )
             {
@@ -1151,7 +1151,7 @@ namespace pcr
             }
         }
         else
-            bResult = DropDownEditControl_Base::PreNotify(rNEvt);
+            bResult = Edit::PreNotify(rNEvt);
 
         return bResult;
     }
@@ -1362,6 +1362,7 @@ namespace pcr
                                    , false )
     {
         getTypedControlWindow()->setOperationMode( _eMode );
+        getTypedControlWindow()->setControlHelper( *this );
     }
 
 
diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx
index 8c2220c..e931921 100644
--- a/extensions/source/propctrlr/standardcontrol.hxx
+++ b/extensions/source/propctrlr/standardcontrol.hxx
@@ -52,24 +52,21 @@ namespace pcr
         as all other windows.
     */
     template< class TListboxWindow >
-    class ListLikeControlWithModifyHandler : public ControlWindow< TListboxWindow >
+    class ListLikeControlWithModifyHandler : public TListboxWindow
     {
-    protected:
-        typedef ControlWindow< TListboxWindow >  ListBoxType;
-
     public:
         ListLikeControlWithModifyHandler( vcl::Window* _pParent, WinBits _nStyle )
-            :ListBoxType( _pParent, _nStyle )
+            : TListboxWindow( _pParent, _nStyle )
         {
         }
 
-        void SetModifyHdl( const Link<>& _rLink ) { ListBoxType::SetSelectHdl( _rLink ); }
+        void SetModifyHdl( const Link<>& _rLink ) { TListboxWindow::SetSelectHdl( _rLink ); }
     };
 
 
     //= OTimeControl
 
-    typedef CommonBehaviourControl< css::inspection::XPropertyControl, ControlWindow< TimeField > > OTimeControl_Base;
+    typedef CommonBehaviourControl< css::inspection::XPropertyControl, TimeField > OTimeControl_Base;
     class OTimeControl : public OTimeControl_Base
     {
     public:
@@ -84,7 +81,7 @@ namespace pcr
 
     //= ODateControl
 
-    typedef CommonBehaviourControl< css::inspection::XPropertyControl, ControlWindow< CalendarField > > ODateControl_Base;
+    typedef CommonBehaviourControl< css::inspection::XPropertyControl, CalendarField > ODateControl_Base;
     class ODateControl : public ODateControl_Base
     {
     public:
@@ -99,7 +96,7 @@ namespace pcr
 
     //= OEditControl
 
-    typedef CommonBehaviourControl< css::inspection::XPropertyControl, ControlWindow< Edit > > OEditControl_Base;
+    typedef CommonBehaviourControl< css::inspection::XPropertyControl, Edit > OEditControl_Base;
     class OEditControl : public OEditControl_Base
     {
     protected:
@@ -121,7 +118,7 @@ namespace pcr
 
     //= ODateTimeControl
 
-    typedef CommonBehaviourControl< css::inspection::XPropertyControl, ControlWindow< FormattedField > > ODateTimeControl_Base;
+    typedef CommonBehaviourControl< css::inspection::XPropertyControl, FormattedField > ODateTimeControl_Base;
     class ODateTimeControl : public ODateTimeControl_Base
     {
     public:
@@ -164,7 +161,7 @@ namespace pcr
 
     //= OHyperlinkControl
 
-    typedef CommonBehaviourControl< css::inspection::XHyperlinkControl, ControlWindow< HyperlinkInput > > OHyperlinkControl_Base;
+    typedef CommonBehaviourControl< css::inspection::XHyperlinkControl, HyperlinkInput > OHyperlinkControl_Base;
     class OHyperlinkControl : public OHyperlinkControl_Base
     {
     private:
@@ -193,13 +190,11 @@ namespace pcr
 
     //= CustomConvertibleNumericField
 
-    class CustomConvertibleNumericField : public ControlWindow< MetricField >
+    class CustomConvertibleNumericField : public MetricField
     {
-        typedef ControlWindow< MetricField > BaseClass;
-
     public:
         CustomConvertibleNumericField( vcl::Window* _pParent, WinBits _nStyle )
-            :BaseClass( _pParent, _nStyle )
+            :MetricField( _pParent, _nStyle )
         {
         }
 
@@ -310,7 +305,7 @@ namespace pcr
 
     //= OComboboxControl
 
-    typedef CommonBehaviourControl< css::inspection::XStringListControl, ControlWindow< ComboBox > > OComboboxControl_Base;
+    typedef CommonBehaviourControl< css::inspection::XStringListControl, ComboBox > OComboboxControl_Base;
     class OComboboxControl : public OComboboxControl_Base
     {
     public:
@@ -343,23 +338,24 @@ namespace pcr
     //= DropDownEditControl
 
     class OMultilineFloatingEdit;
-    typedef ControlWindow< Edit > DropDownEditControl_Base;
     /** an Edit field which can be used as ControlWindow, and has a drop-down button
     */
-    class DropDownEditControl : public DropDownEditControl_Base
+    class DropDownEditControl : public Edit
     {
     private:
-        VclPtr<OMultilineFloatingEdit>             m_pFloatingEdit;
+        VclPtr<OMultilineFloatingEdit>      m_pFloatingEdit;
         VclPtr<MultiLineEdit>               m_pImplEdit;
-        VclPtr<PushButton>                         m_pDropdownButton;
+        VclPtr<PushButton>                  m_pDropdownButton;
         MultiLineOperationMode              m_nOperationMode;
         bool                                m_bDropdown : 1;
+        CommonBehaviourControlHelper*       m_pHelper;
 
     public:
         DropDownEditControl( vcl::Window* _pParent, WinBits _nStyle );
         virtual ~DropDownEditControl();
         virtual void dispose() SAL_OVERRIDE;
 
+        void           setControlHelper( CommonBehaviourControlHelper& _rControlHelper );
         void setOperationMode( MultiLineOperationMode _eMode ) { m_nOperationMode = _eMode; }
         MultiLineOperationMode getOperationMode() const { return m_nOperationMode; }
 
@@ -370,9 +366,6 @@ namespace pcr
         StlSyntaxSequence< OUString >
                         GetStringListValue() const;
 
-        // ControlWindow overridables
-        virtual void setControlHelper( CommonBehaviourControlHelper& _rControlHelper ) SAL_OVERRIDE;
-
     protected:
         // Window overridables
         virtual bool    PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx
index be37b74..a11962a 100644
--- a/extensions/source/propctrlr/usercontrol.cxx
+++ b/extensions/source/propctrlr/usercontrol.cxx
@@ -61,7 +61,7 @@ namespace pcr
             }
         }
 
-        return BaseClass::PreNotify( rNEvt );
+        return FormattedField::PreNotify( rNEvt );
     }
 
 
@@ -90,6 +90,7 @@ namespace pcr
     OFormatSampleControl::OFormatSampleControl( vcl::Window* pParent, WinBits nWinStyle )
         :OFormatSampleControl_Base( PropertyControlType::Unknown, pParent, nWinStyle )
     {
+        getTypedControlWindow()->setControlHelper(*this);
     }
 
 
diff --git a/extensions/source/propctrlr/usercontrol.hxx b/extensions/source/propctrlr/usercontrol.hxx
index 0fd96b9..f10750b 100644
--- a/extensions/source/propctrlr/usercontrol.hxx
+++ b/extensions/source/propctrlr/usercontrol.hxx
@@ -35,21 +35,21 @@ namespace pcr
 
     //= NumberFormatSampleField
 
-    class NumberFormatSampleField : public ControlWindow< FormattedField >
+    class NumberFormatSampleField : public FormattedField
     {
-    private:
-        typedef ControlWindow< FormattedField > BaseClass;
-
     public:
         NumberFormatSampleField( vcl::Window* _pParent, WinBits _nStyle )
-            :BaseClass( _pParent, _nStyle )
+            :FormattedField( _pParent, _nStyle )
         {
         }
 
-        void SetFormatSupplier( const SvNumberFormatsSupplierObj* pSupplier );
+        void         SetFormatSupplier( const SvNumberFormatsSupplierObj* pSupplier );
+        void         setControlHelper( CommonBehaviourControlHelper& _rControlHelper ) { m_pHelper = &_rControlHelper; }
 
     protected:
         virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
+    private:
+        CommonBehaviourControlHelper* m_pHelper;
     };
 
 
@@ -95,7 +95,7 @@ namespace pcr
 
     //= OFormattedNumericControl
 
-    typedef CommonBehaviourControl< css::inspection::XPropertyControl, ControlWindow< FormattedField > > OFormattedNumericControl_Base;
+    typedef CommonBehaviourControl< css::inspection::XPropertyControl, FormattedField > OFormattedNumericControl_Base;
     class OFormattedNumericControl : public OFormattedNumericControl_Base
     {
     private:
@@ -124,7 +124,7 @@ namespace pcr
 
     //= OFileUrlControl
 
-    typedef CommonBehaviourControl< css::inspection::XPropertyControl, ControlWindow< ::svt::FileURLBox > > OFileUrlControl_Base;
+    typedef CommonBehaviourControl< css::inspection::XPropertyControl, ::svt::FileURLBox > OFileUrlControl_Base;
     class OFileUrlControl : public OFileUrlControl_Base
     {
     public:
commit 70254f61ea889cde1eb49b417c8cd9819541b4f8
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 16:22:24 2015 +0200

    now we can push the controlwindow down and lose some type-casting
    
    Change-Id: I3bc5963bad29898bd104feddef1bc1d00a1325e1

diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx
index 21b9338..04030f2 100644
--- a/extensions/source/propctrlr/commoncontrol.cxx
+++ b/extensions/source/propctrlr/commoncontrol.cxx
@@ -36,13 +36,11 @@ namespace pcr
     using ::com::sun::star::uno::Exception;
     using ::com::sun::star::inspection::XPropertyControl;
 
-    CommonBehaviourControlHelper::CommonBehaviourControlHelper( vcl::Window* _pControlWindow, sal_Int16 _nControlType, XPropertyControl& _rAntiImpl )
-        :m_pControlWindow( _pControlWindow )
-        ,m_nControlType( _nControlType )
+    CommonBehaviourControlHelper::CommonBehaviourControlHelper( sal_Int16 _nControlType, XPropertyControl& _rAntiImpl )
+        :m_nControlType( _nControlType )
         ,m_rAntiImpl( _rAntiImpl )
         ,m_bModified( false )
     {
-        DBG_ASSERT( m_pControlWindow != nullptr, "CommonBehaviourControlHelper::CommonBehaviourControlHelper: invalid window!" );
     }
 
 
@@ -55,15 +53,6 @@ namespace pcr
         m_xContext = _controlcontext;
     }
 
-
-    Reference< XWindow > SAL_CALL CommonBehaviourControlHelper::getControlWindow() throw (RuntimeException)
-    {
-        return VCLUnoHelper::GetInterface( m_pControlWindow );
-    }
-
-
-
-
     void SAL_CALL CommonBehaviourControlHelper::notifyModifiedValue(  ) throw (RuntimeException)
     {
         if ( isModified() && m_xContext.is() )
@@ -81,21 +70,11 @@ namespace pcr
     }
 
 
-    void SAL_CALL CommonBehaviourControlHelper::dispose()
-    {
-        m_pControlWindow.disposeAndClear();
-    }
-
-
     void CommonBehaviourControlHelper::autoSizeWindow()
     {
-        OSL_PRECOND( m_pControlWindow, "CommonBehaviourControlHelper::autoSizeWindow: no window!" );
-        if ( !m_pControlWindow )
-            return;
-
-        ScopedVclPtrInstance< ComboBox > aComboBox(m_pControlWindow, WB_DROPDOWN);
+        ScopedVclPtrInstance< ComboBox > aComboBox(getVclWindow(), WB_DROPDOWN);
         aComboBox->SetPosSizePixel(Point(0,0), Size(100,100));
-        m_pControlWindow->SetSizePixel(aComboBox->GetSizePixel());
+        getVclWindow()->SetSizePixel(aComboBox->GetSizePixel());
 
         // TODO/UNOize: why do the controls this themselves? Shouldn't this be the task
         // of the browser listbox/line?
diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx
index f8062ad..3a3509a 100644
--- a/extensions/source/propctrlr/commoncontrol.hxx
+++ b/extensions/source/propctrlr/commoncontrol.hxx
@@ -26,6 +26,7 @@
 #include <comphelper/broadcasthelper.hxx>
 #include <tools/link.hxx>
 #include <vcl/window.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 class NotifyEvent;
 class Control;
@@ -65,7 +66,6 @@ namespace pcr
     class CommonBehaviourControlHelper
     {
     private:
-        VclPtr<vcl::Window>             m_pControlWindow;
         sal_Int16                       m_nControlType;
         css::uno::Reference< css::inspection::XPropertyControlContext >
                                         m_xContext;
@@ -75,10 +75,6 @@ namespace pcr
 
     public:
         /** creates the instance
-            @param  _rControlWindow
-                the window which is associated with the <type scope="css::inspection">XPropertyControl</type>.
-                Must not be <NULL/>.<br/>
-                Ownership for this window is taken by the CommonBehaviourControlHelper - it will be deleted in <member>disposing</member>.
             @param  _nControlType
                 the type of the control - one of the <type scope="css::inspection">PropertyControlType</type>
                 constants
@@ -87,28 +83,20 @@ namespace pcr
                 which is why we hold it without acquiring it/
         */
         CommonBehaviourControlHelper(
-            vcl::Window* _pControlWindow,
             sal_Int16 _nControlType,
             css::inspection::XPropertyControl& _rAntiImpl);
 
         virtual ~CommonBehaviourControlHelper();
 
-        inline       vcl::Window* getVclControlWindow()       { return m_pControlWindow; }
-        inline const vcl::Window* getVclControlWindow() const { return m_pControlWindow; }
-
         virtual void modified() { m_bModified = true; }
 
         // XPropertyControl
         ::sal_Int16 SAL_CALL getControlType() throw (css::uno::RuntimeException) { return m_nControlType; }
         css::uno::Reference< css::inspection::XPropertyControlContext > SAL_CALL getControlContext() throw (css::uno::RuntimeException) { return m_xContext; }
         void SAL_CALL setControlContext( const css::uno::Reference< css::inspection::XPropertyControlContext >& _controlcontext ) throw (css::uno::RuntimeException);
-        css::uno::Reference< css::awt::XWindow > SAL_CALL getControlWindow() throw (css::uno::RuntimeException);
         bool SAL_CALL isModified(  ) throw (css::uno::RuntimeException) { return m_bModified; }
         void SAL_CALL notifyModifiedValue(  ) throw (css::uno::RuntimeException);
 
-        // XComponent
-        void SAL_CALL dispose();
-
         /** (fail-safe) wrapper around calling our context's activateNextControl
         */
         void activateNextControl() const;
@@ -116,6 +104,8 @@ namespace pcr
         /// automatically size the window given in the ctor
         void    autoSizeWindow();
 
+        virtual vcl::Window* getVclWindow() = 0;
+
         /// may be used by derived classes, they forward the event to the PropCtrListener
         DECL_LINK( ModifiedHdl, vcl::Window* );
         DECL_LINK_TYPED( GetFocusHdl, Control&, void );
@@ -152,7 +142,7 @@ namespace pcr
         virtual void SAL_CALL setControlContext( const css::uno::Reference< css::inspection::XPropertyControlContext >& _controlcontext ) throw (css::uno::RuntimeException) SAL_OVERRIDE
             { CommonBehaviourControlHelper::setControlContext( _controlcontext ); }
         virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getControlWindow() throw (css::uno::RuntimeException) SAL_OVERRIDE
-            { return CommonBehaviourControlHelper::getControlWindow(); }
+            { return VCLUnoHelper::GetInterface( m_pControlWindow ); }
         virtual sal_Bool SAL_CALL isModified(  ) throw (css::uno::RuntimeException) SAL_OVERRIDE
             { return CommonBehaviourControlHelper::isModified(); }
         virtual void SAL_CALL notifyModifiedValue(  ) throw (css::uno::RuntimeException) SAL_OVERRIDE
@@ -160,20 +150,24 @@ namespace pcr
 
         // XComponent
         virtual void SAL_CALL disposing() SAL_OVERRIDE
-            { CommonBehaviourControlHelper::dispose(); }
+            { m_pControlWindow.disposeAndClear(); }
+
+       //  CommonBehaviourControlHelper::getVclWindow
+        virtual vcl::Window*  getVclWindow() SAL_OVERRIDE
+            { return m_pControlWindow.get(); }
 
-        /// returns a typed pointer to our control window
         TControlWindow*       getTypedControlWindow()
-            { return static_cast< TControlWindow* >( CommonBehaviourControlHelper::getVclControlWindow() ); }
+            { return m_pControlWindow.get(); }
         const TControlWindow* getTypedControlWindow() const
-            { return static_cast< const TControlWindow* >( CommonBehaviourControlHelper::getVclControlWindow() ); }
+            { return m_pControlWindow.get(); }
 
-    protected:
         /** checks whether the instance is already disposed
             @throws DisposedException
                 if the instance is already disposed
         */
         inline void impl_checkDisposed_throw();
+    private:
+        VclPtr<TControlWindow>         m_pControlWindow;
     };
 
 
@@ -183,15 +177,15 @@ namespace pcr
     template< class TControlInterface, class TControlWindow >
     inline CommonBehaviourControl< TControlInterface, TControlWindow >::CommonBehaviourControl ( sal_Int16 _nControlType, vcl::Window* _pParentWindow, WinBits _nWindowStyle, bool _bDoSetHandlers )
         :ComponentBaseClass( m_aMutex )
-        ,CommonBehaviourControlHelper( new TControlWindow( _pParentWindow, _nWindowStyle ), _nControlType, *this )
+        ,CommonBehaviourControlHelper( _nControlType, *this )
+        ,m_pControlWindow( new TControlWindow( _pParentWindow, _nWindowStyle ) )
     {
-        TControlWindow* pControlWindow( getTypedControlWindow() );
-        pControlWindow->setControlHelper( *this );
+        m_pControlWindow->setControlHelper( *this );
         if ( _bDoSetHandlers )
         {
-            pControlWindow->SetModifyHdl( LINK( this, CommonBehaviourControlHelper, ModifiedHdl ) );
-            pControlWindow->SetGetFocusHdl( LINK( this, CommonBehaviourControlHelper, GetFocusHdl ) );
-            pControlWindow->SetLoseFocusHdl( LINK( this, CommonBehaviourControlHelper, LoseFocusHdl ) );
+            m_pControlWindow->SetModifyHdl( LINK( this, CommonBehaviourControlHelper, ModifiedHdl ) );
+            m_pControlWindow->SetGetFocusHdl( LINK( this, CommonBehaviourControlHelper, GetFocusHdl ) );
+            m_pControlWindow->SetLoseFocusHdl( LINK( this, CommonBehaviourControlHelper, LoseFocusHdl ) );
         }
         autoSizeWindow();
     }
commit 42571e3d4e12c03f32197e9275fa203b86356942
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 15:17:24 2015 +0200

    reduce the web of class relationships here a little
    
    make CommonBehaviourControlHelper a base-class of the
    CommonBehaviourControl template, which allows us to dispense with the
    IModifyListener callback interface
    
    Change-Id: I3c02b864fa08fc50515c11af859477e0fdc035e3

diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx
index d7f2469..21b9338 100644
--- a/extensions/source/propctrlr/commoncontrol.cxx
+++ b/extensions/source/propctrlr/commoncontrol.cxx
@@ -36,28 +36,27 @@ namespace pcr
     using ::com::sun::star::uno::Exception;
     using ::com::sun::star::inspection::XPropertyControl;
 
-    ControlHelper::ControlHelper( vcl::Window* _pControlWindow, sal_Int16 _nControlType, XPropertyControl& _rAntiImpl, IModifyListener* _pModifyListener )
+    CommonBehaviourControlHelper::CommonBehaviourControlHelper( vcl::Window* _pControlWindow, sal_Int16 _nControlType, XPropertyControl& _rAntiImpl )
         :m_pControlWindow( _pControlWindow )
         ,m_nControlType( _nControlType )
         ,m_rAntiImpl( _rAntiImpl )
-        ,m_pModifyListener( _pModifyListener )
         ,m_bModified( false )
     {
-        DBG_ASSERT( m_pControlWindow != nullptr, "ControlHelper::ControlHelper: invalid window!" );
+        DBG_ASSERT( m_pControlWindow != nullptr, "CommonBehaviourControlHelper::CommonBehaviourControlHelper: invalid window!" );
     }
 
 
-    ControlHelper::~ControlHelper()
+    CommonBehaviourControlHelper::~CommonBehaviourControlHelper()
     {
     }
 
-    void SAL_CALL ControlHelper::setControlContext( const Reference< XPropertyControlContext >& _controlcontext ) throw (RuntimeException)
+    void SAL_CALL CommonBehaviourControlHelper::setControlContext( const Reference< XPropertyControlContext >& _controlcontext ) throw (RuntimeException)
     {
         m_xContext = _controlcontext;
     }
 
 
-    Reference< XWindow > SAL_CALL ControlHelper::getControlWindow() throw (RuntimeException)
+    Reference< XWindow > SAL_CALL CommonBehaviourControlHelper::getControlWindow() throw (RuntimeException)
     {
         return VCLUnoHelper::GetInterface( m_pControlWindow );
     }
@@ -65,7 +64,7 @@ namespace pcr
 
 
 
-    void SAL_CALL ControlHelper::notifyModifiedValue(  ) throw (RuntimeException)
+    void SAL_CALL CommonBehaviourControlHelper::notifyModifiedValue(  ) throw (RuntimeException)
     {
         if ( isModified() && m_xContext.is() )
         {
@@ -82,15 +81,15 @@ namespace pcr
     }
 
 
-    void SAL_CALL ControlHelper::dispose()
+    void SAL_CALL CommonBehaviourControlHelper::dispose()
     {
         m_pControlWindow.disposeAndClear();
     }
 
 
-    void ControlHelper::autoSizeWindow()
+    void CommonBehaviourControlHelper::autoSizeWindow()
     {
-        OSL_PRECOND( m_pControlWindow, "ControlHelper::autoSizeWindow: no window!" );
+        OSL_PRECOND( m_pControlWindow, "CommonBehaviourControlHelper::autoSizeWindow: no window!" );
         if ( !m_pControlWindow )
             return;
 
@@ -103,7 +102,7 @@ namespace pcr
     }
 
 
-    void ControlHelper::impl_activateNextControl_nothrow() const
+    void CommonBehaviourControlHelper::activateNextControl() const
     {
         try
         {
@@ -117,15 +116,14 @@ namespace pcr
     }
 
 
-    IMPL_LINK( ControlHelper, ModifiedHdl, vcl::Window*, /*_pWin*/ )
+    IMPL_LINK( CommonBehaviourControlHelper, ModifiedHdl, vcl::Window*, /*_pWin*/ )
     {
-        if ( m_pModifyListener )
-            m_pModifyListener->modified();
+        modified();
         return 0;
     }
 
 
-    IMPL_LINK_NOARG_TYPED( ControlHelper, GetFocusHdl, Control&, void )
+    IMPL_LINK_NOARG_TYPED( CommonBehaviourControlHelper, GetFocusHdl, Control&, void )
     {
         try
         {
@@ -139,7 +137,7 @@ namespace pcr
     }
 
 
-    IMPL_LINK_NOARG_TYPED( ControlHelper, LoseFocusHdl, Control&, void )
+    IMPL_LINK_NOARG_TYPED( CommonBehaviourControlHelper, LoseFocusHdl, Control&, void )
     {
         // TODO/UNOize: should this be outside the default control's implementations? If somebody
         // has an own control implementation, which does *not* do this - would this be allowed?
diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx
index 607d54d..f8062ad 100644
--- a/extensions/source/propctrlr/commoncontrol.hxx
+++ b/extensions/source/propctrlr/commoncontrol.hxx
@@ -34,13 +34,13 @@ namespace pcr
 {
 
 
-    class ControlHelper;
+    class CommonBehaviourControlHelper;
 
     template< class TControlWindow >
     class ControlWindow : public TControlWindow
     {
     protected:
-        ControlHelper*  m_pHelper;
+        CommonBehaviourControlHelper*  m_pHelper;
 
     public:
         ControlWindow( vcl::Window* _pParent, WinBits _nStyle )
@@ -49,34 +49,20 @@ namespace pcr
         {
         }
 
-        /// sets a ControlHelper instance which some functionality is delegated to
-        virtual void setControlHelper( ControlHelper& _rControlHelper )
+        /// sets a CommonBehaviourControlHelper instance which some functionality is delegated to
+        virtual void setControlHelper( CommonBehaviourControlHelper& _rControlHelper )
         { m_pHelper = &_rControlHelper; }
     };
 
 
-    //= IModifyListener
-
-    class SAL_NO_VTABLE IModifyListener
-    {
-    public:
-        virtual void modified() = 0;
-
-    protected:
-        ~IModifyListener() {}
-    };
-
-
-    //= ControlHelper
+    //= CommonBehaviourControlHelper
 
     /** A helper class for implementing the <type scope="css::inspection">XPropertyControl</type>
         or one of its derived interfaces.
 
-        This class is intended to be held as member of another class which implements the
-        <type scope="css::inspection">XPropertyControl</type> interface. The pointer
-        to this interface is to be passed to the ctor.
+        This class is used as a base class the CommonBehaviourControl template.
     */
-    class ControlHelper
+    class CommonBehaviourControlHelper
     {
     private:
         VclPtr<vcl::Window>             m_pControlWindow;
@@ -85,7 +71,6 @@ namespace pcr
                                         m_xContext;
         css::inspection::XPropertyControl&
                                         m_rAntiImpl;
-        IModifyListener*                m_pModifyListener;
         bool                            m_bModified;
 
     public:
@@ -93,36 +78,26 @@ namespace pcr
             @param  _rControlWindow
                 the window which is associated with the <type scope="css::inspection">XPropertyControl</type>.
                 Must not be <NULL/>.<br/>
-                Ownership for this window is taken by the ControlHelper - it will be deleted in <member>disposing</member>.
+                Ownership for this window is taken by the CommonBehaviourControlHelper - it will be deleted in <member>disposing</member>.
             @param  _nControlType
                 the type of the control - one of the <type scope="css::inspection">PropertyControlType</type>
                 constants
             @param _pAntiImpl
-                Reference to the instance as whose "impl-class" we act. This reference is held during lifetime
-                of the <type>ControlHelper</type> class, within acquiring it. Thus, the owner of the
-                <type>ControlHelper</type> is responsible for assuring the lifetime of the instance
-                pointed to by <arg>_pAntiImpl</arg>.
-            @param _pModifyListener
-                a listener to be modfied when the user modified the control's value. the
-                <member>IModifyListener::modified</member> of this listener is called from within our
-                ModifiedHdl. A default implementation of <member>IModifyListener::modified</member>
-                would just call our <member>setModified</member>.
+                Reference to the instance as whose "impl-class" we act i.e. the CommonBehaviourControl<> template,
+                which is why we hold it without acquiring it/
         */
-        ControlHelper(
+        CommonBehaviourControlHelper(
             vcl::Window* _pControlWindow,
             sal_Int16 _nControlType,
-            css::inspection::XPropertyControl& _rAntiImpl,
-            IModifyListener* _pModifyListener );
+            css::inspection::XPropertyControl& _rAntiImpl);
 
-        virtual ~ControlHelper();
+        virtual ~CommonBehaviourControlHelper();
 
-        /** sets our "modified" flag to <TRUE/>
-        */
-        inline void setModified() { m_bModified = true; }
         inline       vcl::Window* getVclControlWindow()       { return m_pControlWindow; }
         inline const vcl::Window* getVclControlWindow() const { return m_pControlWindow; }
 
-    public:
+        virtual void modified() { m_bModified = true; }
+
         // XPropertyControl
         ::sal_Int16 SAL_CALL getControlType() throw (css::uno::RuntimeException) { return m_nControlType; }
         css::uno::Reference< css::inspection::XPropertyControlContext > SAL_CALL getControlContext() throw (css::uno::RuntimeException) { return m_xContext; }
@@ -136,9 +111,8 @@ namespace pcr
 
         /** (fail-safe) wrapper around calling our context's activateNextControl
         */
-        inline void activateNextControl() const { impl_activateNextControl_nothrow(); }
+        void activateNextControl() const;
 
-    public:
         /// automatically size the window given in the ctor
         void    autoSizeWindow();
 
@@ -146,19 +120,13 @@ namespace pcr
         DECL_LINK( ModifiedHdl, vcl::Window* );
         DECL_LINK_TYPED( GetFocusHdl, Control&, void );
         DECL_LINK_TYPED( LoseFocusHdl, Control&, void );
-
-    private:
-        /** fail-safe wrapper around calling our context's activateNextControl
-        */
-        void    impl_activateNextControl_nothrow() const;
     };
 
 
     //= CommonBehaviourControl
 
     /** implements a base class for <type scope="css::inspection">XPropertyControl</type>
-        implementations, which delegates the generic functionality of this interface to a
-        <type>ControlHelper</type> member.
+        implementations
 
         @param TControlInterface
             an interface class which is derived from (or identical to) <type scope="css::inspection">XPropertyControl</type>
@@ -168,43 +136,37 @@ namespace pcr
     template < class TControlInterface, class TControlWindow >
     class CommonBehaviourControl    :public ::comphelper::OBaseMutex
                                     ,public ::cppu::WeakComponentImplHelper< TControlInterface >
-                                    ,public IModifyListener
+                                    ,public CommonBehaviourControlHelper
     {
     protected:
         typedef ::comphelper::OBaseMutex                                MutexBaseClass;
         typedef ::cppu::WeakComponentImplHelper< TControlInterface >    ComponentBaseClass;
 
-    protected:
-        ControlHelper   m_aImplControl;
-
-    protected:
         inline CommonBehaviourControl( sal_Int16 _nControlType, vcl::Window* _pParentWindow, WinBits _nWindowStyle, bool _bDoSetHandlers = true );
 
         // XPropertyControl - delegated to ->m_aImplControl
         virtual ::sal_Int16 SAL_CALL getControlType() throw (css::uno::RuntimeException) SAL_OVERRIDE
-            { return m_aImplControl.getControlType(); }
+            { return CommonBehaviourControlHelper::getControlType(); }
         virtual css::uno::Reference< css::inspection::XPropertyControlContext > SAL_CALL getControlContext() throw (css::uno::RuntimeException) SAL_OVERRIDE
-            { return m_aImplControl.getControlContext(); }
+            { return CommonBehaviourControlHelper::getControlContext(); }
         virtual void SAL_CALL setControlContext( const css::uno::Reference< css::inspection::XPropertyControlContext >& _controlcontext ) throw (css::uno::RuntimeException) SAL_OVERRIDE
-            { m_aImplControl.setControlContext( _controlcontext ); }
+            { CommonBehaviourControlHelper::setControlContext( _controlcontext ); }
         virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getControlWindow() throw (css::uno::RuntimeException) SAL_OVERRIDE
-            { return m_aImplControl.getControlWindow(); }
+            { return CommonBehaviourControlHelper::getControlWindow(); }
         virtual sal_Bool SAL_CALL isModified(  ) throw (css::uno::RuntimeException) SAL_OVERRIDE
-            { return m_aImplControl.isModified(); }
+            { return CommonBehaviourControlHelper::isModified(); }
         virtual void SAL_CALL notifyModifiedValue(  ) throw (css::uno::RuntimeException) SAL_OVERRIDE
-            {  m_aImplControl.notifyModifiedValue(); }
+            { CommonBehaviourControlHelper::notifyModifiedValue(); }
 
         // XComponent
         virtual void SAL_CALL disposing() SAL_OVERRIDE
-            { m_aImplControl.dispose(); }
-
-        // IModifyListener
-        virtual void modified() SAL_OVERRIDE
-            { m_aImplControl.setModified(); }
+            { CommonBehaviourControlHelper::dispose(); }
 
         /// returns a typed pointer to our control window
-              TControlWindow* getTypedControlWindow()       { return static_cast< TControlWindow* >      ( m_aImplControl.getVclControlWindow() ); }
-        const TControlWindow* getTypedControlWindow() const { return static_cast< const TControlWindow* >( m_aImplControl.getVclControlWindow() ); }
+        TControlWindow*       getTypedControlWindow()
+            { return static_cast< TControlWindow* >( CommonBehaviourControlHelper::getVclControlWindow() ); }
+        const TControlWindow* getTypedControlWindow() const
+            { return static_cast< const TControlWindow* >( CommonBehaviourControlHelper::getVclControlWindow() ); }
 
     protected:
         /** checks whether the instance is already disposed
@@ -221,17 +183,17 @@ namespace pcr
     template< class TControlInterface, class TControlWindow >
     inline CommonBehaviourControl< TControlInterface, TControlWindow >::CommonBehaviourControl ( sal_Int16 _nControlType, vcl::Window* _pParentWindow, WinBits _nWindowStyle, bool _bDoSetHandlers )
         :ComponentBaseClass( m_aMutex )
-        ,m_aImplControl( new TControlWindow( _pParentWindow, _nWindowStyle ), _nControlType, *this, this )
+        ,CommonBehaviourControlHelper( new TControlWindow( _pParentWindow, _nWindowStyle ), _nControlType, *this )
     {
         TControlWindow* pControlWindow( getTypedControlWindow() );
-        pControlWindow->setControlHelper( m_aImplControl );
+        pControlWindow->setControlHelper( *this );
         if ( _bDoSetHandlers )
         {
-            pControlWindow->SetModifyHdl( LINK( &m_aImplControl, ControlHelper, ModifiedHdl ) );
-            pControlWindow->SetGetFocusHdl( LINK( &m_aImplControl, ControlHelper, GetFocusHdl ) );
-            pControlWindow->SetLoseFocusHdl( LINK( &m_aImplControl, ControlHelper, LoseFocusHdl ) );
+            pControlWindow->SetModifyHdl( LINK( this, CommonBehaviourControlHelper, ModifiedHdl ) );
+            pControlWindow->SetGetFocusHdl( LINK( this, CommonBehaviourControlHelper, GetFocusHdl ) );
+            pControlWindow->SetLoseFocusHdl( LINK( this, CommonBehaviourControlHelper, LoseFocusHdl ) );
         }
-        m_aImplControl.autoSizeWindow();
+        autoSizeWindow();
     }
 
 
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 88d63ff..3620e38 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -223,7 +223,7 @@ namespace pcr
 
         // for password controls, we fire a commit for every single change
         if ( m_bIsPassword )
-            m_aImplControl.notifyModifiedValue();
+            notifyModifiedValue();
     }
 
 
@@ -787,7 +787,7 @@ namespace pcr
 
         if ( !getTypedControlWindow()->IsTravelSelect() )
             // fire a commit
-            m_aImplControl.notifyModifiedValue();
+            notifyModifiedValue();
     }
 
 
@@ -879,7 +879,7 @@ namespace pcr
 
         if ( !getTypedControlWindow()->IsTravelSelect() )
             // fire a commit
-            m_aImplControl.notifyModifiedValue();
+            notifyModifiedValue();
     }
 
 
@@ -947,7 +947,7 @@ namespace pcr
     {
         if ( !getTypedControlWindow()->IsTravelSelect() )
             // fire a commit
-            m_aImplControl.notifyModifiedValue();
+            notifyModifiedValue();
         return 0L;
     }
 
@@ -1058,13 +1058,13 @@ namespace pcr
     }
 
 
-    void DropDownEditControl::setControlHelper( ControlHelper& _rControlHelper )
+    void DropDownEditControl::setControlHelper( CommonBehaviourControlHelper& _rControlHelper )
     {
         DropDownEditControl_Base::setControlHelper( _rControlHelper );
-        m_pFloatingEdit->getEdit().SetModifyHdl( LINK( &_rControlHelper, ControlHelper, ModifiedHdl ) );
-        m_pImplEdit->SetGetFocusHdl( LINK( &_rControlHelper, ControlHelper, GetFocusHdl ) );
-        m_pImplEdit->SetModifyHdl( LINK( &_rControlHelper, ControlHelper, ModifiedHdl ) );
-        m_pImplEdit->SetLoseFocusHdl( LINK( &_rControlHelper, ControlHelper, LoseFocusHdl ) );
+        m_pFloatingEdit->getEdit().SetModifyHdl( LINK( &_rControlHelper, CommonBehaviourControlHelper, ModifiedHdl ) );
+        m_pImplEdit->SetGetFocusHdl( LINK( &_rControlHelper, CommonBehaviourControlHelper, GetFocusHdl ) );
+        m_pImplEdit->SetModifyHdl( LINK( &_rControlHelper, CommonBehaviourControlHelper, ModifiedHdl ) );
+        m_pImplEdit->SetLoseFocusHdl( LINK( &_rControlHelper, CommonBehaviourControlHelper, LoseFocusHdl ) );
     }
 
 
diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx
index 594c306..8c2220c 100644
--- a/extensions/source/propctrlr/standardcontrol.hxx
+++ b/extensions/source/propctrlr/standardcontrol.hxx
@@ -114,6 +114,7 @@ namespace pcr
         virtual css::uno::Type SAL_CALL getValueType() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     protected:
+        // CommonBehaviourControlHelper::modified
         virtual void modified() SAL_OVERRIDE;
     };
 
@@ -275,6 +276,7 @@ namespace pcr
         virtual css::uno::Sequence< OUString > SAL_CALL getListEntries(  ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     protected:
+        // CommonBehaviourControlHelper::modified
         virtual void modified() SAL_OVERRIDE;
     };
 
@@ -301,6 +303,7 @@ namespace pcr
         virtual css::uno::Sequence< OUString > SAL_CALL getListEntries(  ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     protected:
+        // CommonBehaviourControlHelper::modified
         virtual void modified() SAL_OVERRIDE;
     };
 
@@ -368,7 +371,7 @@ namespace pcr
                         GetStringListValue() const;
 
         // ControlWindow overridables
-        virtual void setControlHelper( ControlHelper& _rControlHelper ) SAL_OVERRIDE;
+        virtual void setControlHelper( CommonBehaviourControlHelper& _rControlHelper ) SAL_OVERRIDE;
 
     protected:
         // Window overridables
commit a517b945e7e71cc928645431e1f28cc82f32844b
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 14:44:57 2015 +0200

    improve naming of template parameters
    
    Change-Id: If62a86b914db634c662949a04396b95e3f44be2a

diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx
index ebb8582..607d54d 100644
--- a/extensions/source/propctrlr/commoncontrol.hxx
+++ b/extensions/source/propctrlr/commoncontrol.hxx
@@ -36,24 +36,22 @@ namespace pcr
 
     class ControlHelper;
 
-    template< class WINDOW >
-    class ControlWindow : public WINDOW
+    template< class TControlWindow >
+    class ControlWindow : public TControlWindow
     {
     protected:
-        typedef WINDOW  WindowType;
-
-    protected:
         ControlHelper*  m_pHelper;
 
     public:
         ControlWindow( vcl::Window* _pParent, WinBits _nStyle )
-            :WindowType( _pParent, _nStyle )
+            :TControlWindow( _pParent, _nStyle )
             ,m_pHelper( NULL )
         {
         }
 
         /// sets a ControlHelper instance which some functionality is delegated to
-        inline virtual void setControlHelper( ControlHelper& _rControlHelper );
+        virtual void setControlHelper( ControlHelper& _rControlHelper )
+        { m_pHelper = &_rControlHelper; }
     };
 
 
@@ -162,22 +160,19 @@ namespace pcr
         implementations, which delegates the generic functionality of this interface to a
         <type>ControlHelper</type> member.
 
-        @param CONTROL_INTERFACE
+        @param TControlInterface
             an interface class which is derived from (or identical to) <type scope="css::inspection">XPropertyControl</type>
-        @param CONTROL_WINDOW
+        @param TControlWindow
             a class which is derived from ControlWindow
     */
-    template < class CONTROL_INTERFACE, class CONTROL_WINDOW >
+    template < class TControlInterface, class TControlWindow >
     class CommonBehaviourControl    :public ::comphelper::OBaseMutex
-                                    ,public ::cppu::WeakComponentImplHelper< CONTROL_INTERFACE >
+                                    ,public ::cppu::WeakComponentImplHelper< TControlInterface >
                                     ,public IModifyListener
     {
     protected:
-        typedef CONTROL_INTERFACE   InterfaceType;
-        typedef CONTROL_WINDOW      WindowType;
-
         typedef ::comphelper::OBaseMutex                                MutexBaseClass;
-        typedef ::cppu::WeakComponentImplHelper< CONTROL_INTERFACE >   ComponentBaseClass;
+        typedef ::cppu::WeakComponentImplHelper< TControlInterface >    ComponentBaseClass;
 
     protected:
         ControlHelper   m_aImplControl;
@@ -186,23 +181,30 @@ namespace pcr
         inline CommonBehaviourControl( sal_Int16 _nControlType, vcl::Window* _pParentWindow, WinBits _nWindowStyle, bool _bDoSetHandlers = true );
 
         // XPropertyControl - delegated to ->m_aImplControl
-        virtual ::sal_Int16 SAL_CALL getControlType() throw (css::uno::RuntimeException) SAL_OVERRIDE;
-        virtual css::uno::Reference< css::inspection::XPropertyControlContext > SAL_CALL getControlContext() throw (css::uno::RuntimeException) SAL_OVERRIDE;
-        virtual void SAL_CALL setControlContext( const css::uno::Reference< css::inspection::XPropertyControlContext >& _controlcontext ) throw (css::uno::RuntimeException) SAL_OVERRIDE;
-        virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getControlWindow() throw (css::uno::RuntimeException) SAL_OVERRIDE;
-        virtual sal_Bool SAL_CALL isModified(  ) throw (css::uno::RuntimeException) SAL_OVERRIDE;
-        virtual void SAL_CALL notifyModifiedValue(  ) throw (css::uno::RuntimeException) SAL_OVERRIDE;
+        virtual ::sal_Int16 SAL_CALL getControlType() throw (css::uno::RuntimeException) SAL_OVERRIDE
+            { return m_aImplControl.getControlType(); }
+        virtual css::uno::Reference< css::inspection::XPropertyControlContext > SAL_CALL getControlContext() throw (css::uno::RuntimeException) SAL_OVERRIDE
+            { return m_aImplControl.getControlContext(); }
+        virtual void SAL_CALL setControlContext( const css::uno::Reference< css::inspection::XPropertyControlContext >& _controlcontext ) throw (css::uno::RuntimeException) SAL_OVERRIDE
+            { m_aImplControl.setControlContext( _controlcontext ); }
+        virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getControlWindow() throw (css::uno::RuntimeException) SAL_OVERRIDE
+            { return m_aImplControl.getControlWindow(); }
+        virtual sal_Bool SAL_CALL isModified(  ) throw (css::uno::RuntimeException) SAL_OVERRIDE
+            { return m_aImplControl.isModified(); }
+        virtual void SAL_CALL notifyModifiedValue(  ) throw (css::uno::RuntimeException) SAL_OVERRIDE
+            {  m_aImplControl.notifyModifiedValue(); }
 
         // XComponent
-        virtual void SAL_CALL disposing() SAL_OVERRIDE;
+        virtual void SAL_CALL disposing() SAL_OVERRIDE
+            { m_aImplControl.dispose(); }
 
         // IModifyListener
         virtual void modified() SAL_OVERRIDE
-        { m_aImplControl.setModified(); }
+            { m_aImplControl.setModified(); }
 
         /// returns a typed pointer to our control window
-              WindowType* getTypedControlWindow()       { return static_cast< WindowType* >      ( m_aImplControl.getVclControlWindow() ); }
-        const WindowType* getTypedControlWindow() const { return static_cast< const WindowType* >( m_aImplControl.getVclControlWindow() ); }
+              TControlWindow* getTypedControlWindow()       { return static_cast< TControlWindow* >      ( m_aImplControl.getVclControlWindow() ); }
+        const TControlWindow* getTypedControlWindow() const { return static_cast< const TControlWindow* >( m_aImplControl.getVclControlWindow() ); }
 
     protected:
         /** checks whether the instance is already disposed
@@ -213,25 +215,15 @@ namespace pcr
     };
 
 
-    //= ControlWindow - implementation
-
-
-    template< class WINDOW >
-    inline void ControlWindow< WINDOW >::setControlHelper( ControlHelper& _rControlHelper )
-    {
-        m_pHelper = &_rControlHelper;
-    }
-
-
     //= CommonBehaviourControl - implementation
 
 
-    template< class CONTROL_INTERFACE, class CONTROL_WINDOW >
-    inline CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::CommonBehaviourControl ( sal_Int16 _nControlType, vcl::Window* _pParentWindow, WinBits _nWindowStyle, bool _bDoSetHandlers )
+    template< class TControlInterface, class TControlWindow >
+    inline CommonBehaviourControl< TControlInterface, TControlWindow >::CommonBehaviourControl ( sal_Int16 _nControlType, vcl::Window* _pParentWindow, WinBits _nWindowStyle, bool _bDoSetHandlers )
         :ComponentBaseClass( m_aMutex )
-        ,m_aImplControl( new WindowType( _pParentWindow, _nWindowStyle ), _nControlType, *this, this )
+        ,m_aImplControl( new TControlWindow( _pParentWindow, _nWindowStyle ), _nControlType, *this, this )
     {
-        WindowType* pControlWindow( getTypedControlWindow() );
+        TControlWindow* pControlWindow( getTypedControlWindow() );
         pControlWindow->setControlHelper( m_aImplControl );
         if ( _bDoSetHandlers )
         {
@@ -243,57 +235,8 @@ namespace pcr
     }
 
 
-    template< class CONTROL_INTERFACE, class CONTROL_WINDOW >
-    inline ::sal_Int16 SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::getControlType() throw (css::uno::RuntimeException)
-    {
-        return m_aImplControl.getControlType();
-    }
-
-
-    template< class CONTROL_INTERFACE, class CONTROL_WINDOW >
-    inline css::uno::Reference< css::inspection::XPropertyControlContext > SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::getControlContext() throw (css::uno::RuntimeException)
-    {
-        return m_aImplControl.getControlContext();
-    }
-
-
-    template< class CONTROL_INTERFACE, class CONTROL_WINDOW >
-    inline void SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::setControlContext( const css::uno::Reference< css::inspection::XPropertyControlContext >& _controlcontext ) throw (css::uno::RuntimeException)
-    {
-        m_aImplControl.setControlContext( _controlcontext );
-    }
-
-
-    template< class CONTROL_INTERFACE, class CONTROL_WINDOW >
-    inline css::uno::Reference< css::awt::XWindow > SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::getControlWindow() throw (css::uno::RuntimeException)
-    {
-        return m_aImplControl.getControlWindow();
-    }
-
-
-    template< class CONTROL_INTERFACE, class CONTROL_WINDOW >
-    inline sal_Bool SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::isModified(  ) throw (css::uno::RuntimeException)
-    {
-        return m_aImplControl.isModified();
-    }
-
-
-    template< class CONTROL_INTERFACE, class CONTROL_WINDOW >
-    inline void SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::notifyModifiedValue(  ) throw (css::uno::RuntimeException)
-    {
-        m_aImplControl.notifyModifiedValue();
-    }
-
-
-    template< class CONTROL_INTERFACE, class CONTROL_WINDOW >
-    inline void SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::disposing()
-    {
-        m_aImplControl.dispose();
-    }
-
-
-    template< class CONTROL_INTERFACE, class CONTROL_WINDOW >
-    inline void CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::impl_checkDisposed_throw()
+    template< class TControlInterface, class TControlWindow >
+    inline void CommonBehaviourControl< TControlInterface, TControlWindow >::impl_checkDisposed_throw()
     {
         if ( ComponentBaseClass::rBHelper.bDisposed )
             throw css::lang::DisposedException( OUString(), *this );
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 740f551..88d63ff 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -115,7 +115,7 @@ namespace pcr
     ODateControl::ODateControl( vcl::Window* pParent, WinBits nWinStyle )
         :ODateControl_Base( PropertyControlType::DateField, pParent, nWinStyle | WB_DROPDOWN )
     {
-        WindowType* pControlWindow = getTypedControlWindow();
+        ControlWindow<CalendarField>* pControlWindow = getTypedControlWindow();
         pControlWindow->SetStrictFormat(true);
 
         pControlWindow->SetMin( ::Date( 1,1,1600 ) );
diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx
index 93c6c32..594c306 100644
--- a/extensions/source/propctrlr/standardcontrol.hxx
+++ b/extensions/source/propctrlr/standardcontrol.hxx
@@ -51,11 +51,11 @@ namespace pcr
         thus giving this class the same API (as far as the CommonBehaviourControl is concerned)
         as all other windows.
     */
-    template< class LISTBOX_WINDOW >
-    class ListLikeControlWithModifyHandler : public ControlWindow< LISTBOX_WINDOW >
+    template< class TListboxWindow >
+    class ListLikeControlWithModifyHandler : public ControlWindow< TListboxWindow >
     {
     protected:
-        typedef ControlWindow< LISTBOX_WINDOW >  ListBoxType;
+        typedef ControlWindow< TListboxWindow >  ListBoxType;
 
     public:
         ListLikeControlWithModifyHandler( vcl::Window* _pParent, WinBits _nStyle )
commit e1d7a84955f88be38e8daf9c0f4e242f8e8e3652
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 13:54:24 2015 +0200

    loplugin:mergeclasses
    
    Change-Id: I935c6144a7731091e7fdb0a818b54f30d3304f2e

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index 57a2994..8e9c77d 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -136,7 +136,6 @@ merge oox::dump::Address with oox::dump::TokenAddress
 merge oox::dump::ItemFormat with oox::dump::CombiList::ExtItemFormat
 merge oox::formulaimport::XmlStream with oox::formulaimport::XmlStreamBuilder
 merge oox::ole::OleObjectInfo with oox::vml::OleObjectInfo
-merge oox::xls::BiffContextHandler with oox::xls::BiffWorksheetContextBase
 merge oox::xls::IWorksheetProgress with oox::xls::WorksheetGlobals
 merge pcr::(anonymous namespace)::ISQLCommandPropertyUI with pcr::(anonymous namespace)::SQLCommandPropertyUI
 merge pcr::IButtonClickListener with pcr::OBrowserListBox
diff --git a/sc/source/filter/inc/excelhandlers.hxx b/sc/source/filter/inc/excelhandlers.hxx
index 97980b5..5763aec 100644
--- a/sc/source/filter/inc/excelhandlers.hxx
+++ b/sc/source/filter/inc/excelhandlers.hxx
@@ -74,28 +74,22 @@ public:
                             const OUString& rFragmentPath );
 };
 
-/** Base class for all BIFF context handlers.
-
-    Derived handlers have to implement the importRecord() function that has to
-    import the record the passed BIFF input stream currently points to.
- */
-class BiffContextHandler
-{
-public:
-    virtual             ~BiffContextHandler();
-
-    /** Derived classes have to implement importing the current record. */
-    virtual void        importRecord( BiffInputStream& rStrm ) = 0;
-};
 
 /** Context handler derived from the WorksheetHelper helper class.
+    Base class for all BIFF context handlers.
 
     Used to import contexts in sheet fragments.
  */
-class BiffWorksheetContextBase : public BiffContextHandler, public WorksheetHelper
+class BiffWorksheetContextBase : public WorksheetHelper
 {
 protected:
     explicit            BiffWorksheetContextBase( const WorksheetHelper& rHelper );
+public:
+    /*
+    Derived handlers have to implement the importRecord() function that has to
+    import the record the passed BIFF input stream currently points to.
+    */
+    virtual void        importRecord( BiffInputStream& rStrm ) = 0;
 };
 
 /** An enumeration for all types of fragments in a BIFF workbook stream. */
diff --git a/sc/source/filter/oox/excelhandlers.cxx b/sc/source/filter/oox/excelhandlers.cxx
index 9e2c426..b6d0c6e 100644
--- a/sc/source/filter/oox/excelhandlers.cxx
+++ b/sc/source/filter/oox/excelhandlers.cxx
@@ -42,10 +42,6 @@ WorksheetFragmentBase::WorksheetFragmentBase(
 {
 }
 
-BiffContextHandler::~BiffContextHandler()
-{
-}
-
 BiffWorksheetContextBase::BiffWorksheetContextBase( const WorksheetHelper& rHelper ) :
     WorksheetHelper( rHelper )
 {
commit 8d811d701fb8618195a87fa05f83cc270bf3839b
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 12:47:30 2015 +0200

    loplugin:mergeclasses
    
    Change-Id: I672d277a8d2dc6b57b299679e7e98348f9dbde30

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index d328124..57a2994 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -130,7 +130,6 @@ merge frm::ITextSelectionListener with frm::ORichTextPeer
 merge ftp::CurlInput with InsertData
 merge ftp::ResultSetFactory with ResultSetFactoryI
 merge i_xml_parser_event_handler with (anonymous namespace)::recently_used_file_filter
-merge io_stm::I_FIFO with io_stm::MemFIFO
 merge oglcanvas::CanvasHelper with oglcanvas::BitmapCanvasHelper
 merge oglcanvas::IBufferContext with oglcanvas::(anonymous namespace)::BufferContextImpl
 merge oox::dump::Address with oox::dump::TokenAddress
diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx
index 3b80057..433d912 100644
--- a/io/source/stm/opipe.cxx
+++ b/io/source/stm/opipe.cxx
@@ -117,8 +117,8 @@ private:
     bool m_bInputStreamClosed;
 
     osl::Condition m_conditionBytesAvail;
-    Mutex     m_mutexAccess;
-    I_FIFO      *m_pFIFO;
+    Mutex          m_mutexAccess;
+    MemFIFO       *m_pFIFO;
 };
 
 
diff --git a/io/source/stm/streamhelper.hxx b/io/source/stm/streamhelper.hxx
index 8450138..436e8fc 100644
--- a/io/source/stm/streamhelper.hxx
+++ b/io/source/stm/streamhelper.hxx
@@ -37,32 +37,6 @@
 namespace io_stm
 {
 
-class I_FIFO_OutOfBoundsException :
-    public Exception
-{};
-
-class I_FIFO_OutOfMemoryException :
-    public Exception
-{};
-
-class I_FIFO
-{
-public:
-
-
-    virtual void    write( const Sequence<sal_Int8> &) throw( I_FIFO_OutOfMemoryException,
-            I_FIFO_OutOfBoundsException )=0;
-
-    virtual void    read( Sequence<sal_Int8> & , sal_Int32 nBytesToRead )
-    throw( I_FIFO_OutOfBoundsException )=0;
-    virtual void    skip( sal_Int32 nBytesToSkip )
-    throw( I_FIFO_OutOfBoundsException )=0;
-    virtual sal_Int32   getSize() const throw(  )  =0;
-
-    virtual ~I_FIFO() {};
-};
-
-
 class IRingBuffer_OutOfBoundsException :
     public Exception
 {};
@@ -110,20 +84,28 @@ private:
 };
 
 
+class I_FIFO_OutOfBoundsException :
+    public Exception
+{};
+
+class I_FIFO_OutOfMemoryException :
+    public Exception
+{};
+
 class MemFIFO :
-    public  I_FIFO,
     private MemRingBuffer
 {
 public:
-    virtual void    write( const Sequence<sal_Int8> &) throw( I_FIFO_OutOfMemoryException,
-            I_FIFO_OutOfBoundsException ) SAL_OVERRIDE;
-    virtual void    read( Sequence<sal_Int8> & , sal_Int32 nBytesToRead )
-    throw( I_FIFO_OutOfBoundsException ) SAL_OVERRIDE;
-    virtual void    skip( sal_Int32 nBytesToSkip ) throw( I_FIFO_OutOfBoundsException ) SAL_OVERRIDE;
-    virtual sal_Int32   getSize()  const throw(  ) SAL_OVERRIDE
-    { return MemRingBuffer::getSize(); }
-    virtual void    shrink() throw() SAL_OVERRIDE
-    { MemRingBuffer::shrink(); }
+    void          write( const Sequence<sal_Int8> &)
+                  throw( I_FIFO_OutOfMemoryException, I_FIFO_OutOfBoundsException );
+    void          read( Sequence<sal_Int8> & , sal_Int32 nBytesToRead )
+                  throw( I_FIFO_OutOfBoundsException );
+    void          skip( sal_Int32 nBytesToSkip )
+                  throw( I_FIFO_OutOfBoundsException );
+    sal_Int32     getSize() const throw()
+                  { return MemRingBuffer::getSize(); }
+    virtual void  shrink() throw() SAL_OVERRIDE
+                  { MemRingBuffer::shrink(); }
 
 };
 
commit 1d8806120f03e76574d5181fef0f0e81a3273caa
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 12:42:31 2015 +0200

    loplugin:mergeclasses
    
    Change-Id: I31fe981dac14bd732ee68ee1a2e475dd1b0498a2

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index cd855ba..d328124 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -130,7 +130,6 @@ merge frm::ITextSelectionListener with frm::ORichTextPeer
 merge ftp::CurlInput with InsertData
 merge ftp::ResultSetFactory with ResultSetFactoryI
 merge i_xml_parser_event_handler with (anonymous namespace)::recently_used_file_filter
-merge io_stm::IRingBuffer with io_stm::MemRingBuffer
 merge io_stm::I_FIFO with io_stm::MemFIFO
 merge oglcanvas::CanvasHelper with oglcanvas::BitmapCanvasHelper
 merge oglcanvas::IBufferContext with oglcanvas::(anonymous namespace)::BufferContextImpl
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index fd2db98..a090228 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -138,7 +138,7 @@ private:
     Reference< XOutputStream >  m_output;
     bool m_bValidStream;
 
-    IRingBuffer *m_pBuffer;
+    MemRingBuffer *m_pBuffer;
     map<sal_Int32,sal_Int32,less< sal_Int32 > > m_mapMarks;
     sal_Int32 m_nCurrentPos;
     sal_Int32 m_nCurrentMark;
@@ -553,7 +553,7 @@ private:
     Reference< XInputStream > m_input;
     bool m_bValidStream;
 
-    IRingBuffer *m_pBuffer;
+    MemRingBuffer *m_pBuffer;
     map<sal_Int32,sal_Int32,less< sal_Int32 > > m_mapMarks;
     sal_Int32 m_nCurrentPos;
     sal_Int32 m_nCurrentMark;
diff --git a/io/source/stm/streamhelper.hxx b/io/source/stm/streamhelper.hxx
index 1fa232b..8450138 100644
--- a/io/source/stm/streamhelper.hxx
+++ b/io/source/stm/streamhelper.hxx
@@ -34,14 +34,15 @@
 #define Max( a, b )     (((a)>(b)) ? (a) : (b) )
 #define Min( a, b )     (((a)<(b)) ? (a) : (b) )
 
-namespace io_stm {
+namespace io_stm
+{
 
 class I_FIFO_OutOfBoundsException :
-                public Exception
+    public Exception
 {};
 
 class I_FIFO_OutOfMemoryException :
-                public Exception
+    public Exception
 {};
 
 class I_FIFO
@@ -50,12 +51,12 @@ public:
 
 
     virtual void    write( const Sequence<sal_Int8> &) throw( I_FIFO_OutOfMemoryException,
-                                                              I_FIFO_OutOfBoundsException )=0;
+            I_FIFO_OutOfBoundsException )=0;
 
     virtual void    read( Sequence<sal_Int8> & , sal_Int32 nBytesToRead )
-                                                       throw( I_FIFO_OutOfBoundsException )=0;
+    throw( I_FIFO_OutOfBoundsException )=0;
     virtual void    skip( sal_Int32 nBytesToSkip )
-                                                       throw( I_FIFO_OutOfBoundsException )=0;
+    throw( I_FIFO_OutOfBoundsException )=0;
     virtual sal_Int32   getSize() const throw(  )  =0;
 
     virtual ~I_FIFO() {};
@@ -63,56 +64,37 @@ public:
 
 
 class IRingBuffer_OutOfBoundsException :
-                public Exception
+    public Exception
 {};
 
 class IRingBuffer_OutOfMemoryException :
-                public Exception
+    public Exception
 {};
 
-class IRingBuffer
+class MemRingBuffer
 {
 public:
+    MemRingBuffer();
+    virtual ~MemRingBuffer();
+
     /***
     * overwrites data at given position. Size is automatically extended, when
     * data is written beyond end.
-    *
     ***/
+    void    writeAt( sal_Int32 nPos, const Sequence<sal_Int8> &)
+    throw(  IRingBuffer_OutOfMemoryException,
+            IRingBuffer_OutOfBoundsException );
+    void    readAt( sal_Int32 nPos, Sequence<sal_Int8> & , sal_Int32 nBytesToRead ) const
+    throw( IRingBuffer_OutOfBoundsException );
+    sal_Int32   getSize() const throw();
+    void    forgetFromStart( sal_Int32 nBytesToForget ) throw(IRingBuffer_OutOfBoundsException);
 
-    virtual void    writeAt( sal_Int32 nPos, const Sequence<sal_Int8> &)
-        throw( IRingBuffer_OutOfMemoryException,
-               IRingBuffer_OutOfBoundsException )=0;
-    virtual void    readAt( sal_Int32 nPos, Sequence<sal_Int8> & , sal_Int32 nBytesToRead ) const
-        throw( IRingBuffer_OutOfBoundsException )=0;
-    virtual sal_Int32   getSize() const throw(  )  =0;
-    virtual void    forgetFromStart( sal_Int32 nBytesToForget ) throw(IRingBuffer_OutOfBoundsException)=0;
-    virtual void    shrink() throw() = 0;
-    virtual ~IRingBuffer() {};
-};
-
-
-class MemRingBuffer :
-        public IRingBuffer
-{
-public:
-    MemRingBuffer();
-    virtual ~MemRingBuffer();
-
-    virtual void    writeAt( sal_Int32 nPos, const Sequence<sal_Int8> &)
-                                                    throw(  IRingBuffer_OutOfMemoryException,
-                                                                IRingBuffer_OutOfBoundsException ) SAL_OVERRIDE;
-    virtual void    readAt( sal_Int32 nPos, Sequence<sal_Int8> & , sal_Int32 nBytesToRead ) const
-                                                    throw( IRingBuffer_OutOfBoundsException ) SAL_OVERRIDE;
-    virtual sal_Int32   getSize() const throw(  ) SAL_OVERRIDE;
-    virtual void    forgetFromStart( sal_Int32 nBytesToForget ) throw(IRingBuffer_OutOfBoundsException) SAL_OVERRIDE;
-
-    virtual void shrink() throw() SAL_OVERRIDE;
+    virtual void shrink() throw();
 
 private:
 
     void resizeBuffer( sal_Int32 nMinSize ) throw( IRingBuffer_OutOfMemoryException );
-    inline void checkInvariants()
-    {
+    inline void checkInvariants() {
         assert( m_nBufferLen >= 0 );
         assert( m_nOccupiedBuffer >= 0 );
         assert( m_nOccupiedBuffer <= m_nBufferLen );
@@ -134,14 +116,14 @@ class MemFIFO :
 {
 public:
     virtual void    write( const Sequence<sal_Int8> &) throw( I_FIFO_OutOfMemoryException,
-                                                              I_FIFO_OutOfBoundsException ) SAL_OVERRIDE;
+            I_FIFO_OutOfBoundsException ) SAL_OVERRIDE;
     virtual void    read( Sequence<sal_Int8> & , sal_Int32 nBytesToRead )
-                                                       throw( I_FIFO_OutOfBoundsException ) SAL_OVERRIDE;
+    throw( I_FIFO_OutOfBoundsException ) SAL_OVERRIDE;
     virtual void    skip( sal_Int32 nBytesToSkip ) throw( I_FIFO_OutOfBoundsException ) SAL_OVERRIDE;
     virtual sal_Int32   getSize()  const throw(  ) SAL_OVERRIDE
-                        { return MemRingBuffer::getSize(); }
+    { return MemRingBuffer::getSize(); }
     virtual void    shrink() throw() SAL_OVERRIDE
-                        { MemRingBuffer::shrink(); }
+    { MemRingBuffer::shrink(); }
 
 };
 
commit 6b34ac24194ae56d2762fcb67ad1e5dcf1bf3a82
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 12:39:01 2015 +0200

    loplugin:mergeclasses
    
    Change-Id: Ic02d59708670949c3342566753882eebd086438f

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index 9272d07..cd855ba 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -129,7 +129,6 @@ merge frm::ITextAttributeListener with frm::OAttributeDispatcher
 merge frm::ITextSelectionListener with frm::ORichTextPeer
 merge ftp::CurlInput with InsertData
 merge ftp::ResultSetFactory with ResultSetFactoryI
-merge helpdatafileproxy::hdf_internal::Noncopyable with helpdatafileproxy::Hdf
 merge i_xml_parser_event_handler with (anonymous namespace)::recently_used_file_filter
 merge io_stm::IRingBuffer with io_stm::MemRingBuffer
 merge io_stm::I_FIFO with io_stm::MemFIFO
diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx
index 1fc09e4..72eaf94 100644
--- a/xmlhelp/source/cxxhelp/provider/db.hxx
+++ b/xmlhelp/source/cxxhelp/provider/db.hxx
@@ -27,18 +27,6 @@
 
 namespace helpdatafileproxy {
 
-    namespace hdf_internal
-    {
-        class Noncopyable
-        {
-            Noncopyable(const Noncopyable&) SAL_DELETED_FUNCTION;
-            void operator=(const Noncopyable&) SAL_DELETED_FUNCTION;
-        protected:
-            Noncopyable() {}
-            ~Noncopyable() {}
-        };
-    }
-
     class HDFData
     {
         friend class        Hdf;
@@ -65,7 +53,7 @@ namespace helpdatafileproxy {
     typedef std::unordered_map< OString,std::pair<int,int>,OStringHash >   StringToValPosMap;
     typedef std::unordered_map< OString,OString,OStringHash >     StringToDataMap;
 
-    class Hdf : hdf_internal::Noncopyable
+    class Hdf
     {
         OUString       m_aFileURL;
         StringToDataMap*    m_pStringToDataMap;
@@ -108,7 +96,10 @@ namespace helpdatafileproxy {
         bool startIteration();
         bool getNextKeyAndValue( HDFData& rKey, HDFData& rValue );
         void stopIteration();
+        Hdf(const Hdf&) SAL_DELETED_FUNCTION;
+        void operator=(const Hdf&) SAL_DELETED_FUNCTION;
     };
+
 }
 
 #endif
commit 06e4a9899085465bb352d612e06a07b8ff536892
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 12:34:29 2015 +0200

    loplugin:mergeclasses
    
    Change-Id: I6266369912413d51c9f1595b13dca97d3d74225f

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index 62fbf55..9272d07 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -128,7 +128,6 @@ merge frm::IMultiAttributeDispatcher with frm::RichTextControl
 merge frm::ITextAttributeListener with frm::OAttributeDispatcher
 merge frm::ITextSelectionListener with frm::ORichTextPeer
 merge ftp::CurlInput with InsertData
-merge ftp::FTPHandleProvider with ftp::FTPContentProvider
 merge ftp::ResultSetFactory with ResultSetFactoryI
 merge helpdatafileproxy::hdf_internal::Noncopyable with helpdatafileproxy::Hdf
 merge i_xml_parser_event_handler with (anonymous namespace)::recently_used_file_filter
diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.hxx b/ucb/source/ucp/ftp/ftpcontentprovider.hxx
index 4f96524..62ebe6b 100644
--- a/ucb/source/ucp/ftp/ftpcontentprovider.hxx
+++ b/ucb/source/ucp/ftp/ftpcontentprovider.hxx
@@ -25,7 +25,6 @@
 #include <ucbhelper/proxydecider.hxx>
 #include <ucbhelper/providerhelper.hxx>
 #include <com/sun/star/ucb/XContentProviderManager.hpp>
-#include "ftphandleprovider.hxx"
 #include "ftpurl.hxx"
 
 // UNO service name for the provider. This name will be used by the UCB to
@@ -42,8 +41,7 @@ namespace ftp
     class FTPLoaderThread;
 
     class FTPContentProvider:
-        public ::ucbhelper::ContentProviderImplHelper,
-        public FTPHandleProvider
+        public ::ucbhelper::ContentProviderImplHelper
     {
     public:
 
@@ -93,21 +91,22 @@ namespace ftp
                    css::uno::RuntimeException,
                    std::exception ) SAL_OVERRIDE;
 
-        // FTPHandleProvider.
+        CURL* handle();
 
-        virtual CURL* handle() SAL_OVERRIDE;
+        /** host is in the form host:port.
+         */
 
-        virtual bool forHost(const OUString& host,
+        bool forHost(const OUString& host,
                              const OUString& port,
                              const OUString& username,
                              OUString& password,
-                             OUString& account) SAL_OVERRIDE;
+                             OUString& account);
 
-        virtual bool setHost(const OUString& host,
+        bool setHost(const OUString& host,
                              const OUString& port,
                              const OUString& username,
                              const OUString& password,
-                             const OUString& account) SAL_OVERRIDE;
+                             const OUString& account);
 
         struct ServerInfo
         {
diff --git a/ucb/source/ucp/ftp/ftphandleprovider.hxx b/ucb/source/ucp/ftp/ftphandleprovider.hxx
deleted file mode 100644
index 4e87590..0000000
--- a/ucb/source/ucp/ftp/ftphandleprovider.hxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_UCB_SOURCE_UCP_FTP_FTPHANDLEPROVIDER_HXX
-#define INCLUDED_UCB_SOURCE_UCP_FTP_FTPHANDLEPROVIDER_HXX
-
-#include <rtl/ustring.hxx>
-#include "curl.hxx"
-
-namespace ftp {
-
-    class FTPHandleProvider {
-    public:
-
-        virtual CURL* handle() = 0;
-
-
-        /** host is in the form host:port.
-         */
-
-        virtual bool forHost(const OUString& host,
-                             const OUString& port,
-                             const OUString& username,
-                             OUString& password,
-                             OUString& account) = 0;
-
-        virtual bool setHost(const OUString& host,
-                             const OUString& port,
-                             const OUString& username,
-                             const OUString& password,
-                             const OUString& account) = 0;
-
-    protected:
-        ~FTPHandleProvider() {}
-    };
-
-
-}
-
-#endif // INCLUDED_UCB_SOURCE_UCP_FTP_FTPHANDLEPROVIDER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index e8987dc..58c909b 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -35,7 +35,7 @@
 
 #include "ftpstrcont.hxx"
 #include "ftpurl.hxx"
-#include "ftphandleprovider.hxx"
+#include "ftpcontentprovider.hxx"
 #include "ftpcfunc.hxx"
 #include "ftpcontainer.hxx"
 #include <memory>
@@ -126,7 +126,7 @@ FTPURL::FTPURL(const FTPURL& r)
 
 
 FTPURL::FTPURL(const OUString& url,
-               FTPHandleProvider* pFCP)
+               FTPContentProvider* pFCP)
     throw(
         malformed_exception
     )
diff --git a/ucb/source/ucp/ftp/ftpurl.hxx b/ucb/source/ucp/ftp/ftpurl.hxx
index d67cf8f..6034abf 100644
--- a/ucb/source/ucp/ftp/ftpurl.hxx
+++ b/ucb/source/ucp/ftp/ftpurl.hxx
@@ -43,7 +43,7 @@ namespace ftp {
     /** Forward declarations.
      */
 
-    class FTPHandleProvider;
+    class FTPContentProvider;
 
 
     enum FTPErrors { FILE_EXIST_DURING_INSERT = CURL_LAST +1,
@@ -84,7 +84,7 @@ namespace ftp {
 
         FTPURL(
             const OUString& aIdent,
-            FTPHandleProvider* pFCP = 0
+            FTPContentProvider* pFCP = 0
         )
             throw(
                 malformed_exception
@@ -142,7 +142,7 @@ namespace ftp {
 
     private:
 
-        FTPHandleProvider *m_pFCP;
+        FTPContentProvider *m_pFCP;
 
         mutable OUString m_aUsername;
         bool m_bShowPassword;
commit f8ba308cd7cd2844bae6b27cd758caaab89dcece
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 12:28:26 2015 +0200

    loplugin:mergeclasses
    
    Change-Id: Id6e39c2c20ab3da5a8b8628f99a940b896feff78

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index 6d669f1..62fbf55 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -119,7 +119,6 @@ merge dbmm::IMigrationProgress with dbmm::ProgressPage
 merge dbmm::IProgressConsumer with dbmm::ProgressDelegator
 merge dbp::OModuleResourceClient with dbp::OUnoAutoPilot
 merge dbtools::ISQLStatementHelper with connectivity::mysql::OTables
-merge frm::IAttributeHandler with frm::AttributeHandler
 merge frm::ICommandDescriptionProvider with frm::DefaultCommandDescriptionProvider
 merge frm::ICommandImageProvider with frm::DocumentCommandImageProvider
 merge frm::IEngineStatusListener with frm::RichTextControlImpl
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 2bece2f..040fda5 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -185,7 +185,7 @@ namespace frm
         AttributeHandlerPool::const_iterator aHandlerPos = m_aAttributeHandlers.find( _nAttributeId  );
         if ( aHandlerPos == m_aAttributeHandlers.end() )
         {
-            ::rtl::Reference< IAttributeHandler > aHandler = AttributeHandlerFactory::getHandlerFor( _nAttributeId, *m_pEngine->GetEmptyItemSet().GetPool() );
+            ::rtl::Reference< AttributeHandler > aHandler = AttributeHandlerFactory::getHandlerFor( _nAttributeId, *m_pEngine->GetEmptyItemSet().GetPool() );
             OSL_ENSURE( aHandler.is(), "RichTextControlImpl::enableAttributeNotification: no handler available for this attribute!" );
             if ( !aHandler.is() )
                 return;
diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx
index 7d0f348..7f86524 100644
--- a/forms/source/richtext/richtextimplcontrol.hxx
+++ b/forms/source/richtext/richtextimplcontrol.hxx
@@ -43,7 +43,7 @@ namespace frm
     class RichTextControlImpl : public IEngineStatusListener
     {
         typedef ::std::map< AttributeId, AttributeState >                           StateCache;
-        typedef ::std::map< AttributeId, ::rtl::Reference< IAttributeHandler > >    AttributeHandlerPool;
+        typedef ::std::map< AttributeId, ::rtl::Reference< AttributeHandler > >    AttributeHandlerPool;
         typedef ::std::map< AttributeId, ITextAttributeListener* >                  AttributeListenerPool;
 
         StateCache              m_aLastKnownStates;
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index 89b3221..da0d9c4 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -114,9 +114,9 @@ namespace frm
         }
     }
 
-    ::rtl::Reference< IAttributeHandler > AttributeHandlerFactory::getHandlerFor( AttributeId _nAttributeId, const SfxItemPool& _rEditEnginePool )
+    ::rtl::Reference< AttributeHandler > AttributeHandlerFactory::getHandlerFor( AttributeId _nAttributeId, const SfxItemPool& _rEditEnginePool )
     {
-        ::rtl::Reference< IAttributeHandler > pReturn;
+        ::rtl::Reference< AttributeHandler > pReturn;
         switch ( _nAttributeId )
         {
         case SID_ATTR_PARA_ADJUST_LEFT  :
diff --git a/forms/source/richtext/rtattributehandler.hxx b/forms/source/richtext/rtattributehandler.hxx
index 6555369..3d27321 100644
--- a/forms/source/richtext/rtattributehandler.hxx
+++ b/forms/source/richtext/rtattributehandler.hxx
@@ -34,18 +34,7 @@ class SfxItemPool;
 namespace frm
 {
 
-    class IAttributeHandler : public salhelper::SimpleReferenceObject
-    {
-    public:
-        virtual     AttributeId     getAttributeId( ) const = 0;
-        virtual     AttributeState  getState( const SfxItemSet& _rAttribs ) const = 0;
-        virtual     void            executeAttribute( const SfxItemSet& _rCurrentAttribs, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, SvtScriptType _nForScriptType ) const = 0;
-
-    protected:
-        virtual ~IAttributeHandler() {}
-    };
-
-    class AttributeHandler  : public IAttributeHandler
+    class AttributeHandler  : public salhelper::SimpleReferenceObject
     {
     private:
         AttributeId     m_nAttribute;
@@ -58,20 +47,19 @@ namespace frm
     public:
         AttributeHandler( AttributeId _nAttributeId, WhichId _nWhichId );
 
-        // IAttributeHandler
-        virtual     AttributeId     getAttributeId( ) const SAL_OVERRIDE;
-        virtual     AttributeState  getState( const SfxItemSet& _rAttribs ) const SAL_OVERRIDE;
-        virtual     void            executeAttribute( const SfxItemSet& _rCurrentAttribs, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, SvtScriptType _nForScriptType ) const SAL_OVERRIDE = 0;
+        AttributeId             getAttributeId( ) const;
+        virtual AttributeState  getState( const SfxItemSet& _rAttribs ) const;
+        virtual void            executeAttribute( const SfxItemSet& _rCurrentAttribs, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, SvtScriptType _nForScriptType ) const = 0;
 
     protected:
         /// helper method calling implGetCheckState
-        AttributeCheckState getCheckState( const SfxItemSet& _rAttribs ) const;
+        AttributeCheckState     getCheckState( const SfxItemSet& _rAttribs ) const;
 
         /// helper method putting an item into a set, respecting a script type
-        void        putItemForScript( SfxItemSet& _rAttribs, const SfxPoolItem& _rItem, SvtScriptType _nForScriptType ) const;
+        void                    putItemForScript( SfxItemSet& _rAttribs, const SfxPoolItem& _rItem, SvtScriptType _nForScriptType ) const;
 
         // pseudo-abstract
-        virtual     AttributeCheckState  implGetCheckState( const SfxPoolItem& _rItem ) const;
+        virtual AttributeCheckState implGetCheckState( const SfxPoolItem& _rItem ) const;
 
     protected:
         virtual ~AttributeHandler();
@@ -79,7 +67,7 @@ namespace frm
 
     namespace AttributeHandlerFactory
     {
-        ::rtl::Reference< IAttributeHandler > getHandlerFor( AttributeId _nAttributeId, const SfxItemPool& _rEditEnginePool );
+        ::rtl::Reference< AttributeHandler > getHandlerFor( AttributeId _nAttributeId, const SfxItemPool& _rEditEnginePool );
     }
 
     class ParaAlignmentHandler : public AttributeHandler
commit 523eaf4888fa7888d66739fb62f4af473dbc9704
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 12:23:51 2015 +0200

    loplugin:mergeclasses
    
    Change-Id: Ia4c09c5b835e77eaa2d4c0d8c74f146feb0905be

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index 2909f76..6d669f1 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -119,7 +119,6 @@ merge dbmm::IMigrationProgress with dbmm::ProgressPage
 merge dbmm::IProgressConsumer with dbmm::ProgressDelegator
 merge dbp::OModuleResourceClient with dbp::OUnoAutoPilot
 merge dbtools::ISQLStatementHelper with connectivity::mysql::OTables
-merge formula::IStructHelper with formula::StructPage
 merge frm::IAttributeHandler with frm::AttributeHandler
 merge frm::ICommandDescriptionProvider with frm::DefaultCommandDescriptionProvider
 merge frm::ICommandImageProvider with frm::DocumentCommandImageProvider
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 2744e87..2e1f495 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -85,8 +85,8 @@ public:
     sal_Int32       GetFunctionPos(sal_Int32 nPos);
     void            ClearAllParas();
 
-    void            MakeTree(IStructHelper* _pTree,SvTreeListEntry* pParent,FormulaToken* _pToken,long Count);
-    void            fillTree(IStructHelper* _pTree);
+    void            MakeTree(StructPage* _pTree,SvTreeListEntry* pParent,FormulaToken* _pToken,long Count);
+    void            fillTree(StructPage* _pTree);
     void            UpdateTokenArray( const OUString& rStrExp);
     OUString        RepairFormula(const OUString& aFormula);
     void            FillDialog(bool bFlag=true);
@@ -654,7 +654,7 @@ bool FormulaDlg_Impl::CalcStruct( const OUString& rStrExp)
 }
 
 
-void FormulaDlg_Impl::MakeTree(IStructHelper* _pTree,SvTreeListEntry* pParent,FormulaToken* _pToken,long Count)
+void FormulaDlg_Impl::MakeTree(StructPage* _pTree,SvTreeListEntry* pParent,FormulaToken* _pToken,long Count)
 {
     if( _pToken != NULL && Count > 0 )
     {
@@ -767,7 +767,7 @@ void FormulaDlg_Impl::MakeTree(IStructHelper* _pTree,SvTreeListEntry* pParent,Fo
     }
 }
 
-void FormulaDlg_Impl::fillTree(IStructHelper* _pTree)
+void FormulaDlg_Impl::fillTree(StructPage* _pTree)
 {
     GetFormulaOpCodeMapper();
     FormulaToken* pToken = m_pTokenArray->LastRPN();
diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx
index de84f7b..186908e 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -67,7 +67,6 @@ public:
 
 
 class StructPage : public TabPage
-                    , public IStructHelper
 {
 private:
     OModuleClient           m_aModuleClient;
@@ -94,10 +93,10 @@ public:
     virtual void    dispose() SAL_OVERRIDE;
 
     void            ClearStruct();
-    virtual SvTreeListEntry*    InsertEntry(const OUString& rText, SvTreeListEntry* pParent,
-                                sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL) SAL_OVERRIDE;
+    SvTreeListEntry* InsertEntry(const OUString& rText, SvTreeListEntry* pParent,
+                                sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL);
 
-    virtual OUString            GetEntryText(SvTreeListEntry* pEntry) const SAL_OVERRIDE;
+    OUString        GetEntryText(SvTreeListEntry* pEntry) const;
 
     void            SetSelectionHdl( const Link<StructPage&,void>& rLink ) { aSelLink = rLink; }
 
diff --git a/include/formula/IFunctionDescription.hxx b/include/formula/IFunctionDescription.hxx
index 090054e..78920ba 100644
--- a/include/formula/IFunctionDescription.hxx
+++ b/include/formula/IFunctionDescription.hxx
@@ -109,19 +109,6 @@ namespace formula
         ~IFormulaToken() {}
     };
 
-    class SAL_NO_VTABLE IStructHelper
-    {
-    public:
-        IStructHelper(){}
-        virtual SvTreeListEntry*    InsertEntry(const OUString& rText, SvTreeListEntry* pParent,
-                                sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL) = 0;
-
-        virtual OUString        GetEntryText(SvTreeListEntry* pEntry) const = 0;
-
-    protected:
-        ~IStructHelper() {}
-    };
-
     class SAL_NO_VTABLE IFormulaEditorHelper
     {
     public:
commit 48532dfa60da3a0a897a26a9ff9cf97e7bf195fd
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Oct 9 12:20:01 2015 +0200

    loplugin:mergeclasses
    
    Change-Id: I1ce2e31e4dae780612e51b3806ee6044be9cf4bb

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index 932862e..2909f76 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -112,7 +112,6 @@ merge dbaccess::IPropertyContainer with dbaccess::OColumn
 merge dbaccess::IRefreshListener with dbaccess::OConnection
 merge dbaui::(anonymous namespace)::IImageProvider with dbaui::(anonymous namespace)::ImageProvider
 merge dbaui::(anonymous namespace)::ILabelProvider with dbaui::(anonymous namespace)::LabelProvider
-merge dbaui::IApplicationController with dbaui::OApplicationController
 merge dbaui::IEntryFilter with dbaui::(anonymous namespace)::FilterByEntryDataId
 merge dbaui::OOdbcLibWrapper with dbaui::OOdbcEnumeration
 merge dbaui::SbaGridListener with dbaui::SbaXDataBrowserController
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index ce32ee5..511f9ff 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2248,10 +2248,6 @@ void OApplicationController::OnInvalidateClipboard()
     InvalidateFeature(SID_DB_APP_PASTE_SPECIAL);
 }
 
-void OApplicationController::onCutEntry()
-{
-}
-
 void OApplicationController::onCopyEntry()
 {
     Execute(ID_BROWSER_COPY,Sequence<PropertyValue>());
@@ -2344,7 +2340,7 @@ PopupMenu* OApplicationController::getContextMenu( Control& /*_rControl*/ ) cons
 
 IController& OApplicationController::getCommandController()
 {
-    return *static_cast< IApplicationController* >( this );
+    return *this;
 }
 
 ::cppu::OInterfaceContainerHelper* OApplicationController::getContextMenuInterceptors()
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index 483fb38..87ba2f2 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_APP_APPCONTROLLER_HXX
 #define INCLUDED_DBACCESS_SOURCE_UI_APP_APPCONTROLLER_HXX
 
-#include "IApplicationController.hxx"
 #include "AppElementType.hxx"
 #include "callbacks.hxx"
 #include "commontypes.hxx"
@@ -80,7 +79,8 @@ namespace dbaui
     class OApplicationController
             :public OGenericUnoController
             ,public OApplicationController_Base
-            ,public IApplicationController
+            ,public IControlActionListener
+            ,public IContextMenuProvider
     {
     public:
         typedef ::std::vector< css::uno::Reference< css::container::XContainer > >  TContainerVector;
@@ -481,18 +481,41 @@ namespace dbaui
         */
         void refreshTables();
 
-        // IApplicationController
-        virtual bool onEntryDoubleClick(SvTreeListBox& _rTree) SAL_OVERRIDE;
-        virtual bool onContainerSelect(ElementType _eType) SAL_OVERRIDE;
-        virtual void onSelectionChanged() SAL_OVERRIDE;
-        virtual void onCutEntry() SAL_OVERRIDE;
-        virtual void onCopyEntry() SAL_OVERRIDE;
-        virtual void onPasteEntry() SAL_OVERRIDE;
-        virtual void onDeleteEntry() SAL_OVERRIDE;
-        virtual void previewChanged( sal_Int32 _nMode) SAL_OVERRIDE;
-        virtual void containerFound( const css::uno::Reference< css::container::XContainer >& _xContainer) SAL_OVERRIDE;
-
-        // IController (base of IApplicationController)
+        /** called when an entry in a tree list box has been double-clicked
+            @param  _rTree
+                The tree list box.
+            @return
+                <TRUE/> if the double click event has been handled by the called, and should not
+                be processed further.
+        */
+        bool onEntryDoubleClick(SvTreeListBox& _rTree);
+        /** called when a container (category) in the application view has been selected
+            @param  _pTree
+                The tree list box.
+            @return
+                <TRUE/> if the cotainer could be changed otherwise <FALSE/>
+        */
+        bool onContainerSelect(ElementType _eType);
+        /** called when an entry in a tree view has been selected
+            @param  _pEntry
+                the selected entry
+        */
+        void onSelectionChanged();
+        /** called when a "Copy" command is executed in a tree view
+        */
+        void onCopyEntry();
+        /** called when a "Paste" command is executed in a tree view
+        */
+        void onPasteEntry();
+        /** called when a "Delete" command is executed in a tree view
+        */
+        void onDeleteEntry();
+        /// called when the preview mode was changed
+        void previewChanged( sal_Int32 _nMode);
+        /// called when an object container of any kind was found during enumerating tree view elements
+        void containerFound( const css::uno::Reference< css::container::XContainer >& _xContainer);
+
+        // IController
         virtual void        executeUnChecked(const css::util::URL& _rCommand, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) SAL_OVERRIDE;
         virtual void        executeChecked(const css::util::URL& _rCommand, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) SAL_OVERRIDE;
         virtual void        executeUnChecked(sal_uInt16 _nCommandId, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) SAL_OVERRIDE;
@@ -512,7 +535,7 @@ namespace dbaui
         virtual sal_Int8    queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) SAL_OVERRIDE;
         virtual sal_Int8    executeDrop( const ExecuteDropEvent& _rEvt ) SAL_OVERRIDE;
 
-        // IContextMenuProvider (base of IApplicationController)
+        // IContextMenuProvider
         virtual PopupMenu*      getContextMenu( Control& _rControl ) const SAL_OVERRIDE;
         virtual IController&    getCommandController() SAL_OVERRIDE;
         virtual ::cppu::OInterfaceContainerHelper*
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index b4b6769..d1877b1 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -62,8 +62,8 @@
 #include <vcl/settings.hxx>
 #include <tools/stream.hxx>
 #include <rtl/ustrbuf.hxx>
-#include "IApplicationController.hxx"
 #include "svtools/treelistentry.hxx"
+#include "AppController.hxx"
 
 #include <com/sun/star/document/XDocumentProperties.hpp>
 
@@ -759,7 +759,6 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons
     _pTreeView->SetEnterKeyHdl(LINK(this, OAppDetailPageHelper, OnEntryEnterKey));
     _pTreeView->SetSelChangeHdl(LINK(this, OAppDetailPageHelper, OnEntrySelChange));
 
-    _pTreeView->setCutHandler(LINK(this, OAppDetailPageHelper, OnCutEntry));
     _pTreeView->setCopyHandler(LINK(this, OAppDetailPageHelper, OnCopyEntry));
     _pTreeView->setPasteHandler(LINK(this, OAppDetailPageHelper, OnPasteEntry));
     _pTreeView->setDeleteHandler(LINK(this, OAppDetailPageHelper, OnDeleteEntry));
@@ -920,11 +919,6 @@ IMPL_LINK_NOARG_TYPED(OAppDetailPageHelper, OnEntrySelChange, LinkParamNone*, vo
     getBorderWin().getView()->getAppController().onSelectionChanged();
 }
 
-IMPL_LINK_NOARG_TYPED( OAppDetailPageHelper, OnCutEntry, LinkParamNone*, void )
-{
-    getBorderWin().getView()->getAppController().onCutEntry();
-}
-
 IMPL_LINK_NOARG_TYPED( OAppDetailPageHelper, OnCopyEntry, LinkParamNone*, void )
 {
     getBorderWin().getView()->getAppController().onCopyEntry();
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index 1666f16..63a0845 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -155,7 +155,6 @@ namespace dbaui
         DECL_LINK_TYPED( OnEntryEnterKey,       DBTreeListBox*, void );
         DECL_LINK_TYPED( OnEntrySelChange,      LinkParamNone*, void );
 
-        DECL_LINK_TYPED( OnCutEntry,            LinkParamNone*, void );
         DECL_LINK_TYPED( OnCopyEntry,           LinkParamNone*, void );
         DECL_LINK_TYPED( OnPasteEntry,          LinkParamNone*, void );
         DECL_LINK_TYPED( OnDeleteEntry,         LinkParamNone*, void );
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index ebca1a1..8651666 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -44,9 +44,9 @@
 #include "svtools/viewdataentry.hxx"
 #include <algorithm>
 #include "dbtreelistbox.hxx"
-#include "IApplicationController.hxx"
 #include "imageprovider.hxx"
 #include "comphelper/processfactory.hxx"
+#include "AppController.hxx"
 
 using namespace ::dbaui;
 using namespace ::com::sun::star::uno;
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index 6544c40..eb4a618 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -27,7 +27,7 @@
 #include <vcl/menu.hxx>
 #include <vcl/mnemonic.hxx>
 #include <vcl/settings.hxx>
-#include "IApplicationController.hxx"
+#include "AppController.hxx"
 
 using namespace ::dbaui;

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list