1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 <config_options.h>
24 #include <sal/config.h>
26 #include <string_view>
28 #include <xmloff/dllapi.h>
30 #include <com/sun/star/uno/Reference.hxx>
32 namespace com::sun::star::beans
{ struct PropertyValue
; }
33 namespace com::sun::star::formula
{ struct SymbolDescriptor
; }
34 namespace com::sun::star::util
{ class XStringSubstitution
; }
39 namespace container
{ class XNameAccess
; class XIndexAccess
; }
40 namespace util
{ struct DateTime
; }
46 class XMLSettingsExportContext
;
49 class UNLESS_MERGELIBS_MORE(XMLOFF_DLLPUBLIC
) XMLSettingsExportHelper
51 ::xmloff::XMLSettingsExportContext
& m_rContext
;
53 css::uno::Reference
< css::util::XStringSubstitution
> mxStringSubstitution
;
55 void ManipulateSetting( css::uno::Any
& rAny
, std::u16string_view rName
) const;
57 void CallTypeFunction(const css::uno::Any
& rAny
,
58 const OUString
& rName
) const;
60 void exportBool(const bool bValue
, const OUString
& rName
) const;
61 static void exportByte();
62 void exportShort(const sal_Int16 nValue
, const OUString
& rName
) const;
63 void exportInt(const sal_Int32 nValue
, const OUString
& rName
) const;
64 void exportLong(const sal_Int64 nValue
, const OUString
& rName
) const;
65 void exportDouble(const double fValue
, const OUString
& rName
) const;
66 void exportString(const OUString
& sValue
, const OUString
& rName
) const;
67 void exportDateTime(const css::util::DateTime
& aValue
, const OUString
& rName
) const;
68 void exportSequencePropertyValue(
69 const css::uno::Sequence
<css::beans::PropertyValue
>& aProps
,
70 const OUString
& rName
) const;
71 void exportbase64Binary(
72 const css::uno::Sequence
<sal_Int8
>& aProps
,
73 const OUString
& rName
) const;
74 void exportMapEntry(const css::uno::Any
& rAny
,
75 const OUString
& rName
,
76 const bool bNameAccess
) const;
77 void exportNameAccess(
78 const css::uno::Reference
<css::container::XNameAccess
>& rNamed
,
79 const OUString
& rName
) const;
80 void exportIndexAccess(
81 const css::uno::Reference
<css::container::XIndexAccess
>& rIndexed
,
82 const OUString
& rName
) const;
84 void exportSymbolDescriptors(
85 const css::uno::Sequence
< css::formula::SymbolDescriptor
> &rProps
,
86 const OUString
& rName
) const;
87 void exportForbiddenCharacters(
88 const css::uno::Any
&rAny
,
89 const OUString
& rName
) const;
92 XMLSettingsExportHelper( ::xmloff::XMLSettingsExportContext
& i_rContext
);
93 ~XMLSettingsExportHelper();
95 void exportAllSettings(
96 const css::uno::Sequence
<css::beans::PropertyValue
>& aProps
,
97 const OUString
& rName
) const;
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */