diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/chartlis.hxx | 30 | ||||
-rw-r--r-- | sc/source/core/tool/chartlis.cxx | 36 | ||||
-rw-r--r-- | sc/source/filter/excel/xichart.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/inc/xichart.hxx | 25 |
4 files changed, 47 insertions, 48 deletions
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index fef859f4b7de..aa8434bf861e 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -76,9 +76,9 @@ private: ScChartUnoData* pUnoData; ScDocument* pDoc; - sal_Bool bUsed; // for ScChartListenerCollection::FreeUnused - sal_Bool bDirty; - sal_Bool bSeriesRangesScheduled; + bool bUsed; // for ScChartListenerCollection::FreeUnused + bool bDirty; + bool bSeriesRangesScheduled; // not implemented ScChartListener& operator=( const ScChartListener& ); @@ -99,34 +99,34 @@ public: com::sun::star::uno::Reference< com::sun::star::chart::XChartDataChangeEventListener > GetUnoListener() const; com::sun::star::uno::Reference< com::sun::star::chart::XChartData > GetUnoSource() const; - sal_Bool IsUno() const { return (pUnoData != NULL); } + bool IsUno() const { return (pUnoData != NULL); } virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint ); void StartListeningTo(); void EndListeningTo(); void ChangeListening( const ScRangeListRef& rRangeListRef, - sal_Bool bDirty = false ); + bool bDirty = false ); void Update(); ScRangeListRef GetRangeList() const; void SetRangeList( const ScRangeListRef& rNew ); void SetRangeList( const ScRange& rNew ); - sal_Bool IsUsed() const { return bUsed; } - void SetUsed( sal_Bool bFlg ) { bUsed = bFlg; } - sal_Bool IsDirty() const { return bDirty; } - void SetDirty( sal_Bool bFlg ) { bDirty = bFlg; } + bool IsUsed() const { return bUsed; } + void SetUsed( bool bFlg ) { bUsed = bFlg; } + bool IsDirty() const { return bDirty; } + void SetDirty( bool bFlg ) { bDirty = bFlg; } void UpdateChartIntersecting( const ScRange& rRange ); // if chart series ranges are to be updated later on (e.g. DeleteTab, InsertTab) - void ScheduleSeriesRanges() { bSeriesRangesScheduled = sal_True; } + void ScheduleSeriesRanges() { bSeriesRangesScheduled = true; } void UpdateScheduledSeriesRanges(); void UpdateSeriesRanges(); ExternalRefListener* GetExtRefListener(); void SetUpdateQueue(); - sal_Bool operator==( const ScChartListener& ); - sal_Bool operator!=( const ScChartListener& r ) + bool operator==( const ScChartListener& ); + bool operator!=( const ScChartListener& r ) { return !operator==( r ); } }; @@ -177,7 +177,7 @@ public: void ChangeListening( const String& rName, const ScRangeListRef& rRangeListRef, - sal_Bool bDirty = sal_False ); + bool bDirty = false ); // use FreeUnused only the way it's used in ScDocument::UpdateChartListenerCollection void FreeUnused(); void FreeUno( const com::sun::star::uno::Reference< com::sun::star::chart::XChartDataChangeEventListener >& rListener, @@ -186,14 +186,14 @@ public: void UpdateDirtyCharts(); void SC_DLLPUBLIC SetDirty(); void SetDiffDirty( const ScChartListenerCollection&, - sal_Bool bSetChartRangeLists = false ); + bool bSetChartRangeLists = false ); void SetRangeDirty( const ScRange& rRange ); // for example rows/columns void UpdateScheduledSeriesRanges(); void UpdateChartsContainingTab( SCTAB nTab ); - sal_Bool operator==( const ScChartListenerCollection& ); + bool operator==( const ScChartListenerCollection& ); /** * Start listening on hide/show change within specified cell range. A diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index 2fa1ede0b851..8c52fe48e297 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -375,13 +375,13 @@ void ScChartListener::EndListeningTo() void ScChartListener::ChangeListening( const ScRangeListRef& rRangeListRef, - sal_Bool bDirtyP ) + bool bDirtyP ) { EndListeningTo(); SetRangeList( rRangeListRef ); StartListeningTo(); if ( bDirtyP ) - SetDirty( sal_True ); + SetDirty( true ); } @@ -429,7 +429,7 @@ void ScChartListener::SetUpdateQueue() pDoc->GetChartListenerCollection()->StartTimer(); } -sal_Bool ScChartListener::operator==( const ScChartListener& r ) +bool ScChartListener::operator==( const ScChartListener& r ) { bool b1 = (mpTokens.get() && !mpTokens->empty()); bool b2 = (r.mpTokens.get() && !r.mpTokens->empty()); @@ -503,7 +503,7 @@ void ScChartListenerCollection::StartAllListeners() } void ScChartListenerCollection::ChangeListening( const String& rName, - const ScRangeListRef& rRangeListRef, sal_Bool bDirty ) + const ScRangeListRef& rRangeListRef, bool bDirty ) { ScChartListener aCLSearcher( rName, pDoc, rRangeListRef ); ScChartListener* pCL; @@ -521,7 +521,7 @@ void ScChartListenerCollection::ChangeListening( const String& rName, } pCL->StartListeningTo(); if ( bDirty ) - pCL->SetDirty( sal_True ); + pCL->SetDirty( true ); } void ScChartListenerCollection::FreeUnused() @@ -594,21 +594,21 @@ void ScChartListenerCollection::SetDirty() for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ ) { ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ]; - pCL->SetDirty( sal_True ); + pCL->SetDirty( true ); } StartTimer(); } void ScChartListenerCollection::SetDiffDirty( - const ScChartListenerCollection& rCmp, sal_Bool bSetChartRangeLists ) + const ScChartListenerCollection& rCmp, bool bSetChartRangeLists ) { - sal_Bool bDirty = false; + bool bDirty = false; for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ ) { ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ]; sal_uInt16 nFound; - sal_Bool bFound = rCmp.Search( pCL, nFound ); + bool bFound = rCmp.Search( pCL, nFound ); if ( !bFound || (*pCL != *((const ScChartListener*) rCmp.pItems[ nFound ])) ) { if ( bSetChartRangeLists ) @@ -618,16 +618,16 @@ void ScChartListenerCollection::SetDiffDirty( const ScRangeListRef& rList1 = pCL->GetRangeList(); const ScRangeListRef& rList2 = ((const ScChartListener*) rCmp.pItems[ nFound ])->GetRangeList(); - sal_Bool b1 = rList1.Is(); - sal_Bool b2 = rList2.Is(); + bool b1 = rList1.Is(); + bool b2 = rList2.Is(); if ( b1 != b2 || (b1 && b2 && (*rList1 != *rList2)) ) pDoc->SetChartRangeList( pCL->GetString(), rList1 ); } else pDoc->SetChartRangeList( pCL->GetString(), pCL->GetRangeList() ); } - bDirty = sal_True; - pCL->SetDirty( sal_True ); + bDirty = true; + pCL->SetDirty( true ); } } if ( bDirty ) @@ -637,15 +637,15 @@ void ScChartListenerCollection::SetDiffDirty( void ScChartListenerCollection::SetRangeDirty( const ScRange& rRange ) { - sal_Bool bDirty = false; + bool bDirty = false; for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ ) { ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ]; const ScRangeListRef& rList = pCL->GetRangeList(); if ( rList.Is() && rList->Intersects( rRange ) ) { - bDirty = sal_True; - pCL->SetDirty( sal_True ); + bDirty = true; + pCL->SetDirty( true ); } } if ( bDirty ) @@ -682,7 +682,7 @@ void ScChartListenerCollection::UpdateChartsContainingTab( SCTAB nTab ) } -sal_Bool ScChartListenerCollection::operator==( const ScChartListenerCollection& r ) +bool ScChartListenerCollection::operator==( const ScChartListenerCollection& r ) { // hier nicht ScStrCollection::operator==() verwenden, der umstaendlich via // IsEqual und Compare laeuft, stattdessen ScChartListener::operator==() @@ -694,7 +694,7 @@ sal_Bool ScChartListenerCollection::operator==( const ScChartListenerCollection& *((ScChartListener*) r.pItems[ nIndex ]) ) return false; } - return sal_True; + return true; } void ScChartListenerCollection::StartListeningHiddenRange( const ScRange& rRange, ScChartHiddenRangeListener* pListener ) diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 6324ca6de2eb..f2ffc76aca3f 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -276,7 +276,7 @@ Color XclImpChRoot::GetSeriesFillAutoColor( sal_uInt16 nFormatIdx ) const return ScfTools::GetMixedColor( aColor, rPal.GetColor( EXC_COLOR_CHWINDOWBACK ), nTrans ); } -void XclImpChRoot::InitConversion( Reference< XChartDocument > xChartDoc, const Rectangle& rChartRect ) const +void XclImpChRoot::InitConversion( const Reference<XChartDocument>& xChartDoc, const Rectangle& rChartRect ) const { // create formatting object tables mxChData->InitConversion( GetRoot(), xChartDoc, rChartRect ); @@ -3879,7 +3879,7 @@ bool XclImpChChart::IsManualPlotArea() const return (GetBiff() <= EXC_BIFF5) || ::get_flag( maProps.mnFlags, EXC_CHPROPS_USEMANPLOTAREA ); } -void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, +void XclImpChChart::Convert( const Reference<XChartDocument>& xChartDoc, XclImpDffConverter& rDffConv, const OUString& rObjName, const Rectangle& rChartRect ) const { // initialize conversion (locks the model to suppress any internal updates) diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index a9440ee6d8ea..83716c48e4c8 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -94,9 +94,6 @@ class ScTokenArray; class XclImpChRoot : public XclImpRoot { public: - typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > XChartDocRef; - -public: explicit XclImpChRoot( const XclImpRoot& rRoot, XclImpChChart& rChartData ); virtual ~XclImpChRoot(); @@ -119,7 +116,10 @@ public: Color GetSeriesFillAutoColor( sal_uInt16 nFormatIdx ) const; /** Starts the API chart document conversion. Must be called once before all API conversion. */ - void InitConversion( XChartDocRef xChartDoc, const Rectangle& rChartRect ) const; + void InitConversion( + const ::com::sun::star::uno::Reference< + com::sun::star::chart2::XChartDocument>& xChartDoc, const Rectangle& rChartRect ) const; + /** Finishes the API chart document conversion. Must be called once after all API conversion. */ void FinishConversion( XclImpDffConverter& rDffConv ) const; @@ -1373,10 +1373,6 @@ typedef boost::shared_ptr< XclImpChAxesSet > XclImpChAxesSetRef; class XclImpChChart : public XclImpChGroupBase, protected XclImpChRoot { public: - typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > XChartDocRef; - typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > XDiagramRef; - -public: explicit XclImpChChart( const XclImpRoot& rRoot ); virtual ~XclImpChChart(); @@ -1402,10 +1398,12 @@ public: inline sal_Size GetProgressSize() const { return 2 * EXC_CHART_PROGRESS_SIZE; } /** Converts and writes all properties to the passed chart. */ - void Convert( XChartDocRef xChartDoc, - XclImpDffConverter& rDffConv, - const ::rtl::OUString& rObjName, - const Rectangle& rChartRect ) const; + void Convert( + const ::com::sun::star::uno::Reference< + com::sun::star::chart2::XChartDocument>& xChartDoc, + XclImpDffConverter& rDffConv, + const ::rtl::OUString& rObjName, + const Rectangle& rChartRect ) const; private: /** Reads a CHSERIES group (data series source and formatting). */ @@ -1427,7 +1425,8 @@ private: void FinalizeTitle(); /** Creates and returns a new diagram object and converts global chart settings. */ - XDiagramRef CreateDiagram() const; + com::sun::star::uno::Reference<com::sun::star::chart2::XDiagram> + CreateDiagram() const; private: typedef ::std::vector< XclImpChSeriesRef > XclImpChSeriesVec; |