[Libreoffice-commits] .: 2 commits - binfilter/bf_sw unoxml/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Mar 2 03:11:17 PST 2011


 binfilter/bf_sw/source/core/layout/sw_tabfrm.cxx  |    1 +
 binfilter/bf_sw/source/core/layout/sw_trvlfrm.cxx |    2 +-
 unoxml/source/xpath/nodelist.cxx                  |    4 ++--
 unoxml/source/xpath/nodelist.hxx                  |    4 ++--
 unoxml/source/xpath/xpathobject.cxx               |    2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 09be9031ce3e3ffb6cc40f45ac5e1a4192adcb15
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 2 11:09:41 2011 +0000

    Resolves: fdo#33701 ensure node outlives path
    
    The xpath on destruction needs the xmldoc to exist, so the reference
    to the doc-owning nodelist needs to be the first reference listed
    in the class in order that its dtor is called *after* the xpath
    dtor

diff --git a/unoxml/source/xpath/nodelist.cxx b/unoxml/source/xpath/nodelist.cxx
index b4e3313..884cf85 100644
--- a/unoxml/source/xpath/nodelist.cxx
+++ b/unoxml/source/xpath/nodelist.cxx
@@ -31,8 +31,8 @@
 
 namespace XPath
 {
-    CNodeList::CNodeList(boost::shared_ptr<xmlXPathObject>& rxpathObj, const Reference< XNode >& contextNode)
-        : m_xContextNode(contextNode)
+    CNodeList::CNodeList(const Reference< XNode >& rContextNode, boost::shared_ptr<xmlXPathObject>& rxpathObj)
+        : m_xContextNode(rContextNode)
         , m_pNodeSet(0)
     {
         if (rxpathObj != NULL && rxpathObj->type == XPATH_NODESET)
diff --git a/unoxml/source/xpath/nodelist.hxx b/unoxml/source/xpath/nodelist.hxx
index 31b9b51..c917a7d 100644
--- a/unoxml/source/xpath/nodelist.hxx
+++ b/unoxml/source/xpath/nodelist.hxx
@@ -53,12 +53,12 @@ namespace XPath
     class CNodeList : public cppu::WeakImplHelper1< XNodeList >
     {
     private:
-        boost::shared_ptr<xmlXPathObject> m_pXPathObj;
         const Reference< XNode > m_xContextNode;
+        boost::shared_ptr<xmlXPathObject> m_pXPathObj;
         xmlNodeSetPtr m_pNodeSet;
 
     public:
-        CNodeList(boost::shared_ptr<xmlXPathObject> &rxpathObj, const Reference< XNode >& contextNode);
+        CNodeList(const Reference< XNode >& contextNode, 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 67a8f59..bbb8a5b 100644
--- a/unoxml/source/xpath/xpathobject.cxx
+++ b/unoxml/source/xpath/xpathobject.cxx
@@ -86,7 +86,7 @@ namespace XPath
     */
     Reference< XNodeList > SAL_CALL CXPathObject::getNodeList() throw (RuntimeException)
     {
-        return Reference< XNodeList >(new CNodeList(m_pXPathObj, m_xContextNode));
+        return Reference< XNodeList >(new CNodeList(m_xContextNode, m_pXPathObj));
     }
     
      /**
commit 657bbb68e86516c44fdd31d8b2e3d0c14ddc6a6e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 2 08:49:54 2011 +0000

    throw out some warnings

diff --git a/binfilter/bf_sw/source/core/layout/sw_tabfrm.cxx b/binfilter/bf_sw/source/core/layout/sw_tabfrm.cxx
index ef7da20..e6840ee 100644
--- a/binfilter/bf_sw/source/core/layout/sw_tabfrm.cxx
+++ b/binfilter/bf_sw/source/core/layout/sw_tabfrm.cxx
@@ -2662,6 +2662,7 @@ namespace binfilter {
 /*N*/ 					{
 /*N*/ 						case VERT_CENTER:	lTopOfst = nDiff / 2; break;
 /*N*/ 						case VERT_BOTTOM:	lTopOfst = nDiff;	  break;
+/*N*/ 						default: break;
 /*N*/ 					};
 /*N*/ 				}
 /*N*/                 long nTmp = (*fnRect->fnYInc)(
diff --git a/binfilter/bf_sw/source/core/layout/sw_trvlfrm.cxx b/binfilter/bf_sw/source/core/layout/sw_trvlfrm.cxx
index 852eadd..03862a0 100644
--- a/binfilter/bf_sw/source/core/layout/sw_trvlfrm.cxx
+++ b/binfilter/bf_sw/source/core/layout/sw_trvlfrm.cxx
@@ -133,7 +133,7 @@ namespace binfilter {
 
 //Frame in wiederholter Headline?
 /*N*/ bool lcl_IsInRepeatedHeadline( const SwFrm* /*pFrm*/,
-/*N*/ 									const SwTabFrm** ppTFrm = 0 )
+/*N*/ 									const SwTabFrm** /*ppTFrm*/ = 0 )
 /*N*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;
 /*N*/ }
 


More information about the Libreoffice-commits mailing list