From fbaad98be26889bd0e278093f95a14bdb13786b6 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Fri, 15 Mar 2013 01:35:45 +0100 Subject: forgot the file Change-Id: I90a001b354810daefd6cd05ca96de4207eee15aa --- sc/source/filter/chart/chart_imp.cxx | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sc/source/filter/chart/chart_imp.cxx 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 +#include "xmlwrap.hxx" + +#include +#include +#include + +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 xServiceFactory(comphelper::getProcessServiceFactory()); + uno::Reference xContext(comphelper::getProcessComponentContext()); + OSL_ENSURE( xServiceFactory.is(), "got no service manager" ); + if( !xServiceFactory.is() ) + return false; + + //uno::Reference 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: */ -- cgit v1.2.3