1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SC_XMLWRAP_HXX 29 #define SC_XMLWRAP_HXX 30 31 #include <tools/solar.h> 32 #include <com/sun/star/uno/Reference.hxx> 33 #include <com/sun/star/uno/Sequence.hxx> 34 35 class ScDocument; 36 class SfxMedium; 37 class ScMySharedData; 38 39 #include <tools/errcode.hxx> 40 41 namespace com { namespace sun { namespace star { 42 namespace beans { struct PropertyValue; } 43 namespace frame { class XModel; } 44 namespace task { class XStatusIndicator; } 45 namespace lang { class XMultiServiceFactory; } 46 namespace uno { class XInterface; } 47 namespace embed { class XStorage; } 48 namespace xml { 49 namespace sax { struct InputSource; } } 50 } } } 51 52 class ScXMLImportWrapper 53 { 54 ScDocument& rDoc; 55 SfxMedium* pMedium; 56 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > xStorage; 57 58 //UNUSED2008-05 com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator( 59 //UNUSED2008-05 com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rModel); 60 com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator(); 61 62 sal_uInt32 ImportFromComponent(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory, 63 com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel, 64 com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& xXMLParser, 65 com::sun::star::xml::sax::InputSource& aParserInput, 66 const rtl::OUString& sComponentName, const rtl::OUString& sDocName, const rtl::OUString& sOldDocName, 67 com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs, 68 sal_Bool bMustBeSuccessfull); 69 70 sal_Bool ExportToComponent(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory, 71 com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel, 72 com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& xWriter, 73 com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aDescriptor, 74 const rtl::OUString& sName, const rtl::OUString& sMediaType, const rtl::OUString& sComponentName, 75 const sal_Bool bPlainText, com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs, 76 ScMySharedData*& pSharedData); 77 78 public: 79 ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >&); 80 sal_Bool Import(sal_Bool bStylesOnly, ErrCode& ); 81 sal_Bool Export(sal_Bool bStylesOnly); 82 }; 83 84 #endif 85 86