diff options
-rw-r--r-- | cpputools/source/unoexe/unoexe.cxx | 45 | ||||
-rw-r--r-- | stoc/source/registry_tdprovider/tdservice.cxx | 33 |
2 files changed, 18 insertions, 60 deletions
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index 5cc0a9370eb7..073a9751522c 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -59,19 +59,17 @@ using namespace com::sun::star::connection; using namespace com::sun::star::bridge; using namespace com::sun::star::container; - namespace unoexe { static sal_Bool s_quiet = false; -//-------------------------------------------------------------------------------------------------- static inline void out( const sal_Char * pText ) { if (! s_quiet) fprintf( stderr, "%s", pText ); } -//-------------------------------------------------------------------------------------------------- + static inline void out( const OUString & rText ) { if (! s_quiet) @@ -81,7 +79,6 @@ static inline void out( const OUString & rText ) } } -//-------------------------------------------------------------------------------------------------- static const char arUsingText[] = "\nusing:\n\n" "uno [-c ComponentImplementationName -l LocationUrl | -s ServiceName]\n" @@ -90,7 +87,6 @@ static const char arUsingText[] = " [--quiet]\n" " [-- Argument1 Argument2 ...]\n"; -//-------------------------------------------------------------------------------------------------- static sal_Bool readOption( OUString * pValue, const sal_Char * pOpt, sal_uInt32 * pnIndex, const OUString & aArg) throw (RuntimeException) @@ -147,7 +143,7 @@ static sal_Bool readOption( OUString * pValue, const sal_Char * pOpt, } return sal_False; } -//-------------------------------------------------------------------------------------------------- + static sal_Bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt, sal_uInt32 * pnIndex, const OUString & aArg) { @@ -167,13 +163,6 @@ static sal_Bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt, return sal_False; } - -//################################################################################################## -//################################################################################################## -//################################################################################################## - - -//-------------------------------------------------------------------------------------------------- template< class T > void createInstance( Reference< T > & rxOut, @@ -246,7 +235,7 @@ void createInstance( throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() ); } } -//-------------------------------------------------------------------------------------------------- + static Reference< XInterface > loadComponent( const Reference< XComponentContext > & xContext, const OUString & rImplName, const OUString & rLocation ) @@ -331,13 +320,6 @@ static Reference< XInterface > loadComponent( } } - -//################################################################################################## -//################################################################################################## -//################################################################################################## - - -//================================================================================================== class OInstanceProvider : public WeakImplHelper1< XInstanceProvider > { @@ -374,7 +356,7 @@ public: virtual Reference< XInterface > SAL_CALL getInstance( const OUString & rName ) throw (NoSuchElementException, RuntimeException); }; -//__________________________________________________________________________________________________ + inline Reference< XInterface > OInstanceProvider::createInstance() throw (Exception) { @@ -391,7 +373,7 @@ inline Reference< XInterface > OInstanceProvider::createInstance() return xRet; } -//__________________________________________________________________________________________________ + Reference< XInterface > OInstanceProvider::getInstance( const OUString & rName ) throw (NoSuchElementException, RuntimeException) { @@ -438,7 +420,6 @@ Reference< XInterface > OInstanceProvider::getInstance( const OUString & rName ) throw NoSuchElementException( buf.makeStringAndClear(), Reference< XInterface >() ); } -//================================================================================================== struct ODisposingListener : public WeakImplHelper1< XEventListener > { Condition cDisposed; @@ -447,16 +428,15 @@ struct ODisposingListener : public WeakImplHelper1< XEventListener > virtual void SAL_CALL disposing( const EventObject & rEvt ) throw (RuntimeException); - //---------------------------------------------------------------------------------------------- static void waitFor( const Reference< XComponent > & xComp ); }; -//__________________________________________________________________________________________________ + void ODisposingListener::disposing( const EventObject & ) throw (RuntimeException) { cDisposed.set(); } -//-------------------------------------------------------------------------------------------------- + void ODisposingListener::waitFor( const Reference< XComponent > & xComp ) { ODisposingListener * pListener = new ODisposingListener(); @@ -466,13 +446,6 @@ void ODisposingListener::waitFor( const Reference< XComponent > & xComp ) pListener->cDisposed.wait(); } - -//################################################################################################## -//################################################################################################## -//################################################################################################## - - -//################################################################################################## } // namespace unoexe using namespace unoexe; @@ -497,7 +470,7 @@ SAL_IMPLEMENT_MAIN() sal_Bool bSingleAccept = sal_False; sal_Bool bSingleInstance = sal_False; - //#### read command line arguments ######################################################### + // read command line arguments sal_uInt32 nPos = 0; // read up to arguments @@ -559,7 +532,7 @@ SAL_IMPLEMENT_MAIN() xContext = defaultBootstrap_InitialComponentContext(); - //#### accept, instanciate, etc. ########################################################### + // accept, instanciate, etc. if (!aUnoUrl.isEmpty()) // accepting connections { diff --git a/stoc/source/registry_tdprovider/tdservice.cxx b/stoc/source/registry_tdprovider/tdservice.cxx index 6e19ad70ed63..190ad7af4d6e 100644 --- a/stoc/source/registry_tdprovider/tdservice.cxx +++ b/stoc/source/registry_tdprovider/tdservice.cxx @@ -71,11 +71,8 @@ private: namespace stoc_rdbtdp { -//================================================================================================== -// -// class PropertyTypeDescriptionImpl -// -//================================================================================================== +// PropertyTypeDescriptionImpl + class PropertyTypeDescriptionImpl : public WeakImplHelper1< XPropertyTypeDescription > { OUString _aName; @@ -103,19 +100,18 @@ public: throw ( RuntimeException ); }; -//__________________________________________________________________________________________________ // virtual PropertyTypeDescriptionImpl::~PropertyTypeDescriptionImpl() {} // XTypeDescription -//__________________________________________________________________________________________________ + // virtual TypeClass PropertyTypeDescriptionImpl::getTypeClass() throw ( RuntimeException ) { return TypeClass_PROPERTY; } -//__________________________________________________________________________________________________ + // virtual OUString PropertyTypeDescriptionImpl::getName() throw ( RuntimeException ) @@ -124,7 +120,7 @@ OUString PropertyTypeDescriptionImpl::getName() } // XPropertyTypeDescription -//__________________________________________________________________________________________________ + // virtual sal_Int16 SAL_CALL PropertyTypeDescriptionImpl::getPropertyFlags() throw ( RuntimeException ) @@ -132,7 +128,6 @@ sal_Int16 SAL_CALL PropertyTypeDescriptionImpl::getPropertyFlags() return _nFlags; } -//__________________________________________________________________________________________________ // virtual Reference< XTypeDescription > SAL_CALL PropertyTypeDescriptionImpl::getPropertyTypeDescription() @@ -141,25 +136,20 @@ PropertyTypeDescriptionImpl::getPropertyTypeDescription() return _xTD; } -//================================================================================================== -// -// ServiceTypeDescriptionImpl implementation -// -//================================================================================================== +// ServiceTypeDescriptionImpl -//__________________________________________________________________________________________________ // virtual ServiceTypeDescriptionImpl::~ServiceTypeDescriptionImpl() {} // XTypeDescription -//__________________________________________________________________________________________________ + // virtual TypeClass ServiceTypeDescriptionImpl::getTypeClass() throw(::com::sun::star::uno::RuntimeException) { return TypeClass_SERVICE; } -//__________________________________________________________________________________________________ + // virtual OUString ServiceTypeDescriptionImpl::getName() throw(::com::sun::star::uno::RuntimeException) @@ -168,7 +158,7 @@ OUString ServiceTypeDescriptionImpl::getName() } // XServiceTypeDescription -//__________________________________________________________________________________________________ + // virtual Sequence< Reference< XServiceTypeDescription > > SAL_CALL ServiceTypeDescriptionImpl::getMandatoryServices() @@ -178,7 +168,6 @@ ServiceTypeDescriptionImpl::getMandatoryServices() return _aMandatoryServices; } -//__________________________________________________________________________________________________ // virtual Sequence< Reference< XServiceTypeDescription > > SAL_CALL ServiceTypeDescriptionImpl::getOptionalServices() @@ -188,7 +177,6 @@ ServiceTypeDescriptionImpl::getOptionalServices() return _aOptionalServices; } -//__________________________________________________________________________________________________ // virtual Sequence< Reference< XInterfaceTypeDescription > > SAL_CALL ServiceTypeDescriptionImpl::getMandatoryInterfaces() @@ -198,7 +186,6 @@ ServiceTypeDescriptionImpl::getMandatoryInterfaces() return _aMandatoryInterfaces; } -//__________________________________________________________________________________________________ // virtual Sequence< Reference< XInterfaceTypeDescription > > SAL_CALL ServiceTypeDescriptionImpl::getOptionalInterfaces() @@ -208,7 +195,6 @@ ServiceTypeDescriptionImpl::getOptionalInterfaces() return _aOptionalInterfaces; } -//__________________________________________________________________________________________________ // virtual Sequence< Reference< XPropertyTypeDescription > > SAL_CALL ServiceTypeDescriptionImpl::getProperties() @@ -348,7 +334,6 @@ ServiceTypeDescriptionImpl::getConstructors() throw (RuntimeException) { return *_pCtors; } -//__________________________________________________________________________________________________ void ServiceTypeDescriptionImpl::getReferences() throw ( RuntimeException ) { |