[Libreoffice-commits] core.git: include/svx sc/inc sc/source sd/inc sd/source svx/source sw/source

Caolán McNamara caolanm at redhat.com
Mon Dec 9 05:44:54 PST 2013


 include/svx/fmpage.hxx           |    4 +---
 sc/inc/drawpage.hxx              |    2 +-
 sc/source/core/data/drawpage.cxx |    4 ++--
 sc/source/core/data/drwlayer.cxx |    5 +----
 sd/inc/sdpage.hxx                |    2 +-
 sd/source/core/drawdoc.cxx       |    2 +-
 sd/source/core/sdpage.cxx        |    4 ++--
 svx/source/form/fmmodel.cxx      |    2 +-
 svx/source/form/fmpage.cxx       |    4 +---
 sw/source/core/draw/dpage.cxx    |    2 +-
 10 files changed, 12 insertions(+), 19 deletions(-)

New commits:
commit 8a8981c603d2f45d0fac656e5b4b31bcabfabc92
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 9 13:19:21 2013 +0000

    GetBasic and m_pBasic are unused
    
    which is probably a good thing because it is zeroed in the copy ctor which
    looks rather dubious
    
    Change-Id: Ia082601982aaea5df92cf7aa9724cbe187716e0c

diff --git a/include/svx/fmpage.hxx b/include/svx/fmpage.hxx
index 2880e2a..472aed5 100644
--- a/include/svx/fmpage.hxx
+++ b/include/svx/fmpage.hxx
@@ -43,12 +43,11 @@ class SVX_DLLPUBLIC FmFormPage : public SdrPage
     friend class FmFormObj;
     FmFormPageImpl*     m_pImpl;
     OUString            m_sPageName;
-    StarBASIC*          m_pBasic;
 
 public:
     TYPEINFO();
 
-    FmFormPage(FmFormModel& rModel,StarBASIC*, bool bMasterPage=sal_False);
+    FmFormPage(FmFormModel& rModel, bool bMasterPage=false);
     FmFormPage(const FmFormPage& rPage);
     ~FmFormPage();
 
@@ -70,7 +69,6 @@ public:
 public:
     const OUString&     GetName() const { return m_sPageName; }
     void                SetName( const OUString& rName ) { m_sPageName = rName; }
