summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-12-10 14:28:44 +0000
committerRüdiger Timm <rt@openoffice.org>2008-12-10 14:28:44 +0000
commit9417ec0ad8e031fa961dd0d40c0a80164f7bc108 (patch)
tree990735ec17f961ec7a02b30a421cdb46a4da8ded /unoxml
parentc1076fbc24ef3b9ac3814a2a4bd380ce5e4b39c2 (diff)
CWS-TOOLING: integrate CWS hb12
2008-12-01 11:10:21 +0100 hbrinkm r264591 : handled warnings on wntmsci12 2008-11-25 09:57:33 +0100 hbrinkm r264275 : CWS-TOOLING: rebase CWS hb12 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 17:17:34 +0100 hbrinkm r264008 : #i28656# applied patch 2008-11-19 17:06:18 +0100 hbrinkm r264007 : #i96267# applied patch 2008-11-19 16:47:16 +0100 hbrinkm r264006 : #i95533# applied patch 2008-11-17 14:18:10 +0100 hbrinkm r263722 : #i25545# applied patch 2008-11-17 13:48:18 +0100 hbrinkm r263721 : #i96114# applied patch 2008-10-30 14:51:50 +0100 hbrinkm r262827 : #i94634# applied patch 2008-10-22 16:35:49 +0200 hbrinkm r262608 : i74244# use correct mask when checking for author field 2008-10-21 10:08:10 +0200 hbrinkm r262563 : #iXXXXX# migrate CVS hb12 to SVN 2008-10-21 10:06:26 +0200 hbrinkm r262562 : #iXXXXX# migrate CVS hb12 to SVN
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/dom/element.cxx3
-rw-r--r--unoxml/source/xpath/nodelist.cxx9
-rw-r--r--unoxml/source/xpath/nodelist.hxx6
-rw-r--r--unoxml/source/xpath/xpathobject.cxx24
-rw-r--r--unoxml/source/xpath/xpathobject.hxx7
5 files changed, 27 insertions, 22 deletions
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index dddc51f9fe35..96de86d507ef 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: element.cxx,v $
- * $Revision: 1.14 $
+ * $Revision: 1.14.20.1 $
*
* This file is part of OpenOffice.org.
*
@@ -173,6 +173,7 @@ namespace DOM
xmlChar *xValue = (xmlChar*)xmlGetNsProp(m_aNodePtr, xName, xNS);
if (xValue != NULL) {
aValue = OUString((sal_Char*)xValue, strlen((char*)xValue), RTL_TEXTENCODING_UTF8);
+ xmlFree(xValue);
}
}
return aValue;
diff --git a/unoxml/source/xpath/nodelist.cxx b/unoxml/source/xpath/nodelist.cxx
index a44d6e84a6b3..1bc8e9df9bd5 100644
--- a/unoxml/source/xpath/nodelist.cxx
+++ b/unoxml/source/xpath/nodelist.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: nodelist.cxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.20.3 $
*
* This file is part of OpenOffice.org.
*
@@ -33,12 +33,13 @@
namespace XPath
{
- CNodeList::CNodeList(const xmlXPathObjectPtr xpathObj)
+ CNodeList::CNodeList(boost::shared_ptr<xmlXPathObject>& rxpathObj)
: m_pNodeSet(0)
{
- if (xpathObj != NULL && xpathObj->type == XPATH_NODESET)
+ if (rxpathObj != NULL && rxpathObj->type == XPATH_NODESET)
{
- m_pNodeSet = xpathObj->nodesetval;
+ m_pNodeSet = rxpathObj->nodesetval;
+ m_pXPathObj = rxpathObj;
}
}
diff --git a/unoxml/source/xpath/nodelist.hxx b/unoxml/source/xpath/nodelist.hxx
index 84b6c7a7af45..2d3fc8c0db70 100644
--- a/unoxml/source/xpath/nodelist.hxx
+++ b/unoxml/source/xpath/nodelist.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: nodelist.hxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.20.3 $
*
* This file is part of OpenOffice.org.
*
@@ -41,6 +41,7 @@
#include <com/sun/star/xml/xpath/XXPathObject.hpp>
#include "libxml/tree.h"
#include "libxml/xpath.h"
+#include <boost/shared_ptr.hpp>
using namespace rtl;
using namespace com::sun::star::uno;
@@ -54,10 +55,11 @@ namespace XPath
class CNodeList : public cppu::WeakImplHelper1< XNodeList >
{
private:
+ boost::shared_ptr<xmlXPathObject> m_pXPathObj;
xmlNodeSetPtr m_pNodeSet;
public:
- CNodeList(const xmlXPathObjectPtr xpathObj);
+ CNodeList(boost::shared_ptr<xmlXPathObject> &rxpathObj);
/**
The number of nodes in the list.
*/
diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx
index ccddd99b5b3d..5a4b7b93b81e 100644
--- a/unoxml/source/xpath/xpathobject.cxx
+++ b/unoxml/source/xpath/xpathobject.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xpathobject.cxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.20.3 $
*
* This file is part of OpenOffice.org.
*
@@ -34,8 +34,8 @@
namespace XPath
{
- CXPathObject::CXPathObject(const xmlXPathObjectPtr xpathObj)
- : m_pXPathObj(xpathObj)
+ CXPathObject::CXPathObject(xmlXPathObjectPtr xpathObj)
+ : m_pXPathObj(xpathObj, xmlXPathFreeObject)
{
switch (m_pXPathObj->type)
{
@@ -96,7 +96,7 @@ namespace XPath
*/
sal_Bool SAL_CALL CXPathObject::getBoolean() throw (RuntimeException)
{
- return (sal_Bool) xmlXPathCastToBoolean(m_pXPathObj);
+ return (sal_Bool) xmlXPathCastToBoolean(m_pXPathObj.get());
}
/**
@@ -104,7 +104,7 @@ namespace XPath
*/
sal_Int8 SAL_CALL CXPathObject::getByte() throw (RuntimeException)
{
- return (sal_Int8) xmlXPathCastToNumber(m_pXPathObj);
+ return (sal_Int8) xmlXPathCastToNumber(m_pXPathObj.get());
}
/**
@@ -112,15 +112,15 @@ namespace XPath
*/
sal_Int16 SAL_CALL CXPathObject::getShort() throw (RuntimeException)
{
- return (sal_Int16) xmlXPathCastToNumber(m_pXPathObj);
- }
+ return (sal_Int16) xmlXPathCastToNumber(m_pXPathObj.get());
+ }
/**
get number as long
*/
sal_Int32 SAL_CALL CXPathObject::getLong() throw (RuntimeException)
{
- return (sal_Int32) xmlXPathCastToNumber(m_pXPathObj);
+ return (sal_Int32) xmlXPathCastToNumber(m_pXPathObj.get());
}
/**
@@ -128,7 +128,7 @@ namespace XPath
*/
sal_Int64 SAL_CALL CXPathObject::getHyper() throw (RuntimeException)
{
- return (sal_Int64) xmlXPathCastToNumber(m_pXPathObj);
+ return (sal_Int64) xmlXPathCastToNumber(m_pXPathObj.get());
}
/**
@@ -136,7 +136,7 @@ namespace XPath
*/
float SAL_CALL CXPathObject::getFloat() throw (RuntimeException)
{
- return (float) xmlXPathCastToNumber(m_pXPathObj);
+ return (float) xmlXPathCastToNumber(m_pXPathObj.get());
}
/**
@@ -144,7 +144,7 @@ namespace XPath
*/
double SAL_CALL CXPathObject::getDouble() throw (RuntimeException)
{
- return xmlXPathCastToNumber(m_pXPathObj);
+ return xmlXPathCastToNumber(m_pXPathObj.get());
}
/**
@@ -152,7 +152,7 @@ namespace XPath
*/
OUString SAL_CALL CXPathObject::getString() throw (RuntimeException)
{
- const sal_Char* x1 = (sal_Char*) xmlXPathCastToString(m_pXPathObj);
+ const sal_Char* x1 = (sal_Char*) xmlXPathCastToString(m_pXPathObj.get());
return OUString(x1, strlen(x1), RTL_TEXTENCODING_UTF8);
}
diff --git a/unoxml/source/xpath/xpathobject.hxx b/unoxml/source/xpath/xpathobject.hxx
index ad80e83c1308..885a8db2b489 100644
--- a/unoxml/source/xpath/xpathobject.hxx
+++ b/unoxml/source/xpath/xpathobject.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xpathobject.hxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.20.3 $
*
* This file is part of OpenOffice.org.
*
@@ -41,6 +41,7 @@
#include <com/sun/star/xml/xpath/XXPathObject.hpp>
#include <libxml/tree.h>
#include <libxml/xpath.h>
+#include <boost/shared_ptr.hpp>
using namespace rtl;
using namespace com::sun::star::uno;
@@ -53,11 +54,11 @@ namespace XPath
class CXPathObject : public cppu::WeakImplHelper1< XXPathObject >
{
private:
- const xmlXPathObjectPtr m_pXPathObj;
+ boost::shared_ptr<xmlXPathObject> m_pXPathObj;
XPathObjectType m_xPathObjectType;
public:
- CXPathObject(const xmlXPathObjectPtr xpathObj);
+ CXPathObject(xmlXPathObjectPtr xpathObj);
/**
get object type