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_XMLINDEXSOURCEBASECONTEXT_HXX
21 #define INCLUDED_XMLOFF_SOURCE_TEXT_XMLINDEXSOURCEBASECONTEXT_HXX
23 #include <xmloff/xmlictxt.hxx>
24 #include <com/sun/star/uno/Reference.h>
25 #include <rtl/ustring.hxx>
28 namespace com
{ namespace sun
{ namespace star
{
29 namespace xml
{ namespace sax
{ class XAttributeList
; } }
30 namespace beans
{ class XPropertySet
; }
33 enum IndexSourceParamEnum
35 XML_TOK_INDEXSOURCE_OUTLINE_LEVEL
,
36 XML_TOK_INDEXSOURCE_USE_INDEX_MARKS
,
37 XML_TOK_INDEXSOURCE_INDEX_SCOPE
,
38 XML_TOK_INDEXSOURCE_RELATIVE_TABS
,
39 XML_TOK_INDEXSOURCE_USE_OTHER_OBJECTS
,
40 XML_TOK_INDEXSOURCE_USE_SHEET
,
41 XML_TOK_INDEXSOURCE_USE_CHART
,
42 XML_TOK_INDEXSOURCE_USE_DRAW
,
43 XML_TOK_INDEXSOURCE_USE_IMAGE
,
44 XML_TOK_INDEXSOURCE_USE_MATH
,
45 XML_TOK_INDEXSOURCE_MAIN_ENTRY_STYLE
,
46 XML_TOK_INDEXSOURCE_IGNORE_CASE
,
47 XML_TOK_INDEXSOURCE_SEPARATORS
,
48 XML_TOK_INDEXSOURCE_COMBINE_ENTRIES
,
49 XML_TOK_INDEXSOURCE_COMBINE_WITH_DASH
,
50 XML_TOK_INDEXSOURCE_KEYS_AS_ENTRIES
,
51 XML_TOK_INDEXSOURCE_COMBINE_WITH_PP
,
52 XML_TOK_INDEXSOURCE_CAPITALIZE
,
53 XML_TOK_INDEXSOURCE_USE_OBJECTS
,
54 XML_TOK_INDEXSOURCE_USE_GRAPHICS
,
55 XML_TOK_INDEXSOURCE_USE_TABLES
,
56 XML_TOK_INDEXSOURCE_USE_FRAMES
,
57 XML_TOK_INDEXSOURCE_COPY_OUTLINE_LEVELS
,
58 XML_TOK_INDEXSOURCE_USE_CAPTION
,
59 XML_TOK_INDEXSOURCE_SEQUENCE_NAME
,
60 XML_TOK_INDEXSOURCE_SEQUENCE_FORMAT
,
61 XML_TOK_INDEXSOURCE_COMMA_SEPARATED
,
62 XML_TOK_INDEXSOURCE_USE_INDEX_SOURCE_STYLES
,
63 XML_TOK_INDEXSOURCE_SORT_ALGORITHM
,
64 XML_TOK_INDEXSOURCE_RFC_LANGUAGE_TAG
,
65 XML_TOK_INDEXSOURCE_LANGUAGE
,
66 XML_TOK_INDEXSOURCE_SCRIPT
,
67 XML_TOK_INDEXSOURCE_COUNTRY
,
68 XML_TOK_INDEXSOURCE_USER_INDEX_NAME
,
69 XML_TOK_INDEXSOURCE_USE_OUTLINE_LEVEL
74 * Superclass for index source elements
76 class XMLIndexSourceBaseContext
: public SvXMLImportContext
78 const OUString sCreateFromChapter
;
79 const OUString sIsRelativeTabstops
;
81 bool bUseLevelFormats
;
83 bool bChapterIndex
; /// chapter-wise or document index?
84 bool bRelativeTabs
; /// tab stops relative to margin or indent?
88 /// property set of index; must be accessible to subclasses
89 ::com::sun::star::uno::Reference
<
90 ::com::sun::star::beans::XPropertySet
> & rIndexPropertySet
;
96 XMLIndexSourceBaseContext(
99 const OUString
& rLocalName
,
100 ::com::sun::star::uno::Reference
<
101 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
104 virtual ~XMLIndexSourceBaseContext();
108 virtual void StartElement(
109 const ::com::sun::star::uno::Reference
<
110 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
) SAL_OVERRIDE
;
112 virtual void ProcessAttribute(
113 enum IndexSourceParamEnum eParam
,
114 const OUString
& rValue
);
116 virtual void EndElement() SAL_OVERRIDE
;
118 virtual SvXMLImportContext
* CreateChildContext(
120 const OUString
& rLocalName
,
121 const ::com::sun::star::uno::Reference
<
122 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
) SAL_OVERRIDE
;
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */