summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-25 16:35:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-26 12:02:40 +0100
commitc14b9d036ac8549feb588764b3596c0eb42cf97c (patch)
tree695b0e480549c55df4da70720b3669825b8b8228 /sc
parent88ec5de1c950d5b9c32fb98054557436d2aa426d (diff)
assemble SfxStyleFamilies from more generic resource components
Change-Id: I25aa0d8bca1f16f5fc27d3b299709479a1635ea3
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/sc.hrc4
-rw-r--r--sc/inc/scmod.hxx1
-rw-r--r--sc/source/ui/app/scmod.cxx20
-rw-r--r--sc/source/ui/styleui/scstyles.src52
4 files changed, 46 insertions, 31 deletions
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index f4906545f7fa..26bd9e97885e 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1091,6 +1091,10 @@
#define RID_SCDLG_DPDATEGROUP (SC_DIALOGS_START + 136)
#define RID_SCDLG_DPSHOWDETAIL (SC_DIALOGS_START + 137)
+#define RID_CELLSTYLEFAMILY (SC_DIALOGS_START + 138)
+#define RID_PAGESTYLEFAMILY (SC_DIALOGS_START + 139)
+#define RID_STYLEFAMILY_IMAGELIST (SC_DIALOGS_START + 140)
+
#define RID_POPUP_FILTER (SC_DIALOGS_START + 153)
#define RID_SCDLG_COND_FORMAT_MANAGER (SC_DIALOGS_START + 159)
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index d7affbb57101..1715819a7344 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -238,6 +238,7 @@ public:
virtual SfxItemSet* CreateItemSet( sal_uInt16 nId ) override;
virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) override;
virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) override;
+ virtual SfxStyleFamilies* CreateStyleFamilies() override;
void SetInSharedDocLoading( bool bNew ) { mbIsInSharedDocLoading = bNew; }
bool IsInSharedDocLoading() const { return mbIsInSharedDocLoading; }
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index af9fa54498b1..bfbe59d72710 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -86,6 +86,7 @@
#include "docsh.hxx"
#include "drwlayer.hxx"
#include "uiitems.hxx"
+#include "globstr.hrc"
#include "sc.hrc"
#include "cfgids.hxx"
#include "inputhdl.hxx"
@@ -2268,4 +2269,23 @@ bool ScModule::HasThesaurusLanguage( sal_uInt16 nLang )
return bHasLang;
}
+SfxStyleFamilies* ScModule::CreateStyleFamilies()
+{
+ SfxStyleFamilies *pStyleFamilies = new SfxStyleFamilies;
+
+ ImageList aEntryImages(ScResId(RID_STYLEFAMILY_IMAGELIST));
+
+ pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Para,
+ ScGlobal::GetRscString(STR_STYLE_FAMILY_CELL),
+ aEntryImages.GetImage(1),
+ ScResId(RID_CELLSTYLEFAMILY)));
+
+ pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Page,
+ ScGlobal::GetRscString(STR_STYLE_FAMILY_PAGE),
+ aEntryImages.GetImage(2),
+ ScResId(RID_PAGESTYLEFAMILY)));
+
+ return pStyleFamilies;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/styleui/scstyles.src b/sc/source/ui/styleui/scstyles.src
index d07b0fb1015b..2502ceef27c2 100644
--- a/sc/source/ui/styleui/scstyles.src
+++ b/sc/source/ui/styleui/scstyles.src
@@ -20,43 +20,33 @@
#include "sc.hrc"
#include <svl/style.hrc>
-SfxStyleFamilies DLG_STYLE_DESIGNER
+StringArray RID_CELLSTYLEFAMILY
{
- StyleFamilyList =
+ ItemList [ en-US ] =
{
- SfxStyleFamilyItem
- {
- StyleFamily = SfxStyleFamily::Para ;
- FilterList [ en-US ] =
- {
- < "All Styles" ; SFXSTYLEBIT_ALL_VISIBLE ; > ;
- < "Hidden Styles" ; SFXSTYLEBIT_HIDDEN ; > ;
- < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
- < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
- };
- Text [ en-US ] = "Cell Styles" ;
- };
-
- SfxStyleFamilyItem
- {
- StyleFamily = SfxStyleFamily::Page ;
- FilterList [ en-US ] =
- {
- < "All Styles" ; SFXSTYLEBIT_ALL ; > ;
- < "Hidden Styles" ; SFXSTYLEBIT_HIDDEN ; > ;
- < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
- };
- Text [ en-US ] = "Page Styles" ;
- };
+ < "All Styles" ; SFXSTYLEBIT_ALL_VISIBLE ; > ;
+ < "Hidden Styles" ; SFXSTYLEBIT_HIDDEN ; > ;
+ < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
+ < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
};
+};
- // style family images are now taken from an ImageList
- // (for each family, there's one entry in the IdList)
- ImageList 1 // == BMP_COLOR_NORMAL + 1
+StringArray RID_PAGESTYLEFAMILY
+{
+ ItemList [ en-US ] =
{
- Prefix = "sf";
- IdList = { 1; 2; };
+ < "All Styles" ; SFXSTYLEBIT_ALL ; > ;
+ < "Hidden Styles" ; SFXSTYLEBIT_HIDDEN ; > ;
+ < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
};
};
+// style family images are now taken from an ImageList
+// (for each family, there's one entry in the IdList)
+ImageList RID_STYLEFAMILY_IMAGELIST
+{
+ Prefix = "sf";
+ IdList = { 1; 2; };
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */