update dev300-m58
[ooovba.git] / sc / source / filter / xml / XMLCalculationSettingsContext.hxx
blob3c2b1eeee8dbf63ef6c58aaa87c91a4a66ffcf2b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMLCalculationSettingsContext.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_XMLCALCULATIONSETTINGSCONTEXT_HXX
32 #define SC_XMLCALCULATIONSETTINGSCONTEXT_HXX
34 #include <xmloff/xmlictxt.hxx>
35 #include <com/sun/star/util/Date.hpp>
37 class ScXMLImport;
39 class ScXMLCalculationSettingsContext : public SvXMLImportContext
41 com::sun::star::util::Date aNullDate;
42 double fIterationEpsilon;
43 sal_Int32 nIterationCount;
44 sal_uInt16 nYear2000;
45 sal_Bool bIsIterationEnabled;
46 sal_Bool bCalcAsShown;
47 sal_Bool bIgnoreCase;
48 sal_Bool bLookUpLabels;
49 sal_Bool bMatchWholeCell;
50 sal_Bool bUseRegularExpressions;
52 const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
53 ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
54 public:
55 ScXMLCalculationSettingsContext( ScXMLImport& rImport, USHORT nPrfx,
56 const ::rtl::OUString& rLName,
57 const ::com::sun::star::uno::Reference<
58 ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
60 virtual ~ScXMLCalculationSettingsContext();
62 virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
63 const ::rtl::OUString& rLocalName,
64 const ::com::sun::star::uno::Reference<
65 ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
67 void SetNullDate(const com::sun::star::util::Date& aDate) { aNullDate = aDate; }
68 void SetIterationStatus(const sal_Bool bValue) { bIsIterationEnabled = bValue; }
69 void SetIterationCount(const sal_Int32 nValue) { nIterationCount = nValue; }
70 void SetIterationEpsilon(const double fValue) { fIterationEpsilon = fValue; }
71 virtual void EndElement();
74 class ScXMLNullDateContext : public SvXMLImportContext
76 const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
77 ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
78 public:
79 ScXMLNullDateContext( ScXMLImport& rImport, USHORT nPrfx,
80 const ::rtl::OUString& rLName,
81 const ::com::sun::star::uno::Reference<
82 ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLCalculationSettingsContext* pCalcSet);
84 virtual ~ScXMLNullDateContext();
86 virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
87 const ::rtl::OUString& rLocalName,
88 const ::com::sun::star::uno::Reference<
89 ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
91 virtual void EndElement();
94 class ScXMLIterationContext : public SvXMLImportContext
96 const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
97 ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
98 public:
99 ScXMLIterationContext( ScXMLImport& rImport, USHORT nPrfx,
100 const ::rtl::OUString& rLName,
101 const ::com::sun::star::uno::Reference<
102 ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLCalculationSettingsContext* pCalcSet);
104 virtual ~ScXMLIterationContext();
106 virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
107 const ::rtl::OUString& rLocalName,
108 const ::com::sun::star::uno::Reference<
109 ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
111 virtual void EndElement();
114 #endif