This is an automated email from the ASF dual-hosted git repository. mseidel pushed a commit to branch AOO42X in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 27741b5992f1bed04dc156742b07a37ca0a875c4 Author: mseidel <msei...@apache.org> AuthorDate: Thu Oct 22 18:36:39 2020 +0200 Fixed typos, removed whitespace (cherry picked from commit a79a404b26934743545c6dafbc11b12ece90a8e1) --- main/bridges/test/testcomp.cxx | 255 ++++++++++----------- main/framework/source/classes/framecontainer.cxx | 14 +- .../source/recording/dispatchrecorder.cxx | 19 +- .../source/recording/dispatchrecordersupplier.cxx | 22 +- 4 files changed, 153 insertions(+), 157 deletions(-) diff --git a/main/bridges/test/testcomp.cxx b/main/bridges/test/testcomp.cxx index 4c193e7..fcddab6 100644 --- a/main/bridges/test/testcomp.cxx +++ b/main/bridges/test/testcomp.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -77,7 +77,7 @@ void parseCommandLine( char *argv[] , if( -1 == nIndex ) { *pConnection = sTemp; - *pProtocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "iiop" ) ); + *pProtocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "iiop" ) ); } else { @@ -86,13 +86,13 @@ void parseCommandLine( char *argv[] , } } -Any OInstanceProvider::queryInterface( const Type & aType ) throw ( RuntimeException ) +Any OInstanceProvider::queryInterface( const Type & aType ) throw ( RuntimeException ) { Any a = ::cppu::queryInterface( aType , SAL_STATIC_CAST( XInstanceProvider * , this ) ); if( a.hasValue() ) { - return a; + return a; } return OWeakObject::queryInterface( aType ); } @@ -132,7 +132,7 @@ public: {} // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException) + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException) { // execution time remains appr. constant any time Any aRet; @@ -153,9 +153,9 @@ public: } return aRet; } - virtual void SAL_CALL acquire() throw() + virtual void SAL_CALL acquire() throw() { osl_incrementInterlockedCount( &_nRef ); } - virtual void SAL_CALL release() throw() + virtual void SAL_CALL release() throw() { if (! osl_decrementInterlockedCount( &_nRef )) delete this; } // XServiceInfo @@ -163,97 +163,97 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString & rServiceName ) throw (RuntimeException); virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (RuntimeException); - // Attributes - virtual sal_Int32 SAL_CALL getLong_attr() throw(::com::sun::star::uno::RuntimeException) + // Attributes + virtual sal_Int32 SAL_CALL getLong_attr() throw(::com::sun::star::uno::RuntimeException) { return 0; } - virtual void SAL_CALL setLong_attr( sal_Int32 /* _attributelong */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setLong_attr( sal_Int32 /* _attributelong */) throw(::com::sun::star::uno::RuntimeException) {} - virtual sal_Int64 SAL_CALL getHyper_attr() throw(::com::sun::star::uno::RuntimeException) + virtual sal_Int64 SAL_CALL getHyper_attr() throw(::com::sun::star::uno::RuntimeException) { return 0; } - virtual void SAL_CALL setHyper_attr( sal_Int64 /* _attributehyper */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setHyper_attr( sal_Int64 /* _attributehyper */) throw(::com::sun::star::uno::RuntimeException) {} - virtual float SAL_CALL getFloat_attr() throw(::com::sun::star::uno::RuntimeException) + virtual float SAL_CALL getFloat_attr() throw(::com::sun::star::uno::RuntimeException) { return 0.0; } - virtual void SAL_CALL setFloat_attr( float /* _attributefloat */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setFloat_attr( float /* _attributefloat */) throw(::com::sun::star::uno::RuntimeException) {} - virtual double SAL_CALL getDouble_attr() throw(::com::sun::star::uno::RuntimeException) + virtual double SAL_CALL getDouble_attr() throw(::com::sun::star::uno::RuntimeException) { return 0.0; } - virtual void SAL_CALL setDouble_attr( double /* _attributedouble */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setDouble_attr( double /* _attributedouble */) throw(::com::sun::star::uno::RuntimeException) {} - virtual OUString SAL_CALL getString_attr() throw(::com::sun::star::uno::RuntimeException) + virtual OUString SAL_CALL getString_attr() throw(::com::sun::star::uno::RuntimeException) { return _aDummyString; } - virtual void SAL_CALL setString_attr( const ::rtl::OUString& /* _attributestring */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setString_attr( const ::rtl::OUString& /* _attributestring */) throw(::com::sun::star::uno::RuntimeException) {} - virtual Reference< XInterface > SAL_CALL getInterface_attr() throw(::com::sun::star::uno::RuntimeException) + virtual Reference< XInterface > SAL_CALL getInterface_attr() throw(::com::sun::star::uno::RuntimeException) { return Reference< XInterface >(); } - virtual void SAL_CALL setInterface_attr( const Reference< XInterface >& /* _attributeinterface */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setInterface_attr( const Reference< XInterface >& /* _attributeinterface */) throw(::com::sun::star::uno::RuntimeException) {} - virtual Any SAL_CALL getAny_attr() throw(::com::sun::star::uno::RuntimeException) + virtual Any SAL_CALL getAny_attr() throw(::com::sun::star::uno::RuntimeException) { return _aDummyAny; } - virtual void SAL_CALL setAny_attr( const Any& /* _attributeany */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setAny_attr( const Any& /* _attributeany */) throw(::com::sun::star::uno::RuntimeException) {} - virtual Sequence< Reference< XInterface > > SAL_CALL getSequence_attr() throw(::com::sun::star::uno::RuntimeException) + virtual Sequence< Reference< XInterface > > SAL_CALL getSequence_attr() throw(::com::sun::star::uno::RuntimeException) { return _aDummySequence; } - virtual void SAL_CALL setSequence_attr( const Sequence< Reference< XInterface > >& /* _attributesequence */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setSequence_attr( const Sequence< Reference< XInterface > >& /* _attributesequence */) throw(::com::sun::star::uno::RuntimeException) {} - virtual ComplexTypes SAL_CALL getStruct_attr() throw(::com::sun::star::uno::RuntimeException) + virtual ComplexTypes SAL_CALL getStruct_attr() throw(::com::sun::star::uno::RuntimeException) { return _aDummyStruct; } - virtual void SAL_CALL setStruct_attr( const ::com::sun::star::test::performance::ComplexTypes& /* _attributestruct */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setStruct_attr( const ::com::sun::star::test::performance::ComplexTypes& /* _attributestruct */) throw(::com::sun::star::uno::RuntimeException) {} - // Methods - virtual sal_Int32 SAL_CALL getLong() throw(::com::sun::star::uno::RuntimeException) + // Methods + virtual sal_Int32 SAL_CALL getLong() throw(::com::sun::star::uno::RuntimeException) { return 0; } - virtual void SAL_CALL setLong( sal_Int32 /* _long */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setLong( sal_Int32 /* _long */) throw(::com::sun::star::uno::RuntimeException) {} - virtual sal_Int64 SAL_CALL getHyper() throw(::com::sun::star::uno::RuntimeException) + virtual sal_Int64 SAL_CALL getHyper() throw(::com::sun::star::uno::RuntimeException) { return 0; } - virtual void SAL_CALL setHyper( sal_Int64 /* _hyper */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setHyper( sal_Int64 /* _hyper */) throw(::com::sun::star::uno::RuntimeException) {} - virtual float SAL_CALL getFloat() throw(::com::sun::star::uno::RuntimeException) + virtual float SAL_CALL getFloat() throw(::com::sun::star::uno::RuntimeException) { return 0; } - virtual void SAL_CALL setFloat( float /* _float */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setFloat( float /* _float */) throw(::com::sun::star::uno::RuntimeException) {} - virtual double SAL_CALL getDouble() throw(::com::sun::star::uno::RuntimeException) + virtual double SAL_CALL getDouble() throw(::com::sun::star::uno::RuntimeException) { return 0; } - virtual void SAL_CALL setDouble( double /* _double */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setDouble( double /* _double */) throw(::com::sun::star::uno::RuntimeException) {} - virtual OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException) + virtual OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException) { return _aDummyString; } - virtual void SAL_CALL setString( const ::rtl::OUString& /* _string */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setString( const ::rtl::OUString& /* _string */) throw(::com::sun::star::uno::RuntimeException) {} - virtual Reference< XInterface > SAL_CALL getInterface() throw(::com::sun::star::uno::RuntimeException) + virtual Reference< XInterface > SAL_CALL getInterface() throw(::com::sun::star::uno::RuntimeException) { return Reference< XInterface >(); } - virtual void SAL_CALL setInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& /* _interface */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& /* _interface */) throw(::com::sun::star::uno::RuntimeException) {} - virtual Any SAL_CALL getAny() throw(::com::sun::star::uno::RuntimeException) + virtual Any SAL_CALL getAny() throw(::com::sun::star::uno::RuntimeException) { return _aDummyAny; } - virtual void SAL_CALL setAny( const ::com::sun::star::uno::Any& /* _any */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setAny( const ::com::sun::star::uno::Any& /* _any */) throw(::com::sun::star::uno::RuntimeException) {} - virtual Sequence< Reference< XInterface > > SAL_CALL getSequence() throw(::com::sun::star::uno::RuntimeException) + virtual Sequence< Reference< XInterface > > SAL_CALL getSequence() throw(::com::sun::star::uno::RuntimeException) { return _aDummySequence; } - virtual void SAL_CALL setSequence( const Sequence< Reference< XInterface > >& /*_sequence */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setSequence( const Sequence< Reference< XInterface > >& /*_sequence */) throw(::com::sun::star::uno::RuntimeException) {} - virtual ComplexTypes SAL_CALL getStruct() throw(::com::sun::star::uno::RuntimeException) + virtual ComplexTypes SAL_CALL getStruct() throw(::com::sun::star::uno::RuntimeException) { return _aDummyStruct; } - virtual void SAL_CALL setStruct( const ::com::sun::star::test::performance::ComplexTypes& /* c */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setStruct( const ::com::sun::star::test::performance::ComplexTypes& /* c */) throw(::com::sun::star::uno::RuntimeException) {} - virtual void SAL_CALL async() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL async() throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL sync() throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL sync() throw(::com::sun::star::uno::RuntimeException) {} - virtual ComplexTypes SAL_CALL complex_in( const ::com::sun::star::test::performance::ComplexTypes& aVal ) throw(::com::sun::star::uno::RuntimeException) + virtual ComplexTypes SAL_CALL complex_in( const ::com::sun::star::test::performance::ComplexTypes& aVal ) throw(::com::sun::star::uno::RuntimeException) { return aVal; } - virtual ComplexTypes SAL_CALL complex_inout( ::com::sun::star::test::performance::ComplexTypes& aVal ) throw(::com::sun::star::uno::RuntimeException) + virtual ComplexTypes SAL_CALL complex_inout( ::com::sun::star::test::performance::ComplexTypes& aVal ) throw(::com::sun::star::uno::RuntimeException) { return aVal; } - virtual void SAL_CALL complex_oneway( const ::com::sun::star::test::performance::ComplexTypes& /* aVal */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL complex_oneway( const ::com::sun::star::test::performance::ComplexTypes& /* aVal */) throw(::com::sun::star::uno::RuntimeException) {} - virtual void SAL_CALL complex_noreturn( const ::com::sun::star::test::performance::ComplexTypes& /* aVal */) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL complex_noreturn( const ::com::sun::star::test::performance::ComplexTypes& /* aVal */) throw(::com::sun::star::uno::RuntimeException) {} - virtual Reference< XPerformanceTest > SAL_CALL createObject() throw(::com::sun::star::uno::RuntimeException) + virtual Reference< XPerformanceTest > SAL_CALL createObject() throw(::com::sun::star::uno::RuntimeException) { return new ServiceImpl(); } - virtual void SAL_CALL raiseRuntimeException( ) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL raiseRuntimeException( ) throw(::com::sun::star::uno::RuntimeException) { throw _aDummyRE; } }; @@ -286,14 +286,14 @@ Sequence< OUString > ServiceImpl::getSupportedServiceNames() * *****************/ -Any OCallMe::queryInterface( const Type & aType ) throw ( RuntimeException ) +Any OCallMe::queryInterface( const Type & aType ) throw ( RuntimeException ) { Any a = ::cppu::queryInterface( aType, SAL_STATIC_CAST( XCallMe * , this ) ); if( a.hasValue() ) { - return a; + return a; } return OWeakObject::queryInterface( aType ); @@ -336,7 +336,7 @@ void OCallMe::callOneway( const ::rtl::OUString& /* s */, sal_Int32 nToDo ) printf( "+" ); fflush( stdout ); - TimeValue val = { nToDo , 0 }; + TimeValue val = { nToDo , 0 }; osl_waitThread( &val ); printf( "-\n" ); } @@ -380,7 +380,7 @@ void OCallMe::callAgain( const Reference< ::test::XCallMe >& callAgainArg, * OInterfaceTest * *******************/ -Any OInterfaceTest::queryInterface( const Type & aType ) throw ( RuntimeException ) +Any OInterfaceTest::queryInterface( const Type & aType ) throw ( RuntimeException ) { Any a = ::cppu::queryInterface( aType, SAL_STATIC_CAST( XInterfaceTest * , this ) ); @@ -432,14 +432,14 @@ void OInterfaceTest::call() } -Any OTestFactory::queryInterface( const Type & aType ) throw ( RuntimeException ) +Any OTestFactory::queryInterface( const Type & aType ) throw ( RuntimeException ) { Any a = ::cppu::queryInterface( aType, SAL_STATIC_CAST( XTestFactory * , this ) ); if( a.hasValue() ) { - return a; + return a; } return OWeakObject::queryInterface( aType ); @@ -512,8 +512,8 @@ double getCallsPerSecOneway( const Reference < XCallMe > &rCall , osl_getSystemTime( &aStartTime ); for( sal_Int32 i = 0; i < nLoops; i ++ ) { -// rCall->callOneway( OUString( RTL_CONSTASCII_USTRINGPARAM("Performance test string" )), 0 ); - rCall->drawLine( 0 , 0 , 500 , 123 ); +// rCall->callOneway( OUString( RTL_CONSTASCII_USTRINGPARAM("Performance test string" )), 0 ); + rCall->drawLine( 0 , 0 , 500 , 123 ); } osl_getSystemTime( &aEndTime ); @@ -522,28 +522,28 @@ double getCallsPerSecOneway( const Reference < XCallMe > &rCall , double fStart = (double)aStartTime.Seconds + ((double)aStartTime.Nanosec / 1000000000.0); double fEnd = (double)aEndTime.Seconds + ((double)aEndTime.Nanosec / 1000000000.0); - *pdAfterExecution = (double)aAfterExecution.Seconds + - ((double)aAfterExecution.Nanosec / 1000000000.0) - fStart; + *pdAfterExecution = (double)aAfterExecution.Seconds + + ((double)aAfterExecution.Nanosec / 1000000000.0) - fStart; return fEnd-fStart; } void testOnewayPerformanceOnTwoInterfaces( const Reference < XCallMe > &rRemote1, const Reference < XCallMe > &rRemote2 ) { - printf( "Doing oneway performance test on two interfaces ...\n" ); + printf( "Doing one way performance test on two interfaces ...\n" ); const sal_Int32 nLoops = 10000; TimeValue aStartTime, aEndTime; osl_getSystemTime( &aStartTime ); for( sal_Int32 i = 0; i < nLoops ; i ++ ) { - rRemote1->drawLine( 0 , 0 , 500 , 123 ); - rRemote2->drawLine( 0 , 0 , 500 , 123 ); + rRemote1->drawLine( 0 , 0 , 500 , 123 ); + rRemote2->drawLine( 0 , 0 , 500 , 123 ); } osl_getSystemTime( &aEndTime ); double fStart = (double)aStartTime.Seconds + ((double)aStartTime.Nanosec / 1000000000.0); double fEnd = (double)aEndTime.Seconds + ((double)aEndTime.Nanosec / 1000000000.0); - printf( "Overhead per Call [ms] %g\n" , ((fEnd-fStart)/((double)nLoops/1000 ))/2. ); + printf( "Overhead per Call [ms] %g\n" , ((fEnd-fStart)/((double)nLoops/1000 ))/2. ); } void testPerformance( const Reference < XCallMe > &rRemote, @@ -555,50 +555,50 @@ void testPerformance( const Reference < XCallMe > &rRemote, sal_Int32 nCalls = 80000; double dRemote, dLocal,dAfterExecution; - printf( "performance test oneway...\n" ); - dLocal = getCallsPerSecOneway( rLocal , nCalls , nDoSomething , &dAfterExecution); - dRemote = getCallsPerSecOneway( rRemote , nCalls , nDoSomething , &dAfterExecution); - printf( "Local=%g s," - "Remote : %g s\n" , dLocal, dRemote ); - if( dLocal > 0. ) - { - printf( "Remote/Local : %g\n", dRemote/dLocal ); - } - - printf( "Overhead per Call [ms] %g\n" , (dRemote - dLocal)/((double)nCalls/1000 ) ); - printf( "Overhead per Call after completion [ms] %g\n" , (dAfterExecution - dLocal)/((double)nCalls/1000 ) ); - - nCalls = 2000; - - printf( "Doing performance test ...\n" ); - dRemote = getCallsPerSec( rRemote , nCalls , nDoSomething ); - dLocal = getCallsPerSec( rLocal , nCalls , nDoSomething ); - printf( "Local=%g s,\n" - "Remote=%g s\n" , dLocal, dRemote ); - if( dLocal > 0. ) - { - printf( "Remote/Local : %g\n", dRemote/dLocal ); - } - printf( "Overhead per synchron Call [ms] %g\n" , ((dRemote - dLocal)/((double)nCalls/1000 )) ); + printf( "performance test oneway...\n" ); + dLocal = getCallsPerSecOneway( rLocal , nCalls , nDoSomething , &dAfterExecution); + dRemote = getCallsPerSecOneway( rRemote , nCalls , nDoSomething , &dAfterExecution); + printf( "Local=%g s," + "Remote : %g s\n" , dLocal, dRemote ); + if( dLocal > 0. ) + { + printf( "Remote/Local : %g\n", dRemote/dLocal ); + } + + printf( "Overhead per Call [ms] %g\n" , (dRemote - dLocal)/((double)nCalls/1000 ) ); + printf( "Overhead per Call after completion [ms] %g\n" , (dAfterExecution - dLocal)/((double)nCalls/1000 ) ); + + nCalls = 2000; + + printf( "Doing performance test ...\n" ); + dRemote = getCallsPerSec( rRemote , nCalls , nDoSomething ); + dLocal = getCallsPerSec( rLocal , nCalls , nDoSomething ); + printf( "Local=%g s,\n" + "Remote=%g s\n" , dLocal, dRemote ); + if( dLocal > 0. ) + { + printf( "Remote/Local : %g\n", dRemote/dLocal ); + } + printf( "Overhead per synchron Call [ms] %g\n" , ((dRemote - dLocal)/((double)nCalls/1000 )) ); } void testException( const Reference < XCallMe > &r ) { try { r->call( OUString( RTL_CONSTASCII_USTRINGPARAM("dummy")) , -1 ); - OSL_ASSERT( ! "no exception flown !" ); + OSL_ASSERT( ! "no exception flown!" ); } - catch( TestBridgeException & e ) + catch( TestBridgeException & e ) { // Exception flew successfully ! } catch( Exception & e ) { - OSL_ASSERT( ! "only base class of exception could be catched!" ); + OSL_ASSERT( ! "only base class of exception could be caught!" ); } catch(...) { - OSL_ASSERT(! "wrong unknown exception !" ); + OSL_ASSERT(! "wrong unknown exception!" ); } } @@ -636,7 +636,7 @@ void testAllTypes( const Reference < XCallMe > & rRCallMe ) TestTypes retTypes = rRCallMe->transport( types ); - OSL_ASSERT( ( types.Bool && retTypes.Bool ) || ( ! types.Bool && ! retTypes.Bool ) ); + OSL_ASSERT( ( types.Bool && retTypes.Bool ) || ( ! types.Bool && ! retTypes.Bool ) ); OSL_ASSERT( types.Char == retTypes.Char ); OSL_ASSERT( types.Byte == retTypes.Byte ); OSL_ASSERT( types.Short == retTypes.Short ); @@ -657,7 +657,7 @@ void testAllTypes( const Reference < XCallMe > & rRCallMe ) void testRemote( const Reference< XInterface > &rRemote ) { char a; - getCppuType( (sal_Int8*)&a ); + getCppuType( (sal_Int8*)&a ); Reference< XTestFactory > rRFact( rRemote , UNO_QUERY ); if( ! rRFact.is() ) @@ -669,23 +669,23 @@ void testRemote( const Reference< XInterface > &rRemote ) Reference< XCallMe > rLCallMe = (XCallMe * ) new OCallMe(); Reference< XCallMe > rRCallMe = rRFact->createCallMe(); - testAllTypes( rLCallMe ); - testAllTypes( rRCallMe ); + testAllTypes( rLCallMe ); + testAllTypes( rRCallMe ); - printf( "Testing exception local ...\n" ); - testException( rLCallMe ); + printf( "Testing exception local ...\n" ); + testException( rLCallMe ); printf( "Testing exception remote ...\n" ); testException( rRCallMe ); - //-------------------- - // Test attributes - //---------------------- - OUString ow = OUString::createFromAscii( "dum didel dum dideldei" ); - rLCallMe->setsAttribute( ow ); - OSL_ASSERT( rLCallMe->getsAttribute() == ow ); + //-------------------- + // Test attributes + //---------------------- + OUString ow = OUString::createFromAscii( "dum didel dum dideldei" ); + rLCallMe->setsAttribute( ow ); + OSL_ASSERT( rLCallMe->getsAttribute() == ow ); - rRCallMe->setsAttribute( ow ); - OSL_ASSERT( rRCallMe->getsAttribute() == ow ); + rRCallMe->setsAttribute( ow ); + OSL_ASSERT( rRCallMe->getsAttribute() == ow ); //------------------- // Performance test @@ -696,14 +696,14 @@ void testRemote( const Reference< XInterface > &rRemote ) //---------------- // Test sequence //---------------- - testSequenceOfCalls( rRCallMe ); + testSequenceOfCalls( rRCallMe ); // test triple to check if transporting the same interface multiple // times causes any problems - Reference< XInterfaceTest > rRTest = rRFact->createInterfaceTest(); - Reference< XInterfaceTest > rRTest2 = rRFact->createInterfaceTest(); - Reference< XInterfaceTest > rRTest3 = rRFact->createInterfaceTest(); + Reference< XInterfaceTest > rRTest = rRFact->createInterfaceTest(); + Reference< XInterfaceTest > rRTest2 = rRFact->createInterfaceTest(); + Reference< XInterfaceTest > rRTest3 = rRFact->createInterfaceTest(); rRTest->setIn( rRCallMe ); rRTest2->setIn( rRCallMe ); @@ -713,9 +713,9 @@ void testRemote( const Reference< XInterface > &rRemote ) OSL_ASSERT( rRTest2->get() == rRCallMe ); OSL_ASSERT( rRTest3->get() == rRCallMe ); - rRTest->setIn( rLCallMe ); - rRTest2->setIn( rLCallMe ); - rRTest3->setIn( rLCallMe ); + rRTest->setIn( rLCallMe ); + rRTest2->setIn( rLCallMe ); + rRTest3->setIn( rLCallMe ); { Reference< XCallMe > rLCallMe1 = (XCallMe * ) new OCallMe(); @@ -745,10 +745,10 @@ void testRemote( const Reference< XInterface > &rRemote ) // test empty references rRTest->setIn( Reference < XCallMe > () ); - //-------------------------------- - // test thread deadlocking - //-------------------------------- - rLCallMe->callAgain( rRCallMe, 20 ); + //-------------------------------- + // test thread deadlocking + //-------------------------------- + rLCallMe->callAgain( rRCallMe, 20 ); } @@ -766,7 +766,7 @@ Reference <XInterface > createComponent( const ::rtl::OUString &sService , if( ! rInterface.is() ) { - // erst registrieren + // register first Reference < XImplementationRegistration > rReg ( rSMgr->createInstance( OUString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" )), @@ -774,7 +774,7 @@ Reference <XInterface > createComponent( const ::rtl::OUString &sService , OSL_ASSERT( rReg.is() ); OUString aDllName = sDllName; - + try { rReg->registerImplementation( @@ -786,10 +786,9 @@ Reference <XInterface > createComponent( const ::rtl::OUString &sService , catch( Exception & ) { printf( "couldn't register dll %s\n" , - OUStringToOString( aDllName, RTL_TEXTENCODING_ASCII_US ).getStr() ); + OUStringToOString( aDllName, RTL_TEXTENCODING_ASCII_US ).getStr() ); } } return rInterface; } - diff --git a/main/framework/source/classes/framecontainer.cxx b/main/framework/source/classes/framecontainer.cxx index ef733a1..b4baa3f 100644 --- a/main/framework/source/classes/framecontainer.cxx +++ b/main/framework/source/classes/framecontainer.cxx @@ -78,7 +78,7 @@ namespace framework{ *****************************************************************************************************************/ FrameContainer::FrameContainer() // initialize base classes first. - // Order is necessary for right initilization of his and OUR member... m_aLock + // Order is necessary for right initialization of his and OUR member... m_aLock : ThreadHelpBase ( &Application::GetSolarMutex() ) /*DEPRECATEME , m_bAsyncQuit ( sal_False ) // default must be "disabled"! @@ -139,7 +139,7 @@ void FrameContainer::append( const css::uno::Reference< css::frame::XFrame >& xF void FrameContainer::remove( const css::uno::Reference< css::frame::XFrame >& xFrame ) { /* SAFE { */ - // write lock necessary for follwing erase()! + // write lock necessary for following erase()! WriteGuard aWriteLock( m_aLock ); TFrameIterator aSearchedItem = ::std::find( m_aContainer.begin(), m_aContainer.end(), xFrame ); @@ -167,7 +167,7 @@ void FrameContainer::remove( const css::uno::Reference< css::frame::XFrame >& xF } /**-*************************************************************************************************************** - @short check if the given frame currently exist inside the container + @short check if the given frame currently exists inside the container @descr - @param xFrame @@ -202,7 +202,7 @@ void FrameContainer::clear() // Clear the container... m_aContainer.clear(); // ...and don't forget to reset the active frame. - // It's a reference to a valid container-item. + // It's a reference to a valid container item. // But no container item => no active frame! m_xActiveFrame = css::uno::Reference< css::frame::XFrame >(); /*DEPRECATEME @@ -325,7 +325,7 @@ void FrameContainer::setActive( const css::uno::Reference< css::frame::XFrame >& /**-*************************************************************************************************************** @short returns the current active frame of this container @descr Value can be null in case the frame was removed from the container and nobody - from outside decide which of all others should be the new one... + from outside decides which of all others should be the new one... @return a reference to the current active frame Value can be NULL! @@ -411,6 +411,4 @@ css::uno::Reference< css::frame::XFrame > FrameContainer::searchOnDirectChildren return xSearchedFrame; } -} - -// namespace framework +} // namespace framework diff --git a/main/framework/source/recording/dispatchrecorder.cxx b/main/framework/source/recording/dispatchrecorder.cxx index 3ba6a6a..59832c7 100644 --- a/main/framework/source/recording/dispatchrecorder.cxx +++ b/main/framework/source/recording/dispatchrecorder.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,21 +7,20 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" #include <recording/dispatchrecorder.hxx> @@ -35,7 +34,7 @@ using namespace ::com::sun::star::uno; namespace framework{ -// used to mark a dispatch as comment (mostly it indicates an error) Changing of this wdefine will impact all using of such comments ... +// used to mark a dispatch as comment (mostly it indicates an error). Changing of this wdefine will impact all using of such comments... #define REM_AS_COMMENT "rem " //***************************************************************************************************************** @@ -155,8 +154,8 @@ void SAL_CALL DispatchRecorder::recordDispatch( const css::util::URL& aURL, } //************************************************************************* -void SAL_CALL DispatchRecorder::recordDispatchAsComment( const css::util::URL& aURL, - const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException ) +void SAL_CALL DispatchRecorder::recordDispatchAsComment( const css::util::URL& aURL, + const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException ) { ::rtl::OUString aTarget; @@ -428,7 +427,7 @@ com::sun::star::uno::Type SAL_CALL DispatchRecorder::getElementType() throw (::c return ::getCppuType((const com::sun::star::frame::DispatchStatement *)NULL); } -sal_Bool SAL_CALL DispatchRecorder::hasElements() throw (::com::sun::star::uno::RuntimeException) +sal_Bool SAL_CALL DispatchRecorder::hasElements() throw (::com::sun::star::uno::RuntimeException) { return (! m_aStatements.empty()); } @@ -438,7 +437,7 @@ sal_Int32 SAL_CALL DispatchRecorder::getCount() throw (::com::sun::star::uno::Ru return m_aStatements.size(); } -com::sun::star::uno::Any SAL_CALL DispatchRecorder::getByIndex(sal_Int32 idx) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +com::sun::star::uno::Any SAL_CALL DispatchRecorder::getByIndex(sal_Int32 idx) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if (idx >= (sal_Int32)m_aStatements.size()) { throw com::sun::star::lang::IndexOutOfBoundsException( diff --git a/main/framework/source/recording/dispatchrecordersupplier.cxx b/main/framework/source/recording/dispatchrecordersupplier.cxx index ca0153f..61af00d 100644 --- a/main/framework/source/recording/dispatchrecordersupplier.cxx +++ b/main/framework/source/recording/dispatchrecordersupplier.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ @@ -54,7 +54,7 @@ namespace framework{ // declarations //***************************************************************************************************************** -// XInterface, XTypeProvider +// XInterface, XTypeProvider //***************************************************************************************************************** DEFINE_XINTERFACE_3( DispatchRecorderSupplier, @@ -79,7 +79,7 @@ DEFINE_INIT_SERVICE( DispatchRecorderSupplier, { /*Attention - I think we don't need any mutex or lock here ... because we are called by our own static method impl_createInstance() + I think we don't need any mutex or lock here... because we are called by our own static method impl_createInstance() to create a new instance of this class by our own supported service factory. see macro DEFINE_XSERVICEINFO_MULTISERVICE and "impl_initService()" for further informations! */ @@ -106,7 +106,7 @@ DispatchRecorderSupplier::DispatchRecorderSupplier( const css::uno::Reference< c //_____________________________________________________________________________ /** @short standard destructor - @descr We are a helper and not a real service. So we doesn't provide + @descr We are a helper and not a real service. So we don't provide dispose() functionality. This supplier dies by ref count mechanism and should release all internal used ones too. */ @@ -119,7 +119,7 @@ DispatchRecorderSupplier::~DispatchRecorderSupplier() //_____________________________________________________________________________ /** @short set a new dispatch recorder on this supplier - @descr Because there can exist more then one recorder implementations + @descr Because there can exist more than one recorder implementations (to generate java/basic/... scripts from recorded data) it must be possible to set it on a supplier. @@ -168,7 +168,7 @@ css::uno::Reference< css::frame::XDispatchRecorder > SAL_CALL DispatchRecorderSu /** @short execute a dispatch request and record it @descr If given dispatch object provides right recording interface it - will be used. If it's not supported it record the pure dispatch + will be used. If it's not supported it records the pure dispatch parameters only. There is no code neither the possibility to check if recording is enabled or not. @@ -195,7 +195,7 @@ void SAL_CALL DispatchRecorderSupplier::dispatchAndRecord( const css::util::URL& if (!xRecorder.is()) throw css::uno::RuntimeException(DECLARE_ASCII("specification violation: no valid dispatch recorder available"), static_cast< ::cppu::OWeakObject* >(this)); - // check, if given dispatch supports record functionality by itself ... + // check, if given dispatch supports record functionality by itself... // or must be wrapped. css::uno::Reference< css::frame::XRecordableDispatch > xRecordable( xDispatcher, @@ -207,7 +207,7 @@ void SAL_CALL DispatchRecorderSupplier::dispatchAndRecord( const css::util::URL& { // There is no reason to wait for information about success // of this request. Because status information of a dispatch - // are not guaranteed. So we execute it and record used + // is not guaranteed. So we execute it and record used // parameters only. xDispatcher->dispatch(aURL,lArguments); xRecorder->recordDispatch(aURL,lArguments);