1*ecfe53c5SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*ecfe53c5SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*ecfe53c5SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*ecfe53c5SAndrew Rist * distributed with this work for additional information 6*ecfe53c5SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*ecfe53c5SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*ecfe53c5SAndrew Rist * "License"); you may not use this file except in compliance 9*ecfe53c5SAndrew Rist * with the License. You may obtain a copy of the License at 10*ecfe53c5SAndrew Rist * 11*ecfe53c5SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*ecfe53c5SAndrew Rist * 13*ecfe53c5SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*ecfe53c5SAndrew Rist * software distributed under the License is distributed on an 15*ecfe53c5SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*ecfe53c5SAndrew Rist * KIND, either express or implied. See the License for the 17*ecfe53c5SAndrew Rist * specific language governing permissions and limitations 18*ecfe53c5SAndrew Rist * under the License. 19*ecfe53c5SAndrew Rist * 20*ecfe53c5SAndrew Rist *************************************************************/ 21*ecfe53c5SAndrew Rist 22*ecfe53c5SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _XMLOFF_SETTINGSEXPORTHELPER_HXX 25cdf0e10cSrcweir #define _XMLOFF_SETTINGSEXPORTHELPER_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "xmloff/dllapi.h" 28cdf0e10cSrcweir 29cdf0e10cSrcweir #include <com/sun/star/awt/Rectangle.hpp> 30cdf0e10cSrcweir #include <com/sun/star/formula/SymbolDescriptor.hpp> 31cdf0e10cSrcweir #include <com/sun/star/util/XStringSubstitution.hpp> 32cdf0e10cSrcweir #include <xmloff/xmlexp.hxx> 33cdf0e10cSrcweir 34cdf0e10cSrcweir namespace com 35cdf0e10cSrcweir { 36cdf0e10cSrcweir namespace sun { namespace star { 37cdf0e10cSrcweir namespace container { class XNameAccess; class XIndexAccess; } 38cdf0e10cSrcweir namespace util { struct DateTime; } 39cdf0e10cSrcweir } } 40cdf0e10cSrcweir } 41cdf0e10cSrcweir 42cdf0e10cSrcweir namespace xmloff 43cdf0e10cSrcweir { 44cdf0e10cSrcweir class XMLSettingsExportContext; 45cdf0e10cSrcweir } 46cdf0e10cSrcweir 47cdf0e10cSrcweir class XMLOFF_DLLPUBLIC XMLSettingsExportHelper 48cdf0e10cSrcweir { 49cdf0e10cSrcweir ::xmloff::XMLSettingsExportContext& m_rContext; 50cdf0e10cSrcweir 51cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::util::XStringSubstitution > mxStringSubsitution; 52cdf0e10cSrcweir 53cdf0e10cSrcweir const rtl::OUString msPrinterIndependentLayout; 54cdf0e10cSrcweir const rtl::OUString msColorTableURL; 55cdf0e10cSrcweir const rtl::OUString msLineEndTableURL; 56cdf0e10cSrcweir const rtl::OUString msHatchTableURL; 57cdf0e10cSrcweir const rtl::OUString msDashTableURL; 58cdf0e10cSrcweir const rtl::OUString msGradientTableURL; 59cdf0e10cSrcweir const rtl::OUString msBitmapTableURL; 60cdf0e10cSrcweir 61cdf0e10cSrcweir void ManipulateSetting( com::sun::star::uno::Any& rAny, const rtl::OUString& rName ) const; 62cdf0e10cSrcweir 63cdf0e10cSrcweir void CallTypeFunction(const com::sun::star::uno::Any& rAny, 64cdf0e10cSrcweir const rtl::OUString& rName) const; 65cdf0e10cSrcweir 66cdf0e10cSrcweir void exportBool(const sal_Bool bValue, const rtl::OUString& rName) const; 67cdf0e10cSrcweir void exportByte(const sal_Int8 nValue, const rtl::OUString& rName) const; 68cdf0e10cSrcweir void exportShort(const sal_Int16 nValue, const rtl::OUString& rName) const; 69cdf0e10cSrcweir void exportInt(const sal_Int32 nValue, const rtl::OUString& rName) const; 70cdf0e10cSrcweir void exportLong(const sal_Int64 nValue, const rtl::OUString& rName) const; 71cdf0e10cSrcweir void exportDouble(const double fValue, const rtl::OUString& rName) const; 72cdf0e10cSrcweir void exportString(const rtl::OUString& sValue, const rtl::OUString& rName) const; 73cdf0e10cSrcweir void exportDateTime(const com::sun::star::util::DateTime& aValue, const rtl::OUString& rName) const; 74cdf0e10cSrcweir void exportSequencePropertyValue( 75cdf0e10cSrcweir const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps, 76cdf0e10cSrcweir const rtl::OUString& rName) const; 77cdf0e10cSrcweir void exportbase64Binary( 78cdf0e10cSrcweir const com::sun::star::uno::Sequence<sal_Int8>& aProps, 79cdf0e10cSrcweir const rtl::OUString& rName) const; 80cdf0e10cSrcweir void exportMapEntry(const com::sun::star::uno::Any& rAny, 81cdf0e10cSrcweir const rtl::OUString& rName, 82cdf0e10cSrcweir const sal_Bool bNameAccess) const; 83cdf0e10cSrcweir void exportNameAccess( 84cdf0e10cSrcweir const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>& aNamed, 85cdf0e10cSrcweir const rtl::OUString& rName) const; 86cdf0e10cSrcweir void exportIndexAccess( 87cdf0e10cSrcweir const com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> aIndexed, 88cdf0e10cSrcweir const rtl::OUString rName) const; 89cdf0e10cSrcweir 90cdf0e10cSrcweir void exportSymbolDescriptors( 91cdf0e10cSrcweir const com::sun::star::uno::Sequence < com::sun::star::formula::SymbolDescriptor > &rProps, 92cdf0e10cSrcweir const rtl::OUString rName) const; 93cdf0e10cSrcweir void exportForbiddenCharacters( 94cdf0e10cSrcweir const com::sun::star::uno::Any &rAny, 95cdf0e10cSrcweir const rtl::OUString rName) const; 96cdf0e10cSrcweir 97cdf0e10cSrcweir public: 98cdf0e10cSrcweir XMLSettingsExportHelper( ::xmloff::XMLSettingsExportContext& i_rContext ); 99cdf0e10cSrcweir ~XMLSettingsExportHelper(); 100cdf0e10cSrcweir 101cdf0e10cSrcweir void exportAllSettings( 102cdf0e10cSrcweir const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps, 103cdf0e10cSrcweir const rtl::OUString& rName) const; 104cdf0e10cSrcweir }; 105cdf0e10cSrcweir 106cdf0e10cSrcweir #endif 107cdf0e10cSrcweir 108