[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 4 commits - configure.ac dtrans/source include/vcl sc/source toolkit/source

Andras Timar andras.timar at collabora.com
Wed Mar 1 15:14:55 UTC 2017


 configure.ac                               |    2 -
 dtrans/source/win32/dtobj/XTDataObject.cxx |   38 -----------------------------
 dtrans/source/win32/dtobj/XTDataObject.hxx |    3 --
 include/vcl/svapp.hxx                      |    4 ---
 sc/source/core/data/document10.cxx         |    7 +++--
 sc/source/ui/view/viewfun2.cxx             |   12 ++++++---
 toolkit/source/awt/asynccallback.cxx       |    3 +-
 7 files changed, 18 insertions(+), 51 deletions(-)

New commits:
commit e91d2c2d59b035e40bdefac5fe06fb210180ed86
Author: Andras Timar <andras.timar at collabora.com>
Date:   Wed Mar 1 16:13:15 2017 +0100

    Bump version to 5.1-21
    
    Change-Id: I39c14759e6b974e08af9a4c1781fc2286078b74c

diff --git a/configure.ac b/configure.ac
index b1b6ee0..cc7599f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
 
-AC_INIT([Collabora Office],[5.1.10.20],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[5.1.10.21],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
commit d063db2f6dc3e6f36ec53cd5d7f4c1ed1095774c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Sep 19 17:18:21 2016 +0200

    tdf#100393, handle copying one cell to multiple cols with cond format
    
    The same fix has been applied for rows already.
    
    Change-Id: I77300680a657fb874d07641fbae928eb6c210acd
    (cherry picked from commit 3a9917b66d6820ec9f2844f8292a46d8b0b9180b)

diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index 99bc8a2..a5e95a37 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -125,8 +125,11 @@ bool ScDocument::CopyOneCellFromClip(
         if (rCxt.getInsertFlag() & InsertDeleteFlags::ATTRIB)
             for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
             {
-                maTabs[i]->CopyConditionalFormat(nCol1, nRow, nCol2, nRow, nCol1 - aClipRange.aStart.Col(),
-                        nRow - aClipRange.aStart.Row(), pSrcTab);
+                for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
+                {
+                    maTabs[i]->CopyConditionalFormat(nCol, nRow, nCol, nRow, nCol - aClipRange.aStart.Col(),
+                            nRow - aClipRange.aStart.Row(), pSrcTab);
+                }
             }
     }
 
commit 38903acb970cf5d6ef10b47b65f996dd266d6d72
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Wed Jul 20 20:27:23 2016 +0200

    tdf#90943 Don't ask to move cells if they are empty
    
    During merge of cells, test of empty cells was wrong.
    Test of first column should not be done if there is only 1 row
    
    Change-Id: If8011f3e6d6e9006d242a8c2ef0fcb2ce12180ad
    Reviewed-on: https://gerrit.libreoffice.org/27354
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 0baeea95f38a5cdb19936290c69d33541274ad41)

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 273b290..3e40098 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1063,9 +1063,15 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bRecord, bool bC
         SCTAB i = *itr;
         aMergeOption.maTabs.insert(i);
 
-        if (!rDoc.IsBlockEmpty(i, nStartCol, nStartRow+1, nStartCol, nEndRow) ||
-            !rDoc.IsBlockEmpty(i, nStartCol+1, nStartRow, nEndCol, nEndRow))
-            bAskDialog = true;
+        if ( nEndRow == nStartRow )
+        {
+            if (!rDoc.IsBlockEmpty(i, nStartCol+1, nStartRow, nEndCol, nEndRow))
+                bAskDialog = true;
+        }
+        else
+            if (!rDoc.IsBlockEmpty(i, nStartCol, nStartRow+1, nStartCol, nEndRow) ||
+                !rDoc.IsBlockEmpty(i, nStartCol+1, nStartRow, nEndCol, nEndRow))
+                bAskDialog = true;
     }
 
     bool bOk = true;
commit 0759c5973cf7be07789f21204540f62594224b86
Author: Andras Timar <andras.timar at collabora.com>
Date:   Wed Mar 1 16:11:53 2017 +0100

    Revert "tdf#103852 avoid clipboard deadlock"
    
    This reverts commit 56b7eb743e82c1e12bc91d73f526e705f2c70b39.

diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index d36328a..3c8a937 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -25,11 +25,8 @@
 #include "DTransHelper.hxx"
 #include "TxtCnvtHlp.hxx"
 #include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp>
