diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-15 01:35:45 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-15 01:42:09 +0100 |
commit | fbaad98be26889bd0e278093f95a14bdb13786b6 (patch) | |
tree | 6ee49cbf5e6471b57ef55a065212625bb448a0dc | |
parent | b0434a2a6d9bd4730710a19aec5ddbea83014809 (diff) |
forgot the file
Change-Id: I90a001b354810daefd6cd05ca96de4207eee15aa
-rw-r--r-- | sc/source/filter/chart/chart_imp.cxx | 42 |
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: */ |