Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef SC_XMLSORTI_HXX
20 : #define SC_XMLSORTI_HXX
21 :
22 : #include <xmloff/xmlictxt.hxx>
23 : #include <xmloff/xmlimp.hxx>
24 : #include <xmloff/languagetagodf.hxx>
25 : #include <com/sun/star/util/SortField.hpp>
26 : #include <com/sun/star/table/CellAddress.hpp>
27 :
28 : #include "xmldrani.hxx"
29 :
30 : class ScXMLImport;
31 :
32 : class ScXMLSortContext : public SvXMLImportContext
33 : {
34 : ScXMLDatabaseRangeContext* pDatabaseRangeContext;
35 :
36 : com::sun::star::uno::Sequence <com::sun::star::util::SortField> aSortFields;
37 : com::sun::star::table::CellAddress aOutputPosition;
38 : LanguageTagODF maLanguageTagODF;
39 : OUString sAlgorithm;
40 : sal_Int16 nUserListIndex;
41 : bool bCopyOutputData;
42 : bool bBindFormatsToContent;
43 : bool bIsCaseSensitive;
44 : bool bEnabledUserList;
45 :
46 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
47 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
48 :
49 : public:
50 :
51 : ScXMLSortContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
52 : const OUString& rLName,
53 : const ::com::sun::star::uno::Reference<
54 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
55 : ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
56 :
57 : virtual ~ScXMLSortContext();
58 :
59 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
60 : const OUString& rLocalName,
61 : const ::com::sun::star::uno::Reference<
62 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
63 :
64 : virtual void EndElement() SAL_OVERRIDE;
65 :
66 : void AddSortField(const OUString& sFieldNumber, const OUString& sDataType, const OUString& sOrder);
67 : };
68 :
69 : class ScXMLSortByContext : public SvXMLImportContext
70 : {
71 : ScXMLSortContext* pSortContext;
72 :
73 : OUString sFieldNumber;
74 : OUString sDataType;
75 : OUString sOrder;
76 :
77 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
78 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
79 :
80 : public:
81 :
82 : ScXMLSortByContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
83 : const OUString& rLName,
84 : const ::com::sun::star::uno::Reference<
85 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
86 : ScXMLSortContext* pTempSortContext);
87 :
88 : virtual ~ScXMLSortByContext();
89 :
90 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
91 : const OUString& rLocalName,
92 : const ::com::sun::star::uno::Reference<
93 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
94 :
95 : virtual void EndElement() SAL_OVERRIDE;
96 : };
97 :
98 : #endif
99 :
100 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|