31using ::com::sun::star::uno::Reference;
32using ::com::sun::star::uno::Sequence;
37constexpr OUStringLiteral aSeriesPropName =
u"Series";
68 ::
utl::ConfigItem(
"Office.Chart/DefaultColor" ),
69 m_rListener( rListener )
76 for( OUString
const & s : aPropertyNames )
78 if( s == aSeriesPropName )
90 if( ! aValues.hasElements())
101 m_nNumberOfColors( 0 ),
102 m_bNeedsUpdate( true )
140 static const sal_Int32 nDefaultColors[] = {
141 0x9999ff, 0x993366, 0xffffcc,
142 0xccffff, 0x660066, 0xff8080,
143 0x0066cc, 0xccccff, 0x000080,
144 0xff00ff, 0x00ffff, 0xffff00
147 static const sal_Int32 nMaxDefaultColors = std::size( nDefaultColors );
148 return nDefaultColors[
nIndex % nMaxDefaultColors ];
158 return "com.sun.star.comp.chart2.ConfigDefaultColorScheme" ;
168 return {
"com.sun.star.chart2.ColorScheme" };
173extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
175 css::uno::Sequence<css::uno::Any>
const &)
177 return cppu::acquire(new ::chart::ConfigColorScheme(context));
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_ConfigDefaultColorScheme_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
Reference< uno::XComponentContext > m_xContext
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual OUString SAL_CALL getImplementationName() override
declare XServiceInfo methods
virtual ::sal_Int32 SAL_CALL getColorByIndex(::sal_Int32 nIndex) override
css::uno::Sequence< sal_Int64 > m_aColorSequence
void retrieveConfigColors()
sal_Int32 m_nNumberOfColors
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual ~ConfigColorScheme() override
ConfigColorScheme(const css::uno::Reference< css::uno::XComponentContext > &xContext)
std::unique_ptr< impl::ChartConfigItem > m_apChartConfigItem
virtual void Notify(const Sequence< OUString > &aPropertyNames) override
uno::Any getProperty(const OUString &aPropertyName)
ChartConfigItem(ConfigColorScheme &rListener)
virtual void ImplCommit() override
ConfigColorScheme & m_rListener
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
static css::uno::Sequence< css::uno::Any > GetProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, bool bAllLocales)
OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::XColorScheme > createConfigColorScheme(const css::uno::Reference< css::uno::XComponentContext > &xContext)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)