summaryrefslogtreecommitdiffstats
path: root/sc/inc/queryparam.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-11-05 00:56:38 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-11-05 00:56:38 -0400
commit3df7746a66714351110cab6b4e4ef79cfe9fc874 (patch)
treec3b71527cc3d0e6557975e8cdc8e0fb8ce98bbc0 /sc/inc/queryparam.hxx
parentTemporarily disabling the new autofilter popup due to a set-back. (diff)
downloadcore-3df7746a66714351110cab6b4e4ef79cfe9fc874.tar.gz
core-3df7746a66714351110cab6b4e4ef79cfe9fc874.zip
Moved ScQueryEntry into its own file set.
Because I'll be modifying this struct in the next few days...
Diffstat (limited to 'sc/inc/queryparam.hxx')
-rw-r--r--sc/inc/queryparam.hxx48
1 files changed, 5 insertions, 43 deletions
diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx
index 6b87397a14dd..b97112157a59 100644
--- a/sc/inc/queryparam.hxx
+++ b/sc/inc/queryparam.hxx
@@ -32,7 +32,7 @@
#include "global.hxx"
#include "scmatrix.hxx"
-#include <vector>
+#include <boost/ptr_container/ptr_vector.hpp>
/*
* dialog returns the special field values "empty"/"not empty"
@@ -44,45 +44,7 @@
#define SC_NONEMPTYFIELDS ((double)0x0043)
struct ScDBQueryParamInternal;
-
-namespace utl {
- class SearchParam;
- class TextSearch;
-}
-
-struct ScQueryEntry
-{
- typedef std::vector<rtl::OUString> QueryStringsType;
-
- bool bDoQuery;
- bool bQueryByString;
- bool bQueryByDate;
- SCCOLROW nField;
- ScQueryOp eOp;
- ScQueryConnect eConnect;
- double nVal;
- mutable utl::SearchParam* pSearchParam; // if RegExp, not saved
- mutable utl::TextSearch* pSearchText; // if RegExp, not saved
-
- ScQueryEntry();
- ScQueryEntry(const ScQueryEntry& r);
- ~ScQueryEntry();
-
- // creates pSearchParam and pSearchText if necessary, always RegExp!
- utl::TextSearch* GetSearchTextPtr( bool bCaseSens ) const;
-
- bool IsQueryStringEmpty() const;
- bool MatchByString(const rtl::OUString& rStr, bool bCaseSens) const;
- void SwapQueryStrings(QueryStringsType& rStrings);
- void SortQueryStrings(bool bCaseSens);
- SC_DLLPUBLIC void SetQueryString(const rtl::OUString& rStr);
- SC_DLLPUBLIC rtl::OUString GetQueryString() const;
- void Clear();
- ScQueryEntry& operator=( const ScQueryEntry& r );
- bool operator==( const ScQueryEntry& r ) const;
-private:
- QueryStringsType maQueryStrings;
-};
+struct ScQueryEntry;
struct ScQueryParamBase
{
@@ -101,15 +63,15 @@ struct ScQueryParamBase
SC_DLLPUBLIC SCSIZE GetEntryCount() const;
SC_DLLPUBLIC const ScQueryEntry& GetEntry(SCSIZE n) const;
SC_DLLPUBLIC ScQueryEntry& GetEntry(SCSIZE n);
- void Resize(SCSIZE nNew);
- SC_DLLPUBLIC void DeleteQuery( SCSIZE nPos );
+ void Resize(size_t nNew);
+ SC_DLLPUBLIC void DeleteQuery(size_t nPos);
void FillInExcelSyntax(String& aCellStr, SCSIZE nIndex);
protected:
ScQueryParamBase();
ScQueryParamBase(const ScQueryParamBase& r);
- std::vector<ScQueryEntry> maEntries;
+ boost::ptr_vector<ScQueryEntry> maEntries;
};
// ============================================================================