diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-25 16:35:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-26 12:02:40 +0100 |
commit | c14b9d036ac8549feb588764b3596c0eb42cf97c (patch) | |
tree | 695b0e480549c55df4da70720b3669825b8b8228 /sw/source/uibase/app/swmodule.cxx | |
parent | 88ec5de1c950d5b9c32fb98054557436d2aa426d (diff) |
assemble SfxStyleFamilies from more generic resource components
Change-Id: I25aa0d8bca1f16f5fc27d3b299709479a1635ea3
Diffstat (limited to 'sw/source/uibase/app/swmodule.cxx')
-rw-r--r-- | sw/source/uibase/app/swmodule.cxx | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 9d2818bce00d..19bc121b731e 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -398,4 +398,43 @@ void SwModule::RemoveAttrPool() SfxItemPool::Free(m_pAttrPool); } +SfxStyleFamilies* SwModule::CreateStyleFamilies() +{ + SfxStyleFamilies *pStyleFamilies = new SfxStyleFamilies; + + ImageList aEntryImages(SW_RES(RID_STYLEFAMILY_IMAGELIST)); + + pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Para, + SW_RESSTR(STR_PARAGRAPHSTYLEFAMILY), + aEntryImages.GetImage(1), + SW_RES(RID_PARAGRAPHSTYLEFAMILY))); + + pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Char, + SW_RESSTR(STR_CHARACTERSTYLEFAMILY), + aEntryImages.GetImage(2), + SW_RES(RID_CHARACTERSTYLEFAMILY))); + + pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Frame, + SW_RESSTR(STR_FRAMESTYLEFAMILY), + aEntryImages.GetImage(3), + SW_RES(RID_FRAMESTYLEFAMILY))); + + pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Page, + SW_RESSTR(STR_PAGESTYLEFAMILY), + aEntryImages.GetImage(4), + SW_RES(RID_PAGESTYLEFAMILY))); + + pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Pseudo, + SW_RESSTR(STR_LISTSTYLEFAMILY), + aEntryImages.GetImage(5), + SW_RES(RID_LISTSTYLEFAMILY))); + + pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Table, + SW_RESSTR(STR_TABLESTYLEFAMILY), + aEntryImages.GetImage(6), + SW_RES(RID_TABLESTYLEFAMILY))); + + return pStyleFamilies; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |