[Libreoffice-commits] core.git: canvas/source extensions/source lingucomponent/source scripting/source sfx2/source starmath/source svx/source sw/source toolkit/source

Noel Grandin noelgrandin at gmail.com
Mon Dec 12 09:16:45 UTC 2016


 canvas/source/directx/dx_canvasfont.cxx                 |    6 ------
 canvas/source/tools/parametricpolypolygon.cxx           |    6 ------
 extensions/source/resource/oooresourceloader.cxx        |    1 -
 lingucomponent/source/spellcheck/spell/sspellimp.cxx    |    1 -
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx     |    1 -
 scripting/source/basprov/basmethnode.cxx                |    6 ------
 sfx2/source/control/thumbnailviewacc.cxx                |    1 -
 starmath/source/accessibility.cxx                       |   11 -----------
 svx/source/accessibility/svxrectctaccessiblecontext.cxx |    2 --
 svx/source/xml/xmleohlp.cxx                             |    3 +--
 sw/source/core/access/accnotextframe.cxx                |    4 ----
 sw/source/core/unocore/unoflatpara.cxx                  |    1 -
 sw/source/uibase/uno/unotxvw.cxx                        |    2 --
 toolkit/source/awt/vclxwindow.cxx                       |    3 ---
 14 files changed, 1 insertion(+), 47 deletions(-)

New commits:
commit d6f2dd831a37ce214c05ed558c4fef2b76b9b121
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sun Dec 11 22:15:14 2016 +0200

    remove useless Mutex guards
    
    Change-Id: Ib1edb681b47ce98e2e810d15111932002786aa51
    Reviewed-on: https://gerrit.libreoffice.org/31875
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/canvas/source/directx/dx_canvasfont.cxx b/canvas/source/directx/dx_canvasfont.cxx
index 8b73195..d3274b0 100644
--- a/canvas/source/directx/dx_canvasfont.cxx
+++ b/canvas/source/directx/dx_canvasfont.cxx
@@ -93,16 +93,12 @@ namespace dxcanvas
 
     uno::Sequence< double > SAL_CALL CanvasFont::getAvailableSizes(  ) throw (uno::RuntimeException)
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
-
         // TODO
         return uno::Sequence< double >();
     }
 
     uno::Sequence< beans::PropertyValue > SAL_CALL CanvasFont::getExtraFontProperties(  ) throw (uno::RuntimeException)
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
-
         // TODO
         return uno::Sequence< beans::PropertyValue >();
     }
@@ -116,8 +112,6 @@ namespace dxcanvas
 
     rendering::FontMetrics SAL_CALL CanvasFont::getFontMetrics(  ) throw (uno::RuntimeException)
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
-
         // TODO
         return rendering::FontMetrics();
     }
diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx
index 8e8c980..05697d8 100644
--- a/canvas/source/tools/parametricpolypolygon.cxx
+++ b/canvas/source/tools/parametricpolypolygon.cxx
@@ -166,24 +166,18 @@ namespace canvas
 
     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
         return uno::Reference< rendering::XPolyPolygon2D >();
     }
 
     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
         return uno::Sequence< double >();
     }
 
     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
         return uno::Sequence< double >();
     }
diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx
index e8880ff..0961cc0 100644
--- a/extensions/source/resource/oooresourceloader.cxx
+++ b/extensions/source/resource/oooresourceloader.cxx
@@ -277,7 +277,6 @@ namespace extensions { namespace resource
 
     Sequence< OUString > SAL_CALL OpenOfficeResourceBundle::getElementNames(  ) throw (RuntimeException, std::exception)
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
         OSL_FAIL( "OpenOfficeResourceBundle::getElementNames: not implemented!" );
             // the (Simple)ResManager does not provide an API to enumerate the resources
         return Sequence< OUString >( );
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index db690ae..dadf485 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -558,7 +558,6 @@ sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
 OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ )
         throw(RuntimeException, std::exception)
 {
-    MutexGuard  aGuard( GetLinguMutex() );
     return OUString( "Hunspell SpellChecker" );
 }
 
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index f8a66da..03514ba 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -522,7 +522,6 @@ Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
 OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
         throw(RuntimeException, std::exception)
 {
-    MutexGuard  aGuard( GetLinguMutex() );
     return OUString( "Mythes Thesaurus" );
 }
 
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx
index e748016..a67a8f7 100644
--- a/scripting/source/basprov/basmethnode.cxx
+++ b/scripting/source/basprov/basmethnode.cxx
@@ -128,24 +128,18 @@ namespace basprov
 
     Sequence< Reference< browse::XBrowseNode > > BasicMethodNodeImpl::getChildNodes(  ) throw (RuntimeException, std::exception)
     {
-        SolarMutexGuard aGuard;
-
         return Sequence< Reference< browse::XBrowseNode > >();
     }
 
 
     sal_Bool BasicMethodNodeImpl::hasChildNodes(  ) throw (RuntimeException, std::exception)
     {
-        SolarMutexGuard aGuard;
-
         return false;
     }
 
 
     sal_Int16 BasicMethodNodeImpl::getType(  ) throw (RuntimeException, std::exception)
     {
-        SolarMutexGuard aGuard;
-
         return browse::BrowseNodeTypes::SCRIPT;
     }
 
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index 56f4c0f..d298b19 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -205,7 +205,6 @@ OUString SAL_CALL ThumbnailViewAcc::getAccessibleDescription()
     throw (uno::RuntimeException, std::exception)
 {
     ThrowIfDisposed();
-    const SolarMutexGuard aSolarGuard;
     return OUString("ThumbnailView");
 }
 
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index fece32e..792d304 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -166,7 +166,6 @@ void SmGraphicAccessible::LaunchEvent(
 uno::Reference< XAccessibleContext > SAL_CALL SmGraphicAccessible::getAccessibleContext()
     throw (RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     return this;
 }
 
@@ -287,7 +286,6 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getBackground()
 sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleChildCount()
     throw (RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     return 0;
 }
 
@@ -295,7 +293,6 @@ Reference< XAccessible > SAL_CALL SmGraphicAccessible::getAccessibleChild(
         sal_Int32 /*i*/ )
     throw (IndexOutOfBoundsException, RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     throw IndexOutOfBoundsException();  // there is no child...
 }
 
@@ -330,7 +327,6 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleIndexInParent()
 sal_Int16 SAL_CALL SmGraphicAccessible::getAccessibleRole()
     throw (RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     return AccessibleRole::DOCUMENT;
 }
 
@@ -436,7 +432,6 @@ void SAL_CALL SmGraphicAccessible::removeAccessibleEventListener(
 sal_Int32 SAL_CALL SmGraphicAccessible::getCaretPosition()
     throw (RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     return 0;
 }
 
@@ -616,21 +611,18 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin
 OUString SAL_CALL SmGraphicAccessible::getSelectedText()
     throw (RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     return OUString();
 }
 
 sal_Int32 SAL_CALL SmGraphicAccessible::getSelectionStart()
     throw (RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     return -1;
 }
 
 sal_Int32 SAL_CALL SmGraphicAccessible::getSelectionEnd()
     throw (RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     return -1;
 }
 
@@ -1812,14 +1804,12 @@ sal_Int32 SAL_CALL SmEditAccessible::getAccessibleIndexInParent(  )
 sal_Int16 SAL_CALL SmEditAccessible::getAccessibleRole(  )
     throw (RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     return AccessibleRole::PANEL /*TEXT ?*/;
 }
 
 OUString SAL_CALL SmEditAccessible::getAccessibleDescription(  )
     throw (RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     return OUString();  // empty as agreed with product-management
 }
 
@@ -1834,7 +1824,6 @@ OUString SAL_CALL SmEditAccessible::getAccessibleName(  )
 uno::Reference< XAccessibleRelationSet > SAL_CALL SmEditAccessible::getAccessibleRelationSet(  )
     throw (RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     Reference< XAccessibleRelationSet > xRelSet = new utl::AccessibleRelationSetHelper();
     return xRelSet;   // empty relation set
 }
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index 64734ae..4da5031 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -945,8 +945,6 @@ Any SAL_CALL SvxRectCtlChildAccessibleContext::getMinimumValue() throw( RuntimeE
 
 sal_Int32 SvxRectCtlChildAccessibleContext::getAccessibleActionCount( ) throw (RuntimeException, std::exception)
 {
-    ::osl::MutexGuard   aGuard( maMutex );
-
     return 1;
 }
 
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 5db22ce..432a786 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -713,8 +713,7 @@ Any SAL_CALL SvXMLEmbeddedObjectHelper::getByName(
 Sequence< OUString > SAL_CALL SvXMLEmbeddedObjectHelper::getElementNames()
     throw (RuntimeException, std::exception)
 {
-    MutexGuard          aGuard( maMutex );
-    return Sequence< OUString >(0);
+   return Sequence< OUString >(0);
 }
 
 sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasByName( const OUString& rURLStr )
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index d661119..4163fc1 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -342,16 +342,12 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
 sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getHyperLinkIndex( sal_Int32 )
     throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
-
     return 0;
 }
 
 uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleNoTextFrame::getAccessibleRelationSet( )
     throw ( uno::RuntimeException, std::exception )
 {
-    SolarMutexGuard aGuard;
-
     return new AccessibleRelationSetHelper();
 }
 
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 4f8e0da..3f1a5b3 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -316,7 +316,6 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n
 // text::XFlatParagraph:
 css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions() throw (css::uno::RuntimeException, std::exception)
 {
-    SolarMutexGuard aGuard;
     return css::uno::Sequence< ::sal_Int32>();
 }
 
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index a1ff955..63cdd44 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -889,14 +889,12 @@ bool SwXTextViewCursor::IsTextSelection( bool bAllowTables ) const
 
 sal_Bool SwXTextViewCursor::isVisible() throw( uno::RuntimeException, std::exception )
 {
-    SolarMutexGuard aGuard;
     OSL_FAIL("not implemented");
     return true;
 }
 
 void SwXTextViewCursor::setVisible(sal_Bool /*bVisible*/) throw( uno::RuntimeException, std::exception )
 {
-    SolarMutexGuard aGuard;
     OSL_FAIL("not implemented");
 }
 
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index f2aa9f0..ef9f9e5 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -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)
 {
     // TODO: remove interface in the next incompatible build
-    SolarMutexGuard aGuard;
-
 }
 
 sal_Bool SAL_CALL VCLXWindow::isInPopupMode(  ) throw (css::uno::RuntimeException, std::exception)
 {
     // TODO: remove interface in the next incompatible build
-    SolarMutexGuard aGuard;
     return false;
 }
 


More information about the Libreoffice-commits mailing list