LCOV - code coverage report
Current view: top level - sc/inc - xmlwrap.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 2 3 66.7 %
Date: 2014-11-03 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SC_INC_XMLWRAP_HXX
      21             : #define INCLUDED_SC_INC_XMLWRAP_HXX
      22             : 
      23             : #include <com/sun/star/uno/Reference.hxx>
      24             : #include <com/sun/star/uno/Sequence.hxx>
      25             : #include <com/sun/star/frame/XModel.hpp>
      26             : #include "importfilterdata.hxx"
      27             : #include <sal/types.h>
      28             : 
      29             : #include <tools/errcode.hxx>
      30             : 
      31             : namespace com { namespace sun { namespace star {
      32             :     namespace beans { struct PropertyValue; }
      33             :     namespace frame { class XModel; }
      34             :     namespace task { class XStatusIndicator; }
      35             :     namespace lang { class XMultiServiceFactory; }
      36             :     namespace uno { class XInterface; }
      37             :     namespace embed { class XStorage; }
      38             :     namespace xml {
      39             :         namespace sax { struct InputSource; class XParser; class XWriter; } }
      40             : } } }
      41             : 
      42             : class ScDocument;
      43             : class SfxMedium;
      44             : class ScMySharedData;
      45             : class ScDocShell;
      46             : 
      47         314 : class ScXMLImportWrapper
      48             : {
      49             :     sc::ImportPostProcessData maPostProcessData;
      50             : 
      51             :     ScDocShell& mrDocShell;
      52             :     ScDocument&     rDoc;
      53             :     SfxMedium*      pMedium;
      54             :     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > xStorage;
      55             : 
      56             :     com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator();
      57             : 
      58             :     sal_uInt32 ImportFromComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext,
      59             :         com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
      60             :         com::sun::star::uno::Reference<com::sun::star::xml::sax::XParser>& xParser,
      61             :         com::sun::star::xml::sax::InputSource& aParserInput,
      62             :         const OUString& sComponentName, const OUString& sDocName, const OUString& sOldDocName,
      63             :         com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
      64             :         bool bMustBeSuccessfull);
      65             : 
      66             :     bool ExportToComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext,
      67             :         com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
      68             :         com::sun::star::uno::Reference<com::sun::star::xml::sax::XWriter>& xWriter,
      69             :         com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aDescriptor,
      70             :         const OUString& sName, const OUString& sMediaType, const OUString& sComponentName,
      71             :         com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
      72             :         ScMySharedData*& pSharedData);
      73             : 
      74             : public:
      75             : 
      76             :     static const sal_uInt8 STYLES   = 0x01;
      77             :     static const sal_uInt8 CONTENT  = 0x02;
      78             :     static const sal_uInt8 METADATA = 0x04;
      79             :     static const sal_uInt8 SETTINGS = 0x08;
      80             :     static const sal_uInt8 ALL      = STYLES | CONTENT | METADATA | SETTINGS;
      81             : 
      82             :     ScXMLImportWrapper(
      83             :         ScDocShell& rDocSh, SfxMedium* pM, const css::uno::Reference<css::embed::XStorage>& xStor );
      84             : 
      85             :     bool Import( sal_uInt8 nMode, ErrCode& rError );
      86             :     bool Export(bool bStylesOnly);
      87             : 
      88         266 :     const sc::ImportPostProcessData& GetImportPostProcessData() const { return maPostProcessData;}
      89             : };
      90             : 
      91           0 : class ScXMLChartExportWrapper
      92             : {
      93             : public:
      94             :     ScXMLChartExportWrapper( com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel, SfxMedium& rMed );
      95             :     bool Export();
      96             : 
      97             : private:
      98             :     com::sun::star::uno::Reference< com::sun::star::frame::XModel > mxModel;
      99             :     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > mxStorage;
     100             :     SfxMedium& mrMedium;
     101             : };
     102             : 
     103             : #endif
     104             : 
     105             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10