1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_chart2.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include "RegressionEquation.hxx" 32*cdf0e10cSrcweir #include "LineProperties.hxx" 33*cdf0e10cSrcweir #include "FillProperties.hxx" 34*cdf0e10cSrcweir #include "UserDefinedProperties.hxx" 35*cdf0e10cSrcweir #include "CharacterProperties.hxx" 36*cdf0e10cSrcweir #include "PropertyHelper.hxx" 37*cdf0e10cSrcweir #include "macros.hxx" 38*cdf0e10cSrcweir #include "ContainerHelper.hxx" 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx> 41*cdf0e10cSrcweir #include <com/sun/star/drawing/FillStyle.hpp> 42*cdf0e10cSrcweir #include <com/sun/star/drawing/LineStyle.hpp> 43*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp> 44*cdf0e10cSrcweir #include <com/sun/star/chart2/RelativePosition.hpp> 45*cdf0e10cSrcweir #include <com/sun/star/awt/Size.hpp> 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir #include <algorithm> 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir using namespace ::com::sun::star; 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir using ::com::sun::star::uno::Reference; 52*cdf0e10cSrcweir using ::com::sun::star::beans::Property; 53*cdf0e10cSrcweir using ::osl::MutexGuard; 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir // ____________________________________________________________ 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir namespace 58*cdf0e10cSrcweir { 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir static const ::rtl::OUString lcl_aImplementationName( 61*cdf0e10cSrcweir RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.RegressionEquation" )); 62*cdf0e10cSrcweir static const ::rtl::OUString lcl_aServiceName( 63*cdf0e10cSrcweir RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.RegressionEquation" )); 64*cdf0e10cSrcweir 65*cdf0e10cSrcweir enum 66*cdf0e10cSrcweir { 67*cdf0e10cSrcweir PROP_EQUATION_SHOW, 68*cdf0e10cSrcweir PROP_EQUATION_SHOW_CORRELATION_COEFF, 69*cdf0e10cSrcweir // PROP_EQUATION_SEPARATOR, 70*cdf0e10cSrcweir PROP_EQUATION_REF_PAGE_SIZE, 71*cdf0e10cSrcweir PROP_EQUATION_REL_POS, 72*cdf0e10cSrcweir PROP_EQUATION_NUMBER_FORMAT 73*cdf0e10cSrcweir }; 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir void lcl_AddPropertiesToVector( 76*cdf0e10cSrcweir ::std::vector< Property > & rOutProperties ) 77*cdf0e10cSrcweir { 78*cdf0e10cSrcweir rOutProperties.push_back( 79*cdf0e10cSrcweir Property( C2U( "ShowEquation" ), 80*cdf0e10cSrcweir PROP_EQUATION_SHOW, 81*cdf0e10cSrcweir ::getBooleanCppuType(), 82*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 83*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir rOutProperties.push_back( 86*cdf0e10cSrcweir Property( C2U( "ShowCorrelationCoefficient" ), 87*cdf0e10cSrcweir PROP_EQUATION_SHOW_CORRELATION_COEFF, 88*cdf0e10cSrcweir ::getBooleanCppuType(), 89*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 90*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir // rOutProperties.push_back( 93*cdf0e10cSrcweir // Property( C2U( "Separator" ), 94*cdf0e10cSrcweir // PROP_EQUATION_SEPARATOR, 95*cdf0e10cSrcweir // ::getCppuType( reinterpret_cast< ::rtl::OUString * >(0)), 96*cdf0e10cSrcweir // beans::PropertyAttribute::BOUND 97*cdf0e10cSrcweir // | beans::PropertyAttribute::MAYBEDEFAULT )); 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir rOutProperties.push_back( 100*cdf0e10cSrcweir Property( C2U( "ReferencePageSize" ), 101*cdf0e10cSrcweir PROP_EQUATION_REF_PAGE_SIZE, 102*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const awt::Size * >(0)), 103*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 104*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID )); 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir rOutProperties.push_back( 107*cdf0e10cSrcweir Property( C2U( "RelativePosition" ), 108*cdf0e10cSrcweir PROP_EQUATION_REL_POS, 109*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const chart2::RelativePosition * >(0)), 110*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 111*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID )); 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir rOutProperties.push_back( 114*cdf0e10cSrcweir Property( C2U( "NumberFormat" ), 115*cdf0e10cSrcweir PROP_EQUATION_NUMBER_FORMAT, 116*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 117*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 118*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID )); 119*cdf0e10cSrcweir } 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir struct StaticRegressionEquationDefaults_Initializer 122*cdf0e10cSrcweir { 123*cdf0e10cSrcweir ::chart::tPropertyValueMap* operator()() 124*cdf0e10cSrcweir { 125*cdf0e10cSrcweir static ::chart::tPropertyValueMap aStaticDefaults; 126*cdf0e10cSrcweir lcl_AddDefaultsToMap( aStaticDefaults ); 127*cdf0e10cSrcweir return &aStaticDefaults; 128*cdf0e10cSrcweir } 129*cdf0e10cSrcweir private: 130*cdf0e10cSrcweir void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap ) 131*cdf0e10cSrcweir { 132*cdf0e10cSrcweir ::chart::LineProperties::AddDefaultsToMap( rOutMap ); 133*cdf0e10cSrcweir ::chart::FillProperties::AddDefaultsToMap( rOutMap ); 134*cdf0e10cSrcweir ::chart::CharacterProperties::AddDefaultsToMap( rOutMap ); 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_EQUATION_SHOW, false ); 137*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_EQUATION_SHOW_CORRELATION_COEFF, false ); 138*cdf0e10cSrcweir //::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_EQUATION_SEPARATOR, ::rtl::OUString( sal_Unicode( '\n' ))); 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir // override other defaults 141*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::FillProperties::PROP_FILL_STYLE, drawing::FillStyle_NONE ); 142*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::LineProperties::PROP_LINE_STYLE, drawing::LineStyle_NONE ); 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir float fDefaultCharHeight = 10.0; 145*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT, fDefaultCharHeight ); 146*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultCharHeight ); 147*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight ); 148*cdf0e10cSrcweir } 149*cdf0e10cSrcweir }; 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir struct StaticRegressionEquationDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticRegressionEquationDefaults_Initializer > 152*cdf0e10cSrcweir { 153*cdf0e10cSrcweir }; 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir struct StaticRegressionEquationInfoHelper_Initializer 156*cdf0e10cSrcweir { 157*cdf0e10cSrcweir ::cppu::OPropertyArrayHelper* operator()() 158*cdf0e10cSrcweir { 159*cdf0e10cSrcweir static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); 160*cdf0e10cSrcweir return &aPropHelper; 161*cdf0e10cSrcweir } 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir private: 164*cdf0e10cSrcweir uno::Sequence< Property > lcl_GetPropertySequence() 165*cdf0e10cSrcweir { 166*cdf0e10cSrcweir ::std::vector< ::com::sun::star::beans::Property > aProperties; 167*cdf0e10cSrcweir lcl_AddPropertiesToVector( aProperties ); 168*cdf0e10cSrcweir ::chart::LineProperties::AddPropertiesToVector( aProperties ); 169*cdf0e10cSrcweir ::chart::FillProperties::AddPropertiesToVector( aProperties ); 170*cdf0e10cSrcweir ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); 171*cdf0e10cSrcweir ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); 172*cdf0e10cSrcweir 173*cdf0e10cSrcweir ::std::sort( aProperties.begin(), aProperties.end(), 174*cdf0e10cSrcweir ::chart::PropertyNameLess() ); 175*cdf0e10cSrcweir 176*cdf0e10cSrcweir return ::chart::ContainerHelper::ContainerToSequence( aProperties ); 177*cdf0e10cSrcweir } 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir }; 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir struct StaticRegressionEquationInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticRegressionEquationInfoHelper_Initializer > 182*cdf0e10cSrcweir { 183*cdf0e10cSrcweir }; 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir struct StaticRegressionEquationInfo_Initializer 186*cdf0e10cSrcweir { 187*cdf0e10cSrcweir uno::Reference< beans::XPropertySetInfo >* operator()() 188*cdf0e10cSrcweir { 189*cdf0e10cSrcweir static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo( 190*cdf0e10cSrcweir ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticRegressionEquationInfoHelper::get() ) ); 191*cdf0e10cSrcweir return &xPropertySetInfo; 192*cdf0e10cSrcweir } 193*cdf0e10cSrcweir }; 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir struct StaticRegressionEquationInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticRegressionEquationInfo_Initializer > 196*cdf0e10cSrcweir { 197*cdf0e10cSrcweir }; 198*cdf0e10cSrcweir 199*cdf0e10cSrcweir } // anonymous namespace 200*cdf0e10cSrcweir 201*cdf0e10cSrcweir // ____________________________________________________________ 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir namespace chart 204*cdf0e10cSrcweir { 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir RegressionEquation::RegressionEquation( const Reference< uno::XComponentContext > & xContext ) : 207*cdf0e10cSrcweir ::property::OPropertySet( m_aMutex ), 208*cdf0e10cSrcweir m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()), 209*cdf0e10cSrcweir m_xContext( xContext ) 210*cdf0e10cSrcweir {} 211*cdf0e10cSrcweir 212*cdf0e10cSrcweir RegressionEquation::RegressionEquation( const RegressionEquation & rOther ) : 213*cdf0e10cSrcweir MutexContainer(), 214*cdf0e10cSrcweir impl::RegressionEquation_Base(), 215*cdf0e10cSrcweir ::property::OPropertySet( rOther, m_aMutex ), 216*cdf0e10cSrcweir m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()) 217*cdf0e10cSrcweir {} 218*cdf0e10cSrcweir 219*cdf0e10cSrcweir RegressionEquation::~RegressionEquation() 220*cdf0e10cSrcweir {} 221*cdf0e10cSrcweir 222*cdf0e10cSrcweir 223*cdf0e10cSrcweir // ____ XCloneable ____ 224*cdf0e10cSrcweir uno::Reference< util::XCloneable > SAL_CALL RegressionEquation::createClone() 225*cdf0e10cSrcweir throw (uno::RuntimeException) 226*cdf0e10cSrcweir { 227*cdf0e10cSrcweir return uno::Reference< util::XCloneable >( new RegressionEquation( *this )); 228*cdf0e10cSrcweir } 229*cdf0e10cSrcweir 230*cdf0e10cSrcweir // ____ OPropertySet ____ 231*cdf0e10cSrcweir uno::Any RegressionEquation::GetDefaultValue( sal_Int32 nHandle ) const 232*cdf0e10cSrcweir throw(beans::UnknownPropertyException) 233*cdf0e10cSrcweir { 234*cdf0e10cSrcweir const tPropertyValueMap& rStaticDefaults = *StaticRegressionEquationDefaults::get(); 235*cdf0e10cSrcweir tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) ); 236*cdf0e10cSrcweir if( aFound == rStaticDefaults.end() ) 237*cdf0e10cSrcweir return uno::Any(); 238*cdf0e10cSrcweir return (*aFound).second; 239*cdf0e10cSrcweir } 240*cdf0e10cSrcweir 241*cdf0e10cSrcweir ::cppu::IPropertyArrayHelper & SAL_CALL RegressionEquation::getInfoHelper() 242*cdf0e10cSrcweir { 243*cdf0e10cSrcweir return *StaticRegressionEquationInfoHelper::get(); 244*cdf0e10cSrcweir } 245*cdf0e10cSrcweir 246*cdf0e10cSrcweir // ____ XPropertySet ____ 247*cdf0e10cSrcweir Reference< beans::XPropertySetInfo > SAL_CALL RegressionEquation::getPropertySetInfo() 248*cdf0e10cSrcweir throw (uno::RuntimeException) 249*cdf0e10cSrcweir { 250*cdf0e10cSrcweir return *StaticRegressionEquationInfo::get(); 251*cdf0e10cSrcweir } 252*cdf0e10cSrcweir 253*cdf0e10cSrcweir // ____ XModifyBroadcaster ____ 254*cdf0e10cSrcweir void SAL_CALL RegressionEquation::addModifyListener( const uno::Reference< util::XModifyListener >& aListener ) 255*cdf0e10cSrcweir throw (uno::RuntimeException) 256*cdf0e10cSrcweir { 257*cdf0e10cSrcweir try 258*cdf0e10cSrcweir { 259*cdf0e10cSrcweir uno::Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW ); 260*cdf0e10cSrcweir xBroadcaster->addModifyListener( aListener ); 261*cdf0e10cSrcweir } 262*cdf0e10cSrcweir catch( const uno::Exception & ex ) 263*cdf0e10cSrcweir { 264*cdf0e10cSrcweir ASSERT_EXCEPTION( ex ); 265*cdf0e10cSrcweir } 266*cdf0e10cSrcweir } 267*cdf0e10cSrcweir 268*cdf0e10cSrcweir void SAL_CALL RegressionEquation::removeModifyListener( const uno::Reference< util::XModifyListener >& aListener ) 269*cdf0e10cSrcweir throw (uno::RuntimeException) 270*cdf0e10cSrcweir { 271*cdf0e10cSrcweir try 272*cdf0e10cSrcweir { 273*cdf0e10cSrcweir uno::Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW ); 274*cdf0e10cSrcweir xBroadcaster->removeModifyListener( aListener ); 275*cdf0e10cSrcweir } 276*cdf0e10cSrcweir catch( const uno::Exception & ex ) 277*cdf0e10cSrcweir { 278*cdf0e10cSrcweir ASSERT_EXCEPTION( ex ); 279*cdf0e10cSrcweir } 280*cdf0e10cSrcweir } 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir // ____ XModifyListener ____ 283*cdf0e10cSrcweir void SAL_CALL RegressionEquation::modified( const lang::EventObject& aEvent ) 284*cdf0e10cSrcweir throw (uno::RuntimeException) 285*cdf0e10cSrcweir { 286*cdf0e10cSrcweir m_xModifyEventForwarder->modified( aEvent ); 287*cdf0e10cSrcweir } 288*cdf0e10cSrcweir 289*cdf0e10cSrcweir // ____ XEventListener (base of XModifyListener) ____ 290*cdf0e10cSrcweir void SAL_CALL RegressionEquation::disposing( const lang::EventObject& /* Source */ ) 291*cdf0e10cSrcweir throw (uno::RuntimeException) 292*cdf0e10cSrcweir { 293*cdf0e10cSrcweir // nothing 294*cdf0e10cSrcweir } 295*cdf0e10cSrcweir 296*cdf0e10cSrcweir // ____ OPropertySet ____ 297*cdf0e10cSrcweir void RegressionEquation::firePropertyChangeEvent() 298*cdf0e10cSrcweir { 299*cdf0e10cSrcweir fireModifyEvent(); 300*cdf0e10cSrcweir } 301*cdf0e10cSrcweir 302*cdf0e10cSrcweir void RegressionEquation::fireModifyEvent() 303*cdf0e10cSrcweir { 304*cdf0e10cSrcweir m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); 305*cdf0e10cSrcweir } 306*cdf0e10cSrcweir 307*cdf0e10cSrcweir // -------------------------------------------------------------------------------- 308*cdf0e10cSrcweir 309*cdf0e10cSrcweir // ____ XTitle ____ 310*cdf0e10cSrcweir uno::Sequence< uno::Reference< chart2::XFormattedString > > SAL_CALL RegressionEquation::getText() 311*cdf0e10cSrcweir throw (uno::RuntimeException) 312*cdf0e10cSrcweir { 313*cdf0e10cSrcweir // /-- 314*cdf0e10cSrcweir MutexGuard aGuard( GetMutex() ); 315*cdf0e10cSrcweir return m_aStrings; 316*cdf0e10cSrcweir // \-- 317*cdf0e10cSrcweir } 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir void SAL_CALL RegressionEquation::setText( const uno::Sequence< uno::Reference< chart2::XFormattedString > >& Strings ) 320*cdf0e10cSrcweir throw (uno::RuntimeException) 321*cdf0e10cSrcweir { 322*cdf0e10cSrcweir // /-- 323*cdf0e10cSrcweir MutexGuard aGuard( GetMutex() ); 324*cdf0e10cSrcweir ModifyListenerHelper::removeListenerFromAllElements( 325*cdf0e10cSrcweir ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder ); 326*cdf0e10cSrcweir m_aStrings = Strings; 327*cdf0e10cSrcweir ModifyListenerHelper::addListenerToAllElements( 328*cdf0e10cSrcweir ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder ); 329*cdf0e10cSrcweir fireModifyEvent(); 330*cdf0e10cSrcweir // \-- 331*cdf0e10cSrcweir } 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir // ================================================================================ 334*cdf0e10cSrcweir 335*cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > RegressionEquation::getSupportedServiceNames_Static() 336*cdf0e10cSrcweir { 337*cdf0e10cSrcweir const sal_Int32 nNumServices( 5 ); 338*cdf0e10cSrcweir sal_Int32 nI = 0; 339*cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > aServices( nNumServices ); 340*cdf0e10cSrcweir aServices[ nI++ ] = lcl_aServiceName; 341*cdf0e10cSrcweir aServices[ nI++ ] = C2U( "com.sun.star.beans.PropertySet" ); 342*cdf0e10cSrcweir aServices[ nI++ ] = C2U( "com.sun.star.drawing.FillProperties" ); 343*cdf0e10cSrcweir aServices[ nI++ ] = C2U( "com.sun.star.drawing.LineProperties" ); 344*cdf0e10cSrcweir aServices[ nI++ ] = C2U( "com.sun.star.style.CharacterProperties" ); 345*cdf0e10cSrcweir OSL_ASSERT( nNumServices == nI ); 346*cdf0e10cSrcweir return aServices; 347*cdf0e10cSrcweir } 348*cdf0e10cSrcweir 349*cdf0e10cSrcweir // implement XServiceInfo methods basing upon getSupportedServiceNames_Static 350*cdf0e10cSrcweir APPHELPER_XSERVICEINFO_IMPL( RegressionEquation, lcl_aImplementationName ); 351*cdf0e10cSrcweir 352*cdf0e10cSrcweir using impl::RegressionEquation_Base; 353*cdf0e10cSrcweir 354*cdf0e10cSrcweir IMPLEMENT_FORWARD_XINTERFACE2( RegressionEquation, RegressionEquation_Base, ::property::OPropertySet ) 355*cdf0e10cSrcweir 356*cdf0e10cSrcweir } // namespace chart 357