diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2023-03-17 14:56:04 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2023-03-30 22:43:36 +0000 |
commit | 1b463f697405e64a03378fb38a32172c4d3c25e6 (patch) | |
tree | a00e00be915b257c0ab3b08fbb0af825f3cad20d | |
parent | 685a864cfc40227559ed55f6273fd118174e8e6e (diff) |
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>
-rw-r--r-- | sc/inc/bitmaps.hlst | 1 | ||||
-rw-r--r-- | sc/inc/scstyles.hrc | 9 | ||||
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 5 |
3 files changed, 15 insertions, 0 deletions
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; } |