chart2/source/controller/dialogs/dlg_ObjectProperties.cxx | 26 +++++++---- chart2/source/controller/sidebar/Chart2PanelFactory.cxx | 5 +- officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 6 ++ 3 files changed, 27 insertions(+), 10 deletions(-)
New commits: commit 4e7e3d6b709e01fd1270169ef8229812f8381c36 Author: Marco Cecchetti <[email protected]> AuthorDate: Thu Jan 15 22:13:25 2026 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Feb 26 12:32:51 2026 +0100 chart: color palette support: make available in experimental mode only Change-Id: Iefd77ee9d5cb57d038f9a4e40cdacb6d9d534aab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197759 Reviewed-by: Tomaž Vajngerl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200412 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index ff76cdd2a525..fb8d24286cc3 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -21,6 +21,8 @@ #include <cstddef> +#include <officecfg/Office/Common.hxx> + #include <dlg_ObjectProperties.hxx> #include "tp_AxisLabel.hxx" #include "tp_DataLabel.hxx" @@ -369,8 +371,9 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent, RID_M + RID_TAB_AREA.sIconName); AddTabPage(u"transparent"_ustr, TabResId(RID_TAB_TRANSPARENCE.aLabel), RID_SVXPAGE_TRANSPARENCE, RID_M + RID_TAB_TRANSPARENCE.sIconName); - AddTabPage(u"colorpalette"_ustr, TabResId(RID_TAB_COLORPALETTE.aLabel), ChartColorPaletteTabPage::Create, - RID_M + RID_TAB_COLORPALETTE.sIconName); + if (officecfg::Office::Common::Misc::ExperimentalMode::get()) + AddTabPage(u"colorpalette"_ustr, TabResId(RID_TAB_COLORPALETTE.aLabel), ChartColorPaletteTabPage::Create, + RID_M + RID_TAB_COLORPALETTE.sIconName); AddTabPage(u"gradients"_ustr, TabResId(RID_TAB_GRADIENT_PRESETS.aLabel), ChartGradientsTabPage::Create, RID_M + RID_TAB_GRADIENT_PRESETS.sIconName); AddTabPage(u"fontname"_ustr, TabResId(RID_TAB_FONT.aLabel), RID_SVXPAGE_CHAR_NAME, @@ -413,8 +416,9 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent, AddTabPage(u"border"_ustr, TabResId(RID_TAB_LINE.aLabel), RID_SVXPAGE_LINE, RID_M + RID_TAB_LINE.sIconName); - AddTabPage(u"colorpalette"_ustr, TabResId(RID_TAB_COLORPALETTE.aLabel), ChartColorPaletteTabPage::Create, - RID_M + RID_TAB_COLORPALETTE.sIconName); + if (officecfg::Office::Common::Misc::ExperimentalMode::get()) + AddTabPage(u"colorpalette"_ustr, TabResId(RID_TAB_COLORPALETTE.aLabel), ChartColorPaletteTabPage::Create, + RID_M + RID_TAB_COLORPALETTE.sIconName); AddTabPage(u"gradients"_ustr, TabResId(RID_TAB_GRADIENT_PRESETS.aLabel), ChartGradientsTabPage::Create, RID_M + RID_TAB_GRADIENT_PRESETS.sIconName); break; @@ -508,8 +512,9 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent, RID_M + RID_TAB_TRANSPARENCE.sIconName); if (eType != OBJECTTYPE_DATA_STOCK_LOSS && eType != OBJECTTYPE_DATA_STOCK_GAIN) { - AddTabPage(u"colorpalette"_ustr, TabResId(RID_TAB_COLORPALETTE.aLabel), ChartColorPaletteTabPage::Create, - RID_M + RID_TAB_COLORPALETTE.sIconName); + if (officecfg::Office::Common::Misc::ExperimentalMode::get()) + AddTabPage(u"colorpalette"_ustr, TabResId(RID_TAB_COLORPALETTE.aLabel), ChartColorPaletteTabPage::Create, + RID_M + RID_TAB_COLORPALETTE.sIconName); AddTabPage(u"gradients"_ustr, TabResId(RID_TAB_GRADIENT_PRESETS.aLabel), ChartGradientsTabPage::Create, RID_M + RID_TAB_GRADIENT_PRESETS.sIconName); } @@ -699,10 +704,13 @@ void SchAttribTabDlg::PageCreated(const OUString& rId, SfxTabPage &rPage) } else if (rId == "colorpalette") { - auto* pColorPaletteTabPage = dynamic_cast<ChartColorPaletteTabPage*>( &rPage ); - if (pColorPaletteTabPage) + if (officecfg::Office::Common::Misc::ExperimentalMode::get()) { - pColorPaletteTabPage->init(m_rParameter.getDocument()); + auto* pColorPaletteTabPage = dynamic_cast<ChartColorPaletteTabPage*>( &rPage ); + if (pColorPaletteTabPage) + { + pColorPaletteTabPage->init(m_rParameter.getDocument()); + } } } else if (rId == "gradients") diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx index 2cc1b061296d..9d807acde5c9 100644 --- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx +++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx @@ -104,7 +104,10 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement ( else if (rsResourceURL.endsWith("/LinePanel")) xPanel = ChartLinePanel::Create(pParent, xFrame, pController); else if (rsResourceURL.endsWith("/ColorsPanel")) - xPanel = ChartColorsPanel::Create(pParent, xFrame, pController); + { + if (officecfg::Office::Common::Misc::ExperimentalMode::get()) + xPanel = ChartColorsPanel::Create(pParent, xFrame, pController); + } else if (rsResourceURL.endsWith("/EffectPropertyPanel")) xPanel = ChartEffectPanel::Create(pParent, pController); else if (rsResourceURL.endsWith("/ThemePanel") diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index a00f0cfe0caf..11c9c9ae6891 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -2100,6 +2100,12 @@ <prop oor:name="Title" oor:type="xs:string"> <value xml:lang="en-US">Colors</value> </prop> + <prop oor:name="IsExperimental" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="TitleBarIsOptional" oor:type="xs:boolean"> + <value>true</value> + </prop> <prop oor:name="Id" oor:type="xs:string"> <value>ChartColorsPanel</value> </prop>
