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 #pragma once
21 
22 #include <detfunc.hxx>
23 #include <detdata.hxx>
24 #include "importcontext.hxx"
25 
26 #include <list>
27 
28 namespace sax_fastparser { class FastAttributeList; }
29 
31 {
34  bool bHasError;
35 
37 };
38 
39 typedef ::std::vector< ScMyImpDetectiveObj > ScMyImpDetectiveObjVec;
40 
42 {
45  sal_Int32 nIndex;
46 
48  : eOpType(SCDETOP_ADDSUCC)
49  , nIndex(-1)
50  {
51  }
52 
53  bool operator<(const ScMyImpDetectiveOp& rDetOp) const;
54 };
55 
56 typedef ::std::list< ScMyImpDetectiveOp > ScMyImpDetectiveOpList;
57 
59 {
60 private:
62 
63 public:
65  aDetectiveOpList() {}
66 
67  void AddDetectiveOp( const ScMyImpDetectiveOp& rDetOp )
68  { aDetectiveOpList.push_back( rDetOp ); }
69 
70  void Sort();
71  bool GetFirstOp( ScMyImpDetectiveOp& rDetOp );
72 };
73 
75 {
76 private:
78 
79 public:
81  ScXMLImport& rImport,
82  ScMyImpDetectiveObjVec* pNewDetectiveObjVec
83  );
84  virtual ~ScXMLDetectiveContext() override;
85 
86  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL
88  sal_Int32 nElement,
89  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList
90  ) override;
91 };
92 
94 {
95 private:
98  bool bValid;
99 
100 public:
102  ScXMLImport& rImport,
104  ScMyImpDetectiveObjVec* pNewDetectiveObjVec
105  );
106  virtual ~ScXMLDetectiveHighlightedContext() override;
107 
108  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
109 };
110 
112 {
113 private:
115  bool bHasType;
116 
117 public:
119  ScXMLImport& rImport,
121  );
122  virtual ~ScXMLDetectiveOperationContext() override;
123 
124  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
125 };
126 
127 /* 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:38
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:27
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)