1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef SC_CHART2UNO_HXX 25 #define SC_CHART2UNO_HXX 26 27 #include "cellsuno.hxx" // for XModifyListenerArr_Impl / ScLinkListener 28 #include "rangelst.hxx" 29 #include "externalrefmgr.hxx" 30 #include "token.hxx" 31 #include "chartlis.hxx" 32 33 #include <svl/lstner.hxx> 34 #include <com/sun/star/chart/ChartDataRowSource.hpp> 35 #include <com/sun/star/chart2/data/XDataProvider.hpp> 36 #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp> 37 #include <com/sun/star/chart2/data/XDataSource.hpp> 38 #include <com/sun/star/chart2/data/XDataSequence.hpp> 39 #include <com/sun/star/chart2/data/XTextualDataSequence.hpp> 40 #include <com/sun/star/chart2/data/XNumericalDataSequence.hpp> 41 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp> 42 #include <com/sun/star/chart2/data/DataSequenceRole.hpp> 43 #include <com/sun/star/lang/XServiceInfo.hpp> 44 #include <com/sun/star/beans/XPropertySet.hpp> 45 #include <com/sun/star/util/XCloneable.hpp> 46 #include <com/sun/star/util/XModifyBroadcaster.hpp> 47 // #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ 48 // #include <com/sun/star/lang/XUnoTunnel.hpp> 49 // #endif 50 #include <cppuhelper/implbase2.hxx> 51 #include <cppuhelper/implbase4.hxx> 52 #include <cppuhelper/implbase6.hxx> 53 #include <cppuhelper/implbase7.hxx> 54 #include <rtl/ustring.hxx> 55 #include <svl/itemprop.hxx> 56 57 #include <hash_set> 58 #include <list> 59 #include <vector> 60 #include <memory> 61 #include <boost/shared_ptr.hpp> 62 63 #define USE_CHART2_EMPTYDATASEQUENCE 0 64 65 class ScDocument; 66 67 // DataProvider ============================================================== 68 69 class ScChart2DataProvider : public 70 ::cppu::WeakImplHelper4< 71 ::com::sun::star::chart2::data::XDataProvider, 72 ::com::sun::star::chart2::data::XRangeXMLConversion, 73 ::com::sun::star::beans::XPropertySet, 74 ::com::sun::star::lang::XServiceInfo>, 75 SfxListener 76 { 77 public: 78 79 explicit ScChart2DataProvider( ScDocument* pDoc ); 80 virtual ~ScChart2DataProvider(); 81 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 82 83 // XDataProvider --------------------------------------------------------- 84 85 virtual ::sal_Bool SAL_CALL createDataSourcePossible( 86 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments ) 87 throw (::com::sun::star::uno::RuntimeException); 88 89 virtual ::com::sun::star::uno::Reference< 90 ::com::sun::star::chart2::data::XDataSource > SAL_CALL createDataSource( 91 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments ) 92 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); 93 94 virtual ::com::sun::star::uno::Sequence< 95 ::com::sun::star::beans::PropertyValue > SAL_CALL detectArguments( 96 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource >& xDataSource ) 97 throw (::com::sun::star::uno::RuntimeException); 98 99 virtual ::sal_Bool SAL_CALL createDataSequenceByRangeRepresentationPossible( 100 const ::rtl::OUString& aRangeRepresentation ) 101 throw (::com::sun::star::uno::RuntimeException); 102 103 virtual ::com::sun::star::uno::Reference< 104 ::com::sun::star::chart2::data::XDataSequence > SAL_CALL createDataSequenceByRangeRepresentation( 105 const ::rtl::OUString& aRangeRepresentation ) 106 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); 107 108 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XRangeSelection > SAL_CALL getRangeSelection() 109 throw (::com::sun::star::uno::RuntimeException); 110 111 /* virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > SAL_CALL getNumberFormatsSupplier() 112 throw (::com::sun::star::uno::RuntimeException);*/ 113 114 // XRangeXMLConversion --------------------------------------------------- 115 116 virtual ::rtl::OUString SAL_CALL convertRangeToXML( const ::rtl::OUString& sRangeRepresentation ) 117 throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException ); 118 119 virtual ::rtl::OUString SAL_CALL convertRangeFromXML( const ::rtl::OUString& sXMLRange ) 120 throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException ); 121 122 // XPropertySet ---------------------------------------------------------- 123 124 virtual ::com::sun::star::uno::Reference< 125 ::com::sun::star::beans::XPropertySetInfo> SAL_CALL 126 getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException); 127 128 virtual void SAL_CALL setPropertyValue( 129 const ::rtl::OUString& rPropertyName, 130 const ::com::sun::star::uno::Any& rValue) 131 throw( ::com::sun::star::beans::UnknownPropertyException, 132 ::com::sun::star::beans::PropertyVetoException, 133 ::com::sun::star::lang::IllegalArgumentException, 134 ::com::sun::star::lang::WrappedTargetException, 135 ::com::sun::star::uno::RuntimeException); 136 137 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 138 const ::rtl::OUString& rPropertyName) 139 throw( ::com::sun::star::beans::UnknownPropertyException, 140 ::com::sun::star::lang::WrappedTargetException, 141 ::com::sun::star::uno::RuntimeException); 142 143 virtual void SAL_CALL addPropertyChangeListener( 144 const ::rtl::OUString& rPropertyName, 145 const ::com::sun::star::uno::Reference< 146 ::com::sun::star::beans::XPropertyChangeListener>& xListener) 147 throw( ::com::sun::star::beans::UnknownPropertyException, 148 ::com::sun::star::lang::WrappedTargetException, 149 ::com::sun::star::uno::RuntimeException); 150 151 virtual void SAL_CALL removePropertyChangeListener( 152 const ::rtl::OUString& rPropertyName, 153 const ::com::sun::star::uno::Reference< 154 ::com::sun::star::beans::XPropertyChangeListener>& rListener) 155 throw( ::com::sun::star::beans::UnknownPropertyException, 156 ::com::sun::star::lang::WrappedTargetException, 157 ::com::sun::star::uno::RuntimeException); 158 159 virtual void SAL_CALL addVetoableChangeListener( 160 const ::rtl::OUString& rPropertyName, 161 const ::com::sun::star::uno::Reference< 162 ::com::sun::star::beans::XVetoableChangeListener>& rListener) 163 throw( ::com::sun::star::beans::UnknownPropertyException, 164 ::com::sun::star::lang::WrappedTargetException, 165 ::com::sun::star::uno::RuntimeException); 166 167 virtual void SAL_CALL removeVetoableChangeListener( 168 const ::rtl::OUString& rPropertyName, 169 const ::com::sun::star::uno::Reference< 170 ::com::sun::star::beans::XVetoableChangeListener>& rListener) 171 throw( ::com::sun::star::beans::UnknownPropertyException, 172 ::com::sun::star::lang::WrappedTargetException, 173 ::com::sun::star::uno::RuntimeException); 174 175 // XServiceInfo ---------------------------------------------------------- 176 177 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( 178 ::com::sun::star::uno::RuntimeException); 179 180 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& 181 rServiceName) throw( ::com::sun::star::uno::RuntimeException); 182 183 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL 184 getSupportedServiceNames() throw( 185 ::com::sun::star::uno::RuntimeException); 186 187 private: 188 189 ScDocument* m_pDocument; 190 SfxItemPropertySet m_aPropSet; 191 sal_Bool m_bIncludeHiddenCells; 192 }; 193 194 195 // DataSource ================================================================ 196 197 class ScChart2DataSource : public 198 ::cppu::WeakImplHelper2< 199 ::com::sun::star::chart2::data::XDataSource, 200 ::com::sun::star::lang::XServiceInfo>, 201 SfxListener 202 { 203 public: 204 205 explicit ScChart2DataSource( ScDocument* pDoc); 206 virtual ~ScChart2DataSource(); 207 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 208 209 // XDataSource ----------------------------------------------------------- 210 211 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< 212 ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL 213 getDataSequences() throw (::com::sun::star::uno::RuntimeException); 214 215 // XServiceInfo ---------------------------------------------------------- 216 217 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( 218 ::com::sun::star::uno::RuntimeException); 219 220 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& 221 rServiceName) throw( ::com::sun::star::uno::RuntimeException); 222 223 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL 224 getSupportedServiceNames() throw( 225 ::com::sun::star::uno::RuntimeException); 226 227 // implementation 228 229 void AddLabeledSequence(const com::sun::star::uno::Reference < com::sun::star::chart2::data::XLabeledDataSequence >& xNew); 230 231 private: 232 233 ScDocument* m_pDocument; 234 typedef std::list < com::sun::star::uno::Reference< com::sun::star::chart2::data::XLabeledDataSequence > > LabeledList; 235 LabeledList m_aLabeledSequences; 236 237 }; 238 239 240 // DataSequence ============================================================== 241 242 class ScChart2DataSequence : public 243 ::cppu::WeakImplHelper7< 244 ::com::sun::star::chart2::data::XDataSequence, 245 ::com::sun::star::chart2::data::XTextualDataSequence, 246 ::com::sun::star::chart2::data::XNumericalDataSequence, 247 ::com::sun::star::util::XCloneable, 248 ::com::sun::star::util::XModifyBroadcaster, 249 ::com::sun::star::beans::XPropertySet, 250 // ::com::sun::star::lang::XUnoTunnel, 251 ::com::sun::star::lang::XServiceInfo>, 252 SfxListener 253 { 254 public: 255 explicit ScChart2DataSequence( ScDocument* pDoc, 256 const com::sun::star::uno::Reference< com::sun::star::chart2::data::XDataProvider >& xDP, 257 ::std::vector<ScSharedTokenRef>* pTokens, bool bIncludeHiddenCells ); 258 259 virtual ~ScChart2DataSequence(); 260 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 261 262 // XDataSequence --------------------------------------------------------- 263 264 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > 265 SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException); 266 virtual ::rtl::OUString SAL_CALL getSourceRangeRepresentation() 267 throw (::com::sun::star::uno::RuntimeException); 268 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > 269 SAL_CALL generateLabel(::com::sun::star::chart2::data::LabelOrigin nOrigin) 270 throw (::com::sun::star::uno::RuntimeException); 271 virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex( ::sal_Int32 nIndex ) 272 throw (::com::sun::star::lang::IndexOutOfBoundsException, 273 ::com::sun::star::uno::RuntimeException); 274 275 // XNumericalDataSequence -------------------------------------------------- 276 277 virtual ::com::sun::star::uno::Sequence< double > 278 SAL_CALL getNumericalData( ) throw (::com::sun::star::uno::RuntimeException); 279 280 // XTextualDataSequence -------------------------------------------------- 281 282 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > 283 SAL_CALL getTextualData( ) throw (::com::sun::star::uno::RuntimeException); 284 285 // XPropertySet ---------------------------------------------------------- 286 287 virtual ::com::sun::star::uno::Reference< 288 ::com::sun::star::beans::XPropertySetInfo> SAL_CALL 289 getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException); 290 291 virtual void SAL_CALL setPropertyValue( 292 const ::rtl::OUString& rPropertyName, 293 const ::com::sun::star::uno::Any& rValue) 294 throw( ::com::sun::star::beans::UnknownPropertyException, 295 ::com::sun::star::beans::PropertyVetoException, 296 ::com::sun::star::lang::IllegalArgumentException, 297 ::com::sun::star::lang::WrappedTargetException, 298 ::com::sun::star::uno::RuntimeException); 299 300 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 301 const ::rtl::OUString& rPropertyName) 302 throw( ::com::sun::star::beans::UnknownPropertyException, 303 ::com::sun::star::lang::WrappedTargetException, 304 ::com::sun::star::uno::RuntimeException); 305 306 virtual void SAL_CALL addPropertyChangeListener( 307 const ::rtl::OUString& rPropertyName, 308 const ::com::sun::star::uno::Reference< 309 ::com::sun::star::beans::XPropertyChangeListener>& xListener) 310 throw( ::com::sun::star::beans::UnknownPropertyException, 311 ::com::sun::star::lang::WrappedTargetException, 312 ::com::sun::star::uno::RuntimeException); 313 314 virtual void SAL_CALL removePropertyChangeListener( 315 const ::rtl::OUString& rPropertyName, 316 const ::com::sun::star::uno::Reference< 317 ::com::sun::star::beans::XPropertyChangeListener>& rListener) 318 throw( ::com::sun::star::beans::UnknownPropertyException, 319 ::com::sun::star::lang::WrappedTargetException, 320 ::com::sun::star::uno::RuntimeException); 321 322 virtual void SAL_CALL addVetoableChangeListener( 323 const ::rtl::OUString& rPropertyName, 324 const ::com::sun::star::uno::Reference< 325 ::com::sun::star::beans::XVetoableChangeListener>& rListener) 326 throw( ::com::sun::star::beans::UnknownPropertyException, 327 ::com::sun::star::lang::WrappedTargetException, 328 ::com::sun::star::uno::RuntimeException); 329 330 virtual void SAL_CALL removeVetoableChangeListener( 331 const ::rtl::OUString& rPropertyName, 332 const ::com::sun::star::uno::Reference< 333 ::com::sun::star::beans::XVetoableChangeListener>& rListener) 334 throw( ::com::sun::star::beans::UnknownPropertyException, 335 ::com::sun::star::lang::WrappedTargetException, 336 ::com::sun::star::uno::RuntimeException); 337 338 // XCloneable ------------------------------------------------------------ 339 340 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() 341 throw (::com::sun::star::uno::RuntimeException); 342 343 // XModifyBroadcaster ---------------------------------------------------- 344 345 virtual void SAL_CALL addModifyListener( 346 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) 347 throw (::com::sun::star::uno::RuntimeException); 348 virtual void SAL_CALL removeModifyListener( 349 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) 350 throw (::com::sun::star::uno::RuntimeException); 351 352 // XServiceInfo ---------------------------------------------------------- 353 354 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( 355 ::com::sun::star::uno::RuntimeException); 356 357 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& 358 rServiceName) throw( ::com::sun::star::uno::RuntimeException); 359 360 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL 361 getSupportedServiceNames() throw( 362 ::com::sun::star::uno::RuntimeException); 363 364 // XUnoTunnel ------------------------------------------------------------ 365 366 // virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< 367 // sal_Int8 >& aIdentifier ) 368 // throw(::com::sun::star::uno::RuntimeException); 369 370 // static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); 371 // static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference< 372 // com::sun::star::uno::XInterface> xObj ); 373 374 private: 375 void setDataChangedHint(bool b); 376 377 // Implementation -------------------------------------------------------- 378 379 void RefChanged(); 380 DECL_LINK( ValueListenerHdl, SfxHint* ); 381 382 private: 383 ScChart2DataSequence(); // disabled 384 ScChart2DataSequence(const ScChart2DataSequence& r); // disabled 385 386 class ExternalRefListener : public ScExternalRefManager::LinkListener 387 { 388 public: 389 ExternalRefListener(ScChart2DataSequence& rParent, ScDocument* pDoc); 390 virtual ~ExternalRefListener(); 391 virtual void notify(sal_uInt16 nFileId, ScExternalRefManager::LinkUpdateType eType); 392 void addFileId(sal_uInt16 nFileId); 393 void removeFileId(sal_uInt16 nFileId); 394 const ::std::hash_set<sal_uInt16>& getAllFileIds(); 395 396 private: 397 ExternalRefListener(); 398 ExternalRefListener(const ExternalRefListener& r); 399 400 ScChart2DataSequence& mrParent; 401 ::std::hash_set<sal_uInt16> maFileIds; 402 ScDocument* mpDoc; 403 }; 404 405 /** 406 * Build an internal data array to cache the data ranges, and other 407 * information such as hidden values. 408 */ 409 void BuildDataCache(); 410 411 void RebuildDataCache(); 412 413 sal_Int32 FillCacheFromExternalRef(const ScSharedTokenRef& pToken); 414 415 void UpdateTokensFromRanges(const ScRangeList& rRanges); 416 417 ExternalRefListener* GetExtRefListener(); 418 419 void StopListeningToAllExternalRefs(); 420 421 void CopyData(const ScChart2DataSequence& r); 422 423 private: 424 425 // data array 426 struct Item 427 { 428 double mfValue; 429 ::rtl::OUString maString; 430 bool mbIsValue; 431 Item(); 432 }; 433 434 class HiddenRangeListener : public ScChartHiddenRangeListener 435 { 436 public: 437 HiddenRangeListener(ScChart2DataSequence& rParent); 438 virtual ~HiddenRangeListener(); 439 440 virtual void notify(); 441 442 private: 443 ScChart2DataSequence& mrParent; 444 }; 445 446 ::std::list<Item> m_aDataArray; 447 448 /** 449 * Cached data for getData. We may also need to cache data for the 450 * numerical and textural data series if they turn out to be bottlenecks 451 * under certain scenarios. 452 */ 453 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_aMixedDataCache; 454 455 ::com::sun::star::uno::Sequence<sal_Int32> m_aHiddenValues; 456 457 // properties 458 ::com::sun::star::chart2::data::DataSequenceRole m_aRole; 459 sal_Bool m_bIncludeHiddenCells; 460 461 // internals 462 typedef ::std::auto_ptr< ::std::vector<ScSharedTokenRef> > TokenListPtr; 463 typedef ::std::auto_ptr< ::std::vector<sal_uInt32> > RangeIndexMapPtr; 464 typedef ::std::auto_ptr<ExternalRefListener> ExtRefListenerPtr; 465 466 sal_Int64 m_nObjectId; 467 ScDocument* m_pDocument; 468 TokenListPtr m_pTokens; 469 RangeIndexMapPtr m_pRangeIndices; 470 ExtRefListenerPtr m_pExtRefListener; 471 com::sun::star::uno::Reference < com::sun::star::chart2::data::XDataProvider > m_xDataProvider; 472 SfxItemPropertySet m_aPropSet; 473 474 ::std::auto_ptr<HiddenRangeListener> m_pHiddenListener; 475 ScLinkListener* m_pValueListener; 476 XModifyListenerArr_Impl m_aValueListeners; 477 478 bool m_bGotDataChangedHint; 479 bool m_bExtDataRebuildQueued; 480 }; 481 482 #if USE_CHART2_EMPTYDATASEQUENCE 483 // DataSequence ============================================================== 484 485 class ScChart2EmptyDataSequence : public 486 ::cppu::WeakImplHelper6< 487 ::com::sun::star::chart2::data::XDataSequence, 488 ::com::sun::star::chart2::data::XTextualDataSequence, 489 ::com::sun::star::util::XCloneable, 490 ::com::sun::star::util::XModifyBroadcaster, 491 ::com::sun::star::beans::XPropertySet, 492 // ::com::sun::star::lang::XUnoTunnel, 493 ::com::sun::star::lang::XServiceInfo>, 494 SfxListener 495 { 496 public: 497 498 explicit ScChart2EmptyDataSequence( ScDocument* pDoc, 499 const com::sun::star::uno::Reference< com::sun::star::chart2::data::XDataProvider >& xDP, 500 const ScRangeListRef& rRangeList, sal_Bool bColumn ); 501 virtual ~ScChart2EmptyDataSequence(); 502 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 503 504 // XDataSequence --------------------------------------------------------- 505 506 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > 507 SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException); 508 virtual ::rtl::OUString SAL_CALL getSourceRangeRepresentation() 509 throw (::com::sun::star::uno::RuntimeException); 510 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > 511 SAL_CALL generateLabel(::com::sun::star::chart2::data::LabelOrigin nOrigin) 512 throw (::com::sun::star::uno::RuntimeException); 513 virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex( ::sal_Int32 nIndex ) 514 throw (::com::sun::star::lang::IndexOutOfBoundsException, 515 ::com::sun::star::uno::RuntimeException); 516 517 // XTextualDataSequence -------------------------------------------------- 518 519 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > 520 SAL_CALL getTextualData( ) throw (::com::sun::star::uno::RuntimeException); 521 522 // XPropertySet ---------------------------------------------------------- 523 524 virtual ::com::sun::star::uno::Reference< 525 ::com::sun::star::beans::XPropertySetInfo> SAL_CALL 526 getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException); 527 528 virtual void SAL_CALL setPropertyValue( 529 const ::rtl::OUString& rPropertyName, 530 const ::com::sun::star::uno::Any& rValue) 531 throw( ::com::sun::star::beans::UnknownPropertyException, 532 ::com::sun::star::beans::PropertyVetoException, 533 ::com::sun::star::lang::IllegalArgumentException, 534 ::com::sun::star::lang::WrappedTargetException, 535 ::com::sun::star::uno::RuntimeException); 536 537 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 538 const ::rtl::OUString& rPropertyName) 539 throw( ::com::sun::star::beans::UnknownPropertyException, 540 ::com::sun::star::lang::WrappedTargetException, 541 ::com::sun::star::uno::RuntimeException); 542 543 virtual void SAL_CALL addPropertyChangeListener( 544 const ::rtl::OUString& rPropertyName, 545 const ::com::sun::star::uno::Reference< 546 ::com::sun::star::beans::XPropertyChangeListener>& xListener) 547 throw( ::com::sun::star::beans::UnknownPropertyException, 548 ::com::sun::star::lang::WrappedTargetException, 549 ::com::sun::star::uno::RuntimeException); 550 551 virtual void SAL_CALL removePropertyChangeListener( 552 const ::rtl::OUString& rPropertyName, 553 const ::com::sun::star::uno::Reference< 554 ::com::sun::star::beans::XPropertyChangeListener>& rListener) 555 throw( ::com::sun::star::beans::UnknownPropertyException, 556 ::com::sun::star::lang::WrappedTargetException, 557 ::com::sun::star::uno::RuntimeException); 558 559 virtual void SAL_CALL addVetoableChangeListener( 560 const ::rtl::OUString& rPropertyName, 561 const ::com::sun::star::uno::Reference< 562 ::com::sun::star::beans::XVetoableChangeListener>& rListener) 563 throw( ::com::sun::star::beans::UnknownPropertyException, 564 ::com::sun::star::lang::WrappedTargetException, 565 ::com::sun::star::uno::RuntimeException); 566 567 virtual void SAL_CALL removeVetoableChangeListener( 568 const ::rtl::OUString& rPropertyName, 569 const ::com::sun::star::uno::Reference< 570 ::com::sun::star::beans::XVetoableChangeListener>& rListener) 571 throw( ::com::sun::star::beans::UnknownPropertyException, 572 ::com::sun::star::lang::WrappedTargetException, 573 ::com::sun::star::uno::RuntimeException); 574 575 // XCloneable ------------------------------------------------------------ 576 577 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() 578 throw (::com::sun::star::uno::RuntimeException); 579 580 // XModifyBroadcaster ---------------------------------------------------- 581 582 virtual void SAL_CALL addModifyListener( 583 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) 584 throw (::com::sun::star::uno::RuntimeException); 585 virtual void SAL_CALL removeModifyListener( 586 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) 587 throw (::com::sun::star::uno::RuntimeException); 588 589 // XServiceInfo ---------------------------------------------------------- 590 591 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( 592 ::com::sun::star::uno::RuntimeException); 593 594 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& 595 rServiceName) throw( ::com::sun::star::uno::RuntimeException); 596 597 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL 598 getSupportedServiceNames() throw( 599 ::com::sun::star::uno::RuntimeException); 600 601 // XUnoTunnel ------------------------------------------------------------ 602 603 // virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< 604 // sal_Int8 >& aIdentifier ) 605 // throw(::com::sun::star::uno::RuntimeException); 606 607 // static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); 608 // static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference< 609 // com::sun::star::uno::XInterface> xObj ); 610 611 // Implementation -------------------------------------------------------- 612 GetRangeList()613 ScRangeListRef GetRangeList() { return m_xRanges; } 614 615 private: 616 617 // properties 618 ::com::sun::star::chart2::data::DataSequenceRole m_aRole; 619 sal_Bool m_bIncludeHiddenCells; 620 // internals 621 ScRangeListRef m_xRanges; 622 ScDocument* m_pDocument; 623 com::sun::star::uno::Reference < com::sun::star::chart2::data::XDataProvider > m_xDataProvider; 624 SfxItemPropertySet m_aPropSet; 625 sal_Bool m_bColumn; // defines the orientation to create the right labels 626 627 }; 628 #endif 629 630 #endif // SC_CHART2UNO_HXX 631