summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-25 14:11:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-25 15:39:47 +0100
commit45a646f2fa1c8161d9fbc4509a2f0b2e826dc63f (patch)
tree6a7e38358dec141c144bd7839f684763ac036a9d /sfx2/source/appl
parenta6ff21250bbc960cbcff026e8eeb72be032f56b2 (diff)
split the creation of SfxStyleFamilies into a method
Change-Id: I2590180fc30d75c89e758c72246a8294b5c4b9a2
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/module.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index a6465c5967f2..0b64e6f3158e 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -23,6 +23,7 @@
#include <sfx2/module.hxx>
#include <sfx2/app.hxx>
#include <sfx2/sfxresid.hxx>
+#include <sfx2/styfitem.hxx>
#include <sfx2/msgpool.hxx>
#include <sfx2/tbxctrl.hxx>
#include <sfx2/stbitem.hxx>
@@ -291,4 +292,18 @@ FieldUnit SfxModule::GetFieldUnit() const
return eUnit;
}
+SfxStyleFamilies* SfxModule::CreateStyleFamilies()
+{
+ SfxStyleFamilies *pStyleFamilies = nullptr;
+ ResMgr* pMgr = GetResMgr();
+ if (pMgr)
+ {
+ ResId aFamId(DLG_STYLE_DESIGNER, *pMgr);
+ aFamId.SetRT(RSC_SFX_STYLE_FAMILIES);
+ if (pMgr->IsAvailable(aFamId))
+ pStyleFamilies = new SfxStyleFamilies(aFamId);
+ }
+ return pStyleFamilies;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */