Branch libreoffice-5-0-4
[LibreOffice.git] / include / xmloff / SettingsExportHelper.hxx
blob97cacb5dbba6fdfc652978fba99e009a4bbf335d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_XMLOFF_SETTINGSEXPORTHELPER_HXX
21 #define INCLUDED_XMLOFF_SETTINGSEXPORTHELPER_HXX
23 #include <xmloff/dllapi.h>
25 #include <com/sun/star/awt/Rectangle.hpp>
26 #include <com/sun/star/formula/SymbolDescriptor.hpp>
27 #include <com/sun/star/util/XStringSubstitution.hpp>
28 #include <xmloff/xmlexp.hxx>
30 namespace com
32 namespace sun { namespace star {
33 namespace container { class XNameAccess; class XIndexAccess; }
34 namespace util { struct DateTime; }
35 } }
38 namespace xmloff
40 class XMLSettingsExportContext;
43 class XMLOFF_DLLPUBLIC XMLSettingsExportHelper
45 ::xmloff::XMLSettingsExportContext& m_rContext;
47 ::com::sun::star::uno::Reference< ::com::sun::star::util::XStringSubstitution > mxStringSubsitution;
49 const OUString msPrinterIndependentLayout;
50 const OUString msColorTableURL;
51 const OUString msLineEndTableURL;
52 const OUString msHatchTableURL;
53 const OUString msDashTableURL;
54 const OUString msGradientTableURL;
55 const OUString msBitmapTableURL;
57 void ManipulateSetting( com::sun::star::uno::Any& rAny, const OUString& rName ) const;
59 void CallTypeFunction(const com::sun::star::uno::Any& rAny,
60 const OUString& rName) const;
62 void exportBool(const bool bValue, const OUString& rName) const;
63 static void exportByte(const sal_Int8 nValue, const OUString& rName);
64 void exportShort(const sal_Int16 nValue, const OUString& rName) const;
65 void exportInt(const sal_Int32 nValue, const OUString& rName) const;
66 void exportLong(const sal_Int64 nValue, const OUString& rName) const;
67 void exportDouble(const double fValue, const OUString& rName) const;
68 void exportString(const OUString& sValue, const OUString& rName) const;
69 void exportDateTime(const com::sun::star::util::DateTime& aValue, const OUString& rName) const;
70 void exportSequencePropertyValue(
71 const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps,
72 const OUString& rName) const;
73 void exportbase64Binary(
74 const com::sun::star::uno::Sequence<sal_Int8>& aProps,
75 const OUString& rName) const;
76 void exportMapEntry(const com::sun::star::uno::Any& rAny,
77 const OUString& rName,
78 const bool bNameAccess) const;
79 void exportNameAccess(
80 const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>& rNamed,
81 const OUString& rName) const;
82 void exportIndexAccess(
83 const com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess>& rIndexed,
84 const OUString& rName) const;
86 void exportSymbolDescriptors(
87 const com::sun::star::uno::Sequence < com::sun::star::formula::SymbolDescriptor > &rProps,
88 const OUString& rName) const;
89 void exportForbiddenCharacters(
90 const com::sun::star::uno::Any &rAny,
91 const OUString& rName) const;
93 public:
94 XMLSettingsExportHelper( ::xmloff::XMLSettingsExportContext& i_rContext );
95 ~XMLSettingsExportHelper();
97 void exportAllSettings(
98 const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps,
99 const OUString& rName) const;
102 #endif
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */