LibreOffice Module xmloff (master) 1
xmlprmap.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_XMLOFF_XMLPRMAP_HXX
21#define INCLUDED_XMLOFF_XMLPRMAP_HXX
22
23#include <xmloff/dllapi.h>
24#include <unotools/saveopt.hxx>
25#include <rtl/ustring.hxx>
26
28#include <memory>
29
30namespace rtl { template <class reference_type> class Reference; }
31
36struct XMLPropertyState;
37
39{
40 struct Impl;
41
42 std::unique_ptr<Impl> mpImpl;
43
46
47public:
55 const XMLPropertyMapEntry* pEntries,
57 bool bForExport );
58
59 virtual ~XMLPropertySetMapper() override;
60
61 void AddMapperEntry( const rtl::Reference < XMLPropertySetMapper >& rMapper );
62
64 sal_Int32 GetEntryCount() const;
65
67 sal_uInt32 GetEntryFlags( sal_Int32 nIndex ) const;
68
70 sal_uInt32 GetEntryType( sal_Int32 nIndex ) const;
71
73 sal_uInt16 GetEntryNameSpace( sal_Int32 nIndex ) const;
74
76 const OUString& GetEntryXMLName( sal_Int32 nIndex ) const;
77
79 const OUString& GetEntryAPIName( sal_Int32 nIndex ) const;
80
82 sal_Int16 GetEntryContextId( sal_Int32 nIndex ) const;
83
88 SvtSaveOptions::ODFSaneDefaultVersion GetEarliestODFVersionForExport(sal_Int32 nIndex) const;
89
92 sal_Int32 GetEntryIndex(
93 sal_uInt16 nNamespace, std::u16string_view rStrName, sal_uInt32 nPropType,
94 sal_Int32 nStartAt = -1 ) const;
95
98 sal_Int32 GetEntryIndex(
99 sal_Int32 nElement, sal_uInt32 nPropType,
100 sal_Int32 nStartAt = -1 ) const;
101
103 const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nIndex ) const;
104
107 bool exportXML(
108 OUString& rStrExpValue, const XMLPropertyState& rProperty,
109 const SvXMLUnitConverter& rUnitConverter ) const;
110
111 bool importXML(
112 const OUString& rStrImpValue, XMLPropertyState& rProperty,
113 const SvXMLUnitConverter& rUnitConverter ) const;
114
116 sal_Int32 FindEntryIndex(
117 const char* sApiName, sal_uInt16 nNameSpace, std::u16string_view sXMLName ) const;
118
120 sal_Int32 FindEntryIndex( const sal_Int16 nContextId ) const;
121
123 void RemoveEntry( sal_Int32 nIndex );
124};
125
126#endif // INCLUDED_XMLOFF_XMLPRMAP_HXX
127
128/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:83
This class is a base-class to create XMLPropertyHandler.
Definition: prhdlfac.hxx:41
Abstract base-class for different XML-types.
Definition: xmlprhdl.hxx:36
std::unique_ptr< Impl > mpImpl
Definition: xmlprmap.hxx:40
XMLPropertySetMapper(const XMLPropertySetMapper &)=delete
void operator=(SimpleReferenceObject) SAL_DELETED_FUNCTION
#define XMLOFF_DLLPUBLIC
Definition: dllapi.h:29
XMLOFF_DLLPUBLIC bool importXML(css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, css::uno::Any &rValue, OUString &rStrName, SvXMLImport &rImport)
XMLOFF_DLLPUBLIC void exportXML(OUString const &rStrName, css::uno::Any const &rValue, SvXMLExport &rExport)
Reference
Represents a property with its API-name, its XML-name and the type of its value.
Definition: maptype.hxx:32
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:140
static const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType)
Definition: txtprhdl.cxx:1240