-#include "com/sun/star/awt/AsyncCallback.hpp"
-#include "com/sun/star/awt/XCallback.hpp"
 #include "FmtFilter.hxx"
 #include <comphelper/processfactory.hxx>
-#include <cppuhelper/implbase.hxx>
 
 #if defined _MSC_VER
 #pragma warning(push,1)
@@ -55,33 +52,6 @@ using namespace com::sun::star::datatransfer::clipboard;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 
-namespace
-{
-
-/**
-   We need to destroy XTransferable in the main thread to avoid dead lock
-   when locking in the clipboard thread. So we transfer the ownership of the
-   XTransferable reference to this object and release it when the callback
-   is executed in main thread.
-*/
-class AsyncDereference : public cppu::WeakImplHelper<css::awt::XCallback>
-{
-    Reference<XTransferable> maTransferable;
-
-public:
-    AsyncDereference(css::uno::Reference<css::datatransfer::XTransferable> const & rTransferable)
-        : maTransferable(rTransferable)
-    {}
-
-    virtual void SAL_CALL notify(css::uno::Any const &)
-        throw (css::uno::RuntimeException, std::exception) override
-    {
-        maTransferable.set(nullptr);
-    }
-};
-
-}
-
 // a helper class that will be thrown by the function validateFormatEtc
 
 class CInvalidFormatEtcException
@@ -97,20 +67,12 @@ CXTDataObject::CXTDataObject( const Reference< XComponentContext >& rxContext,
                               const Reference< XTransferable >& aXTransferable )
     : m_nRefCnt( 0 )
     , m_XTransferable( aXTransferable )
-    , m_XComponentContext( rxContext )
     , m_bFormatEtcContainerInitialized( sal_False )
     , m_DataFormatTranslator( rxContext )
     , m_FormatRegistrar( rxContext, m_DataFormatTranslator )
 {
 }
 
-CXTDataObject::~CXTDataObject()
-{
-    css::awt::AsyncCallback::create(m_XComponentContext)->addCallback(
-        new AsyncDereference(m_XTransferable),
-        css::uno::Any());
-}
-
 // IUnknown->QueryInterface
 
 STDMETHODIMP CXTDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx
index f9e98e8..3d8d71c 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.hxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.hxx
@@ -64,7 +64,7 @@ class CXTDataObject : public IDataObject
 public:
     CXTDataObject( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
                    const css::uno::Reference< css::datatransfer::XTransferable >& aXTransferable );
-    virtual ~CXTDataObject();
+    virtual ~CXTDataObject() {}
 
     // ole interface implementation
 
@@ -118,7 +118,6 @@ private:
 private:
     LONG m_nRefCnt;
     css::uno::Reference< css::datatransfer::XTransferable >      m_XTransferable;
-    css::uno::Reference< css::uno::XComponentContext>            m_XComponentContext;
     CFormatEtcContainer                                          m_FormatEtcContainer;
     sal_Bool                                                     m_bFormatEtcContainerInitialized;
     CDataFormatTranslator                                        m_DataFormatTranslator;
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 7ae4da4..c31bf89 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -782,13 +782,9 @@ public:
 
      User events allow for the deferreal of work to later in the main-loop - at idle.
 
-     Execution of the deferred work is thread-safe which means all the tasks are executed
-     serially, so no thread-safety locks between tasks are necessary.
-
      @param     rLink           Link to event callback function
      @param     pCaller         Pointer to data sent to the event by the caller. Optional.
      @param     bReferenceLink  If true - hold a VclPtr<> reference on the Link's instance.
-                                Taking the reference is guarded by a SolarMutexGuard.
 
      @return the event ID used to post the event.
     */
diff --git a/toolkit/source/awt/asynccallback.cxx b/toolkit/source/awt/asynccallback.cxx
index 26239ab..62ebe1e 100644
--- a/toolkit/source/awt/asynccallback.cxx
+++ b/toolkit/source/awt/asynccallback.cxx
@@ -88,7 +88,8 @@ void SAL_CALL AsyncCallback::addCallback(const css::uno::Reference< css::awt::XC
 {
     if ( Application::IsInMain() )
     {
-        // NOTE: We don't need SolarMutexGuard here as Application::PostUserEvent is thread-safe
+        SolarMutexGuard aSolarGuard;
+
         CallbackData* pCallbackData = new CallbackData( xCallback, aData );
         Application::PostUserEvent( LINK( this, AsyncCallback, Notify_Impl ), pCallbackData );
     }


More information about the Libreoffice-commits mailing list