summaryrefslogtreecommitdiff
path: root/chart2/source/model
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-06-09 14:32:53 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-06-10 10:02:25 -0400
commitc5539bb585370f095cb6c09e38a7dd005d237295 (patch)
tree6900b98a72398334c04eddc40856799748f429fa /chart2/source/model
parent178550923533b7c015e29d957a2fc3857ba73eb3 (diff)
fdo#79676: Initialize with a default chart only from the UI.
When creating an embedded chart object during import, we don't want to create a default chart which would only mess up the chart data. With this change, ChartModel::initNew() is a no-op. Change-Id: Id29659c3885ec1e06bed26d2c851123fb63072cc
Diffstat (limited to 'chart2/source/model')
-rw-r--r--chart2/source/model/main/ChartModel.cxx6
-rw-r--r--chart2/source/model/main/ChartModel_Persistence.cxx16
2 files changed, 16 insertions, 6 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 8da9ed76c9df..833ea95df316 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -958,6 +958,12 @@ uno::Reference< beans::XPropertySet > SAL_CALL ChartModel::getPageBackground()
return m_xPageBackground;
}
+void SAL_CALL ChartModel::createDefaultChart()
+ throw (css::uno::RuntimeException, std::exception)
+{
+ insertDefaultChart();
+}
+
// ____ XTitled ____
uno::Reference< chart2::XTitle > SAL_CALL ChartModel::getTitleObject()
throw (uno::RuntimeException, std::exception)
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index ca3a2df1e2aa..87f74d7d4a54 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -385,12 +385,7 @@ void ChartModel::impl_store(
}
}
-// frame::XLoadable
-void SAL_CALL ChartModel::initNew()
- throw (frame::DoubleInitializationException,
- io::IOException,
- uno::Exception,
- uno::RuntimeException, std::exception)
+void ChartModel::insertDefaultChart()
{
lockControllers();
createInternalDataProvider( sal_False );
@@ -486,6 +481,15 @@ void SAL_CALL ChartModel::initNew()
unlockControllers();
}
+// frame::XLoadable
+void SAL_CALL ChartModel::initNew()
+ throw (frame::DoubleInitializationException,
+ io::IOException,
+ uno::Exception,
+ uno::RuntimeException, std::exception)
+{
+}
+
void SAL_CALL ChartModel::load(
const Sequence< beans::PropertyValue >& rMediaDescriptor )
throw (frame::DoubleInitializationException,