[Libreoffice-commits] core.git: include/toolkit include/tools toolkit/source tools/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Oct 26 06:50:25 UTC 2016


 include/toolkit/awt/vclxtabpagecontainer.hxx   |    3 +--
 include/toolkit/awt/vclxwindows.hxx            |    6 ++----
 include/tools/pstm.hxx                         |    2 --
 include/tools/urlobj.hxx                       |    9 ++-------
 toolkit/source/awt/vclxtabpagecontainer.cxx    |    2 +-
 toolkit/source/awt/vclxwindows.cxx             |    4 ++--
 toolkit/source/controls/tree/treedatamodel.cxx |    8 +-------
 tools/source/fsys/urlobj.cxx                   |    6 +++---
 tools/source/ref/pstm.cxx                      |    5 -----
 9 files changed, 12 insertions(+), 33 deletions(-)

New commits:
commit e5c1e15eda804463c9021664e868979b019c203e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Oct 25 14:54:03 2016 +0200

    loplugin:expandablemethods in toolkit..tools
    
    Change-Id: I7221bf131d28804ee93474b11973bbc066cc2764
    Reviewed-on: https://gerrit.libreoffice.org/30268
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/toolkit/awt/vclxtabpagecontainer.hxx b/include/toolkit/awt/vclxtabpagecontainer.hxx
index 77f2dab..d36f325 100644
--- a/include/toolkit/awt/vclxtabpagecontainer.hxx
+++ b/include/toolkit/awt/vclxtabpagecontainer.hxx
@@ -60,8 +60,7 @@ public:
     virtual void SAL_CALL addTabPageContainerListener( const css::uno::Reference< css::awt::tab::XTabPageContainerListener >& listener ) throw (css::uno::RuntimeException, std::exception) override;
     virtual void SAL_CALL removeTabPageContainerListener( const css::uno::Reference< css::awt::tab::XTabPageContainerListener >& listener ) throw (css::uno::RuntimeException, std::exception) override;
 
-    static void     ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
-    virtual void    GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+    virtual void    GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override;
 
     virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override;
     virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
diff --git a/include/toolkit/awt/vclxwindows.hxx b/include/toolkit/awt/vclxwindows.hxx
index 996a0ba..a9d7c84 100644
--- a/include/toolkit/awt/vclxwindows.hxx
+++ b/include/toolkit/awt/vclxwindows.hxx
@@ -361,8 +361,7 @@ public:
     // css::awt::XLayoutConstrains
     css::awt::Size SAL_CALL getMinimumSize() throw(css::uno::RuntimeException, std::exception) override;
 
-    static void     ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
-    virtual void    GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+    virtual void    GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override;
 };
 
 
@@ -433,8 +432,7 @@ public:
     // css::awt::XDevice,
     css::awt::DeviceInfo SAL_CALL getInfo() throw(css::uno::RuntimeException, std::exception) override;
 
-    static void     ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
-    virtual void    GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+    virtual void    GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override;
 
     // css::awt::XVclWindowPeer
     void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) throw(css::uno::RuntimeException, std::exception) override;
diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx
index a15a656..1693ae7 100644
--- a/include/tools/pstm.hxx
+++ b/include/tools/pstm.hxx
@@ -153,8 +153,6 @@ public:
                         SvPersistStream( SvClassManager &, SvStream * pStream );
                         virtual ~SvPersistStream() override;
 
-    void                ClearStream();
-
     SvPersistBase *     GetObject( Index nIdx ) const;
     Index               GetIndex( SvPersistBase * ) const;
 
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index e364466..d5d489e 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -906,10 +906,9 @@ public:
      */
     OUString GetFileExtension() const;
 
