[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - 2 commits - sc/qa sw/source

Michael Meeks michael.meeks at collabora.com
Wed Nov 25 08:35:42 PST 2015


 sc/qa/extras/macros-test.cxx      |    5 +++++
 sw/source/core/unocore/unotbl.cxx |   24 +++++++++++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

New commits:
commit f31768dab7104b8cdcd8c43744d51eaa4e8c21e1
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Nov 25 14:22:29 2015 +0000

    sw: SwXTextTableCursor needs to take the SolarMutex in release.
    
    Change-Id: I1fb5baabd869c4abe8ccf9eeae131efcc697bbee

diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 6f93d12..044a514 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -795,6 +795,8 @@ void SAL_CALL SwXCell::acquire(  ) throw()
 
 void SAL_CALL SwXCell::release(  ) throw()
 {
+    SolarMutexGuard aGuard;
+
     SwXCellBaseClass::release();
 }
 
@@ -1430,7 +1432,27 @@ OUString SwXTextTableCursor::getImplementationName() throw( uno::RuntimeExceptio
 sal_Bool SwXTextTableCursor::supportsService(const OUString& rServiceName) throw( uno::RuntimeException, std::exception )
     { return cppu::supportsService(this, rServiceName); }
 
-IMPLEMENT_FORWARD_XINTERFACE2(SwXTextTableCursor,SwXTextTableCursor_Base,OTextCursorHelper)
+void SwXTextTableCursor::acquire() throw()
+{
+    SwXTextTableCursor_Base::release();
+}
+
+void SwXTextTableCursor::release() throw()
+{
+    SolarMutexGuard aGuard;
+    SwXTextTableCursor_Base::release();
+}
+
+css::uno::Any SAL_CALL
+SwXTextTableCursor::queryInterface( const css::uno::Type& _rType )
+        throw (css::uno::RuntimeException, std::exception)
+{
+    css::uno::Any aReturn = SwXTextTableCursor_Base::queryInterface( _rType );
+    if ( !aReturn.hasValue() )
+        aReturn = OTextCursorHelper::queryInterface( _rType );
+    return aReturn;
+}
+
 const SwPaM*        SwXTextTableCursor::GetPaM() const  { return &GetCursor(); }
 SwPaM*              SwXTextTableCursor::GetPaM()        { return &GetCursor(); }
 const SwDoc*        SwXTextTableCursor::GetDoc() const  { return GetFrameFormat()->GetDoc(); }
commit 51ea0c1636977880d5686b3b570cd275339aa401
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Nov 25 13:15:49 2015 +0000

    sc: force vba events ordering.
    
    Otherwise we get workbook load events (eg.) happening at idle, which
    occurs at (more or less) random places as the StarBasic interpreter
    Yields every few instructions executed.
    
    Change-Id: I51ea57f4ad45e30e04fe84a9dc051ed1c5537536

diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 70b7009..e2a6f32 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -306,6 +306,11 @@ void ScMacrosTest::testVba()
         OUString sMsg( "Failed to load " + aFileName );
         CPPUNIT_ASSERT_MESSAGE( OUStringToOString( sMsg, RTL_TEXTENCODING_UTF8 ).getStr(), xComponent.is() );
 
+        // process all events such as OnLoad events etc.
+        // otherwise the tend to arrive later at a random
+        // time - while processing other StarBasic methods.
+        Application::Reschedule(true);
+
         Any aRet;
         Sequence< sal_Int16 > aOutParamIndex;
         Sequence< Any > aOutParam;


More information about the Libreoffice-commits mailing list