1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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
35 #include "scmatrix.hxx"
39 struct ScDBQueryParamInternal
;
41 struct ScQueryParamBase
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
);
61 ScQueryParamBase(const ScQueryParamBase
& r
);
63 mutable ::std::vector
<ScQueryEntry
> maEntries
;
66 // ============================================================================
68 struct ScQueryParamTable
77 ScQueryParamTable(const ScQueryParamTable
& r
);
78 virtual ~ScQueryParamTable();
81 // ============================================================================
83 struct SC_DLLPUBLIC ScQueryParam
: public ScQueryParamBase
, public ScQueryParamTable
85 BOOL bDestPers
; // nicht gespeichert
90 bool bUseDynamicRange
;
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;
100 void ClearDestParams();
104 // ============================================================================
106 struct ScDBQueryParamBase
: public ScQueryParamBase
108 enum DataType
{ INTERNAL
, MATRIX
};
110 SCCOL mnField
; /// the field in which the values are processed during iteration.
113 DataType
GetType() const;
115 virtual ~ScDBQueryParamBase();
118 ScDBQueryParamBase(DataType eType
);
121 ScDBQueryParamBase();
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();