-    StarBASIC*          GetBasic() const { return m_pBasic; }
     sal_Bool            RequestHelp(
                             Window* pWin,
                             SdrView* pView,
diff --git a/sc/inc/drawpage.hxx b/sc/inc/drawpage.hxx
index e2ee683..711384f 100644
--- a/sc/inc/drawpage.hxx
+++ b/sc/inc/drawpage.hxx
@@ -28,7 +28,7 @@ class ScDrawLayer;
 class ScDrawPage: public FmFormPage
 {
 public:
-    ScDrawPage(ScDrawLayer& rNewModel, StarBASIC* pBasic, bool bMasterPage = false);
+    ScDrawPage(ScDrawLayer& rNewModel, bool bMasterPage = false);
     ~ScDrawPage();
 
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage();
diff --git a/sc/source/core/data/drawpage.cxx b/sc/source/core/data/drawpage.cxx
index 43c624e..64c8c77 100644
--- a/sc/source/core/data/drawpage.cxx
+++ b/sc/source/core/data/drawpage.cxx
@@ -28,8 +28,8 @@
 
 // -----------------------------------------------------------------------
 
-ScDrawPage::ScDrawPage(ScDrawLayer& rNewModel, StarBASIC* pBasic, bool bMasterPage) :
-    FmFormPage(rNewModel, pBasic, bMasterPage)
+ScDrawPage::ScDrawPage(ScDrawLayer& rNewModel, bool bMasterPage) :
+    FmFormPage(rNewModel, bMasterPage)
 {
     SetSize( Size( LONG_MAX, LONG_MAX ) );
 }
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 4f3ba5b..bdb82f6 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -308,10 +308,7 @@ void ScDrawLayer::UseHyphenator()
 
 SdrPage* ScDrawLayer::AllocPage(bool bMasterPage)
 {
-    //  don't create basic until it is needed
-    StarBASIC* pBasic = NULL;
-    ScDrawPage* pPage = new ScDrawPage( *this, pBasic, bMasterPage);
-    return pPage;
+    return new ScDrawPage(*this, bMasterPage);
 }
 
 sal_Bool ScDrawLayer::HasObjects() const
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 178656b..7a042f6 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -156,7 +156,7 @@ protected:
 public:
     TYPEINFO();
 
-    SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, sal_Bool bMasterPage=sal_False);
+    SdPage(SdDrawDocument& rNewDoc, sal_Bool bMasterPage=sal_False);
     SdPage(const SdPage& rSrcPage);
     ~SdPage();
     virtual SdrPage* Clone() const;
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 21b8ae9..a3c8d9e 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -502,7 +502,7 @@ SdrModel* SdDrawDocument::AllocModel() const
 // not know, as they are _derivatives_ of SdrPage) when loading.
 SdrPage* SdDrawDocument::AllocPage(bool bMasterPage)
 {
-    return new SdPage(*this, NULL, bMasterPage);
+    return new SdPage(*this, bMasterPage);
 }
 
 // When the model has changed
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 1856a54..5c135ac 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -89,8 +89,8 @@ TYPEINIT2( SdPage, FmFormPage, SdrObjUserCall );
 |*
 \************************************************************************/
 
-SdPage::SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, sal_Bool bMasterPage)
-:   FmFormPage(rNewDoc, pBasic, bMasterPage)
+SdPage::SdPage(SdDrawDocument& rNewDoc, sal_Bool bMasterPage)
+:   FmFormPage(rNewDoc, bMasterPage)
 ,   SdrObjUserCall()
 ,   mePageKind(PK_STANDARD)
 ,   meAutoLayout(AUTOLAYOUT_NONE)
diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx
index 434c213..ce67f0f 100644
--- a/svx/source/form/fmmodel.cxx
+++ b/svx/source/form/fmmodel.cxx
@@ -131,7 +131,7 @@ FmFormModel::~FmFormModel()
 \************************************************************************/
 SdrPage* FmFormModel::AllocPage(bool bMasterPage)
 {
-    return new FmFormPage(*this, NULL, bMasterPage);
+    return new FmFormPage(*this, bMasterPage);
 }
 
 /*************************************************************************
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index ce44c69..4906f55 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -56,10 +56,9 @@ using com::sun::star::container::XNameContainer;
 TYPEINIT1(FmFormPage, SdrPage);
 
 //------------------------------------------------------------------
-FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, bool bMasterPage)
+FmFormPage::FmFormPage(FmFormModel& rModel, bool bMasterPage)
            :SdrPage(rModel, bMasterPage)
            ,m_pImpl( new FmFormPageImpl( *this ) )
-           ,m_pBasic(_pBasic)
 {
 }
 
@@ -67,7 +66,6 @@ FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, bool bMasterPage
 FmFormPage::FmFormPage(const FmFormPage& rPage)
            :SdrPage(rPage)
            ,m_pImpl(new FmFormPageImpl( *this ) )
-           ,m_pBasic(0)
 {
     m_pImpl->initFrom( rPage.GetImpl() );
     m_sPageName = rPage.m_sPageName;
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index cb2daae..b3022c0 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -49,7 +49,7 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::frame;
 
 SwDPage::SwDPage(SwDrawDocument& rNewModel, sal_Bool bMasterPage) :
-    FmFormPage(rNewModel, 0, bMasterPage),
+    FmFormPage(rNewModel, bMasterPage),
     pGridLst( 0 ),
     rDoc(rNewModel.GetDoc())
 {


More information about the Libreoffice-commits mailing list