diff options
author | Alexander Wilms <f.alexander.wilms@gmail.com> | 2014-02-22 21:20:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-23 03:38:49 +0000 |
commit | 0ce0c369aa8880dff9fe874ba85ec6f52ee37ddf (patch) | |
tree | 5024cba9f9ea5e3b23ea26025323f6aef39488d0 /comphelper/source | |
parent | b81ac16e65b311d6e43c05c22c65d2040c9d7e04 (diff) |
Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'comphelper/source')
57 files changed, 739 insertions, 747 deletions
diff --git a/comphelper/source/container/container.cxx b/comphelper/source/container/container.cxx index d3b440465de0..b04c11aeb8ad 100644 --- a/comphelper/source/container/container.cxx +++ b/comphelper/source/container/container.cxx @@ -38,7 +38,7 @@ IndexAccessIterator::IndexAccessIterator(::com::sun::star::uno::Reference< ::com IndexAccessIterator::~IndexAccessIterator() {} -//------------------------------------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> IndexAccessIterator::Next() { bool bCheckingStartingPoint = !m_xCurrentObject.is(); diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx index 0c14bb3da529..d74b62fff802 100644 --- a/comphelper/source/container/containermultiplexer.cxx +++ b/comphelper/source/container/containermultiplexer.cxx @@ -32,14 +32,14 @@ namespace comphelper //===================================================================== //= OContainerListener //===================================================================== - //--------------------------------------------------------------------- + OContainerListener::OContainerListener(::osl::Mutex& _rMutex) :m_pAdapter(NULL) ,m_rMutex(_rMutex) { } - //--------------------------------------------------------------------- + OContainerListener::~OContainerListener() { if (m_pAdapter) @@ -49,27 +49,27 @@ namespace comphelper } } - //--------------------------------------------------------------------- + void OContainerListener::_elementInserted( const ContainerEvent& /*_rEvent*/ ) throw(RuntimeException) { } - //--------------------------------------------------------------------- + void OContainerListener::_elementRemoved( const ContainerEvent& ) throw(RuntimeException) { } - //--------------------------------------------------------------------- + void OContainerListener::_elementReplaced( const ContainerEvent& /*_rEvent*/ ) throw(RuntimeException) { } - //--------------------------------------------------------------------- + void OContainerListener::_disposing(const EventObject& ) throw( RuntimeException) { } - //------------------------------------------------------------------ + void OContainerListener::setAdapter(OContainerListenerAdapter* pAdapter) { if (m_pAdapter) @@ -90,7 +90,7 @@ namespace comphelper //===================================================================== //= OContainerListenerAdapter //===================================================================== - //--------------------------------------------------------------------- + OContainerListenerAdapter::OContainerListenerAdapter(OContainerListener* _pListener, const Reference< XContainer >& _rxContainer) :m_xContainer(_rxContainer) @@ -112,12 +112,12 @@ namespace comphelper ::comphelper::decrement(m_refCount); } - //--------------------------------------------------------------------- + OContainerListenerAdapter::~OContainerListenerAdapter() { } - //------------------------------------------------------------------ + void OContainerListenerAdapter::dispose() { if (m_xContainer.is()) @@ -137,7 +137,7 @@ namespace comphelper } } - //------------------------------------------------------------------ + void SAL_CALL OContainerListenerAdapter::disposing( const EventObject& _rSource) throw(RuntimeException) { if (m_pListener) @@ -154,21 +154,21 @@ namespace comphelper m_pListener = NULL; } - //------------------------------------------------------------------ + void SAL_CALL OContainerListenerAdapter::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException) { if (m_pListener && !locked()) m_pListener->_elementInserted(_rEvent); } - //------------------------------------------------------------------ + void SAL_CALL OContainerListenerAdapter::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException) { if (m_pListener && !locked()) m_pListener->_elementRemoved(_rEvent); } - //------------------------------------------------------------------ + void SAL_CALL OContainerListenerAdapter::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException) { if (m_pListener && !locked()) diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index ebe4df1f28ea..c3c321c0835c 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -1337,7 +1337,7 @@ namespace { } } -// ----------------------------------------------------------------------------- + bool EmbeddedObjectContainer::StoreAsChildren(bool _bOasisFormat,bool _bCreateEmbedded,const uno::Reference < embed::XStorage >& _xStorage) { bool bResult = false; @@ -1460,7 +1460,7 @@ bool EmbeddedObjectContainer::StoreAsChildren(bool _bOasisFormat,bool _bCreateEm } return bResult; } -// ----------------------------------------------------------------------------- + bool EmbeddedObjectContainer::StoreChildren(bool _bOasisFormat,bool _bObjectsOnly) { bool bResult = true; @@ -1580,7 +1580,7 @@ bool EmbeddedObjectContainer::StoreChildren(bool _bOasisFormat,bool _bObjectsOnl } return bResult; } -// ----------------------------------------------------------------------------- + uno::Reference< io::XInputStream > EmbeddedObjectContainer::GetGraphicReplacementStream( sal_Int64 nViewAspect, const uno::Reference< embed::XEmbeddedObject >& xObj, @@ -1607,7 +1607,7 @@ uno::Reference< io::XInputStream > EmbeddedObjectContainer::GetGraphicReplacemen return xInStream; } -// ----------------------------------------------------------------------------- + bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< embed::XStorage >& _xStorage,bool _bClearModifedFlag) { bool bError = false; diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index d2432d2e8cd6..40dc3f5f6dd8 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -132,7 +132,7 @@ namespace comphelper //==================================================================== //= MapData helpers //==================================================================== - //-------------------------------------------------------------------- + static void lcl_registerMapModificationListener( MapData& _mapData, IMapModificationListener& _listener ) { #if OSL_DEBUG_LEVEL > 0 @@ -147,7 +147,7 @@ namespace comphelper _mapData.m_aModListeners.push_back( &_listener ); } - //-------------------------------------------------------------------- + static void lcl_revokeMapModificationListener( MapData& _mapData, IMapModificationListener& _listener ) { for ( MapListeners::iterator lookup = _mapData.m_aModListeners.begin(); @@ -164,7 +164,7 @@ namespace comphelper OSL_FAIL( "lcl_revokeMapModificationListener: the listener is not registered!" ); } - //-------------------------------------------------------------------- + static void lcl_notifyMapDataListeners_nothrow( const MapData& _mapData ) { for ( MapListeners::const_iterator loop = _mapData.m_aModListeners.begin(); @@ -342,14 +342,14 @@ namespace comphelper //==================================================================== //= EnumerableMap //==================================================================== - //-------------------------------------------------------------------- + EnumerableMap::EnumerableMap() :Map_IFace( m_aMutex ) ,ComponentBase( Map_IFace::rBHelper ) { } - //-------------------------------------------------------------------- + EnumerableMap::~EnumerableMap() { if ( !impl_isDisposed() ) @@ -359,7 +359,7 @@ namespace comphelper } } - //-------------------------------------------------------------------- + void SAL_CALL EnumerableMap::initialize( const Sequence< Any >& _arguments ) throw (Exception, RuntimeException) { ComponentMethodGuard aGuard( *this, ComponentMethodGuard::WithoutInit ); @@ -407,7 +407,7 @@ namespace comphelper setInitialized(); } - //-------------------------------------------------------------------- + void EnumerableMap::impl_initValues_throw( const Sequence< Pair< Any, Any > >& _initialValues ) { OSL_PRECOND( m_aData.m_pValues.get() && m_aData.m_pValues->empty(), "EnumerableMap::impl_initValues_throw: illegal call!" ); @@ -423,7 +423,7 @@ namespace comphelper } } - //-------------------------------------------------------------------- + void EnumerableMap::impl_checkValue_throw( const Any& _value ) const { if ( !_value.hasValue() ) @@ -500,7 +500,7 @@ namespace comphelper impl_checkNaN_throw( _value, m_aData.m_aValueType ); } - //-------------------------------------------------------------------- + void EnumerableMap::impl_checkNaN_throw( const Any& _keyOrValue, const Type& _keyOrValueType ) const { if ( ( _keyOrValueType.getTypeClass() == TypeClass_DOUBLE ) @@ -518,7 +518,7 @@ namespace comphelper } } - //-------------------------------------------------------------------- + void EnumerableMap::impl_checkKey_throw( const Any& _key ) const { if ( !_key.hasValue() ) @@ -529,7 +529,7 @@ namespace comphelper impl_checkNaN_throw( _key, m_aData.m_aKeyType ); } - //-------------------------------------------------------------------- + void EnumerableMap::impl_checkMutable_throw() const { if ( !m_aData.m_bMutable ) @@ -538,42 +538,42 @@ namespace comphelper *const_cast< EnumerableMap* >( this ) ); } - //-------------------------------------------------------------------- + Reference< XEnumeration > SAL_CALL EnumerableMap::createKeyEnumeration( ::sal_Bool _Isolated ) throw (NoSupportException, RuntimeException) { ComponentMethodGuard aGuard( *this ); return new MapEnumeration( *this, m_aData, getBroadcastHelper(), eKeys, _Isolated ); } - //-------------------------------------------------------------------- + Reference< XEnumeration > SAL_CALL EnumerableMap::createValueEnumeration( ::sal_Bool _Isolated ) throw (NoSupportException, RuntimeException) { ComponentMethodGuard aGuard( *this ); return new MapEnumeration( *this, m_aData, getBroadcastHelper(), eValues, _Isolated ); } - //-------------------------------------------------------------------- + Reference< XEnumeration > SAL_CALL EnumerableMap::createElementEnumeration( ::sal_Bool _Isolated ) throw (NoSupportException, RuntimeException) { ComponentMethodGuard aGuard( *this ); return new MapEnumeration( *this, m_aData, getBroadcastHelper(), eBoth, _Isolated ); } - //-------------------------------------------------------------------- + Type SAL_CALL EnumerableMap::getKeyType() throw (RuntimeException) { ComponentMethodGuard aGuard( *this ); return m_aData.m_aKeyType; } - //-------------------------------------------------------------------- + Type SAL_CALL EnumerableMap::getValueType() throw (RuntimeException) { ComponentMethodGuard aGuard( *this ); return m_aData.m_aValueType; } - //-------------------------------------------------------------------- + void SAL_CALL EnumerableMap::clear( ) throw (NoSupportException, RuntimeException) { ComponentMethodGuard aGuard( *this ); @@ -584,7 +584,7 @@ namespace comphelper lcl_notifyMapDataListeners_nothrow( m_aData ); } - //-------------------------------------------------------------------- + ::sal_Bool SAL_CALL EnumerableMap::containsKey( const Any& _key ) throw (IllegalTypeException, IllegalArgumentException, RuntimeException) { ComponentMethodGuard aGuard( *this ); @@ -594,7 +594,7 @@ namespace comphelper return ( pos != m_aData.m_pValues->end() ); } - //-------------------------------------------------------------------- + ::sal_Bool SAL_CALL EnumerableMap::containsValue( const Any& _value ) throw (IllegalTypeException, IllegalArgumentException, RuntimeException) { ComponentMethodGuard aGuard( *this ); @@ -611,7 +611,7 @@ namespace comphelper return sal_False; } - //-------------------------------------------------------------------- + Any SAL_CALL EnumerableMap::get( const Any& _key ) throw (IllegalTypeException, IllegalArgumentException, NoSuchElementException, RuntimeException) { ComponentMethodGuard aGuard( *this ); @@ -624,7 +624,7 @@ namespace comphelper return pos->second; } - //-------------------------------------------------------------------- + Any SAL_CALL EnumerableMap::put( const Any& _key, const Any& _value ) throw (NoSupportException, IllegalTypeException, IllegalArgumentException, RuntimeException) { ComponentMethodGuard aGuard( *this ); @@ -650,7 +650,7 @@ namespace comphelper return previousValue; } - //-------------------------------------------------------------------- + Any SAL_CALL EnumerableMap::remove( const Any& _key ) throw (NoSupportException, IllegalTypeException, IllegalArgumentException, NoSuchElementException, RuntimeException) { ComponentMethodGuard aGuard( *this ); @@ -671,20 +671,20 @@ namespace comphelper return previousValue; } - //-------------------------------------------------------------------- + Type SAL_CALL EnumerableMap::getElementType() throw (RuntimeException) { return ::cppu::UnoType< Pair< Any, Any > >::get(); } - //-------------------------------------------------------------------- + ::sal_Bool SAL_CALL EnumerableMap::hasElements() throw (RuntimeException) { ComponentMethodGuard aGuard( *this ); return m_aData.m_pValues->empty(); } - //-------------------------------------------------------------------- + OUString SAL_CALL EnumerableMap::getImplementationName( ) throw (RuntimeException) { return getImplementationName_static(); @@ -695,19 +695,19 @@ namespace comphelper return cppu::supportsService(this, _serviceName); } - //-------------------------------------------------------------------- + Sequence< OUString > SAL_CALL EnumerableMap::getSupportedServiceNames( ) throw (RuntimeException) { return getSupportedServiceNames_static(); } - //-------------------------------------------------------------------- + OUString SAL_CALL EnumerableMap::getImplementationName_static( ) { return OUString( "org.openoffice.comp.comphelper.EnumerableMap" ); } - //-------------------------------------------------------------------- + Sequence< OUString > SAL_CALL EnumerableMap::getSupportedServiceNames_static( ) { Sequence< OUString > aServiceNames(1); @@ -715,7 +715,7 @@ namespace comphelper return aServiceNames; } - //-------------------------------------------------------------------- + Reference< XInterface > SAL_CALL EnumerableMap::Create( SAL_UNUSED_PARAMETER const Reference< XComponentContext >& ) { return *new EnumerableMap; @@ -724,7 +724,7 @@ namespace comphelper //==================================================================== //= MapEnumerator //==================================================================== - //-------------------------------------------------------------------- + bool MapEnumerator::hasMoreElements() { if ( m_disposed ) @@ -732,7 +732,7 @@ namespace comphelper return m_mapPos != m_rMapData.m_pValues->end(); } - //-------------------------------------------------------------------- + Any MapEnumerator::nextElement() { if ( m_disposed ) @@ -751,7 +751,7 @@ namespace comphelper return aNextElement; } - //-------------------------------------------------------------------- + void MapEnumerator::mapModified() { m_disposed = true; @@ -760,14 +760,14 @@ namespace comphelper //==================================================================== //= MapEnumeration - implementation //==================================================================== - //-------------------------------------------------------------------- + ::sal_Bool SAL_CALL MapEnumeration::hasMoreElements( ) throw (RuntimeException) { ComponentMethodGuard aGuard( *this ); return m_aEnumerator.hasMoreElements(); } - //-------------------------------------------------------------------- + Any SAL_CALL MapEnumeration::nextElement( ) throw (NoSuchElementException, WrappedTargetException, RuntimeException) { ComponentMethodGuard aGuard( *this ); diff --git a/comphelper/source/container/enumhelper.cxx b/comphelper/source/container/enumhelper.cxx index 168cac43e5b9..3eb7a0dc245b 100644 --- a/comphelper/source/container/enumhelper.cxx +++ b/comphelper/source/container/enumhelper.cxx @@ -28,7 +28,7 @@ namespace comphelper //================================================================== //= OEnumerationByName //================================================================== -//------------------------------------------------------------------------------ + OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::XNameAccess>& _rxAccess) :m_aNames(_rxAccess->getElementNames()) ,m_nPos(0) @@ -38,7 +38,7 @@ OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::X impl_startDisposeListening(); } -//------------------------------------------------------------------------------ + OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::XNameAccess>& _rxAccess, const staruno::Sequence< OUString >& _aNames ) :m_aNames(_aNames) @@ -49,13 +49,13 @@ OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::X impl_startDisposeListening(); } -//------------------------------------------------------------------------------ + OEnumerationByName::~OEnumerationByName() { impl_stopDisposeListening(); } -//------------------------------------------------------------------------------ + sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(staruno::RuntimeException) { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -72,7 +72,7 @@ sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(staruno::Runtime return sal_False; } -//------------------------------------------------------------------------------ + staruno::Any SAL_CALL OEnumerationByName::nextElement( ) throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException) { @@ -94,7 +94,7 @@ staruno::Any SAL_CALL OEnumerationByName::nextElement( ) return aRes; } -//------------------------------------------------------------------------------ + void SAL_CALL OEnumerationByName::disposing(const starlang::EventObject& aEvent) throw(staruno::RuntimeException) { @@ -104,7 +104,7 @@ void SAL_CALL OEnumerationByName::disposing(const starlang::EventObject& aEvent) m_xAccess.clear(); } -//------------------------------------------------------------------------------ + void OEnumerationByName::impl_startDisposeListening() { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -122,7 +122,7 @@ void OEnumerationByName::impl_startDisposeListening() --m_refCount; } -//------------------------------------------------------------------------------ + void OEnumerationByName::impl_stopDisposeListening() { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -143,7 +143,7 @@ void OEnumerationByName::impl_stopDisposeListening() //================================================================== //= OEnumerationByIndex //================================================================== -//------------------------------------------------------------------------------ + OEnumerationByIndex::OEnumerationByIndex(const staruno::Reference< starcontainer::XIndexAccess >& _rxAccess) :m_nPos(0) ,m_xAccess(_rxAccess) @@ -152,13 +152,13 @@ OEnumerationByIndex::OEnumerationByIndex(const staruno::Reference< starcontainer impl_startDisposeListening(); } -//------------------------------------------------------------------------------ + OEnumerationByIndex::~OEnumerationByIndex() { impl_stopDisposeListening(); } -//------------------------------------------------------------------------------ + sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(staruno::RuntimeException) { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -175,7 +175,7 @@ sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(staruno::Runtim return sal_False; } -//------------------------------------------------------------------------------ + staruno::Any SAL_CALL OEnumerationByIndex::nextElement( ) throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException) { @@ -197,7 +197,7 @@ staruno::Any SAL_CALL OEnumerationByIndex::nextElement( ) return aRes; } -//------------------------------------------------------------------------------ + void SAL_CALL OEnumerationByIndex::disposing(const starlang::EventObject& aEvent) throw(staruno::RuntimeException) { @@ -207,7 +207,7 @@ void SAL_CALL OEnumerationByIndex::disposing(const starlang::EventObject& aEvent m_xAccess.clear(); } -//------------------------------------------------------------------------------ + void OEnumerationByIndex::impl_startDisposeListening() { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -225,7 +225,7 @@ void OEnumerationByIndex::impl_startDisposeListening() --m_refCount; } -//------------------------------------------------------------------------------ + void OEnumerationByIndex::impl_stopDisposeListening() { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -247,19 +247,19 @@ void OEnumerationByIndex::impl_stopDisposeListening() //= OAnyEnumeration //================================================================== -//------------------------------------------------------------------------------ + OAnyEnumeration::OAnyEnumeration(const staruno::Sequence< staruno::Any >& lItems) :m_nPos(0) ,m_lItems(lItems) { } -//------------------------------------------------------------------------------ + OAnyEnumeration::~OAnyEnumeration() { } -//------------------------------------------------------------------------------ + sal_Bool SAL_CALL OAnyEnumeration::hasMoreElements( ) throw(staruno::RuntimeException) { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -267,7 +267,7 @@ sal_Bool SAL_CALL OAnyEnumeration::hasMoreElements( ) throw(staruno::RuntimeExc return (m_lItems.getLength() > m_nPos); } -//------------------------------------------------------------------------------ + staruno::Any SAL_CALL OAnyEnumeration::nextElement( ) throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException) { diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 782eb92211bb..c6d531fbdddf 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -59,7 +59,7 @@ using namespace osl; namespace comphelper { -//----------------------------------------------------------------------------- + struct AttachedObject_Impl { Reference< XInterface > xTarget; @@ -79,7 +79,7 @@ struct AttacherIndex_Impl bool operator==( const AttacherIndex_Impl & ) const; }; -//----------------------------------------------------------------------------- + class ImplEventAttacherManager : public WeakImplHelper2< XEventAttacherManager, XPersistObject > { @@ -355,7 +355,7 @@ Reference< XEventAttacherManager > createEventAttacherManager( const Reference< return new ImplEventAttacherManager( xIntrospection, rxContext ); } -//----------------------------------------------------------------------------- + ImplEventAttacherManager::ImplEventAttacherManager( const Reference< XIntrospection > & rIntrospection, const Reference< XComponentContext > xContext ) : aScriptListeners( aLock ) @@ -383,7 +383,7 @@ ImplEventAttacherManager::ImplEventAttacherManager( const Reference< XIntrospect } } -//----------------------------------------------------------------------------- + ImplEventAttacherManager::~ImplEventAttacherManager() { } @@ -400,7 +400,7 @@ Reference< XIdlReflection > ImplEventAttacherManager::getReflection() throw( Exc } -//----------------------------------------------------------------------------- + ::std::deque<AttacherIndex_Impl>::iterator ImplEventAttacherManager::implCheckIndex( sal_Int32 _nIndex ) SAL_THROW ( ( IllegalArgumentException ) ) { if (_nIndex < 0) @@ -448,7 +448,7 @@ public: } -//----------------------------------------------------------------------------- + // Methods of XEventAttacherManager void SAL_CALL ImplEventAttacherManager::registerScriptEvent ( @@ -496,7 +496,7 @@ void SAL_CALL ImplEventAttacherManager::registerScriptEvent } } -//----------------------------------------------------------------------------- + void SAL_CALL ImplEventAttacherManager::registerScriptEvents ( sal_Int32 nIndex, @@ -520,7 +520,7 @@ void SAL_CALL ImplEventAttacherManager::registerScriptEvents ::std::for_each(aList.begin(), aList.end(), AttachObject(*this, nIndex)); } -//----------------------------------------------------------------------------- + void SAL_CALL ImplEventAttacherManager::revokeScriptEvent ( sal_Int32 nIndex, @@ -559,7 +559,7 @@ void SAL_CALL ImplEventAttacherManager::revokeScriptEvent ::std::for_each(aList.begin(), aList.end(), AttachObject(*this, nIndex)); } -//----------------------------------------------------------------------------- + void SAL_CALL ImplEventAttacherManager::revokeScriptEvents(sal_Int32 nIndex ) throw( IllegalArgumentException, RuntimeException ) { @@ -572,7 +572,7 @@ void SAL_CALL ImplEventAttacherManager::revokeScriptEvents(sal_Int32 nIndex ) ::std::for_each(aList.begin(), aList.end(), AttachObject(*this, nIndex)); } -//----------------------------------------------------------------------------- + void SAL_CALL ImplEventAttacherManager::insertEntry(sal_Int32 nIndex) throw( IllegalArgumentException, RuntimeException ) { @@ -587,7 +587,7 @@ void SAL_CALL ImplEventAttacherManager::insertEntry(sal_Int32 nIndex) aIndex.insert( aIndex.begin() + nIndex, aTmp ); } -//----------------------------------------------------------------------------- + void SAL_CALL ImplEventAttacherManager::removeEntry(sal_Int32 nIndex) throw( IllegalArgumentException, RuntimeException ) { @@ -599,7 +599,7 @@ void SAL_CALL ImplEventAttacherManager::removeEntry(sal_Int32 nIndex) aIndex.erase( aIt ); } -//----------------------------------------------------------------------------- + Sequence< ScriptEventDescriptor > SAL_CALL ImplEventAttacherManager::getScriptEvents(sal_Int32 nIndex) throw( IllegalArgumentException, RuntimeException ) { @@ -620,7 +620,7 @@ Sequence< ScriptEventDescriptor > SAL_CALL ImplEventAttacherManager::getScriptEv return aSeq; } -//----------------------------------------------------------------------------- + void SAL_CALL ImplEventAttacherManager::attach(sal_Int32 nIndex, const Reference< XInterface >& xObject, const Any & Helper) throw( IllegalArgumentException, ServiceNotRegisteredException, RuntimeException ) { @@ -683,7 +683,7 @@ void SAL_CALL ImplEventAttacherManager::attach(sal_Int32 nIndex, const Reference } } -//----------------------------------------------------------------------------- + void SAL_CALL ImplEventAttacherManager::detach(sal_Int32 nIndex, const Reference< XInterface >& xObject) throw( IllegalArgumentException, RuntimeException ) { diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx index e5daf792d2b7..de24434b0a47 100644 --- a/comphelper/source/misc/SelectionMultiplex.cxx +++ b/comphelper/source/misc/SelectionMultiplex.cxx @@ -33,20 +33,20 @@ using namespace ::com::sun::star::view; //======================================================================== //= OSelectionChangeListener //======================================================================== -//------------------------------------------------------------------------ + OSelectionChangeListener::~OSelectionChangeListener() { if (m_pAdapter) m_pAdapter->dispose(); } -//------------------------------------------------------------------ + void OSelectionChangeListener::_disposing(const EventObject&) throw( RuntimeException) { // nothing to do here } -//------------------------------------------------------------------ + void OSelectionChangeListener::setAdapter(OSelectionChangeMultiplexer* pAdapter) { if (m_pAdapter) @@ -67,7 +67,7 @@ void OSelectionChangeListener::setAdapter(OSelectionChangeMultiplexer* pAdapter) //======================================================================== //= OSelectionChangeMultiplexer //======================================================================== -//------------------------------------------------------------------ + OSelectionChangeMultiplexer::OSelectionChangeMultiplexer(OSelectionChangeListener* _pListener, const Reference< XSelectionSupplier>& _rxSet, bool _bAutoReleaseSet) :m_xSet(_rxSet) ,m_pListener(_pListener) @@ -84,24 +84,24 @@ OSelectionChangeMultiplexer::OSelectionChangeMultiplexer(OSelectionChangeListene osl_atomic_decrement(&m_refCount); } -//------------------------------------------------------------------ + OSelectionChangeMultiplexer::~OSelectionChangeMultiplexer() { } -//------------------------------------------------------------------ + void OSelectionChangeMultiplexer::lock() { ++m_nLockCount; } -//------------------------------------------------------------------ + void OSelectionChangeMultiplexer::unlock() { --m_nLockCount; } -//------------------------------------------------------------------ + void OSelectionChangeMultiplexer::dispose() { if (m_bListening) @@ -121,7 +121,7 @@ void OSelectionChangeMultiplexer::dispose() } // XEventListener -//------------------------------------------------------------------ + void SAL_CALL OSelectionChangeMultiplexer::disposing( const EventObject& _rSource) throw( RuntimeException) { if (m_pListener) @@ -142,7 +142,7 @@ void SAL_CALL OSelectionChangeMultiplexer::disposing( const EventObject& _rSour } // XSelectionChangeListener -//------------------------------------------------------------------ + void SAL_CALL OSelectionChangeMultiplexer::selectionChanged( const EventObject& _rEvent ) throw( RuntimeException) { if (m_pListener && !locked()) diff --git a/comphelper/source/misc/accessiblecomponenthelper.cxx b/comphelper/source/misc/accessiblecomponenthelper.cxx index 2fdaf84f12a6..6774302b5afc 100644 --- a/comphelper/source/misc/accessiblecomponenthelper.cxx +++ b/comphelper/source/misc/accessiblecomponenthelper.cxx @@ -32,18 +32,18 @@ namespace comphelper //===================================================================== //= OCommonAccessibleComponent //===================================================================== - //--------------------------------------------------------------------- + OCommonAccessibleComponent::OCommonAccessibleComponent( IMutex* _pExternalLock ) :OAccessibleContextHelper( _pExternalLock ) { } - //--------------------------------------------------------------------- + OCommonAccessibleComponent::~OCommonAccessibleComponent( ) { } - //-------------------------------------------------------------------- + bool SAL_CALL OCommonAccessibleComponent::containsPoint( const Point& _rPoint ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -54,7 +54,7 @@ namespace comphelper && ( _rPoint.Y < aBounds.Height ); } - //-------------------------------------------------------------------- + Point SAL_CALL OCommonAccessibleComponent::getLocation( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -62,7 +62,7 @@ namespace comphelper return Point( aBounds.X, aBounds.Y ); } - //-------------------------------------------------------------------- + Point SAL_CALL OCommonAccessibleComponent::getLocationOnScreen( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -82,7 +82,7 @@ namespace comphelper return aScreenLoc; } - //-------------------------------------------------------------------- + Size SAL_CALL OCommonAccessibleComponent::getSize( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -90,7 +90,7 @@ namespace comphelper return Size( aBounds.Width, aBounds.Height ); } - //-------------------------------------------------------------------- + Rectangle SAL_CALL OCommonAccessibleComponent::getBounds( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -100,42 +100,42 @@ namespace comphelper //===================================================================== //= OAccessibleComponentHelper //===================================================================== - //--------------------------------------------------------------------- + OAccessibleComponentHelper::OAccessibleComponentHelper( IMutex* _pExternalLock ) :OCommonAccessibleComponent( _pExternalLock ) { } - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( OAccessibleComponentHelper, OCommonAccessibleComponent, OAccessibleComponentHelper_Base ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleComponentHelper, OCommonAccessibleComponent, OAccessibleComponentHelper_Base ) // (order matters: the first is the class name, the second is the class doing the ref counting) - //-------------------------------------------------------------------- + sal_Bool SAL_CALL OAccessibleComponentHelper::containsPoint( const Point& _rPoint ) throw (RuntimeException) { return OCommonAccessibleComponent::containsPoint( _rPoint ); } - //-------------------------------------------------------------------- + Point SAL_CALL OAccessibleComponentHelper::getLocation( ) throw (RuntimeException) { return OCommonAccessibleComponent::getLocation( ); } - //-------------------------------------------------------------------- + Point SAL_CALL OAccessibleComponentHelper::getLocationOnScreen( ) throw (RuntimeException) { return OCommonAccessibleComponent::getLocationOnScreen( ); } - //-------------------------------------------------------------------- + Size SAL_CALL OAccessibleComponentHelper::getSize( ) throw (RuntimeException) { return OCommonAccessibleComponent::getSize( ); } - //-------------------------------------------------------------------- + Rectangle SAL_CALL OAccessibleComponentHelper::getBounds( ) throw (RuntimeException) { return OCommonAccessibleComponent::getBounds( ); @@ -144,42 +144,42 @@ namespace comphelper //===================================================================== //= OAccessibleExtendedComponentHelper //===================================================================== - //--------------------------------------------------------------------- + OAccessibleExtendedComponentHelper::OAccessibleExtendedComponentHelper( IMutex* _pExternalLock ) :OCommonAccessibleComponent( _pExternalLock ) { } - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( OAccessibleExtendedComponentHelper, OCommonAccessibleComponent, OAccessibleExtendedComponentHelper_Base ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleExtendedComponentHelper, OCommonAccessibleComponent, OAccessibleExtendedComponentHelper_Base ) // (order matters: the first is the class name, the second is the class doing the ref counting) - //-------------------------------------------------------------------- + sal_Bool SAL_CALL OAccessibleExtendedComponentHelper::containsPoint( const Point& _rPoint ) throw (RuntimeException) { return OCommonAccessibleComponent::containsPoint( _rPoint ); } - //-------------------------------------------------------------------- + Point SAL_CALL OAccessibleExtendedComponentHelper::getLocation( ) throw (RuntimeException) { return OCommonAccessibleComponent::getLocation( ); } - //-------------------------------------------------------------------- + Point SAL_CALL OAccessibleExtendedComponentHelper::getLocationOnScreen( ) throw (RuntimeException) { return OCommonAccessibleComponent::getLocationOnScreen( ); } - //-------------------------------------------------------------------- + Size SAL_CALL OAccessibleExtendedComponentHelper::getSize( ) throw (RuntimeException) { return OCommonAccessibleComponent::getSize( ); } - //-------------------------------------------------------------------- + Rectangle SAL_CALL OAccessibleExtendedComponentHelper::getBounds( ) throw (RuntimeException) { return OCommonAccessibleComponent::getBounds( ); diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx index f4d9df56bc86..d94cd43e1f51 100644 --- a/comphelper/source/misc/accessiblecontexthelper.cxx +++ b/comphelper/source/misc/accessiblecontexthelper.cxx @@ -69,7 +69,7 @@ namespace comphelper } }; - //--------------------------------------------------------------------- + inline void OContextHelper_Impl::setCreator( const Reference< XAccessible >& _rAcc ) { m_aCreator = _rAcc; @@ -78,7 +78,7 @@ namespace comphelper //===================================================================== //= OAccessibleContextHelper //===================================================================== - //--------------------------------------------------------------------- + OAccessibleContextHelper::OAccessibleContextHelper( IMutex* _pExternalLock ) :OAccessibleContextHelper_Base( GetMutex() ) ,m_pImpl( NULL ) @@ -88,13 +88,13 @@ namespace comphelper m_pImpl->setExternalLock( _pExternalLock ); } - //--------------------------------------------------------------------- + void OAccessibleContextHelper::forgetExternalLock() { m_pImpl->setExternalLock( NULL ); } - //--------------------------------------------------------------------- + OAccessibleContextHelper::~OAccessibleContextHelper( ) { forgetExternalLock(); @@ -107,13 +107,13 @@ namespace comphelper m_pImpl = NULL; } - //--------------------------------------------------------------------- + IMutex* OAccessibleContextHelper::getExternalLock( ) { return m_pImpl->getExternalLock(); } - //--------------------------------------------------------------------- + void SAL_CALL OAccessibleContextHelper::disposing() { // rhbz#1001768: de facto this class is locked by SolarMutex; @@ -127,7 +127,7 @@ namespace comphelper } } - //--------------------------------------------------------------------- + void SAL_CALL OAccessibleContextHelper::addAccessibleEventListener( const Reference< XAccessibleEventListener >& _rxListener ) throw (RuntimeException) { OMutexGuard aGuard( getExternalLock() ); @@ -150,7 +150,7 @@ namespace comphelper } } - //--------------------------------------------------------------------- + void SAL_CALL OAccessibleContextHelper::removeAccessibleEventListener( const Reference< XAccessibleEventListener >& _rxListener ) throw (RuntimeException) { OMutexGuard aGuard( getExternalLock() ); @@ -175,7 +175,7 @@ namespace comphelper } } - //--------------------------------------------------------------------- + void SAL_CALL OAccessibleContextHelper::NotifyAccessibleEvent( const sal_Int16 _nEventId, const Any& _rOldValue, const Any& _rNewValue ) { @@ -195,20 +195,20 @@ namespace comphelper AccessibleEventNotifier::addEvent( m_pImpl->getClientId( ), aEvent ); } - //--------------------------------------------------------------------- + bool OAccessibleContextHelper::isAlive() const { return !GetBroadcastHelper().bDisposed && !GetBroadcastHelper().bInDispose; } - //--------------------------------------------------------------------- + void OAccessibleContextHelper::ensureAlive() const SAL_THROW( ( DisposedException ) ) { if( !isAlive() ) throw DisposedException(); } - //--------------------------------------------------------------------- + void OAccessibleContextHelper::ensureDisposed( ) { if ( !GetBroadcastHelper().bDisposed ) @@ -219,19 +219,19 @@ namespace comphelper } } - //--------------------------------------------------------------------- + void OAccessibleContextHelper::lateInit( const Reference< XAccessible >& _rxAccessible ) { m_pImpl->setCreator( _rxAccessible ); } - //--------------------------------------------------------------------- + Reference< XAccessible > OAccessibleContextHelper::getAccessibleCreator( ) const { return m_pImpl->getCreator(); } - //--------------------------------------------------------------------- + sal_Int32 SAL_CALL OAccessibleContextHelper::getAccessibleIndexInParent( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -277,7 +277,7 @@ namespace comphelper return nRet; } - //--------------------------------------------------------------------- + Locale SAL_CALL OAccessibleContextHelper::getLocale( ) throw (IllegalAccessibleComponentStateException, RuntimeException) { // simply ask the parent @@ -292,7 +292,7 @@ namespace comphelper return xParentContext->getLocale(); } - //--------------------------------------------------------------------- + Reference< XAccessibleContext > OAccessibleContextHelper::implGetParentContext() SAL_THROW( ( RuntimeException ) ) { Reference< XAccessible > xParent = getAccessibleParent(); diff --git a/comphelper/source/misc/accessibleeventnotifier.cxx b/comphelper/source/misc/accessibleeventnotifier.cxx index be60fe3d9824..97187c3fb1c4 100644 --- a/comphelper/source/misc/accessibleeventnotifier.cxx +++ b/comphelper/source/misc/accessibleeventnotifier.cxx @@ -34,7 +34,7 @@ using namespace ::comphelper; //===================================================================== //= AccessibleEventNotifier //===================================================================== -//--------------------------------------------------------------------- + namespace { typedef ::std::pair< AccessibleEventNotifier::TClientId, @@ -148,7 +148,7 @@ namespace comphelper { //......................................................................... - //--------------------------------------------------------------------- + AccessibleEventNotifier::TClientId AccessibleEventNotifier::registerClient( ) { ::osl::MutexGuard aGuard( lclMutex::get() ); @@ -171,7 +171,7 @@ namespace comphelper return nNewClientId; } - //--------------------------------------------------------------------- + void AccessibleEventNotifier::revokeClient( const TClientId _nClient ) { ::osl::MutexGuard aGuard( lclMutex::get() ); @@ -187,7 +187,7 @@ namespace comphelper releaseId(_nClient); } - //--------------------------------------------------------------------- + void AccessibleEventNotifier::revokeClientNotifyDisposing( const TClientId _nClient, const Reference< XInterface >& _rxEventSource ) SAL_THROW( ( ) ) { @@ -222,7 +222,7 @@ namespace comphelper delete pListeners; } - //--------------------------------------------------------------------- + sal_Int32 AccessibleEventNotifier::addEventListener( const TClientId _nClient, const Reference< XAccessibleEventListener >& _rxListener ) SAL_THROW( ( ) ) { @@ -239,7 +239,7 @@ namespace comphelper return aClientPos->second->getLength(); } - //--------------------------------------------------------------------- + sal_Int32 AccessibleEventNotifier::removeEventListener( const TClientId _nClient, const Reference< XAccessibleEventListener >& _rxListener ) SAL_THROW( ( ) ) { @@ -256,7 +256,7 @@ namespace comphelper return aClientPos->second->getLength(); } - //--------------------------------------------------------------------- + void AccessibleEventNotifier::addEvent( const TClientId _nClient, const AccessibleEventObject& _rEvent ) SAL_THROW( ( ) ) { Sequence< Reference< XInterface > > aListeners; diff --git a/comphelper/source/misc/accessiblekeybindinghelper.cxx b/comphelper/source/misc/accessiblekeybindinghelper.cxx index 752b12fbeaeb..4aadb00f709c 100644 --- a/comphelper/source/misc/accessiblekeybindinghelper.cxx +++ b/comphelper/source/misc/accessiblekeybindinghelper.cxx @@ -38,7 +38,7 @@ namespace comphelper { } - // ----------------------------------------------------------------------------- + OAccessibleKeyBindingHelper::OAccessibleKeyBindingHelper( const OAccessibleKeyBindingHelper& rHelper ) : cppu::WeakImplHelper1<XAccessibleKeyBinding>( rHelper ) @@ -46,13 +46,13 @@ namespace comphelper { } - // ----------------------------------------------------------------------------- + OAccessibleKeyBindingHelper::~OAccessibleKeyBindingHelper() { } - // ----------------------------------------------------------------------------- + void OAccessibleKeyBindingHelper::AddKeyBinding( const Sequence< awt::KeyStroke >& rKeyBinding ) throw (RuntimeException) { @@ -61,7 +61,7 @@ namespace comphelper m_aKeyBindings.push_back( rKeyBinding ); } - // ----------------------------------------------------------------------------- + void OAccessibleKeyBindingHelper::AddKeyBinding( const awt::KeyStroke& rKeyStroke ) throw (RuntimeException) { @@ -72,9 +72,9 @@ namespace comphelper m_aKeyBindings.push_back( aSeq ); } - // ----------------------------------------------------------------------------- + // XAccessibleKeyBinding - // ----------------------------------------------------------------------------- + sal_Int32 OAccessibleKeyBindingHelper::getAccessibleKeyBindingCount() throw (RuntimeException) { @@ -83,7 +83,7 @@ namespace comphelper return m_aKeyBindings.size(); } - // ----------------------------------------------------------------------------- + Sequence< awt::KeyStroke > OAccessibleKeyBindingHelper::getAccessibleKeyBinding( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) { @@ -95,7 +95,7 @@ namespace comphelper return m_aKeyBindings[nIndex]; } - // ----------------------------------------------------------------------------- + //.............................................................................. } // namespace comphelper diff --git a/comphelper/source/misc/accessibleselectionhelper.cxx b/comphelper/source/misc/accessibleselectionhelper.cxx index ed93e6888a57..7ddb80605bab 100644 --- a/comphelper/source/misc/accessibleselectionhelper.cxx +++ b/comphelper/source/misc/accessibleselectionhelper.cxx @@ -32,38 +32,38 @@ namespace comphelper //===================================================================== //= OCommonAccessibleSelection //===================================================================== - //--------------------------------------------------------------------- + OCommonAccessibleSelection::OCommonAccessibleSelection( ) { } OCommonAccessibleSelection::~OCommonAccessibleSelection() {} - //-------------------------------------------------------------------- + void SAL_CALL OCommonAccessibleSelection::selectAccessibleChild( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { implSelect( nChildIndex, sal_True ); } - //-------------------------------------------------------------------- + bool SAL_CALL OCommonAccessibleSelection::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { return( implIsSelected( nChildIndex ) ); } - //-------------------------------------------------------------------- + void SAL_CALL OCommonAccessibleSelection::clearAccessibleSelection( ) throw (RuntimeException) { implSelect( ACCESSIBLE_SELECTION_CHILD_ALL, sal_False ); } - //-------------------------------------------------------------------- + void SAL_CALL OCommonAccessibleSelection::selectAllAccessibleChildren( ) throw (RuntimeException) { implSelect( ACCESSIBLE_SELECTION_CHILD_ALL, sal_True ); } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL OCommonAccessibleSelection::getSelectedAccessibleChildCount( ) throw (RuntimeException) { sal_Int32 nRet = 0; @@ -81,7 +81,7 @@ namespace comphelper return( nRet ); } - //-------------------------------------------------------------------- + Reference< XAccessible > SAL_CALL OCommonAccessibleSelection::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { Reference< XAccessible > xRet; @@ -99,7 +99,7 @@ namespace comphelper return( xRet ); } - //-------------------------------------------------------------------- + void SAL_CALL OCommonAccessibleSelection::deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { implSelect( nSelectedChildIndex, sal_False ); @@ -108,65 +108,65 @@ namespace comphelper //===================================================================== //= OAccessibleSelectionHelper //===================================================================== - //-------------------------------------------------------------------- + OAccessibleSelectionHelper::OAccessibleSelectionHelper( IMutex* _pExternalLock ) : OAccessibleComponentHelper(_pExternalLock) { } - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( OAccessibleSelectionHelper, OAccessibleComponentHelper, OAccessibleSelectionHelper_Base ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleSelectionHelper, OAccessibleComponentHelper, OAccessibleSelectionHelper_Base ) // (order matters: the first is the class name, the second is the class doing the ref counting) - //-------------------------------------------------------------------- + Reference< XAccessibleContext > OAccessibleSelectionHelper::implGetAccessibleContext() throw ( RuntimeException ) { return( this ); } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleSelectionHelper::selectAccessibleChild( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { OExternalLockGuard aGuard( this ); OCommonAccessibleSelection::selectAccessibleChild( nChildIndex ); } - //-------------------------------------------------------------------- + sal_Bool SAL_CALL OAccessibleSelectionHelper::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { OExternalLockGuard aGuard( this ); return( OCommonAccessibleSelection::isAccessibleChildSelected( nChildIndex ) ); } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleSelectionHelper::clearAccessibleSelection( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); OCommonAccessibleSelection::clearAccessibleSelection(); } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleSelectionHelper::selectAllAccessibleChildren( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); OCommonAccessibleSelection::selectAllAccessibleChildren(); } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL OAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); return( OCommonAccessibleSelection::getSelectedAccessibleChildCount() ); } - //-------------------------------------------------------------------- + Reference< XAccessible > SAL_CALL OAccessibleSelectionHelper::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { OExternalLockGuard aGuard( this ); return( OCommonAccessibleSelection::getSelectedAccessibleChild( nSelectedChildIndex ) ); } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleSelectionHelper::deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { OExternalLockGuard aGuard( this ); diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx index d21d7ff3cc41..00a21a7fa1d0 100644 --- a/comphelper/source/misc/accessibletexthelper.cxx +++ b/comphelper/source/misc/accessibletexthelper.cxx @@ -48,13 +48,13 @@ namespace comphelper { } - // ----------------------------------------------------------------------------- + OCommonAccessibleText::~OCommonAccessibleText() { } - // ----------------------------------------------------------------------------- + Reference < i18n::XBreakIterator > OCommonAccessibleText::implGetBreakIterator() { @@ -67,7 +67,7 @@ namespace comphelper return m_xBreakIter; } - // ----------------------------------------------------------------------------- + Reference < i18n::XCharacterClassification > OCommonAccessibleText::implGetCharacterClassification() { @@ -79,28 +79,28 @@ namespace comphelper return m_xCharClass; } - // ----------------------------------------------------------------------------- + bool OCommonAccessibleText::implIsValidBoundary( i18n::Boundary& rBoundary, sal_Int32 nLength ) { return ( rBoundary.startPos >= 0 ) && ( rBoundary.startPos < nLength ) && ( rBoundary.endPos >= 0 ) && ( rBoundary.endPos <= nLength ); } - // ----------------------------------------------------------------------------- + bool OCommonAccessibleText::implIsValidIndex( sal_Int32 nIndex, sal_Int32 nLength ) { return ( nIndex >= 0 ) && ( nIndex < nLength ); } - // ----------------------------------------------------------------------------- + bool OCommonAccessibleText::implIsValidRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength ) { return ( nStartIndex >= 0 ) && ( nStartIndex <= nLength ) && ( nEndIndex >= 0 ) && ( nEndIndex <= nLength ); } - // ----------------------------------------------------------------------------- + void OCommonAccessibleText::implGetGlyphBoundary( i18n::Boundary& rBoundary, sal_Int32 nIndex ) { @@ -131,7 +131,7 @@ namespace comphelper } } - // ----------------------------------------------------------------------------- + bool OCommonAccessibleText::implGetWordBoundary( i18n::Boundary& rBoundary, sal_Int32 nIndex ) { @@ -164,7 +164,7 @@ namespace comphelper return bWord; } - // ----------------------------------------------------------------------------- + void OCommonAccessibleText::implGetSentenceBoundary( i18n::Boundary& rBoundary, sal_Int32 nIndex ) { @@ -187,7 +187,7 @@ namespace comphelper } } - // ----------------------------------------------------------------------------- + void OCommonAccessibleText::implGetParagraphBoundary( i18n::Boundary& rBoundary, sal_Int32 nIndex ) { @@ -213,7 +213,7 @@ namespace comphelper } } - // ----------------------------------------------------------------------------- + void OCommonAccessibleText::implGetLineBoundary( i18n::Boundary& rBoundary, sal_Int32 nIndex ) { @@ -232,7 +232,7 @@ namespace comphelper } } - // ----------------------------------------------------------------------------- + sal_Unicode OCommonAccessibleText::getCharacter( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) { @@ -244,14 +244,14 @@ namespace comphelper return sText[nIndex]; } - // ----------------------------------------------------------------------------- + sal_Int32 OCommonAccessibleText::getCharacterCount() throw (RuntimeException) { return implGetText().getLength(); } - // ----------------------------------------------------------------------------- + OUString OCommonAccessibleText::getSelectedText() throw (RuntimeException) { @@ -272,7 +272,7 @@ namespace comphelper return sText; } - // ----------------------------------------------------------------------------- + sal_Int32 OCommonAccessibleText::getSelectionStart() throw (RuntimeException) { @@ -284,7 +284,7 @@ namespace comphelper return nStartIndex; } - // ----------------------------------------------------------------------------- + sal_Int32 OCommonAccessibleText::getSelectionEnd() throw (RuntimeException) { @@ -296,14 +296,14 @@ namespace comphelper return nEndIndex; } - // ----------------------------------------------------------------------------- + OUString OCommonAccessibleText::getText() throw (RuntimeException) { return implGetText(); } - // ----------------------------------------------------------------------------- + OUString OCommonAccessibleText::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (IndexOutOfBoundsException, RuntimeException) { @@ -318,7 +318,7 @@ namespace comphelper return sText.copy( nMinIndex, nMaxIndex - nMinIndex ); } - // ----------------------------------------------------------------------------- + TextSegment OCommonAccessibleText::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) { @@ -423,7 +423,7 @@ namespace comphelper return aResult; } - // ----------------------------------------------------------------------------- + TextSegment OCommonAccessibleText::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) { @@ -548,7 +548,7 @@ namespace comphelper return aResult; } - // ----------------------------------------------------------------------------- + TextSegment OCommonAccessibleText::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) { @@ -677,7 +677,7 @@ namespace comphelper return aResult; } - // ----------------------------------------------------------------------------- + bool OCommonAccessibleText::implInitTextChangedEvent( const OUString& rOldString, const OUString& rNewString, @@ -777,21 +777,21 @@ namespace comphelper { } - // ----------------------------------------------------------------------------- + // XInterface - // ----------------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( OAccessibleTextHelper, OAccessibleExtendedComponentHelper, OAccessibleTextHelper_Base ) - // ----------------------------------------------------------------------------- + // XTypeProvider - // ----------------------------------------------------------------------------- + IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleTextHelper, OAccessibleExtendedComponentHelper, OAccessibleTextHelper_Base ) - // ----------------------------------------------------------------------------- + // XAccessibleText - // ----------------------------------------------------------------------------- + sal_Unicode OAccessibleTextHelper::getCharacter( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) { @@ -800,7 +800,7 @@ namespace comphelper return OCommonAccessibleText::getCharacter( nIndex ); } - // ----------------------------------------------------------------------------- + sal_Int32 OAccessibleTextHelper::getCharacterCount() throw (RuntimeException) { @@ -809,7 +809,7 @@ namespace comphelper return OCommonAccessibleText::getCharacterCount(); } - // ----------------------------------------------------------------------------- + OUString OAccessibleTextHelper::getSelectedText() throw (RuntimeException) { @@ -818,7 +818,7 @@ namespace comphelper return OCommonAccessibleText::getSelectedText(); } - // ----------------------------------------------------------------------------- + sal_Int32 OAccessibleTextHelper::getSelectionStart() throw (RuntimeException) { @@ -827,7 +827,7 @@ namespace comphelper return OCommonAccessibleText::getSelectionStart(); } - // ----------------------------------------------------------------------------- + sal_Int32 OAccessibleTextHelper::getSelectionEnd() throw (RuntimeException) { @@ -836,7 +836,7 @@ namespace comphelper return OCommonAccessibleText::getSelectionEnd(); } - // ----------------------------------------------------------------------------- + OUString OAccessibleTextHelper::getText() throw (RuntimeException) { @@ -845,7 +845,7 @@ namespace comphelper return OCommonAccessibleText::getText(); } - // ----------------------------------------------------------------------------- + OUString OAccessibleTextHelper::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (IndexOutOfBoundsException, RuntimeException) { @@ -854,7 +854,7 @@ namespace comphelper return OCommonAccessibleText::getTextRange( nStartIndex, nEndIndex ); } - // ----------------------------------------------------------------------------- + TextSegment OAccessibleTextHelper::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) { @@ -863,7 +863,7 @@ namespace comphelper return OCommonAccessibleText::getTextAtIndex( nIndex, aTextType ); } - // ----------------------------------------------------------------------------- + TextSegment OAccessibleTextHelper::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) { @@ -872,7 +872,7 @@ namespace comphelper return OCommonAccessibleText::getTextBeforeIndex( nIndex, aTextType ); } - // ----------------------------------------------------------------------------- + TextSegment OAccessibleTextHelper::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) { @@ -881,7 +881,7 @@ namespace comphelper return OCommonAccessibleText::getTextBehindIndex( nIndex, aTextType ); } - // ----------------------------------------------------------------------------- + //.............................................................................. } // namespace comphelper diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index f189530365f0..47e33392701f 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -37,7 +37,7 @@ namespace comphelper //========================================================================= //= OWrappedAccessibleChildrenManager //========================================================================= - //-------------------------------------------------------------------- + struct RemoveEventListener : public ::std::unary_function< AccessibleMap::value_type, void > { @@ -58,7 +58,7 @@ namespace comphelper } }; - //-------------------------------------------------------------------- + struct DisposeMappedChild : public ::std::unary_function< AccessibleMap::value_type, void > { @@ -72,32 +72,32 @@ namespace comphelper } }; - //------------------------------------------------------------------------- + OWrappedAccessibleChildrenManager::OWrappedAccessibleChildrenManager( const Reference< XComponentContext >& _rxContext ) :m_xContext( _rxContext ) ,m_bTransientChildren( true ) { } - //------------------------------------------------------------------------- + OWrappedAccessibleChildrenManager::~OWrappedAccessibleChildrenManager( ) { } - //------------------------------------------------------------------------- + void OWrappedAccessibleChildrenManager::setTransientChildren( bool _bSet ) { m_bTransientChildren = _bSet; } - //------------------------------------------------------------------------- + void OWrappedAccessibleChildrenManager::setOwningAccessible( const Reference< XAccessible >& _rxAcc ) { OSL_ENSURE( !m_aOwningAccessible.get().is(), "OWrappedAccessibleChildrenManager::setOwningAccessible: to be called only once!" ); m_aOwningAccessible = WeakReference< XAccessible >( _rxAcc ); } - //------------------------------------------------------------------------- + void OWrappedAccessibleChildrenManager::removeFromCache( const Reference< XAccessible >& _rxKey ) { AccessibleMap::iterator aRemovedPos = m_aChildrenMap.find( _rxKey ); @@ -111,7 +111,7 @@ namespace comphelper } } - //------------------------------------------------------------------------- + void OWrappedAccessibleChildrenManager::invalidateAll( ) { // remove as event listener from the map elements @@ -121,7 +121,7 @@ namespace comphelper m_aChildrenMap.swap( aMap ); } - //------------------------------------------------------------------------- + Reference< XAccessible > OWrappedAccessibleChildrenManager::getAccessibleWrapperFor( const Reference< XAccessible >& _rxKey, bool _bCreate ) { @@ -168,7 +168,7 @@ namespace comphelper return xValue; } - //------------------------------------------------------------------------- + void OWrappedAccessibleChildrenManager::dispose() { // dispose our children @@ -179,7 +179,7 @@ namespace comphelper m_aChildrenMap.swap( aMap ); } - //-------------------------------------------------------------------- + void OWrappedAccessibleChildrenManager::implTranslateChildEventValue( const Any& _rInValue, Any& _rOutValue ) { _rOutValue.clear(); @@ -188,7 +188,7 @@ namespace comphelper _rOutValue <<= getAccessibleWrapperFor( xChild, true ); } - //------------------------------------------------------------------------- + void OWrappedAccessibleChildrenManager::translateAccessibleEvent( const AccessibleEventObject& _rEvent, AccessibleEventObject& _rTranslatedEvent ) { // just in case we can't translate some of the values: @@ -242,7 +242,7 @@ namespace comphelper } } - //------------------------------------------------------------------------- + void OWrappedAccessibleChildrenManager::handleChildNotification( const AccessibleEventObject& _rEvent ) { if ( AccessibleEventId::INVALIDATE_ALL_CHILDREN == _rEvent.EventId ) @@ -258,7 +258,7 @@ namespace comphelper } } - //-------------------------------------------------------------------- + void SAL_CALL OWrappedAccessibleChildrenManager::disposing( const EventObject& _rSource ) throw (RuntimeException) { // this should come from one of the inner XAccessible's of our children @@ -298,7 +298,7 @@ namespace comphelper //========================================================================= //= OAccessibleWrapper (implementation) //========================================================================= - //------------------------------------------------------------------------- + OAccessibleWrapper::OAccessibleWrapper( const Reference< XComponentContext >& _rxContext, const Reference< XAccessible >& _rxInnerAccessible, const Reference< XAccessible >& _rxParentAccessible ) :OAccessibleWrapper_Base( ) @@ -308,7 +308,7 @@ namespace comphelper { } - //-------------------------------------------------------------------- + OAccessibleWrapper::~OAccessibleWrapper( ) { if ( !m_rBHelper.bDisposed ) @@ -318,11 +318,11 @@ namespace comphelper } } - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleWrapper, OComponentProxyAggregation, OAccessibleWrapper_Base ) IMPLEMENT_FORWARD_REFCOUNT( OAccessibleWrapper, OComponentProxyAggregation ) - //-------------------------------------------------------------------- + Any OAccessibleWrapper::queryInterface( const Type& _rType ) throw (RuntimeException) { // #111089# instead of the inner XAccessible the proxy XAccessible must be returned @@ -333,19 +333,19 @@ namespace comphelper return aReturn; } - //-------------------------------------------------------------------- + Reference< XAccessibleContext > OAccessibleWrapper::getContextNoCreate( ) const { return (Reference< XAccessibleContext >)m_aContext; } - //-------------------------------------------------------------------- + OAccessibleContextWrapper* OAccessibleWrapper::createAccessibleContext( const Reference< XAccessibleContext >& _rxInnerContext ) { return new OAccessibleContextWrapper( getComponentContext(), _rxInnerContext, this, m_xParentAccessible ); } - //-------------------------------------------------------------------- + Reference< XAccessibleContext > SAL_CALL OAccessibleWrapper::getAccessibleContext( ) throw (RuntimeException) { // see if the context is still alive (we cache it) @@ -368,7 +368,7 @@ namespace comphelper //========================================================================= //= OAccessibleWrapper (implementation) //========================================================================= - //------------------------------------------------------------------------- + OAccessibleContextWrapperHelper::OAccessibleContextWrapperHelper( const Reference< XComponentContext >& _rxContext, ::cppu::OBroadcastHelper& _rBHelper, @@ -393,7 +393,7 @@ namespace comphelper m_pChildMapper->setOwningAccessible( m_xOwningAccessible ); } - //-------------------------------------------------------------------- + void OAccessibleContextWrapperHelper::aggregateProxy( oslInterlockedCount& _rRefCount, ::cppu::OWeakObject& _rDelegator ) { Reference< XComponent > xInnerComponent( m_xInnerContext, UNO_QUERY ); @@ -411,7 +411,7 @@ namespace comphelper osl_atomic_decrement( &_rRefCount ); } - //-------------------------------------------------------------------- + OAccessibleContextWrapperHelper::~OAccessibleContextWrapperHelper( ) { OSL_ENSURE( m_rBHelper.bDisposed, "OAccessibleContextWrapperHelper::~OAccessibleContextWrapperHelper: you should ensure (in your dtor) that the object is disposed!" ); @@ -420,7 +420,7 @@ namespace comphelper m_pChildMapper = NULL; } - //-------------------------------------------------------------------- + Any SAL_CALL OAccessibleContextWrapperHelper::queryInterface( const Type& _rType ) throw (RuntimeException) { Any aReturn = OComponentProxyAggregationHelper::queryInterface( _rType ); @@ -429,16 +429,16 @@ namespace comphelper return aReturn; } - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleContextWrapperHelper, OComponentProxyAggregationHelper, OAccessibleContextWrapperHelper_Base ) - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL OAccessibleContextWrapperHelper::getAccessibleChildCount( ) throw (RuntimeException) { return m_xInnerContext->getAccessibleChildCount(); } - //-------------------------------------------------------------------- + Reference< XAccessible > SAL_CALL OAccessibleContextWrapperHelper::getAccessibleChild( sal_Int32 i ) throw (IndexOutOfBoundsException, RuntimeException) { // get the child of the wrapped component @@ -446,7 +446,7 @@ namespace comphelper return m_pChildMapper->getAccessibleWrapperFor( xInnerChild ); } - //-------------------------------------------------------------------- + Reference< XAccessibleRelationSet > SAL_CALL OAccessibleContextWrapperHelper::getAccessibleRelationSet( ) throw (RuntimeException) { return m_xInnerContext->getAccessibleRelationSet(); @@ -454,7 +454,7 @@ namespace comphelper // to wrap them, too .... } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleContextWrapperHelper::notifyEvent( const AccessibleEventObject& _rEvent ) throw (RuntimeException) { #if OSL_DEBUG_LEVEL > 0 @@ -492,7 +492,7 @@ namespace comphelper notifyTranslatedEvent( aTranslatedEvent ); } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleContextWrapperHelper::dispose() throw( RuntimeException ) { ::osl::MutexGuard aGuard( m_rBHelper.rMutex ); @@ -510,7 +510,7 @@ namespace comphelper OComponentProxyAggregationHelper::dispose(); } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleContextWrapperHelper::disposing( const EventObject& _rEvent ) throw (RuntimeException) { // simply disambiguate this @@ -520,13 +520,13 @@ namespace comphelper //==================================================================== //= OAccessibleContextWrapper //==================================================================== - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( OAccessibleContextWrapper, OAccessibleContextWrapper_CBase, OAccessibleContextWrapperHelper ) - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleContextWrapper, OAccessibleContextWrapper_CBase, OAccessibleContextWrapperHelper ) - //-------------------------------------------------------------------- + OAccessibleContextWrapper::OAccessibleContextWrapper( const Reference< XComponentContext >& _rxContext, const Reference< XAccessibleContext >& _rxInnerAccessibleContext, const Reference< XAccessible >& _rxOwningAccessible, const Reference< XAccessible >& _rxParentAccessible ) @@ -537,79 +537,79 @@ namespace comphelper aggregateProxy( m_refCount, *this ); } - //-------------------------------------------------------------------- + OAccessibleContextWrapper::~OAccessibleContextWrapper() { } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL OAccessibleContextWrapper::getAccessibleChildCount( ) throw (RuntimeException) { return OAccessibleContextWrapperHelper::getAccessibleChildCount(); } - //-------------------------------------------------------------------- + Reference< XAccessible > SAL_CALL OAccessibleContextWrapper::getAccessibleChild( sal_Int32 i ) throw (IndexOutOfBoundsException, RuntimeException) { return OAccessibleContextWrapperHelper::getAccessibleChild( i ); } - //-------------------------------------------------------------------- + Reference< XAccessible > SAL_CALL OAccessibleContextWrapper::getAccessibleParent( ) throw (RuntimeException) { return m_xParentAccessible; } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL OAccessibleContextWrapper::getAccessibleIndexInParent( ) throw (RuntimeException) { return m_xInnerContext->getAccessibleIndexInParent(); } - //-------------------------------------------------------------------- + sal_Int16 SAL_CALL OAccessibleContextWrapper::getAccessibleRole( ) throw (RuntimeException) { return m_xInnerContext->getAccessibleRole(); } - //-------------------------------------------------------------------- + OUString SAL_CALL OAccessibleContextWrapper::getAccessibleDescription( ) throw (RuntimeException) { return m_xInnerContext->getAccessibleDescription(); } - //-------------------------------------------------------------------- + OUString SAL_CALL OAccessibleContextWrapper::getAccessibleName( ) throw (RuntimeException) { return m_xInnerContext->getAccessibleName(); } - //-------------------------------------------------------------------- + Reference< XAccessibleRelationSet > SAL_CALL OAccessibleContextWrapper::getAccessibleRelationSet( ) throw (RuntimeException) { return OAccessibleContextWrapperHelper::getAccessibleRelationSet(); } - //-------------------------------------------------------------------- + Reference< XAccessibleStateSet > SAL_CALL OAccessibleContextWrapper::getAccessibleStateSet( ) throw (RuntimeException) { return m_xInnerContext->getAccessibleStateSet(); } - //-------------------------------------------------------------------- + Locale SAL_CALL OAccessibleContextWrapper::getLocale( ) throw (IllegalAccessibleComponentStateException, RuntimeException) { return m_xInnerContext->getLocale(); } - //-------------------------------------------------------------------- + void OAccessibleContextWrapper::notifyTranslatedEvent( const AccessibleEventObject& _rEvent ) throw (RuntimeException) { if ( m_nNotifierClient ) AccessibleEventNotifier::addEvent( m_nNotifierClient, _rEvent ); } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleContextWrapper::addAccessibleEventListener( const Reference< XAccessibleEventListener >& _rxListener ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -618,7 +618,7 @@ namespace comphelper AccessibleEventNotifier::addEventListener( m_nNotifierClient, _rxListener ); } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleContextWrapper::removeAccessibleEventListener( const Reference< XAccessibleEventListener >& _rxListener ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -633,7 +633,7 @@ namespace comphelper } } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleContextWrapper::disposing() throw (RuntimeException) { AccessibleEventNotifier::TClientId nClientId( 0 ); @@ -659,7 +659,7 @@ namespace comphelper AccessibleEventNotifier::revokeClientNotifyDisposing( nClientId, *this ); } - //-------------------------------------------------------------------- + void SAL_CALL OAccessibleContextWrapper::dispose() throw( RuntimeException ) { // simply disambiguate diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx index b84853a27e25..c910f43e1e10 100644 --- a/comphelper/source/misc/accimplaccess.cxx +++ b/comphelper/source/misc/accimplaccess.cxx @@ -52,38 +52,38 @@ namespace comphelper //===================================================================== //= OAccessibleImplementationAccess //===================================================================== - //--------------------------------------------------------------------- + OAccessibleImplementationAccess::OAccessibleImplementationAccess( ) :m_pImpl( new OAccImpl_Impl ) { } - //--------------------------------------------------------------------- + OAccessibleImplementationAccess::~OAccessibleImplementationAccess( ) { delete m_pImpl; m_pImpl = NULL; } - //--------------------------------------------------------------------- + Reference< XAccessible > OAccessibleImplementationAccess::implGetForeignControlledParent( ) const { return m_pImpl->m_xAccParent; } - //--------------------------------------------------------------------- + void OAccessibleImplementationAccess::setAccessibleParent( const Reference< XAccessible >& _rxAccParent ) { m_pImpl->m_xAccParent = _rxAccParent; } - //--------------------------------------------------------------------- + sal_Int64 OAccessibleImplementationAccess::implGetForeignControlledStates( ) const { return m_pImpl->m_nForeignControlledStates; } - //--------------------------------------------------------------------- + void OAccessibleImplementationAccess::setStateBit( const sal_Int16 _nState, const sal_Bool _bSet ) { OSL_ENSURE( _nState >= 0 && static_cast< sal_uInt16 >(_nState) < sizeof( sal_Int64 ) * 8, "OAccessibleImplementationAccess::setStateBit: no more bits (shutting down the universe now)!" ); @@ -98,14 +98,14 @@ namespace comphelper namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } - //--------------------------------------------------------------------- + const Sequence< sal_Int8 > OAccessibleImplementationAccess::getUnoTunnelImplementationId() { ::cppu::OImplementationId &rID = lcl_ImplId::get(); return rID.getImplementationId(); } - //--------------------------------------------------------------------- + sal_Int64 SAL_CALL OAccessibleImplementationAccess::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) throw (RuntimeException) { sal_Int64 nReturn( 0 ); @@ -118,7 +118,7 @@ namespace comphelper return nReturn; } - //--------------------------------------------------------------------- + OAccessibleImplementationAccess* OAccessibleImplementationAccess::getImplementation( const Reference< XAccessibleContext >& _rxComponent ) { OAccessibleImplementationAccess* pImplementation = NULL; @@ -138,7 +138,7 @@ namespace comphelper return pImplementation; } - //--------------------------------------------------------------------- + bool OAccessibleImplementationAccess::setAccessibleParent( const Reference< XAccessibleContext >& _rxComponent, const Reference< XAccessible >& _rxNewParent ) { diff --git a/comphelper/source/misc/anycompare.cxx b/comphelper/source/misc/anycompare.cxx index 30e805a791fc..9d1c1642002f 100644 --- a/comphelper/source/misc/anycompare.cxx +++ b/comphelper/source/misc/anycompare.cxx @@ -175,7 +175,7 @@ namespace comphelper } }; - //------------------------------------------------------------------------------------------------------------------ + ::std::auto_ptr< IKeyPredicateLess > getStandardLessPredicate( Type const & i_type, Reference< XCollator > const & i_collator ) { SAL_WNODEPRECATED_DECLARATIONS_PUSH diff --git a/comphelper/source/misc/anytostring.cxx b/comphelper/source/misc/anytostring.cxx index 12f646ca884d..5fa3028aba0c 100644 --- a/comphelper/source/misc/anytostring.cxx +++ b/comphelper/source/misc/anytostring.cxx @@ -52,7 +52,7 @@ inline void appendChar( OUStringBuffer & buf, sal_Unicode c ) } } -//------------------------------------------------------------------------------ + void appendValue( OUStringBuffer & buf, void const * val, typelib_TypeDescriptionReference * typeRef, bool prependType ) diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx index 8b1d81a804d1..897a840b9841 100644 --- a/comphelper/source/misc/asyncnotification.cxx +++ b/comphelper/source/misc/asyncnotification.cxx @@ -36,24 +36,24 @@ namespace comphelper //==================================================================== //= AnyEvent //==================================================================== - //-------------------------------------------------------------------- + AnyEvent::AnyEvent() :m_refCount( 0 ) { } - //-------------------------------------------------------------------- + AnyEvent::~AnyEvent() { } - //-------------------------------------------------------------------- + oslInterlockedCount SAL_CALL AnyEvent::acquire() { return osl_atomic_increment( &m_refCount ); } - //-------------------------------------------------------------------- + oslInterlockedCount SAL_CALL AnyEvent::release() { if ( 0 == osl_atomic_decrement( &m_refCount ) ) @@ -132,18 +132,18 @@ namespace comphelper //==================================================================== //= AsyncEventNotifier //==================================================================== - //-------------------------------------------------------------------- + AsyncEventNotifier::AsyncEventNotifier(char const * name): Thread(name), m_pImpl(new EventNotifierImpl) { } - //-------------------------------------------------------------------- + AsyncEventNotifier::~AsyncEventNotifier() { } - //-------------------------------------------------------------------- + void AsyncEventNotifier::removeEventsForProcessor( const ::rtl::Reference< IEventProcessor >& _xProcessor ) { ::osl::MutexGuard aGuard( m_pImpl->aMutex ); @@ -156,7 +156,7 @@ namespace comphelper m_pImpl->m_aDeadProcessors.insert( _xProcessor ); } - //-------------------------------------------------------------------- + void SAL_CALL AsyncEventNotifier::terminate() { ::osl::MutexGuard aGuard( m_pImpl->aMutex ); @@ -168,7 +168,7 @@ namespace comphelper m_pImpl->aPendingActions.set(); } - //-------------------------------------------------------------------- + void AsyncEventNotifier::addEvent( const AnyEventRef& _rEvent, const ::rtl::Reference< IEventProcessor >& _xProcessor ) { ::osl::MutexGuard aGuard( m_pImpl->aMutex ); @@ -181,7 +181,7 @@ namespace comphelper m_pImpl->aPendingActions.set(); } - //-------------------------------------------------------------------- + void AsyncEventNotifier::execute() { do diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx index 2e4699ef5710..4fff696dbd45 100644 --- a/comphelper/source/misc/comphelper_services.cxx +++ b/comphelper/source/misc/comphelper_services.cxx @@ -22,7 +22,7 @@ #include <rtl/instance.hxx> -//-------------------------------------------------------------------- + extern void createRegistryInfo_OPropertyBag(); extern void createRegistryInfo_SequenceOutputStream(); extern void createRegistryInfo_SequenceInputStream(); diff --git a/comphelper/source/misc/componentbase.cxx b/comphelper/source/misc/componentbase.cxx index d5066fbbbf65..0d13cf26f87a 100644 --- a/comphelper/source/misc/componentbase.cxx +++ b/comphelper/source/misc/componentbase.cxx @@ -36,21 +36,21 @@ namespace comphelper //==================================================================== //= ComponentBase //==================================================================== - //-------------------------------------------------------------------- + void ComponentBase::impl_checkDisposed_throw() const { if ( m_rBHelper.bDisposed ) throw DisposedException( OUString(), getComponent() ); } - //-------------------------------------------------------------------- + void ComponentBase::impl_checkInitialized_throw() const { if ( !m_bInitialized ) throw NotInitializedException( OUString(), getComponent() ); } - //-------------------------------------------------------------------- + Reference< XInterface > ComponentBase::getComponent() const { return NULL; diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx index a35a6779cb9d..4b1c44fcd045 100644 --- a/comphelper/source/misc/componentmodule.cxx +++ b/comphelper/source/misc/componentmodule.cxx @@ -54,12 +54,12 @@ namespace comphelper ~OModuleImpl(); }; - //------------------------------------------------------------------------- + OModuleImpl::OModuleImpl() { } - //------------------------------------------------------------------------- + OModuleImpl::~OModuleImpl() { } @@ -67,7 +67,7 @@ namespace comphelper //========================================================================= //= OModule //========================================================================= - //------------------------------------------------------------------------- + OModule::OModule() : m_nClients(0) , m_pImpl(new OModuleImpl) @@ -79,7 +79,7 @@ namespace comphelper delete m_pImpl; } - //------------------------------------------------------------------------- + void OModule::registerClient( OModule::ClientAccess ) { ::osl::MutexGuard aGuard(m_aMutex); @@ -87,7 +87,7 @@ namespace comphelper onFirstClient(); } - //------------------------------------------------------------------------- + void OModule::revokeClient( OModule::ClientAccess ) { ::osl::MutexGuard aGuard(m_aMutex); @@ -95,17 +95,17 @@ namespace comphelper onLastClient(); } - //-------------------------------------------------------------------------- + void OModule::onFirstClient() { } - //-------------------------------------------------------------------------- + void OModule::onLastClient() { } - //-------------------------------------------------------------------------- + void OModule::registerImplementation( const ComponentDescription& _rComp ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -115,7 +115,7 @@ namespace comphelper m_pImpl->m_aRegisteredComponents.push_back( _rComp ); } - //-------------------------------------------------------------------------- + void OModule::registerImplementation( const OUString& _rImplementationName, const ::com::sun::star::uno::Sequence< OUString >& _rServiceNames, ::cppu::ComponentFactoryFunc _pCreateFunction, FactoryInstantiation _pFactoryFunction ) { @@ -123,7 +123,7 @@ namespace comphelper registerImplementation( aComponent ); } - //-------------------------------------------------------------------------- + void* OModule::getComponentFactory( const sal_Char* _pImplementationName ) { Reference< XInterface > xFactory( getComponentFactory( @@ -131,7 +131,7 @@ namespace comphelper return xFactory.get(); } - //-------------------------------------------------------------------------- + Reference< XInterface > OModule::getComponentFactory( const OUString& _rImplementationName ) { Reference< XInterface > xReturn; diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx index 4cb1cb1c812f..837fd5de3e86 100644 --- a/comphelper/source/misc/configurationhelper.cxx +++ b/comphelper/source/misc/configurationhelper.cxx @@ -28,7 +28,7 @@ namespace comphelper{ -//----------------------------------------------- + css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext, const OUString& sPackage, sal_Int32 eMode ) @@ -74,7 +74,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons return xCFG; } -//----------------------------------------------- + css::uno::Any ConfigurationHelper::readRelativeKey(const css::uno::Reference< css::uno::XInterface > xCFG , const OUString& sRelPath, const OUString& sKey ) @@ -97,7 +97,7 @@ css::uno::Any ConfigurationHelper::readRelativeKey(const css::uno::Reference< cs return xProps->getPropertyValue(sKey); } -//----------------------------------------------- + void ConfigurationHelper::writeRelativeKey(const css::uno::Reference< css::uno::XInterface > xCFG , const OUString& sRelPath, const OUString& sKey , @@ -121,7 +121,7 @@ void ConfigurationHelper::writeRelativeKey(const css::uno::Reference< css::uno:: xProps->setPropertyValue(sKey, aValue); } -//----------------------------------------------- + css::uno::Reference< css::uno::XInterface > ConfigurationHelper::makeSureSetNodeExists(const css::uno::Reference< css::uno::XInterface > xCFG , const OUString& sRelPathToSet, const OUString& sSetNode ) @@ -155,7 +155,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::makeSureSetNode return xNode; } -//----------------------------------------------- + css::uno::Any ConfigurationHelper::readDirectKey(const css::uno::Reference< css::uno::XComponentContext >& rxContext, const OUString& sPackage, const OUString& sRelPath, @@ -166,7 +166,7 @@ css::uno::Any ConfigurationHelper::readDirectKey(const css::uno::Reference< css: return ConfigurationHelper::readRelativeKey(xCFG, sRelPath, sKey); } -//----------------------------------------------- + void ConfigurationHelper::writeDirectKey(const css::uno::Reference< css::uno::XComponentContext >& rxContext, const OUString& sPackage, const OUString& sRelPath, @@ -179,7 +179,7 @@ void ConfigurationHelper::writeDirectKey(const css::uno::Reference< css::uno::XC ConfigurationHelper::flush(xCFG); } -//----------------------------------------------- + void ConfigurationHelper::flush(const css::uno::Reference< css::uno::XInterface >& xCFG) { css::uno::Reference< css::util::XChangesBatch > xBatch(xCFG, css::uno::UNO_QUERY_THROW); diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx index a436575fda7a..617455ee6cbf 100644 --- a/comphelper/source/misc/documentinfo.cxx +++ b/comphelper/source/misc/documentinfo.cxx @@ -71,7 +71,7 @@ namespace comphelper { //==================================================================== //= DocumentInfo //==================================================================== - //-------------------------------------------------------------------- + OUString DocumentInfo::getDocumentTitle( const Reference< XModel >& _rxDocument ) { OUString sTitle; diff --git a/comphelper/source/misc/documentiologring.cxx b/comphelper/source/misc/documentiologring.cxx index 5c588bbd1540..f9a97f064504 100644 --- a/comphelper/source/misc/documentiologring.cxx +++ b/comphelper/source/misc/documentiologring.cxx @@ -31,7 +31,7 @@ using namespace ::com::sun::star; namespace comphelper { -// ---------------------------------------------------------- + OSimpleLogRing::OSimpleLogRing() : m_aMessages( SIMPLELOGRING_SIZE ) , m_bInitialized( false ) @@ -40,12 +40,12 @@ OSimpleLogRing::OSimpleLogRing() { } -// ---------------------------------------------------------- + OSimpleLogRing::~OSimpleLogRing() { } -// ---------------------------------------------------------- + uno::Sequence< OUString > SAL_CALL OSimpleLogRing::getSupportedServiceNames_static() { uno::Sequence< OUString > aResult( 1 ); @@ -53,32 +53,32 @@ uno::Sequence< OUString > SAL_CALL OSimpleLogRing::getSupportedServiceNames_stat return aResult; } -// ---------------------------------------------------------- + OUString SAL_CALL OSimpleLogRing::getImplementationName_static() { return OUString( "com.sun.star.comp.logging.SimpleLogRing" ); } -// ---------------------------------------------------------- + OUString SAL_CALL OSimpleLogRing::getSingletonName_static() { return OUString( "com.sun.star.logging.DocumentIOLogRing" ); } -// ---------------------------------------------------------- + OUString SAL_CALL OSimpleLogRing::getServiceName_static() { return OUString( "com.sun.star.logging.SimpleLogRing" ); } -// ---------------------------------------------------------- + uno::Reference< uno::XInterface > SAL_CALL OSimpleLogRing::Create( SAL_UNUSED_PARAMETER const uno::Reference< uno::XComponentContext >& ) { return static_cast< cppu::OWeakObject* >( new OSimpleLogRing ); } // XSimpleLogRing -// ---------------------------------------------------------- + void SAL_CALL OSimpleLogRing::logString( const OUString& aMessage ) throw (uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -94,7 +94,7 @@ void SAL_CALL OSimpleLogRing::logString( const OUString& aMessage ) throw (uno:: m_bInitialized = true; } -// ---------------------------------------------------------- + uno::Sequence< OUString > SAL_CALL OSimpleLogRing::getCollectedLog() throw (uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -113,7 +113,7 @@ uno::Sequence< OUString > SAL_CALL OSimpleLogRing::getCollectedLog() throw (uno: } // XInitialization -// ---------------------------------------------------------- + void SAL_CALL OSimpleLogRing::initialize( const uno::Sequence< uno::Any >& aArguments ) throw (uno::Exception, uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/comphelper/source/misc/ihwrapnofilter.cxx b/comphelper/source/misc/ihwrapnofilter.cxx index f16fc51d9b72..223d46893861 100644 --- a/comphelper/source/misc/ihwrapnofilter.cxx +++ b/comphelper/source/misc/ihwrapnofilter.cxx @@ -29,7 +29,7 @@ namespace comphelper using namespace ::com::sun::star; - //---------------------------------------------------------------------------------------------------- + OIHWrapNoFilterDialog::OIHWrapNoFilterDialog( uno::Reference< task::XInteractionHandler > xInteraction ) :m_xInter( xInteraction ) { @@ -39,7 +39,7 @@ namespace comphelper { } - //---------------------------------------------------------------------------------------------------- + uno::Sequence< OUString > SAL_CALL OIHWrapNoFilterDialog::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(1); @@ -52,9 +52,9 @@ namespace comphelper return OUString("com.sun.star.comp.task.InteractionHandlerWrapper"); } - //---------------------------------------------------------------------------------------------------- + // XInteractionHandler - //---------------------------------------------------------------------------------------------------- + void SAL_CALL OIHWrapNoFilterDialog::handle( const uno::Reference< task::XInteractionRequest >& xRequest) throw( com::sun::star::uno::RuntimeException ) { @@ -69,9 +69,9 @@ namespace comphelper m_xInter->handle( xRequest ); } - //---------------------------------------------------------------------------------------------------- + // XInteractionHandler2 - //---------------------------------------------------------------------------------------------------- + sal_Bool SAL_CALL OIHWrapNoFilterDialog::handleInteractionRequest( const uno::Reference< task::XInteractionRequest >& xRequest) throw( com::sun::star::uno::RuntimeException ) { @@ -89,9 +89,9 @@ namespace comphelper } } - //---------------------------------------------------------------------------------------------------- + // XInitialization - //---------------------------------------------------------------------------------------------------- + void SAL_CALL OIHWrapNoFilterDialog::initialize( const uno::Sequence< uno::Any >& ) throw ( uno::Exception, uno::RuntimeException, diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx index 8e648c2c1e0b..4563ac21f2f4 100644 --- a/comphelper/source/misc/instancelocker.cxx +++ b/comphelper/source/misc/instancelocker.cxx @@ -38,7 +38,7 @@ using namespace ::com::sun::star; // OInstanceLocker // ==================================================================== -// -------------------------------------------------------- + OInstanceLocker::OInstanceLocker( const uno::Reference< uno::XComponentContext >& xContext ) : m_xContext( xContext ) , m_pLockListener( NULL ) @@ -48,7 +48,7 @@ OInstanceLocker::OInstanceLocker( const uno::Reference< uno::XComponentContext > { } -// -------------------------------------------------------- + OInstanceLocker::~OInstanceLocker() { if ( !m_bDisposed ) @@ -69,7 +69,7 @@ OInstanceLocker::~OInstanceLocker() } // XComponent -// -------------------------------------------------------- + void SAL_CALL OInstanceLocker::dispose() throw (uno::RuntimeException) { @@ -95,7 +95,7 @@ void SAL_CALL OInstanceLocker::dispose() m_bDisposed = true; } -// -------------------------------------------------------- + void SAL_CALL OInstanceLocker::addEventListener( const uno::Reference< lang::XEventListener >& xListener ) throw (uno::RuntimeException) { @@ -109,7 +109,7 @@ void SAL_CALL OInstanceLocker::addEventListener( const uno::Reference< lang::XEv m_pListenersContainer->addInterface( xListener ); } -// -------------------------------------------------------- + void SAL_CALL OInstanceLocker::removeEventListener( const uno::Reference< lang::XEventListener >& xListener ) throw (uno::RuntimeException) { @@ -119,7 +119,7 @@ void SAL_CALL OInstanceLocker::removeEventListener( const uno::Reference< lang:: } // XInitialization -// -------------------------------------------------------- + void SAL_CALL OInstanceLocker::initialize( const uno::Sequence< uno::Any >& aArguments ) throw (uno::Exception, uno::RuntimeException) { @@ -208,20 +208,20 @@ uno::Sequence< OUString > SAL_CALL OInstanceLocker::getSupportedServiceNames() } // Static methods -// -------------------------------------------------------- + uno::Sequence< OUString > SAL_CALL OInstanceLocker::getSupportedServiceNames_static() { const OUString aServiceName( "com.sun.star.embed.InstanceLocker" ); return uno::Sequence< OUString >( &aServiceName, 1 ); } -// -------------------------------------------------------- + OUString SAL_CALL OInstanceLocker::getImplementationName_static() { return OUString( "com.sun.star.comp.embed.InstanceLocker" ); } -// -------------------------------------------------------- + uno::Reference< uno::XInterface > SAL_CALL OInstanceLocker::Create( const uno::Reference< uno::XComponentContext >& rxContext ) { @@ -234,7 +234,7 @@ uno::Reference< uno::XInterface > SAL_CALL OInstanceLocker::Create( // OLockListener // ==================================================================== -// -------------------------------------------------------- + OLockListener::OLockListener( const uno::WeakReference< lang::XComponent >& xWrapper, const uno::Reference< uno::XInterface >& xInstance, sal_Int32 nMode, @@ -248,12 +248,12 @@ OLockListener::OLockListener( const uno::WeakReference< lang::XComponent >& xWra { } -// -------------------------------------------------------- + OLockListener::~OLockListener() { } -// -------------------------------------------------------- + void OLockListener::Dispose() { ::osl::ResettableMutexGuard aGuard( m_aMutex ); @@ -293,7 +293,7 @@ void OLockListener::Dispose() } // XEventListener -// -------------------------------------------------------- + void SAL_CALL OLockListener::disposing( const lang::EventObject& aEvent ) throw (uno::RuntimeException) { @@ -318,7 +318,7 @@ void SAL_CALL OLockListener::disposing( const lang::EventObject& aEvent ) // XCloseListener -// -------------------------------------------------------- + void SAL_CALL OLockListener::queryClosing( const lang::EventObject& aEvent, sal_Bool ) throw (util::CloseVetoException, uno::RuntimeException) { @@ -348,7 +348,7 @@ void SAL_CALL OLockListener::queryClosing( const lang::EventObject& aEvent, sal_ } } -// -------------------------------------------------------- + void SAL_CALL OLockListener::notifyClosing( const lang::EventObject& aEvent ) throw (uno::RuntimeException) { @@ -379,7 +379,7 @@ void SAL_CALL OLockListener::notifyClosing( const lang::EventObject& aEvent ) // XTerminateListener -// -------------------------------------------------------- + void SAL_CALL OLockListener::queryTermination( const lang::EventObject& aEvent ) throw (frame::TerminationVetoException, uno::RuntimeException) { @@ -408,7 +408,7 @@ void SAL_CALL OLockListener::queryTermination( const lang::EventObject& aEvent ) } } -// -------------------------------------------------------- + void SAL_CALL OLockListener::notifyTermination( const lang::EventObject& aEvent ) throw (uno::RuntimeException) { @@ -444,7 +444,7 @@ void SAL_CALL OLockListener::notifyTermination( const lang::EventObject& aEvent // XInitialization -// -------------------------------------------------------- + bool OLockListener::Init() { ::osl::ResettableMutexGuard aGuard( m_aMutex ); diff --git a/comphelper/source/misc/interaction.cxx b/comphelper/source/misc/interaction.cxx index 916858317bab..30d7bdb33cd3 100644 --- a/comphelper/source/misc/interaction.cxx +++ b/comphelper/source/misc/interaction.cxx @@ -31,13 +31,13 @@ namespace comphelper //========================================================================= //= OInteractionPassword //========================================================================= - //-------------------------------------------------------------------- + void SAL_CALL OInteractionPassword::setPassword( const OUString& _Password ) throw (RuntimeException) { m_sPassword = _Password; } - //-------------------------------------------------------------------- + OUString SAL_CALL OInteractionPassword::getPassword( ) throw (RuntimeException) { return m_sPassword; @@ -46,13 +46,13 @@ namespace comphelper //========================================================================= //= OInteractionRequest //========================================================================= - //------------------------------------------------------------------------- + OInteractionRequest::OInteractionRequest(const Any& _rRequestDescription) :m_aRequest(_rRequestDescription) { } - //------------------------------------------------------------------------- + void OInteractionRequest::addContinuation(const Reference< XInteractionContinuation >& _rxContinuation) { OSL_ENSURE(_rxContinuation.is(), "OInteractionRequest::addContinuation: invalid argument!"); @@ -64,13 +64,13 @@ namespace comphelper } } - //------------------------------------------------------------------------- + Any SAL_CALL OInteractionRequest::getRequest( ) throw(RuntimeException) { return m_aRequest; } - //------------------------------------------------------------------------- + Sequence< Reference< XInteractionContinuation > > SAL_CALL OInteractionRequest::getContinuations( ) throw(RuntimeException) { return m_aContinuations; diff --git a/comphelper/source/misc/listenernotification.cxx b/comphelper/source/misc/listenernotification.cxx index 8947b6003b6f..6368e5a7dc16 100644 --- a/comphelper/source/misc/listenernotification.cxx +++ b/comphelper/source/misc/listenernotification.cxx @@ -32,7 +32,7 @@ namespace comphelper //==================================================================== //= OListenerContainer //==================================================================== - //-------------------------------------------------------------------- + OListenerContainer::OListenerContainer( ::osl::Mutex& _rMutex ) :m_aListeners( _rMutex ) { @@ -40,7 +40,7 @@ namespace comphelper OListenerContainer::~OListenerContainer() {} - //-------------------------------------------------------------------- + void OListenerContainer::impl_addListener( const Reference< XEventListener >& _rxListener ) { OSL_PRECOND( _rxListener.is(), "OListenerContainer::impl_addListener: a NULL listener?!" ); @@ -48,7 +48,7 @@ namespace comphelper m_aListeners.addInterface( _rxListener ); } - //-------------------------------------------------------------------- + void OListenerContainer::impl_removeListener( const Reference< XEventListener >& _rxListener ) { #if OSL_DEBUG_LEVEL > 0 @@ -63,19 +63,19 @@ namespace comphelper m_aListeners.removeInterface( _rxListener ); } - //-------------------------------------------------------------------- + void OListenerContainer::disposing( const EventObject& _rEventSource ) { m_aListeners.disposeAndClear( _rEventSource ); } - //-------------------------------------------------------------------- + void OListenerContainer::clear() { m_aListeners.clear(); } - //-------------------------------------------------------------------- + bool OListenerContainer::impl_notify( const EventObject& _rEvent ) SAL_THROW(( Exception )) { ::cppu::OInterfaceIteratorHelper aIter( m_aListeners ); diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx index 98f38d878a9b..a4c1ceb46f32 100644 --- a/comphelper/source/misc/logging.cxx +++ b/comphelper/source/misc/logging.cxx @@ -76,7 +76,7 @@ namespace comphelper //==================================================================== //= EventLogger_Impl - implementation //==================================================================== - //-------------------------------------------------------------------- + void EventLogger_Impl::impl_createLogger_nothrow() { try @@ -97,18 +97,18 @@ namespace comphelper //==================================================================== //= EventLogger //==================================================================== - //-------------------------------------------------------------------- + EventLogger::EventLogger( const Reference< XComponentContext >& _rxContext, const sal_Char* _pAsciiLoggerName ) :m_pImpl( new EventLogger_Impl( _rxContext, OUString::createFromAscii( _pAsciiLoggerName ) ) ) { } - //-------------------------------------------------------------------- + EventLogger::~EventLogger() { } - //-------------------------------------------------------------------- + bool EventLogger::isLoggable( const sal_Int32 _nLogLevel ) const { if ( !m_pImpl->isValid() ) @@ -127,7 +127,7 @@ namespace comphelper return false; } - //-------------------------------------------------------------------- + namespace { void lcl_replaceParameter( OUString& _inout_Message, const OUString& _rPlaceHolder, const OUString& _rReplacement ) @@ -141,7 +141,7 @@ namespace comphelper } } - //-------------------------------------------------------------------- + bool EventLogger::impl_log( const sal_Int32 _nLogLevel, const sal_Char* _pSourceClass, const sal_Char* _pSourceMethod, const OUString& _rMessage, const OptionalString& _rArgument1, const OptionalString& _rArgument2, @@ -222,7 +222,7 @@ namespace comphelper } }; - //-------------------------------------------------------------------- + bool lcl_loadBundle_nothrow( Reference< XComponentContext > const & _rContext, ResourceBasedEventLogger_Data& _rLoggerData ) { if ( _rLoggerData.bBundleLoaded ) @@ -247,7 +247,7 @@ namespace comphelper return _rLoggerData.xBundle.is(); } - //-------------------------------------------------------------------- + OUString lcl_loadString_nothrow( const Reference< XResourceBundle >& _rxBundle, const sal_Int32 _nMessageResID ) { OSL_PRECOND( _rxBundle.is(), "lcl_loadString_nothrow: this will crash!" ); @@ -270,7 +270,7 @@ namespace comphelper //==================================================================== //= ResourceBasedEventLogger //==================================================================== - //-------------------------------------------------------------------- + ResourceBasedEventLogger::ResourceBasedEventLogger( const Reference< XComponentContext >& _rxContext, const sal_Char* _pResourceBundleBaseName, const sal_Char* _pAsciiLoggerName ) :EventLogger( _rxContext, _pAsciiLoggerName ) @@ -279,7 +279,7 @@ namespace comphelper m_pData->sBundleBaseName = OUString::createFromAscii( _pResourceBundleBaseName ); } - //-------------------------------------------------------------------- + OUString ResourceBasedEventLogger::impl_loadStringMessage_nothrow( const sal_Int32 _nMessageResID ) const { OUString sMessage; diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index b734a8e2758c..6f25f001c1a9 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star; using namespace comphelper; -//----------------------------------------------------------------------- + MimeConfigurationHelper::MimeConfigurationHelper( const uno::Reference< uno::XComponentContext >& rxContext ) : m_xContext( rxContext ) { @@ -41,7 +41,7 @@ MimeConfigurationHelper::MimeConfigurationHelper( const uno::Reference< uno::XCo throw uno::RuntimeException(); } -//----------------------------------------------------------------------- + OUString MimeConfigurationHelper::GetStringClassIDRepresentation( const uno::Sequence< sal_Int8 >& aClassID ) { OUString aResult; @@ -63,7 +63,7 @@ OUString MimeConfigurationHelper::GetStringClassIDRepresentation( const uno::Seq return aResult; } -//----------------------------------------------------------------------- + sal_uInt8 GetDigit_Impl( sal_Char aChar ) { if ( aChar >= '0' && aChar <= '9' ) @@ -76,7 +76,7 @@ sal_uInt8 GetDigit_Impl( sal_Char aChar ) return 16; } -//----------------------------------------------------------------------- + uno::Sequence< sal_Int8 > MimeConfigurationHelper::GetSequenceClassIDRepresentation( const OUString& aClassID ) { sal_Int32 nLength = aClassID.getLength(); @@ -112,7 +112,7 @@ uno::Sequence< sal_Int8 > MimeConfigurationHelper::GetSequenceClassIDRepresentat return uno::Sequence< sal_Int8 >(); } -//----------------------------------------------------------------------- + uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetConfigurationByPath( const OUString& aPath ) { osl::MutexGuard aGuard( m_aMutex ); @@ -142,7 +142,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetConfigurati return xConfig; } -//----------------------------------------------------------------------- + uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetObjConfiguration() { osl::MutexGuard aGuard( m_aMutex ); @@ -154,7 +154,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetObjConfigur return m_xObjectConfig; } -//----------------------------------------------------------------------- + uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetVerbsConfiguration() { osl::MutexGuard aGuard( m_aMutex ); @@ -166,7 +166,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetVerbsConfig return m_xVerbsConfig; } -//----------------------------------------------------------------------- + uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeConfiguration() { osl::MutexGuard aGuard( m_aMutex ); @@ -178,7 +178,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo return m_xMediaTypeConfig; } -//----------------------------------------------------------------------- + uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetFilterFactory() { osl::MutexGuard aGuard( m_aMutex ); @@ -191,7 +191,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetFilterFacto return m_xFilterFactory; } -//------------------------------------------------------------------------- + OUString MimeConfigurationHelper::GetDocServiceNameFromFilter( const OUString& aFilterName ) { OUString aDocServiceName; @@ -217,7 +217,7 @@ OUString MimeConfigurationHelper::GetDocServiceNameFromFilter( const OUString& a return aDocServiceName; } -//------------------------------------------------------------------------- + OUString MimeConfigurationHelper::GetDocServiceNameFromMediaType( const OUString& aMediaType ) { uno::Reference< container::XContainerQuery > xTypeCFG( @@ -260,7 +260,7 @@ OUString MimeConfigurationHelper::GetDocServiceNameFromMediaType( const OUString return OUString(); } -//------------------------------------------------------------------------- + bool MimeConfigurationHelper::GetVerbByShortcut( const OUString& aVerbShortcut, embed::VerbDescriptor& aDescriptor ) { @@ -290,7 +290,7 @@ bool MimeConfigurationHelper::GetVerbByShortcut( const OUString& aVerbShortcut, return bResult; } -//------------------------------------------------------------------------- + uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjPropsFromConfigEntry( const uno::Sequence< sal_Int8 >& aClassID, const uno::Reference< container::XNameAccess >& xObjectProps ) @@ -339,7 +339,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjPropsFromConfi return aResult; } -//----------------------------------------------------------------------- + OUString MimeConfigurationHelper::GetExplicitlyRegisteredObjClassID( const OUString& aMediaType ) { OUString aStringClassID; @@ -358,7 +358,7 @@ OUString MimeConfigurationHelper::GetExplicitlyRegisteredObjClassID( const OUStr } -//----------------------------------------------------------------------- + uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByStringClassID( const OUString& aStringClassID ) { @@ -393,7 +393,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByStri return aObjProps; } -//----------------------------------------------------------------------- + uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByClassID( const uno::Sequence< sal_Int8 >& aClassID ) { @@ -425,7 +425,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByClas return aObjProps; } -//----------------------------------------------------------------------- + uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByMediaType( const OUString& aMediaType ) { uno::Sequence< beans::NamedValue > aObject = @@ -440,7 +440,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByMedi return uno::Sequence< beans::NamedValue >(); } -//----------------------------------------------------------------------- + uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByFilter( const OUString& aFilterName ) { OUString aDocumentName = GetDocServiceNameFromFilter( aFilterName ); @@ -450,7 +450,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByFilt return uno::Sequence< beans::NamedValue >(); } -//----------------------------------------------------------------------- + uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocumentName( const OUString& aDocName ) { if ( !aDocName.isEmpty() ) @@ -483,13 +483,13 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu return uno::Sequence< beans::NamedValue >(); } -//----------------------------------------------------------------------- + OUString MimeConfigurationHelper::GetFactoryNameByClassID( const uno::Sequence< sal_Int8 >& aClassID ) { return GetFactoryNameByStringClassID( GetStringClassIDRepresentation( aClassID ) ); } -//----------------------------------------------------------------------- + OUString MimeConfigurationHelper::GetFactoryNameByStringClassID( const OUString& aStringClassID ) { OUString aResult; @@ -514,7 +514,7 @@ OUString MimeConfigurationHelper::GetFactoryNameByStringClassID( const OUString& return aResult; } -//----------------------------------------------------------------------- + OUString MimeConfigurationHelper::GetFactoryNameByDocumentName( const OUString& aDocName ) { OUString aResult; @@ -551,7 +551,7 @@ OUString MimeConfigurationHelper::GetFactoryNameByDocumentName( const OUString& } -//----------------------------------------------------------------------- + OUString MimeConfigurationHelper::GetFactoryNameByMediaType( const OUString& aMediaType ) { OUString aResult = GetFactoryNameByStringClassID( GetExplicitlyRegisteredObjClassID( aMediaType ) ); @@ -566,7 +566,7 @@ OUString MimeConfigurationHelper::GetFactoryNameByMediaType( const OUString& aMe return aResult; } -//----------------------------------------------------------------------- + OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( uno::Sequence< beans::PropertyValue >& aMediaDescr, bool bIgnoreType ) @@ -711,7 +711,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( } #endif -//----------------------------------------------------------- + OUString MimeConfigurationHelper::GetDefaultFilterFromServiceName( const OUString& aServiceName, sal_Int32 nVersion ) { OUString aResult; @@ -762,7 +762,7 @@ OUString MimeConfigurationHelper::GetDefaultFilterFromServiceName( const OUStrin return aResult; } -//------------------------------------------------------------------------- + OUString MimeConfigurationHelper::GetExportFilterFromImportFilter( const OUString& aImportFilterName ) { OUString aExportFilterName; @@ -828,7 +828,7 @@ OUString MimeConfigurationHelper::GetExportFilterFromImportFilter( const OUStrin return aExportFilterName; } -//------------------------------------------------------------------------- + // static uno::Sequence< beans::PropertyValue > MimeConfigurationHelper::SearchForFilter( const uno::Reference< container::XContainerQuery >& xFilterQuery, @@ -870,7 +870,7 @@ uno::Sequence< beans::PropertyValue > MimeConfigurationHelper::SearchForFilter( } -//------------------------------------------------------------------------- + bool MimeConfigurationHelper::ClassIDsEqual( const uno::Sequence< sal_Int8 >& aClassID1, const uno::Sequence< sal_Int8 >& aClassID2 ) { if ( aClassID1.getLength() != aClassID2.getLength() ) @@ -883,7 +883,7 @@ bool MimeConfigurationHelper::ClassIDsEqual( const uno::Sequence< sal_Int8 >& aC return true; } -//------------------------------------------------------------------------- + uno::Sequence< sal_Int8 > MimeConfigurationHelper::GetSequenceClassID( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3, sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11, sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 ) diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index bf47f9a53b9a..2554e566dc3b 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -59,60 +59,60 @@ namespace comphelper //==================================================================== //= NamedValueCollection //==================================================================== - //-------------------------------------------------------------------- + NamedValueCollection::NamedValueCollection() :m_pImpl( new NamedValueCollection_Impl ) { } - //-------------------------------------------------------------------- + NamedValueCollection::NamedValueCollection( const NamedValueCollection& _rCopySource ) :m_pImpl( new NamedValueCollection_Impl ) { *this = _rCopySource; } - //-------------------------------------------------------------------- + NamedValueCollection& NamedValueCollection::operator=( const NamedValueCollection& i_rCopySource ) { m_pImpl->aValues = i_rCopySource.m_pImpl->aValues; return *this; } - //-------------------------------------------------------------------- + NamedValueCollection::NamedValueCollection( const Any& _rElements ) :m_pImpl( new NamedValueCollection_Impl ) { impl_assign( _rElements ); } - //-------------------------------------------------------------------- + NamedValueCollection::NamedValueCollection( const Sequence< Any >& _rArguments ) :m_pImpl( new NamedValueCollection_Impl ) { impl_assign( _rArguments ); } - //-------------------------------------------------------------------- + NamedValueCollection::NamedValueCollection( const Sequence< PropertyValue >& _rArguments ) :m_pImpl( new NamedValueCollection_Impl ) { impl_assign( _rArguments ); } - //-------------------------------------------------------------------- + NamedValueCollection::NamedValueCollection( const Sequence< NamedValue >& _rArguments ) :m_pImpl( new NamedValueCollection_Impl ) { impl_assign( _rArguments ); } - //-------------------------------------------------------------------- + NamedValueCollection::~NamedValueCollection() { } - //-------------------------------------------------------------------- + bool NamedValueCollection::canExtractFrom( ::com::sun::star::uno::Any const & i_value ) { Type const & aValueType = i_value.getValueType(); @@ -125,7 +125,7 @@ namespace comphelper return false; } - //-------------------------------------------------------------------- + NamedValueCollection& NamedValueCollection::merge( const NamedValueCollection& _rAdditionalValues, bool _bOverwriteExisting ) { for ( NamedValueRepository::const_iterator namedValue = _rAdditionalValues.m_pImpl->aValues.begin(); @@ -140,19 +140,19 @@ namespace comphelper return *this; } - //-------------------------------------------------------------------- + size_t NamedValueCollection::size() const { return m_pImpl->aValues.size(); } - //-------------------------------------------------------------------- + bool NamedValueCollection::empty() const { return m_pImpl->aValues.empty(); } - //-------------------------------------------------------------------- + ::std::vector< OUString > NamedValueCollection::getNames() const { ::std::vector< OUString > aNames; @@ -163,7 +163,7 @@ namespace comphelper return aNames; } - //-------------------------------------------------------------------- + void NamedValueCollection::impl_assign( const Any& i_rWrappedElements ) { Sequence< NamedValue > aNamedValues; @@ -183,7 +183,7 @@ namespace comphelper SAL_WARN_IF( i_rWrappedElements.hasValue(), "comphelper", "NamedValueCollection::impl_assign(Any): unsupported type!" ); } - //-------------------------------------------------------------------- + void NamedValueCollection::impl_assign( const Sequence< Any >& _rArguments ) { { @@ -213,7 +213,7 @@ namespace comphelper } } - //-------------------------------------------------------------------- + void NamedValueCollection::impl_assign( const Sequence< PropertyValue >& _rArguments ) { { @@ -227,7 +227,7 @@ namespace comphelper m_pImpl->aValues[ pArgument->Name ] = pArgument->Value; } - //-------------------------------------------------------------------- + void NamedValueCollection::impl_assign( const Sequence< NamedValue >& _rArguments ) { { @@ -241,7 +241,7 @@ namespace comphelper m_pImpl->aValues[ pArgument->Name ] = pArgument->Value; } - //-------------------------------------------------------------------- + bool NamedValueCollection::get_ensureType( const OUString& _rValueName, void* _pValueLocation, const Type& _rExpectedValueType ) const { NamedValueRepository::const_iterator pos = m_pImpl->aValues.find( _rValueName ); @@ -277,7 +277,7 @@ namespace comphelper class theEmptyDefault : public rtl::Static<Any, theEmptyDefault> {}; } - //-------------------------------------------------------------------- + const Any& NamedValueCollection::impl_get( const OUString& _rValueName ) const { NamedValueRepository::const_iterator pos = m_pImpl->aValues.find( _rValueName ); @@ -287,14 +287,14 @@ namespace comphelper return theEmptyDefault::get(); } - //-------------------------------------------------------------------- + bool NamedValueCollection::impl_has( const OUString& _rValueName ) const { NamedValueRepository::const_iterator pos = m_pImpl->aValues.find( _rValueName ); return ( pos != m_pImpl->aValues.end() ); } - //-------------------------------------------------------------------- + bool NamedValueCollection::impl_put( const OUString& _rValueName, const Any& _rValue ) { bool bHas = impl_has( _rValueName ); @@ -302,7 +302,7 @@ namespace comphelper return bHas; } - //-------------------------------------------------------------------- + bool NamedValueCollection::impl_remove( const OUString& _rValueName ) { NamedValueRepository::iterator pos = m_pImpl->aValues.find( _rValueName ); @@ -312,7 +312,7 @@ namespace comphelper return true; } - //-------------------------------------------------------------------- + namespace { struct Value2PropertyValue : public ::std::unary_function< NamedValueRepository::value_type, PropertyValue > @@ -333,7 +333,7 @@ namespace comphelper }; } - //-------------------------------------------------------------------- + sal_Int32 NamedValueCollection::operator >>= ( Sequence< PropertyValue >& _out_rValues ) const { _out_rValues.realloc( m_pImpl->aValues.size() ); @@ -341,7 +341,7 @@ namespace comphelper return _out_rValues.getLength(); } - //-------------------------------------------------------------------- + sal_Int32 NamedValueCollection::operator >>= ( Sequence< NamedValue >& _out_rValues ) const { _out_rValues.realloc( m_pImpl->aValues.size() ); diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx index 50255eebb523..5044539c3cdd 100644 --- a/comphelper/source/misc/numberedcollection.cxx +++ b/comphelper/source/misc/numberedcollection.cxx @@ -27,7 +27,7 @@ namespace comphelper{ static const char ERRMSG_INVALID_COMPONENT_PARAM[] = "NULL as component reference not allowed."; -//----------------------------------------------- + NumberedCollection::NumberedCollection() : ::cppu::BaseMutex () , m_sUntitledPrefix () @@ -36,12 +36,12 @@ NumberedCollection::NumberedCollection() { } -//----------------------------------------------- + NumberedCollection::~NumberedCollection() { } -//----------------------------------------------- + void NumberedCollection::setOwner(const css::uno::Reference< css::uno::XInterface >& xOwner) { // SYNCHRONIZED -> @@ -52,7 +52,7 @@ void NumberedCollection::setOwner(const css::uno::Reference< css::uno::XInterfac // <- SYNCHRONIZED } -//----------------------------------------------- + void NumberedCollection::setUntitledPrefix(const OUString& sPrefix) { // SYNCHRONIZED -> @@ -63,7 +63,7 @@ void NumberedCollection::setUntitledPrefix(const OUString& sPrefix) // <- SYNCHRONIZED } -//----------------------------------------------- + ::sal_Int32 SAL_CALL NumberedCollection::leaseNumber(const css::uno::Reference< css::uno::XInterface >& xComponent) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException ) @@ -100,7 +100,7 @@ void NumberedCollection::setUntitledPrefix(const OUString& sPrefix) // <- SYNCHRONIZED } -//----------------------------------------------- + void SAL_CALL NumberedCollection::releaseNumber(::sal_Int32 nNumber) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException ) @@ -139,7 +139,7 @@ void SAL_CALL NumberedCollection::releaseNumber(::sal_Int32 nNumber) // <- SYNCHRONIZED } -//----------------------------------------------- + void SAL_CALL NumberedCollection::releaseNumberForComponent(const css::uno::Reference< css::uno::XInterface >& xComponent) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException ) @@ -163,7 +163,7 @@ void SAL_CALL NumberedCollection::releaseNumberForComponent(const css::uno::Refe // <- SYNCHRONIZED } -//----------------------------------------------- + OUString SAL_CALL NumberedCollection::getUntitledPrefix() throw (css::uno::RuntimeException) { @@ -175,7 +175,7 @@ OUString SAL_CALL NumberedCollection::getUntitledPrefix() // <- SYNCHRONIZED } -//----------------------------------------------- + /** create an ordered list of all possible numbers ... e.g. {1,2,3,...,N} Max size of these list will be current size of component list + 1 . diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx index 569d492d1049..9920e4a7519a 100644 --- a/comphelper/source/misc/numbers.cxx +++ b/comphelper/source/misc/numbers.cxx @@ -32,7 +32,7 @@ namespace comphelper namespace starbeans = ::com::sun::star::beans; namespace starlang = ::com::sun::star::lang; -//------------------------------------------------------------------------------ + sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey) { sal_Int16 nReturn(starutil::NumberFormat::UNDEFINED); @@ -52,7 +52,7 @@ sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormats> return nReturn; } -//------------------------------------------------------------------------------ + sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormatter>& xFormatter, sal_Int32 nKey) { OSL_ENSURE(xFormatter.is(), "getNumberFormatType : the formatter isn't valid !"); @@ -62,7 +62,7 @@ sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormatte return getNumberFormatType(xFormats, nKey); } -//------------------------------------------------------------------------------ + staruno::Any getNumberFormatDecimals(const staruno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey) { if (xFormats.is()) @@ -85,7 +85,7 @@ staruno::Any getNumberFormatDecimals(const staruno::Reference<starutil::XNumberF } -//------------------------------------------------------------------------------ + sal_Int32 getStandardFormat( const staruno::Reference<starutil::XNumberFormatter>& xFormatter, sal_Int16 nType, @@ -99,12 +99,12 @@ sal_Int32 getStandardFormat( return xTypes.is() ? xTypes->getStandardFormat(nType, _rLocale) : 0; } -//------------------------------------------------------------------------------ + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; using namespace ::com::sun::star::beans; -//------------------------------------------------------------------------------ + Any getNumberFormatProperty( const Reference< XNumberFormatter >& _rxFormatter, sal_Int32 _nKey, const OUString& _rPropertyName ) { Any aReturn; diff --git a/comphelper/source/misc/officeresourcebundle.cxx b/comphelper/source/misc/officeresourcebundle.cxx index 01b4e98ccf69..218a61ba3608 100644 --- a/comphelper/source/misc/officeresourcebundle.cxx +++ b/comphelper/source/misc/officeresourcebundle.cxx @@ -98,7 +98,7 @@ namespace comphelper impl_getStringResourceKey( sal_Int32 _resourceId ); }; - //-------------------------------------------------------------------- + OUString ResourceBundle_Impl::impl_getStringResourceKey( sal_Int32 _resourceId ) { OUStringBuffer key; @@ -107,7 +107,7 @@ namespace comphelper return key.makeStringAndClear(); } - //-------------------------------------------------------------------- + OUString ResourceBundle_Impl::loadString( sal_Int32 _resourceId ) const { ::osl::MutexGuard aGuard( m_aMutex ); @@ -128,7 +128,7 @@ namespace comphelper return sString; } - //-------------------------------------------------------------------- + bool ResourceBundle_Impl::hasString( sal_Int32 _resourceId ) const { ::osl::MutexGuard aGuard( m_aMutex ); @@ -149,7 +149,7 @@ namespace comphelper return has; } - //-------------------------------------------------------------------- + bool ResourceBundle_Impl::impl_loadBundle_nothrow() { if ( m_bAttemptedCreate ) @@ -187,7 +187,7 @@ namespace comphelper //==================================================================== //= OfficeResourceBundle //==================================================================== - //-------------------------------------------------------------------- + OfficeResourceBundle::OfficeResourceBundle( const Reference< XComponentContext >& _context, const sal_Char* _bundleBaseAsciiName ) :m_pImpl( new ResourceBundle_Impl( _context, OUString::createFromAscii( _bundleBaseAsciiName ) ) ) { @@ -195,18 +195,18 @@ namespace comphelper throw NullPointerException(); } - //-------------------------------------------------------------------- + OfficeResourceBundle::~OfficeResourceBundle() { } - //-------------------------------------------------------------------- + OUString OfficeResourceBundle::loadString( sal_Int32 _resourceId ) const { return m_pImpl->loadString( _resourceId ); } - //-------------------------------------------------------------------- + bool OfficeResourceBundle::hasString( sal_Int32 _resourceId ) const { return m_pImpl->hasString( _resourceId ); diff --git a/comphelper/source/misc/officerestartmanager.cxx b/comphelper/source/misc/officerestartmanager.cxx index aec471e511ee..7a02e234f81d 100644 --- a/comphelper/source/misc/officerestartmanager.cxx +++ b/comphelper/source/misc/officerestartmanager.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star; namespace comphelper { -// ---------------------------------------------------------- + uno::Sequence< OUString > SAL_CALL OOfficeRestartManager::getSupportedServiceNames_static() { uno::Sequence< OUString > aResult( 1 ); @@ -40,32 +40,32 @@ uno::Sequence< OUString > SAL_CALL OOfficeRestartManager::getSupportedServiceNam return aResult; } -// ---------------------------------------------------------- + OUString SAL_CALL OOfficeRestartManager::getImplementationName_static() { return OUString( "com.sun.star.comp.task.OfficeRestartManager" ); } -// ---------------------------------------------------------- + OUString SAL_CALL OOfficeRestartManager::getSingletonName_static() { return OUString( "com.sun.star.task.OfficeRestartManager" ); } -// ---------------------------------------------------------- + OUString SAL_CALL OOfficeRestartManager::getServiceName_static() { return OUString( "com.sun.star.comp.task.OfficeRestartManager" ); } -// ---------------------------------------------------------- + uno::Reference< uno::XInterface > SAL_CALL OOfficeRestartManager::Create( const uno::Reference< uno::XComponentContext >& rxContext ) { return static_cast< cppu::OWeakObject* >( new OOfficeRestartManager( rxContext ) ); } // XRestartManager -// ---------------------------------------------------------- + void SAL_CALL OOfficeRestartManager::requestRestart( const uno::Reference< task::XInteractionHandler >& /* xInteractionHandler */ ) throw (uno::Exception, uno::RuntimeException) { @@ -107,7 +107,7 @@ void SAL_CALL OOfficeRestartManager::requestRestart( const uno::Reference< task: } } -// ---------------------------------------------------------- + ::sal_Bool SAL_CALL OOfficeRestartManager::isRestartRequested( ::sal_Bool bOfficeInitialized ) throw (uno::Exception, uno::RuntimeException) { @@ -120,7 +120,7 @@ void SAL_CALL OOfficeRestartManager::requestRestart( const uno::Reference< task: } // XCallback -// ---------------------------------------------------------- + void SAL_CALL OOfficeRestartManager::notify( const uno::Any& /* aData */ ) throw ( uno::RuntimeException ) { @@ -163,7 +163,7 @@ void SAL_CALL OOfficeRestartManager::notify( const uno::Any& /* aData */ ) } // XServiceInfo -// ---------------------------------------------------------- + OUString SAL_CALL OOfficeRestartManager::getImplementationName() throw (uno::RuntimeException) { return getImplementationName_static(); diff --git a/comphelper/source/misc/proxyaggregation.cxx b/comphelper/source/misc/proxyaggregation.cxx index 86d0082fbb2f..3764ef1a38e2 100644 --- a/comphelper/source/misc/proxyaggregation.cxx +++ b/comphelper/source/misc/proxyaggregation.cxx @@ -36,13 +36,13 @@ namespace comphelper //========================================================================= //= OProxyAggregation //========================================================================= - //------------------------------------------------------------------------- + OProxyAggregation::OProxyAggregation( const Reference< XComponentContext >& _rxContext ) :m_xContext( _rxContext ) { } - //------------------------------------------------------------------------- + void OProxyAggregation::baseAggregateProxyFor( const Reference< XInterface >& _rxComponent, oslInterlockedCount& _rRefCount, ::cppu::OWeakObject& _rDelegator ) { @@ -68,13 +68,13 @@ namespace comphelper osl_atomic_decrement( &_rRefCount ); } - //------------------------------------------------------------------------- + Any SAL_CALL OProxyAggregation::queryAggregation( const Type& _rType ) throw (RuntimeException) { return m_xProxyAggregate.is() ? m_xProxyAggregate->queryAggregation( _rType ) : Any(); } - //------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OProxyAggregation::getTypes( ) throw (RuntimeException) { Sequence< Type > aTypes; @@ -86,7 +86,7 @@ namespace comphelper return aTypes; } - //------------------------------------------------------------------------- + OProxyAggregation::~OProxyAggregation() { if ( m_xProxyAggregate.is() ) @@ -100,7 +100,7 @@ namespace comphelper //========================================================================= //= OComponentProxyAggregationHelper //========================================================================= - //------------------------------------------------------------------------- + OComponentProxyAggregationHelper::OComponentProxyAggregationHelper( const Reference< XComponentContext >& _rxContext, ::cppu::OBroadcastHelper& _rBHelper ) :OProxyAggregation( _rxContext ) @@ -109,7 +109,7 @@ namespace comphelper OSL_ENSURE( _rxContext.is(), "OComponentProxyAggregationHelper::OComponentProxyAggregationHelper: invalid arguments!" ); } - //------------------------------------------------------------------------- + void OComponentProxyAggregationHelper::componentAggregateProxyFor( const Reference< XComponent >& _rxComponent, oslInterlockedCount& _rRefCount, ::cppu::OWeakObject& _rDelegator ) @@ -129,7 +129,7 @@ namespace comphelper osl_atomic_decrement( &_rRefCount ); } - //------------------------------------------------------------------------- + Any SAL_CALL OComponentProxyAggregationHelper::queryInterface( const Type& _rType ) throw (RuntimeException) { Any aReturn( BASE::queryInterface( _rType ) ); @@ -138,10 +138,10 @@ namespace comphelper return aReturn; } - //------------------------------------------------------------------------- + IMPLEMENT_FORWARD_XTYPEPROVIDER2( OComponentProxyAggregationHelper, BASE, OProxyAggregation ) - //------------------------------------------------------------------------- + OComponentProxyAggregationHelper::~OComponentProxyAggregationHelper( ) { OSL_ENSURE( m_rBHelper.bDisposed, "OComponentProxyAggregationHelper::~OComponentProxyAggregationHelper: you should dispose your derived class in the dtor, if necessary!" ); @@ -156,7 +156,7 @@ namespace comphelper m_xInner.clear(); } - //------------------------------------------------------------------------- + void SAL_CALL OComponentProxyAggregationHelper::disposing( const EventObject& _rSource ) throw (RuntimeException) { if ( _rSource.Source == m_xInner ) @@ -168,7 +168,7 @@ namespace comphelper } } - //------------------------------------------------------------------------- + void SAL_CALL OComponentProxyAggregationHelper::dispose() throw( RuntimeException ) { ::osl::MutexGuard aGuard( m_rBHelper.rMutex ); @@ -188,7 +188,7 @@ namespace comphelper //========================================================================= //= OComponentProxyAggregation //========================================================================= - //------------------------------------------------------------------------- + OComponentProxyAggregation::OComponentProxyAggregation( const Reference< XComponentContext >& _rxContext, const Reference< XComponent >& _rxComponent ) :WeakComponentImplHelperBase( m_aMutex ) @@ -199,19 +199,19 @@ namespace comphelper componentAggregateProxyFor( _rxComponent, m_refCount, *this ); } - //------------------------------------------------------------------------- + OComponentProxyAggregation::~OComponentProxyAggregation() { implEnsureDisposeInDtor( ); } - //------------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( OComponentProxyAggregation, WeakComponentImplHelperBase, OComponentProxyAggregationHelper ) - //------------------------------------------------------------------------- + IMPLEMENT_GET_IMPLEMENTATION_ID( OComponentProxyAggregation ) - //------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OComponentProxyAggregation::getTypes( ) throw (RuntimeException) { Sequence< Type > aTypes( OComponentProxyAggregationHelper::getTypes() ); @@ -224,7 +224,7 @@ namespace comphelper return aTypes; } - //------------------------------------------------------------------------- + void OComponentProxyAggregation::implEnsureDisposeInDtor( ) { if ( !rBHelper.bDisposed ) @@ -234,7 +234,7 @@ namespace comphelper } } - //-------------------------------------------------------------------- + void SAL_CALL OComponentProxyAggregation::disposing( const EventObject& _rSource ) throw (RuntimeException) { // Simply disambiguate---this is necessary for MSVC to distinguish @@ -245,14 +245,14 @@ namespace comphelper OComponentProxyAggregationHelper::disposing( _rSource ); } - //-------------------------------------------------------------------- + void SAL_CALL OComponentProxyAggregation::disposing() throw (RuntimeException) { // call the dispose-functionality of the base, which will dispose our aggregated component OComponentProxyAggregationHelper::dispose(); } - //-------------------------------------------------------------------- + void SAL_CALL OComponentProxyAggregation::dispose() throw( RuntimeException ) { // simply disambiguate diff --git a/comphelper/source/misc/sequence.cxx b/comphelper/source/misc/sequence.cxx index ea0cfe117f0d..440993abd075 100644 --- a/comphelper/source/misc/sequence.cxx +++ b/comphelper/source/misc/sequence.cxx @@ -19,20 +19,15 @@ #include <comphelper/sequence.hxx> -//......................................................................... namespace comphelper { -//......................................................................... - -//------------------------------------------------------------------------------ staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rList, const OUString& _rValue, bool _bOnlyFirst) { sal_Int32 nLength = _rList.getLength(); if( _bOnlyFirst ) { - ////////////////////////////////////////////////////////////////////// - // An welcher Position finde ich den Wert? + // at which position do I find the value? sal_Int32 nPos = -1; const OUString* pTArray = _rList.getConstArray(); for (sal_Int32 i = 0; i < nLength; ++i, ++pTArray) @@ -44,8 +39,7 @@ staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rLi } } - ////////////////////////////////////////////////////////////////////// - // Sequence fuellen + // fill sequence if( nPos>-1 ) { staruno::Sequence<sal_Int16> aRetSeq( 1 ); @@ -62,8 +56,7 @@ staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rLi staruno::Sequence<sal_Int16> aRetSeq( nLength ); sal_Int16* pReturn = aRetSeq.getArray(); - ////////////////////////////////////////////////////////////////////// - // Wie oft kommt der Wert vor? + // how often does the value occur? const OUString* pTArray = _rList.getConstArray(); for (sal_Int32 i = 0; i < nLength; ++i, ++pTArray) { @@ -80,6 +73,5 @@ staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rLi } } } // namespace comphelper -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index e3df3a9e9f78..1023dbea1490 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -32,7 +32,7 @@ SequenceAsHashMap::SequenceAsHashMap(const css::uno::Any& aSource) (*this) << aSource; } -//----------------------------------------------- + SequenceAsHashMap::SequenceAsHashMap(const css::uno::Sequence< css::uno::Any >& lSource) { (*this) << lSource; @@ -80,7 +80,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource) css::uno::Reference< css::uno::XInterface >()); } -//----------------------------------------------- + void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lSource) { sal_Int32 c = lSource.getLength(); diff --git a/comphelper/source/misc/sharedmutex.cxx b/comphelper/source/misc/sharedmutex.cxx index 094113a53fa4..49a051e229ad 100644 --- a/comphelper/source/misc/sharedmutex.cxx +++ b/comphelper/source/misc/sharedmutex.cxx @@ -28,20 +28,20 @@ namespace comphelper //======================================================================== //= SharedMutex //======================================================================== - //------------------------------------------------------------------------ + SharedMutex::SharedMutex() :m_pMutexImpl( new ::osl::Mutex ) { } - //------------------------------------------------------------------------ + SharedMutex::SharedMutex( const SharedMutex& _rhs ) :m_pMutexImpl() { *this = _rhs; } - //------------------------------------------------------------------------ + SharedMutex& SharedMutex::operator=( const SharedMutex& _rhs ) { m_pMutexImpl = _rhs.m_pMutexImpl; diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 2a362ebd040c..0057cd93dbd5 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -50,7 +50,7 @@ using namespace ::com::sun::star; namespace comphelper { -// ---------------------------------------------------------------------- + uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetStorageFactory( const uno::Reference< uno::XComponentContext >& rxContext ) throw ( uno::Exception ) @@ -60,7 +60,7 @@ uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetStorageFactory( return embed::StorageFactory::create( xContext ); } -// ---------------------------------------------------------------------- + uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetFileSystemStorageFactory( const uno::Reference< uno::XComponentContext >& rxContext ) throw ( uno::Exception ) @@ -70,7 +70,7 @@ uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetFileSystemStora return embed::FileSystemStorageFactory::create(rxContext); } -// ---------------------------------------------------------------------- + uno::Reference< embed::XStorage > OStorageHelper::GetTemporaryStorage( const uno::Reference< uno::XComponentContext >& rxContext ) throw ( uno::Exception ) @@ -83,7 +83,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetTemporaryStorage( return xTempStorage; } -// ---------------------------------------------------------------------- + uno::Reference< embed::XStorage > OStorageHelper::GetStorageFromURL( const OUString& aURL, sal_Int32 nStorageMode, @@ -102,7 +102,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageFromURL( return xTempStorage; } -// ---------------------------------------------------------------------- + uno::Reference< embed::XStorage > OStorageHelper::GetStorageFromURL2( const OUString& aURL, sal_Int32 nStorageMode, @@ -135,7 +135,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageFromURL2( return xTempStorage; } -// ---------------------------------------------------------------------- + uno::Reference< embed::XStorage > OStorageHelper::GetStorageFromInputStream( const uno::Reference < io::XInputStream >& xStream, const uno::Reference< uno::XComponentContext >& rxContext ) @@ -153,7 +153,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageFromInputStream( return xTempStorage; } -// ---------------------------------------------------------------------- + uno::Reference< embed::XStorage > OStorageHelper::GetStorageFromStream( const uno::Reference < io::XStream >& xStream, sal_Int32 nStorageMode, @@ -172,7 +172,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageFromStream( return xTempStorage; } -// ---------------------------------------------------------------------- + void OStorageHelper::CopyInputToOutput( const uno::Reference< io::XInputStream >& xInput, const uno::Reference< io::XOutputStream >& xOutput ) @@ -197,7 +197,7 @@ void OStorageHelper::CopyInputToOutput( while ( nRead == nConstBufferSize ); } -// ---------------------------------------------------------------------- + uno::Reference< io::XInputStream > OStorageHelper::GetInputStreamFromURL( const OUString& aURL, const uno::Reference< uno::XComponentContext >& context ) @@ -210,7 +210,7 @@ uno::Reference< io::XInputStream > OStorageHelper::GetInputStreamFromURL( return xInputStream; } -// ---------------------------------------------------------------------- + void OStorageHelper::SetCommonStorageEncryptionData( const uno::Reference< embed::XStorage >& xStorage, const uno::Sequence< beans::NamedValue >& aEncryptionData ) @@ -223,7 +223,7 @@ void OStorageHelper::SetCommonStorageEncryptionData( xEncrSet->setEncryptionData( aEncryptionData ); } -// ---------------------------------------------------------------------- + sal_Int32 OStorageHelper::GetXStorageFormat( const uno::Reference< embed::XStorage >& xStorage ) throw ( uno::Exception ) @@ -280,7 +280,7 @@ sal_Int32 OStorageHelper::GetXStorageFormat( return nResult; } -// ---------------------------------------------------------------------- + uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromURL( const OUString& aFormat, const OUString& aURL, @@ -312,7 +312,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromURL( return xTempStorage; } -// ---------------------------------------------------------------------- + uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromInputStream( const OUString& aFormat, const uno::Reference < io::XInputStream >& xStream, @@ -343,7 +343,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromInputStr return xTempStorage; } -// ---------------------------------------------------------------------- + uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromStream( const OUString& aFormat, const uno::Reference < io::XStream >& xStream, @@ -375,7 +375,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromStream( return xTempStorage; } -// ---------------------------------------------------------------------- + uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData( const OUString& aPassword ) { // TODO/LATER: Should not the method be part of DocPasswordHelper? @@ -436,13 +436,13 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData( return aEncryptionData; } -// ---------------------------------------------------------------------- + bool OStorageHelper::IsValidZipEntryFileName( const OUString& aName, bool bSlashAllowed ) { return IsValidZipEntryFileName( aName.getStr(), aName.getLength(), bSlashAllowed ); } -// ---------------------------------------------------------------------- + bool OStorageHelper::IsValidZipEntryFileName( const sal_Unicode *pChar, sal_Int32 nLength, bool bSlashAllowed ) { @@ -470,7 +470,7 @@ bool OStorageHelper::IsValidZipEntryFileName( return true; } -// ---------------------------------------------------------------------- + bool OStorageHelper::PathHasSegment( const OUString& aPath, const OUString& aSegment ) { bool bResult = false; diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx index ba5f936e7e25..949db6731787 100644 --- a/comphelper/source/misc/types.cxx +++ b/comphelper/source/misc/types.cxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star::awt; using namespace ::com::sun::star::util; using namespace ::com::sun::star::lang; -//------------------------------------------------------------------------- + bool operator ==(const DateTime& _rLeft, const DateTime& _rRight) { return ( _rLeft.NanoSeconds == _rRight.NanoSeconds) && @@ -53,7 +53,7 @@ bool operator ==(const DateTime& _rLeft, const DateTime& _rRight) ( _rLeft.Year == _rRight.Year) ; } -//------------------------------------------------------------------------- + bool operator ==(const Date& _rLeft, const Date& _rRight) { return ( _rLeft.Day == _rRight.Day) && @@ -61,7 +61,7 @@ bool operator ==(const Date& _rLeft, const Date& _rRight) ( _rLeft.Year == _rRight.Year) ; } -//------------------------------------------------------------------------- + bool operator ==(const Time& _rLeft, const Time& _rRight) { return ( _rLeft.NanoSeconds == _rRight.NanoSeconds) && @@ -70,7 +70,7 @@ bool operator ==(const Time& _rLeft, const Time& _rRight) ( _rLeft.Hours == _rRight.Hours) ; } -//------------------------------------------------------------------------------ + sal_Int64 getINT64(const Any& _rAny) { sal_Int64 nReturn = 0; @@ -78,7 +78,7 @@ sal_Int64 getINT64(const Any& _rAny) return nReturn; } -//------------------------------------------------------------------------------ + sal_Int32 getINT32(const Any& _rAny) { sal_Int32 nReturn = 0; @@ -86,7 +86,7 @@ sal_Int32 getINT32(const Any& _rAny) return nReturn; } -//------------------------------------------------------------------------------ + sal_Int16 getINT16(const Any& _rAny) { sal_Int16 nReturn = 0; @@ -94,7 +94,7 @@ sal_Int16 getINT16(const Any& _rAny) return nReturn; } -//------------------------------------------------------------------------------ + double getDouble(const Any& _rAny) { double nReturn = 0.0; @@ -102,7 +102,7 @@ double getDouble(const Any& _rAny) return nReturn; } -//------------------------------------------------------------------------------ + float getFloat(const Any& _rAny) { float nReturn = 0.0; @@ -110,7 +110,7 @@ float getFloat(const Any& _rAny) return nReturn; } -//------------------------------------------------------------------------------ + OUString getString(const Any& _rAny) { OUString nReturn; @@ -118,7 +118,7 @@ OUString getString(const Any& _rAny) return nReturn; } -//------------------------------------------------------------------------------ + bool getBOOL(const Any& _rAny) { bool nReturn = false; @@ -129,7 +129,7 @@ bool getBOOL(const Any& _rAny) return nReturn; } -//------------------------------------------------------------------------------ + sal_Int32 getEnumAsINT32(const Any& _rAny) throw(IllegalArgumentException) { sal_Int32 nReturn = 0; @@ -138,7 +138,7 @@ sal_Int32 getEnumAsINT32(const Any& _rAny) throw(IllegalArgumentException) return nReturn; } -//------------------------------------------------------------------------------ + FontDescriptor getDefaultFont() { FontDescriptor aReturn; @@ -148,7 +148,7 @@ FontDescriptor getDefaultFont() return aReturn; } -//------------------------------------------------------------------------------ + bool isAssignableFrom(const Type& _rAssignable, const Type& _rFrom) { // getthe type lib descriptions @@ -162,7 +162,7 @@ bool isAssignableFrom(const Type& _rAssignable, const Type& _rFrom) return typelib_typedescription_isAssignableFrom(pAssignable, pFrom); } -//------------------------------------------------------------------ + template<class TYPE> bool tryCompare(const void* _pData, const Any& _rValue, bool& _bIdentical, TYPE& _rOut) { @@ -171,7 +171,7 @@ bool tryCompare(const void* _pData, const Any& _rValue, bool& _bIdentical, TYPE& return bSuccess; } -//------------------------------------------------------------------ + bool tryCompare(const void* _pData, const Any& _rValue, bool& _bIdentical, sal_Unicode& _rOut) { bool bSuccess = ( _rValue.getValueTypeClass() == TypeClass_CHAR ); @@ -181,7 +181,7 @@ bool tryCompare(const void* _pData, const Any& _rValue, bool& _bIdentical, sal_U return bSuccess; } -//------------------------------------------------------------------ + bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue) { bool bRes = true; @@ -421,13 +421,13 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue) return bRes; } -//------------------------------------------------------------------------------ + bool compare(const Any& rLeft, const Any& rRight) { return compare_impl(rLeft.getValueType(), rLeft.getValue(), rRight); } -//------------------------------------------------------------------------- + bool operator ==(const FontDescriptor& _rLeft, const FontDescriptor& _rRight) { return ( _rLeft.Name.equals( _rRight.Name ) ) && @@ -448,7 +448,7 @@ bool operator ==(const FontDescriptor& _rLeft, const FontDescriptor& _rRight) ( _rLeft.Type == _rRight.Type ) ; } -//------------------------------------------------------------------------- + Type getSequenceElementType(const Type& _rSequenceType) { OSL_ENSURE(_rSequenceType.getTypeClass() == TypeClass_SEQUENCE, diff --git a/comphelper/source/misc/weakeventlistener.cxx b/comphelper/source/misc/weakeventlistener.cxx index db176d4b643a..b3939ba1c4a3 100644 --- a/comphelper/source/misc/weakeventlistener.cxx +++ b/comphelper/source/misc/weakeventlistener.cxx @@ -32,7 +32,7 @@ namespace comphelper //===================================================================== //= OWeakListenerAdapter //===================================================================== - //--------------------------------------------------------------------- + OWeakListenerAdapterBase::~OWeakListenerAdapterBase() { } @@ -40,7 +40,7 @@ namespace comphelper //===================================================================== //= OWeakEventListenerAdapter //===================================================================== - //--------------------------------------------------------------------- + OWeakEventListenerAdapter::OWeakEventListenerAdapter( Reference< XWeak > _rxListener, Reference< XComponent > _rxBroadcaster ) :OWeakEventListenerAdapter_Base( _rxListener, _rxBroadcaster ) { @@ -63,7 +63,7 @@ namespace comphelper OSL_ENSURE( getListener().is(), "OWeakEventListenerAdapter::OWeakEventListenerAdapter: invalid listener (does not support the XEventListener interface)!" ); } - //--------------------------------------------------------------------- + void SAL_CALL OWeakEventListenerAdapter::disposing( ) { Reference< XComponent > xBroadcaster( getBroadcaster( ), UNO_QUERY ); diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx index fe724086670a..4fb1cc4c95ea 100644 --- a/comphelper/source/property/opropertybag.cxx +++ b/comphelper/source/property/opropertybag.cxx @@ -36,7 +36,7 @@ #include <iterator> -//-------------------------------------------------------------------------- + using namespace ::com::sun::star; void createRegistryInfo_OPropertyBag() @@ -58,7 +58,7 @@ namespace comphelper //==================================================================== //= OPropertyBag //==================================================================== - //-------------------------------------------------------------------- + OPropertyBag::OPropertyBag() :OPropertyBag_PBase( GetBroadcastHelper(), this ) ,::cppu::IEventNotificationHook() @@ -69,16 +69,16 @@ namespace comphelper { } - //-------------------------------------------------------------------- + OPropertyBag::~OPropertyBag() { } - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( OPropertyBag, OPropertyBag_Base, OPropertyBag_PBase ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( OPropertyBag, OPropertyBag_Base, OPropertyBag_PBase ) - //-------------------------------------------------------------------- + Sequence< OUString > OPropertyBag::getSupportedServiceNames_static() throw( RuntimeException ) { Sequence< OUString > aServices(1); @@ -86,7 +86,7 @@ namespace comphelper return aServices; } - //-------------------------------------------------------------------- + void SAL_CALL OPropertyBag::initialize( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException) { Sequence< Type > aTypes; @@ -125,19 +125,19 @@ namespace comphelper } } - //-------------------------------------------------------------------- + OUString OPropertyBag::getImplementationName_static() throw( RuntimeException ) { return OUString( "com.sun.star.comp.comphelper.OPropertyBag" ); } - //-------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OPropertyBag::Create( SAL_UNUSED_PARAMETER const Reference< XComponentContext >& ) { return *new OPropertyBag; } - //-------------------------------------------------------------------- + OUString SAL_CALL OPropertyBag::getImplementationName() throw (RuntimeException) { return getImplementationName_static(); @@ -148,13 +148,13 @@ namespace comphelper return cppu::supportsService(this, rServiceName); } - //-------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OPropertyBag::getSupportedServiceNames( ) throw (RuntimeException) { return getSupportedServiceNames_static(); } - //-------------------------------------------------------------------- + void OPropertyBag::fireEvents( sal_Int32 * /*pnHandles*/, sal_Int32 nCount, @@ -189,7 +189,7 @@ namespace comphelper } } - //-------------------------------------------------------------------- + ::sal_Bool SAL_CALL OPropertyBag::isModified() throw (RuntimeException) { @@ -217,13 +217,13 @@ namespace comphelper m_NotifyListeners.removeInterface(xListener); } - //-------------------------------------------------------------------- + Reference< XPropertySetInfo > SAL_CALL OPropertyBag::getPropertySetInfo( ) throw(RuntimeException) { return createPropertySetInfo( getInfoHelper() ); } - //-------------------------------------------------------------------- + ::sal_Bool SAL_CALL OPropertyBag::has( const Any& /*aElement*/ ) throw (RuntimeException) { // XSet is only a workaround for addProperty not being able to add default-void properties. @@ -231,7 +231,7 @@ namespace comphelper return sal_False; } - //-------------------------------------------------------------------- + void SAL_CALL OPropertyBag::insert( const Any& _element ) throw (IllegalArgumentException, ElementExistException, RuntimeException) { // This is a workaround for addProperty not being able to add default-void properties. @@ -258,7 +258,7 @@ namespace comphelper setModified(sal_True); } - //-------------------------------------------------------------------- + void SAL_CALL OPropertyBag::remove( const Any& /*aElement*/ ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException) { // XSet is only a workaround for addProperty not being able to add default-void properties. @@ -267,7 +267,7 @@ namespace comphelper } - //-------------------------------------------------------------------- + Reference< XEnumeration > SAL_CALL OPropertyBag::createEnumeration( ) throw (RuntimeException) { // XSet is only a workaround for addProperty not being able to add default-void properties. @@ -275,7 +275,7 @@ namespace comphelper return NULL; } - //-------------------------------------------------------------------- + Type SAL_CALL OPropertyBag::getElementType( ) throw (RuntimeException) { // XSet is only a workaround for addProperty not being able to add default-void properties. @@ -283,7 +283,7 @@ namespace comphelper return Type(); } - //-------------------------------------------------------------------- + ::sal_Bool SAL_CALL OPropertyBag::hasElements( ) throw (RuntimeException) { // XSet is only a workaround for addProperty not being able to add default-void properties. @@ -291,25 +291,25 @@ namespace comphelper return sal_False; } - //-------------------------------------------------------------------- + void SAL_CALL OPropertyBag::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const { m_aDynamicProperties.getFastPropertyValue( _nHandle, _rValue ); } - //-------------------------------------------------------------------- + sal_Bool SAL_CALL OPropertyBag::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw (IllegalArgumentException) { return m_aDynamicProperties.convertFastPropertyValue( _nHandle, _rValue, _rConvertedValue, _rOldValue ); } - //-------------------------------------------------------------------- + void SAL_CALL OPropertyBag::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception) { m_aDynamicProperties.setFastPropertyValue( nHandle, rValue ); } - //-------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper& SAL_CALL OPropertyBag::getInfoHelper() { if ( !m_pArrayHelper.get() ) @@ -322,7 +322,7 @@ namespace comphelper } - //-------------------------------------------------------------------- + sal_Int32 OPropertyBag::findFreeHandle() const { const sal_Int32 nPrime = 1009; @@ -344,7 +344,7 @@ namespace comphelper return nCheck; } - //-------------------------------------------------------------------- + void SAL_CALL OPropertyBag::addProperty( const OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException) { ::osl::ClearableMutexGuard g( m_aMutex ); @@ -367,7 +367,7 @@ namespace comphelper setModified(sal_True); } - //-------------------------------------------------------------------- + void SAL_CALL OPropertyBag::removeProperty( const OUString& _rName ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException) { ::osl::ClearableMutexGuard g( m_aMutex ); @@ -381,7 +381,7 @@ namespace comphelper setModified(sal_True); } - //-------------------------------------------------------------------- + namespace { struct ComparePropertyValueByName : public ::std::binary_function< PropertyValue, PropertyValue, bool > @@ -410,7 +410,7 @@ namespace comphelper }; } - //-------------------------------------------------------------------- + Sequence< PropertyValue > SAL_CALL OPropertyBag::getPropertyValues( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -465,7 +465,7 @@ namespace comphelper return aPropertyValues; } - //-------------------------------------------------------------------- + void OPropertyBag::impl_setPropertyValues_throw( const Sequence< PropertyValue >& _rProps ) { // sort (the XMultiPropertySet interface requires this) @@ -543,14 +543,14 @@ namespace comphelper } } - //-------------------------------------------------------------------- + void SAL_CALL OPropertyBag::setPropertyValues( const Sequence< PropertyValue >& _rProps ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); impl_setPropertyValues_throw( _rProps ); } - //-------------------------------------------------------------------- + PropertyState OPropertyBag::getPropertyStateByHandle( sal_Int32 _nHandle ) { // for properties which do not support the MAYBEDEFAULT attribute, don't rely on the base class, but @@ -570,7 +570,7 @@ namespace comphelper return OPropertyBag_PBase::getPropertyStateByHandle( _nHandle ); } - //-------------------------------------------------------------------- + Any OPropertyBag::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const { Any aDefault; diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index 664d2bfbbb5a..c4a66b68d4cb 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -42,7 +42,7 @@ namespace comphelper using namespace internal; - //------------------------------------------------------------------------------ + namespace { const Property* lcl_findPropertyByName( const Sequence< Property >& _rProps, const OUString& _rName ) @@ -61,7 +61,7 @@ namespace comphelper //= OPropertyArrayAggregationHelper //================================================================== -//------------------------------------------------------------------------------ + OPropertyArrayAggregationHelper::OPropertyArrayAggregationHelper( const Sequence< Property >& _rProperties, const Sequence< Property >& _rAggProperties, IPropertyInfoService* _pInfoService, sal_Int32 _nFirstAggregateId ) @@ -147,7 +147,7 @@ OPropertyArrayAggregationHelper::OPropertyArrayAggregationHelper( m_aPropertyAccessors[ pMergedProps->Handle ].nPos = nMPLoop; } -//------------------------------------------------------------------ + OPropertyArrayAggregationHelper::PropertyOrigin OPropertyArrayAggregationHelper::classifyProperty( const OUString& _rName ) { PropertyOrigin eOrigin = UNKNOWN_PROPERTY; @@ -166,7 +166,7 @@ OPropertyArrayAggregationHelper::PropertyOrigin OPropertyArrayAggregationHelper: return eOrigin; } -//------------------------------------------------------------------ + Property OPropertyArrayAggregationHelper::getPropertyByName( const OUString& _rPropertyName ) throw( UnknownPropertyException ) { const Property* pProperty = findPropertyByName( _rPropertyName ); @@ -177,26 +177,26 @@ Property OPropertyArrayAggregationHelper::getPropertyByName( const OUString& _rP return *pProperty; } -//------------------------------------------------------------------------------ + sal_Bool OPropertyArrayAggregationHelper::hasPropertyByName(const OUString& _rPropertyName) { return NULL != findPropertyByName( _rPropertyName ); } -//------------------------------------------------------------------------------ + const Property* OPropertyArrayAggregationHelper::findPropertyByName(const :: OUString& _rName ) const { return lcl_findPropertyByName( m_aProperties, _rName ); } -//------------------------------------------------------------------------------ + sal_Int32 OPropertyArrayAggregationHelper::getHandleByName(const OUString& _rPropertyName) { const Property* pProperty = findPropertyByName( _rPropertyName ); return pProperty ? pProperty->Handle : -1; } -//------------------------------------------------------------------------------ + sal_Bool OPropertyArrayAggregationHelper::fillPropertyMembersByHandle( OUString* _pPropName, sal_Int16* _pAttributes, sal_Int32 _nHandle) { @@ -213,7 +213,7 @@ sal_Bool OPropertyArrayAggregationHelper::fillPropertyMembersByHandle( return bRet; } -//------------------------------------------------------------------------------ + bool OPropertyArrayAggregationHelper::getPropertyByHandle( sal_Int32 _nHandle, Property& _rProperty ) const { ConstPropertyAccessorMapIterator pos = m_aPropertyAccessors.find(_nHandle); @@ -225,7 +225,7 @@ bool OPropertyArrayAggregationHelper::getPropertyByHandle( sal_Int32 _nHandle, P return false; } -//------------------------------------------------------------------------------ + bool OPropertyArrayAggregationHelper::fillAggregatePropertyInfoByHandle( OUString* _pPropName, sal_Int32* _pOriginalHandle, sal_Int32 _nHandle) const { @@ -246,14 +246,14 @@ bool OPropertyArrayAggregationHelper::fillAggregatePropertyInfoByHandle( } -//------------------------------------------------------------------------------ + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property> OPropertyArrayAggregationHelper::getProperties() { return m_aProperties; } -//------------------------------------------------------------------------------ + sal_Int32 OPropertyArrayAggregationHelper::fillHandles( sal_Int32* _pHandles, const ::com::sun::star::uno::Sequence< OUString >& _rPropNames ) { @@ -382,31 +382,31 @@ namespace internal sal_Int32 getCurrentlyForwardedProperty( ) const { return m_nCurrentlyForwarding; } }; - //-------------------------------------------------------------------------- + PropertyForwarder::PropertyForwarder( OPropertySetAggregationHelper& _rAggregationHelper ) :m_rAggregationHelper( _rAggregationHelper ) ,m_nCurrentlyForwarding( -1 ) { } - //-------------------------------------------------------------------------- + PropertyForwarder::~PropertyForwarder() { } - //-------------------------------------------------------------------------- + void PropertyForwarder::takeResponsibilityFor( sal_Int32 _nHandle ) { m_aProperties.insert( _nHandle ); } - //-------------------------------------------------------------------------- + bool PropertyForwarder::isResponsibleFor( sal_Int32 _nHandle ) { return m_aProperties.find( _nHandle ) != m_aProperties.end(); } - //-------------------------------------------------------------------------- + void PropertyForwarder::doForward( sal_Int32 _nHandle, const Any& _rValue ) throw ( Exception ) { OSL_ENSURE( m_rAggregationHelper.m_xAggregateSet.is(), "PropertyForwarder::doForward: no property set!" ); @@ -439,7 +439,7 @@ namespace internal //= OPropertySetAggregationHelper //================================================================== -//------------------------------------------------------------------------------ + OPropertySetAggregationHelper::OPropertySetAggregationHelper( ::cppu::OBroadcastHelper& rBHlp ) :OPropertyStateHelper( rBHlp ) ,m_bListening( false ) @@ -447,13 +447,13 @@ OPropertySetAggregationHelper::OPropertySetAggregationHelper( ::cppu::OBroadcast m_pForwarder = new PropertyForwarder( *this ); } -//------------------------------------------------------------------------------ + OPropertySetAggregationHelper::~OPropertySetAggregationHelper() { delete m_pForwarder; } -//------------------------------------------------------------------------------ + ::com::sun::star::uno::Any SAL_CALL OPropertySetAggregationHelper::queryInterface(const ::com::sun::star::uno::Type& _rType) throw( ::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Any aReturn = OPropertyStateHelper::queryInterface(_rType); @@ -468,7 +468,7 @@ OPropertySetAggregationHelper::~OPropertySetAggregationHelper() return aReturn; } -//------------------------------------------------------------------------------ + void OPropertySetAggregationHelper::disposing() { osl::MutexGuard aGuard(rBHelper.rMutex); @@ -484,7 +484,7 @@ void OPropertySetAggregationHelper::disposing() OPropertyStateHelper::disposing(); } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::disposing(const ::com::sun::star::lang::EventObject& _rSource) throw ( ::com::sun::star::uno::RuntimeException) { OSL_ENSURE(m_xAggregateSet.is(), "OPropertySetAggregationHelper::disposing : don't have an aggregate anymore !"); @@ -492,7 +492,7 @@ void SAL_CALL OPropertySetAggregationHelper::disposing(const ::com::sun::star:: m_bListening = false; } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent>& _rEvents) throw( ::com::sun::star::uno::RuntimeException) { OSL_ENSURE(m_xAggregateSet.is(), "OPropertySetAggregationHelper::propertiesChange : have no aggregate !"); @@ -544,7 +544,7 @@ void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const ::com::sun: } } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::vetoableChange(const ::com::sun::star::beans::PropertyChangeEvent& _rEvent) throw( ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException) { OSL_ENSURE(m_xAggregateSet.is(), "OPropertySetAggregationHelper::vetoableChange : have no aggregate !"); @@ -555,7 +555,7 @@ void SAL_CALL OPropertySetAggregationHelper::vetoableChange(const ::com::sun::s fire(&nHandle, &_rEvent.NewValue, &_rEvent.OldValue, 1, sal_True); } -//------------------------------------------------------------------------------ + void OPropertySetAggregationHelper::setAggregation(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxDelegate) throw( ::com::sun::star::lang::IllegalArgumentException ) { @@ -578,7 +578,7 @@ void OPropertySetAggregationHelper::setAggregation(const ::com::sun::star::uno: throw ::com::sun::star::lang::IllegalArgumentException(); } -//------------------------------------------------------------------------------ + void OPropertySetAggregationHelper::startListening() { osl::MutexGuard aGuard(rBHelper.rMutex); @@ -594,7 +594,7 @@ void OPropertySetAggregationHelper::startListening() } } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::addVetoableChangeListener(const OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener>& _rxListener) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) @@ -604,7 +604,7 @@ void SAL_CALL OPropertySetAggregationHelper::addVetoableChangeListener(const OUS startListening(); } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::addPropertyChangeListener(const OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener>& _rxListener) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) @@ -614,7 +614,7 @@ void SAL_CALL OPropertySetAggregationHelper::addPropertyChangeListener(const OUS startListening(); } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::addPropertiesChangeListener(const ::com::sun::star::uno::Sequence< OUString >& _rPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener>& _rxListener) throw( ::com::sun::star::uno::RuntimeException) @@ -624,7 +624,7 @@ void SAL_CALL OPropertySetAggregationHelper::addPropertiesChangeListener(const startListening(); } -//------------------------------------------------------------------------------ + sal_Int32 OPropertySetAggregationHelper::getOriginalHandle(sal_Int32 nHandle) const { OPropertyArrayAggregationHelper& rPH = (OPropertyArrayAggregationHelper&)const_cast<OPropertySetAggregationHelper*>(this)->getInfoHelper(); @@ -633,7 +633,7 @@ sal_Int32 OPropertySetAggregationHelper::getOriginalHandle(sal_Int32 nHandle) co return nOriginalHandle; } -//-------------------------------------------------------------------------- + OUString OPropertySetAggregationHelper::getPropertyName( sal_Int32 _nHandle ) const { OPropertyArrayAggregationHelper& rPH = static_cast< OPropertyArrayAggregationHelper& >( const_cast<OPropertySetAggregationHelper*>(this)->getInfoHelper() ); @@ -642,7 +642,7 @@ OUString OPropertySetAggregationHelper::getPropertyName( sal_Int32 _nHandle ) co return aProperty.Name; } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::setFastPropertyValue(sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, @@ -662,7 +662,7 @@ void SAL_CALL OPropertySetAggregationHelper::setFastPropertyValue(sal_Int32 _nHa OPropertySetHelper::setFastPropertyValue(_nHandle, _rValue); } -//------------------------------------------------------------------------------ + void OPropertySetAggregationHelper::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle) const { OPropertyArrayAggregationHelper& rPH = (OPropertyArrayAggregationHelper&)const_cast<OPropertySetAggregationHelper*>(this)->getInfoHelper(); @@ -684,7 +684,7 @@ void OPropertySetAggregationHelper::getFastPropertyValue( ::com::sun::star::uno: } } -//------------------------------------------------------------------------------ + ::com::sun::star::uno::Any SAL_CALL OPropertySetAggregationHelper::getFastPropertyValue(sal_Int32 nHandle) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, @@ -708,7 +708,7 @@ void OPropertySetAggregationHelper::getFastPropertyValue( ::com::sun::star::uno: return aValue; } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::setPropertyValues( const Sequence< OUString >& _rPropertyNames, const Sequence< Any >& _rValues ) throw ( PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException ) @@ -895,7 +895,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues( } // XPropertyState -//------------------------------------------------------------------------------ + ::com::sun::star::beans::PropertyState SAL_CALL OPropertySetAggregationHelper::getPropertyState(const OUString& _rPropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) { @@ -920,7 +920,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues( return getPropertyStateByHandle(nHandle); } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::setPropertyToDefault(const OUString& _rPropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) { @@ -953,7 +953,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyToDefault(const OUString } } -//------------------------------------------------------------------------------ + ::com::sun::star::uno::Any SAL_CALL OPropertySetAggregationHelper::getPropertyDefault(const OUString& aPropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { @@ -976,7 +976,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyToDefault(const OUString return getPropertyDefaultByHandle(nHandle); } -//------------------------------------------------------------------------------ + sal_Bool SAL_CALL OPropertySetAggregationHelper::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw(IllegalArgumentException) { bool bModified = false; @@ -997,7 +997,7 @@ sal_Bool SAL_CALL OPropertySetAggregationHelper::convertFastPropertyValue( Any& return bModified; } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw ( Exception ) { OSL_ENSURE( m_pForwarder->isResponsibleFor( _nHandle ), "OPropertySetAggregationHelper::setFastPropertyValue_NoBroadcast: this is no forwarded property - did you use declareForwardedProperty for it?" ); @@ -1005,26 +1005,26 @@ void SAL_CALL OPropertySetAggregationHelper::setFastPropertyValue_NoBroadcast( s m_pForwarder->doForward( _nHandle, _rValue ); } -//------------------------------------------------------------------------------ + void OPropertySetAggregationHelper::declareForwardedProperty( sal_Int32 _nHandle ) { OSL_ENSURE( !m_pForwarder->isResponsibleFor( _nHandle ), "OPropertySetAggregationHelper::declareForwardedProperty: already declared!" ); m_pForwarder->takeResponsibilityFor( _nHandle ); } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::forwardingPropertyValue( sal_Int32 ) { // not interested in } -//------------------------------------------------------------------------------ + void SAL_CALL OPropertySetAggregationHelper::forwardedPropertyValue( sal_Int32, bool ) { // not interested in } -//------------------------------------------------------------------------------ + bool OPropertySetAggregationHelper::isCurrentlyForwardingProperty( sal_Int32 _nHandle ) const { return m_pForwarder->getCurrentlyForwardedProperty() == _nHandle; diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx index 2eaec9af986c..872857a0d008 100644 --- a/comphelper/source/property/property.cxx +++ b/comphelper/source/property/property.cxx @@ -58,7 +58,7 @@ namespace comphelper namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute; -//------------------------------------------------------------------ + void copyProperties(const Reference<XPropertySet>& _rxSource, const Reference<XPropertySet>& _rxDest) { @@ -129,7 +129,7 @@ void copyProperties(const Reference<XPropertySet>& _rxSource, } } -//------------------------------------------------------------------ + bool hasProperty(const OUString& _rName, const Reference<XPropertySet>& _rxSet) { if (_rxSet.is()) @@ -140,7 +140,7 @@ bool hasProperty(const OUString& _rName, const Reference<XPropertySet>& _rxSet) return false; } -//------------------------------------------------------------------ + void RemoveProperty(Sequence<Property>& _rProps, const OUString& _rPropName) { sal_Int32 nLen = _rProps.getLength(); @@ -158,7 +158,7 @@ void RemoveProperty(Sequence<Property>& _rProps, const OUString& _rPropName) } } -//------------------------------------------------------------------ + void ModifyPropertyAttributes(Sequence<Property>& seqProps, const OUString& sPropName, sal_Int16 nAddAttrib, sal_Int16 nRemoveAttrib) { sal_Int32 nLen = seqProps.getLength(); @@ -176,7 +176,7 @@ void ModifyPropertyAttributes(Sequence<Property>& seqProps, const OUString& sPro } } -//------------------------------------------------------------------ + bool tryPropertyValue(Any& _rConvertedValue, Any& _rOldValue, const Any& _rValueToSet, const Any& _rCurrentValue, const Type& _rExpectedType) { bool bModified(false); diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx index 79225fc492e6..95471eab0925 100644 --- a/comphelper/source/property/propertybag.cxx +++ b/comphelper/source/property/propertybag.cxx @@ -58,7 +58,7 @@ namespace comphelper //==================================================================== //= PropertyBag //==================================================================== - //-------------------------------------------------------------------- + PropertyBag::PropertyBag() :m_pImpl( new PropertyBag_Impl ) { @@ -68,13 +68,13 @@ namespace comphelper { } - //-------------------------------------------------------------------- + void PropertyBag::setAllowEmptyPropertyName( bool i_isAllowed ) { m_pImpl->m_bAllowEmptyPropertyName = i_isAllowed; } - //-------------------------------------------------------------------- + namespace { void lcl_checkForEmptyName( const bool _allowEmpty, const OUString& _name ) @@ -99,7 +99,7 @@ namespace comphelper } } - //-------------------------------------------------------------------- + void PropertyBag::addVoidProperty( const OUString& _rName, const Type& _rType, sal_Int32 _nHandle, sal_Int32 _nAttributes ) { if ( _rType.getTypeClass() == TypeClass_VOID ) @@ -122,7 +122,7 @@ namespace comphelper m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, Any() ) ); } - //-------------------------------------------------------------------- + void PropertyBag::addProperty( const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const Any& _rInitialValue ) { // check type sanity @@ -145,7 +145,7 @@ namespace comphelper m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, _rInitialValue ) ); } - //-------------------------------------------------------------------- + void PropertyBag::removeProperty( const OUString& _rName ) { const Property& rProp = getProperty( _rName ); @@ -159,7 +159,7 @@ namespace comphelper m_pImpl->aDefaults.erase( nHandle ); } - //-------------------------------------------------------------------- + void PropertyBag::getFastPropertyValue( sal_Int32 _nHandle, Any& _out_rValue ) const { if ( !hasPropertyByHandle( _nHandle ) ) @@ -168,7 +168,7 @@ namespace comphelper OPropertyContainerHelper::getFastPropertyValue( _out_rValue, _nHandle ); } - //-------------------------------------------------------------------- + bool PropertyBag::convertFastPropertyValue( sal_Int32 _nHandle, const Any& _rNewValue, Any& _out_rConvertedValue, Any& _out_rCurrentValue ) const { if ( !hasPropertyByHandle( _nHandle ) ) @@ -178,7 +178,7 @@ namespace comphelper _out_rConvertedValue, _out_rCurrentValue, _nHandle, _rNewValue ); } - //-------------------------------------------------------------------- + void PropertyBag::setFastPropertyValue( sal_Int32 _nHandle, const Any& _rValue ) { if ( !hasPropertyByHandle( _nHandle ) ) @@ -187,7 +187,7 @@ namespace comphelper OPropertyContainerHelper::setFastPropertyValue( _nHandle, _rValue ); } - //-------------------------------------------------------------------- + void PropertyBag::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _out_rValue ) const { if ( !hasPropertyByHandle( _nHandle ) ) diff --git a/comphelper/source/property/propertycontainer.cxx b/comphelper/source/property/propertycontainer.cxx index 98e9439a687b..c8cc99004556 100644 --- a/comphelper/source/property/propertycontainer.cxx +++ b/comphelper/source/property/propertycontainer.cxx @@ -40,18 +40,18 @@ using namespace ::com::sun::star::beans; //========================================================================== //= OPropertyContainer //========================================================================== -//-------------------------------------------------------------------------- + OPropertyContainer::OPropertyContainer(::cppu::OBroadcastHelper& _rBHelper) :OPropertySetHelper(_rBHelper) { } -// ------------------------------------------------------------------------- + OPropertyContainer::~OPropertyContainer() { } -//-------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OPropertyContainer::getTypes() throw (RuntimeException) { // just the types from our one and only base class @@ -63,27 +63,27 @@ Sequence< Type > SAL_CALL OPropertyContainer::getTypes() throw (RuntimeException return aTypes.getTypes(); } -//-------------------------------------------------------------------------- + void SAL_CALL OPropertyContainer::setFastPropertyValue( sal_Int32 nHandle, const Any& rValue ) throw ( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { OPropertySetHelper::setFastPropertyValue( nHandle, rValue ); } -//-------------------------------------------------------------------------- + sal_Bool OPropertyContainer::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw (IllegalArgumentException) { return OPropertyContainerHelper::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue ); } -//-------------------------------------------------------------------------- + void OPropertyContainer::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue) throw (Exception, std::exception) { OPropertyContainerHelper::setFastPropertyValue( _nHandle, _rValue ); } -//-------------------------------------------------------------------------- + void OPropertyContainer::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const { OPropertyContainerHelper::getFastPropertyValue( _rValue, _nHandle ); diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index 0a859ef2ff91..d0e783d7dc6f 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -//-------------------------------------------------------------------------- + namespace { // comparing two property descriptions @@ -64,18 +64,18 @@ namespace //========================================================================== //= OPropertyContainerHelper //========================================================================== -//-------------------------------------------------------------------------- + OPropertyContainerHelper::OPropertyContainerHelper() :m_bUnused(false) { } -// ------------------------------------------------------------------------- + OPropertyContainerHelper::~OPropertyContainerHelper() { } -//-------------------------------------------------------------------------- + void OPropertyContainerHelper::registerProperty(const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void* _pPointerToMember, const Type& _rMemberType) { @@ -94,7 +94,7 @@ void OPropertyContainerHelper::registerProperty(const OUString& _rName, sal_Int3 implPushBackProperty(aNewProp); } -//-------------------------------------------------------------------------- + void OPropertyContainerHelper::revokeProperty( sal_Int32 _nHandle ) { PropertiesIterator aPos = searchHandle( _nHandle ); @@ -103,7 +103,7 @@ void OPropertyContainerHelper::revokeProperty( sal_Int32 _nHandle ) m_aProperties.erase( aPos ); } -//-------------------------------------------------------------------------- + void OPropertyContainerHelper::registerMayBeVoidProperty(const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, Any* _pPointerToMember, const Type& _rExpectedType) { @@ -125,7 +125,7 @@ void OPropertyContainerHelper::registerMayBeVoidProperty(const OUString& _rName, } -//-------------------------------------------------------------------------- + void OPropertyContainerHelper::registerPropertyNoMember(const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const Type& _rType, const void* _pInitialValue) { @@ -146,13 +146,13 @@ void OPropertyContainerHelper::registerPropertyNoMember(const OUString& _rName, implPushBackProperty(aNewProp); } -//-------------------------------------------------------------------------- + bool OPropertyContainerHelper::isRegisteredProperty( sal_Int32 _nHandle ) const { return const_cast< OPropertyContainerHelper* >( this )->searchHandle( _nHandle ) != m_aProperties.end(); } -//-------------------------------------------------------------------------- + bool OPropertyContainerHelper::isRegisteredProperty( const OUString& _rName ) const { // TODO: the current structure is from a time where properties were @@ -168,7 +168,7 @@ bool OPropertyContainerHelper::isRegisteredProperty( const OUString& _rName ) co return pos != m_aProperties.end(); } -//-------------------------------------------------------------------------- + namespace { struct ComparePropertyHandles @@ -180,7 +180,7 @@ namespace }; } -//-------------------------------------------------------------------------- + void OPropertyContainerHelper::implPushBackProperty(const PropertyDescription& _rProp) { #ifdef DBG_UTIL @@ -201,7 +201,7 @@ void OPropertyContainerHelper::implPushBackProperty(const PropertyDescription& _ m_aProperties.insert( pos, _rProp ); } -//-------------------------------------------------------------------------- + namespace { void lcl_throwIllegalPropertyValueTypeException( const PropertyDescription& _rProperty, const Any& _rValue ) @@ -219,7 +219,7 @@ namespace } } -//-------------------------------------------------------------------------- + bool OPropertyContainerHelper::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) SAL_THROW( (IllegalArgumentException) ) { @@ -365,7 +365,7 @@ bool OPropertyContainerHelper::convertFastPropertyValue( return bModified; } -//-------------------------------------------------------------------------- + void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const Any& _rValue) SAL_THROW( (Exception) ) { // get the property somebody is asking for @@ -407,7 +407,7 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An } } -//-------------------------------------------------------------------------- + void OPropertyContainerHelper::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const { // get the property somebody is asking for @@ -436,7 +436,7 @@ void OPropertyContainerHelper::getFastPropertyValue(Any& _rValue, sal_Int32 _nHa } } -//-------------------------------------------------------------------------- + OPropertyContainerHelper::PropertiesIterator OPropertyContainerHelper::searchHandle(sal_Int32 _nHandle) { PropertyDescription aHandlePropDesc; @@ -455,7 +455,7 @@ OPropertyContainerHelper::PropertiesIterator OPropertyContainerHelper::searchHan return aLowerBound; } -//-------------------------------------------------------------------------- + const Property& OPropertyContainerHelper::getProperty( const OUString& _rName ) const { ConstPropertiesIterator pos = ::std::find_if( @@ -469,7 +469,7 @@ const Property& OPropertyContainerHelper::getProperty( const OUString& _rName ) return pos->aProperty; } -//-------------------------------------------------------------------------- + void OPropertyContainerHelper::describeProperties(Sequence< Property >& _rProps) const { Sequence< Property > aOwnProps(m_aProperties.size()); diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx index e93c6bb04199..ab7774887d00 100644 --- a/comphelper/source/property/propertystatecontainer.cxx +++ b/comphelper/source/property/propertystatecontainer.cxx @@ -48,13 +48,13 @@ namespace comphelper //===================================================================== //= OPropertyStateContainer //===================================================================== - //--------------------------------------------------------------------- + OPropertyStateContainer::OPropertyStateContainer( ::cppu::OBroadcastHelper& _rBHelper ) :OPropertyContainer( _rBHelper ) { } - //-------------------------------------------------------------------- + Any SAL_CALL OPropertyStateContainer::queryInterface( const Type& _rType ) throw (RuntimeException) { Any aReturn = OPropertyContainer::queryInterface( _rType ); @@ -63,10 +63,10 @@ namespace comphelper return aReturn; } - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XTYPEPROVIDER2( OPropertyStateContainer, OPropertyContainer, OPropertyStateContainer_TBase ) - //-------------------------------------------------------------------- + sal_Int32 OPropertyStateContainer::getHandleForName( const OUString& _rPropertyName ) SAL_THROW( ( UnknownPropertyException ) ) { // look up the handle for the name @@ -79,13 +79,13 @@ namespace comphelper return nHandle; } - //-------------------------------------------------------------------- + PropertyState SAL_CALL OPropertyStateContainer::getPropertyState( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException) { return getPropertyStateByHandle( getHandleForName( _rPropertyName ) ); } - //-------------------------------------------------------------------- + Sequence< PropertyState > SAL_CALL OPropertyStateContainer::getPropertyStates( const Sequence< OUString >& _rPropertyNames ) throw (UnknownPropertyException, RuntimeException) { sal_Int32 nProperties = _rPropertyNames.getLength(); @@ -138,13 +138,13 @@ namespace comphelper return aStates; } - //-------------------------------------------------------------------- + void SAL_CALL OPropertyStateContainer::setPropertyToDefault( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException) { setPropertyToDefaultByHandle( getHandleForName( _rPropertyName ) ); } - //-------------------------------------------------------------------- + Any SAL_CALL OPropertyStateContainer::getPropertyDefault( const OUString& _rPropertyName ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { Any aDefault; @@ -152,7 +152,7 @@ namespace comphelper return aDefault; } - //-------------------------------------------------------------------- + PropertyState OPropertyStateContainer::getPropertyStateByHandle( sal_Int32 _nHandle ) { // simply compare the current and the default value @@ -171,7 +171,7 @@ namespace comphelper return PropertyState_DIRECT_VALUE; } - //-------------------------------------------------------------------- + void OPropertyStateContainer::setPropertyToDefaultByHandle( sal_Int32 _nHandle ) { Any aDefault; diff --git a/comphelper/source/property/propmultiplex.cxx b/comphelper/source/property/propmultiplex.cxx index 08d27c6c8343..f04a4cc88097 100644 --- a/comphelper/source/property/propmultiplex.cxx +++ b/comphelper/source/property/propmultiplex.cxx @@ -32,20 +32,20 @@ using namespace ::com::sun::star::beans; //======================================================================== //= OPropertyChangeListener //======================================================================== -//------------------------------------------------------------------------ + OPropertyChangeListener::~OPropertyChangeListener() { if (m_pAdapter) m_pAdapter->dispose(); } -//------------------------------------------------------------------ + void OPropertyChangeListener::_disposing(const EventObject&) throw( RuntimeException) { // nothing to do here } -//------------------------------------------------------------------ + void OPropertyChangeListener::disposeAdapter() { if ( m_pAdapter ) @@ -55,7 +55,7 @@ void OPropertyChangeListener::disposeAdapter() OSL_ENSURE( !m_pAdapter, "OPropertyChangeListener::disposeAdapter: what did dispose do?" ); } -//------------------------------------------------------------------ + void OPropertyChangeListener::setAdapter(OPropertyChangeMultiplexer* pAdapter) { if (m_pAdapter) @@ -76,7 +76,7 @@ void OPropertyChangeListener::setAdapter(OPropertyChangeMultiplexer* pAdapter) //======================================================================== //= OPropertyChangeMultiplexer //======================================================================== -//------------------------------------------------------------------ + OPropertyChangeMultiplexer::OPropertyChangeMultiplexer(OPropertyChangeListener* _pListener, const Reference< XPropertySet>& _rxSet, bool _bAutoReleaseSet) :m_xSet(_rxSet) ,m_pListener(_pListener) @@ -87,24 +87,24 @@ OPropertyChangeMultiplexer::OPropertyChangeMultiplexer(OPropertyChangeListener* m_pListener->setAdapter(this); } -//------------------------------------------------------------------ + OPropertyChangeMultiplexer::~OPropertyChangeMultiplexer() { } -//------------------------------------------------------------------ + void OPropertyChangeMultiplexer::lock() { ++m_nLockCount; } -//------------------------------------------------------------------ + void OPropertyChangeMultiplexer::unlock() { --m_nLockCount; } -//------------------------------------------------------------------ + void OPropertyChangeMultiplexer::dispose() { if (m_bListening) @@ -126,7 +126,7 @@ void OPropertyChangeMultiplexer::dispose() } // XEventListener -//------------------------------------------------------------------ + void SAL_CALL OPropertyChangeMultiplexer::disposing( const EventObject& _rSource) throw( RuntimeException) { if (m_pListener) @@ -147,14 +147,14 @@ void SAL_CALL OPropertyChangeMultiplexer::disposing( const EventObject& _rSourc } // XPropertyChangeListener -//------------------------------------------------------------------ + void SAL_CALL OPropertyChangeMultiplexer::propertyChange( const PropertyChangeEvent& _rEvent ) throw( RuntimeException) { if (m_pListener && !locked()) m_pListener->_propertyChanged(_rEvent); } -//------------------------------------------------------------------ + void OPropertyChangeMultiplexer::addProperty(const OUString& _sPropertyName) { if (m_xSet.is()) diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx index f2d0500af1eb..bafdf1c5b37f 100644 --- a/comphelper/source/property/propstate.cxx +++ b/comphelper/source/property/propstate.cxx @@ -43,7 +43,7 @@ namespace comphelper // OPropertyStateHelper //===================================================================== - //--------------------------------------------------------------------- + ::com::sun::star::uno::Any SAL_CALL OPropertyStateHelper::queryInterface(const ::com::sun::star::uno::Type& _rType) throw( ::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Any aReturn = OPropertySetHelper2::queryInterface(_rType); @@ -54,7 +54,7 @@ namespace comphelper return aReturn; } - //--------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> OPropertyStateHelper::getTypes() throw( ::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypes(4); @@ -75,14 +75,14 @@ namespace comphelper OPropertyStateHelper::~OPropertyStateHelper() {} - //--------------------------------------------------------------------- + void OPropertyStateHelper::firePropertyChange(sal_Int32 nHandle, const ::com::sun::star::uno::Any& aNewValue, const ::com::sun::star::uno::Any& aOldValue) { fire(&nHandle, &aNewValue, &aOldValue, 1, sal_False); } // XPropertyState - //--------------------------------------------------------------------- + ::com::sun::star::beans::PropertyState SAL_CALL OPropertyStateHelper::getPropertyState(const OUString& _rsName) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) { cppu::IPropertyArrayHelper& rPH = getInfoHelper(); @@ -94,7 +94,7 @@ namespace comphelper return getPropertyStateByHandle(nHandle); } - //--------------------------------------------------------------------- + void SAL_CALL OPropertyStateHelper::setPropertyToDefault(const OUString& _rsName) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) { cppu::IPropertyArrayHelper& rPH = getInfoHelper(); @@ -106,7 +106,7 @@ namespace comphelper setPropertyToDefaultByHandle(nHandle); } - //--------------------------------------------------------------------- + ::com::sun::star::uno::Any SAL_CALL OPropertyStateHelper::getPropertyDefault(const OUString& _rsName) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { cppu::IPropertyArrayHelper& rPH = getInfoHelper(); @@ -118,7 +118,7 @@ namespace comphelper return getPropertyDefaultByHandle(nHandle); } - //--------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState> SAL_CALL OPropertyStateHelper::getPropertyStates(const ::com::sun::star::uno::Sequence< OUString >& _rPropertyNames) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) { sal_Int32 nLen = _rPropertyNames.getLength(); @@ -148,7 +148,7 @@ namespace comphelper return aRet; } - //--------------------------------------------------------------------- + ::com::sun::star::beans::PropertyState OPropertyStateHelper::getPropertyStateByHandle( sal_Int32 _nHandle ) { // simply compare the current and the default value @@ -164,13 +164,13 @@ namespace comphelper return bEqual ? PropertyState_DEFAULT_VALUE : PropertyState_DIRECT_VALUE; } - //--------------------------------------------------------------------- + void OPropertyStateHelper::setPropertyToDefaultByHandle( sal_Int32 _nHandle ) { setFastPropertyValue( _nHandle, getPropertyDefaultByHandle( _nHandle ) ); } - //--------------------------------------------------------------------- + ::com::sun::star::uno::Any OPropertyStateHelper::getPropertyDefaultByHandle( sal_Int32 ) const { return ::com::sun::star::uno::Any(); @@ -179,18 +179,18 @@ namespace comphelper //===================================================================== // OStatefulPropertySet //===================================================================== - //--------------------------------------------------------------------- + OStatefulPropertySet::OStatefulPropertySet() :OPropertyStateHelper( GetBroadcastHelper() ) { } - //--------------------------------------------------------------------- + OStatefulPropertySet::~OStatefulPropertySet() { } - //--------------------------------------------------------------------- + Sequence< Type > SAL_CALL OStatefulPropertySet::getTypes() throw(RuntimeException) { Sequence< Type > aOwnTypes( 2 ); @@ -205,14 +205,14 @@ namespace comphelper namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } - //--------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL OStatefulPropertySet::getImplementationId() throw(RuntimeException) { ::cppu::OImplementationId &rID = lcl_ImplId::get(); return rID.getImplementationId(); } - //--------------------------------------------------------------------- + Any SAL_CALL OStatefulPropertySet::queryInterface( const Type& _rType ) throw(RuntimeException) { Any aReturn = OWeakObject::queryInterface( _rType ); @@ -223,13 +223,13 @@ namespace comphelper return aReturn; } - //--------------------------------------------------------------------- + void SAL_CALL OStatefulPropertySet::acquire() throw() { ::cppu::OWeakObject::acquire(); } - //--------------------------------------------------------------------- + void SAL_CALL OStatefulPropertySet::release() throw() { ::cppu::OWeakObject::release(); diff --git a/comphelper/source/streaming/basicio.cxx b/comphelper/source/streaming/basicio.cxx index ff68422ff94b..a5adb0e94bca 100644 --- a/comphelper/source/streaming/basicio.cxx +++ b/comphelper/source/streaming/basicio.cxx @@ -24,7 +24,7 @@ namespace comphelper { //......................................................................... -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectOutputStream>& operator << ( const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, const starawt::FontDescriptor& _rFont) @@ -49,7 +49,7 @@ const staruno::Reference<stario::XObjectOutputStream>& operator << ( } // FontDescriptor -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectInputStream>& operator >> ( const staruno::Reference<stario::XObjectInputStream>& _rxInStream, starawt::FontDescriptor& _rFont) @@ -74,84 +74,84 @@ const staruno::Reference<stario::XObjectInputStream>& operator >> ( return _rxInStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, bool& _rVal) { _rVal = _rxInStream->readBoolean(); return _rxInStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, bool _bVal) { _rxOutStream->writeBoolean(_bVal); return _rxOutStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, OUString& rStr) { rStr = _rxInStream->readUTF(); return _rxInStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, const OUString& rStr) { _rxOutStream->writeUTF(rStr); return _rxOutStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int16& _rValue) { _rValue = _rxInStream->readShort(); return _rxInStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int16 _nValue) { _rxOutStream->writeShort(_nValue); return _rxOutStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt16& _rValue) { _rValue = _rxInStream->readShort(); return _rxInStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt16 _nValue) { _rxOutStream->writeShort(_nValue); return _rxOutStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt32& _rValue) { _rValue = _rxInStream->readLong(); return _rxInStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt32 _nValue) { _rxOutStream->writeLong(_nValue); return _rxOutStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int32& _rValue) { _rValue = _rxInStream->readLong(); return _rxInStream; } -//------------------------------------------------------------------------------ + const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int32 _nValue) { _rxOutStream->writeLong(_nValue); diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx index 23764161a316..f49a9d653f1f 100644 --- a/comphelper/source/streaming/oslfile2streamwrap.cxx +++ b/comphelper/source/streaming/oslfile2streamwrap.cxx @@ -25,18 +25,18 @@ namespace comphelper { using namespace osl; -//------------------------------------------------------------------ + OSLInputStreamWrapper::OSLInputStreamWrapper( File& _rFile ) : m_pFile(&_rFile) { } -//------------------------------------------------------------------ + OSLInputStreamWrapper::~OSLInputStreamWrapper() { } -//------------------------------------------------------------------------------ + sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) { @@ -62,7 +62,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8 return sal::static_int_cast< sal_Int32 >(nRead); } -//------------------------------------------------------------------------------ + sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) { if (!m_pFile) @@ -74,7 +74,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(staruno::Sequence< sal_I return readBytes(aData, nMaxBytesToRead); } -//------------------------------------------------------------------------------ + void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -92,7 +92,7 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( st } } -//------------------------------------------------------------------------------ + sal_Int32 SAL_CALL OSLInputStreamWrapper::available() throw( stario::NotConnectedException, staruno::RuntimeException ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -122,7 +122,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::available() throw( stario::NotConnecte std::max(nAvailable, sal::static_int_cast< sal_uInt64 >(SAL_MAX_INT32))); } -//------------------------------------------------------------------------------ + void SAL_CALL OSLInputStreamWrapper::closeInput() throw( stario::NotConnectedException, staruno::RuntimeException ) { if (!m_pFile) @@ -135,7 +135,7 @@ void SAL_CALL OSLInputStreamWrapper::closeInput() throw( stario::NotConnectedExc /*************************************************************************/ // stario::XOutputStream -//------------------------------------------------------------------------------ + OSLOutputStreamWrapper::OSLOutputStreamWrapper(osl::File & _rFile): rFile(_rFile) @@ -154,12 +154,12 @@ void SAL_CALL OSLOutputStreamWrapper::writeBytes(const staruno::Sequence< sal_In } } -//------------------------------------------------------------------ + void SAL_CALL OSLOutputStreamWrapper::flush() throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) { } -//------------------------------------------------------------------ + void SAL_CALL OSLOutputStreamWrapper::closeOutput() throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) { rFile.close(); diff --git a/comphelper/source/streaming/seekableinput.cxx b/comphelper/source/streaming/seekableinput.cxx index fdd62f3cfe34..3f0f49c3f284 100644 --- a/comphelper/source/streaming/seekableinput.cxx +++ b/comphelper/source/streaming/seekableinput.cxx @@ -31,7 +31,7 @@ namespace comphelper const sal_Int32 nConstBufferSize = 32000; -//--------------------------------------------------------------------------- + void copyInputToOutput_Impl( const uno::Reference< io::XInputStream >& xIn, const uno::Reference< io::XOutputStream >& xOut ) { @@ -52,7 +52,7 @@ void copyInputToOutput_Impl( const uno::Reference< io::XInputStream >& xIn, while ( nRead == nConstBufferSize ); } -//--------------------------------------------------------------------------- + OSeekableInputWrapper::OSeekableInputWrapper( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext >& rxContext ) @@ -63,12 +63,12 @@ OSeekableInputWrapper::OSeekableInputWrapper( throw uno::RuntimeException(); } -//--------------------------------------------------------------------------- + OSeekableInputWrapper::~OSeekableInputWrapper() { } -//--------------------------------------------------------------------------- + uno::Reference< io::XInputStream > OSeekableInputWrapper::CheckSeekableCanWrap( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext >& rxContext ) @@ -84,7 +84,7 @@ uno::Reference< io::XInputStream > OSeekableInputWrapper::CheckSeekableCanWrap( return xNewStream; } -//--------------------------------------------------------------------------- + void OSeekableInputWrapper::PrepareCopy_Impl() { if ( !m_xCopyInput.is() ) @@ -114,7 +114,7 @@ void OSeekableInputWrapper::PrepareCopy_Impl() } // XInputStream -//--------------------------------------------------------------------------- + sal_Int32 SAL_CALL OSeekableInputWrapper::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw ( io::NotConnectedException, io::BufferSizeExceededException, @@ -131,7 +131,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::readBytes( uno::Sequence< sal_Int8 >& return m_xCopyInput->readBytes( aData, nBytesToRead ); } -//--------------------------------------------------------------------------- + sal_Int32 SAL_CALL OSeekableInputWrapper::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw ( io::NotConnectedException, io::BufferSizeExceededException, @@ -148,7 +148,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::readSomeBytes( uno::Sequence< sal_Int8 return m_xCopyInput->readSomeBytes( aData, nMaxBytesToRead ); } -//--------------------------------------------------------------------------- + void SAL_CALL OSeekableInputWrapper::skipBytes( sal_Int32 nBytesToSkip ) throw ( io::NotConnectedException, io::BufferSizeExceededException, @@ -165,7 +165,7 @@ void SAL_CALL OSeekableInputWrapper::skipBytes( sal_Int32 nBytesToSkip ) m_xCopyInput->skipBytes( nBytesToSkip ); } -//--------------------------------------------------------------------------- + sal_Int32 SAL_CALL OSeekableInputWrapper::available() throw ( io::NotConnectedException, io::IOException, @@ -181,7 +181,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::available() return m_xCopyInput->available(); } -//--------------------------------------------------------------------------- + void SAL_CALL OSeekableInputWrapper::closeInput() throw ( io::NotConnectedException, io::IOException, @@ -206,7 +206,7 @@ void SAL_CALL OSeekableInputWrapper::closeInput() // XSeekable -//--------------------------------------------------------------------------- + void SAL_CALL OSeekableInputWrapper::seek( sal_Int64 location ) throw ( lang::IllegalArgumentException, io::IOException, @@ -222,7 +222,7 @@ void SAL_CALL OSeekableInputWrapper::seek( sal_Int64 location ) m_xCopySeek->seek( location ); } -//--------------------------------------------------------------------------- + sal_Int64 SAL_CALL OSeekableInputWrapper::getPosition() throw ( io::IOException, uno::RuntimeException ) @@ -237,7 +237,7 @@ sal_Int64 SAL_CALL OSeekableInputWrapper::getPosition() return m_xCopySeek->getPosition(); } -//--------------------------------------------------------------------------- + sal_Int64 SAL_CALL OSeekableInputWrapper::getLength() throw ( io::IOException, uno::RuntimeException ) diff --git a/comphelper/source/streaming/seqstream.cxx b/comphelper/source/streaming/seqstream.cxx index f3395d191fef..fefc42b716fe 100644 --- a/comphelper/source/streaming/seqstream.cxx +++ b/comphelper/source/streaming/seqstream.cxx @@ -28,11 +28,11 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::uno; using namespace ::osl; -//--------------------------------------------------------------------------------------------- + // class SequenceInputStream -//--------------------------------------------------------------------------------------------- -//------------------------------------------------------------------ + + SequenceInputStream::SequenceInputStream( css::uno::Sequence<sal_Int8> const & rData) : m_aData(rData) @@ -41,7 +41,7 @@ SequenceInputStream::SequenceInputStream( } // checks if closed, returns available size, not mutex-protected -//------------------------------------------------------------------ + inline sal_Int32 SequenceInputStream::avail() { if (m_nPos == -1) @@ -51,7 +51,7 @@ inline sal_Int32 SequenceInputStream::avail() } // com::sun::star::io::XInputStream -//------------------------------------------------------------------ + sal_Int32 SAL_CALL SequenceInputStream::readBytes( Sequence<sal_Int8>& aData, sal_Int32 nBytesToRead ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) @@ -73,7 +73,7 @@ sal_Int32 SAL_CALL SequenceInputStream::readBytes( Sequence<sal_Int8>& aData, sa return nBytesToRead; } -//------------------------------------------------------------------ + sal_Int32 SAL_CALL SequenceInputStream::readSomeBytes( Sequence<sal_Int8>& aData, sal_Int32 nMaxBytesToRead ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) @@ -82,7 +82,7 @@ sal_Int32 SAL_CALL SequenceInputStream::readSomeBytes( Sequence<sal_Int8>& aData return readBytes(aData, nMaxBytesToRead); } -//------------------------------------------------------------------ + void SAL_CALL SequenceInputStream::skipBytes( sal_Int32 nBytesToSkip ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) @@ -100,7 +100,7 @@ void SAL_CALL SequenceInputStream::skipBytes( sal_Int32 nBytesToSkip ) m_nPos += nBytesToSkip; } -//------------------------------------------------------------------ + sal_Int32 SAL_CALL SequenceInputStream::available( ) throw(NotConnectedException, IOException, RuntimeException) { @@ -109,7 +109,7 @@ sal_Int32 SAL_CALL SequenceInputStream::available( ) return avail(); } -//------------------------------------------------------------------ + void SAL_CALL SequenceInputStream::closeInput( ) throw(NotConnectedException, IOException, RuntimeException) { @@ -136,7 +136,7 @@ sal_Int64 SAL_CALL SequenceInputStream::getLength( ) throw (IOException, Runtim return m_aData.getLength(); } -//-------------------------------------------------------------------------- + OSequenceOutputStream::OSequenceOutputStream(Sequence< sal_Int8 >& _rSeq, double _nResizeFactor, sal_Int32 _nMinimumResize, sal_Int32 _nMaximumResize) :m_rSequence(_rSeq) ,m_nResizeFactor(_nResizeFactor) @@ -156,7 +156,7 @@ OSequenceOutputStream::OSequenceOutputStream(Sequence< sal_Int8 >& _rSeq, double // this heuristic is as good as any other ... supply better parameters if you don't like it :) } -//-------------------------------------------------------------------------- + void SAL_CALL OSequenceOutputStream::writeBytes( const Sequence< sal_Int8 >& _rData ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -207,7 +207,7 @@ void SAL_CALL OSequenceOutputStream::writeBytes( const Sequence< sal_Int8 >& _rD m_nSize += _rData.getLength(); } -//-------------------------------------------------------------------------- + void SAL_CALL OSequenceOutputStream::flush( ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -218,7 +218,7 @@ void SAL_CALL OSequenceOutputStream::flush( ) throw(NotConnectedException, Buff m_rSequence.realloc(m_nSize); } -//-------------------------------------------------------------------------- + void SAL_CALL OSequenceOutputStream::closeOutput( ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) { MutexGuard aGuard(m_aMutex); diff --git a/comphelper/source/streaming/streamsection.cxx b/comphelper/source/streaming/streamsection.cxx index 0e60268c6c02..9cd2d01287c3 100644 --- a/comphelper/source/streaming/streamsection.cxx +++ b/comphelper/source/streaming/streamsection.cxx @@ -23,7 +23,7 @@ namespace comphelper { -//------------------------------------------------------------------------- + OStreamSection::OStreamSection(const staruno::Reference< stario::XDataInputStream >& _rxInput) :m_xMarkStream(_rxInput, ::com::sun::star::uno::UNO_QUERY) ,m_xInStream(_rxInput) @@ -38,7 +38,7 @@ OStreamSection::OStreamSection(const staruno::Reference< stario::XDataInputStrea } } -//------------------------------------------------------------------------- + OStreamSection::OStreamSection(const staruno::Reference< stario::XDataOutputStream >& _rxOutput, sal_Int32 _nPresumedLength) :m_xMarkStream(_rxOutput, ::com::sun::star::uno::UNO_QUERY) ,m_xOutStream(_rxOutput) @@ -59,7 +59,7 @@ OStreamSection::OStreamSection(const staruno::Reference< stario::XDataOutputStre } } -//------------------------------------------------------------------------- + OStreamSection::~OStreamSection() { try @@ -91,7 +91,7 @@ OStreamSection::~OStreamSection() { } } -// ----------------------------------------------------------------------------- + } // namespace comphelper diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx index a595f25f15a9..85e625cb85c2 100644 --- a/comphelper/source/xml/ofopxmlhelper.cxx +++ b/comphelper/source/xml/ofopxmlhelper.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star; namespace comphelper { -// ----------------------------------- + uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadRelationsInfoSequence( const uno::Reference< io::XInputStream >& xInStream, const OUString aStreamName, const uno::Reference< uno::XComponentContext > xContext ) throw( uno::Exception ) { @@ -46,7 +46,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::Read return ReadSequence_Impl( xInStream, aStringID, RELATIONINFO_FORMAT, xContext ); } -// ----------------------------------- + uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadContentTypeSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext > xContext ) throw( uno::Exception ) { @@ -54,7 +54,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::Read return ReadSequence_Impl( xInStream, aStringID, CONTENTTYPE_FORMAT, xContext ); } -// ----------------------------------- + void SAL_CALL OFOPXMLHelper::WriteRelationsInfoSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< uno::Sequence< beans::StringPair > >& aSequence, const uno::Reference< uno::XComponentContext > xContext ) throw( uno::Exception ) { @@ -115,7 +115,7 @@ void SAL_CALL OFOPXMLHelper::WriteRelationsInfoSequence( const uno::Reference< i xWriter->endDocument(); } -// ----------------------------------- + void SAL_CALL OFOPXMLHelper::WriteContentSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< beans::StringPair >& aDefaultsSequence, const uno::Sequence< beans::StringPair >& aOverridesSequence, const uno::Reference< uno::XComponentContext > xContext ) throw( uno::Exception ) { @@ -178,7 +178,7 @@ void SAL_CALL OFOPXMLHelper::WriteContentSequence( const uno::Reference< io::XOu // ================================================================================== -// ----------------------------------- + uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadSequence_Impl( const uno::Reference< io::XInputStream >& xInStream, const OUString& aStringID, sal_uInt16 nFormat, const uno::Reference< uno::XComponentContext > xContext ) throw( uno::Exception ) { @@ -199,7 +199,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::Read return pHelper->GetParsingResult(); } -// ----------------------------------- + OFOPXMLHelper::OFOPXMLHelper( sal_uInt16 nFormat ) : m_nFormat( nFormat ) , m_aRelListElement( "Relationships" ) @@ -217,12 +217,12 @@ OFOPXMLHelper::OFOPXMLHelper( sal_uInt16 nFormat ) { } -// ----------------------------------- + OFOPXMLHelper::~OFOPXMLHelper() { } -// ----------------------------------- + uno::Sequence< uno::Sequence< beans::StringPair > > OFOPXMLHelper::GetParsingResult() { if ( m_aElementsSeq.getLength() ) @@ -231,19 +231,19 @@ uno::Sequence< uno::Sequence< beans::StringPair > > OFOPXMLHelper::GetParsingRes return m_aResultSeq; } -// ----------------------------------- + void SAL_CALL OFOPXMLHelper::startDocument() throw(xml::sax::SAXException, uno::RuntimeException) { } -// ----------------------------------- + void SAL_CALL OFOPXMLHelper::endDocument() throw(xml::sax::SAXException, uno::RuntimeException) { } -// ----------------------------------- + void SAL_CALL OFOPXMLHelper::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs ) throw( xml::sax::SAXException, uno::RuntimeException ) { @@ -391,7 +391,7 @@ void SAL_CALL OFOPXMLHelper::startElement( const OUString& aName, const uno::Ref throw xml::sax::SAXException(); // TODO: no other elements expected! } -// ----------------------------------- + void SAL_CALL OFOPXMLHelper::endElement( const OUString& aName ) throw( xml::sax::SAXException, uno::RuntimeException ) { @@ -408,25 +408,25 @@ void SAL_CALL OFOPXMLHelper::endElement( const OUString& aName ) } } -// ----------------------------------- + void SAL_CALL OFOPXMLHelper::characters( const OUString& /*aChars*/ ) throw(xml::sax::SAXException, uno::RuntimeException) { } -// ----------------------------------- + void SAL_CALL OFOPXMLHelper::ignorableWhitespace( const OUString& /*aWhitespaces*/ ) throw(xml::sax::SAXException, uno::RuntimeException) { } -// ----------------------------------- + void SAL_CALL OFOPXMLHelper::processingInstruction( const OUString& /*aTarget*/, const OUString& /*aData*/ ) throw(xml::sax::SAXException, uno::RuntimeException) { } -// ----------------------------------- + void SAL_CALL OFOPXMLHelper::setDocumentLocator( const uno::Reference< xml::sax::XLocator >& /*xLocator*/ ) throw(xml::sax::SAXException, uno::RuntimeException) { |