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 <momonasmon@gmail.com>
diff --git a/sc/inc/bitmaps.hlst b/sc/inc/bitmaps.hlst
index 1b24f4b2..422ed5d 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 4e4c449..224f2cd 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 18aa084..2f84555 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;
}