-    inline bool Append(OUString const & rTheSegment,
+    bool Append(OUString const & rTheSegment,
                        EncodeMechanism eMechanism = WAS_ENCODED,
-                       rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
-    { return appendSegment(rTheSegment, eMechanism, eCharset); }
+                       rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
 
     void CutLastName();
 
@@ -1095,10 +1094,6 @@ private:
 
     TOOLS_DLLPRIVATE bool checkHierarchical() const;
 
-    bool appendSegment(
-        OUString const & rTheSegment,
-        EncodeMechanism eMechanism, rtl_TextEncoding eCharset);
-
     TOOLS_DLLPRIVATE SubString getSegment(
         sal_Int32 nIndex, bool bIgnoreFinalSlash) const;
 
diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx
index c053aae..2e862e3 100644
--- a/toolkit/source/awt/vclxtabpagecontainer.cxx
+++ b/toolkit/source/awt/vclxtabpagecontainer.cxx
@@ -39,7 +39,7 @@ using namespace ::com::sun::star::view;
 
 //  class VCLXTabPageContainer
 
-void VCLXTabPageContainer::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds )
+void VCLXTabPageContainer::GetPropertyIds( std::vector< sal_uInt16 > &rIds )
 {
     VCLXWindow::ImplGetPropertyIds( rIds );
 }
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index bc3c93f..a4b87e7 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2154,7 +2154,7 @@ void SAL_CALL VCLXListBox::disposing( const EventObject& i_rEvent ) throw (Runti
 //  class VCLXMessageBox
 
 
-void VCLXMessageBox::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds )
+void VCLXMessageBox::GetPropertyIds( std::vector< sal_uInt16 > &rIds )
 {
     VCLXTopWindow::ImplGetPropertyIds( rIds );
 }
@@ -2235,7 +2235,7 @@ css::awt::Size SAL_CALL VCLXMessageBox::getMinimumSize() throw(css::uno::Runtime
 
 //  class VCLXDialog
 
-void VCLXDialog::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds )
+void VCLXDialog::GetPropertyIds( std::vector< sal_uInt16 > &rIds )
 {
     VCLXTopWindow::ImplGetPropertyIds( rIds );
 }
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx
index fb415b5..d58b6e1 100644
--- a/toolkit/source/controls/tree/treedatamodel.cxx
+++ b/toolkit/source/controls/tree/treedatamodel.cxx
@@ -117,7 +117,6 @@ public:
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (RuntimeException, std::exception) override;
     virtual Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) throw (RuntimeException, std::exception) override;
 
-    static MutableTreeNode* getImplementation( const Reference< XTreeNode >& xNode );
     static Reference< XTreeNode > getReference( MutableTreeNode* pNode )
     {
         return Reference< XTreeNode >( pNode );
@@ -278,11 +277,6 @@ void MutableTreeNode::setParent( MutableTreeNode* pParent )
     mpParent = pParent;
 }
 
-MutableTreeNode* MutableTreeNode::getImplementation( const Reference< XTreeNode >& xNode )
-{
-    return dynamic_cast< MutableTreeNode* >( xNode.get() );
-}
-
 void MutableTreeNode::broadcast_changes()
 {
     if( mxModel.is() )
@@ -469,7 +463,7 @@ sal_Int32 SAL_CALL MutableTreeNode::getIndex( const Reference< XTreeNode >& xNod
 {
     ::osl::Guard< ::osl::Mutex > aGuard( maMutex );
 
-    MutableTreeNodeRef xImpl( MutableTreeNode::getImplementation( xNode ) );
+    MutableTreeNodeRef xImpl( dynamic_cast< MutableTreeNode* >( xNode.get() ) );
     if( xImpl.is() )
     {
         sal_Int32 nChildCount = maChildren.size();
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index d8dd46e..8b38c70 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -3147,9 +3147,9 @@ bool INetURLObject::checkHierarchical() const {
     }
 }
 
-bool INetURLObject::appendSegment(OUString const & rTheSegment,
-                                  EncodeMechanism eMechanism,
-                                  rtl_TextEncoding eCharset)
+bool INetURLObject::Append(OUString const & rTheSegment,
+                           EncodeMechanism eMechanism,
+                           rtl_TextEncoding eCharset)
 {
     return insertName(rTheSegment, false, LAST_SEGMENT, eMechanism, eCharset);
 }
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index 9975121..6c1015f 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -69,11 +69,6 @@ SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream )
 
 SvPersistStream::~SvPersistStream()
 {
-    ClearStream();
-}
-
-void SvPersistStream::ClearStream()
-{
     if( pStm != nullptr )
     {
         SyncSysStream();


More information about the Libreoffice-commits mailing list