[Libreoffice-commits] core.git: reportdesign/inc reportdesign/source rsc/inc rsc/source sal/osl

Noel Grandin noel.grandin at collabora.co.uk
Wed Oct 19 08:36:55 UTC 2016


 reportdesign/inc/ReportDefinition.hxx                      |    6 ------
 reportdesign/source/core/api/ReportDefinition.cxx          |   10 ++++------
 reportdesign/source/ui/inc/DefaultInspection.hxx           |    1 -
 reportdesign/source/ui/inc/ReportControllerObserver.hxx    |    1 -
 reportdesign/source/ui/inspection/DefaultInspection.cxx    |    7 +------
 reportdesign/source/ui/report/ReportControllerObserver.cxx |    8 +-------
 rsc/inc/rscdb.hxx                                          |    1 -
 rsc/inc/rscdef.hxx                                         |    1 -
 rsc/source/parser/rscibas.cxx                              |    5 -----
 rsc/source/parser/rscinit.cxx                              |    2 +-
 rsc/source/tools/rscdef.cxx                                |    2 +-
 sal/osl/all/utility.cxx                                    |    5 -----
 12 files changed, 8 insertions(+), 41 deletions(-)

New commits:
commit 1690b84015b7fa882076d6fb7d79e1959e467544
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Oct 18 15:27:34 2016 +0200

    loplugin:expandablemethodds in reportdesign..sal
    
    Change-Id: Idb133e442b881d263fcb83a4858c4a08b451c0f0
    Reviewed-on: https://gerrit.libreoffice.org/30032
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx
index daad870..5235ae0 100644
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -184,12 +184,6 @@ namespace reportdesign
 
         css::uno::Reference< css::uno::XComponentContext > getContext();
 
-        /** return the SdrModel of the real model
-        *
-        * \return
-        */
-        std::shared_ptr<rptui::OReportModel> getSdrModel() const;
-
         static std::shared_ptr<rptui::OReportModel> getSdrModel(const css::uno::Reference< css::report::XReportDefinition >& _xReportDefinition);
     private:
         DECLARE_XINTERFACE( )
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 6227c71..3e5fc11 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2034,17 +2034,15 @@ uno::Reference< uno::XComponentContext > OReportDefinition::getContext()
     return m_aProps->m_xContext;
 }
 
-std::shared_ptr<rptui::OReportModel> OReportDefinition::getSdrModel() const
-{
-    return m_pImpl->m_pReportModel;
-}
-
 std::shared_ptr<rptui::OReportModel> OReportDefinition::getSdrModel(const uno::Reference< report::XReportDefinition >& _xReportDefinition)
 {
     std::shared_ptr<rptui::OReportModel> pReportModel;
     uno::Reference< lang::XUnoTunnel > xUT( _xReportDefinition, uno::UNO_QUERY );
     if( xUT.is() )
-        pReportModel = reinterpret_cast<OReportDefinition*>(sal::static_int_cast<sal_uIntPtr>(xUT->getSomething( OReportDefinition::getUnoTunnelImplementationId())))->getSdrModel();
+        pReportModel = reinterpret_cast<OReportDefinition*>(
+                           sal::static_int_cast<sal_uIntPtr>(
+                               xUT->getSomething( OReportDefinition::getUnoTunnelImplementationId()))
+                        )->m_pImpl->m_pReportModel;
     return pReportModel;
 }
 
diff --git a/reportdesign/source/ui/inc/DefaultInspection.hxx b/reportdesign/source/ui/inc/DefaultInspection.hxx
index eca2c12..d4e1741 100644
--- a/reportdesign/source/ui/inc/DefaultInspection.hxx
+++ b/reportdesign/source/ui/inc/DefaultInspection.hxx
@@ -87,7 +87,6 @@ namespace rptui
 
     protected:
         // Service constructors
-        void    createDefault();
         void    createWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines );
     };
 
diff --git a/reportdesign/source/ui/inc/ReportControllerObserver.hxx b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
index 0e1f5b3..0d3a0db 100644
--- a/reportdesign/source/ui/inc/ReportControllerObserver.hxx
+++ b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
@@ -94,7 +94,6 @@ namespace rptui
 
         void Lock();
         void UnLock();
-        bool IsLocked() const;
 
         void Clear();
     private:
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index fe0e6c1..aa93293 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -167,7 +167,7 @@ namespace rptui
 
         if ( !_arguments.hasElements() )
         {   // constructor: "createDefault()"
-            createDefault();
+            m_bConstructed = true;
             return;
         }
 
@@ -184,11 +184,6 @@ namespace rptui
     }
 
 
-    void DefaultComponentInspectorModel::createDefault()
-    {
-        m_bConstructed = true;
-    }
-
     void DefaultComponentInspectorModel::createWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines )
     {
         if ( ( _nMinHelpTextLines <= 0 ) || ( _nMaxHelpTextLines <= 0 ) || ( _nMinHelpTextLines > _nMaxHelpTextLines ) )
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx
index 748cf10..9b0677e 100644
--- a/reportdesign/source/ui/report/ReportControllerObserver.cxx
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -151,7 +151,7 @@ public:
         (void) _rEvent;
         ::osl::ClearableMutexGuard aGuard( m_pImpl->m_aMutex );
 
-        if ( IsLocked() )
+        if ( m_pImpl->m_nLocks != 0 )
             return;
 
         m_aFormattedFieldBeautifier.notifyPropertyChange(_rEvent);
@@ -172,12 +172,6 @@ void OXReportControllerObserver::UnLock()
     osl_atomic_decrement( &m_pImpl->m_nLocks );
 }
 
-bool OXReportControllerObserver::IsLocked() const
-{
-    return m_pImpl->m_nLocks != 0;
-}
-
-
 void OXReportControllerObserver::AddSection(const uno::Reference< report::XSection > & _xSection)
 {
     OEnvLock aLock(*this);
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index c4663c4..715a88f 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -151,7 +151,6 @@ class RscTypCont
     inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
     inline void SETCONST( RscConst *p1, const char * p2, SfxStyleFamily p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); }
     inline void SETCONST( RscConst *p1, const char * p2, MapUnit p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); }
-    void        InitLangType();
     RscEnum *   InitFieldUnitsType();
     RscEnum *   InitColor();
     RscEnum *   InitMapUnit();
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
index c9a2f9e..a4f7708 100644
--- a/rsc/inc/rscdef.hxx
+++ b/rsc/inc/rscdef.hxx
@@ -136,7 +136,6 @@ protected:
     void        IncRef(){ nRefCount++; }
     void        DecRef();
     void        DefineToNumber();
-    void        SetName(const OString& rNewName) { m_aName = rNewName; }
 
     using StringNode::Search;
 public:
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index e035ea9..d632ebd 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -165,11 +165,6 @@ Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames )
     return nResult;
 }
 
-void RscTypCont::InitLangType()
-{
-    aLangType.Init( aNmTb );
-}
-
 RscEnum * RscTypCont::InitFieldUnitsType()
 {
     RscEnum * pFieldUnits;
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index 78126c4..735acef 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -233,7 +233,7 @@ void RscTypCont::Init()
     aWinBits.SetConstant( nStdPopupId, sal::static_int_cast<sal_Int32>(WB_STDPOPUP) );
 }
 {
-    InitLangType();
+    aLangType.Init( aNmTb );
     aBaseLst.push_back( pFieldUnits      = InitFieldUnitsType() );
     aBaseLst.push_back( pColor           = InitColor() );
     aBaseLst.push_back( pMapUnit         = InitMapUnit() );
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx
index 5bf4eae..9beb17e 100644
--- a/rsc/source/tools/rscdef.cxx
+++ b/rsc/source/tools/rscdef.cxx
@@ -154,7 +154,7 @@ void RscDefine::DefineToNumber()
 {
     delete pExp;
     pExp = nullptr;
-    SetName(OString::number(lId));
+    m_aName = OString::number(lId);
 }
 
 void RscDefine::Evaluate()
diff --git a/sal/osl/all/utility.cxx b/sal/osl/all/utility.cxx
index 584a1be..5f157c1 100644
--- a/sal/osl/all/utility.cxx
+++ b/sal/osl/all/utility.cxx
@@ -33,11 +33,6 @@ class OGlobalTimer
 public:
 
     OGlobalTimer() {
-        getTime();
-    }
-
-    void getTime()
-    {
         osl_getGlobalTimer();
     }
 


More information about the Libreoffice-commits mailing list