[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - filter/source solenv/bin

Andre Fischer af at apache.org
Tue Apr 15 05:07:52 PDT 2014


 filter/source/msfilter/msdffimp.cxx               |   27 +++++++++++--------
 solenv/bin/modules/installer/windows/msiglobal.pm |   30 +++++++++++++++++++---
 2 files changed, 42 insertions(+), 15 deletions(-)

New commits:
commit e167ff39c21afe06197a0364b20fe211acb8267d
Author: Andre Fischer <af at apache.org>
Date:   Tue Apr 15 11:28:55 2014 +0000

    i124682: Use the right upgrade code for lanaguage sets.

diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm
index db07914..52ab428 100644
--- a/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -1567,10 +1567,12 @@ sub get_source_codes ($)
 
     Determine values for the product code and upgrade code of the target version.
 
-    As perparation for building a Windows patch, certain conditions have to be fullfilled.
-     - The upgrade code changes from old to new version
+    As preparation for building a Windows patch, certain conditions have to be fulfilled.
+     - The upgrade code remains the same
      - The product code remains the same
-     In order to inforce that we have to access information about the source version.
+       [this is still to be determined.  For patches to work we need the same product codes but
+        the install sets install only when the product codes differ.]
+    In order to enforce that we have to access information about the source version.
 
     The resulting values are stored as global variables
         $installer::globals::productcode
@@ -1631,6 +1633,28 @@ sub set_global_code_variables ($$)
         $installer::logger::Lang->printf("there is no source version => created new guids\n");
     }
 
+    # Keep the upgrade code constant between versions.  Read it from the codes.txt file.
+    # Note that this handles regular installation sets and language packs.
+    my $onelanguage = ${$languagesref}[0];
+    $installer::logger::Lang->printf("reading upgrade code for language %s from %s\n",
+        $onelanguage,
+        $installer::globals::codefilename);
+    if (defined $installer::globals::codefilename)
+    {
+        my $code_filename = $installer::globals::codefilename;
+        installer::files::check_file($code_filename);
+        my $codefile = installer::files::read_file($code_filename);
+        my $searchstring = "UPGRADECODE";
+        my $codeblock = installer::windows::idtglobal::get_language_block_from_language_file(
+            $searchstring,
+            $codefile);
+        $target_upgrade_code = installer::windows::idtglobal::get_language_string_from_language_block(
+            $codeblock,
+            $onelanguage,
+            "");
+    }
+    # else use the previously generated upgrade code.
+
     $installer::globals::productcode = $target_product_code;
     $installer::globals::upgradecode = $target_upgrade_code;
     $allvariableshashref->{'PRODUCTCODE'} = $target_product_code;
commit 48653aa3a1cc24ed9ad8a14ae035b38a751e561d
Author: Steve Yin <steve_y at apache.org>
Date:   Tue Apr 15 10:12:14 2014 +0000

    Issue 124661 - crash when loading and re-saving attached ppt file with a single customshape
    
    check the equation array element number. If the number is greater than 128, the equation array will not be imported.

diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 3066357..430aae9 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1996,20 +1996,23 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
         if ( SeekToContent( DFF_Prop_pFormulas, rIn ) )
             rIn >> nNumElem >> nNumElemMem >> nElemSize;
 
-        sal_Int16 nP1, nP2, nP3;
-        sal_uInt16 nFlags;
-
-        uno::Sequence< rtl::OUString > aEquations( nNumElem );
-        for ( i = 0; i < nNumElem; i++ )
+        if ( nNumElem <= 128 )
         {
-            rIn >> nFlags >> nP1 >> nP2 >> nP3;
-            aEquations[ i ] = EnhancedCustomShape2d::GetEquation( nFlags, nP1, nP2, nP3 );
+            sal_Int16 nP1, nP2, nP3;
+            sal_uInt16 nFlags;
+
+            uno::Sequence< rtl::OUString > aEquations( nNumElem );
+            for ( i = 0; i < nNumElem; i++ )
+            {
+                rIn >> nFlags >> nP1 >> nP2 >> nP3;
+                aEquations[ i ] = EnhancedCustomShape2d::GetEquation( nFlags, nP1, nP2, nP3 );
+            }
+            // pushing the whole Equations element
+            const rtl::OUString sEquations( RTL_CONSTASCII_USTRINGPARAM ( "Equations" ) );
+            aProp.Name = sEquations;
+            aProp.Value <<= aEquations;
+            aPropVec.push_back( aProp );
         }
-        // pushing the whole Equations element
-        const rtl::OUString sEquations( RTL_CONSTASCII_USTRINGPARAM ( "Equations" ) );
-        aProp.Name = sEquations;
-        aProp.Value <<= aEquations;
-        aPropVec.push_back( aProp );
     }
 
     ////////////////////////////////////////


More information about the Libreoffice-commits mailing list