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

Arnaud Versini arnaud.versini at gmail.com
Mon Aug 29 06:21:56 UTC 2016


 basic/inc/sbprop.hxx          |    2 +-
 basic/source/inc/sbjsmeth.hxx |    2 +-
 basic/source/inc/sbjsmod.hxx  |    2 +-
 basic/source/sbx/sbxbase.cxx  |    2 +-
 include/basic/sbmeth.hxx      |    2 +-
 include/basic/sbmod.hxx       |    2 +-
 include/basic/sbstar.hxx      |    2 +-
 include/basic/sbx.hxx         |    8 ++++----
 include/basic/sbxcore.hxx     |    4 +---
 include/basic/sbxmeth.hxx     |    2 +-
 include/basic/sbxobj.hxx      |    2 +-
 include/basic/sbxprop.hxx     |    2 +-
 include/basic/sbxvar.hxx      |    4 ++--
 13 files changed, 17 insertions(+), 19 deletions(-)

New commits:
commit 301279ea15f0310367598300f884062333628767
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Sun Aug 28 11:52:53 2016 +0200

    BASIC : Remove useless SbxBase::GetCreator
    
    Change-Id: I3d9aa358ffaefc11b7d2427f2b567c360be2c667
    Reviewed-on: https://gerrit.libreoffice.org/28434
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/basic/inc/sbprop.hxx b/basic/inc/sbprop.hxx
index fbeb138..2d44180 100644
--- a/basic/inc/sbprop.hxx
+++ b/basic/inc/sbprop.hxx
@@ -35,7 +35,7 @@ class BASIC_DLLPUBLIC SbProperty : public SbxProperty
     BASIC_DLLPRIVATE SbProperty( const OUString&, SbxDataType, SbModule* );
     virtual ~SbProperty();
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICPROP,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_BASICPROP,1);
     SbModule* GetModule() { return pMod; }
 };
 
diff --git a/basic/source/inc/sbjsmeth.hxx b/basic/source/inc/sbjsmeth.hxx
index ffd6c1e..c33f47d 100644
--- a/basic/source/inc/sbjsmeth.hxx
+++ b/basic/source/inc/sbjsmeth.hxx
@@ -33,7 +33,7 @@ public:
     SbJScriptMethod( const OUString&, SbxDataType, SbModule* );
     virtual ~SbJScriptMethod();
 
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_JSCRIPTMETH,2);
+    SBX_DECL_PERSIST_NODATA(SBXID_JSCRIPTMETH,2);
 };
 
 
diff --git a/basic/source/inc/sbjsmod.hxx b/basic/source/inc/sbjsmod.hxx
index 9fa77e0..a29d570 100644
--- a/basic/source/inc/sbjsmod.hxx
+++ b/basic/source/inc/sbjsmod.hxx
@@ -31,7 +31,7 @@ class SbJScriptModule : public SbModule
     virtual bool LoadData( SvStream&, sal_uInt16 ) override;
     virtual bool StoreData( SvStream& ) const override;
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_JSCRIPTMOD,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_JSCRIPTMOD,1);
     SbJScriptModule( const OUString& );       // hand through
 };
 
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 7ff452d..c5e1162 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -243,7 +243,7 @@ bool SbxBase::Store( SvStream& rStrm )
 {
     if( ( nFlags & SbxFlagBits::DontStore ) == SbxFlagBits::NONE )
     {
-        rStrm.WriteUInt32( GetCreator() )
+        rStrm.WriteUInt32( SBXCR_SBX )
              .WriteUInt16( GetSbxId() )
              .WriteUInt16( static_cast<sal_uInt16>(GetFlags()) )
              .WriteUInt16( GetVersion() );
diff --git a/include/basic/sbmeth.hxx b/include/basic/sbmeth.hxx
index 7919980..a49bcf2 100644
--- a/include/basic/sbmeth.hxx
+++ b/include/basic/sbmeth.hxx
@@ -51,7 +51,7 @@ class BASIC_DLLPUBLIC SbMethod : public SbxMethod
     virtual ~SbMethod();
 
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMETHOD,2);
+    SBX_DECL_PERSIST_NODATA(SBXID_BASICMETHOD,2);
     virtual SbxInfo* GetInfo() override;
     SbxArray*  GetStatics();
     void       ClearStatics();
diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx
index 03d6fb2..ca6f57f 100644
--- a/include/basic/sbmod.hxx
+++ b/include/basic/sbmod.hxx
@@ -94,7 +94,7 @@ protected:
     void handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint );
     virtual ~SbModule();
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2);
+    SBX_DECL_PERSIST_NODATA(SBXID_BASICMOD,2);
                     SbModule( const OUString&, bool bCompat = false );
     virtual void    SetParent( SbxObject* ) override;
     virtual void    Clear() override;
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index 47f21bc..3ec0693 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -85,7 +85,7 @@ protected:
 
 public:
 
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASIC,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_BASIC,1);
 
     StarBASIC( StarBASIC* pParent = nullptr, bool bIsDocBasic = false );
 
diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx
index 59b95aa..ac0f80b 100644
--- a/include/basic/sbx.hxx
+++ b/include/basic/sbx.hxx
@@ -133,7 +133,7 @@ protected:
     virtual bool StoreData( SvStream& ) const override;
 
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_ARRAY,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_ARRAY,1);
     SbxArray( SbxDataType=SbxVARIANT );
     SbxArray( const SbxArray& );
     SbxArray& operator=( const SbxArray& );
