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 <xmloff/dllapi.h>
25 #include <com/sun/star/uno/Reference.hxx>
27 namespace com
{ namespace sun
{ namespace star
{ namespace beans
{ struct PropertyValue
; } } } }
28 namespace com
{ namespace sun
{ namespace star
{ namespace formula
{ struct SymbolDescriptor
; } } } }
29 namespace com
{ namespace sun
{ namespace star
{ namespace util
{ class XStringSubstitution
; } } } }
33 namespace sun
{ namespace star
{
34 namespace container
{ class XNameAccess
; class XIndexAccess
; }
35 namespace util
{ struct DateTime
; }
41 class XMLSettingsExportContext
;
44 class XMLOFF_DLLPUBLIC XMLSettingsExportHelper
46 ::xmloff::XMLSettingsExportContext
& m_rContext
;
48 css::uno::Reference
< css::util::XStringSubstitution
> mxStringSubsitution
;
50 void ManipulateSetting( css::uno::Any
& rAny
, const OUString
& rName
) const;
52 void CallTypeFunction(const css::uno::Any
& rAny
,
53 const OUString
& rName
) const;
55 void exportBool(const bool bValue
, const OUString
& rName
) const;
56 static void exportByte();
57 void exportShort(const sal_Int16 nValue
, const OUString
& rName
) const;
58 void exportInt(const sal_Int32 nValue
, const OUString
& rName
) const;
59 void exportLong(const sal_Int64 nValue
, const OUString
& rName
) const;
60 void exportDouble(const double fValue
, const OUString
& rName
) const;
61 void exportString(const OUString
& sValue
, const OUString
& rName
) const;
62 void exportDateTime(const css::util::DateTime
& aValue
, const OUString
& rName
) const;
63 void exportSequencePropertyValue(
64 const css::uno::Sequence
<css::beans::PropertyValue
>& aProps
,
65 const OUString
& rName
) const;
66 void exportbase64Binary(
67 const css::uno::Sequence
<sal_Int8
>& aProps
,
68 const OUString
& rName
) const;
69 void exportMapEntry(const css::uno::Any
& rAny
,
70 const OUString
& rName
,
71 const bool bNameAccess
) const;
72 void exportNameAccess(
73 const css::uno::Reference
<css::container::XNameAccess
>& rNamed
,
74 const OUString
& rName
) const;
75 void exportIndexAccess(
76 const css::uno::Reference
<css::container::XIndexAccess
>& rIndexed
,
77 const OUString
& rName
) const;
79 void exportSymbolDescriptors(
80 const css::uno::Sequence
< css::formula::SymbolDescriptor
> &rProps
,
81 const OUString
& rName
) const;
82 void exportForbiddenCharacters(
83 const css::uno::Any
&rAny
,
84 const OUString
& rName
) const;
87 XMLSettingsExportHelper( ::xmloff::XMLSettingsExportContext
& i_rContext
);
88 ~XMLSettingsExportHelper();
90 void exportAllSettings(
91 const css::uno::Sequence
<css::beans::PropertyValue
>& aProps
,
92 const OUString
& rName
) const;
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */