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_SOURCE_TEXT_XMLINDEXMARKEXPORT_HXX
21 #define INCLUDED_XMLOFF_SOURCE_TEXT_XMLINDEXMARKEXPORT_HXX
23 #include <rtl/ustrbuf.hxx>
24 #include <com/sun/star/uno/Reference.h>
27 namespace com::sun::star
{
28 namespace beans
{ class XPropertySet
; }
33 * This class handles the export of index marks for table of content,
34 * alphabetical and user index.
36 * Marks for bibliography indices are internally modelled as text
37 * fields and thus handled in txtparae.cxx
39 class XMLIndexMarkExport
41 static constexpr OUStringLiteral gsLevel
= u
"Level";
42 static constexpr OUStringLiteral gsUserIndexName
= u
"UserIndexName";
43 static constexpr OUStringLiteral gsPrimaryKey
= u
"PrimaryKey";
44 static constexpr OUStringLiteral gsSecondaryKey
= u
"SecondaryKey";
45 static constexpr OUStringLiteral gsDocumentIndexMark
= u
"DocumentIndexMark";
46 static constexpr OUStringLiteral gsIsStart
= u
"IsStart";
47 static constexpr OUStringLiteral gsIsCollapsed
= u
"IsCollapsed";
48 static constexpr OUStringLiteral gsAlternativeText
= u
"AlternativeText";
49 static constexpr OUStringLiteral gsTextReading
= u
"TextReading";
50 static constexpr OUStringLiteral gsPrimaryKeyReading
= u
"PrimaryKeyReading";
51 static constexpr OUStringLiteral gsSecondaryKeyReading
= u
"SecondaryKeyReading";
52 static constexpr OUStringLiteral gsMainEntry
= u
"IsMainEntry";
57 explicit XMLIndexMarkExport(SvXMLExport
& rExp
);
59 ~XMLIndexMarkExport();
62 * export by the property set of its *text* *portion*.
64 * The text portion supplies us with the properties of the index
65 * mark itself, as well as the information whether we are at the
66 * start or end of an index mark, or whether the index mark is
70 const css::uno::Reference
<css::beans::XPropertySet
> & rPropSet
,
75 /// export attributes of table-of-content index marks
76 void ExportTOCMarkAttributes(
77 const css::uno::Reference
<css::beans::XPropertySet
> & rPropSet
);
79 /// export attributes of user index marks
80 void ExportUserIndexMarkAttributes(
81 const css::uno::Reference
<css::beans::XPropertySet
> & rPropSet
);
83 /// export attributes of alphabetical index marks
84 void ExportAlphabeticalIndexMarkAttributes(
85 const css::uno::Reference
<css::beans::XPropertySet
> & rPropSet
);
87 /// create a numerical ID for this index mark
88 /// (represented by its properties)
90 OUStringBuffer
& sBuffer
,
91 const css::uno::Reference
<css::beans::XPropertySet
> & rPropSet
);
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */