LibreOffice Module sc (master)  1
XMLDetectiveContext.hxx
Go to the documentation of this file.
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 
20 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_XMLDETECTIVECONTEXT_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_XML_XMLDETECTIVECONTEXT_HXX
22 
23 #include <detfunc.hxx>
24 #include <detdata.hxx>
25 #include "importcontext.hxx"
26 
27 #include <list>
28 
29 namespace sax_fastparser { class FastAttributeList; }
30 
32 {
35  bool bHasError;
36 
38 };
39 
40 typedef ::std::vector< ScMyImpDetectiveObj > ScMyImpDetectiveObjVec;
41 
43 {
46  sal_Int32 nIndex;
47 
49  : eOpType(SCDETOP_ADDSUCC)
50  , nIndex(-1)
51  {
52  }
53 
54  bool operator<(const ScMyImpDetectiveOp& rDetOp) const;
55 };
56 
57 typedef ::std::list< ScMyImpDetectiveOp > ScMyImpDetectiveOpList;
58 
60 {
61 private:
63 
64 public:
66  aDetectiveOpList() {}
67 
68  void AddDetectiveOp( const ScMyImpDetectiveOp& rDetOp )
69  { aDetectiveOpList.push_back( rDetOp ); }
70 
71  void Sort();
72  bool GetFirstOp( ScMyImpDetectiveOp& rDetOp );
73 };
74 
76 {
77 private:
79 
80 public:
82  ScXMLImport& rImport,
83  ScMyImpDetectiveObjVec* pNewDetectiveObjVec
84  );
85  virtual ~ScXMLDetectiveContext() override;
86 
87  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL
89  sal_Int32 nElement,
90  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList
91  ) override;
92 };
93 
95 {
96 private:
99  bool bValid;
100 
101 public:
103  ScXMLImport& rImport,
105  ScMyImpDetectiveObjVec* pNewDetectiveObjVec
106  );
107  virtual ~ScXMLDetectiveHighlightedContext() override;
108 
109  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
110 };
111 
113 {
114 private:
116  bool bHasType;
117 
118 public:
120  ScXMLImport& rImport,
122  );
123  virtual ~ScXMLDetectiveOperationContext() override;
124 
125  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
126 };
127 
128 #endif
129 
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScXMLDetectiveContext(ScXMLImport &rImport, ScMyImpDetectiveObjVec *pNewDetectiveObjVec)
bool GetFirstOp(ScMyImpDetectiveOp &rDetOp)
virtual ~ScXMLDetectiveContext() override
ScMyImpDetectiveOpList aDetectiveOpList
ScMyImpDetectiveObjVec * pDetectiveObjVec
void AddDetectiveOp(const ScMyImpDetectiveOp &rDetOp)
ScMyImpDetectiveObjVec * pDetectiveObjVec
virtual ~ScXMLDetectiveHighlightedContext() override
This class exists only to provide GetScImport() to its derived classes.
ScDetectiveObjType eObjType
ScDetectiveObjType
Definition: detfunc.hxx:39
bool operator<(const ScMyImpDetectiveOp &rDetOp) const
virtual ~ScXMLDetectiveOperationContext() override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
::std::list< ScMyImpDetectiveOp > ScMyImpDetectiveOpList
ScDetOpType
Definition: detdata.hxx:28
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
::std::vector< ScMyImpDetectiveObj > ScMyImpDetectiveObjVec
ScXMLDetectiveOperationContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
ScXMLDetectiveHighlightedContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScMyImpDetectiveObjVec *pNewDetectiveObjVec)