sc/inc/bitmaps.hlst        |    1 +
 sc/inc/scstyles.hrc        |    9 +++++++++
 sc/source/ui/app/scmod.cxx |    5 +++++
 3 files changed, 15 insertions(+)

New commits:
commit 1b463f697405e64a03378fb38a32172c4d3c25e6
Author:     Maxim Monastirsky <momonas...@gmail.com>
AuthorDate: Fri Mar 17 14:56:04 2023 +0200
Commit:     Maxim Monastirsky <momonas...@gmail.com>
CommitDate: Thu Mar 30 22:43:36 2023 +0000

    sc drawstyles: Enable the UI
    
    I believe it's in a usable state now. But keep in
    mind that the work isn't finished yet. For example,
    there is only one base default style, and the work to
    support styles for comments wasn't merged yet.
    
    Change-Id: I1ad3a4803ad91773906743e19a35405d5cd3255d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149754
    Tested-by: Jenkins
    Reviewed-by: Maxim Monastirsky <momonas...@gmail.com>

diff --git a/sc/inc/bitmaps.hlst b/sc/inc/bitmaps.hlst
index 1b24f4b28851..422ed5ddeb63 100644
--- a/sc/inc/bitmaps.hlst
+++ b/sc/inc/bitmaps.hlst
@@ -61,6 +61,7 @@ inline constexpr OUStringLiteral RID_BMP_INPUT_OK = 
u"sc/res/sc26051.png";
 
 inline constexpr OUStringLiteral BMP_STYLES_FAMILY_CELL = u"sc/res/sf01.png";
 inline constexpr OUStringLiteral BMP_STYLES_FAMILY_PAGE = u"sc/res/sf02.png";
+inline constexpr OUStringLiteral BMP_STYLES_FAMILY_GRAPHICS = 
u"sd/res/sf01.png";
 
 inline constexpr OUStringLiteral BMP_ICON_SET_CIRCLES1_GRAY = 
u"sc/res/icon-set-circles1-gray.png";
 inline constexpr OUStringLiteral BMP_ICON_SET_CIRCLES1_GREEN = 
u"sc/res/icon-set-circles1-green.png";
diff --git a/sc/inc/scstyles.hrc b/sc/inc/scstyles.hrc
index 4e4c449d69c9..224f2cd475ac 100644
--- a/sc/inc/scstyles.hrc
+++ b/sc/inc/scstyles.hrc
@@ -41,4 +41,13 @@ const std::pair<TranslateId, SfxStyleSearchBits> 
RID_PAGESTYLEFAMILY[] =
     { {}, SfxStyleSearchBits::Auto }
 };
 
+const std::pair<TranslateId, SfxStyleSearchBits> RID_GRAPHICSTYLEFAMILY[] =
+{
+    { NC_("RID_GRAPHICSTYLEFAMILY", "All Styles") , 
SfxStyleSearchBits::AllVisible },
+    { NC_("RID_GRAPHICSTYLEFAMILY", "Hidden Styles") , 
SfxStyleSearchBits::Hidden },
+    { NC_("RID_GRAPHICSTYLEFAMILY", "Applied Styles") , 
SfxStyleSearchBits::Used },
+    { NC_("RID_GRAPHICSTYLEFAMILY", "Custom Styles") , 
SfxStyleSearchBits::UserDefined },
+    { {}, SfxStyleSearchBits::Auto }
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 18aa0845088c..2f84555fd3ca 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2308,6 +2308,11 @@ std::optional<SfxStyleFamilies> 
ScModule::CreateStyleFamilies()
                                                     BMP_STYLES_FAMILY_PAGE,
                                                     RID_PAGESTYLEFAMILY, 
SC_MOD()->GetResLocale()));
 
+    aStyleFamilies.emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Frame,
+                                                    
ScResId(STR_STYLE_FAMILY_GRAPHICS),
+                                                    BMP_STYLES_FAMILY_GRAPHICS,
+                                                    RID_GRAPHICSTYLEFAMILY, 
SC_MOD()->GetResLocale()));
+
     return aStyleFamilies;
 }
 

Reply via email to