[Libreoffice-commits] core.git: basic/source canvas/source comphelper/source include/basic include/canvas include/comphelper

Noel Grandin noel.grandin at collabora.co.uk
Fri Oct 21 09:58:04 UTC 2016


 basic/source/classes/sb.cxx                        |    7 +++----
 basic/source/classes/sbintern.cxx                  |    2 +-
 basic/source/inc/sbintern.hxx                      |    2 +-
 basic/source/sbx/sbxvalue.cxx                      |    7 +------
 canvas/source/tools/propertysethelper.cxx          |    2 +-
 comphelper/source/misc/accessiblecontexthelper.cxx |    4 ++--
 include/basic/sbstar.hxx                           |    1 -
 include/basic/sbxvar.hxx                           |    1 -
 include/canvas/propertysethelper.hxx               |    4 ----
 include/comphelper/accessiblecontexthelper.hxx     |    2 --
 10 files changed, 9 insertions(+), 23 deletions(-)

New commits:
commit 5a5731cd0587553f21b2cee2a99db9f527396406
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Oct 21 08:35:29 2016 +0200

    loplugin:expandablemethodds in include/basic..comphelper
    
    Change-Id: I1aa9c12e8839325a9fd98530abc89a3d586ff62e
    Reviewed-on: https://gerrit.libreoffice.org/30120
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index d541d44..e34daa0 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1420,7 +1420,7 @@ SbMethod* StarBASIC::GetActiveMethod( sal_uInt16 nLevel )
 
 SbModule* StarBASIC::GetActiveModule()
 {
-    if( GetSbData()->pInst && !IsCompilerError() )
+    if( GetSbData()->pInst && !GetSbData()->bCompilerError )
     {
         return GetSbData()->pInst->GetActiveModule();
     }
@@ -1471,7 +1471,6 @@ sal_uInt16 StarBASIC::GetCol2()     { return GetSbData()->nCol2; }
 // Specific to error handler
 SbError StarBASIC::GetErrorCode()       { return GetSbData()->nCode; }
 const OUString& StarBASIC::GetErrorText() { return GetSbData()->aErrMsg; }
-bool StarBASIC::IsCompilerError()       { return GetSbData()->bCompiler; }
 
 // From 1996-03-29:
 // The mapping between the old and the new error codes take place by searching
@@ -1667,7 +1666,7 @@ bool StarBASIC::CError( SbError code, const OUString& rMsg,
         code = (SbError)*new StringErrorInfo( code, rMsg );
     }
     SetErrorData( code, l, c1, c2 );
-    GetSbData()->bCompiler = true;
+    GetSbData()->bCompilerError = true;
     bool bRet;
     if( GetSbData()->aErrHdl.IsSet() )
     {
@@ -1677,7 +1676,7 @@ bool StarBASIC::CError( SbError code, const OUString& rMsg,
     {
         bRet = ErrorHdl();
     }
-    GetSbData()->bCompiler = false;     // only true for error handler
+    GetSbData()->bCompilerError = false;     // only true for error handler
     return bRet;
 }
 
diff --git a/basic/source/classes/sbintern.cxx b/basic/source/classes/sbintern.cxx
index 26b0216..20cbf6f 100644
--- a/basic/source/classes/sbintern.cxx
+++ b/basic/source/classes/sbintern.cxx
@@ -49,7 +49,7 @@ SbiGlobals::SbiGlobals()
     nCode = 0;
     nLine = 0;
     nCol1 = nCol2 = 0;
-    bCompiler = false;
+    bCompilerError = false;
     bGlobalInitErr = false;
     bRunInit = false;
     pTransliterationWrapper = nullptr;
diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx
index a0ebd19..03ce05a 100644
--- a/basic/source/inc/sbintern.hxx
+++ b/basic/source/inc/sbintern.hxx
@@ -94,7 +94,7 @@ struct SbiGlobals
     SbError         nCode;
     sal_Int32       nLine;
     sal_Int32       nCol1,nCol2;    // from... to...
-    bool            bCompiler;      // flag for compiler error
+    bool            bCompilerError; // flag for compiler error
     bool            bGlobalInitErr;
     bool            bRunInit;       // true, if RunInit active from the Basic
     OUString        aErrMsg;        // buffer for GetErrorText()
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 2183d16..1c93523 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -192,11 +192,6 @@ void SbxValue::Broadcast( sal_uInt32 )
 // If the variable contain a variable or an object, this will be
 // addressed.
 
-SbxValue* SbxValue::TheRealValue() const
-{
-    return TheRealValue( true );
-}
-
 SbxValue* SbxValue::TheRealValue( bool bObjInObjError ) const
 {
     SbxValue* p = const_cast<SbxValue*>(this);
@@ -286,7 +281,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
         // If an object or a VARIANT is requested, don't search the real values
         SbxValue* p = const_cast<SbxValue*>(this);
         if( rRes.eType != SbxOBJECT && rRes.eType != SbxVARIANT )
-            p = TheRealValue();
+            p = TheRealValue( true );
         if( p )
         {
             p->Broadcast( SBX_HINT_DATAWANTED );
diff --git a/canvas/source/tools/propertysethelper.cxx b/canvas/source/tools/propertysethelper.cxx
index ba8ade3..7fdc153 100644
--- a/canvas/source/tools/propertysethelper.cxx
+++ b/canvas/source/tools/propertysethelper.cxx
@@ -76,7 +76,7 @@ namespace canvas
 
     void PropertySetHelper::addProperties( const InputMap& rMap )
     {
-        InputMap aMerged( getPropertyMap() );
+        InputMap aMerged( maMapEntries );
         aMerged.insert( aMerged.end(),
                         rMap.begin(),
                         rMap.end() );
diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx
index 02b7b9e..55fbe23 100644
--- a/comphelper/source/misc/accessiblecontexthelper.cxx
+++ b/comphelper/source/misc/accessiblecontexthelper.cxx
@@ -187,7 +187,7 @@ namespace comphelper
 
     bool OAccessibleContextHelper::isAlive() const
     {
-        return !GetBroadcastHelper().bDisposed && !GetBroadcastHelper().bInDispose;
+        return !rBHelper.bDisposed && !rBHelper.bInDispose;
     }
 
 
@@ -200,7 +200,7 @@ namespace comphelper
 
     void OAccessibleContextHelper::ensureDisposed( )
     {
-        if ( !GetBroadcastHelper().bDisposed )
+        if ( !rBHelper.bDisposed )
         {
             OSL_ENSURE( 0 == m_refCount, "OAccessibleContextHelper::ensureDisposed: this method _has_ to be called from without your dtor only!" );
             acquire();
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index 52a0518..9ec0918 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -134,7 +134,6 @@ public:
     static void     MakeErrorText( SbError, const OUString& aMsg );
     static const    OUString& GetErrorText();
     static SbError  GetErrorCode();
-    static bool     IsCompilerError();
     static sal_uInt16 GetVBErrorCode( SbError nError );
     static SbError  GetSfxFromVBError( sal_uInt16 nError );
     bool            IsBreak() const             { return bBreak; }
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index a885972..9ad6cb3 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -77,7 +77,6 @@ class BASIC_DLLPUBLIC SbxValue : public SbxBase
 {
     // #55226 Transport additional infos
     BASIC_DLLPRIVATE SbxValue* TheRealValue( bool bObjInObjError ) const;
-    BASIC_DLLPRIVATE SbxValue* TheRealValue() const;
 protected:
     SbxValues aData; // Data
     OUString aPic;  // Picture-String
diff --git a/include/canvas/propertysethelper.hxx b/include/canvas/propertysethelper.hxx
index 09ca973..472bb1d 100644
--- a/include/canvas/propertysethelper.hxx
+++ b/include/canvas/propertysethelper.hxx
@@ -123,10 +123,6 @@ namespace canvas
          */
         bool isPropertyName( const OUString& aPropertyName ) const;
 
-        /** Request the currently active map
-         */
-        const InputMap& getPropertyMap() const { return maMapEntries; }
-
         // XPropertySet implementation
         css::uno::Reference< css::beans::XPropertySetInfo > getPropertySetInfo() const;
         void setPropertyValue( const OUString&      aPropertyName,
diff --git a/include/comphelper/accessiblecontexthelper.hxx b/include/comphelper/accessiblecontexthelper.hxx
index a7ad2c0..44ca282 100644
--- a/include/comphelper/accessiblecontexthelper.hxx
+++ b/include/comphelper/accessiblecontexthelper.hxx
@@ -233,8 +233,6 @@ namespace comphelper
                     implGetParentContext();
 
         // access to the base class' broadcast helper/mutex
-        ::cppu::OBroadcastHelper&       GetBroadcastHelper()        { return rBHelper; }
-        const ::cppu::OBroadcastHelper& GetBroadcastHelper() const  { return rBHelper; }
         ::osl::Mutex&                   GetMutex()                  { return m_aMutex; }
         IMutex*                         getExternalLock( );
     };


More information about the Libreoffice-commits mailing list