Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


---
 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 92a094c..11a5300 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 bTemp)
+    {
+        bool pTemp = bConnectionOr;
+        bConnectionOr = bNextConnectionOr;
+        bNextConnectionOr = bTemp;
+        aConnectionOrStack.push(pTemp);
+    }
+
+    void CloseConnection()
+    {
+        bool pTemp = aConnectionOrStack.top();
+        aConnectionOrStack.pop();
+        bConnectionOr = pTemp;
+        bNextConnectionOr = pTemp;
+    }
+
     bool GetConnection() { bool bTemp = bConnectionOr; bConnectionOr = bNextConnectionOr; return 
bTemp; }
     void AddFilterField (const ScQueryEntry& aFilterField);
 };


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.