xref: /AOO41X/main/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx (revision ecfe53c5d1886e1e0d215b0d140d05282ab1c477)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _XMLOFF_XMLINDEXALPHABETICALSOURCECONTEXT_HXX_
25 #define _XMLOFF_XMLINDEXALPHABETICALSOURCECONTEXT_HXX_
26 
27 #include "XMLIndexSourceBaseContext.hxx"
28 #include <com/sun/star/uno/Reference.h>
29 #include <com/sun/star/lang/Locale.hpp>
30 
31 
32 namespace com { namespace sun { namespace star {
33     namespace xml { namespace sax { class XAttributeList; } }
34     namespace beans { class XPropertySet; }
35 } } }
36 namespace rtl { class OUString; }
37 
38 
39 /**
40  * Import alphabetical (keyword) index source element
41  */
42 class XMLIndexAlphabeticalSourceContext : public XMLIndexSourceBaseContext
43 {
44     const ::rtl::OUString sMainEntryCharacterStyleName;
45     const ::rtl::OUString sUseAlphabeticalSeparators;
46     const ::rtl::OUString sUseCombinedEntries;
47     const ::rtl::OUString sIsCaseSensitive;
48     const ::rtl::OUString sUseKeyAsEntry;
49     const ::rtl::OUString sUseUpperCase;
50     const ::rtl::OUString sUseDash;
51     const ::rtl::OUString sUsePP;
52     const ::rtl::OUString sIsCommaSeparated;
53     const ::rtl::OUString sSortAlgorithm;
54     const ::rtl::OUString sLocale;
55 
56     ::com::sun::star::lang::Locale aLocale;
57     ::rtl::OUString sAlgorithm;
58 
59     ::rtl::OUString sMainEntryStyleName;
60     sal_Bool bMainEntryStyleNameOK;
61 
62     sal_Bool bSeparators;
63     sal_Bool bCombineEntries;
64     sal_Bool bCaseSensitive;
65     sal_Bool bEntry;
66     sal_Bool bUpperCase;
67     sal_Bool bCombineDash;
68     sal_Bool bCombinePP;
69     sal_Bool bCommaSeparated;
70 
71 public:
72 
73     TYPEINFO();
74 
75     XMLIndexAlphabeticalSourceContext(
76         SvXMLImport& rImport,
77         sal_uInt16 nPrfx,
78         const ::rtl::OUString& rLocalName,
79         ::com::sun::star::uno::Reference<
80             ::com::sun::star::beans::XPropertySet> & rPropSet);
81 
82     ~XMLIndexAlphabeticalSourceContext();
83 
84 protected:
85 
86     virtual void ProcessAttribute(
87         enum IndexSourceParamEnum eParam,
88         const ::rtl::OUString& rValue);
89 
90     virtual void EndElement();
91 
92     virtual SvXMLImportContext* CreateChildContext(
93         sal_uInt16 nPrefix,
94         const ::rtl::OUString& rLocalName,
95         const ::com::sun::star::uno::Reference<
96             ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
97 };
98 
99 #endif
100