diff options
author | Marcel Metz <mmetz@adrian-broher.net> | 2011-12-05 20:08:32 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-12-05 22:53:16 +0100 |
commit | 149c1746a1e2ee0557c72c067fe6fe79f0781c4d (patch) | |
tree | 93ff6c60719dc2e7bf113bd6bcd2706e54c411cd /sc/source/filter/xml/xmlfilti.hxx | |
parent | 0158333f1b8d578cc56dc51c3e3f8daf0578210b (diff) |
Replace Stack with std::stack< bool >
Diffstat (limited to 'sc/source/filter/xml/xmlfilti.hxx')
-rw-r--r-- | sc/source/filter/xml/xmlfilti.hxx | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx index 92a094c9b8b6..bb301013bdda 100644 --- a/sc/source/filter/xml/xmlfilti.hxx +++ b/sc/source/filter/xml/xmlfilti.hxx @@ -36,7 +36,6 @@ #include <com/sun/star/sheet/FilterOperator.hpp> #include <com/sun/star/sheet/FilterOperator2.hpp> #include <com/sun/star/sheet/TableFilterField2.hpp> -#include <tools/stack.hxx> #include "xmldrani.hxx" #include "xmldpimp.hxx" @@ -228,7 +227,7 @@ class ScXMLDPFilterContext : public SvXMLImportContext bool bConnectionOr; bool bNextConnectionOr; bool bConditionSourceRange; - Stack aConnectionOrStack; + ::std::stack<bool> aConnectionOrStack; const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } @@ -252,10 +251,23 @@ public: void SetIsCaseSensitive(const bool bTemp) { bIsCaseSensitive = bTemp; } void SetUseRegularExpressions(const bool bTemp) { if (!bUseRegularExpressions) bUseRegularExpressions = bTemp;} - void OpenConnection(const bool bTemp) { bool* pTemp = new bool; *pTemp = bConnectionOr; - bConnectionOr = bNextConnectionOr; bNextConnectionOr = bTemp; - aConnectionOrStack.Push(pTemp);} - void CloseConnection() { bool* pTemp = static_cast <bool*> (aConnectionOrStack.Pop()); bConnectionOr = *pTemp; bNextConnectionOr = *pTemp; delete pTemp;} + + void OpenConnection(const bool bVal) + { + bool bTemp = bConnectionOr; + bConnectionOr = bNextConnectionOr; + bNextConnectionOr = bVal; + aConnectionOrStack.push(bTemp); + } + + void CloseConnection() + { + bool bTemp = aConnectionOrStack.top(); + aConnectionOrStack.pop(); + bConnectionOr = bTemp; + bNextConnectionOr = bTemp; + } + bool GetConnection() { bool bTemp = bConnectionOr; bConnectionOr = bNextConnectionOr; return bTemp; } void AddFilterField (const ScQueryEntry& aFilterField); }; |