@@ -180,7 +180,7 @@ protected:
     virtual bool StoreData( SvStream& ) const override;
     virtual ~SbxDimArray();
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_DIMARRAY,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_DIMARRAY,1);
     SbxDimArray( SbxDataType=SbxVARIANT );
     SbxDimArray( const SbxDimArray& );
     SbxDimArray& operator=( const SbxDimArray& );
@@ -222,7 +222,7 @@ protected:
     virtual void CollRemove( SbxArray* pPar );
 
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_COLLECTION,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_COLLECTION,1);
     SbxCollection( const OUString& rClassname );
     SbxCollection( const SbxCollection& );
     SbxCollection& operator=( const SbxCollection& );
@@ -242,7 +242,7 @@ protected:
     virtual void CollAdd( SbxArray* pPar ) override;
     virtual void CollRemove( SbxArray* pPar ) override;
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_FIXCOLLECTION,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_FIXCOLLECTION,1);
     SbxStdCollection( const OUString& rClassname, const OUString& rElemClass );
     SbxStdCollection( const SbxStdCollection& );
     SbxStdCollection& operator=( const SbxStdCollection& );
diff --git a/include/basic/sbxcore.hxx b/include/basic/sbxcore.hxx
index 717aea3..d6d6a90 100644
--- a/include/basic/sbxcore.hxx
+++ b/include/basic/sbxcore.hxx
@@ -33,8 +33,7 @@ class SvStream;
 // Load() and Store() must not be overridden.
 
 // This version of the Macros does not define Load/StorePrivateData()-methods
-#define SBX_DECL_PERSIST_NODATA( nCre, nSbxId, nVer )       \
-    virtual sal_uInt32 GetCreator() const override { return nCre;   }    \
+#define SBX_DECL_PERSIST_NODATA( nSbxId, nVer )       \
     virtual sal_uInt16 GetVersion() const override { return nVer;   }    \
     virtual sal_uInt16 GetSbxId() const override   { return nSbxId; }
 
@@ -53,7 +52,6 @@ protected:
     SbxBase& operator=( const SbxBase& );
     virtual ~SbxBase();
 
-    virtual sal_uInt32 GetCreator() const = 0 ;
     virtual sal_uInt16 GetVersion() const = 0;
     virtual sal_uInt16 GetSbxId() const = 0;
 
diff --git a/include/basic/sbxmeth.hxx b/include/basic/sbxmeth.hxx
index 9ce9e03..81de1fb 100644
--- a/include/basic/sbxmeth.hxx
+++ b/include/basic/sbxmeth.hxx
@@ -28,7 +28,7 @@ class BASIC_DLLPUBLIC SbxMethod : public SbxVariable
     bool           mbIsRuntimeFunction;
     SbxDataType    mbRuntimeFunctionReturnType;
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_METHOD,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_METHOD,1);
     SbxMethod( const OUString& r, SbxDataType t, bool bIsRuntimeFunction=false );
     SbxMethod( const SbxMethod& r );
     virtual ~SbxMethod();
diff --git a/include/basic/sbxobj.hxx b/include/basic/sbxobj.hxx
index b91056d..5115b71 100644
--- a/include/basic/sbxobj.hxx
+++ b/include/basic/sbxobj.hxx
@@ -42,7 +42,7 @@ protected:
     virtual ~SbxObject();
     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_OBJECT,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_OBJECT,1);
     SbxObject( const OUString& rClassname );
     SbxObject( const SbxObject& );
     SbxObject& operator=( const SbxObject& );
diff --git a/include/basic/sbxprop.hxx b/include/basic/sbxprop.hxx
index cea8c7a..9f72d9f 100644
--- a/include/basic/sbxprop.hxx
+++ b/include/basic/sbxprop.hxx
@@ -26,7 +26,7 @@
 class BASIC_DLLPUBLIC SbxProperty : public SbxVariable
 {
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_PROPERTY,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_PROPERTY,1);
     SbxProperty( const OUString& r, SbxDataType t );
     SbxProperty( const SbxProperty& r ) : SvRefBase( r ), SbxVariable( r ) {}
     virtual ~SbxProperty();
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index 1cdac7c..4f77650 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -88,7 +88,7 @@ protected:
     virtual bool LoadData( SvStream&, sal_uInt16 ) override;
     virtual bool StoreData( SvStream& ) const override;
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VALUE,1);
+    SBX_DECL_PERSIST_NODATA(SBXID_VALUE,1);
     SbxValue();
     SbxValue( SbxDataType, void* = nullptr );
     SbxValue( const SbxValue& );
@@ -240,7 +240,7 @@ protected:
     virtual bool LoadData( SvStream&, sal_uInt16 ) override;
     virtual bool StoreData( SvStream& ) const override;
 public:
-    SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VARIABLE,2);
+    SBX_DECL_PERSIST_NODATA(SBXID_VARIABLE,2);
     SbxVariable();
     SbxVariable( SbxDataType, void* = nullptr );
     SbxVariable( const SbxVariable& );


More information about the Libreoffice-commits mailing list