Update ooo320-m1
[ooovba.git] / chart2 / source / controller / chartapiwrapper / WrappedSymbolProperties.cxx
blob59599288c2517dd392ad25fb05ce2c6934620b28
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: WrappedSymbolProperties.cxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_chart2.hxx"
34 #include "WrappedSymbolProperties.hxx"
35 #include "WrappedSeriesOrDiagramProperty.hxx"
36 #include "macros.hxx"
37 #include "FastPropertyIdRanges.hxx"
38 #include "ChartTypeHelper.hxx"
39 #include <com/sun/star/chart2/Symbol.hpp>
40 #include <com/sun/star/chart2/SymbolStyle.hpp>
41 #include <com/sun/star/awt/Size.hpp>
42 #include <com/sun/star/beans/PropertyAttribute.hpp>
43 #include <com/sun/star/chart/ChartSymbolType.hpp>
44 #include <com/sun/star/drawing/LineStyle.hpp>
46 #include <com/sun/star/graphic/XGraphicProvider.hpp>
48 // for UNO_NAME_GRAPHOBJ_URLPREFIX
49 #include <svx/unoprnms.hxx>
51 // for Graphic
52 #include <vcl/graph.hxx>
53 // for GraphicObject
54 #include <goodies/grfmgr.hxx>
55 #include <vcl/outdev.hxx>
57 #include <comphelper/processfactory.hxx>
59 using namespace ::com::sun::star;
60 using ::com::sun::star::uno::Any;
61 using ::com::sun::star::uno::Reference;
62 using ::com::sun::star::uno::Sequence;
63 using ::com::sun::star::beans::Property;
64 using ::rtl::OUString;
66 //.............................................................................
67 namespace chart
69 namespace wrapper
73 //-----------------------------------------------------------------------------
74 //-----------------------------------------------------------------------------
75 //-----------------------------------------------------------------------------
77 class WrappedSymbolTypeProperty : public WrappedSeriesOrDiagramProperty< sal_Int32 >
79 public:
80 virtual sal_Int32 getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
81 virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Int32 aNewValue ) const;
83 virtual Any getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
84 throw ( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
85 virtual beans::PropertyState getPropertyState( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
86 throw (beans::UnknownPropertyException, uno::RuntimeException);
88 explicit WrappedSymbolTypeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
89 tSeriesOrDiagramPropertyType ePropertyType );
90 virtual ~WrappedSymbolTypeProperty();
93 class WrappedSymbolBitmapURLProperty : public WrappedSeriesOrDiagramProperty< OUString >
95 public:
96 virtual OUString getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
97 virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, OUString aNewGraphicURL ) const;
99 explicit WrappedSymbolBitmapURLProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
100 tSeriesOrDiagramPropertyType ePropertyType );
101 virtual ~WrappedSymbolBitmapURLProperty();
104 // this operator is not defined by default
105 bool operator!=( const awt::Size & rSize1, const awt::Size & rSize2 )
107 return (rSize1.Width != rSize2.Width) || (rSize1.Height != rSize2.Height);
110 class WrappedSymbolSizeProperty : public WrappedSeriesOrDiagramProperty< awt::Size >
112 public:
113 virtual awt::Size getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
114 virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, awt::Size aNewSize ) const;
115 virtual beans::PropertyState getPropertyState( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
116 throw (beans::UnknownPropertyException, uno::RuntimeException);
118 explicit WrappedSymbolSizeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
119 tSeriesOrDiagramPropertyType ePropertyType );
120 virtual ~WrappedSymbolSizeProperty();
123 class WrappedSymbolAndLinesProperty : public WrappedSeriesOrDiagramProperty< sal_Bool >
125 public:
126 virtual sal_Bool getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
127 virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Bool bDrawLines ) const;
128 virtual beans::PropertyState getPropertyState( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
129 throw (beans::UnknownPropertyException, uno::RuntimeException);
131 explicit WrappedSymbolAndLinesProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
132 tSeriesOrDiagramPropertyType ePropertyType );
133 virtual ~WrappedSymbolAndLinesProperty();
136 namespace
138 enum
140 //symbol properties
141 PROP_CHART_SYMBOL_TYPE = FAST_PROPERTY_ID_START_CHART_SYMBOL_PROP,
142 PROP_CHART_SYMBOL_BITMAP_URL,
143 PROP_CHART_SYMBOL_SIZE,
144 PROP_CHART_SYMBOL_AND_LINES
147 sal_Int32 lcl_getSymbolType( const ::com::sun::star::chart2::Symbol& rSymbol )
149 sal_Int32 nSymbol = ::com::sun::star::chart::ChartSymbolType::NONE;
150 switch( rSymbol.Style )
152 case chart2::SymbolStyle_NONE:
153 break;
154 case chart2::SymbolStyle_AUTO:
155 nSymbol = ::com::sun::star::chart::ChartSymbolType::AUTO;
156 break;
157 case chart2::SymbolStyle_STANDARD:
158 nSymbol = rSymbol.StandardSymbol%8;
159 break;
160 case chart2::SymbolStyle_POLYGON://new feature
161 nSymbol = ::com::sun::star::chart::ChartSymbolType::AUTO;
162 break;
163 case chart2::SymbolStyle_GRAPHIC:
164 nSymbol = ::com::sun::star::chart::ChartSymbolType::BITMAPURL;
165 break;
166 default:
167 nSymbol = ::com::sun::star::chart::ChartSymbolType::AUTO;
168 break;
170 return nSymbol;
172 void lcl_setSymbolTypeToSymbol( sal_Int32 nSymbolType, chart2::Symbol& rSymbol )
174 switch( nSymbolType )
176 case ::com::sun::star::chart::ChartSymbolType::NONE:
177 rSymbol.Style = chart2::SymbolStyle_NONE;
178 break;
179 case ::com::sun::star::chart::ChartSymbolType::AUTO:
180 rSymbol.Style = chart2::SymbolStyle_AUTO;
181 break;
182 case ::com::sun::star::chart::ChartSymbolType::BITMAPURL:
183 rSymbol.Style = chart2::SymbolStyle_GRAPHIC;
184 break;
185 default:
186 rSymbol.Style = chart2::SymbolStyle_STANDARD;
187 rSymbol.StandardSymbol = nSymbolType;
188 break;
192 void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList
193 , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact
194 , tSeriesOrDiagramPropertyType ePropertyType )
196 rList.push_back( new WrappedSymbolTypeProperty( spChart2ModelContact, ePropertyType ) );
197 rList.push_back( new WrappedSymbolBitmapURLProperty( spChart2ModelContact, ePropertyType ) );
198 rList.push_back( new WrappedSymbolSizeProperty( spChart2ModelContact, ePropertyType ) );
199 rList.push_back( new WrappedSymbolAndLinesProperty( spChart2ModelContact, ePropertyType ) );
202 }//anonymous namespace
204 //-----------------------------------------------------------------------------
205 //-----------------------------------------------------------------------------
206 //-----------------------------------------------------------------------------
207 //static
208 void WrappedSymbolProperties::addProperties( ::std::vector< Property > & rOutProperties )
210 rOutProperties.push_back(
211 Property( C2U( "SymbolType" ),
212 PROP_CHART_SYMBOL_TYPE,
213 ::getCppuType( reinterpret_cast< sal_Int32 * >(0)),
214 beans::PropertyAttribute::BOUND
215 | beans::PropertyAttribute::MAYBEDEFAULT ));
217 rOutProperties.push_back(
218 Property( C2U( "SymbolBitmapURL" ),
219 PROP_CHART_SYMBOL_BITMAP_URL,
220 ::getCppuType( reinterpret_cast< ::rtl::OUString * >(0)),
221 beans::PropertyAttribute::BOUND
222 | beans::PropertyAttribute::MAYBEDEFAULT ));
224 rOutProperties.push_back(
225 Property( C2U( "SymbolSize" ),
226 PROP_CHART_SYMBOL_SIZE,
227 ::getCppuType( reinterpret_cast< awt::Size * >(0)),
228 beans::PropertyAttribute::BOUND
229 | beans::PropertyAttribute::MAYBEDEFAULT ));
231 rOutProperties.push_back(
232 Property( C2U( "Lines" ),
233 PROP_CHART_SYMBOL_AND_LINES,
234 ::getBooleanCppuType(),
235 beans::PropertyAttribute::BOUND
236 | beans::PropertyAttribute::MAYBEDEFAULT ));
239 //-----------------------------------------------------------------------------
240 //-----------------------------------------------------------------------------
242 //static
243 void WrappedSymbolProperties::addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
244 , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
246 lcl_addWrappedProperties( rList, spChart2ModelContact, DATA_SERIES );
249 //-----------------------------------------------------------------------------
250 //-----------------------------------------------------------------------------
252 //static
253 void WrappedSymbolProperties::addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
254 , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
256 lcl_addWrappedProperties( rList, spChart2ModelContact, DIAGRAM );
259 //-----------------------------------------------------------------------------
260 //-----------------------------------------------------------------------------
261 //-----------------------------------------------------------------------------
263 WrappedSymbolTypeProperty::WrappedSymbolTypeProperty(
264 ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
265 tSeriesOrDiagramPropertyType ePropertyType )
266 : WrappedSeriesOrDiagramProperty< sal_Int32 >( C2U("SymbolType")
267 , uno::makeAny( ::com::sun::star::chart::ChartSymbolType::NONE )
268 , spChart2ModelContact
269 , ePropertyType )
272 WrappedSymbolTypeProperty::~WrappedSymbolTypeProperty()
276 sal_Int32 WrappedSymbolTypeProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
278 sal_Int32 aRet = 0;
279 m_aDefaultValue >>= aRet;
280 chart2::Symbol aSymbol;
281 if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol ) )
282 aRet = lcl_getSymbolType( aSymbol );
283 return aRet;
286 void WrappedSymbolTypeProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Int32 nSymbolType ) const
288 if(!xSeriesPropertySet.is())
289 return;
291 chart2::Symbol aSymbol;
292 xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol;
294 lcl_setSymbolTypeToSymbol( nSymbolType, aSymbol );
295 xSeriesPropertySet->setPropertyValue( C2U("Symbol"), uno::makeAny( aSymbol ) );
298 Any WrappedSymbolTypeProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
299 throw ( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
301 //the old chart (< OOo 2.3) needs symbol-type="automatic" at the plot-area if any of the series should be able to have symbols
302 if( m_ePropertyType == DIAGRAM )
304 bool bHasAmbiguousValue = false;
305 sal_Int32 aValue = 0;
306 if( detectInnerValue( aValue, bHasAmbiguousValue ) )
308 if(bHasAmbiguousValue)
310 m_aOuterValue = uno::makeAny( ::com::sun::star::chart::ChartSymbolType::AUTO );
312 else
314 if( ::com::sun::star::chart::ChartSymbolType::NONE == aValue )
315 m_aOuterValue = uno::makeAny( ::com::sun::star::chart::ChartSymbolType::NONE );
316 else
317 m_aOuterValue = uno::makeAny( ::com::sun::star::chart::ChartSymbolType::AUTO );
320 return m_aOuterValue;
322 else
324 ::com::sun::star::uno::Any aRet( m_aDefaultValue );
325 aRet <<= getValueFromSeries( xInnerPropertySet );
326 return aRet;
330 beans::PropertyState WrappedSymbolTypeProperty::getPropertyState( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
331 throw (beans::UnknownPropertyException, uno::RuntimeException)
333 //the special situation for this property here is that the diagram default can be
334 //different from the normal default and different from all sinlges series values
335 //so we need to return PropertyState_DIRECT_VALUE for more cases
337 if( m_ePropertyType == DATA_SERIES && //single series or point
338 m_spChart2ModelContact.get())
340 Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() );
341 Reference< chart2::XDataSeries > xSeries( xInnerPropertyState, uno::UNO_QUERY );
342 Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ) );
343 if( ChartTypeHelper::isSupportingSymbolProperties( xChartType, 2 ) )
344 return beans::PropertyState_DIRECT_VALUE;
346 return WrappedProperty::getPropertyState( xInnerPropertyState );
349 //-----------------------------------------------------------------------------
350 //-----------------------------------------------------------------------------
351 //-----------------------------------------------------------------------------
353 WrappedSymbolBitmapURLProperty::WrappedSymbolBitmapURLProperty(
354 ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
355 tSeriesOrDiagramPropertyType ePropertyType )
356 : WrappedSeriesOrDiagramProperty< OUString >( C2U("SymbolBitmapURL")
357 , uno::makeAny( OUString() ), spChart2ModelContact, ePropertyType )
361 WrappedSymbolBitmapURLProperty::~WrappedSymbolBitmapURLProperty()
365 OUString WrappedSymbolBitmapURLProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
367 OUString aRet;
368 m_aDefaultValue >>= aRet;
369 chart2::Symbol aSymbol;
370 if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol )
371 && aSymbol.Graphic.is())
373 GraphicObject aGrObj( Graphic( aSymbol.Graphic ));
374 aRet = OUString( RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_GRAPHOBJ_URLPREFIX ));
375 aRet += OUString::createFromAscii( aGrObj.GetUniqueID().GetBuffer());
377 return aRet;
380 void WrappedSymbolBitmapURLProperty::setValueToSeries(
381 const Reference< beans::XPropertySet >& xSeriesPropertySet,
382 OUString aNewGraphicURL ) const
384 if(!xSeriesPropertySet.is())
385 return;
387 chart2::Symbol aSymbol;
388 if( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol )
390 bool bMatchesPrefix =
391 aNewGraphicURL.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( UNO_NAME_GRAPHOBJ_URLPREFIX ));
392 OSL_ENSURE( bMatchesPrefix, "Invalid URL for Symbol Bitmap" );
393 if( bMatchesPrefix )
395 GraphicObject aGrObj = GraphicObject(
396 ByteString( U2C( aNewGraphicURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ))));
397 aSymbol.Graphic.set( aGrObj.GetGraphic().GetXGraphic());
398 xSeriesPropertySet->setPropertyValue( C2U("Symbol"), uno::makeAny( aSymbol ) );
400 else
404 // @todo: get factory from some context?
405 Reference< lang::XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
406 Reference< graphic::XGraphicProvider > xGraphProv(
407 xFact->createInstance( C2U("com.sun.star.graphic.GraphicProvider")), uno::UNO_QUERY_THROW );
408 Sequence< beans::PropertyValue > aArgs(1);
409 aArgs[0] = beans::PropertyValue(
410 C2U("URL"), -1, uno::makeAny( aNewGraphicURL ),
411 beans::PropertyState_DIRECT_VALUE );
412 aSymbol.Graphic.set( xGraphProv->queryGraphic( aArgs ));
413 xSeriesPropertySet->setPropertyValue( C2U("Symbol"), uno::makeAny( aSymbol ) );
415 catch( const uno::Exception & ex )
417 ASSERT_EXCEPTION( ex );
424 //-----------------------------------------------------------------------------
425 //-----------------------------------------------------------------------------
426 //-----------------------------------------------------------------------------
428 namespace
431 void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol )
433 if( rSymbol.Style != chart2::SymbolStyle_GRAPHIC )
434 return;
435 if( rSymbol.Size.Width != -1 )
436 return;
437 if( rSymbol.Size.Height != -1 )
438 return;
440 //find a good automatic size
443 const awt::Size aDefaultSize(250,250);
444 awt::Size aSize = aDefaultSize;
445 uno::Reference< beans::XPropertySet > xProp( rSymbol.Graphic, uno::UNO_QUERY );
446 if( xProp.is() )
448 bool bFoundSize = false;
451 if( (xProp->getPropertyValue( C2U( "Size100thMM" ) ) >>= aSize) )
453 if( aSize.Width == 0 && aSize.Height == 0 )
454 aSize = aDefaultSize;
455 else
456 bFoundSize = true;
459 catch( uno::Exception& e )
461 ASSERT_EXCEPTION( e );
464 if(!bFoundSize)
466 awt::Size aAWTPixelSize(10,10);
467 if( (xProp->getPropertyValue( C2U( "SizePixel" ) ) >>= aAWTPixelSize) )
469 Size aPixelSize(aAWTPixelSize.Width,aAWTPixelSize.Height);
470 Size aNewSize = ( OutputDevice::LogicToLogic( aPixelSize, MAP_PIXEL, MAP_100TH_MM ));
471 aSize = awt::Size( aNewSize.Width(), aNewSize.Height() );
473 if( aSize.Width == 0 && aSize.Height == 0 )
474 aSize = aDefaultSize;
478 rSymbol.Size = aSize;
480 catch( uno::Exception& e )
482 ASSERT_EXCEPTION( e );
486 }//end anonymous namespace
488 WrappedSymbolSizeProperty::WrappedSymbolSizeProperty(
489 ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
490 tSeriesOrDiagramPropertyType ePropertyType )
491 : WrappedSeriesOrDiagramProperty< awt::Size >( C2U("SymbolSize")
492 , uno::makeAny( awt::Size(250,250) ), spChart2ModelContact, ePropertyType )
496 WrappedSymbolSizeProperty::~WrappedSymbolSizeProperty()
500 awt::Size WrappedSymbolSizeProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
502 awt::Size aRet;
503 m_aDefaultValue >>= aRet;
504 chart2::Symbol aSymbol;
505 if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol ))
506 aRet = aSymbol.Size;
507 return aRet;
510 void WrappedSymbolSizeProperty::setValueToSeries(
511 const Reference< beans::XPropertySet >& xSeriesPropertySet,
512 awt::Size aNewSize ) const
514 if(!xSeriesPropertySet.is())
515 return;
517 chart2::Symbol aSymbol;
518 if( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol )
520 aSymbol.Size = aNewSize;
521 lcl_correctSymbolSizeForBitmaps(aSymbol);
522 xSeriesPropertySet->setPropertyValue( C2U("Symbol"), uno::makeAny( aSymbol ) );
526 beans::PropertyState WrappedSymbolSizeProperty::getPropertyState( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
527 throw (beans::UnknownPropertyException, uno::RuntimeException)
529 //only export symbol size if necessary
530 if( m_ePropertyType == DIAGRAM )
531 return beans::PropertyState_DEFAULT_VALUE;
535 chart2::Symbol aSymbol;
536 Reference< beans::XPropertySet > xSeriesPropertySet( xInnerPropertyState, uno::UNO_QUERY );
537 if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol ))
539 if( chart2::SymbolStyle_NONE != aSymbol.Style )
540 return beans::PropertyState_DIRECT_VALUE;
543 catch( const uno::Exception & ex )
545 ASSERT_EXCEPTION( ex );
547 return beans::PropertyState_DEFAULT_VALUE;
550 //-----------------------------------------------------------------------------
551 //-----------------------------------------------------------------------------
552 //-----------------------------------------------------------------------------
554 WrappedSymbolAndLinesProperty::WrappedSymbolAndLinesProperty(
555 ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
556 tSeriesOrDiagramPropertyType ePropertyType )
557 : WrappedSeriesOrDiagramProperty< sal_Bool >( C2U("Lines")
558 , uno::makeAny( sal_True ), spChart2ModelContact, ePropertyType )
562 WrappedSymbolAndLinesProperty::~WrappedSymbolAndLinesProperty()
566 sal_Bool WrappedSymbolAndLinesProperty::getValueFromSeries( const Reference< beans::XPropertySet >& /*xSeriesPropertySet*/ ) const
568 //do not export this property anymore, instead use a linestyle none for no lines
569 return sal_True;
572 void WrappedSymbolAndLinesProperty::setValueToSeries(
573 const Reference< beans::XPropertySet >& xSeriesPropertySet,
574 sal_Bool bDrawLines ) const
576 if(!xSeriesPropertySet.is())
577 return;
579 drawing::LineStyle eLineStyle( bDrawLines ? drawing::LineStyle_SOLID : drawing::LineStyle_NONE );
580 xSeriesPropertySet->setPropertyValue( C2U("LineStyle"), uno::makeAny( eLineStyle ) );
583 beans::PropertyState WrappedSymbolAndLinesProperty::getPropertyState( const Reference< beans::XPropertyState >& /*xInnerPropertyState*/ ) const
584 throw (beans::UnknownPropertyException, uno::RuntimeException)
586 //do not export this property anymore, instead use a linestyle none for no lines
587 return beans::PropertyState_DEFAULT_VALUE;
590 //-----------------------------------------------------------------------------
591 //-----------------------------------------------------------------------------
592 //-----------------------------------------------------------------------------
594 } //namespace wrapper
595 } //namespace chart
596 //.............................................................................