Kaydet (Commit) d6f2dd83 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

remove useless Mutex guards

Change-Id: Ib1edb681b47ce98e2e810d15111932002786aa51
Reviewed-on: https://gerrit.libreoffice.org/31875Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 221a3413
...@@ -93,16 +93,12 @@ namespace dxcanvas ...@@ -93,16 +93,12 @@ namespace dxcanvas
uno::Sequence< double > SAL_CALL CanvasFont::getAvailableSizes( ) throw (uno::RuntimeException) uno::Sequence< double > SAL_CALL CanvasFont::getAvailableSizes( ) throw (uno::RuntimeException)
{ {
::osl::MutexGuard aGuard( m_aMutex );
// TODO // TODO
return uno::Sequence< double >(); return uno::Sequence< double >();
} }
uno::Sequence< beans::PropertyValue > SAL_CALL CanvasFont::getExtraFontProperties( ) throw (uno::RuntimeException) uno::Sequence< beans::PropertyValue > SAL_CALL CanvasFont::getExtraFontProperties( ) throw (uno::RuntimeException)
{ {
::osl::MutexGuard aGuard( m_aMutex );
// TODO // TODO
return uno::Sequence< beans::PropertyValue >(); return uno::Sequence< beans::PropertyValue >();
} }
...@@ -116,8 +112,6 @@ namespace dxcanvas ...@@ -116,8 +112,6 @@ namespace dxcanvas
rendering::FontMetrics SAL_CALL CanvasFont::getFontMetrics( ) throw (uno::RuntimeException) rendering::FontMetrics SAL_CALL CanvasFont::getFontMetrics( ) throw (uno::RuntimeException)
{ {
::osl::MutexGuard aGuard( m_aMutex );
// TODO // TODO
return rendering::FontMetrics(); return rendering::FontMetrics();
} }
......
...@@ -166,24 +166,18 @@ namespace canvas ...@@ -166,24 +166,18 @@ namespace canvas
uno::Reference< rendering::XPolyPolygon2D > SAL_CALL ParametricPolyPolygon::getOutline( double /*t*/ ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) uno::Reference< rendering::XPolyPolygon2D > SAL_CALL ParametricPolyPolygon::getOutline( double /*t*/ ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( m_aMutex );
// TODO(F1): outline NYI // TODO(F1): outline NYI
return uno::Reference< rendering::XPolyPolygon2D >(); return uno::Reference< rendering::XPolyPolygon2D >();
} }
uno::Sequence< double > SAL_CALL ParametricPolyPolygon::getColor( double /*t*/ ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) uno::Sequence< double > SAL_CALL ParametricPolyPolygon::getColor( double /*t*/ ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( m_aMutex );
// TODO(F1): color NYI // TODO(F1): color NYI
return uno::Sequence< double >(); return uno::Sequence< double >();
} }
uno::Sequence< double > SAL_CALL ParametricPolyPolygon::getPointColor( const geometry::RealPoint2D& /*point*/ ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) uno::Sequence< double > SAL_CALL ParametricPolyPolygon::getPointColor( const geometry::RealPoint2D& /*point*/ ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( m_aMutex );
// TODO(F1): point color NYI // TODO(F1): point color NYI
return uno::Sequence< double >(); return uno::Sequence< double >();
} }
......
...@@ -277,7 +277,6 @@ namespace extensions { namespace resource ...@@ -277,7 +277,6 @@ namespace extensions { namespace resource
Sequence< OUString > SAL_CALL OpenOfficeResourceBundle::getElementNames( ) throw (RuntimeException, std::exception) Sequence< OUString > SAL_CALL OpenOfficeResourceBundle::getElementNames( ) throw (RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( m_aMutex );
OSL_FAIL( "OpenOfficeResourceBundle::getElementNames: not implemented!" ); OSL_FAIL( "OpenOfficeResourceBundle::getElementNames: not implemented!" );
// the (Simple)ResManager does not provide an API to enumerate the resources // the (Simple)ResManager does not provide an API to enumerate the resources
return Sequence< OUString >( ); return Sequence< OUString >( );
......
...@@ -558,7 +558,6 @@ sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener( ...@@ -558,7 +558,6 @@ sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ ) OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ )
throw(RuntimeException, std::exception) throw(RuntimeException, std::exception)
{ {
MutexGuard aGuard( GetLinguMutex() );
return OUString( "Hunspell SpellChecker" ); return OUString( "Hunspell SpellChecker" );
} }
......
...@@ -522,7 +522,6 @@ Reference< XInterface > SAL_CALL Thesaurus_CreateInstance( ...@@ -522,7 +522,6 @@ Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ ) OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
throw(RuntimeException, std::exception) throw(RuntimeException, std::exception)
{ {
MutexGuard aGuard( GetLinguMutex() );
return OUString( "Mythes Thesaurus" ); return OUString( "Mythes Thesaurus" );
} }
......
...@@ -128,24 +128,18 @@ namespace basprov ...@@ -128,24 +128,18 @@ namespace basprov
Sequence< Reference< browse::XBrowseNode > > BasicMethodNodeImpl::getChildNodes( ) throw (RuntimeException, std::exception) Sequence< Reference< browse::XBrowseNode > > BasicMethodNodeImpl::getChildNodes( ) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return Sequence< Reference< browse::XBrowseNode > >(); return Sequence< Reference< browse::XBrowseNode > >();
} }
sal_Bool BasicMethodNodeImpl::hasChildNodes( ) throw (RuntimeException, std::exception) sal_Bool BasicMethodNodeImpl::hasChildNodes( ) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return false; return false;
} }
sal_Int16 BasicMethodNodeImpl::getType( ) throw (RuntimeException, std::exception) sal_Int16 BasicMethodNodeImpl::getType( ) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return browse::BrowseNodeTypes::SCRIPT; return browse::BrowseNodeTypes::SCRIPT;
} }
......
...@@ -205,7 +205,6 @@ OUString SAL_CALL ThumbnailViewAcc::getAccessibleDescription() ...@@ -205,7 +205,6 @@ OUString SAL_CALL ThumbnailViewAcc::getAccessibleDescription()
throw (uno::RuntimeException, std::exception) throw (uno::RuntimeException, std::exception)
{ {
ThrowIfDisposed(); ThrowIfDisposed();
const SolarMutexGuard aSolarGuard;
return OUString("ThumbnailView"); return OUString("ThumbnailView");
} }
......
...@@ -166,7 +166,6 @@ void SmGraphicAccessible::LaunchEvent( ...@@ -166,7 +166,6 @@ void SmGraphicAccessible::LaunchEvent(
uno::Reference< XAccessibleContext > SAL_CALL SmGraphicAccessible::getAccessibleContext() uno::Reference< XAccessibleContext > SAL_CALL SmGraphicAccessible::getAccessibleContext()
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return this; return this;
} }
...@@ -287,7 +286,6 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getBackground() ...@@ -287,7 +286,6 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getBackground()
sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleChildCount() sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleChildCount()
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return 0; return 0;
} }
...@@ -295,7 +293,6 @@ Reference< XAccessible > SAL_CALL SmGraphicAccessible::getAccessibleChild( ...@@ -295,7 +293,6 @@ Reference< XAccessible > SAL_CALL SmGraphicAccessible::getAccessibleChild(
sal_Int32 /*i*/ ) sal_Int32 /*i*/ )
throw (IndexOutOfBoundsException, RuntimeException, std::exception) throw (IndexOutOfBoundsException, RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
throw IndexOutOfBoundsException(); // there is no child... throw IndexOutOfBoundsException(); // there is no child...
} }
...@@ -330,7 +327,6 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleIndexInParent() ...@@ -330,7 +327,6 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleIndexInParent()
sal_Int16 SAL_CALL SmGraphicAccessible::getAccessibleRole() sal_Int16 SAL_CALL SmGraphicAccessible::getAccessibleRole()
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return AccessibleRole::DOCUMENT; return AccessibleRole::DOCUMENT;
} }
...@@ -436,7 +432,6 @@ void SAL_CALL SmGraphicAccessible::removeAccessibleEventListener( ...@@ -436,7 +432,6 @@ void SAL_CALL SmGraphicAccessible::removeAccessibleEventListener(
sal_Int32 SAL_CALL SmGraphicAccessible::getCaretPosition() sal_Int32 SAL_CALL SmGraphicAccessible::getCaretPosition()
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return 0; return 0;
} }
...@@ -616,21 +611,18 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin ...@@ -616,21 +611,18 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin
OUString SAL_CALL SmGraphicAccessible::getSelectedText() OUString SAL_CALL SmGraphicAccessible::getSelectedText()
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return OUString(); return OUString();
} }
sal_Int32 SAL_CALL SmGraphicAccessible::getSelectionStart() sal_Int32 SAL_CALL SmGraphicAccessible::getSelectionStart()
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return -1; return -1;
} }
sal_Int32 SAL_CALL SmGraphicAccessible::getSelectionEnd() sal_Int32 SAL_CALL SmGraphicAccessible::getSelectionEnd()
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return -1; return -1;
} }
...@@ -1812,14 +1804,12 @@ sal_Int32 SAL_CALL SmEditAccessible::getAccessibleIndexInParent( ) ...@@ -1812,14 +1804,12 @@ sal_Int32 SAL_CALL SmEditAccessible::getAccessibleIndexInParent( )
sal_Int16 SAL_CALL SmEditAccessible::getAccessibleRole( ) sal_Int16 SAL_CALL SmEditAccessible::getAccessibleRole( )
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return AccessibleRole::PANEL /*TEXT ?*/; return AccessibleRole::PANEL /*TEXT ?*/;
} }
OUString SAL_CALL SmEditAccessible::getAccessibleDescription( ) OUString SAL_CALL SmEditAccessible::getAccessibleDescription( )
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return OUString(); // empty as agreed with product-management return OUString(); // empty as agreed with product-management
} }
...@@ -1834,7 +1824,6 @@ OUString SAL_CALL SmEditAccessible::getAccessibleName( ) ...@@ -1834,7 +1824,6 @@ OUString SAL_CALL SmEditAccessible::getAccessibleName( )
uno::Reference< XAccessibleRelationSet > SAL_CALL SmEditAccessible::getAccessibleRelationSet( ) uno::Reference< XAccessibleRelationSet > SAL_CALL SmEditAccessible::getAccessibleRelationSet( )
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
Reference< XAccessibleRelationSet > xRelSet = new utl::AccessibleRelationSetHelper(); Reference< XAccessibleRelationSet > xRelSet = new utl::AccessibleRelationSetHelper();
return xRelSet; // empty relation set return xRelSet; // empty relation set
} }
......
...@@ -945,8 +945,6 @@ Any SAL_CALL SvxRectCtlChildAccessibleContext::getMinimumValue() throw( RuntimeE ...@@ -945,8 +945,6 @@ Any SAL_CALL SvxRectCtlChildAccessibleContext::getMinimumValue() throw( RuntimeE
sal_Int32 SvxRectCtlChildAccessibleContext::getAccessibleActionCount( ) throw (RuntimeException, std::exception) sal_Int32 SvxRectCtlChildAccessibleContext::getAccessibleActionCount( ) throw (RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( maMutex );
return 1; return 1;
} }
......
...@@ -713,8 +713,7 @@ Any SAL_CALL SvXMLEmbeddedObjectHelper::getByName( ...@@ -713,8 +713,7 @@ Any SAL_CALL SvXMLEmbeddedObjectHelper::getByName(
Sequence< OUString > SAL_CALL SvXMLEmbeddedObjectHelper::getElementNames() Sequence< OUString > SAL_CALL SvXMLEmbeddedObjectHelper::getElementNames()
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
MutexGuard aGuard( maMutex ); return Sequence< OUString >(0);
return Sequence< OUString >(0);
} }
sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasByName( const OUString& rURLStr ) sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasByName( const OUString& rURLStr )
......
...@@ -342,16 +342,12 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL ...@@ -342,16 +342,12 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getHyperLinkIndex( sal_Int32 ) sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getHyperLinkIndex( sal_Int32 )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception) throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return 0; return 0;
} }
uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleNoTextFrame::getAccessibleRelationSet( ) uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleNoTextFrame::getAccessibleRelationSet( )
throw ( uno::RuntimeException, std::exception ) throw ( uno::RuntimeException, std::exception )
{ {
SolarMutexGuard aGuard;
return new AccessibleRelationSetHelper(); return new AccessibleRelationSetHelper();
} }
......
...@@ -316,7 +316,6 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n ...@@ -316,7 +316,6 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n
// text::XFlatParagraph: // text::XFlatParagraph:
css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions() throw (css::uno::RuntimeException, std::exception) css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions() throw (css::uno::RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard;
return css::uno::Sequence< ::sal_Int32>(); return css::uno::Sequence< ::sal_Int32>();
} }
......
...@@ -889,14 +889,12 @@ bool SwXTextViewCursor::IsTextSelection( bool bAllowTables ) const ...@@ -889,14 +889,12 @@ bool SwXTextViewCursor::IsTextSelection( bool bAllowTables ) const
sal_Bool SwXTextViewCursor::isVisible() throw( uno::RuntimeException, std::exception ) sal_Bool SwXTextViewCursor::isVisible() throw( uno::RuntimeException, std::exception )
{ {
SolarMutexGuard aGuard;
OSL_FAIL("not implemented"); OSL_FAIL("not implemented");
return true; return true;
} }
void SwXTextViewCursor::setVisible(sal_Bool /*bVisible*/) throw( uno::RuntimeException, std::exception ) void SwXTextViewCursor::setVisible(sal_Bool /*bVisible*/) throw( uno::RuntimeException, std::exception )
{ {
SolarMutexGuard aGuard;
OSL_FAIL("not implemented"); OSL_FAIL("not implemented");
} }
......
...@@ -2463,14 +2463,11 @@ void SAL_CALL VCLXWindow::unlock( ) throw (css::uno::RuntimeException, std::exc ...@@ -2463,14 +2463,11 @@ void SAL_CALL VCLXWindow::unlock( ) throw (css::uno::RuntimeException, std::exc
void SAL_CALL VCLXWindow::startPopupMode( const css::awt::Rectangle& ) throw (css::uno::RuntimeException, std::exception) void SAL_CALL VCLXWindow::startPopupMode( const css::awt::Rectangle& ) throw (css::uno::RuntimeException, std::exception)
{ {
// TODO: remove interface in the next incompatible build // TODO: remove interface in the next incompatible build
SolarMutexGuard aGuard;
} }
sal_Bool SAL_CALL VCLXWindow::isInPopupMode( ) throw (css::uno::RuntimeException, std::exception) sal_Bool SAL_CALL VCLXWindow::isInPopupMode( ) throw (css::uno::RuntimeException, std::exception)
{ {
// TODO: remove interface in the next incompatible build // TODO: remove interface in the next incompatible build
SolarMutexGuard aGuard;
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment