merge the formfield patch from ooo-build
[ooovba.git] / sc / inc / queryparam.hxx
blob01ddffb5c5fc3d4a31ebd4c0ff1e07464f1f1801
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: interpre.hxx,v $
10 * $Revision: 1.35.44.2 $
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_QUERYPARAM_HXX
32 #define SC_QUERYPARAM_HXX
34 #include "global.hxx"
35 #include "scmatrix.hxx"
37 #include <vector>
39 struct ScDBQueryParamInternal;
41 struct ScQueryParamBase
43 bool bHasHeader;
44 bool bByRow;
45 bool bInplace;
46 bool bCaseSens;
47 bool bRegExp;
48 bool bDuplicate;
49 bool bMixedComparison; // whether numbers are smaller than strings
51 virtual ~ScQueryParamBase();
53 SC_DLLPUBLIC SCSIZE GetEntryCount() const;
54 SC_DLLPUBLIC ScQueryEntry& GetEntry(SCSIZE n) const;
55 void Resize(SCSIZE nNew);
56 SC_DLLPUBLIC void DeleteQuery( SCSIZE nPos );
57 void FillInExcelSyntax(String& aCellStr, SCSIZE nIndex);
59 protected:
60 ScQueryParamBase();
61 ScQueryParamBase(const ScQueryParamBase& r);
63 mutable ::std::vector<ScQueryEntry> maEntries;
66 // ============================================================================
68 struct ScQueryParamTable
70 SCCOL nCol1;
71 SCROW nRow1;
72 SCCOL nCol2;
73 SCROW nRow2;
74 SCTAB nTab;
76 ScQueryParamTable();
77 ScQueryParamTable(const ScQueryParamTable& r);
78 virtual ~ScQueryParamTable();
81 // ============================================================================
83 struct SC_DLLPUBLIC ScQueryParam : public ScQueryParamBase, public ScQueryParamTable
85 BOOL bDestPers; // nicht gespeichert
86 SCTAB nDestTab;
87 SCCOL nDestCol;
88 SCROW nDestRow;
89 SCROW nDynamicEndRow;
90 bool bUseDynamicRange;
92 ScQueryParam();
93 ScQueryParam( const ScQueryParam& r );
94 ScQueryParam( const ScDBQueryParamInternal& r );
95 virtual ~ScQueryParam();
97 ScQueryParam& operator= ( const ScQueryParam& r );
98 BOOL operator== ( const ScQueryParam& rOther ) const;
99 void Clear();
100 void ClearDestParams();
101 void MoveToDest();
104 // ============================================================================
106 struct ScDBQueryParamBase : public ScQueryParamBase
108 enum DataType { INTERNAL, MATRIX };
110 SCCOL mnField; /// the field in which the values are processed during iteration.
111 bool mbSkipString;
113 DataType GetType() const;
115 virtual ~ScDBQueryParamBase();
117 protected:
118 ScDBQueryParamBase(DataType eType);
120 private:
121 ScDBQueryParamBase();
123 DataType meType;
126 // ============================================================================
128 struct ScDBQueryParamInternal : public ScDBQueryParamBase, public ScQueryParamTable
130 ScDBQueryParamInternal();
131 virtual ~ScDBQueryParamInternal();
134 // ============================================================================
136 struct ScDBQueryParamMatrix : public ScDBQueryParamBase
138 ScMatrixRef mpMatrix;
140 ScDBQueryParamMatrix();
141 virtual ~ScDBQueryParamMatrix();
144 #endif