Update ooo320-m1
[ooovba.git] / xmloff / source / text / XMLIndexMarkExport.hxx
blobf31b6fecfbaa3f86bc6c25c5302144b9220259ec
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMLIndexMarkExport.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _XMLOFF_XMLINDEXMARKEXPORT_HXX_
32 #define _XMLOFF_XMLINDEXMARKEXPORT_HXX_
34 #include <rtl/ustrbuf.hxx>
35 #include <com/sun/star/uno/Reference.h>
36 #include <com/sun/star/uno/Sequence.h>
38 class SvXMLExport;
39 class XMLTextParagraphExport;
40 namespace com { namespace sun { namespace star {
41 namespace beans { class XPropertySet; }
42 } } }
43 namespace rtl {
44 class OUString;
45 class OUStringBuffer;
49 /**
50 * This class handles the export of index marks for table of content,
51 * alphabetical and user index.
53 * Marks for bibliography indices are internally modelled as text
54 * fields and thus handled in txtparae.cxx
56 class XMLIndexMarkExport
58 ::rtl::OUString sLevel;
59 ::rtl::OUString sUserIndexName;
60 ::rtl::OUString sPrimaryKey;
61 ::rtl::OUString sSecondaryKey;
62 ::rtl::OUString sDocumentIndexMark;
63 ::rtl::OUString sIsStart;
64 ::rtl::OUString sIsCollapsed;
65 ::rtl::OUString sAlternativeText;
66 ::rtl::OUString sTextReading;
67 ::rtl::OUString sPrimaryKeyReading;
68 ::rtl::OUString sSecondaryKeyReading;
69 ::rtl::OUString sMainEntry;
72 SvXMLExport& rExport;
73 XMLTextParagraphExport& rParaExport;
75 public:
76 XMLIndexMarkExport(SvXMLExport& rExp,
77 XMLTextParagraphExport& rParaExp);
79 ~XMLIndexMarkExport();
81 /**
82 * export by the property set of its *text* *portion*.
84 * The text portion supplies us with the properties of the index
85 * mark itself, as well as the information whether we are at the
86 * start or end of an index mark, or whether the index mark is
87 * collapsed.
89 void ExportIndexMark(
90 const ::com::sun::star::uno::Reference<
91 ::com::sun::star::beans::XPropertySet> & rPropSet,
92 sal_Bool bAutoStyles);
94 protected:
96 /// export attributes of table-of-content index marks
97 void ExportTOCMarkAttributes(
98 const ::com::sun::star::uno::Reference<
99 ::com::sun::star::beans::XPropertySet> & rPropSet);
101 /// export attributes of user index marks
102 void ExportUserIndexMarkAttributes(
103 const ::com::sun::star::uno::Reference<
104 ::com::sun::star::beans::XPropertySet> & rPropSet);
106 /// export attributes of alphabetical index marks
107 void ExportAlphabeticalIndexMarkAttributes(
108 const ::com::sun::star::uno::Reference<
109 ::com::sun::star::beans::XPropertySet> & rPropSet);
111 /// create a numerical ID for this index mark
112 /// (represented by its properties)
113 void GetID(
114 ::rtl::OUStringBuffer& sBuffer,
115 const ::com::sun::star::uno::Reference<
116 ::com::sun::star::beans::XPropertySet> & rPropSet);
120 #endif