[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - 2 commits - solenv/bin sot/source

Armin Le Grand alg at apache.org
Tue Oct 29 13:08:45 CET 2013


 solenv/bin/modules/installer/windows/feature.pm |    1 +
 sot/source/sdstor/stgstrms.cxx                  |   15 +++++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

New commits:
commit e09cdbcf83cb71de5f59f4609b244b104a584089
Author: Armin Le Grand <alg at apache.org>
Date:   Wed Oct 16 16:47:38 2013 +0100

    i123485 secured file import scanning existing pages
    
    (cherry picked from commit 04b38114b0ca4be9895d8f9fa842b6cb390c8036
     and adapted to the rewritten scanBuildPageChainCache)
    
    Reviewed-on: https://gerrit.libreoffice.org/6272
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    (cherry picked from commit dfa1afd0e8b7ae9c706c4a3171a04752e24230b0)
    
    Conflicts:
    	sot/source/sdstor/stgstrms.cxx
    
    Change-Id: Ib90d0563be5aeb69aa14c28b3304e42f3cc46162
    Reviewed-on: https://gerrit.libreoffice.org/6375
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index b2c94ef..dae953f 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -23,6 +23,7 @@
 #include <sal/log.hxx>
 #include <osl/file.hxx>
 #include <tools/tempfile.hxx>
+#include <set>
 
 #include "sot/stg.hxx"
 #include "stgelem.hxx"
@@ -341,16 +342,22 @@ void StgStrm::scanBuildPageChainCache(sal_Int32 *pOptionalCalcSize)
 
     bool bError = false;
     sal_Int32 nBgn = nStart;
-    sal_Int32 nOldBgn = -1;
     sal_Int32 nOptSize = 0;
-    while( nBgn >= 0 && nBgn != nOldBgn )
+
+    // Track already scanned PageNumbers here and use them to
+    // see if an  already counted page is re-visited
+    std::set< sal_Int32 > nUsedPageNumbers;
+
+    while( nBgn >= 0 && !bError )
     {
         if( nBgn >= 0 )
             m_aPagesCache.push_back(nBgn);
-        nOldBgn = nBgn;
         nBgn = pFat->GetNextPage( nBgn );
-        if( nBgn == nOldBgn )
+
+        //returned second is false if it already exists
+        if (!nUsedPageNumbers.insert(nBgn).second)
             bError = true;
+
         nOptSize += nPageSize;
     }
     if (bError)
commit 9404457a19178b42ea40ebd710725520a83c85ef
Author: Andras Timar <andras.timar at collabora.com>
Date:   Sat Oct 12 10:00:51 2013 -0700

    fdo#33798 msidbFeatureAttributesUIDisallowAbsent for hidden feat.
    
    Change-Id: I0c8788f88b3c219e789af7f8bfa79e5dd31c5b3a
    Reviewed-on: https://gerrit.libreoffice.org/6234
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/solenv/bin/modules/installer/windows/feature.pm b/solenv/bin/modules/installer/windows/feature.pm
index c22b864..ddc458a 100644
--- a/solenv/bin/modules/installer/windows/feature.pm
+++ b/solenv/bin/modules/installer/windows/feature.pm
@@ -189,6 +189,7 @@ sub get_feature_attributes
     if ( $onefeature->{'ParentID'} ) { $parentgid = $onefeature->{'ParentID'}; }
 
     if (( $parentgid eq "" ) || ( $parentgid eq $installer::globals::rootmodulegid )) { $attributes = "8"; }
+    elsif ( get_feature_display($onefeature) eq "0" ) { $attributes = "26"; } # fdo#33798
     else { $attributes = "10"; }
 
     return $attributes


More information about the Libreoffice-commits mailing list