diff options
Diffstat (limited to 'sw/source/core/doc/docchart.cxx')
-rw-r--r-- | sw/source/core/doc/docchart.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx index 9d3d3db0989b..196fda16d6b7 100644 --- a/sw/source/core/doc/docchart.cxx +++ b/sw/source/core/doc/docchart.cxx @@ -23,6 +23,7 @@ #include <doc.hxx> #include <IDocumentChartDataProviderAccess.hxx> #include <IDocumentState.hxx> +#include <IDocumentLayoutAccess.hxx> #include <docary.hxx> #include <ndindex.hxx> #include <swtable.hxx> @@ -86,8 +87,7 @@ bool SwTable::IsTblComplexForChart( const OUString& rSelection ) const void SwDoc::DoUpdateAllCharts() { - SwViewShell* pVSh; - GetEditShell( &pVSh ); + SwViewShell* pVSh = getIDocumentLayoutAccess().GetCurrentViewShell(); if( pVSh ) { const SwFrmFmts& rTblFmts = *GetTblFrmFmts(); @@ -107,7 +107,7 @@ void SwDoc::DoUpdateAllCharts() } } -void SwDoc::_UpdateCharts( const SwTable& rTbl, SwViewShell& rVSh ) const +void SwDoc::_UpdateCharts( const SwTable& rTbl, SwViewShell const & rVSh ) const { OUString aName( rTbl.GetFrmFmt()->GetName() ); SwOLENode *pONd; @@ -135,8 +135,7 @@ void SwDoc::UpdateCharts( const OUString &rName ) const SwTable* pTmpTbl = SwTable::FindTable( FindTblFmtByName( rName ) ); if( pTmpTbl ) { - SwViewShell* pVSh; - GetEditShell( &pVSh ); + SwViewShell const * pVSh = getIDocumentLayoutAccess().GetCurrentViewShell(); if( pVSh ) _UpdateCharts( *pTmpTbl, *pVSh ); @@ -176,9 +175,6 @@ void SwDoc::SetTableName( SwFrmFmt& rTblFmt, const OUString &rNewName ) { pNd->SetChartTblName( rNewName ); - SwViewShell* pVSh; - GetEditShell( &pVSh ); - SwTable* pTable = SwTable::FindTable( &rTblFmt ); SwChartDataProvider *pPCD = getIDocumentChartDataProviderAccess().GetChartDataProvider(); if (pPCD) |