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 _XMLOFF_FORMS_OFFICEFORMS_HXX_ 29 #define _XMLOFF_FORMS_OFFICEFORMS_HXX_ 30 31 #include "formattributes.hxx" 32 #include <xmloff/xmlictxt.hxx> 33 #include "logging.hxx" 34 35 class SvXMLElementExport; 36 class SvXMLExport; 37 38 //......................................................................... 39 namespace xmloff 40 { 41 //......................................................................... 42 43 //===================================================================== 44 //= OFormsRootImport 45 //===================================================================== 46 class OFormsRootImport 47 :public SvXMLImportContext 48 ,public OStackedLogging 49 { 50 public: 51 TYPEINFO(); 52 53 OFormsRootImport( SvXMLImport& _rImport, sal_uInt16 _nPrfx, const rtl::OUString& _rLocalName); 54 virtual ~OFormsRootImport(); 55 56 // SvXMLImportContext overriabled 57 virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, 58 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 59 virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttrList ); 60 virtual void EndElement(); 61 62 protected: 63 void implImportBool( 64 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttributes, 65 OfficeFormsAttributes _eAttribute, 66 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxProps, 67 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >& _rxPropInfo, 68 const ::rtl::OUString& _rPropName, 69 sal_Bool _bDefault 70 ); 71 }; 72 73 //===================================================================== 74 //= OFormsRootExport 75 //===================================================================== 76 class OFormsRootExport 77 { 78 private: 79 SvXMLElementExport* m_pImplElement; 80 81 public: 82 OFormsRootExport( SvXMLExport& _rExp ); 83 ~OFormsRootExport(); 84 85 private: 86 void addModelAttributes(SvXMLExport& _rExp) SAL_THROW(()); 87 88 void implExportBool( 89 SvXMLExport& _rExp, 90 OfficeFormsAttributes _eAttribute, 91 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxProps, 92 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >& _rxPropInfo, 93 const ::rtl::OUString& _rPropName, 94 sal_Bool _bDefault 95 ); 96 }; 97 98 //......................................................................... 99 } // namespace xmloff 100 //......................................................................... 101 102 #endif // _XMLOFF_FORMS_OFFICEFORMS_HXX_ 103 104 105