Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef SC_XMLSORTI_HXX
29 : : #define SC_XMLSORTI_HXX
30 : :
31 : : #include <xmloff/xmlictxt.hxx>
32 : : #include <xmloff/xmlimp.hxx>
33 : : #include <com/sun/star/util/SortField.hpp>
34 : : #include <com/sun/star/table/CellAddress.hpp>
35 : :
36 : : #include "xmldrani.hxx"
37 : :
38 : : class ScXMLImport;
39 : :
40 : : class ScXMLSortContext : public SvXMLImportContext
41 : : {
42 : : ScXMLDatabaseRangeContext* pDatabaseRangeContext;
43 : :
44 : : com::sun::star::uno::Sequence <com::sun::star::util::SortField> aSortFields;
45 : : com::sun::star::table::CellAddress aOutputPosition;
46 : : rtl::OUString sCountry;
47 : : rtl::OUString sLanguage;
48 : : rtl::OUString sAlgorithm;
49 : : sal_Int16 nUserListIndex;
50 : : bool bCopyOutputData;
51 : : bool bBindFormatsToContent;
52 : : bool bIsCaseSensitive;
53 : : bool bEnabledUserList;
54 : :
55 : : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
56 : 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
57 : :
58 : : public:
59 : :
60 : : ScXMLSortContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
61 : : const ::rtl::OUString& rLName,
62 : : const ::com::sun::star::uno::Reference<
63 : : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
64 : : ScXMLDatabaseRangeContext* pTempDatabaseRangeContext);
65 : :
66 : : virtual ~ScXMLSortContext();
67 : :
68 : : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
69 : : const ::rtl::OUString& rLocalName,
70 : : const ::com::sun::star::uno::Reference<
71 : : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
72 : :
73 : : virtual void EndElement();
74 : :
75 : : void AddSortField(const rtl::OUString& sFieldNumber, const rtl::OUString& sDataType, const rtl::OUString& sOrder);
76 : : };
77 : :
78 : : class ScXMLSortByContext : public SvXMLImportContext
79 : : {
80 : : ScXMLSortContext* pSortContext;
81 : :
82 : : rtl::OUString sFieldNumber;
83 : : rtl::OUString sDataType;
84 : : rtl::OUString sOrder;
85 : :
86 : : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
87 : 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
88 : :
89 : : public:
90 : :
91 : : ScXMLSortByContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
92 : : const ::rtl::OUString& rLName,
93 : : const ::com::sun::star::uno::Reference<
94 : : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
95 : : ScXMLSortContext* pTempSortContext);
96 : :
97 : : virtual ~ScXMLSortByContext();
98 : :
99 : : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
100 : : const ::rtl::OUString& rLocalName,
101 : : const ::com::sun::star::uno::Reference<
102 : : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
103 : :
104 : : virtual void EndElement();
105 : : };
106 : :
107 : : #endif
108 : :
109 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|