bump product version to 5.0.4.1
[LibreOffice.git] / xmloff / source / text / XMLIndexMarkExport.hxx
blob5bb2521533bba595c553d4567a15df6f234bd688
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
25 #include <com/sun/star/uno/Sequence.h>
27 class SvXMLExport;
28 namespace com { namespace sun { namespace star {
29 namespace beans { class XPropertySet; }
30 } } }
33 /**
34 * This class handles the export of index marks for table of content,
35 * alphabetical and user index.
37 * Marks for bibliography indices are internally modelled as text
38 * fields and thus handled in txtparae.cxx
40 class XMLIndexMarkExport
42 OUString sLevel;
43 OUString sUserIndexName;
44 OUString sPrimaryKey;
45 OUString sSecondaryKey;
46 OUString sDocumentIndexMark;
47 OUString sIsStart;
48 OUString sIsCollapsed;
49 OUString sAlternativeText;
50 OUString sTextReading;
51 OUString sPrimaryKeyReading;
52 OUString sSecondaryKeyReading;
53 OUString sMainEntry;
56 SvXMLExport& rExport;
58 public:
59 XMLIndexMarkExport(SvXMLExport& rExp);
61 ~XMLIndexMarkExport();
63 /**
64 * export by the property set of its *text* *portion*.
66 * The text portion supplies us with the properties of the index
67 * mark itself, as well as the information whether we are at the
68 * start or end of an index mark, or whether the index mark is
69 * collapsed.
71 void ExportIndexMark(
72 const ::com::sun::star::uno::Reference<
73 ::com::sun::star::beans::XPropertySet> & rPropSet,
74 bool bAutoStyles);
76 protected:
78 /// export attributes of table-of-content index marks
79 void ExportTOCMarkAttributes(
80 const ::com::sun::star::uno::Reference<
81 ::com::sun::star::beans::XPropertySet> & rPropSet);
83 /// export attributes of user index marks
84 void ExportUserIndexMarkAttributes(
85 const ::com::sun::star::uno::Reference<
86 ::com::sun::star::beans::XPropertySet> & rPropSet);
88 /// export attributes of alphabetical index marks
89 void ExportAlphabeticalIndexMarkAttributes(
90 const ::com::sun::star::uno::Reference<
91 ::com::sun::star::beans::XPropertySet> & rPropSet);
93 /// create a numerical ID for this index mark
94 /// (represented by its properties)
95 static void GetID(
96 OUStringBuffer& sBuffer,
97 const ::com::sun::star::uno::Reference<
98 ::com::sun::star::beans::XPropertySet> & rPropSet);
102 #endif
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */