summaryrefslogtreecommitdiff
path: root/sw/source/uibase/table/tablemgr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/table/tablemgr.cxx')
-rw-r--r--sw/source/uibase/table/tablemgr.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index 280f76d86f54..8f5ca04fc678 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -20,6 +20,7 @@
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/beans/PropertyState.hpp>
#include <sot/storage.hxx>
@@ -229,7 +230,14 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
{
xChartModel.set( xCompSupp->getComponent(), uno::UNO_QUERY );
if( xChartModel.is() )
+ {
+ // Create a default chart type.
+ uno::Reference<chart2::XChartDocument> xChartDoc(xChartModel, uno::UNO_QUERY);
+ if (xChartDoc.is())
+ xChartDoc->createDefaultChart();
+
xChartModel->lockControllers(); //#i79578# don't request a new replacement image for charts to often - block change notifications
+ }
}
// set the table name at the OLE-node