25#include <com/sun/star/beans/PropertyAttribute.hpp>
33using ::com::sun::star::beans::Property;
34using ::com::sun::star::uno::Sequence;
35using ::com::sun::star::uno::Reference;
42 PROP_CANDLESTICKCHARTTYPE_JAPANESE,
43 PROP_CANDLESTICKCHARTTYPE_WHITE_DAY,
44 PROP_CANDLESTICKCHARTTYPE_BLACK_DAY,
46 PROP_CANDLESTICKCHARTTYPE_SHOW_FIRST,
47 PROP_CANDLESTICKCHARTTYPE_SHOW_HIGH_LOW
50void lcl_AddPropertiesToVector(
51 std::vector< Property > & rOutProperties )
53 rOutProperties.emplace_back(
"Japanese",
54 PROP_CANDLESTICKCHARTTYPE_JAPANESE,
56 beans::PropertyAttribute::BOUND
57 | beans::PropertyAttribute::MAYBEDEFAULT );
59 rOutProperties.emplace_back(
"WhiteDay",
60 PROP_CANDLESTICKCHARTTYPE_WHITE_DAY,
62 beans::PropertyAttribute::BOUND
63 | beans::PropertyAttribute::MAYBEVOID );
64 rOutProperties.emplace_back(
"BlackDay",
65 PROP_CANDLESTICKCHARTTYPE_BLACK_DAY,
67 beans::PropertyAttribute::BOUND
68 | beans::PropertyAttribute::MAYBEVOID );
70 rOutProperties.emplace_back(
"ShowFirst",
71 PROP_CANDLESTICKCHARTTYPE_SHOW_FIRST,
73 beans::PropertyAttribute::BOUND
74 | beans::PropertyAttribute::MAYBEDEFAULT );
75 rOutProperties.emplace_back(
"ShowHighLow",
76 PROP_CANDLESTICKCHARTTYPE_SHOW_HIGH_LOW,
78 beans::PropertyAttribute::BOUND
79 | beans::PropertyAttribute::MAYBEDEFAULT );
84 static ::cppu::OPropertyArrayHelper aPropHelper = []()
87 lcl_AddPropertiesToVector( aProperties );
109 PROP_CANDLESTICKCHARTTYPE_WHITE_DAY,
uno::Any( xWhiteDayProps ));
111 PROP_CANDLESTICKCHARTTYPE_BLACK_DAY,
uno::Any( xBlackDayProps ));
121 if( ( aValue >>= xPropertySet )
122 && xPropertySet.is())
126 if( ( aValue >>= xPropertySet )
127 && xPropertySet.is())
139 if( ( aValue >>= xPropertySet )
140 && xPropertySet.is())
144 if( ( aValue >>= xPropertySet )
145 && xPropertySet.is())
148 catch(
const uno::Exception & )
173 bool bShowFirst =
true;
174 bool bShowHiLow =
false;
178 std::vector< OUString > aMandRoles;
180 aMandRoles.emplace_back(
"label");
182 aMandRoles.emplace_back(
"values-first");
186 aMandRoles.emplace_back(
"values-min");
187 aMandRoles.emplace_back(
"values-max");
190 aMandRoles.emplace_back(
"values-last");
197 bool bShowFirst =
true;
198 bool bShowHiLow =
false;
202 std::vector< OUString > aOptRoles;
205 aOptRoles.emplace_back(
"values-first");
209 aOptRoles.emplace_back(
"values-min");
210 aOptRoles.emplace_back(
"values-max");
218 return "values-last";
233 tPropertyValueMap::const_iterator aFound( aStaticDefaults.find(
nHandle ) );
234 if( aFound == aStaticDefaults.end() )
237 rAny = (*aFound).second;
243 return StaticCandleStickChartTypeInfoHelper();
251 return xPropertySetInfo;
255 sal_Int32 nHandle,
const uno::Any& rValue )
257 if(
nHandle == PROP_CANDLESTICKCHARTTYPE_WHITE_DAY
258 ||
nHandle == PROP_CANDLESTICKCHARTTYPE_BLACK_DAY )
264 (aOldValue >>= xBroadcaster) &&
270 OSL_ASSERT( rValue.getValueType().getTypeClass() == uno::TypeClass_INTERFACE );
272 (rValue >>= xBroadcaster) &&
284 return "com.sun.star.comp.chart.CandleStickChartType" ;
296 "com.sun.star.chart2.ChartType",
297 "com.sun.star.beans.PropertySet" };
302extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
304 css::uno::Sequence<css::uno::Any>
const &)
306 return cppu::acquire(new ::chart::CandleStickChartType);
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart_CandleStickChartType_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
PropertiesInfo aProperties
virtual ~CandleStickChartType() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
The InfoHelper table contains all property names and types of this object.
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
The same as setFastPropertyValue; nHandle is always valid.
virtual OUString SAL_CALL getChartType() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedMandatoryRoles() override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any &rAny) const override
implement this method to provide default values for all properties supporting defaults.
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedOptionalRoles() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual rtl::Reference< ChartType > cloneChartType() const override
virtual OUString SAL_CALL getRoleOfSequenceForSeriesLabel() override
rtl::Reference< ModifyEventForwarder > m_xModifyEventForwarder
merge XTypeProvider implementations
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo(IPropertyArrayHelper &rProperties)
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
The same as getFastPropertyValue, but return the value through rValue and nHandle is always valid.
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
The same as setFastPropertyValue; nHandle is always valid.
#define DBG_UNHANDLED_EXCEPTION(...)
void removeListener(const InterfaceRef &xObject, const css::uno::Reference< css::util::XModifyListener > &xListener)
void addListener(const InterfaceRef &xObject, const css::uno::Reference< css::util::XModifyListener > &xListener)
void setPropertyValueDefault(tPropertyValueMap &rOutMap, tPropertyValueMapKey key, const Value &value)
Calls setPropertyValue() but asserts that the given property hasn't been set before.
std::unordered_map< tPropertyValueMapKey, css::uno::Any > tPropertyValueMap
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK