diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2013-08-11 15:22:59 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-08-12 06:59:10 +0000 |
commit | 4eb1232fbcf928e90267318e281aea5e8c9de6db (patch) | |
tree | b2fb6f3748a831ebe4ce3cb405add3012a86f94c /xmlscript/source/xml_helper | |
parent | 9499df9f8c73ac6370c389683ce2028e6432441e (diff) |
fdo#62475 removed pointless comments
Change-Id: I13e7eedaa5f0f116bd01834fc6db576c39350163
Reviewed-on: https://gerrit.libreoffice.org/5348
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'xmlscript/source/xml_helper')
-rw-r--r-- | xmlscript/source/xml_helper/xml_byteseq.cxx | 24 | ||||
-rw-r--r-- | xmlscript/source/xml_helper/xml_element.cxx | 21 | ||||
-rw-r--r-- | xmlscript/source/xml_helper/xml_impctx.cxx | 50 |
3 files changed, 16 insertions, 79 deletions
diff --git a/xmlscript/source/xml_helper/xml_byteseq.cxx b/xmlscript/source/xml_helper/xml_byteseq.cxx index b6dee8dc59c5..549056ed0cea 100644 --- a/xmlscript/source/xml_helper/xml_byteseq.cxx +++ b/xmlscript/source/xml_helper/xml_byteseq.cxx @@ -22,7 +22,6 @@ #include <cppuhelper/implbase1.hxx> #include <xmlscript/xml_helper.hxx> - using namespace osl; using namespace com::sun::star; using namespace com::sun::star::uno; @@ -32,7 +31,6 @@ using ::rtl::ByteSequence; namespace xmlscript { -//================================================================================================== class BSeqInputStream : public ::cppu::WeakImplHelper1< io::XInputStream > { @@ -61,7 +59,7 @@ public: virtual void SAL_CALL closeInput() throw (io::NotConnectedException, io::IOException, RuntimeException); }; -//__________________________________________________________________________________________________ + sal_Int32 BSeqInputStream::readBytes( Sequence< sal_Int8 > & rData, sal_Int32 nBytesToRead ) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, RuntimeException) @@ -75,34 +73,31 @@ sal_Int32 BSeqInputStream::readBytes( _nPos += nBytesToRead; return nBytesToRead; } -//__________________________________________________________________________________________________ + sal_Int32 BSeqInputStream::readSomeBytes( Sequence< sal_Int8 > & rData, sal_Int32 nMaxBytesToRead ) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, RuntimeException) { return readBytes( rData, nMaxBytesToRead ); } -//__________________________________________________________________________________________________ + void BSeqInputStream::skipBytes( sal_Int32 /*nBytesToSkip*/ ) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, RuntimeException) { } -//__________________________________________________________________________________________________ + sal_Int32 BSeqInputStream::available() throw (io::NotConnectedException, io::IOException, RuntimeException) { return (_seq.getLength() - _nPos); } -//__________________________________________________________________________________________________ + void BSeqInputStream::closeInput() throw (io::NotConnectedException, io::IOException, RuntimeException) { } -//################################################################################################## - -//================================================================================================== class BSeqOutputStream : public ::cppu::WeakImplHelper1< io::XOutputStream > { @@ -123,7 +118,7 @@ public: virtual void SAL_CALL closeOutput() throw (io::NotConnectedException, io::BufferSizeExceededException, RuntimeException); }; -//__________________________________________________________________________________________________ + void BSeqOutputStream::writeBytes( Sequence< sal_Int8 > const & rData ) throw (io::NotConnectedException, io::BufferSizeExceededException, RuntimeException) { @@ -133,27 +128,22 @@ void BSeqOutputStream::writeBytes( Sequence< sal_Int8 > const & rData ) (char const *)rData.getConstArray(), rData.getLength() ); } -//__________________________________________________________________________________________________ void BSeqOutputStream::flush() throw (io::NotConnectedException, io::BufferSizeExceededException, RuntimeException) { } -//__________________________________________________________________________________________________ + void BSeqOutputStream::closeOutput() throw (io::NotConnectedException, io::BufferSizeExceededException, RuntimeException) { } -//################################################################################################## - -//================================================================================================== Reference< io::XInputStream > SAL_CALL createInputStream( ByteSequence const & rInData ) SAL_THROW(()) { return new BSeqInputStream( rInData ); } -//================================================================================================== Reference< io::XOutputStream > SAL_CALL createOutputStream( ByteSequence * pOutData ) SAL_THROW(()) { diff --git a/xmlscript/source/xml_helper/xml_element.cxx b/xmlscript/source/xml_helper/xml_element.cxx index afb9a6d54422..97b52995326f 100644 --- a/xmlscript/source/xml_helper/xml_element.cxx +++ b/xmlscript/source/xml_helper/xml_element.cxx @@ -19,33 +19,31 @@ #include <xmlscript/xml_helper.hxx> - using namespace com::sun::star; using namespace com::sun::star::uno; namespace xmlscript { -//__________________________________________________________________________________________________ void XMLElement::addAttribute( OUString const & rAttrName, OUString const & rValue ) SAL_THROW(()) { _attrNames.push_back( rAttrName ); _attrValues.push_back( rValue ); } -//__________________________________________________________________________________________________ + void XMLElement::addSubElement( Reference< xml::sax::XAttributeList > const & xElem ) SAL_THROW(()) { _subElems.push_back( xElem ); } -//__________________________________________________________________________________________________ + Reference< xml::sax::XAttributeList > XMLElement::getSubElement( sal_Int32 nIndex ) SAL_THROW(()) { return _subElems[ (size_t)nIndex ]; } -//__________________________________________________________________________________________________ + void XMLElement::dumpSubElements( Reference< xml::sax::XDocumentHandler > const & xOut ) { for ( size_t nPos = 0; nPos < _subElems.size(); ++nPos ) @@ -54,7 +52,7 @@ void XMLElement::dumpSubElements( Reference< xml::sax::XDocumentHandler > const pElem->dump( xOut ); } } -//__________________________________________________________________________________________________ + void XMLElement::dump( Reference< xml::sax::XDocumentHandler > const & xOut ) { xOut->ignorableWhitespace( OUString() ); @@ -66,20 +64,19 @@ void XMLElement::dump( Reference< xml::sax::XDocumentHandler > const & xOut ) } // XAttributeList -//__________________________________________________________________________________________________ sal_Int16 XMLElement::getLength() throw (RuntimeException) { return static_cast<sal_Int16>(_attrNames.size()); } -//__________________________________________________________________________________________________ + OUString XMLElement::getNameByIndex( sal_Int16 nPos ) throw (RuntimeException) { OSL_ASSERT( (size_t)nPos < _attrNames.size() ); return _attrNames[ nPos ]; } -//__________________________________________________________________________________________________ + OUString XMLElement::getTypeByIndex( sal_Int16 nPos ) throw (RuntimeException) { @@ -88,21 +85,21 @@ OUString XMLElement::getTypeByIndex( sal_Int16 nPos ) // xxx todo return OUString(); } -//__________________________________________________________________________________________________ + OUString XMLElement::getTypeByName( OUString const & /*rName*/ ) throw (RuntimeException) { // xxx todo return OUString(); } -//__________________________________________________________________________________________________ + OUString XMLElement::getValueByIndex( sal_Int16 nPos ) throw (RuntimeException) { OSL_ASSERT( (size_t)nPos < _attrNames.size() ); return _attrValues[ nPos ]; } -//__________________________________________________________________________________________________ + OUString XMLElement::getValueByName( OUString const & rName ) throw (RuntimeException) { diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx index 11906bb9775b..0121f291d234 100644 --- a/xmlscript/source/xml_helper/xml_impctx.cxx +++ b/xmlscript/source/xml_helper/xml_impctx.cxx @@ -80,7 +80,6 @@ typedef ::std::vector< ElementEntry * > t_ElementVector; class ExtendedAttributes; -//============================================================================== struct MGuard { Mutex * m_pMutex; @@ -91,7 +90,6 @@ struct MGuard { if (m_pMutex) m_pMutex->release(); } }; -//============================================================================== class DocumentHandlerImpl : public ::cppu::WeakImplHelper3< xml::sax::XDocumentHandler, xml::input::XNamespaceMapping, @@ -183,7 +181,6 @@ public: throw (container::NoSuchElementException, RuntimeException); }; -//______________________________________________________________________________ DocumentHandlerImpl::DocumentHandlerImpl( Reference< xml::input::XRoot > const & xRoot, bool bSingleThreadedUse ) @@ -204,7 +201,6 @@ DocumentHandlerImpl::DocumentHandlerImpl( m_pMutex = new Mutex(); } -//______________________________________________________________________________ DocumentHandlerImpl::~DocumentHandlerImpl() throw () { if (m_pMutex != 0) @@ -216,7 +212,6 @@ DocumentHandlerImpl::~DocumentHandlerImpl() throw () } } -//______________________________________________________________________________ inline Reference< xml::input::XElement > DocumentHandlerImpl::getCurrentElement() const { @@ -227,7 +222,6 @@ DocumentHandlerImpl::getCurrentElement() const return m_elements.back()->m_xElement; } -//______________________________________________________________________________ inline sal_Int32 DocumentHandlerImpl::getUidByURI( OUString const & rURI ) { MGuard guard( m_pMutex ); @@ -250,7 +244,6 @@ inline sal_Int32 DocumentHandlerImpl::getUidByURI( OUString const & rURI ) return m_nLastURI_lookup; } -//______________________________________________________________________________ inline sal_Int32 DocumentHandlerImpl::getUidByPrefix( OUString const & rPrefix ) { @@ -276,7 +269,6 @@ inline sal_Int32 DocumentHandlerImpl::getUidByPrefix( return m_nLastPrefix_lookup; } -//______________________________________________________________________________ inline void DocumentHandlerImpl::pushPrefix( OUString const & rPrefix, OUString const & rURI ) { @@ -302,7 +294,6 @@ inline void DocumentHandlerImpl::pushPrefix( m_nLastPrefix_lookup = nUid; } -//______________________________________________________________________________ inline void DocumentHandlerImpl::popPrefix( OUString const & rPrefix ) { @@ -322,7 +313,6 @@ inline void DocumentHandlerImpl::popPrefix( m_aLastPrefix_lookup = m_sXMLNS_PREFIX_UNKNOWN; } -//______________________________________________________________________________ inline void DocumentHandlerImpl::getElementName( OUString const & rQName, sal_Int32 * pUid, OUString * pLocalName ) { @@ -332,8 +322,6 @@ inline void DocumentHandlerImpl::getElementName( nColonPos >= 0 ? rQName.copy( 0, nColonPos ) : OUString() ); } - -//============================================================================== class ExtendedAttributes : public ::cppu::WeakImplHelper1< xml::input::XAttributes > { @@ -384,7 +372,6 @@ public: throw (RuntimeException); }; -//______________________________________________________________________________ inline ExtendedAttributes::ExtendedAttributes( sal_Int32 nAttributes, sal_Int32 * pUids, OUString * pPrefixes, @@ -407,7 +394,6 @@ inline ExtendedAttributes::ExtendedAttributes( } } -//______________________________________________________________________________ ExtendedAttributes::~ExtendedAttributes() throw () { m_pHandler->release(); @@ -419,19 +405,14 @@ ExtendedAttributes::~ExtendedAttributes() throw () delete [] m_pValues; } - -//############################################################################## - // XServiceInfo -//______________________________________________________________________________ OUString DocumentHandlerImpl::getImplementationName() throw (RuntimeException) { return getImplementationName_DocumentHandlerImpl(); } -//______________________________________________________________________________ sal_Bool DocumentHandlerImpl::supportsService( OUString const & servicename ) throw (RuntimeException) @@ -445,7 +426,6 @@ sal_Bool DocumentHandlerImpl::supportsService( return sal_False; } -//______________________________________________________________________________ Sequence< OUString > DocumentHandlerImpl::getSupportedServiceNames() throw (RuntimeException) { @@ -454,7 +434,6 @@ Sequence< OUString > DocumentHandlerImpl::getSupportedServiceNames() // XInitialization -//______________________________________________________________________________ void DocumentHandlerImpl::initialize( Sequence< Any > const & arguments ) throw (Exception) @@ -473,10 +452,8 @@ void DocumentHandlerImpl::initialize( } } - // XNamespaceMapping -//______________________________________________________________________________ sal_Int32 DocumentHandlerImpl::getUidByUri( OUString const & Uri ) throw (RuntimeException) { @@ -485,7 +462,6 @@ sal_Int32 DocumentHandlerImpl::getUidByUri( OUString const & Uri ) return uid; } -//______________________________________________________________________________ OUString DocumentHandlerImpl::getUriByUid( sal_Int32 Uid ) throw (container::NoSuchElementException, RuntimeException) { @@ -500,24 +476,20 @@ OUString DocumentHandlerImpl::getUriByUid( sal_Int32 Uid ) throw container::NoSuchElementException( "no such xmlns uid!" , static_cast< OWeakObject * >(this) ); } - // XDocumentHandler -//______________________________________________________________________________ void DocumentHandlerImpl::startDocument() throw (xml::sax::SAXException, RuntimeException) { m_xRoot->startDocument( static_cast< xml::input::XNamespaceMapping * >( this ) ); } -//______________________________________________________________________________ void DocumentHandlerImpl::endDocument() throw (xml::sax::SAXException, RuntimeException) { m_xRoot->endDocument(); } -//______________________________________________________________________________ void DocumentHandlerImpl::startElement( OUString const & rQElementName, Reference< xml::sax::XAttributeList > const & xAttribs ) @@ -654,7 +626,6 @@ void DocumentHandlerImpl::startElement( } } -//______________________________________________________________________________ void DocumentHandlerImpl::endElement( OUString const & rQElementName ) throw (xml::sax::SAXException, RuntimeException) @@ -698,7 +669,6 @@ void DocumentHandlerImpl::endElement( xCurrentElement->endElement(); } -//______________________________________________________________________________ void DocumentHandlerImpl::characters( OUString const & rChars ) throw (xml::sax::SAXException, RuntimeException) { @@ -707,7 +677,6 @@ void DocumentHandlerImpl::characters( OUString const & rChars ) xCurrentElement->characters( rChars ); } -//______________________________________________________________________________ void DocumentHandlerImpl::ignorableWhitespace( OUString const & rWhitespaces ) throw (xml::sax::SAXException, RuntimeException) @@ -717,7 +686,6 @@ void DocumentHandlerImpl::ignorableWhitespace( xCurrentElement->ignorableWhitespace( rWhitespaces ); } -//______________________________________________________________________________ void DocumentHandlerImpl::processingInstruction( OUString const & rTarget, OUString const & rData ) throw (xml::sax::SAXException, RuntimeException) @@ -729,7 +697,6 @@ void DocumentHandlerImpl::processingInstruction( m_xRoot->processingInstruction( rTarget, rData ); } -//______________________________________________________________________________ void DocumentHandlerImpl::setDocumentLocator( Reference< xml::sax::XLocator > const & xLocator ) throw (xml::sax::SAXException, RuntimeException) @@ -737,11 +704,8 @@ void DocumentHandlerImpl::setDocumentLocator( m_xRoot->setDocumentLocator( xLocator ); } -//############################################################################## - // XAttributes -//______________________________________________________________________________ sal_Int32 ExtendedAttributes::getIndexByQName( OUString const & rQName ) throw (RuntimeException) { @@ -755,14 +719,12 @@ sal_Int32 ExtendedAttributes::getIndexByQName( OUString const & rQName ) return -1; } -//______________________________________________________________________________ sal_Int32 ExtendedAttributes::getLength() throw (RuntimeException) { return m_nAttributes; } -//______________________________________________________________________________ OUString ExtendedAttributes::getLocalNameByIndex( sal_Int32 nIndex ) throw (RuntimeException) { @@ -772,7 +734,6 @@ OUString ExtendedAttributes::getLocalNameByIndex( sal_Int32 nIndex ) return OUString(); } -//______________________________________________________________________________ OUString ExtendedAttributes::getQNameByIndex( sal_Int32 nIndex ) throw (RuntimeException) { @@ -782,7 +743,6 @@ OUString ExtendedAttributes::getQNameByIndex( sal_Int32 nIndex ) return OUString(); } -//______________________________________________________________________________ OUString ExtendedAttributes::getTypeByIndex( sal_Int32 nIndex ) throw (RuntimeException) { @@ -791,7 +751,6 @@ OUString ExtendedAttributes::getTypeByIndex( sal_Int32 nIndex ) return OUString(); // unsupported } -//______________________________________________________________________________ OUString ExtendedAttributes::getValueByIndex( sal_Int32 nIndex ) throw (RuntimeException) { @@ -801,7 +760,6 @@ OUString ExtendedAttributes::getValueByIndex( sal_Int32 nIndex ) return OUString(); } -//______________________________________________________________________________ sal_Int32 ExtendedAttributes::getIndexByUidName( sal_Int32 nUid, OUString const & rLocalName ) throw (RuntimeException) @@ -816,7 +774,6 @@ sal_Int32 ExtendedAttributes::getIndexByUidName( return -1; } -//______________________________________________________________________________ sal_Int32 ExtendedAttributes::getUidByIndex( sal_Int32 nIndex ) throw (RuntimeException) { @@ -826,7 +783,6 @@ sal_Int32 ExtendedAttributes::getUidByIndex( sal_Int32 nIndex ) return -1; } -//______________________________________________________________________________ OUString ExtendedAttributes::getValueByUidName( sal_Int32 nUid, OUString const & rLocalName ) throw (RuntimeException) @@ -841,11 +797,6 @@ OUString ExtendedAttributes::getValueByUidName( return OUString(); } - -//############################################################################## - - -//============================================================================== Reference< xml::sax::XDocumentHandler > SAL_CALL createDocumentHandler( Reference< xml::input::XRoot > const & xRoot, bool bSingleThreadedUse ) @@ -860,7 +811,6 @@ Reference< xml::sax::XDocumentHandler > SAL_CALL createDocumentHandler( return Reference< xml::sax::XDocumentHandler >(); } -//------------------------------------------------------------------------------ Reference< XInterface > SAL_CALL create_DocumentHandlerImpl( SAL_UNUSED_PARAMETER Reference< XComponentContext > const & ) SAL_THROW( (Exception) ) |