27#include <com/sun/star/drawing/LineJoint.hpp>
38using ::com::sun::star::beans::Property;
39using ::com::sun::star::uno::Reference;
40using ::com::sun::star::uno::Sequence;
41using ::com::sun::star::uno::Any;
46Sequence< Property >& StaticMinMaxLineWrapperPropertyArray()
48 static Sequence< Property > aPropSeq = []()
65 static ::cppu::OPropertyArrayHelper aPropHelper( StaticMinMaxLineWrapperPropertyArray() );
69uno::Reference< beans::XPropertySetInfo >& StaticMinMaxLineWrapperInfo()
71 static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
73 return xPropertySetInfo;
83 , m_aWrappedLineJointProperty(
"LineJoint",
uno::
Any( drawing::LineJoint_NONE ))
116 return StaticMinMaxLineWrapperInfo();
122 const std::vector< rtl::Reference< ChartType > > &
aTypes = xDiagram->getChartTypes();
127 const std::vector< rtl::Reference< DataSeries > > & aSeriesSeq( xType->getDataSeries2() );
128 if(!aSeriesSeq.empty())
130 if(aSeriesSeq[0].is())
132 if( rPropertyName ==
"LineColor" )
133 aSeriesSeq[0]->setPropertyValue(
"Color", rValue );
134 else if( rPropertyName ==
"LineTransparence" )
135 aSeriesSeq[0]->setPropertyValue(
"Transparency", rValue );
139 aSeriesSeq[0]->setPropertyValue( rPropertyName, rValue );
153 const std::vector< rtl::Reference< ChartType > >
aTypes = xDiagram->getChartTypes();
158 const std::vector< rtl::Reference< DataSeries > > & aSeriesSeq( xType->getDataSeries2() );
159 if(!aSeriesSeq.empty())
161 xPropSet = aSeriesSeq[0];
168 if( rPropertyName ==
"LineColor" )
169 aRet = xPropSet->getPropertyValue(
"Color" );
170 else if( rPropertyName ==
"LineTransparence" )
171 aRet = xPropSet->getPropertyValue(
"Transparency" );
175 aRet = xPropSet->getPropertyValue( rPropertyName );
183 OSL_FAIL(
"not implemented");
187 OSL_FAIL(
"not implemented");
191 OSL_FAIL(
"not implemented");
195 OSL_FAIL(
"not implemented");
202 sal_Int32 nMinCount = std::min( rValueSeq.getLength(), rNameSeq.getLength() );
203 for(sal_Int32 nN=0; nN<nMinCount; nN++)
205 OUString aPropertyName( rNameSeq[nN] );
210 catch(
const beans::UnknownPropertyException& )
220 if( rNameSeq.hasElements() )
222 aRetSeq.realloc( rNameSeq.getLength() );
223 auto pRetSeq = aRetSeq.getArray();
224 for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
226 OUString aPropertyName( rNameSeq[nN] );
236 OSL_FAIL(
"not implemented");
241 OSL_FAIL(
"not implemented");
247 OSL_FAIL(
"not implemented");
254 return beans::PropertyState_DEFAULT_VALUE;
259 if( aDefault == aValue )
260 return beans::PropertyState_DEFAULT_VALUE;
262 return beans::PropertyState_DIRECT_VALUE;
267 if( rNameSeq.hasElements() )
269 aRetSeq.realloc( rNameSeq.getLength() );
270 auto pRetSeq = aRetSeq.getArray();
271 for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
273 OUString aPropertyName( rNameSeq[nN] );
292 tPropertyValueMap::const_iterator aFound( aStaticDefaults.find( StaticMinMaxLineWrapperInfoHelper().getHandleByName( rPropertyName ) ) );
293 if( aFound == aStaticDefaults.end() )
295 return (*aFound).second;
303 for(beans::Property
const & prop : rPropSeq)
310 for(OUString
const & s : rNameSeq)
318 if( rNameSeq.hasElements() )
320 aRetSeq.realloc( rNameSeq.getLength() );
321 auto pRetSeq = aRetSeq.getArray();
322 for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
324 OUString aPropertyName( rNameSeq[nN] );
333 return "com.sun.star.comp.chart.ChartLine";
344 "com.sun.star.chart.ChartLine",
345 "com.sun.star.xml.UserDefinedAttributesSupplier",
346 "com.sun.star.drawing.LineProperties"
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact
PropertiesInfo aProperties
virtual css::uno::Any getPropertyValue(const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const override
virtual void setPropertyValue(const css::uno::Any &rOuterValue, const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const override
const OUString & getOuterName() const
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
virtual void SAL_CALL setAllPropertiesToDefault() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
WrappedIgnoreProperty m_aWrappedLineJointProperty
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL dispose() override
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_aEventListenerContainer
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual ~MinMaxLineWrapper() override
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults(const css::uno::Sequence< OUString > &aPropertyNames) override
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
virtual void SAL_CALL setPropertiesToDefault(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
MinMaxLineWrapper(std::shared_ptr< Chart2ModelContact > spChart2ModelContact)
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
sal_Int32 addInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo(IPropertyArrayHelper &rProperties)
#define DBG_UNHANDLED_EXCEPTION(...)
OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap(::chart::tPropertyValueMap &rOutMap)
OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(std::vector< css::beans::Property > &rOutProperties)
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