[Libreoffice-commits] .: svl/inc
Joseph Powers
jpowers at kemper.freedesktop.org
Wed Jun 29 20:02:33 PDT 2011
svl/inc/svl/httpcook.hxx | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
New commits:
commit ac6a2f853726fbb02c8e8c557c961f93f143ae45
Author: Joseph Powers <jpowers27 at cox.net>
Date: Thu Jun 23 19:37:17 2011 -0700
Replace List with std::vector< CntHTTPCookie* >
diff --git a/svl/inc/svl/httpcook.hxx b/svl/inc/svl/httpcook.hxx
index 4d281f8..40bf4e4 100644
--- a/svl/inc/svl/httpcook.hxx
+++ b/svl/inc/svl/httpcook.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,6 +33,7 @@
#include <tools/stream.hxx>
#include <tools/string.hxx>
#include <svl/poolitem.hxx>
+#include <vector>
/*=======================================================================
*
@@ -132,21 +133,28 @@ enum CntHTTPCookieRequestType
CNTHTTP_COOKIE_REQUEST_SEND
};
+typedef ::std::vector< CntHTTPCookie* > CntHTTPCookieList_impl;
+
struct CntHTTPCookieRequest
{
- const String& m_rURL;
- List& m_rCookieList;
- CntHTTPCookieRequestType m_eType;
- sal_uInt16 m_nRet;
+ const String& m_rURL;
+ CntHTTPCookieList_impl& m_rCookieList;
+ CntHTTPCookieRequestType m_eType;
+ sal_uInt16 m_nRet;
CntHTTPCookieRequest (
const String& rURL,
- List& rCookieList,
+ CntHTTPCookieList_impl& rCookieList,
CntHTTPCookieRequestType eType)
: m_rURL (rURL),
m_rCookieList (rCookieList),
m_eType(eType),
m_nRet (CNTHTTP_COOKIE_POLICY_BANNED) {}
+ ~CntHTTPCookieRequest() {
+ for ( size_t i = 0, n = m_rCookieList.size(); i < n; ++i ) {
+ delete m_rCookieList[ i ];
+ }
+ }
};
#endif // SVTOOLS_HTTPCOOK_HXX
More information about the Libreoffice-commits
mailing list