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

Caolán McNamara caolanm at redhat.com
Mon Nov 24 12:44:07 PST 2014


 include/sfx2/module.hxx         |    1 -
 include/sfx2/objface.hxx        |    2 --
 include/sfx2/shell.hxx          |    6 ------
 sfx2/source/control/shell.cxx   |    5 -----
 sfx2/source/dialog/templdlg.cxx |   10 ++--------
 5 files changed, 2 insertions(+), 22 deletions(-)

New commits:
commit c98c650ac4235cebc019e9c80fdc22cab6e077cd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Nov 24 20:43:02 2014 +0000

    SfxModule has GetResMgr so SfxShell and SfxInterface don't need GetResMgr
    
    Change-Id: I6160f8b396ac5e5fb799ee03c5b0181fb088cb54

diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index 7e0e037..7595a2b 100644
--- a/include/sfx2/module.hxx
+++ b/include/sfx2/module.hxx
@@ -75,7 +75,6 @@ public:
                                     SfxObjectFactory* pFactoryP, ... );
                                 virtual ~SfxModule();
 
-    ResMgr*                     GetResMgr() const { return SfxShell::GetResMgr(); }
     virtual ResMgr*             GetResMgr();
     SfxSlotPool*                GetSlotPool() const;
 
diff --git a/include/sfx2/objface.hxx b/include/sfx2/objface.hxx
index e6a9a92..a667c15 100644
--- a/include/sfx2/objface.hxx
+++ b/include/sfx2/objface.hxx
@@ -65,8 +65,6 @@ public:
     bool                    HasName() const { return 0 != aNameResId.GetId(); }
     OUString                GetName() const
                             { return HasName() ? aNameResId.toString() : OUString(); }
-    ResMgr*                 GetResMgr() const
-                            { return aNameResId.GetResMgr(); }
 
     const SfxInterface*     GetGenoType() const { return pGenoType; }
 
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index 7615858..6e4ef36 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -431,12 +431,6 @@ public:
         */
     SfxViewFrame*               GetFrame() const;
 
-    /**
-        This method provides the ResMgr of the <Resource-DLL> that are used by
-        the SfxShell instance. If this is a NULL-pointer, then the current
-        resource manager is to be used.
-        */
-    ResMgr*                     GetResMgr() const;
     virtual bool                HasUIFeature( sal_uInt32 nFeature );
     void                        UIFeatureChanged();
 
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 9ad1b8a..1365b54 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -395,11 +395,6 @@ void SfxShell::ParentDeactivate
 {
 }
 
-ResMgr* SfxShell::GetResMgr() const
-{
-    return GetInterface()->GetResMgr();
-}
-
 bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot )
 {
     // Get Slot status
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 0aaf37b..aa9bac7 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -714,7 +714,8 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
 
     SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
     pCurObjShell = pViewFrame->GetObjectShell();
-    ResMgr* pMgr = pCurObjShell ? pCurObjShell->GetResMgr() : NULL;
+    pModule = pCurObjShell ? pCurObjShell->GetModule() : NULL;
+    ResMgr* pMgr = pModule ? pModule->GetResMgr() : NULL;
     ResId aFamId( DLG_STYLE_DESIGNER, *pMgr );
     aFamId.SetRT(RSC_SFX_STYLE_FAMILIES);
     m_pStyleFamiliesId = new ResId( aFamId.GetId(), *pMgr );
@@ -800,12 +801,8 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
 
     for ( i = nStart; i <= nEnd; i++ )
         pBindings->Update(i);
-
-    pModule = pCurObjShell ? pCurObjShell->GetModule() : NULL;
 }
 
-
-
 void SfxCommonTemplateDialog_Impl::ClearResource()
 {
     ClearFamilyList();
@@ -834,7 +831,6 @@ SfxCommonTemplateDialog_Impl::impl_setDeletionWatcher(
     return pRet;
 }
 
-
 void SfxCommonTemplateDialog_Impl::Initialize()
 {
     // Read global user resource
@@ -855,8 +851,6 @@ void SfxCommonTemplateDialog_Impl::Initialize()
         aFmtLb.Show();
 }
 
-
-
 SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
 {
     OUString aEmpty;


More information about the Libreoffice-commits mailing list