diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2009-09-09 10:57:16 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2009-09-09 10:57:16 -0400 |
commit | f371fca09ddff5d5d32a0dcec05931be04b1b8c9 (patch) | |
tree | 4d144cec484c37fc76793e626087c495699e7690 /sc/inc/queryparam.hxx | |
parent | 3db13d25ca7c79cbc53ecba722453571451b96e9 (diff) |
#i102750# initial refactoring in an effort to support external references in DSUM, DGET etc. Not finished yet.
Diffstat (limited to 'sc/inc/queryparam.hxx')
-rw-r--r-- | sc/inc/queryparam.hxx | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx new file mode 100644 index 000000000000..3e106647b58b --- /dev/null +++ b/sc/inc/queryparam.hxx @@ -0,0 +1,105 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: interpre.hxx,v $ + * $Revision: 1.35.44.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SC_QUERYPARAM_HXX +#define SC_QUERYPARAM_HXX + +#include "global.hxx" +#include "scmatrix.hxx" + +struct ScQueryParamBase +{ + enum DataType { INTERNAL, MATRIX }; + + bool bHasHeader; + bool bByRow; + bool bInplace; + bool bCaseSens; + bool bRegExp; + bool bDuplicate; + + virtual ~ScQueryParamBase(); + + SCSIZE GetEntryCount() const { return nEntryCount; } + ScQueryEntry& GetEntry(SCSIZE n) const { return pEntries[n]; } + void Resize(SCSIZE nNew); + SC_DLLPUBLIC void DeleteQuery( SCSIZE nPos ); + void FillInExcelSyntax(String& aCellStr, SCSIZE nIndex); + + DataType GetType() const; + +protected: + ScQueryParamBase(DataType eType); + ScQueryParamBase(const ScQueryParamBase& r); + + SCSIZE nEntryCount; + ScQueryEntry* pEntries; + +private: + ScQueryParamBase(); + DataType meType; +}; + +// ============================================================================ + +struct SC_DLLPUBLIC ScQueryParam : public ScQueryParamBase +{ + SCCOL nCol1; + SCROW nRow1; + SCCOL nCol2; + SCROW nRow2; + SCTAB nTab; + BOOL bMixedComparison; // whether numbers are smaller than strings + BOOL bDestPers; // nicht gespeichert + SCTAB nDestTab; + SCCOL nDestCol; + SCROW nDestRow; + + ScQueryParam(); + ScQueryParam( const ScQueryParam& r ); + virtual ~ScQueryParam(); + + ScQueryParam& operator= ( const ScQueryParam& r ); + BOOL operator== ( const ScQueryParam& rOther ) const; + void Clear (); + void MoveToDest(); +}; + +// ============================================================================ + +struct ScQueryParamMatrix : public ScQueryParamBase +{ + ScMatrixRef mpMatrix; + + ScQueryParamMatrix(); + virtual ~ScQueryParamMatrix(); +}; + +#endif |