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 : :
29 : : #ifndef SC_XMLCALCULATIONSETTINGSCONTEXT_HXX
30 : : #define SC_XMLCALCULATIONSETTINGSCONTEXT_HXX
31 : :
32 : : #include <xmloff/xmlictxt.hxx>
33 : : #include <com/sun/star/util/Date.hpp>
34 : :
35 : : class ScXMLImport;
36 : :
37 : : class ScXMLCalculationSettingsContext : public SvXMLImportContext
38 : : {
39 : : com::sun::star::util::Date aNullDate;
40 : : double fIterationEpsilon;
41 : : sal_Int32 nIterationCount;
42 : : sal_uInt16 nYear2000;
43 : : bool bIsIterationEnabled;
44 : : bool bCalcAsShown;
45 : : bool bIgnoreCase;
46 : : bool bLookUpLabels;
47 : : bool bMatchWholeCell;
48 : : bool bUseRegularExpressions;
49 : :
50 : : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
51 : 568 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
52 : : public:
53 : : ScXMLCalculationSettingsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
54 : : const ::rtl::OUString& rLName,
55 : : const ::com::sun::star::uno::Reference<
56 : : ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
57 : :
58 : : virtual ~ScXMLCalculationSettingsContext();
59 : :
60 : : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
61 : : const ::rtl::OUString& rLocalName,
62 : : const ::com::sun::star::uno::Reference<
63 : : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
64 : :
65 : 0 : void SetNullDate(const com::sun::star::util::Date& aDate) { aNullDate = aDate; }
66 : 0 : void SetIterationStatus(const bool bValue) { bIsIterationEnabled = bValue; }
67 : 0 : void SetIterationCount(const sal_Int32 nValue) { nIterationCount = nValue; }
68 : 0 : void SetIterationEpsilon(const double fValue) { fIterationEpsilon = fValue; }
69 : : virtual void EndElement();
70 : : };
71 : :
72 : : class ScXMLNullDateContext : public SvXMLImportContext
73 : : {
74 : : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
75 : 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
76 : : public:
77 : : ScXMLNullDateContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
78 : : const ::rtl::OUString& rLName,
79 : : const ::com::sun::star::uno::Reference<
80 : : ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLCalculationSettingsContext* pCalcSet);
81 : :
82 : : virtual ~ScXMLNullDateContext();
83 : :
84 : : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
85 : : const ::rtl::OUString& rLocalName,
86 : : const ::com::sun::star::uno::Reference<
87 : : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
88 : :
89 : : virtual void EndElement();
90 : : };
91 : :
92 : : class ScXMLIterationContext : public SvXMLImportContext
93 : : {
94 : : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
95 : 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
96 : : public:
97 : : ScXMLIterationContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
98 : : const ::rtl::OUString& rLName,
99 : : const ::com::sun::star::uno::Reference<
100 : : ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLCalculationSettingsContext* pCalcSet);
101 : :
102 : : virtual ~ScXMLIterationContext();
103 : :
104 : : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
105 : : const ::rtl::OUString& rLocalName,
106 : : const ::com::sun::star::uno::Reference<
107 : : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
108 : :
109 : : virtual void EndElement();
110 : : };
111 : :
112 : : #endif
113 : :
114 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|