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 .
22 #include <rtl/ustrbuf.hxx>
23 #include <com/sun/star/uno/Reference.h>
26 namespace com::sun::star
{
27 namespace beans
{ class XPropertySet
; }
32 * This class handles the export of index marks for table of content,
33 * alphabetical and user index.
35 * Marks for bibliography indices are internally modelled as text
36 * fields and thus handled in txtparae.cxx
38 class XMLIndexMarkExport
40 static constexpr OUString gsLevel
= u
"Level"_ustr
;
41 static constexpr OUString gsUserIndexName
= u
"UserIndexName"_ustr
;
42 static constexpr OUString gsPrimaryKey
= u
"PrimaryKey"_ustr
;
43 static constexpr OUString gsSecondaryKey
= u
"SecondaryKey"_ustr
;
44 static constexpr OUString gsDocumentIndexMark
= u
"DocumentIndexMark"_ustr
;
45 static constexpr OUString gsIsStart
= u
"IsStart"_ustr
;
46 static constexpr OUString gsIsCollapsed
= u
"IsCollapsed"_ustr
;
47 static constexpr OUString gsAlternativeText
= u
"AlternativeText"_ustr
;
48 static constexpr OUString gsTextReading
= u
"TextReading"_ustr
;
49 static constexpr OUString gsPrimaryKeyReading
= u
"PrimaryKeyReading"_ustr
;
50 static constexpr OUString gsSecondaryKeyReading
= u
"SecondaryKeyReading"_ustr
;
51 static constexpr OUString gsMainEntry
= u
"IsMainEntry"_ustr
;
56 explicit XMLIndexMarkExport(SvXMLExport
& rExp
);
59 * export by the property set of its *text* *portion*.
61 * The text portion supplies us with the properties of the index
62 * mark itself, as well as the information whether we are at the
63 * start or end of an index mark, or whether the index mark is
67 const css::uno::Reference
<css::beans::XPropertySet
> & rPropSet
,
72 /// export attributes of table-of-content index marks
73 void ExportTOCMarkAttributes(
74 const css::uno::Reference
<css::beans::XPropertySet
> & rPropSet
);
76 /// export attributes of user index marks
77 void ExportUserIndexMarkAttributes(
78 const css::uno::Reference
<css::beans::XPropertySet
> & rPropSet
);
80 /// export attributes of alphabetical index marks
81 void ExportAlphabeticalIndexMarkAttributes(
82 const css::uno::Reference
<css::beans::XPropertySet
> & rPropSet
);
84 /// create a numerical ID for this index mark
85 /// (represented by its properties)
87 OUStringBuffer
& sBuffer
,
88 const css::uno::Reference
<css::beans::XPropertySet
> & rPropSet
);
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */