1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMLIndexSourceBaseContext.hxx,v $
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_XMLINDEXSOURCEBASECONTEXT_HXX_
32 #define _XMLOFF_XMLINDEXSOURCEBASECONTEXT_HXX_
34 #include <xmloff/xmlictxt.hxx>
35 #include <com/sun/star/uno/Reference.h>
36 #include <rtl/ustring.hxx>
39 namespace com
{ namespace sun
{ namespace star
{
40 namespace xml
{ namespace sax
{ class XAttributeList
; } }
41 namespace beans
{ class XPropertySet
; }
44 enum IndexSourceParamEnum
46 XML_TOK_INDEXSOURCE_OUTLINE_LEVEL
,
47 XML_TOK_INDEXSOURCE_USE_INDEX_MARKS
,
48 XML_TOK_INDEXSOURCE_INDEX_SCOPE
,
49 XML_TOK_INDEXSOURCE_RELATIVE_TABS
,
50 XML_TOK_INDEXSOURCE_USE_OTHER_OBJECTS
,
51 XML_TOK_INDEXSOURCE_USE_SHEET
,
52 XML_TOK_INDEXSOURCE_USE_CHART
,
53 XML_TOK_INDEXSOURCE_USE_DRAW
,
54 XML_TOK_INDEXSOURCE_USE_IMAGE
,
55 XML_TOK_INDEXSOURCE_USE_MATH
,
56 XML_TOK_INDEXSOURCE_MAIN_ENTRY_STYLE
,
57 XML_TOK_INDEXSOURCE_IGNORE_CASE
,
58 XML_TOK_INDEXSOURCE_SEPARATORS
,
59 XML_TOK_INDEXSOURCE_COMBINE_ENTRIES
,
60 XML_TOK_INDEXSOURCE_COMBINE_WITH_DASH
,
61 XML_TOK_INDEXSOURCE_KEYS_AS_ENTRIES
,
62 XML_TOK_INDEXSOURCE_COMBINE_WITH_PP
,
63 XML_TOK_INDEXSOURCE_CAPITALIZE
,
64 XML_TOK_INDEXSOURCE_USE_OBJECTS
,
65 XML_TOK_INDEXSOURCE_USE_GRAPHICS
,
66 XML_TOK_INDEXSOURCE_USE_TABLES
,
67 XML_TOK_INDEXSOURCE_USE_FRAMES
,
68 XML_TOK_INDEXSOURCE_COPY_OUTLINE_LEVELS
,
69 XML_TOK_INDEXSOURCE_USE_CAPTION
,
70 XML_TOK_INDEXSOURCE_SEQUENCE_NAME
,
71 XML_TOK_INDEXSOURCE_SEQUENCE_FORMAT
,
72 XML_TOK_INDEXSOURCE_COMMA_SEPARATED
,
73 XML_TOK_INDEXSOURCE_USE_INDEX_SOURCE_STYLES
,
74 XML_TOK_INDEXSOURCE_SORT_ALGORITHM
,
75 XML_TOK_INDEXSOURCE_LANGUAGE
,
76 XML_TOK_INDEXSOURCE_COUNTRY
,
77 XML_TOK_INDEXSOURCE_USER_INDEX_NAME
,
78 XML_TOK_INDEXSOURCE_USE_OUTLINE_LEVEL
83 * Superclass for index source elements
85 class XMLIndexSourceBaseContext
: public SvXMLImportContext
87 const ::rtl::OUString sCreateFromChapter
;
88 const ::rtl::OUString sIsRelativeTabstops
;
90 sal_Bool bUseLevelFormats
;
92 sal_Bool bChapterIndex
; /// chapter-wise or document index?
93 sal_Bool bRelativeTabs
; /// tab stops relative to margin or indent?
97 /// property set of index; must be accessible to subclasses
98 ::com::sun::star::uno::Reference
<
99 ::com::sun::star::beans::XPropertySet
> & rIndexPropertySet
;
105 XMLIndexSourceBaseContext(
106 SvXMLImport
& rImport
,
108 const ::rtl::OUString
& rLocalName
,
109 ::com::sun::star::uno::Reference
<
110 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
111 sal_Bool bLevelFormats
);
113 ~XMLIndexSourceBaseContext();
117 virtual void StartElement(
118 const ::com::sun::star::uno::Reference
<
119 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
121 virtual void ProcessAttribute(
122 enum IndexSourceParamEnum eParam
,
123 const ::rtl::OUString
& rValue
);
125 virtual void EndElement();
127 virtual SvXMLImportContext
* CreateChildContext(
129 const ::rtl::OUString
& rLocalName
,
130 const ::com::sun::star::uno::Reference
<
131 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);