21#include <com/sun/star/beans/PropertyAttribute.hpp>
22#include <com/sun/star/beans/XPropertySet.hpp>
23#include <com/sun/star/drawing/LineStyle.hpp>
24#include <com/sun/star/drawing/LineDash.hpp>
25#include <com/sun/star/drawing/LineCap.hpp>
26#include <com/sun/star/drawing/LineJoint.hpp>
32using ::com::sun::star::beans::Property;
38 std::vector< Property > & rOutProperties )
41 rOutProperties.emplace_back(
"LineStyle",
44 beans::PropertyAttribute::BOUND
45 | beans::PropertyAttribute::MAYBEDEFAULT );
47 rOutProperties.emplace_back(
"LineDash",
50 beans::PropertyAttribute::BOUND
51 | beans::PropertyAttribute::MAYBEVOID );
54 rOutProperties.emplace_back(
"LineDashName",
57 beans::PropertyAttribute::BOUND
58 | beans::PropertyAttribute::MAYBEDEFAULT
59 | beans::PropertyAttribute::MAYBEVOID );
61 rOutProperties.emplace_back(
"LineColor",
64 beans::PropertyAttribute::BOUND
65 | beans::PropertyAttribute::MAYBEDEFAULT );
67 rOutProperties.emplace_back(
"LineTransparence",
70 beans::PropertyAttribute::BOUND
71 | beans::PropertyAttribute::MAYBEDEFAULT );
73 rOutProperties.emplace_back(
"LineWidth",
76 beans::PropertyAttribute::BOUND
77 | beans::PropertyAttribute::MAYBEDEFAULT );
79 rOutProperties.emplace_back(
"LineJoint",
82 beans::PropertyAttribute::BOUND
83 | beans::PropertyAttribute::MAYBEDEFAULT );
85 rOutProperties.emplace_back(
"LineCap",
88 beans::PropertyAttribute::BOUND
89 | beans::PropertyAttribute::MAYBEDEFAULT );
104 css::beans::XPropertySet >& xLineProperties )
109 if( xLineProperties.is() )
111 drawing::LineStyle aLineStyle(drawing::LineStyle_SOLID);
112 xLineProperties->getPropertyValue(
"LineStyle" ) >>= aLineStyle;
113 if( aLineStyle != drawing::LineStyle_NONE )
115 sal_Int16 nLineTransparence=0;
116 xLineProperties->getPropertyValue(
"LineTransparence" ) >>= nLineTransparence;
117 if(nLineTransparence!=100)
124 catch(
const uno::Exception & )
132 css::beans::XPropertySet >& xLineProperties )
136 if( xLineProperties.is() )
138 drawing::LineStyle aLineStyle(drawing::LineStyle_SOLID);
139 xLineProperties->getPropertyValue(
"LineStyle" ) >>= aLineStyle;
140 if( aLineStyle == drawing::LineStyle_NONE )
141 xLineProperties->setPropertyValue(
"LineStyle",
uno::Any( drawing::LineStyle_SOLID ) );
143 sal_Int16 nLineTransparence=0;
144 xLineProperties->getPropertyValue(
"LineTransparence" ) >>= nLineTransparence;
145 if(nLineTransparence==100)
146 xLineProperties->setPropertyValue(
"LineTransparence",
uno::Any( sal_Int16(0) ) );
149 catch(
const uno::Exception & )
156 css::beans::XPropertySet >& xLineProperties )
160 if( xLineProperties.is() )
162 drawing::LineStyle aLineStyle(drawing::LineStyle_SOLID);
163 xLineProperties->getPropertyValue(
"LineStyle" ) >>= aLineStyle;
164 if( aLineStyle != drawing::LineStyle_NONE )
165 xLineProperties->setPropertyValue(
"LineStyle",
uno::Any( drawing::LineStyle_NONE ) );
168 catch(
const uno::Exception & )
175 css::beans::XPropertySet >& xLineProperties, sal_Int32 nColor )
179 if( xLineProperties.is() )
181 xLineProperties->setPropertyValue(
"LineColor",
uno::Any( nColor ) );
184 catch(
const uno::Exception & )
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define DBG_UNHANDLED_EXCEPTION(...)
OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap(::chart::tPropertyValueMap &rOutMap)
OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(std::vector< css::beans::Property > &rOutProperties)
void SetLineColor(const css::uno::Reference< css::beans::XPropertySet > &xGridProperties, sal_Int32 nColor)
void SetLineVisible(const css::uno::Reference< css::beans::XPropertySet > &xLineProperties)
void SetLineInvisible(const css::uno::Reference< css::beans::XPropertySet > &xLineProperties)
bool IsLineVisible(const css::uno::Reference< css::beans::XPropertySet > &xLineProperties)
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