[Libreoffice-commits] core.git: 4 commits - helpcontent2 sal/qa sc/source sd/source

Armin Le Grand alg at apache.org
Tue Oct 8 13:30:41 PDT 2013


 helpcontent2                     |    2 -
 sal/qa/osl/file/osl_File.cxx     |    8 ++++--
 sc/source/core/data/documen4.cxx |    7 ++++-
 sd/source/core/sdpage.cxx        |   47 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 60 insertions(+), 4 deletions(-)

New commits:
commit fdbe65e7a551e3935fc4c68145152f02e622a99d
Author: Armin Le Grand <alg at apache.org>
Date:   Tue Oct 8 15:40:15 2013 +0000

    Resolves: #i119056# Added direct refreshes for objects dependent...
    
    on HeaderFooterSettings
    
    (cherry picked from commit b94437b6dfe60904f9c89608c15ed55dc3ce277d)
    
    Change-Id: I4e21876f83fc160883c0ffdee5941ee7488e35c8

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 8e1e339..18b4a25 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2719,9 +2719,56 @@ void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettin
     }
 
     SetChanged();
+
     if(TRG_HasMasterPage())
     {
         TRG_GetMasterPageDescriptorViewContact().ActionChanged();
+
+        // #i119056# For HeaderFooterSettings SdrObjects are used, but the properties
+        // used are not part of their model data, but kept in SD. This data is applied
+        // using a 'backdoor' on primitive creation. Thus, the normal mechanism to detect
+        // object changes does not work here. It is neccessary to trigger updates here
+        // directly. BroadcastObjectChange used for PagePreview invalidations,
+        // flushViewObjectContacts used to invalidate and flush all visualizations in
+        // edit views.
+        SdPage* pMasterPage = dynamic_cast< SdPage* >(&TRG_GetMasterPage());
+
+        if(pMasterPage)
+        {
+            SdrObject* pCandidate = 0;
+
+            pCandidate = pMasterPage->GetPresObj( PRESOBJ_HEADER );
+
+            if(pCandidate)
+            {
+                pCandidate->BroadcastObjectChange();
+                pCandidate->GetViewContact().flushViewObjectContacts();
+            }
+
+            pCandidate = pMasterPage->GetPresObj( PRESOBJ_DATETIME );
+
+            if(pCandidate)
+            {
+                pCandidate->BroadcastObjectChange();
+                pCandidate->GetViewContact().flushViewObjectContacts();
+            }
+
+            pCandidate = pMasterPage->GetPresObj( PRESOBJ_FOOTER );
+
+            if(pCandidate)
+            {
+                pCandidate->BroadcastObjectChange();
+                pCandidate->GetViewContact().flushViewObjectContacts();
+            }
+
+            pCandidate = pMasterPage->GetPresObj( PRESOBJ_SLIDENUMBER );
+
+            if(pCandidate)
+            {
+                pCandidate->BroadcastObjectChange();
+                pCandidate->GetViewContact().flushViewObjectContacts();
+            }
+        }
     }
 }
 
commit 728c9d5f0d1335e160de43bd3f73b2a3168e8fcc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 8 21:15:51 2013 +0100

    CID#982700 silence coverity
    
    Change-Id: I01fddeeca503ebc045c2f0e53c5917e6218e9d6e

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index ab22c85..54966ac 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -6107,8 +6107,12 @@ namespace osl_Directory
         Directory::remove(buffer);
 
         i = rtl_ustr_lastIndexOfChar(buffer, '/');
-        buffer[i] = 0;
-        Directory::remove(buffer);
+        assert(i != -1);
+        if (i != -1)
+        {
+            buffer[i] = 0;
+            Directory::remove(buffer);
+        }
     }
 
     //########################################
commit daef8b82d00bbe823f711f73895ef422376a2f95
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 8 20:55:53 2013 +0100

    CID#1038507 calm coverity nerves about a double free
    
    Change-Id: Idc1c8e93ecdf7b2992bf08d54f2f63d337bea7eb

diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 608cf4d..53c90db 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -284,7 +284,12 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
             continue;
 
         if (*itr == nTab1)
-            maTabs[*itr]->SetFormulaCell(nCol1, nRow1, pCell);
+        {
+            pCell = maTabs[*itr]->SetFormulaCell(nCol1, nRow1, pCell);
+            assert(pCell);  //NULL if nCol1/nRow1 is invalid, which it can't be here
+            if (!pCell)
+                break;
+        }
         else
             maTabs[*itr]->SetFormulaCell(
                 nCol1, nRow1,
commit c8ef7a4fbeb15e774f30c2e800247c7fc283cb0e
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Mon Oct 7 21:44:33 2013 +0200

    Updated core
    Project: help  ba93fcc5c4e7236ff5ea4137e0d9ed86a2337ac4
    
    Correct typo in function DDE in Calc
    
    Server "Soffice" must be only lowercase as used in examples
    
    Change-Id: Ia1cb2908f6e1b3ba7c567345a0f258bc8fccd23d
    Reviewed-on: https://gerrit.libreoffice.org/6157
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/helpcontent2 b/helpcontent2
index a3bf6d8c..ba93fcc 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a3bf6d8c872c363909e6173990fddcdd0e69d676
+Subproject commit ba93fcc5c4e7236ff5ea4137e0d9ed86a2337ac4


More information about the Libreoffice-commits mailing list