[ooo-build-commit] .: 5 commits - unoxml/source writerfilter/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Oct 7 05:46:27 PDT 2010
unoxml/source/dom/document.cxx | 38 ------------------------
unoxml/source/dom/document.hxx | 5 ---
unoxml/source/dom/node.cxx | 16 ++--------
writerfilter/source/dmapper/BorderHandler.cxx | 3 +
writerfilter/source/dmapper/StyleSheetTable.cxx | 2 -
writerfilter/source/ooxml/OOXMLFactory.cxx | 2 +
6 files changed, 10 insertions(+), 56 deletions(-)
New commits:
commit 2c58c2f934b283fbfbc5507771addb9f8fca4ca5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 7 12:24:17 2010 +0100
adjust for table::BorderLine2
diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx
index 548bb98..e844402 100644
--- a/writerfilter/source/dmapper/BorderHandler.cxx
+++ b/writerfilter/source/dmapper/BorderHandler.cxx
@@ -53,7 +53,7 @@ BorderHandler::BorderHandler( bool bOOXML ) :
{
const int nBorderCount(BORDER_COUNT);
std::fill_n(m_aFilledLines, nBorderCount, false);
- std::fill_n(m_aBorderLines, nBorderCount, table::BorderLine());
+ std::fill_n(m_aBorderLines, nBorderCount, table::BorderLine2());
}
/*-- 24.04.2007 09:06:35---------------------------------------------------
commit ebf0cde8e67776e2e1f51e762d7a9146ee4e50a2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 7 11:39:11 2010 +0100
#i112783# ownership cycles in unoxml
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index c7772ae..80258cd 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -53,50 +53,12 @@
namespace DOM
{
- void CDocument::addnode(xmlNodePtr aNode)
- {
- if (aNode != (xmlNodePtr)m_aDocPtr)
- {
- Reference< XNode >* nref = new Reference< XNode >(CNode::get(aNode));
- m_aNodeRefList.push_back(nref);
- }
- }
-
CDocument::~CDocument()
{
- Reference< XNode >* pRef;
- nodereflist_t::const_iterator r = m_aNodeRefList.begin();
- while (r!=m_aNodeRefList.end())
- {
- pRef = *r;
- delete pRef;
- r++;
- }
-
- // get rid of leftover instances, if anybody still holds a
- // reference to one of these, it will be invalid!
- /*
- CNode* aNode = 0;
- nodelist_t::const_iterator i = m_aNodeList.begin();
- while (i!=m_aNodeList.end())
- {
- aNode = CNode::get(*i, sal_False);
- if (aNode != 0)
- {
- // CNode::remove(*i);
- // delete will remove
- delete aNode;
- }
- i++;
- }
- */
-
xmlFreeDoc(m_aDocPtr);
-
}
CDocument::CDocument(xmlDocPtr aDocPtr):
- m_aNodeRefList(),
m_aDocPtr(aDocPtr),
m_streamListeners()
{
diff --git a/unoxml/source/dom/document.hxx b/unoxml/source/dom/document.hxx
index 2315e57..687381b 100644
--- a/unoxml/source/dom/document.hxx
+++ b/unoxml/source/dom/document.hxx
@@ -72,12 +72,9 @@ namespace DOM
XActiveDataControl, XActiveDataSource, XSAXSerializable, XFastSAXSerializable>
{
friend class CNode;
- typedef std::list< Reference< XNode >* > nodereflist_t;
typedef set< Reference< XStreamListener > > listenerlist_t;
private:
- nodereflist_t m_aNodeRefList;
-
xmlDocPtr m_aDocPtr;
// datacontrol/source state
@@ -87,8 +84,6 @@ namespace DOM
protected:
CDocument(xmlDocPtr aDocPtr);
- void addnode(xmlNodePtr aNode);
-
public:
virtual ~CDocument();
diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx
index 7d68433..dc53f82 100644
--- a/unoxml/source/dom/node.cxx
+++ b/unoxml/source/dom/node.cxx
@@ -228,7 +228,7 @@ namespace DOM
// m_aNodeType = NodeType::NOTATION_NODE;
pNode = static_cast< CNode* >(new CAttr((xmlAttrPtr)aNode));
break;
- // unsopported node types
+ // unsupported node types
case XML_HTML_DOCUMENT_NODE:
case XML_ELEMENT_DECL:
case XML_ATTRIBUTE_DECL:
@@ -238,18 +238,10 @@ namespace DOM
pNode = 0;
break;
}
- }
- if ( pNode != 0 )
- {
- if(CNode::theNodeMap.insert(nodemap_t::value_type(aNode, pNode)).second)
+
+ if ( pNode != 0 )
{
- // insertion done, register node with document
- xmlDocPtr doc = aNode->doc;
- if( doc != NULL)
- {
- CDocument* pDoc = static_cast< CDocument* >(CNode::get((xmlNodePtr)doc));
- pDoc->addnode(aNode);
- } else
+ if(!CNode::theNodeMap.insert(nodemap_t::value_type(aNode, pNode)).second)
{
// if insertion failed, delete the new instance and return null
delete pNode;
commit c603182ff9e92c25a506bb058e39a2a0ceca35f1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 7 11:32:02 2010 +0100
#i114542# valgrind error in dmapper::BorderHandler
diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx
index 497b918..548bb98 100644
--- a/writerfilter/source/dmapper/BorderHandler.cxx
+++ b/writerfilter/source/dmapper/BorderHandler.cxx
@@ -51,6 +51,9 @@ BorderHandler::BorderHandler( bool bOOXML ) :
m_nLineDistance(0),
m_bOOXML( bOOXML )
{
+ const int nBorderCount(BORDER_COUNT);
+ std::fill_n(m_aFilledLines, nBorderCount, false);
+ std::fill_n(m_aBorderLines, nBorderCount, table::BorderLine());
}
/*-- 24.04.2007 09:06:35---------------------------------------------------
commit 641dd1de1324283e1ecf460a7fd23735942ca50c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 7 11:30:54 2010 +0100
#i144667#: add missing include
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 9607478..9942df5 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -25,6 +25,8 @@
*
************************************************************************/
+#include <stdio.h>
+
#include <rtl/instance.hxx>
#include <osl/mutex.hxx>
#include "OOXMLFactory.hxx"
commit d27dfd2902a2b5f5590260f0bd644fd3586fc779
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 7 11:29:47 2010 +0100
#i114549# valgrind error in lcl_mergeProps
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 297cd55..3712f0a 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -235,7 +235,7 @@ void lcl_mergeProps( PropertyMapPtr pToFill, PropertyMapPtr pToAdd, TblStyleTyp
( nStyleId == TBL_STYLE_FIRSTCOL )
};
- for ( int i = 0 ; i < 7; i++ )
+ for ( unsigned i = 0 ; i != sizeof(pPropsToCheck) / sizeof(PropertyIds); i++ )
{
PropertyIds nId = pPropsToCheck[i];
PropertyDefinition aProp( nId, false );
More information about the ooo-build-commit
mailing list