1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <detfunc.hxx>
23 #include <detdata.hxx>
24 #include "importcontext.hxx"
28 namespace sax_fastparser
{ class FastAttributeList
; }
30 struct ScMyImpDetectiveObj
33 ScDetectiveObjType eObjType
;
36 ScMyImpDetectiveObj();
39 typedef ::std::vector
< ScMyImpDetectiveObj
> ScMyImpDetectiveObjVec
;
41 struct ScMyImpDetectiveOp
48 : eOpType(SCDETOP_ADDSUCC
)
53 bool operator<(const ScMyImpDetectiveOp
& rDetOp
) const;
56 typedef ::std::list
< ScMyImpDetectiveOp
> ScMyImpDetectiveOpList
;
58 class ScMyImpDetectiveOpArray
61 ScMyImpDetectiveOpList aDetectiveOpList
;
64 ScMyImpDetectiveOpArray() :
67 void AddDetectiveOp( const ScMyImpDetectiveOp
& rDetOp
)
68 { aDetectiveOpList
.push_back( rDetOp
); }
71 bool GetFirstOp( ScMyImpDetectiveOp
& rDetOp
);
74 class ScXMLDetectiveContext
: public ScXMLImportContext
77 ScMyImpDetectiveObjVec
* pDetectiveObjVec
;
80 ScXMLDetectiveContext(
82 ScMyImpDetectiveObjVec
* pNewDetectiveObjVec
84 virtual ~ScXMLDetectiveContext() override
;
86 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
87 createFastChildContext(
89 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
93 class ScXMLDetectiveHighlightedContext
: public ScXMLImportContext
96 ScMyImpDetectiveObjVec
* pDetectiveObjVec
;
97 ScMyImpDetectiveObj aDetectiveObj
;
101 ScXMLDetectiveHighlightedContext(
102 ScXMLImport
& rImport
,
103 const rtl::Reference
<sax_fastparser::FastAttributeList
>& rAttrList
,
104 ScMyImpDetectiveObjVec
* pNewDetectiveObjVec
106 virtual ~ScXMLDetectiveHighlightedContext() override
;
108 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
111 class ScXMLDetectiveOperationContext
: public ScXMLImportContext
114 ScMyImpDetectiveOp aDetectiveOp
;
118 ScXMLDetectiveOperationContext(
119 ScXMLImport
& rImport
,
120 const rtl::Reference
<sax_fastparser::FastAttributeList
>& rAttrList
122 virtual ~ScXMLDetectiveOperationContext() override
;
124 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */