diff options
Diffstat (limited to 'sax')
-rw-r--r-- | sax/prj/build.lst | 1 | ||||
-rw-r--r-- | sax/prj/d.lst | 1 | ||||
-rw-r--r-- | sax/source/expatwrap/sax_expat.cxx | 6 | ||||
-rw-r--r-- | sax/source/fastparser/facreg.cxx | 6 | ||||
-rw-r--r-- | sax/test/sax/exports.dxp | 3 | ||||
-rw-r--r-- | sax/test/sax/testsax.cxx | 8 | ||||
-rw-r--r-- | sax/test/saxdemo.cxx | 46 | ||||
-rw-r--r-- | sax/test/testcomponent.cxx | 17 |
8 files changed, 37 insertions, 51 deletions
diff --git a/sax/prj/build.lst b/sax/prj/build.lst index 0a8a3789e1d8..940ef70e585c 100644 --- a/sax/prj/build.lst +++ b/sax/prj/build.lst @@ -1,3 +1,4 @@ ax sax : offapi cppuhelper EXPAT:expat comphelper LIBXSLT:libxslt NULL ax sax\prj nmake - all ax_prj NULL +ax sax\test nmake - all ax_test NULL diff --git a/sax/prj/d.lst b/sax/prj/d.lst index 7416200538a6..54fab394e8fc 100644 --- a/sax/prj/d.lst +++ b/sax/prj/d.lst @@ -1 +1,2 @@ +..\%__SRC%\lib\*.a %_DEST%\lib\*.a ..\inc\sax\tools\documenthandleradapter.hxx %_DEST%\inc\sax\tools\documenthandleradapter.hxx diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index 06258510ceca..34df91a83a26 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -1029,12 +1029,6 @@ using namespace sax_expatwrap; extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { diff --git a/sax/source/fastparser/facreg.cxx b/sax/source/fastparser/facreg.cxx index e4152cfc1b58..8352b0cf4824 100644 --- a/sax/source/fastparser/facreg.cxx +++ b/sax/source/fastparser/facreg.cxx @@ -35,12 +35,6 @@ Reference< XInterface > SAL_CALL FastSaxSerializer_CreateInstance( const Referen extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; diff --git a/sax/test/sax/exports.dxp b/sax/test/sax/exports.dxp index ce95ae0f8deb..86214860d555 100644 --- a/sax/test/sax/exports.dxp +++ b/sax/test/sax/exports.dxp @@ -1,3 +1,2 @@ -component_getImplementationEnvironment component_getFactory -component_writeInfo
\ No newline at end of file +component_writeInfo diff --git a/sax/test/sax/testsax.cxx b/sax/test/sax/testsax.cxx index db58f193088f..aad3b9ed5f7c 100644 --- a/sax/test/sax/testsax.cxx +++ b/sax/test/sax/testsax.cxx @@ -786,14 +786,6 @@ using namespace sax_test; extern "C" { - -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - - sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey ) { diff --git a/sax/test/saxdemo.cxx b/sax/test/saxdemo.cxx index 6aedffcb42b6..b00eb0703672 100644 --- a/sax/test/saxdemo.cxx +++ b/sax/test/saxdemo.cxx @@ -36,6 +36,7 @@ #include <stdio.h> #include <vector> +#include <cstring> #include <com/sun/star/registry/XImplementationRegistration.hpp> #include <com/sun/star/lang/XComponent.hpp> @@ -92,7 +93,7 @@ public: { return readBytes( aData, nMaxBytesToRead ); } - virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) + virtual void SAL_CALL skipBytes( sal_Int32 /* nBytesToSkip */ ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) { // not implemented @@ -107,8 +108,8 @@ public: { // not needed } - sal_Int32 nPos; Sequence< sal_Int8> m_seq; + sal_Int32 nPos; }; //------------------------------- @@ -155,11 +156,11 @@ public: // Error handler Reference < XInterface >() , aSAXParseException ); } - virtual void SAL_CALL fatalError(const Any& aSAXParseException) throw (SAXException, RuntimeException) + virtual void SAL_CALL fatalError(const Any& /* aSAXParseException */) throw (SAXException, RuntimeException) { printf( "Fatal Error !\n" ); } - virtual void SAL_CALL warning(const Any& aSAXParseException) throw (SAXException, RuntimeException) + virtual void SAL_CALL warning(const Any& /* aSAXParseException */) throw (SAXException, RuntimeException) { printf( "Warning !\n" ); } @@ -182,7 +183,7 @@ public: // ExtendedDocumentHandler m_iElementCount, m_iAttributeCount, m_iWhitespaceCount , m_iCharCount ); } - virtual void SAL_CALL startElement(const OUString& aName, + virtual void SAL_CALL startElement(const OUString& /* aName */, const Reference< XAttributeList > & xAttribs) throw (SAXException,RuntimeException) { @@ -190,7 +191,7 @@ public: // ExtendedDocumentHandler m_iAttributeCount += xAttribs->getLength(); } - virtual void SAL_CALL endElement(const OUString& aName) throw (SAXException,RuntimeException) + virtual void SAL_CALL endElement(const OUString& /* aName */) throw (SAXException,RuntimeException) { // ignored } @@ -204,12 +205,12 @@ public: // ExtendedDocumentHandler m_iWhitespaceCount += aWhitespaces.getLength(); } - virtual void SAL_CALL processingInstruction(const OUString& aTarget, const OUString& aData) throw (SAXException,RuntimeException) + virtual void SAL_CALL processingInstruction(const OUString& /* aTarget */, const OUString& /* aData */) throw (SAXException,RuntimeException) { // ignored } - virtual void SAL_CALL setDocumentLocator(const Reference< XLocator> & xLocator) + virtual void SAL_CALL setDocumentLocator(const Reference< XLocator> & /* xLocator */) throw (SAXException,RuntimeException) { // ignored @@ -218,7 +219,7 @@ public: // ExtendedDocumentHandler virtual InputSource SAL_CALL resolveEntity( const OUString& sPublicId, const OUString& sSystemId) - throw (SAXException,RuntimeException) + throw (RuntimeException) { InputSource source; source.sSystemId = sSystemId; @@ -233,13 +234,13 @@ public: // ExtendedDocumentHandler virtual void SAL_CALL startCDATA(void) throw (SAXException,RuntimeException) { } - virtual void SAL_CALL endCDATA(void) throw (SAXException,RuntimeException) + virtual void SAL_CALL endCDATA(void) throw (RuntimeException) { } - virtual void SAL_CALL comment(const OUString& sComment) throw (SAXException,RuntimeException) + virtual void SAL_CALL comment(const OUString& /* sComment */) throw (SAXException,RuntimeException) { } - virtual void SAL_CALL unknown(const OUString& sString) throw (SAXException,RuntimeException) + virtual void SAL_CALL unknown(const OUString& /* sString */) throw (SAXException,RuntimeException) { } @@ -289,13 +290,13 @@ private: struct TagAttribute { TagAttribute(){} - TagAttribute( const OUString &sName, - const OUString &sType , - const OUString &sValue ) + TagAttribute( const OUString &s_Name, + const OUString &s_Type , + const OUString &s_Value ) { - this->sName = sName; - this->sType = sType; - this->sValue = sValue; + this->sName = s_Name; + this->sType = s_Type; + this->sValue = s_Value; } OUString sName; @@ -329,7 +330,7 @@ AttributeListImpl::AttributeListImpl( const AttributeListImpl &r ) OUString AttributeListImpl::getNameByIndex(sal_Int16 i) throw (RuntimeException) { - if( i < m_pImpl->vecAttribute.size() ) { + if( i < sal::static_int_cast<sal_Int16>(m_pImpl->vecAttribute.size()) ) { return m_pImpl->vecAttribute[i].sName; } return OUString(); @@ -338,7 +339,7 @@ OUString AttributeListImpl::getNameByIndex(sal_Int16 i) throw (RuntimeException OUString AttributeListImpl::getTypeByIndex(sal_Int16 i) throw (RuntimeException) { - if( i < m_pImpl->vecAttribute.size() ) { + if( i < sal::static_int_cast<sal_Int16>(m_pImpl->vecAttribute.size()) ) { return m_pImpl->vecAttribute[i].sType; } return OUString(); @@ -346,7 +347,7 @@ OUString AttributeListImpl::getTypeByIndex(sal_Int16 i) throw (RuntimeException OUString AttributeListImpl::getValueByIndex(sal_Int16 i) throw (RuntimeException) { - if( i < m_pImpl->vecAttribute.size() ) { + if( i < sal::static_int_cast<sal_Int16>(m_pImpl->vecAttribute.size()) ) { return m_pImpl->vecAttribute[i].sValue; } return OUString(); @@ -418,11 +419,12 @@ void writeParagraphHelper( { int nMax = s.getLength(); int nStart = 0; + int n = 1; Sequence<sal_uInt16> seq( s.getLength() ); memcpy( seq.getArray() , s.getStr() , s.getLength() * sizeof( sal_uInt16 ) ); - for( int n = 1 ; n < nMax ; n++ ){ + for( n = 1 ; n < nMax ; n++ ){ if( 32 == seq.getArray()[n] ) { r->allowLineBreak(); r->characters( s.copy( nStart , n - nStart ) ); diff --git a/sax/test/testcomponent.cxx b/sax/test/testcomponent.cxx index e395add9f662..c3b3e0a77423 100644 --- a/sax/test/testcomponent.cxx +++ b/sax/test/testcomponent.cxx @@ -82,7 +82,8 @@ int main (int argc, char **argv) OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) ); xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY ); } - catch( Exception & ) { + catch (const Exception&) + { printf( "Couldn't create ImplementationRegistration service\n" ); exit(1); } @@ -107,7 +108,8 @@ int main (int argc, char **argv) xSimpleReg ); } } - catch( Exception &e ) { + catch (const Exception &e) + { printf( "Couldn't reach dll %s\n" , szBuf ); printf( "%s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ); @@ -134,7 +136,7 @@ int main (int argc, char **argv) aDllName, xSimpleReg ); } - catch( Exception & e ) + catch (const Exception&) { printf( "Couldn't reach dll %s\n" , szBuf ); exit(1); @@ -178,12 +180,13 @@ int main (int argc, char **argv) nNewHandle = xTest->test( OStringToOUString( argv[1] , RTL_TEXTENCODING_ASCII_US ) , x , nHandle ); } - catch( Exception & e ) { + catch (const Exception &e) + { OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ); printf( "testcomponent : uncaught exception %s\n" , o.getStr() ); exit(1); } - catch( ... ) + catch (...) { printf( "testcomponent : uncaught unknown exception\n" ); exit(1); @@ -195,7 +198,7 @@ int main (int argc, char **argv) Sequence<OUString> seqWarnings = xTest->getWarnings(); if( seqWarnings.getLength() > nWarningCount ) { - printf( "Warnings during test %d!\n" , nHandle ); + printf( "Warnings during test %" SAL_PRIxUINT32 "!\n" , nHandle ); for( ; nWarningCount < seqWarnings.getLength() ; nWarningCount ++ ) { OString o = OUStringToOString( @@ -206,7 +209,7 @@ int main (int argc, char **argv) if( seqErrors.getLength() > nErrorCount ) { - printf( "Errors during test %d!\n" , nHandle ); + printf( "Errors during test %" SAL_PRIxUINT32 "!\n" , nHandle ); for( ; nErrorCount < seqErrors.getLength() ; nErrorCount ++ ) { OString o = OUStringToOString( seqErrors.getArray()[nErrorCount], RTL_TEXTENCODING_ASCII_US ); |