summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-24 20:43:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-24 20:43:38 +0000
commitc98c650ac4235cebc019e9c80fdc22cab6e077cd (patch)
tree6c966ea51a0e2035b8bb92c3e14e652c4912c8cf
parent8ccf559473f185bdb7640e438e131f17ddc1861c (diff)
SfxModule has GetResMgr so SfxShell and SfxInterface don't need GetResMgr
Change-Id: I6160f8b396ac5e5fb799ee03c5b0181fb088cb54
-rw-r--r--include/sfx2/module.hxx1
-rw-r--r--include/sfx2/objface.hxx2
-rw-r--r--include/sfx2/shell.hxx6
-rw-r--r--sfx2/source/control/shell.cxx5
-rw-r--r--sfx2/source/dialog/templdlg.cxx10
5 files changed, 2 insertions, 22 deletions
diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index 7e0e037b211c..7595a2bcb63a 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 e6a9a92240c7..a667c15bb1b9 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 7615858864b0..6e4ef36e9daa 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 9ad1b8ada695..1365b5414a92 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 0aaf37bc4b04..aa9bac7cf633 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;