diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-11-01 16:49:08 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-11-01 16:49:08 +0100 |
commit | 77de5931b40df10626854d375202f19f2ef2ab78 (patch) | |
tree | 7814966bf7ceea83b020900ac56625db26ee98c4 | |
parent | 8677f2626ed6dfc2bc71b77fb6d40f75fbad1b13 (diff) | |
parent | 622303ead27b9fbc49bb5dd1be62be615cf9d5a5 (diff) |
CWS-TOOLING: integrate CWS sw34bf01ooo/DEV300_m92
-rw-r--r-- | unoxml/source/dom/document.cxx | 38 | ||||
-rw-r--r-- | unoxml/source/dom/document.hxx | 5 | ||||
-rw-r--r-- | unoxml/source/dom/node.cxx | 16 | ||||
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 18 | ||||
-rw-r--r-- | unoxml/source/xpath/xpathapi.cxx | 2 | ||||
-rw-r--r-- | unoxml/source/xpath/xpathapi.hxx | 2 | ||||
-rw-r--r-- | unoxml/source/xpath/xpathobject.cxx | 4 | ||||
-rw-r--r-- | unoxml/source/xpath/xpathobject.hxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/BorderHandler.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/FontTable.cxx | 13 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFactory.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx | 3 |
14 files changed, 26 insertions, 87 deletions
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx index c7772ae72..80258cd1d 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 2315e57c6..687381b3c 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 7d684330c..dc53f8258 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; diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 3d2acf0c2..13dd5b0bb 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -39,7 +39,10 @@ #include <boost/shared_array.hpp> #include <boost/bind.hpp> -#include <librdf.h> +#include <libxslt/security.h> + +// #i114999# do not include librdf.h, it is broken in redland 1.0.11 +#include <redland.h> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XInitialization.hpp> @@ -64,19 +67,6 @@ #include <comphelper/stlunosequence.hxx> #include <comphelper/sequenceasvector.hxx> #include <comphelper/makesequence.hxx> -#include <librdf.h> -#include <libxslt/security.h> - -#include <boost/utility.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/shared_array.hpp> -#include <boost/bind.hpp> - -#include <map> -#include <functional> -#include <algorithm> - -#include <string.h> /** diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx index 7fc17f0fb..426aead47 100644 --- a/unoxml/source/xpath/xpathapi.cxx +++ b/unoxml/source/xpath/xpathapi.cxx @@ -352,7 +352,7 @@ namespace XPath throw XPathException(); } xmlXPathFreeContext(xpathCtx); - Reference< XXPathObject > aObj(new CXPathObject(xpathObj)); + Reference< XXPathObject > aObj(new CXPathObject(xpathObj, contextNode)); return aObj; } diff --git a/unoxml/source/xpath/xpathapi.hxx b/unoxml/source/xpath/xpathapi.hxx index 538b97e7e..fd4fe1df4 100644 --- a/unoxml/source/xpath/xpathapi.hxx +++ b/unoxml/source/xpath/xpathapi.hxx @@ -69,7 +69,7 @@ namespace XPath private: nsmap_t m_nsmap; - const Reference < XMultiServiceFactory >& m_aFactory; + const Reference< XMultiServiceFactory > m_aFactory; extensions_t m_extensions; public: diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx index b1fea8974..815d17abf 100644 --- a/unoxml/source/xpath/xpathobject.cxx +++ b/unoxml/source/xpath/xpathobject.cxx @@ -31,8 +31,8 @@ namespace XPath { - CXPathObject::CXPathObject(xmlXPathObjectPtr xpathObj) - : m_pXPathObj(xpathObj, xmlXPathFreeObject) + CXPathObject::CXPathObject(xmlXPathObjectPtr xpathObj, const Reference< XNode >& contextNode) + : m_pXPathObj(xpathObj, xmlXPathFreeObject), m_xContextNode(contextNode) { switch (m_pXPathObj->type) { diff --git a/unoxml/source/xpath/xpathobject.hxx b/unoxml/source/xpath/xpathobject.hxx index a726defbd..95c2e785e 100644 --- a/unoxml/source/xpath/xpathobject.hxx +++ b/unoxml/source/xpath/xpathobject.hxx @@ -52,10 +52,11 @@ namespace XPath { private: boost::shared_ptr<xmlXPathObject> m_pXPathObj; + const Reference< XNode > m_xContextNode; XPathObjectType m_xPathObjectType; public: - CXPathObject(xmlXPathObjectPtr xpathObj); + CXPathObject(xmlXPathObjectPtr xpathObj, const Reference< XNode >& contextNode); /** get object type diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx index 9e034fe80..f7483ef1b 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--------------------------------------------------- diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index cffe41109..b86f9cabb 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -627,7 +627,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) #ifdef DEBUG_DOMAINMAPPER dmapper_logger->attribute("isTextAppend", xTextAppend.is()); - dmapper_logger->attribute("isIgnor", m_TableManager.isIgnore()); + dmapper_logger->attribute("isIgnor", getTableManager().isIgnore()); #endif if(xTextAppend.is() && ! getTableManager( ).isIgnore()) diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx index 191bc50a9..a5338dc80 100644 --- a/writerfilter/source/dmapper/FontTable.cxx +++ b/writerfilter/source/dmapper/FontTable.cxx @@ -39,7 +39,7 @@ namespace dmapper struct FontTable_Impl { - std::vector< FontEntry > aFontEntries; + std::vector< FontEntry::Pointer_t > aFontEntries; FontEntry::Pointer_t pCurrentEntry; FontTable_Impl() {} }; @@ -568,7 +568,7 @@ void FontTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_ m_pImpl->pCurrentEntry.reset(new FontEntry); ref->resolve(*this); //append it to the table - m_pImpl->aFontEntries.push_back( *m_pImpl->pCurrentEntry ); + m_pImpl->aFontEntries.push_back( m_pImpl->pCurrentEntry ); m_pImpl->pCurrentEntry.reset(); } /*-- 19.06.2006 12:04:34--------------------------------------------------- @@ -657,12 +657,9 @@ void FontTable::endShape( ) -----------------------------------------------------------------------*/ const FontEntry::Pointer_t FontTable::getFontEntry(sal_uInt32 nIndex) { - FontEntry::Pointer_t pRet; - if(m_pImpl->aFontEntries.size() > nIndex) - { - pRet.reset(&m_pImpl->aFontEntries[nIndex]); - } - return pRet; + return (m_pImpl->aFontEntries.size() > nIndex) + ? m_pImpl->aFontEntries[nIndex] + : FontEntry::Pointer_t(); } /*-- 21.06.2006 11:21:38--------------------------------------------------- diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 297cd552e..3712f0a3a 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 ); diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx index 9607478d0..9942df5ae 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" diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx index 2f0ac8d25..4eb175263 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx @@ -193,9 +193,6 @@ void SAL_CALL OOXMLFastDocumentHandler::startDocument() void SAL_CALL OOXMLFastDocumentHandler::endDocument() throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_CONTEXT_STACK - OOXMLFastContextHandler::dumpOpenContexts(); -#endif } void SAL_CALL OOXMLFastDocumentHandler::setDocumentLocator |