tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / filter / xml / XMLDetectiveContext.hxx
blob8b0a635374a68c6ae0f5e36b5606c13cfc2d4682
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #pragma once
22 #include <detfunc.hxx>
23 #include <detdata.hxx>
24 #include "importcontext.hxx"
26 #include <list>
28 namespace sax_fastparser { class FastAttributeList; }
30 struct ScMyImpDetectiveObj
32 ScRange aSourceRange;
33 ScDetectiveObjType eObjType;
34 bool bHasError;
36 ScMyImpDetectiveObj();
39 typedef ::std::vector< ScMyImpDetectiveObj > ScMyImpDetectiveObjVec;
41 struct ScMyImpDetectiveOp
43 ScAddress aPosition;
44 ScDetOpType eOpType;
45 sal_Int32 nIndex;
47 ScMyImpDetectiveOp()
48 : eOpType(SCDETOP_ADDSUCC)
49 , nIndex(-1)
53 bool operator<(const ScMyImpDetectiveOp& rDetOp) const;
56 typedef ::std::list< ScMyImpDetectiveOp > ScMyImpDetectiveOpList;
58 class ScMyImpDetectiveOpArray
60 private:
61 ScMyImpDetectiveOpList aDetectiveOpList;
63 public:
64 ScMyImpDetectiveOpArray() :
65 aDetectiveOpList() {}
67 void AddDetectiveOp( const ScMyImpDetectiveOp& rDetOp )
68 { aDetectiveOpList.push_back( rDetOp ); }
70 void Sort();
71 bool GetFirstOp( ScMyImpDetectiveOp& rDetOp );
74 class ScXMLDetectiveContext : public ScXMLImportContext
76 private:
77 ScMyImpDetectiveObjVec* pDetectiveObjVec;
79 public:
80 ScXMLDetectiveContext(
81 ScXMLImport& rImport,
82 ScMyImpDetectiveObjVec* pNewDetectiveObjVec
84 virtual ~ScXMLDetectiveContext() override;
86 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL
87 createFastChildContext(
88 sal_Int32 nElement,
89 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList
90 ) override;
93 class ScXMLDetectiveHighlightedContext : public ScXMLImportContext
95 private:
96 ScMyImpDetectiveObjVec* pDetectiveObjVec;
97 ScMyImpDetectiveObj aDetectiveObj;
98 bool bValid;
100 public:
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
113 private:
114 ScMyImpDetectiveOp aDetectiveOp;
115 bool bHasType;
117 public:
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: */