diff options
Diffstat (limited to 'comphelper/source/misc')
36 files changed, 428 insertions, 436 deletions
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 ); |