summaryrefslogtreecommitdiff
path: root/sc/source/filter/chart/chart_imp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/chart/chart_imp.cxx')
-rw-r--r--sc/source/filter/chart/chart_imp.cxx42
1 files changed, 42 insertions, 0 deletions
diff --git a/sc/source/filter/chart/chart_imp.cxx b/sc/source/filter/chart/chart_imp.cxx
new file mode 100644
index 000000000000..00975e7387a1
--- /dev/null
+++ b/sc/source/filter/chart/chart_imp.cxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sfx2/docfile.hxx>
+#include "xmlwrap.hxx"
+
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/document/XStorageBasedDocument.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+
+using namespace com::sun::star;
+
+ScXMLChartExportWrapper::ScXMLChartExportWrapper( com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel, SfxMedium& rMed ):
+ mxModel(xModel),
+ mrMedium(rMed)
+{
+
+}
+
+bool ScXMLChartExportWrapper::Export()
+{
+ uno::Reference<lang::XMultiServiceFactory> xServiceFactory(comphelper::getProcessServiceFactory());
+ uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
+ OSL_ENSURE( xServiceFactory.is(), "got no service manager" );
+ if( !xServiceFactory.is() )
+ return false;
+
+ //uno::Reference<xml::sax::XWriter> xWriter = xml::sax::Writer::create(xContext);
+
+ if ( !mxStorage.is() )
+ mxStorage = mrMedium.GetOutputStorage();
+
+ uno::Reference< document::XStorageBasedDocument>(mxModel, uno::UNO_QUERY_THROW)->storeToStorage(mxStorage, uno::Sequence< beans::PropertyValue >() );
+ return true;
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */