From 0a4b0db012d6a800cb77ce10e72dffb62a878049 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Wed, 10 May 2017 00:29:49 +0200 Subject: xmlsecurity/source/framework: un-screw-up indent This was painful to read. Change-Id: I34c8038f5db1b9d3f60e9541fa09bb803a680b54 Reviewed-on: https://gerrit.libreoffice.org/37450 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens --- xmlsecurity/source/framework/buffernode.cxx | 28 ++--- .../source/framework/saxeventkeeperimpl.cxx | 138 ++++++++++----------- 2 files changed, 83 insertions(+), 83 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx index 462a98c4ee62..8a171ffa18f8 100644 --- a/xmlsecurity/source/framework/buffernode.cxx +++ b/xmlsecurity/source/framework/buffernode.cxx @@ -614,30 +614,30 @@ const BufferNode* BufferNode::getNextNodeByTreeOrder() const * 4. otherwise, no "next" node exists. ******************************************************************************/ { - /* - * If this buffer node has m_vChildren, then return the first - * child. - */ + /* + * If this buffer node has m_vChildren, then return the first + * child. + */ if (hasChildren()) { return getFirstChild(); } - /* - * Otherwise, it this buffer node has a following sibling, - * then return that sibling. - */ + /* + * Otherwise, it this buffer node has a following sibling, + * then return that sibling. + */ BufferNode* pNextSibling = const_cast(getNextSibling()); if (pNextSibling != nullptr) { return pNextSibling; } - /* - * Otherwise, it this buffer node has parent, then return - * its parent's following sibling. - */ - BufferNode* pNode = const_cast(this); + /* + * Otherwise, it this buffer node has parent, then return + * its parent's following sibling. + */ + BufferNode* pNode = const_cast(this); BufferNode* pParent; BufferNode* pNextSiblingParent = nullptr; @@ -655,7 +655,7 @@ const BufferNode* BufferNode::getNextNodeByTreeOrder() const } pNode = pParent; - }while (pNextSiblingParent == nullptr); + } while (pNextSiblingParent == nullptr); return pNextSiblingParent; } diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx index 7be610c4db88..0aa849fcb8da 100644 --- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx +++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx @@ -437,39 +437,39 @@ void SAXEventKeeperImpl::smashBufferNode( { BufferNode* pParent = const_cast(pBufferNode->getParent()); - /* - * delete the XML data - */ + /* + * delete the XML data + */ if (pParent == m_pRootBufferNode) { bool bIsNotBlocking = (m_pCurrentBlockingBufferNode == nullptr); bool bIsBlockInside = false; bool bIsBlockingAfterward = false; - /* - * If this is a blocker, then remove any out-element data - * which caused by blocking. The removal process will stop - * at the next blocker to avoid removing any useful data. - */ + /* + * If this is a blocker, then remove any out-element data + * which caused by blocking. The removal process will stop + * at the next blocker to avoid removing any useful data. + */ if (bClearRoot) { cssu::Sequence< cssu::Reference< cssxw::XXMLElementWrapper > > aChildElements = collectChildWorkingElement(m_pRootBufferNode); - /* - * the clearUselessData only clearup the content in the - * node, not the node itself. - */ + /* + * the clearUselessData only clearup the content in the + * node, not the node itself. + */ m_xXMLDocument->clearUselessData(m_pRootBufferNode->getXMLElement(), aChildElements, bIsNotBlocking?(nullptr): (m_pCurrentBlockingBufferNode->getXMLElement())); - /* - * remove the node if it is empty, then if its parent is also - * empty, remove it, then if the next parent is also empty, - * remove it,..., until parent become null. - */ + /* + * remove the node if it is empty, then if its parent is also + * empty, remove it, then if the next parent is also empty, + * remove it,..., until parent become null. + */ m_xXMLDocument->collapse( m_pRootBufferNode->getXMLElement() ); } @@ -507,20 +507,20 @@ void SAXEventKeeperImpl::smashBufferNode( cssu::Sequence< cssu::Reference< cssxw::XXMLElementWrapper > > aChildElements = collectChildWorkingElement(pBufferNode); - /* - * the clearUselessData only clearup the content in the - * node, not the node itself. - */ + /* + * the clearUselessData only clearup the content in the + * node, not the node itself. + */ m_xXMLDocument->clearUselessData(pBufferNode->getXMLElement(), aChildElements, bIsBlockInside?(m_pCurrentBlockingBufferNode->getXMLElement()): (nullptr)); - /* - * remove the node if it is empty, then if its parent is also - * empty, remove it, then if the next parent is also empty, - * remove it,..., until parent become null. - */ + /* + * remove the node if it is empty, then if its parent is also + * empty, remove it, then if the next parent is also empty, + * remove it,..., until parent become null. + */ m_xXMLDocument->collapse( pBufferNode->getXMLElement() ); } } @@ -650,8 +650,8 @@ void SAXEventKeeperImpl::releaseElementMarkBuffer() cssxc::sax::ElementMarkPriority nPriority = pElementCollector->getPriority(); /* - * Delete the EC from the buffer node. - */ + * Delete the EC from the buffer node. + */ BufferNode* pBufferNode = pElementCollector->getBufferNode(); pBufferNode->removeElementCollector(pElementCollector); @@ -678,34 +678,34 @@ void SAXEventKeeperImpl::releaseElementMarkBuffer() * it is a Blocker */ { - /* - * Delete the TH from the buffer node. - */ + /* + * Delete the TH from the buffer node. + */ BufferNode *pBufferNode = pElementMark->getBufferNode(); pBufferNode->setBlocker(nullptr); - /* - * If there is a following handler and no blocking now, then - * forward this event - */ + /* + * If there is a following handler and no blocking now, then + * forward this event + */ if (m_pCurrentBlockingBufferNode == pBufferNode) { - /* - * Before forwarding, the next blocking point needs to be - * found. - */ + /* + * Before forwarding, the next blocking point needs to be + * found. + */ m_pCurrentBlockingBufferNode = findNextBlockingBufferNode(pBufferNode); - /* - * Forward the blocked events between these two STHs. - */ - if (m_xNextHandler.is()) - { - BufferNode* pTempCurrentBufferNode = m_pCurrentBufferNode; - BufferNode* pTempCurrentBlockingBufferNode = m_pCurrentBlockingBufferNode; + /* + * Forward the blocked events between these two STHs. + */ + if (m_xNextHandler.is()) + { + BufferNode* pTempCurrentBufferNode = m_pCurrentBufferNode; + BufferNode* pTempCurrentBlockingBufferNode = m_pCurrentBlockingBufferNode; - m_pCurrentBufferNode = pBufferNode; - m_pCurrentBlockingBufferNode = nullptr; + m_pCurrentBufferNode = pBufferNode; + m_pCurrentBlockingBufferNode = nullptr; m_bIsForwarding = true; @@ -822,9 +822,9 @@ sal_Int32 SAXEventKeeperImpl::createElementCollector( m_vElementMarkBuffers.push_back( pElementCollector ); - /* - * All the new EC to initial EC array. - */ + /* + * All the new EC to initial EC array. + */ m_vNewElementCollectors.push_back( pElementCollector ); return nId; @@ -913,7 +913,7 @@ void SAL_CALL SAXEventKeeperImpl::setElement( BufferNode* pBufferNode = pElementMark->getBufferNode(); if (pBufferNode != nullptr) { - bool bIsCurrent = m_xXMLDocument->isCurrent(pBufferNode->getXMLElement()); + bool bIsCurrent = m_xXMLDocument->isCurrent(pBufferNode->getXMLElement()); pBufferNode->setXMLElement(aElement); if (bIsCurrent) @@ -1035,10 +1035,10 @@ void SAL_CALL SAXEventKeeperImpl::startElement( const OUString& aName, const cssu::Reference< cssxs::XAttributeList >& xAttribs ) { - /* - * If there is a following handler and no blocking now, then - * forward this event - */ + /* + * If there is a following handler and no blocking now, then + * forward this event + */ if ((m_pCurrentBlockingBufferNode == nullptr) && (m_xNextHandler.is()) && (!m_bIsForwarding) && @@ -1046,11 +1046,11 @@ void SAL_CALL SAXEventKeeperImpl::startElement( { m_xNextHandler->startElement(aName, xAttribs); } - /* - * If not forwarding, buffer this startElement. - */ - if (!m_bIsForwarding) - { + /* + * If not forwarding, buffer this startElement. + */ + if (!m_bIsForwarding) + { sal_Int32 nLength = xAttribs->getLength(); cssu::Sequence< cssxcsax::XMLAttribute > aAttributes (nLength); @@ -1064,20 +1064,20 @@ void SAL_CALL SAXEventKeeperImpl::startElement( } BufferNode* pBufferNode = addNewElementMarkBuffers(); - if (pBufferNode != nullptr) - { + if (pBufferNode != nullptr) + { setCurrentBufferNode(pBufferNode); } } void SAL_CALL SAXEventKeeperImpl::endElement( const OUString& aName ) { - bool bIsCurrent = m_xXMLDocument->isCurrent(m_pCurrentBufferNode->getXMLElement()); + bool bIsCurrent = m_xXMLDocument->isCurrent(m_pCurrentBufferNode->getXMLElement()); - /* - * If there is a following handler and no blocking now, then - * forward this event - */ + /* + * If there is a following handler and no blocking now, then + * forward this event + */ if ((m_pCurrentBlockingBufferNode == nullptr) && (m_xNextHandler.is()) && (!m_bIsForwarding)) @@ -1099,7 +1099,7 @@ void SAL_CALL SAXEventKeeperImpl::endElement( const OUString& aName ) * the current buffer node is waiting for the current element, * then let it notify. */ - if (bIsCurrent && (m_pCurrentBufferNode != m_pRootBufferNode)) + if (bIsCurrent && (m_pCurrentBufferNode != m_pRootBufferNode)) { BufferNode* pOldCurrentBufferNode = m_pCurrentBufferNode; m_pCurrentBufferNode = const_cast(m_pCurrentBufferNode->getParent()); -- cgit v1.2.3