[Libreoffice-commits] core.git: sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Thu Mar 14 17:43:33 PDT 2013
sc/source/filter/chart/chart_imp.cxx | 42 +++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
New commits:
commit fbaad98be26889bd0e278093f95a14bdb13786b6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Mar 15 01:35:45 2013 +0100
forgot the file
Change-Id: I90a001b354810daefd6cd05ca96de4207eee15aa
diff --git a/sc/source/filter/chart/chart_imp.cxx b/sc/source/filter/chart/chart_imp.cxx
new file mode 100644
index 0000000..00975e7
--- /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: */
More information about the Libreoffice-commits
mailing list