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_SETTINGSEXPORTHELPER_HXX 29 #define _XMLOFF_SETTINGSEXPORTHELPER_HXX 30 31 #include "xmloff/dllapi.h" 32 33 #include <com/sun/star/awt/Rectangle.hpp> 34 #include <com/sun/star/formula/SymbolDescriptor.hpp> 35 #include <com/sun/star/util/XStringSubstitution.hpp> 36 #include <xmloff/xmlexp.hxx> 37 38 namespace com 39 { 40 namespace sun { namespace star { 41 namespace container { class XNameAccess; class XIndexAccess; } 42 namespace util { struct DateTime; } 43 } } 44 } 45 46 namespace xmloff 47 { 48 class XMLSettingsExportContext; 49 } 50 51 class XMLOFF_DLLPUBLIC XMLSettingsExportHelper 52 { 53 ::xmloff::XMLSettingsExportContext& m_rContext; 54 55 ::com::sun::star::uno::Reference< ::com::sun::star::util::XStringSubstitution > mxStringSubsitution; 56 57 const rtl::OUString msPrinterIndependentLayout; 58 const rtl::OUString msColorTableURL; 59 const rtl::OUString msLineEndTableURL; 60 const rtl::OUString msHatchTableURL; 61 const rtl::OUString msDashTableURL; 62 const rtl::OUString msGradientTableURL; 63 const rtl::OUString msBitmapTableURL; 64 65 void ManipulateSetting( com::sun::star::uno::Any& rAny, const rtl::OUString& rName ) const; 66 67 void CallTypeFunction(const com::sun::star::uno::Any& rAny, 68 const rtl::OUString& rName) const; 69 70 void exportBool(const sal_Bool bValue, const rtl::OUString& rName) const; 71 void exportByte(const sal_Int8 nValue, const rtl::OUString& rName) const; 72 void exportShort(const sal_Int16 nValue, const rtl::OUString& rName) const; 73 void exportInt(const sal_Int32 nValue, const rtl::OUString& rName) const; 74 void exportLong(const sal_Int64 nValue, const rtl::OUString& rName) const; 75 void exportDouble(const double fValue, const rtl::OUString& rName) const; 76 void exportString(const rtl::OUString& sValue, const rtl::OUString& rName) const; 77 void exportDateTime(const com::sun::star::util::DateTime& aValue, const rtl::OUString& rName) const; 78 void exportSequencePropertyValue( 79 const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps, 80 const rtl::OUString& rName) const; 81 void exportbase64Binary( 82 const com::sun::star::uno::Sequence<sal_Int8>& aProps, 83 const rtl::OUString& rName) const; 84 void exportMapEntry(const com::sun::star::uno::Any& rAny, 85 const rtl::OUString& rName, 86 const sal_Bool bNameAccess) const; 87 void exportNameAccess( 88 const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>& aNamed, 89 const rtl::OUString& rName) const; 90 void exportIndexAccess( 91 const com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> aIndexed, 92 const rtl::OUString rName) const; 93 94 void exportSymbolDescriptors( 95 const com::sun::star::uno::Sequence < com::sun::star::formula::SymbolDescriptor > &rProps, 96 const rtl::OUString rName) const; 97 void exportForbiddenCharacters( 98 const com::sun::star::uno::Any &rAny, 99 const rtl::OUString rName) const; 100 101 public: 102 XMLSettingsExportHelper( ::xmloff::XMLSettingsExportContext& i_rContext ); 103 ~XMLSettingsExportHelper(); 104 105 void exportAllSettings( 106 const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps, 107 const rtl::OUString& rName) const; 108 }; 109 110 #endif 111 112