[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 62 commits - bin/lo-pack-sources chart2/source comphelper/source configure.ac connectivity/source cui/source editeng/CppunitTest_editeng_core.mk editeng/qa editeng/source filter/source framework/inc framework/source i18npool/source include/comphelper include/oox include/sfx2 oox/source sc/inc sc/source sd/source sfx2/source solenv/gdb sot/source svl/source svtools/source svx/source sw/qa sw/source vcl/aqua vcl/qa vcl/source writerfilter/qa writerfilter/source xmloff/source

Andras Timar andras.timar at collabora.com
Thu Aug 21 12:22:57 PDT 2014


 bin/lo-pack-sources                                                                                |    4 
 chart2/source/view/main/ChartView.cxx                                                              |   33 -
 comphelper/source/container/embeddedobjectcontainer.cxx                                            |   36 +-
 configure.ac                                                                                       |   16 
 connectivity/source/drivers/dbase/DTable.cxx                                                       |   15 
 connectivity/source/parse/sqlbison.y                                                               |    4 
 cui/source/tabpages/numfmt.cxx                                                                     |   18 -
 editeng/CppunitTest_editeng_core.mk                                                                |    1 
 editeng/qa/unit/core-test.cxx                                                                      |  100 +++++
 editeng/source/editeng/editdoc.cxx                                                                 |  173 ++++++----
 editeng/source/editeng/editdoc.hxx                                                                 |   12 
 editeng/source/editeng/impedit4.cxx                                                                |    6 
 filter/source/graphicfilter/itiff/itiff.cxx                                                        |   60 ++-
 framework/inc/services/pathsettings.hxx                                                            |    4 
 framework/source/services/pathsettings.cxx                                                         |   32 +
 i18npool/source/localedata/localedata.cxx                                                          |    2 
 include/comphelper/embeddedobjectcontainer.hxx                                                     |    3 
 include/oox/helper/graphichelper.hxx                                                               |    3 
 include/sfx2/styledlg.hxx                                                                          |    3 
 oox/source/drawingml/chart/chartspaceconverter.cxx                                                 |    9 
 oox/source/drawingml/chart/modelbase.cxx                                                           |    3 
 oox/source/drawingml/chart/objectformatter.cxx                                                     |   11 
 oox/source/drawingml/chart/seriesconverter.cxx                                                     |    5 
 oox/source/drawingml/textbodypropertiescontext.cxx                                                 |    6 
 oox/source/helper/graphichelper.cxx                                                                |    5 
 oox/source/ppt/pptimport.cxx                                                                       |    6 
 sc/inc/column.hxx                                                                                  |    7 
 sc/inc/document.hxx                                                                                |    8 
 sc/inc/formulacell.hxx                                                                             |    1 
 sc/inc/table.hxx                                                                                   |   12 
 sc/source/core/data/column.cxx                                                                     |   27 -
 sc/source/core/data/column2.cxx                                                                    |   22 -
 sc/source/core/data/column4.cxx                                                                    |   46 +-
 sc/source/core/data/documen4.cxx                                                                   |   11 
 sc/source/core/data/documen7.cxx                                                                   |   40 ++
 sc/source/core/data/document10.cxx                                                                 |   17 
 sc/source/core/data/formulacell.cxx                                                                |   51 --
 sc/source/core/data/table2.cxx                                                                     |    7 
 sc/source/core/data/table3.cxx                                                                     |    8 
 sc/source/core/data/table4.cxx                                                                     |    6 
 sc/source/core/data/table7.cxx                                                                     |   29 +
 sc/source/core/tool/token.cxx                                                                      |    5 
 sc/source/filter/excel/excrecds.cxx                                                                |    5 
 sc/source/filter/excel/xeescher.cxx                                                                |    5 
 sc/source/filter/inc/xeescher.hxx                                                                  |    2 
 sc/source/filter/oox/revisionfragment.cxx                                                          |    3 
 sc/source/filter/xcl97/xcl97rec.cxx                                                                |   68 +++
 sc/source/ui/docshell/dbdocfun.cxx                                                                 |   14 
 sc/source/ui/docshell/docfunc.cxx                                                                  |    4 
 sc/source/ui/docshell/docsh5.cxx                                                                   |    4 
 sc/source/ui/undo/undobase.cxx                                                                     |    2 
 sc/source/ui/undo/undocell.cxx                                                                     |    2 
 sc/source/ui/undo/undodat.cxx                                                                      |    8 
 sc/source/ui/undo/undorangename.cxx                                                                |    2 
 sc/source/ui/unoobj/nameuno.cxx                                                                    |    2 
 sc/source/ui/view/dbfunc.cxx                                                                       |    4 
 sc/source/ui/view/viewfunc.cxx                                                                     |    2 
 sd/source/core/sdpage2.cxx                                                                         |    5 
 sd/source/filter/ppt/pptin.cxx                                                                     |    2 
 sd/source/ui/remotecontrol/AvahiNetworkService.cxx                                                 |   28 +
 sd/source/ui/slidesorter/view/SlsLayouter.cxx                                                      |   12 
 sfx2/source/appl/appuno.cxx                                                                        |    2 
 sfx2/source/appl/impldde.cxx                                                                       |   72 ----
 sfx2/source/appl/linkmgr2.cxx                                                                      |   12 
 sfx2/source/dialog/filedlghelper.cxx                                                               |   23 -
 sfx2/source/dialog/mgetempl.cxx                                                                    |   16 
 sfx2/source/dialog/styledlg.cxx                                                                    |   14 
 solenv/gdb/libreoffice/sw.py                                                                       |    8 
 sot/source/base/formats.cxx                                                                        |    2 
 svl/source/numbers/zformat.cxx                                                                     |   56 +--
 svl/source/numbers/zforscan.cxx                                                                    |    5 
 svtools/source/misc/embedhlp.cxx                                                                   |   29 +
 svx/source/tbxctrls/tbcontrl.cxx                                                                   |    6 
 sw/qa/core/data/ooxml/pass/fdo78904_fileHang.docx                                                  |binary
 sw/qa/extras/odfimport/data/fdo82165.odt                                                           |binary
 sw/qa/extras/odfimport/odfimport.cxx                                                               |   10 
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx                                                           |    2 
 sw/qa/extras/ooxmlimport/data/fdo78904.docx                                                        |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx                                                           |   11 
 sw/qa/extras/rtfimport/data/fdo78502.rtf                                                           |   12 
 sw/qa/extras/rtfimport/rtfimport.cxx                                                               |    6 
 sw/qa/extras/ww8import/data/bnc787942.doc                                                          |binary
 sw/qa/extras/ww8import/ww8import.cxx                                                               |    7 
 sw/source/core/doc/docfmt.cxx                                                                      |   22 +
 sw/source/core/unocore/unotext.cxx                                                                 |   18 -
 sw/source/filter/ww8/ww8par.cxx                                                                    |    2 
 sw/source/filter/ww8/ww8par.hxx                                                                    |    2 
 sw/source/filter/ww8/ww8par6.cxx                                                                   |   20 -
 sw/source/ui/app/docst.cxx                                                                         |    6 
 vcl/aqua/source/window/salframe.cxx                                                                |    2 
 vcl/qa/cppunit/graphicfilter/data/gif/pass/sf_3e0068c9b19bb548826bed0599f65745-15940-minimized.gif |binary
 vcl/source/filter/igif/decode.cxx                                                                  |   33 +
 vcl/source/filter/igif/decode.hxx                                                                  |    2 
 vcl/source/fontsubset/cff.cxx                                                                      |   22 -
 vcl/source/window/layout.cxx                                                                       |    9 
 writerfilter/qa/cppunittests/rtftok/data/pass/sf_edeb1eb341ad4c8608af9396952724a0-41170.rtf        |binary
 writerfilter/source/dmapper/DomainMapper.cxx                                                       |    2 
 writerfilter/source/dmapper/DomainMapperTableManager.cxx                                           |    3 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                                                  |   34 +
 writerfilter/source/dmapper/StyleSheetTable.cxx                                                    |   18 -
 writerfilter/source/dmapper/TablePropertiesHandler.cxx                                             |    5 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx                                                     |   11 
 xmloff/source/text/XMLTextHeaderFooterContext.cxx                                                  |   13 
 103 files changed, 1007 insertions(+), 551 deletions(-)

New commits:
commit cc4e1145fcf7130454bccbc22a2c97b0315a508b
Author: Andras Timar <andras.timar at collabora.com>
Date:   Thu Aug 21 21:25:38 2014 +0200

    Bump version to 4.2-8
    
    Change-Id: Icb122bc8e6447ab2a4e98995e0a97f3939fb6a8c

diff --git a/configure.ac b/configure.ac
index 73bc86d..c721987 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([LibreOffice],[4.2.10.7],[],[],[https://libreoffice-from-collabora.com/])
+AC_INIT([LibreOffice],[4.2.10.8],[],[],[https://libreoffice-from-collabora.com/])
 
 AC_PREREQ([2.59])
 
commit a90484bfd7ea5dd0d38ce4b19e616daef64360d8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 21 12:59:50 2014 +0100

    avoid crash on document ending before contained table ends
    
    Change-Id: I003b7e00673cd5a4b4f0ed5218e2d30cfef04ffb
    (cherry picked from commit 5a2123376dc010ca4e3f0a19d7dbbfaeb25ea963)
    Reviewed-on: https://gerrit.libreoffice.org/11057
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e8b2dbc..6580024 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5334,6 +5334,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
 
     UpdatePageDescs(rDoc, nPageDescOffset);
 
+    SAL_WARN_IF(mpTableEndPaM, "sw.ww8", "document ended without table ending");
+    mpTableEndPaM.reset();  //ensure this is deleted before pPaM
     delete pPaM, pPaM = 0;
     return nErrRet;
 }
commit ae8fa3021814f81a08c9f5aadd2c57519400192e
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Aug 19 15:48:31 2014 +0200

    gdb: print the SwNodeIndex properly if there are multiple blocks
    
    Change-Id: I178d365e71ef3377b1a2cfc115bb297640161efe
    (cherry picked from commit 4f211a0d0c4ef0c248fd3d4493994c1a122c2eb9)
    Reviewed-on: https://gerrit.libreoffice.org/11047
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 515718e..97cba13 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -19,8 +19,10 @@ class SwPositionPrinter(object):
 
     def to_string(self):
         node = self.value['nNode']['pNd'].dereference();
+        block = node['pBlock'].dereference();
+        nodeindex = block['nStart'] + node['nOffset']
         offset = self.value['nContent']['m_nIndex']
-        return "%s (node %d, offset %d)" % (self.typename, node['nOffset'], offset)
+        return "%s (node %d, offset %d)" % (self.typename, nodeindex, offset)
 
 class SwNodeIndexPrinter(object):
     '''Prints SwNodeIndex.'''
@@ -31,7 +33,9 @@ class SwNodeIndexPrinter(object):
 
     def to_string(self):
         node = self.value['pNd'].dereference();
-        return "%s (node %d)" % (self.typename, node['nOffset'])
+        block = node['pBlock'].dereference();
+        nodeindex = block['nStart'] + node['nOffset']
+        return "%s (node %d)" % (self.typename, nodeindex)
 
 class SwIndexPrinter(object):
     '''Prints SwIndex.'''
commit ef639c610a201b4c383eaea1e83e17aa221ef6f9
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Aug 19 20:16:53 2014 +0300

    bnc#529470: I can't remove a path in AutoText dialog
    
    This is, not surprisingly, somewhat weird code, but I think this patch does
    what is necessary, it does fix the bug.
    
    Change-Id: Ie1947b311f1455ba48a904f5ef42ad92899fac31
    Reviewed-on: https://gerrit.libreoffice.org/11032
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/framework/inc/services/pathsettings.hxx b/framework/inc/services/pathsettings.hxx
index 34e65f5..352e824 100644
--- a/framework/inc/services/pathsettings.hxx
+++ b/framework/inc/services/pathsettings.hxx
@@ -372,8 +372,8 @@ class PathSettings : // base classes
             So real user defined paths can be extracted from the list of
             fix internal paths !
          */
-        void impl_purgeKnownPaths(const PathSettings::PathInfo& rPath,
-                                         OUStringList&           lList);
+        void impl_purgeKnownPaths(PathSettings::PathInfo& rPath,
+                                  OUStringList&           lList);
 
         /** rebuild the member m_lPropDesc using the path list m_lPaths. */
         void impl_rebuildPropertyDescriptor();
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index 15fb3c0..77d2224 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -694,10 +694,13 @@ OUStringList PathSettings::impl_convertOldStyle2Path(const OUString& sOldStylePa
 }
 
 //-----------------------------------------------------------------------------
-void PathSettings::impl_purgeKnownPaths(const PathSettings::PathInfo& rPath,
-                                               OUStringList&           lList)
+void PathSettings::impl_purgeKnownPaths(PathSettings::PathInfo& rPath,
+                                        OUStringList&           lList)
 {
-    OUStringList::const_iterator pIt;
+    OUStringList::iterator pIt;
+
+    // Erase items in the internal path list from lList.
+    // Also erase items in the internal path list from the user path list.
     for (  pIt  = rPath.lInternalPaths.begin();
            pIt != rPath.lInternalPaths.end()  ;
          ++pIt                                 )
@@ -706,7 +709,29 @@ void PathSettings::impl_purgeKnownPaths(const PathSettings::PathInfo& rPath,
         OUStringList::iterator pItem = lList.find(rItem);
         if (pItem != lList.end())
             lList.erase(pItem);
+        pItem = rPath.lUserPaths.find(rItem);
+        if (pItem != rPath.lUserPaths.end())
+            rPath.lUserPaths.erase(pItem);
+    }
+
+    // Erase itsems not in lList from the user path list.
+    pIt = rPath.lUserPaths.begin();
+    while ( pIt != rPath.lUserPaths.end() )
+    {
+        const OUString& rItem = *pIt;
+        OUStringList::iterator pItem = lList.find(rItem);
+        if ( pItem == lList.end() )
+        {
+            rPath.lUserPaths.erase(pIt);
+            pIt = rPath.lUserPaths.begin();
+        }
+        else
+        {
+            ++pIt;
+        }
     }
+
+    // Erase items in the user path list from lList.
     for (  pIt  = rPath.lUserPaths.begin();
            pIt != rPath.lUserPaths.end()  ;
          ++pIt                             )
@@ -717,6 +742,7 @@ void PathSettings::impl_purgeKnownPaths(const PathSettings::PathInfo& rPath,
             lList.erase(pItem);
     }
 
+    // Erase the write path from lList
     OUStringList::iterator pItem = lList.find(rPath.sWritePath);
     if (pItem != lList.end())
         lList.erase(pItem);
commit f0cedfc5086794f570fcdf6eb56c593ff66df112
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Aug 19 18:11:42 2014 +0200

    sw: ww8: fix another ~SwIndexReg() assertion
    
    If the position is the same as the body text anchor position, don't
    delete the node.  Probably something should have inserted more nodes
    between StartApo() and StopApo().
    
    Change-Id: I41110a47d840e764f6d2a24e43bf6938b1282972
    (cherry picked from commit 404f16e97f1c2fcd8f9a1297bdfa46cba970467e)
    Reviewed-on: https://gerrit.libreoffice.org/11048
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 14cb5b3..392fdac 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2374,7 +2374,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
             pAnchorStck->AddAnchor(*pPaM->GetPoint(),pSFlyPara->pFlyFmt);
         }
 
-        // merke Pos im Haupttext
+        // remember Pos in body text
         pSFlyPara->pMainTextPos = new SwPosition( *pPaM->GetPoint() );
 
         //remove fltanchors, otherwise they will be closed inside the
@@ -2470,7 +2470,9 @@ void SwWW8ImplReader::StopApo()
 
         Color aBg(0xFE, 0xFF, 0xFF, 0xFF);  //Transparent by default
 
-        if (SwTxtNode* pNd = aPref.GetNode().GetTxtNode())
+        SwTxtNode* pNd = aPref.GetNode().GetTxtNode();
+        if (pNd && &pPaM->GetPoint()->nNode.GetNode()
+                        != &pSFlyPara->pMainTextPos->nNode.GetNode())
         {
             /*
             #i582#
commit fab8dff9eeaa9834416cffb3563690453096fdbc
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Mon Aug 18 22:22:22 2014 +0200

    fdo#82427 disambiguate "NOT LIKE 'foo'"
    
    Change-Id: Iab383639ea73cc87c03f4f42433bc9ccfcd988ef
    Reviewed-on: https://gerrit.libreoffice.org/11010
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 0a3772f..a750541 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -1126,8 +1126,8 @@ parenthesized_boolean_value_expression:
 	}
 	;
 boolean_factor:
-	    boolean_primary
-	|   SQL_TOKEN_NOT boolean_primary
+	    boolean_primary			%dprec 2
+	|   SQL_TOKEN_NOT boolean_primary	%dprec 1
 		{ // boolean_factor: rule 1
 		    $$ = SQL_NEW_RULE;
 		    $$->append($1);
commit 30ccfbf048ce51180d91b6a65951c25f09071d4e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 19 15:14:04 2014 +0100

    guard against division by 0
    
    valgrind + bff
    
    (cherry picked from commit 1ab0e8717bee9fee6c42015647bccfbf1683b8fc)
    
    Conflicts:
    	filter/source/graphicfilter/itiff/itiff.cxx
    
    Change-Id: I5fa40f7a9759c98bb70ee6eb854dd9b376401f89
    Reviewed-on: https://gerrit.libreoffice.org/11037
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index a921b53..aa80b09 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1332,29 +1332,34 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
                         bByteSwap = sal_True;
 
                     nStripsPerPlane = ( nImageLength - 1 ) / GetRowsPerStrip() + 1;
-                    nBytesPerRow = ( nImageWidth * nSamplesPerPixel / nPlanes * nBitsPerSample + 7 ) >> 3;
+                    bStatus = nPlanes != 0;
 
-                    for ( sal_uLong j = 0; j < 4; j++ )
+                    if (bStatus)
                     {
-                        try
-                        {
-                            pMap[ j ] = new sal_uInt8[ nBytesPerRow ];
-                        }
-                        catch (const std::bad_alloc &)
+                        nBytesPerRow = ( nImageWidth * nSamplesPerPixel / nPlanes * nBitsPerSample + 7 ) >> 3;
+
+                        for ( sal_uLong j = 0; j < 4; j++ )
                         {
-                            pMap[ j ] = NULL;
-                            bStatus = sal_False;
-                            break;
+                            try
+                            {
+                                pMap[ j ] = new sal_uInt8[ nBytesPerRow ];
+                            }
+                            catch (const std::bad_alloc &)
+                            {
+                                pMap[ j ] = NULL;
+                                bStatus = sal_False;
+                                break;
+                            }
                         }
                     }
 
-                    if (HasAlphaChannel())
+                    if (bStatus && HasAlphaChannel())
                     {
                         pAlphaMask = new AlphaMask( aTargetSize );
                         pMaskAcc = pAlphaMask->AcquireWriteAccess();
                     }
 
-                    if ( bStatus && ReadMap( 10, 60 ) )
+                    if (bStatus && ReadMap(10, 60))
                     {
                         nMaxPos = std::max( pTIFF->Tell(), nMaxPos );
                         MakePalCol();
commit 62123ec2c4a256a015a6059c6a7bc106ba3c96c9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 19 17:20:00 2014 +0100

    only subtract height of hscroll if visible
    
    otherwise infinite loop in extensions update check
    
    Change-Id: I0dbf4f34208f1bf0854e365006a79470b26571f3
    (cherry picked from commit 749f7548b4ee746d69c20a828ea6d3b853eba8d3)
    Reviewed-on: https://gerrit.libreoffice.org/11034
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 517fa33..06f387b 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1704,8 +1704,11 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation)
     // horz. ScrollBar
     if (GetStyle() & WB_AUTOHSCROLL)
     {
-        m_aHScroll.Show(nAvailWidth < aChildReq.Width());
-        nAvailHeight -= getLayoutRequisition(m_aHScroll).Height();
+        bool bShowHScroll = nAvailWidth < aChildReq.Width();
+        m_aHScroll.Show(bShowHScroll);
+
+        if (bShowHScroll)
+            nAvailHeight -= getLayoutRequisition(m_aHScroll).Height();
 
         if (GetStyle() & WB_AUTOVSCROLL)
             m_aVScroll.Show(nAvailHeight < aChildReq.Height());
commit 4f9c43d5cbff18e84b0726a37779e5f5af64c589
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 19 20:49:17 2014 +0100

    Resolves: fdo#82355 crash on loading ppt
    
    regression probably triggered by...
    
    commit 2e3c45afc6c5ea74f1f8b4a7dce806e537870546
    Date:   Fri Mar 4 07:38:16 2011 -0800
    Remove usage of deprecated List container.
    
    but that just stopped at the first NULL by chance
    
    Change-Id: I767e3bc3130d99cedceb4172857d1741c677b19b
    (cherry picked from commit f47baab6d35752b0babba768e299416ea5dd447d)
    Reviewed-on: https://gerrit.libreoffice.org/11029
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 0b9a552..2ab843a 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -208,9 +208,10 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
 
                 if (pSheet != pOldSheet)
                 {
-                    pObj->EndListening(*pOldSheet);
+                    if (pOldSheet)
+                        pObj->EndListening(*pOldSheet);
 
-                    if (!pObj->IsListening(*pSheet))
+                    if (pSheet && !pObj->IsListening(*pSheet))
                         pObj->StartListening(*pSheet);
                 }
 
commit a1b309787fc916f69a1315f042467f5ef748c7a7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Aug 9 17:23:07 2014 +0100

    valgrind + bff: Integer divide by zero
    
    (cherry picked from commit a1fab361cb3325b2d012942e43660f2c0a2a4b96)
    
    Conflicts:
    	filter/source/graphicfilter/itiff/itiff.cxx
    
    Change-Id: I4c47d17a421f1c6d2d6cc29c7b92ec930bdf901f
    Reviewed-on: https://gerrit.libreoffice.org/11022
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 71bad87..a921b53 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -178,6 +178,19 @@ public:
         delete pAlphaMask;
     }
 
+    sal_uLong GetRowsPerStrip() const
+    {
+        //Rows Per Strip:
+        //
+        //(TIFF format only) The number of rows of pixels per strip to use for
+        //encoding the TIFF image. A value greater than zero specifies the
+        //number of rows per strip. A value of 0 sets the rows per strip equal
+        //to the image length, resulting in a single strip. A value of -1 (the
+        //default) sets the rows per strip equal to infinity, resulting in a
+        //single strip.
+        return nRowsPerStrip == 0 ? nImageLength : nRowsPerStrip;
+    }
+
     sal_Bool ReadTIFF( SvStream & rTIFF, Graphic & rGraphic );
 };
 
@@ -547,10 +560,10 @@ sal_Bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
         {
             for ( np = 0; np < nPlanes; np++ )
             {
-                nStrip = ny / nRowsPerStrip + np * nStripsPerPlane;
+                nStrip = ny / GetRowsPerStrip() + np * nStripsPerPlane;
                 if ( nStrip >= nNumStripOffsets )
                     return sal_False;
-                pTIFF->Seek( pStripOffsets[ nStrip ] + ( ny % nRowsPerStrip ) * nStripBytesPerRow );
+                pTIFF->Seek( pStripOffsets[ nStrip ] + ( ny % GetRowsPerStrip() ) * nStripBytesPerRow );
                 pTIFF->Read( pMap[ np ], nBytesPerRow );
                 if ( pTIFF->GetError() )
                     return sal_False;
@@ -601,9 +614,9 @@ sal_Bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
         {
             for ( np = 0; np < nPlanes; np++ )
             {
-                if ( ny / nRowsPerStrip + np * nStripsPerPlane > nStrip )
+                if ( ny / GetRowsPerStrip() + np * nStripsPerPlane > nStrip )
                 {
-                    nStrip=ny/nRowsPerStrip+np*nStripsPerPlane;
+                    nStrip=ny/GetRowsPerStrip()+np*nStripsPerPlane;
                     if ( nStrip >= nNumStripOffsets )
                         return sal_False;
                     pTIFF->Seek( pStripOffsets[ nStrip ] );
@@ -632,9 +645,9 @@ sal_Bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
         {
             for ( np = 0; np < nPlanes; np++ )
             {
-                if ( ny / nRowsPerStrip + np * nStripsPerPlane > nStrip )
+                if ( ny / GetRowsPerStrip() + np * nStripsPerPlane > nStrip )
                 {
-                    nStrip = ny / nRowsPerStrip + np * nStripsPerPlane;
+                    nStrip = ny / GetRowsPerStrip() + np * nStripsPerPlane;
                     if ( nStrip >= nNumStripOffsets )
                         return sal_False;
                     pTIFF->Seek(pStripOffsets[nStrip]);
@@ -660,9 +673,9 @@ sal_Bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
         {
             for ( np = 0; np < nPlanes; np++ )
             {
-                if ( ny / nRowsPerStrip + np * nStripsPerPlane > nStrip )
+                if ( ny / GetRowsPerStrip() + np * nStripsPerPlane > nStrip )
                 {
-                    nStrip=ny/nRowsPerStrip+np*nStripsPerPlane;
+                    nStrip=ny/GetRowsPerStrip()+np*nStripsPerPlane;
                     if ( nStrip >= nNumStripOffsets )
                         return sal_False;
                     pTIFF->Seek(pStripOffsets[nStrip]);
@@ -1318,7 +1331,7 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
                     if ( ( nFillOrder == 2 ) && ( nCompression != 5 ) )     // in the LZW mode bits are already being inverted
                         bByteSwap = sal_True;
 
-                    nStripsPerPlane = ( nImageLength - 1 ) / nRowsPerStrip + 1;
+                    nStripsPerPlane = ( nImageLength - 1 ) / GetRowsPerStrip() + 1;
                     nBytesPerRow = ( nImageWidth * nSamplesPerPixel / nPlanes * nBitsPerSample + 7 ) >> 3;
 
                     for ( sal_uLong j = 0; j < 4; j++ )
commit ec9f786450a43e6a26be9db6efb48f6bbc645894
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Aug 15 13:25:22 2014 +0200

    configure: don't try to use Win32 make on release branch
    
    Change-Id: Icd8c1b45659ca323aef25a55803f5b1ce078b9d3
    Reviewed-on: https://gerrit.libreoffice.org/10932
    Reviewed-by: Thomas Arnhold <thomas at arnhold.org>
    Tested-by: Thomas Arnhold <thomas at arnhold.org>
    (cherry picked from commit 2087b54aab25ddbab5128af9f777b1686bc0ce5e)
    Reviewed-on: https://gerrit.libreoffice.org/10990
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/configure.ac b/configure.ac
index ac2dbd7..73bc86d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4847,8 +4847,18 @@ for a in "$MAKE" "$GNUMAKE" make gmake gnumake; do
     if test -n "$a"; then
         $a --version 2> /dev/null | grep GNU  2>&1 > /dev/null
         if test $? -eq 0;  then
-            GNUMAKE=`which $a`
-            break
+            if test "$build_os" = "cygwin"; then
+                if test -n "$($a -v | grep 'Built for Windows')" ; then
+                    AC_MSG_NOTICE([$a is a native Win32 make, which is not supported on this old branch.])
+                    unset GNUMAKE
+                else
+                    GNUMAKE=`which $a`
+                    break
+                fi
+            else
+                GNUMAKE=`which $a`
+                break
+            fi
         fi
     fi
 done
commit a92e307d877cc00a908e59b26e70d3a53481aed7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 19 16:14:23 2014 +0100

    facepalm: nAvailHeight is not derived from allocation Width
    
    Change-Id: Ic99c6519b02c546e0d3574cb756e3fb172d1ff52
    (cherry picked from commit 36490fff3f4d1b4a7e4b7902a866abb177a0bf54)
    Reviewed-on: https://gerrit.libreoffice.org/11024
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 8d8ab0d..517fa33 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1692,7 +1692,7 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation)
     if (pChild && pChild->IsVisible())
         aChildReq = getLayoutRequisition(*pChild);
 
-    long nAvailHeight = rAllocation.Width();
+    long nAvailHeight = rAllocation.Height();
     long nAvailWidth = rAllocation.Width();
     // vert. ScrollBar
     if (GetStyle() & WB_AUTOVSCROLL)
commit 5ee5be329897eab8d0c52882009eb5d820e872a4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 10 14:07:19 2014 +0100

    fix build, coverity#1209547 Unchecked dynamic_cast
    
    (cherry picked from commit f4c80aaf3f2b97661ecf1cfd014aaa5ad00da846)
    
    Change-Id: Ibf614156aeafcd74be444cf388e02a9273d38d5f
    Reviewed-on: https://gerrit.libreoffice.org/11019
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c731fe4..bee4ad2 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1050,7 +1050,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
     dmapper_logger->attribute("isTextAppend", xTextAppend.is());
 #endif
 
-    if(xTextAppend.is() && ! getTableManager( ).isIgnore() && pParaContext != NULL)
+    if (xTextAppend.is() && !getTableManager( ).isIgnore() && pParaContext != NULL)
     {
         try
         {
@@ -1185,14 +1185,17 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
     }
 
     m_bParaChanged = false;
-    if(!pParaContext->IsFrameMode())
+    if (!pParaContext || !pParaContext->IsFrameMode())
     { // If the paragraph is in a frame, it's not a paragraph of the section itself.
         m_bIsFirstParaInSection = false;
         m_bIsLastParaInSection = false;
     }
 
-    // Reset the frame properties for the next paragraph
-    pParaContext->ResetFrameProperties();
+    if (pParaContext)
+    {
+        // Reset the frame properties for the next paragraph
+        pParaContext->ResetFrameProperties();
+    }
 
 #ifdef DEBUG_DOMAINMAPPER
     dmapper_logger->endElement();
commit e39e74e10b5cddfa0cf5fa9b575d36e612d4765e
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Aug 18 16:28:32 2014 +0200

    detect * with no character following as invalid format code
    
    ... so adding it to the list in Format Numbers using the checkmark
    button is not possible.
    
    Change-Id: I57ca6a7a3617583a82a99c87291373b1fe4e246d
    (cherry picked from commit bf674ab0f3097ad122c727b4d86f004f8cce1f61)
    Reviewed-on: https://gerrit.libreoffice.org/10999
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 4165b9f..f03b17a 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -929,6 +929,11 @@ sal_Int32 ImpSvNumberformatScan::Symbol_Division(const OUString& rString)
             }
             else
             {
+                // Valid only if there is a character following, else we are
+                // at the end of a code that does not have a fill character
+                // (yet?).
+                if (sStrArray[nAnzStrings].getLength() < 2)
+                    return nPos;
                 bStar = true;
             }
         }
commit aaebe3af032122a16beb58ddd42ea4907b141529
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Aug 18 15:16:19 2014 -0400

    Let's not export sheet tab color when it's not set.
    
    COL_AUTO is the default value which is treated as color not being set.  The
    old code would export it as a white color which is not correct.
    
    Change-Id: Ib68fccfb228333f2059edc4cfffeed90880ebc60
    (cherry picked from commit 3104f95254530c76c3fc0c3b840254912c067ad8)
    Reviewed-on: https://gerrit.libreoffice.org/11005
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 847e61d..7d8ac31 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -471,8 +471,9 @@ void XclExpXmlSheetPr::SaveXml( XclExpXmlStream& rStrm )
 
     // OOXTODO: XML_outlinePr
 
-    rWorksheet->singleElement(
-        XML_tabColor, XML_rgb, XclXmlUtils::ToOString(maTabColor).getStr(), FSEND);
+    if (maTabColor != Color(COL_AUTO))
+        rWorksheet->singleElement(
+            XML_tabColor, XML_rgb, XclXmlUtils::ToOString(maTabColor).getStr(), FSEND);
 
     rWorksheet->singleElement(XML_pageSetUpPr,
             // OOXTODO: XML_autoPageBreaks,
commit 05798732d758e176a92ac07e7adff2321eb61f46
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Aug 18 14:09:20 2014 +0200

    prevent out-of-bounds string access
    
    ... while entering a   *   star symbol format code and there's no fill
    character following the * yet, for example  "xxx"*
    
    (cherry picked from commit 839cc63e7d1b78c56e04bafb46037e898ce2c455)
    
    more out-of-bounds string accesses
    
    (cherry picked from commit 349c93e0f5c9f231b2ff6854fcb795ca5881ca2d)
    
    Change-Id: I006f125ceefccba6a95ea033fd434d98e5d4f1c2
    Reviewed-on: https://gerrit.libreoffice.org/10995
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 5552c3a..c877951 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -110,9 +110,21 @@ void SvxNumberPreview::NotifyChange( const OUString& rPrevStr,
     mnPos = aPrevStr.indexOf( 0x1B );
     if ( mnPos != -1 )
     {
-        mnChar = aPrevStr[ mnPos + 1 ];
-        // delete placeholder and char to repeat
-        aPrevStr = aPrevStr.replaceAt( mnPos, 2, "" );
+        // Right during user input the star symbol is the very
+        // last character before the user enters another one.
+        if (mnPos < aPrevStr.getLength() - 1)
+        {
+            mnChar = aPrevStr[ mnPos + 1 ];
+            // delete placeholder and char to repeat
+            aPrevStr = aPrevStr.replaceAt( mnPos, 2, "" );
+        }
+        else
+        {
+            // delete placeholder
+            aPrevStr = aPrevStr.replaceAt( mnPos, 1, "" );
+            // do not attempt to draw a 0 fill character
+            mnPos = -1;
+        }
     }
     svtools::ColorConfig aColorConfig;
     Color aWindowTextColor( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 576da59..de6dffd 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2230,6 +2230,30 @@ short SvNumberformat::ImpCheckCondition(double& fNumber,
     }
 }
 
+static bool lcl_appendStarFillChar( OUStringBuffer& rBuf, const OUString& rStr )
+{
+    // Right during user input the star symbol is the very
+    // last character before the user enters another one.
+    if (rStr.getLength() > 1)
+    {
+        rBuf.append((sal_Unicode) 0x1B);
+        rBuf.append(rStr[1]);
+        return true;
+    }
+    return false;
+}
+
+static bool lcl_insertStarFillChar( OUStringBuffer& rBuf, sal_Int32 nPos, const OUString& rStr )
+{
+    if (rStr.getLength() > 1)
+    {
+        rBuf.insert( nPos, rStr[1]);
+        rBuf.insert( nPos, (sal_Unicode) 0x1B);
+        return true;
+    }
+    return false;
+}
+
 bool SvNumberformat::GetOutputString(const OUString& sString,
                                      OUString& OutString,
                                      Color** ppColor)
@@ -2262,9 +2286,7 @@ bool SvNumberformat::GetOutputString(const OUString& sString,
             case NF_SYMBOLTYPE_STAR:
                 if( bStarFlag )
                 {
-                    sOutBuff.append((sal_Unicode) 0x1B);
-                    sOutBuff.append(rInfo.sStrArray[i][1]);
-                    bRes = true;
+                    bRes = lcl_appendStarFillChar( sOutBuff, rInfo.sStrArray[i]);
                 }
                 break;
             case NF_SYMBOLTYPE_BLANK:
@@ -2577,9 +2599,7 @@ bool SvNumberformat::GetOutputString(double fNumber,
                 case NF_SYMBOLTYPE_STAR:
                     if( bStarFlag )
                     {
-                        sBuff.append((sal_Unicode) 0x1B);
-                        sBuff.append(rInfo.sStrArray[i][1]);
-                        bRes = true;
+                        bRes = lcl_appendStarFillChar( sBuff, rInfo.sStrArray[i]);
                     }
                     break;
                 case NF_SYMBOLTYPE_BLANK:
@@ -3203,9 +3223,7 @@ bool SvNumberformat::ImpGetTimeOutput(double fNumber,
         case NF_SYMBOLTYPE_STAR:
             if( bStarFlag )
             {
-                sBuff.append((sal_Unicode)0x1B);
-                sBuff.append(rInfo.sStrArray[i][1]);
-                bRes = true;
+                bRes = lcl_appendStarFillChar( sBuff, rInfo.sStrArray[i]);
             }
             break;
         case NF_SYMBOLTYPE_BLANK:
@@ -3701,9 +3719,7 @@ bool SvNumberformat::ImpGetDateOutput(double fNumber,
         case NF_SYMBOLTYPE_STAR:
             if( bStarFlag )
             {
-                sBuff.append((sal_Unicode) 0x1B);
-                sBuff.append(rInfo.sStrArray[i][1]);
-                bRes = true;
+                bRes = lcl_appendStarFillChar( sBuff, rInfo.sStrArray[i]);
             }
             break;
         case NF_SYMBOLTYPE_BLANK:
@@ -3996,9 +4012,7 @@ bool SvNumberformat::ImpGetDateTimeOutput(double fNumber,
         case NF_SYMBOLTYPE_STAR:
             if( bStarFlag )
             {
-                sBuff.append((sal_Unicode) 0x1B);
-                sBuff.append(rInfo.sStrArray[i][1]);
-                bRes = true;
+                bRes = lcl_appendStarFillChar( sBuff, rInfo.sStrArray[i]);
             }
             break;
         case NF_SYMBOLTYPE_BLANK:
@@ -4329,9 +4343,7 @@ bool SvNumberformat::ImpGetNumberOutput(double fNumber,
             case NF_SYMBOLTYPE_STAR:
                 if( bStarFlag )
                 {
-                    sStr.insert(k, rInfo.sStrArray[j][1]);
-                    sStr.insert(k, (sal_Unicode) 0x1B);
-                    bRes = true;
+                    bRes = lcl_insertStarFillChar( sStr, k, rInfo.sStrArray[j]);
                 }
                 break;
             case NF_SYMBOLTYPE_BLANK:
@@ -4464,9 +4476,7 @@ bool SvNumberformat::ImpNumberFillWithThousands( OUStringBuffer& sBuff,  // numb
         case NF_SYMBOLTYPE_STAR:
             if( bStarFlag )
             {
-                sBuff.insert(k, rInfo.sStrArray[j][1]);
-                sBuff.insert(k, (sal_Unicode) 0x1B);
-                bRes = true;
+                bRes = lcl_insertStarFillChar( sBuff, k, rInfo.sStrArray[j]);
             }
             break;
         case NF_SYMBOLTYPE_BLANK:
@@ -4640,9 +4650,7 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& sBuff, // number string
         case NF_SYMBOLTYPE_STAR:
             if( bStarFlag )
             {
-                sBuff.insert(k, rInfo.sStrArray[j][1]);
-                sBuff.insert(k, sal_Unicode(0x1B));
-                bRes = true;
+                bRes = lcl_insertStarFillChar( sBuff, k, rInfo.sStrArray[j]);
             }
             break;
         case NF_SYMBOLTYPE_BLANK:
commit 4704a686dcbada391db903fbb487a3fc5d60993e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Aug 17 22:32:52 2014 +0100

    check for empty m_aStates
    
    valgrind + bff
    
    Change-Id: Ib818d508e10877a845b733c4aa223d1e2cbbc05e
    (cherry picked from commit e2b9531e43d37677109aa13eb6e2ebf857961016)
    Reviewed-on: https://gerrit.libreoffice.org/10959
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/sf_edeb1eb341ad4c8608af9396952724a0-41170.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/sf_edeb1eb341ad4c8608af9396952724a0-41170.rtf
new file mode 100644
index 0000000..0925203
Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/pass/sf_edeb1eb341ad4c8608af9396952724a0-41170.rtf differ
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 9a711d8..ca34825 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -457,6 +457,10 @@ void RTFDocumentImpl::checkNeedPap()
     if (m_bNeedPap)
     {
         m_bNeedPap = false; // reset early, so we can avoid recursion when calling ourselves
+
+        if (m_aStates.empty())
+            return;
+
         if (!m_aStates.top().pCurrentBuffer)
         {
             writerfilter::Reference<Properties>::Pointer_t const pParagraphProperties(
commit 65f0172e2690930dc4c221784fe49185457fea83
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Aug 18 16:09:23 2014 +0200

    misplaced test from 5a454e5ed3f1: should be Linux only
    
    Change-Id: I32df6241f9b1259f1b563826a0d0b8e468ecf4bc
    Reviewed-on: https://gerrit.libreoffice.org/10997
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 1e99ab8..7b06c86 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -334,14 +334,14 @@ DECLARE_WW8IMPORT_TEST(testFdp80333, "fdo80333.doc")
     CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_NONE, aShadow.Location);
 }
 
-#endif
-
 DECLARE_WW8IMPORT_TEST(testBnc787942, "bnc787942.doc")
 {
     // The frame ended up on the second page instead of first.
     parseDump("/root/page[1]/body/txt[4]/anchored");
 }
 
+#endif
+
 
 CPPUNIT_PLUGIN_IMPLEMENT();
 
commit dc836e08af357eb2ac74a0c69f4fe7087f893a5f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 18 12:07:27 2014 +0100

    check len before memcpying into it
    
    valgrind + bff on sf_3e0068c9b19bb548826bed0599f65745-CrdWMI-minimized.gif
    
    Change-Id: I74cc21609f1c97a27e13615593f678cbbc8463e3
    (cherry picked from commit d4e64d030092984077021a9af9d281cd64c476bf)
    Reviewed-on: https://gerrit.libreoffice.org/10992
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 06e0bcc..db6cad7 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -816,6 +816,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
             (*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen;
             (*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))      >>= nType;
         }
+
         switch(nType)
         {
             case DataType::INTEGER:
@@ -892,6 +893,8 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
         else if ( DataType::INTEGER == nType )
         {
             sal_Int32 nValue = 0;
+            if (static_cast<size_t>(nLen) > sizeof(nValue))
+                return false;
             memcpy(&nValue, pData, nLen);
             *(_rRow->get())[i] = nValue;
         }
@@ -901,6 +904,8 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
             if (getBOOL((*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency is treated separately
             {
                 sal_Int64 nValue = 0;
+                if (static_cast<size_t>(nLen) > sizeof(nValue))
+                    return false;
                 memcpy(&nValue, pData, nLen);
 
                 if ( m_aScales[i-1] )
@@ -910,6 +915,8 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
             }
             else
             {
+                if (static_cast<size_t>(nLen) > sizeof(d))
+                    return false;
                 memcpy(&d, pData, nLen);
             }
 
@@ -1881,6 +1888,8 @@ sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,
                 case DataType::INTEGER:
                     {
                         sal_Int32 nValue = thisColVal;
+                        if (static_cast<size_t>(nLen) > sizeof(nValue))
+                            return false;
                         memcpy(pData,&nValue,nLen);
                     }
                     break;
@@ -1896,10 +1905,16 @@ sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,
                                 nValue = (sal_Int64)(d * pow(10.0,(int)m_aScales[i]));
                             else
                                 nValue = (sal_Int64)(d);
+                            if (static_cast<size_t>(nLen) > sizeof(nValue))
+                                return false;
                             memcpy(pData,&nValue,nLen);
                         } // if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency is treated separately
                         else
+                        {
+                            if (static_cast<size_t>(nLen) > sizeof(d))
+                                return false;
                             memcpy(pData,&d,nLen);
+                        }
                     }
                     break;
                 case DataType::DECIMAL:
commit d00cbe4e2175c03b5b63e7822c6c43ae27f93259
Author: Luboš Luňák <l.lunak at collabora.com>
Date:   Sun Aug 17 18:12:16 2014 +0200

    fix reading a .doc that has frame anchored to the end of page (bnc#787942)
    
    MSWord, unlike Writer, can anchor even to a page break (i.e. after the last
    paragraph). When this document was read, what happended was:
    - the last paragraph was read and the current position PaM was set to point
      after it
    - frame was read and anchored to the PaM
    - page break was read, making everything following be moved to the next page;
      including whatever ended up at the PaM position
    Handle this by checking for this case and inserting an extra empty paragraph
    before the break. This shouldn't affect layout of the page itself anyway,
    since the break should leave room for it (and MSWord shows a page break
    there if control characters are enabled, so there is room).
    
    Change-Id: Ia2a13bf5cf1c959b5aa228254365019a00a22679
    (cherry picked from commit 4a1888a97eab4ead2e0bec76cd1cba410a8e7e13)
    Reviewed-on: https://gerrit.libreoffice.org/10952
    Reviewed-by: Matúš Kukan <matus.kukan at collabora.com>
    Tested-by: Matúš Kukan <matus.kukan at collabora.com>

diff --git a/sw/qa/extras/ww8import/data/bnc787942.doc b/sw/qa/extras/ww8import/data/bnc787942.doc
new file mode 100644
index 0000000..06b2c39
Binary files /dev/null and b/sw/qa/extras/ww8import/data/bnc787942.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 6a48abf..1e99ab8 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -336,6 +336,13 @@ DECLARE_WW8IMPORT_TEST(testFdp80333, "fdo80333.doc")
 
 #endif
 
+DECLARE_WW8IMPORT_TEST(testBnc787942, "bnc787942.doc")
+{
+    // The frame ended up on the second page instead of first.
+    parseDump("/root/page[1]/body/txt[4]/anchored");
+}
+
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 9434c2e..696d103 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1351,6 +1351,8 @@ private:
     // a document position recorded the after-position of TOC section, managed by Read_F_TOX() and End_Field()
     SwPaM* mpPosAfterTOC;
 
+    boost::scoped_ptr< SwPosition > lastAnchorPos;
+
     bool mbCareFirstParaEndInToc;
     bool mbCareLastParaEndInToc;
     cp_set maTOXEndCps;
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 0324552..14cb5b3 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -800,6 +800,18 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
     if (!pSep)
         return;
 
+    if (!maSegments.empty() && mrReader.lastAnchorPos.get() && *mrReader.lastAnchorPos == *mrReader.pPaM->GetPoint())
+    {
+        bool insert = true;
+        SwPaM pam( *mrReader.lastAnchorPos );
+        if( pam.Move(fnMoveBackward, fnGoNode))
+            if( SwTxtNode* txtNode = pam.GetPoint()->nNode.GetNode().GetTxtNode())
+                if( txtNode->Len() == 0 )
+                    insert = false;
+        if( insert )
+            mrReader.AppendTxtNode(*mrReader.pPaM->GetPoint());
+    }
+
     ww::WordVersion eVer = mrReader.GetFib().GetFIBVersion();
 
     // M.M. Create a linked section if the WkbPLCF
@@ -1739,7 +1751,6 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
                             const sal_Int32 nIniFlyDx,
                             const sal_Int32 nIniFlyDy )
 {
-    (void) rPaM;
     (void) nPgLeft;
 
     memset( this, 0, sizeof( WW8SwFlyPara ) );  // Initialisieren
@@ -1807,6 +1818,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
     //#i53725# - absolute positioned objects have to be
     // anchored at-paragraph to assure its correct anchor position.
     eAnchor = FLY_AT_PARA;
+    rIo.lastAnchorPos.reset( new SwPosition(*rPaM.GetPoint()));
 
     switch (nYBind)
     {
commit 0ffc9157ada9c82f0dea3b047fb67548a997aaa7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Aug 17 16:14:16 2014 +0100

    check that AddToTable can be done validly
    
    Change-Id: I0ee69279e3bb1d9871feba17b908b8307f0ec5b4
    (cherry picked from commit 43b39d3e47ffd179071732c0a8fc201c31b2bb46)
    Reviewed-on: https://gerrit.libreoffice.org/10950
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/vcl/source/filter/igif/decode.cxx b/vcl/source/filter/igif/decode.cxx
index 5900b4c..1418c3a 100644
--- a/vcl/source/filter/igif/decode.cxx
+++ b/vcl/source/filter/igif/decode.cxx
@@ -49,12 +49,14 @@ GIFLZWDecompressor::GIFLZWDecompressor( sal_uInt8 cDataSize ) :
 
     pTable = new GIFLZWTableEntry[ 4098 ];
 
-    for( sal_uInt16 i = 0; i < nTableSize; i++ )
+    for (sal_uInt16 i = 0; i < nTableSize; ++i)
     {
         pTable[i].pPrev = NULL;
         pTable[i].pFirst = pTable + i;
         pTable[i].nData = (sal_uInt8) i;
     }
+
+    memset(pTable + nTableSize, 0, sizeof(GIFLZWTableEntry) * (4098 - nTableSize));
 }
 
 // ------------------------------------------------------------------------
@@ -111,9 +113,7 @@ HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, sal_uInt8 cBufSize,
     return pTarget;
 }
 
-// ------------------------------------------------------------------------
-
-void GIFLZWDecompressor::AddToTable( sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData )
+bool GIFLZWDecompressor::AddToTable( sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData )
 {
     GIFLZWTableEntry* pE;
 
@@ -122,12 +122,16 @@ void GIFLZWDecompressor::AddToTable( sal_uInt16 nPrevCode, sal_uInt16 nCodeFirst
         pE = pTable + nTableSize;
         pE->pPrev = pTable + nPrevCode;
         pE->pFirst = pE->pPrev->pFirst;
-        pE->nData = pTable[ nCodeFirstData ].pFirst->nData;
+        GIFLZWTableEntry *pEntry = pTable[nCodeFirstData].pFirst;
+        if (!pEntry)
+            return false;
+        pE->nData = pEntry->nData;
         nTableSize++;
 
         if ( ( nTableSize == (sal_uInt16) (1 << nCodeSize) ) && ( nTableSize < 4096 ) )
             nCodeSize++;
     }
+    return true;
 }
 
 // ------------------------------------------------------------------------
@@ -161,17 +165,23 @@ bool GIFLZWDecompressor::ProcessOneCode()
 
         if ( nCode < nClearCode )
         {
+            bool bOk = true;
             if ( nOldCode != 0xffff )
-                AddToTable( nOldCode, nCode );
+                bOk = AddToTable(nOldCode, nCode);
+            if (!bOk)
+                return false;
         }
         else if ( ( nCode > nEOICode ) && ( nCode <= nTableSize ) )
         {
             if ( nOldCode != 0xffff )
             {
+                bool bOk;
                 if ( nCode == nTableSize )
-                    AddToTable( nOldCode, nOldCode );
+                    bOk = AddToTable( nOldCode, nOldCode );
                 else
-                    AddToTable( nOldCode, nCode );
+                    bOk = AddToTable( nOldCode, nCode );
+                if (!bOk)
+                    return false;
             }
         }
         else
diff --git a/vcl/source/filter/igif/decode.hxx b/vcl/source/filter/igif/decode.hxx
index 3e1a783..737a495 100644
--- a/vcl/source/filter/igif/decode.hxx
+++ b/vcl/source/filter/igif/decode.hxx
@@ -43,7 +43,7 @@ class GIFLZWDecompressor
     sal_uInt8               nBlockBufSize;
     sal_uInt8               nBlockBufPos;
 
-    void                AddToTable(sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData);
+    bool                AddToTable(sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData);
     bool                ProcessOneCode();
 
 
commit 96e70f53b10117b14d3f180c847653c99330c8a4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Aug 17 19:21:52 2014 +0100

    check TRG_HasMasterPage before TRG_GetMasterPage
    
    bff + valgrind
    
    Change-Id: Ie08ddfe06dc0850cf44955cc9f9079b3856b19e3
    (cherry picked from commit fad62d928a4b4cd3aa96e16d7ab8f8db0331b8c0)
    Reviewed-on: https://gerrit.libreoffice.org/10954
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index da9428c..b8aa216 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2409,7 +2409,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
                             }
                             pPresObj->SetMergedItemSet(aSet);
 
-                            if ( ( eAktPageKind != PPT_NOTEPAGE ) && ( nPlacementId != 0xffffffff ) )
+                            if ((eAktPageKind != PPT_NOTEPAGE) && (nPlacementId != 0xffffffff) && pPage->TRG_HasMasterPage())
                             {
                                 SdrObject* pTitleObj = ((SdPage&)pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_TITLE );
                                 SdrObject* pOutlineObj = ((SdPage&)pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_OUTLINE );
commit b8e216ec3737e9b0fc030cad83a31e98c4300399
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 12 12:06:49 2014 +0100

    Resolves: fdo#81046 don't crash on compilers that enforce exception specs
    
    bit of a hammer here, the offending property is "IsSplitAllowed" if someone
    wants to attempt a more subtle fix
    
    (cherry picked from commit b59931d8a62f761022929f58f27d7ba22536b570)
    
    Change-Id: I37ed623a9947473fcb5c9e2b987d7a3dd9147ffa
    Signed-off-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index f8867d9..e066325 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2136,12 +2136,20 @@ lcl_ApplyCellProperties(
                 xCellCurs->gotoEnd( sal_True );
                 const uno::Reference< beans::XPropertyState >
                     xCellTextPropState(xCellCurs, uno::UNO_QUERY);
-                const beans::PropertyState state = xCellTextPropState->getPropertyState(rName);
-                if (state == beans::PropertyState_DEFAULT_VALUE)
+                try
                 {
-                    const uno::Reference< beans::XPropertySet >
-                        xCellTextProps(xCellCurs, uno::UNO_QUERY);
-                    xCellTextProps->setPropertyValue(rName, rValue);
+                    const beans::PropertyState state = xCellTextPropState->getPropertyState(rName);
+                    if (state == beans::PropertyState_DEFAULT_VALUE)
+                    {
+                        const uno::Reference< beans::XPropertySet >
+                            xCellTextProps(xCellCurs, uno::UNO_QUERY);
+                        xCellTextProps->setPropertyValue(rName, rValue);
+                    }
+                }
+                catch (const uno::Exception& e)
+                {
+                    SAL_WARN( "sw.uno", "Exception when getting PropertyState: "
+                        + rName + ". Message: " + e.Message );
                 }
             }
         }
commit de593264eb825d1d8eaebe65ce8a61f91692518e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Aug 12 21:43:45 2014 +0200

    fdo#39477: Mac Keyboard shortcut Option key ko in Customize dialog
    
    (+ fdo#49280)
    I couldn't cherry-pick directly since the arbo is different between 4.2 and 4.3+
    Indeed vcl/aqua is now vcl/osx
    
    Change-Id: I45a834c5ec1e4c4c5c4fd6960b48963df5656a7e
    Reviewed-on: https://gerrit.libreoffice.org/10898
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 8a73b6c..9e64668 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -1110,7 +1110,7 @@ OUString AquaSalFrame::GetKeyName( sal_uInt16 nKeyCode )
         // we do not really handle Alt (see below)
         // we map it to MOD3, whichis actually Command
         if( (nKeyCode & (KEY_MOD2|KEY_MOD3)) != 0 )
-            aResult.append( sal_Unicode( 0x2303 ) );
+            aResult.append( sal_Unicode( 0x2325 ) );
 
         aResult.append( it->second );
     }
commit 32e8b39c952e2bb7caec79a593e9d8ca5921a388
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Aug 12 17:47:20 2014 +0200

    fdo#82165: ODF import: clear all shapes when removing header content
    
    Shapes anchored to the first or last paragraph survive setString("")
    so need to be deleted with some ruse.
    
    (regression from b8499fc3dcf474050f026b8d5cd1d9037bbe42b7)
    
    Change-Id: I00a8132583c45d1953c207932cc7f02f3065ae77
    (cherry picked from commit 555c988f3b896e16afc7bdd1bd98e48229599637)
    Reviewed-on: https://gerrit.libreoffice.org/10895
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sw/qa/extras/odfimport/data/fdo82165.odt b/sw/qa/extras/odfimport/data/fdo82165.odt
new file mode 100644
index 0000000..65a4084
Binary files /dev/null and b/sw/qa/extras/odfimport/data/fdo82165.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 879513b..e7fa8fb 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -344,6 +344,16 @@ DECLARE_ODFIMPORT_TEST(testFdo68839, "fdo68839.odt")
             getProperty<OUString>(xFrame2, "ChainNextName"));
 }
 
+DECLARE_ODFIMPORT_TEST(testFdo82165, "fdo82165.odt")
+{
+    // there was a duplicate shape in the left header
+    lcl_CheckShape(getShape(1), "Picture 9");
+    try {
+        uno::Reference<drawing::XShape> xShape = getShape(2);
+        CPPUNIT_FAIL("IndexOutOfBoundsException expected");
+    } catch (lang::IndexOutOfBoundsException const&) { }
+}
+
 DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt")
 {
     SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index 2a711b0..27cbc9c 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XParagraphAppend.hpp>
 #include <com/sun/star/text/XRelativeTextContentRemove.hpp>
 #include <xmloff/nmspmap.hxx>
 #include <xmloff/xmlnmspe.hxx>
@@ -158,8 +159,16 @@ SvXMLImportContext *XMLTextHeaderFooterContext::CreateChildContext(
 
             if( bRemoveContent )
             {
-                OUString aText;
-                xText->setString( aText );
+                xText->setString(OUString());
+                // fdo#82165 shapes anchored at the beginning or end survive
+                // setString("") - kill them the hard way: SwDoc::DelFullPara()
+                uno::Reference<text::XParagraphAppend> const xAppend(
+                        xText, uno::UNO_QUERY_THROW);
+                uno::Reference<lang::XComponent> const xPara(
+                    xAppend->finishParagraph(
+                        uno::Sequence<beans::PropertyValue>()),
+                    uno::UNO_QUERY_THROW);
+                xPara->dispose();
             }
 
             UniReference < XMLTextImportHelper > xTxtImport =
commit cc28a7cb04f91f5270aa888ee4d75a69791ce2c7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 13 09:12:26 2014 +0100

    valgrind + bff: don't add 0xffff oldcode
    
    Invalid read of size 1
       at 0x9DC6247: GIFLZWDecompressor::AddToTable(unsigned short, unsigned short) (decode.cxx:117)
    
    Change-Id: I9cea8dcd4a5eeaa1e793b9be96f82854b9d088af
    Reviewed-on: https://gerrit.libreoffice.org/10906
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/vcl/qa/cppunit/graphicfilter/data/gif/pass/sf_3e0068c9b19bb548826bed0599f65745-15940-minimized.gif b/vcl/qa/cppunit/graphicfilter/data/gif/pass/sf_3e0068c9b19bb548826bed0599f65745-15940-minimized.gif
new file mode 100644
index 0000000..47f5d43
Binary files /dev/null and b/vcl/qa/cppunit/graphicfilter/data/gif/pass/sf_3e0068c9b19bb548826bed0599f65745-15940-minimized.gif differ
diff --git a/vcl/source/filter/igif/decode.cxx b/vcl/source/filter/igif/decode.cxx
index bf29328..5900b4c 100644
--- a/vcl/source/filter/igif/decode.cxx
+++ b/vcl/source/filter/igif/decode.cxx
@@ -166,10 +166,13 @@ bool GIFLZWDecompressor::ProcessOneCode()
         }
         else if ( ( nCode > nEOICode ) && ( nCode <= nTableSize ) )
         {
-            if ( nCode == nTableSize )
-                AddToTable( nOldCode, nOldCode );
-            else
-                AddToTable( nOldCode, nCode );
+            if ( nOldCode != 0xffff )
+            {
+                if ( nCode == nTableSize )
+                    AddToTable( nOldCode, nOldCode );
+                else
+                    AddToTable( nOldCode, nCode );
+            }
         }
         else
         {
commit b318c70bc88a467cc72dba0079f1d872cf9e240f
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue Aug 12 21:24:17 2014 -0400

    bnc#822170: Let's not even try to export invalid chart objects.
    
    If we do, at best, Excel will complain about the document needing
    repair.  At worst Excel will skip some of the other valid drawing
    objects from being loaded.
    
    (cherry picked from commit 692878e3bb83c0fc104c5cca946c25ccf2d84ab2)
    
    Conflicts:
    	sc/source/filter/xcl97/xcl97rec.cxx
    	sc/source/filter/excel/xeescher.cxx
    
    Change-Id: If3794d0ae9d8b44b124020bb12b5369dfebc95ae
    Reviewed-on: https://gerrit.libreoffice.org/10900
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 241182c..bb3a2a5 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1207,7 +1207,10 @@ void XclExpChartObj::WriteShapeTransformation( sax_fastparser::FSHelperPtr pFS,
     pFS->endElementNS( XML_xdr, XML_xfrm );
 }
 
-// ============================================================================
+const css::uno::Reference<css::chart::XChartDocument>& XclExpChartObj::GetChartDoc() const
+{
+    return mxChartDoc;
+}
 
 XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
         const ScPostIt* pScNote, const OUString& rAddText ) :
diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx
index 4d7be77..cce4c66 100644
--- a/sc/source/filter/inc/xeescher.hxx
+++ b/sc/source/filter/inc/xeescher.hxx
@@ -324,6 +324,8 @@ public:
     virtual void        WriteChartObj( sax_fastparser::FSHelperPtr pDrawing, XclExpXmlStream& rStrm );
     void WriteShapeTransformation( sax_fastparser::FSHelperPtr pFS, const XShapeRef& rXShape, sal_Bool bFlipH = false, sal_Bool bFlipV = false, sal_Int32 nRotation = 0 );
 
+    const css::uno::Reference<css::chart::XChartDocument>& GetChartDoc() const;
+
 private:
     typedef boost::shared_ptr< XclExpChart > XclExpChartRef;
     XclExpChartRef      mxChart;        /// The chart itself (BOF/EOF substream data).
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index d61383a..24624cb 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -71,6 +71,8 @@
 #include <com/sun/star/sheet/XCellAddressable.hpp>
 #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
 #include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
+#include <com/sun/star/chart2/XChartTypeContainer.hpp>
 #include <oox/token/tokens.hxx>
 #include <oox/export/shapes.hxx>
 #include <oox/export/utils.hxx>
@@ -162,6 +164,8 @@ void XclExpObjList::Save( XclExpStream& rStrm )
         pSolverContainer->Save( rStrm );
 }
 
+namespace {
+
 static bool IsVmlObject( const XclObj *rObj )
 {
     switch( rObj->GetObjType() )
@@ -186,11 +190,61 @@ static sal_Int32 GetVmlObjectCount( XclExpObjList& rList )
     return nNumVml;
 }
 
+bool IsValidObject( const XclObj& rObj )
+{
+    if (rObj.GetObjType() == EXC_OBJTYPE_CHART)
+    {
+        // Chart object.  Make sure it's a valid chart object.  We skip
+        // invalid chart objects from exporting to prevent Excel from
+        // complaining on load.
+
+        const XclExpChartObj& rChartObj = static_cast<const XclExpChartObj&>(rObj);
+        uno::Reference<chart2::XChartDocument> xChartDoc(rChartObj.GetChartDoc(), uno::UNO_QUERY);
+        if (!xChartDoc.is())
+            return false;
+
+        uno::Reference<chart2::XDiagram> xDiagram = xChartDoc->getFirstDiagram();
+        if (!xDiagram.is())
+            return false;
+
+        uno::Reference<chart2::XCoordinateSystemContainer> xCooSysContainer(xDiagram, uno::UNO_QUERY);
+        if (!xCooSysContainer.is())
+            return false;
+
+        uno::Sequence<uno::Reference<chart2::XCoordinateSystem> > xCooSysSeq = xCooSysContainer->getCoordinateSystems();
+        if (!xCooSysSeq.getLength())
+            return false;
+
+        for (sal_Int32 nCooSys = 0; nCooSys < xCooSysSeq.getLength(); ++nCooSys)
+        {
+            Reference<chart2::XChartTypeContainer> xChartTypeCont(xCooSysSeq[nCooSys], uno::UNO_QUERY);
+            if (!xChartTypeCont.is())
+                return false;
+
+            uno::Sequence<uno::Reference<chart2::XChartType> > xChartTypeSeq = xChartTypeCont->getChartTypes();
+            if (!xChartTypeSeq.getLength())
+                // No chart type.  Not good.
+                return false;
+        }
+    }
+
+    return true;
+}
 
 static void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int32& nDrawingMLCount )
 {
-    sal_Int32 nVmlObjects = GetVmlObjectCount( rList );
-    if( (rList.size() - nVmlObjects) == 0 )
+    std::vector<XclObj*> aList;
+    aList.reserve(rList.size());
+    std::vector<XclObj*>::iterator it = rList.begin(), itEnd = rList.end();
+    for (; it != itEnd; ++it)
+    {
+        if (IsVmlObject(*it) || !IsValidObject(**it))
+            continue;
+
+        aList.push_back(*it);
+    }
+
+    if (aList.empty())
         return;
 
     sal_Int32 nDrawing = ++nDrawingMLCount;
@@ -214,13 +268,8 @@ static void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm,
             FSNS( XML_xmlns, XML_r ),   "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
             FSEND );
 
-    std::vector<XclObj*>::iterator pIter;
-    for ( pIter = rList.begin(); pIter != rList.end(); ++pIter )
-    {
-        if( IsVmlObject( *pIter ) )
-            continue;
-        (*pIter)->SaveXml( rStrm );
-    }
+    for (it = aList.begin(), itEnd = aList.end(); it != itEnd; ++it)
+        (*it)->SaveXml(rStrm);
 
     pDrawing->endElement( FSNS( XML_xdr, XML_wsDr ) );
 
@@ -267,6 +316,7 @@ static void SaveVmlObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_In
     rStrm.PopStream();
 }
 
+}
 
 void XclExpObjList::SaveXml( XclExpXmlStream& rStrm )
 {
commit 4119f3aef36bf1097638ed372f31bdfab281f63c
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Jul 30 11:02:31 2014 -0400

    fdo#80501: Ensure that we notify each listener only once.
    
    Change-Id: If2ce4643ff58c7c2ba326d749698dd5196a108dc
    (cherry picked from commit b2ee0235e88dc4da715b5766295ed88f27974fbd)
    Reviewed-on: https://gerrit.libreoffice.org/10647
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 8962422..66cd524 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -478,7 +478,6 @@ public:
     void        StartNeededListeners(); // only for cells where NeedsListening()==true
     void        SetDirtyIfPostponed();
     void BroadcastRecalcOnRefMove();
-    void BroadcastRefMoved( const sc::RefMovedHint& rHint );
     void TransferListeners( ScColumn& rDestCol, SCROW nRow1, SCROW nRow2, SCROW nRowDelta );
     void CollectListeners( std::vector<SvtListener*>& rListeners, SCROW nRow1, SCROW nRow2 );
 
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index ab35400..bd27926 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -927,10 +927,7 @@ public:
      */
     void BroadcastRecalcOnRefMove();
 
-    /**
-     * Broadcast all listeners of specified range that the range have moved.
-     */
-    void BroadcastRefMoved( const sc::RefMovedHint& rHint );
+    void CollectListeners( std::vector<SvtListener*>& rListeners, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
 
     void TransferListeners(
         ScTable& rDestTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 2d0a018..10da725 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -3119,33 +3119,6 @@ void ScColumn::BroadcastRecalcOnRefMove()
 
 namespace {
 
-class BroadcastRefMovedHandler
-{
-    const sc::RefMovedHint& mrHint;
-public:
-    BroadcastRefMovedHandler( const sc::RefMovedHint& rHint ) : mrHint(rHint) {}
-
-    void operator() ( size_t, SvtBroadcaster* p )
-    {
-        p->Broadcast(mrHint);
-    }
-};
-
-}
-
-void ScColumn::BroadcastRefMoved( const sc::RefMovedHint& rHint )
-{
-    const ScRange& rRange = rHint.getRange();
-    SCROW nRow1 = rRange.aStart.Row();
-    SCROW nRow2 = rRange.aEnd.Row();
-
-    // Notify all listeners within specified rows.
-    BroadcastRefMovedHandler aFunc(rHint);
-    sc::ProcessBroadcaster(maBroadcasters.begin(), maBroadcasters, nRow1, nRow2, aFunc);
-}
-
-namespace {
-
 class TransferListenersHandler
 {
 public:
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index bf3b817..d1aacdd 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -533,6 +533,9 @@ public:
 
 void ScColumn::CollectListeners( std::vector<SvtListener*>& rListeners, SCROW nRow1, SCROW nRow2 )
 {
+    if (nRow2 < nRow1 || !ValidRow(nRow1) || !ValidRow(nRow2))
+        return;
+
     ListenerCollector aFunc(rListeners);
     sc::ProcessBroadcaster(maBroadcasters.begin(), maBroadcasters, nRow1, nRow2, aFunc);
 }
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 02a75fb..a960c5a 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -130,6 +130,22 @@ void ScDocument::BroadcastCells( const ScRange& rRange, sal_uLong nHint )
     BroadcastUno(SfxSimpleHint(SC_HINT_DATACHANGED));
 }
 
+namespace {
+
+class RefMovedNotifier : std::unary_function<SvtListener*, void>
+{
+    const sc::RefMovedHint& mrHint;
+public:
+    RefMovedNotifier( const sc::RefMovedHint& rHint ) : mrHint(rHint) {}
+
+    void operator() ( SvtListener* p )
+    {
+        p->Notify(mrHint);
+    }
+};
+
+}
+
 void ScDocument::BroadcastRefMoved( const sc::RefMovedHint& rHint )
 {
     if (!pBASM)
@@ -150,6 +166,28 @@ void ScDocument::BroadcastRefMoved( const sc::RefMovedHint& rHint )
         }
     }
 
+    // Collect all listeners listening into the range.
+    std::vector<SvtListener*> aListeners;
+    for (SCTAB nTab = rSrcRange.aStart.Tab(); nTab <= rSrcRange.aEnd.Tab(); ++nTab)
+    {
+        ScTable* pTab = FetchTable(nTab);
+        if (!pTab)
+            continue;
+
+        pTab->CollectListeners(
+            aListeners,
+            rSrcRange.aStart.Col(), rSrcRange.aStart.Row(),
+            rSrcRange.aEnd.Col(), rSrcRange.aEnd.Row());
+    }
+
+    // Remove any duplicate listener entries.  We must ensure that we notify
+    // each unique listener only once.
+    std::sort(aListeners.begin(), aListeners.end());
+    aListeners.erase(std::unique(aListeners.begin(), aListeners.end()), aListeners.end());
+
+    // Notify the listeners.
+    std::for_each(aListeners.begin(), aListeners.end(), RefMovedNotifier(rHint));
+
     for (SCTAB nTab = rSrcRange.aStart.Tab(); nTab <= rSrcRange.aEnd.Tab(); ++nTab)
     {
         ScTable* pTab = FetchTable(nTab);
@@ -161,8 +199,6 @@ void ScDocument::BroadcastRefMoved( const sc::RefMovedHint& rHint )
         if (!pDestTab)
             continue;
 
-        // Adjust the references.
-        pTab->BroadcastRefMoved(rHint);
         // Move the listeners from the old location to the new.
         pTab->TransferListeners(
             *pDestTab, rSrcRange.aStart.Col(), rSrcRange.aStart.Row(),
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 5986a8e..56a2768 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1739,13 +1739,6 @@ void ScTable::BroadcastRecalcOnRefMove()
         aCol[i].BroadcastRecalcOnRefMove();
 }
 
-void ScTable::BroadcastRefMoved( const sc::RefMovedHint& rHint )
-{
-    const ScRange& rRange = rHint.getRange();
-    for (SCCOL nCol = rRange.aStart.Col(); nCol <= rRange.aEnd.Col(); ++nCol)
-        aCol[nCol].BroadcastRefMoved(rHint);
-}
-
 void ScTable::TransferListeners(
     ScTable& rDestTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
     SCCOL nColDelta, SCROW nRowDelta )
diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx
index 1ede729..ff976a2 100644
--- a/sc/source/core/data/table7.cxx
+++ b/sc/source/core/data/table7.cxx
@@ -110,4 +110,14 @@ void ScTable::RegroupFormulaCells( SCCOL nCol )
     aCol[nCol].RegroupFormulaCells();
 }
 
+void ScTable::CollectListeners(
+    std::vector<SvtListener*>& rListeners, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
+{
+    if (nCol2 < nCol1 || !ValidCol(nCol1) || !ValidCol(nCol2))
+        return;
+
+    for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
+        aCol[nCol].CollectListeners(rListeners, nRow1, nRow2);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 22a2efe047b790deee3dc9759c0355accd2bbc4f
Author: Armin Le Grand <alg at apache.org>
Date:   Thu Aug 7 09:59:26 2014 +0000

    Resolves: #i125386# secured user request and changed some bools to bitfield
    
    (cherry picked from commit 5e3cbe056c19bea5018dbf1fd4b2bc8f8b030ff3)
    
    Conflicts:
    	comphelper/inc/comphelper/embeddedobjectcontainer.hxx
    	comphelper/source/container/embeddedobjectcontainer.cxx
    	sfx2/source/appl/linkmgr2.cxx
    	svtools/source/misc/embedhlp.cxx
    
    (cherry picked from commit d005acae3aa315921f2c331612131626c470bd22)
    
    Conflicts:
    	include/comphelper/embeddedobjectcontainer.hxx
    
    Change-Id: I7e9b20a87ca6afe8cb91c577860a6c6b72368ee9
    Reviewed-on: https://gerrit.libreoffice.org/10882
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index c3b4338..4fef6c0 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -85,7 +85,10 @@ struct EmbedImpl
     uno::WeakReference < uno::XInterface > m_xModel;
     //EmbeddedObjectContainerNameMap maTempObjectContainer;
     //uno::Reference < embed::XStorage > mxTempStorage;
-    bool bOwnsStorage;
+
+    /// bitfield
+    bool mbOwnsStorage : 1;
+    bool mbUserAllowsLinkUpdate : 1;
 
     const uno::Reference < embed::XStorage >& GetReplacements();
 };
@@ -116,7 +119,8 @@ EmbeddedObjectContainer::EmbeddedObjectContainer()
 {
     pImpl = new EmbedImpl;
     pImpl->mxStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
-    pImpl->bOwnsStorage = true;
+    pImpl->mbOwnsStorage = true;
+    pImpl->mbUserAllowsLinkUpdate = true;
     pImpl->mpTempObjectContainer = 0;
 }
 
@@ -124,7 +128,8 @@ EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::
 {
     pImpl = new EmbedImpl;
     pImpl->mxStorage = rStor;
-    pImpl->bOwnsStorage = false;
+    pImpl->mbOwnsStorage = false;
+    pImpl->mbUserAllowsLinkUpdate = true;
     pImpl->mpTempObjectContainer = 0;
 }
 
@@ -132,7 +137,8 @@ EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::
 {
     pImpl = new EmbedImpl;
     pImpl->mxStorage = rStor;
-    pImpl->bOwnsStorage = false;
+    pImpl->mbOwnsStorage = false;
+    pImpl->mbUserAllowsLinkUpdate = true;
     pImpl->mpTempObjectContainer = 0;
     pImpl->m_xModel = xModel;
 }
@@ -141,11 +147,11 @@ void EmbeddedObjectContainer::SwitchPersistence( const uno::Reference < embed::X
 {
     ReleaseImageSubStorage();
 
-    if ( pImpl->bOwnsStorage )
+    if ( pImpl->mbOwnsStorage )
         pImpl->mxStorage->dispose();
 
     pImpl->mxStorage = rStor;
-    pImpl->bOwnsStorage = false;
+    pImpl->mbOwnsStorage = false;
 }
 
 sal_Bool EmbeddedObjectContainer::CommitImageSubStorage()
@@ -201,7 +207,7 @@ EmbeddedObjectContainer::~EmbeddedObjectContainer()
 {
     ReleaseImageSubStorage();
 
-    if ( pImpl->bOwnsStorage )
+    if ( pImpl->mbOwnsStorage )
         pImpl->mxStorage->dispose();
 
     delete pImpl->mpTempObjectContainer;
@@ -1378,7 +1384,7 @@ sal_Bool EmbeddedObjectContainer::StoreAsChildren(sal_Bool _bOasisFormat,sal_Boo
                     xStream = GetGraphicStream( xObj, &aMediaType );
                 }
 
-                if ( !xStream.is() )
+                if ( !xStream.is() && getUserAllowsLinkUpdate() )
                 {
                     // the image must be regenerated
                     // TODO/LATER: another aspect could be used
@@ -1667,6 +1673,20 @@ sal_Bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< emb
     }
     return bError;
 }
+
+bool EmbeddedObjectContainer::getUserAllowsLinkUpdate() const
+{
+    return pImpl->mbUserAllowsLinkUpdate;
+}
+
+void EmbeddedObjectContainer::setUserAllowsLinkUpdate(bool bNew)
+{
+    if(pImpl->mbUserAllowsLinkUpdate != bNew)
+    {
+        pImpl->mbUserAllowsLinkUpdate = bNew;
+    }
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/comphelper/embeddedobjectcontainer.hxx b/include/comphelper/embeddedobjectcontainer.hxx
index 616ca0f..270ef1b 100644
--- a/include/comphelper/embeddedobjectcontainer.hxx
+++ b/include/comphelper/embeddedobjectcontainer.hxx
@@ -177,6 +177,9 @@ public:
     * \return <FALSE/> if no error occurred, otherwise <TRUE/>.
     */
     sal_Bool             SetPersistentEntries(const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& _xStorage,bool _bClearModifedFlag = true);
+
+    bool getUserAllowsLinkUpdate() const;
+    void setUserAllowsLinkUpdate(bool bNew);
 };
 
 }
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index e1e4606..878479f 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -328,7 +328,17 @@ void LinkManager::UpdateAllLinks(
         {
             int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ).toString() ).Execute();
             if( RET_YES != nRet )
-                return ;         // nothing should be updated
+            {
+                SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
+
+                if(pShell)
+                {
+                    comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pShell->getEmbeddedObjectContainer();
+                    rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
+                }
+
+                return ;        // nothing should be updated
+            }
             bAskUpdate = false;  // once is enough
         }
 
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 918b941..fa6d024 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -606,19 +606,30 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( bool bUpdate ) const
     if ( !xStream.is() )
     {
         SAL_INFO( "svtools.misc", "getting stream from object" );
-        // update wanted or no stream in container storage available
-        xStream = GetGraphicReplacementStream(mpImpl->nViewAspect, mpImpl->mxObj, &mpImpl->aMediaType);
+        bool bUserAllowsLinkUpdate(true);
+        const comphelper::EmbeddedObjectContainer* pContainer = GetContainer();
 
-        if ( xStream.is() )
+        if(pContainer)
         {
-            if ( mpImpl->pContainer )
-                mpImpl->pContainer->InsertGraphicStream( xStream, mpImpl->aPersistName, mpImpl->aMediaType );
+            bUserAllowsLinkUpdate = pContainer->getUserAllowsLinkUpdate();
+        }
 
-            SvStream* pResult = ::utl::UcbStreamHelper::CreateStream( xStream );
-            if ( pResult && bUpdate )
-                mpImpl->bNeedUpdate = false;
+        if(bUserAllowsLinkUpdate)
+        {
+            // update wanted or no stream in container storage available
+            xStream = GetGraphicReplacementStream(mpImpl->nViewAspect, mpImpl->mxObj, &mpImpl->aMediaType);
 
-            return pResult;
+            if(xStream.is())
+            {
+                if (mpImpl->pContainer)
+                    mpImpl->pContainer->InsertGraphicStream(xStream,mpImpl->aPersistName,mpImpl->aMediaType);
+
+                SvStream* pResult = ::utl::UcbStreamHelper::CreateStream( xStream );
+                if (pResult && bUpdate)
+                    mpImpl->bNeedUpdate = false;
+
+                return pResult;
+            }
         }
     }
 
commit b45723663ae0cff9ff32a9247c3d1304a2601f99
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Jul 24 20:03:43 2014 +0200

    bnc#887227: Do not set TextAutoGrowHeight for vertical text.
    
    It's horribly broken and it would resize text box
    horizontally which is not supposed to happen.
    
    (cherry picked from commit d068f13596f6d1023a70d98ec2059d38ad6fd777)
    
    Change-Id: I201ec8dbcddca56d21bf46ea8ee838d01923c442
    Reviewed-on: https://gerrit.libreoffice.org/10585
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx
index b580be3..166ecd0 100644
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -132,7 +132,11 @@ ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement
                 mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= false;
                 break;
             case A_TOKEN( spAutoFit ):
-                mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= true;
+                {
+                    const sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz );
+                    if( tVert != XML_vert && tVert != XML_eaVert && tVert != XML_vert270 && tVert != XML_mongolianVert )
+                        mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= true;
+                }
                 break;
 
             case A_TOKEN( scene3d ):        // CT_Scene3D
commit 217c629a9e10312ec9d4e53b5f3e307cdc97b937
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Jul 14 07:17:59 2014 +0000

    Related: #i125226# expect DDE servers to be already up
    
    "soffice" is always up anyway and other DDE apps should be started manually
    
    (cherry picked from commit e0bfdb26cef87c8d3b3435293116a33cf99c11f0)
    
    Conflicts:
    	sfx2/source/appl/impldde.cxx
    
    (cherry picked from commit f4a8d7cd10cda57143b22519e16cdf8d5f19e759)
    
    Conflicts:
    	sfx2/source/appl/impldde.cxx
    
    Change-Id: I52ebb26528952a4abf33ac95cb67c598f08b2790
    Reviewed-on: https://gerrit.libreoffice.org/10297
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index b0b79a21..92b1c7e 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -198,9 +198,6 @@ sal_Bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
 
 sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
 {
-#if defined(WNT)
-    static sal_Bool bInWinExec = sal_False;
-#endif
     sal_uInt16 nLinkType = pSvLink->GetUpdateMode();
     if( pConnection )           // Connection is already made
     {
@@ -227,69 +224,22 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
     pConnection = new DdeConnection( sServer, sTopic );
     if( pConnection->GetError() )
     {
-       // Is it possible to address the system-Topic?
-       // then the server is up, it just does not know the topic!
-        if( sTopic.equalsIgnoreAsciiCase( "SYSTEM" ) )
+        // check if the DDE server knows the "SYSTEM" topic
+        bool bSysTopic = false;
+        if (!sTopic.equalsIgnoreAsciiCase("SYSTEM"))
         {
-            sal_Bool bSysTopic;
-            {
-                DdeConnection aTmp(sServer, OUString("SYSTEM"));
-                bSysTopic = !aTmp.GetError();
-            }
-
-            if( bSysTopic )
-            {
-                nError = DDELINK_ERROR_DATA;
-                return sal_False;
-            }
-            // otherwise in  Win/WinNT, start the Application directly
+            DdeConnection aTmp(sServer, OUString("SYSTEM"));
+            bSysTopic = !aTmp.GetError();
         }
 
-#if defined(WNT)
-        // check the suitability of starting the DDE server
-        const SvtSecurityOptions aSecOpts;
-        bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE);
-        bForbidden |= (comphelper::string::indexOfAny(sServer, L":./%\\") != -1);
-        static const char* aBadServers[] = { "cmd", "rundll32" };
-        for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i)
-            bForbidden |= sServer.equalsAscii(aBadServers[i]);
-
-        // try to start the DDE server if it is not there already
-        bForbidden |= (bInWinExec != false);
-        if( !bForbidden )
+        if( bSysTopic )
         {
-            OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US));
-            aCmdLine.append(".exe ");
-            aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US));
-
-            if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead
-                nError = DDELINK_ERROR_APP;
-            else
-            {
-                sal_uInt16 i;
-                for( i=0; i<5; i++ )
-                {
-                    bInWinExec = sal_True;
-                    Application::Reschedule();
-                    bInWinExec = sal_False;
-
-                    delete pConnection;
-                    pConnection = new DdeConnection( sServer, sTopic );
-                    if( !pConnection->GetError() )
-                        break;
-                }
-
-                if( i == 5 )
-                {
-                    nError = DDELINK_ERROR_APP;
-                }
-            }
-        }
-        else
-#endif  // WNT
-        {
-            nError = DDELINK_ERROR_APP;
+            // if the system topic works then the server is up but just doesn't know the original topic
+            nError = DDELINK_ERROR_DATA;
+            return false;
         }
+
+        nError = DDELINK_ERROR_APP;
     }
 
     if( LINKUPDATE_ALWAYS == nLinkType && !pLink && !pConnection->GetError() )
commit 101c7c2b546ba000df5bf9f1d746c7d5c9878e5c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Aug 11 22:24:54 2014 +0200

    fdo#81995: fix Outline numbering tab page
    
    The "ParentNumbering" property is not a string.
    
    (regression from 97eb8a6e0eb830f37dcba64a51d725aab4c5ff53)
    
    Change-Id: Ib33e95847b388bb1126a63812e128c96a0c00730
    (cherry picked from commit 4d3c9ed257e51af55f358d2b44d5fc2e341c7202)
    Reviewed-on: https://gerrit.libreoffice.org/10875
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 5d70251..9aafd2b 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -1589,7 +1589,7 @@ Any OutlineNumbering::getByIndex( sal_Int32 nIndex )
     pValues[4].Name = "BulletFontName";
     pValues[4].Value <<= OUString::createFromAscii(pTemp->sBulletFontName);
     pValues[5].Name = "ParentNumbering";
-    pValues[5].Value <<= OUString::number(pTemp->nParentNumbering);
+    pValues[5].Value <<= pTemp->nParentNumbering;
     pValues[6].Name = "LeftMargin";
     pValues[6].Value <<= pTemp->nLeftMargin;
     pValues[7].Name = "SymbolTextDistance";
commit 230882cff2516118347e58f599dbbd32eb5f52e9
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Tue Jul 29 21:10:22 2014 +0200

    Fix some number format issues, bnc#862510
    
    Set "LinkNumberFormatToSource" to false, so that format code is not
    ignored.
    Also, do not inherit format code common for all labels, if there is
    specific format code for a data label.
    
    Change-Id: I505311d5df641d61e616e354734bd332609fa122
    (cherry picked from commit c8cc89ff802d86b1f3a69afe1b4835b7df7f70c7)
    Reviewed-on: https://gerrit.libreoffice.org/10782
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/oox/source/drawingml/chart/modelbase.cxx b/oox/source/drawingml/chart/modelbase.cxx
index b349945..eadde2b 100644
--- a/oox/source/drawingml/chart/modelbase.cxx
+++ b/oox/source/drawingml/chart/modelbase.cxx
@@ -34,8 +34,7 @@ NumberFormat::NumberFormat() :
 void NumberFormat::setAttributes( const AttributeList& rAttribs )
 {
     maFormatCode = rAttribs.getString( XML_formatCode, OUString() );
-    // default is 'false', not 'true' as specified
-    mbSourceLinked = rAttribs.getBool( XML_sourceLinked, false );
+    // TODO: if XML_sourceLinked is true, <c:formatCode> should be used instead.
 }
 
 // ============================================================================
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 8e91941..a9911e7 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -1128,7 +1128,9 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo
                 append( OUStringToOString( rNumberFormat.maFormatCode, osl_getThreadTextEncoding() ) ).append( '\'' ).getStr() );
         }
 
-        rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.mbSourceLinked));
+        // Format code is ignored if "LinkNumberFormatToSource" is set to "true" :-/
+        // See AxisHelper::getExplicitNumberFormatKeyForAxis()
+        rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.maFormatCode.isEmpty()));
     }
 }
 
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
index 910a800..3fed8ce 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -259,9 +259,8 @@ void DataLabelsConverter::convertFromModel( const Reference< XDataSeries >& rxDa
     // data point label settings
     for( DataLabelsModel::DataLabelVector::iterator aIt = mrModel.maPointLabels.begin(), aEnd = mrModel.maPointLabels.end(); aIt != aEnd; ++aIt )
     {
-        (*aIt)->maNumberFormat.maFormatCode = mrModel.maNumberFormat.maFormatCode;
-        if( !mrModel.maNumberFormat.maFormatCode.isEmpty() )
-            (*aIt)->maNumberFormat.mbSourceLinked = false;
+        if ((*aIt)->maNumberFormat.maFormatCode.isEmpty())
+            (*aIt)->maNumberFormat = mrModel.maNumberFormat;
 
         DataLabelConverter aLabelConv( *this, **aIt );
         aLabelConv.convertFromModel( rxDataSeries, rTypeGroup );
commit 044c22ad9128b0b0b3b48fd297df2c40a75fcb18
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Tue Jul 29 07:53:22 2014 +0200

    bnc#862510: PPTX import: Properly show data labels in percent format.
    
    Usually, "General" is "0.00" number format, but in this case, when we
    want to show percent value, MSO writes that instead of "0%".
    
    Change-Id: I748719765f58e66f9f3fb43c2b527c6823ef6fa1
    (cherry picked from commit 5f47e319428a703ea53ce49d166e7628aaa60789)
    Reviewed-on: https://gerrit.libreoffice.org/10781
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index b5b0a5b..8e91941 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -1113,9 +1113,12 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo
         sal_Int32 nPropId = bPercentFormat ? PROP_PercentageNumberFormat : PROP_NumberFormat;
         try
         {
-            sal_Int32 nIndex = rNumberFormat.maFormatCode.equalsIgnoreAsciiCase("general") ?
+            bool bGeneral = rNumberFormat.maFormatCode.equalsIgnoreAsciiCase("general");
+            sal_Int32 nIndex = bGeneral && !bPercentFormat ?
                 mxData->mxNumTypes->getStandardIndex( mxData->maFromLocale ) :
-                mxData->mxNumFmts->addNewConverted( rNumberFormat.maFormatCode, mxData->maEnUsLocale, mxData->maFromLocale );
+                mxData->mxNumFmts->addNewConverted(
+                        bGeneral ? OUString("0%") : rNumberFormat.maFormatCode,
+                        mxData->maEnUsLocale, mxData->maFromLocale );
             if( nIndex >= 0 )
                 rPropSet.setProperty( nPropId, nIndex );
         }
commit 232aa9949bc159d2a29e6b2482e33734bd0eaf17
Author: Bryan Quigley <gquigs at gmail.com>
Date:   Mon Aug 4 12:26:00 2014 -0400

    fdo#81552 Fail nicely if avahi doesn't let libreoffice publish items
    
    Needed some minor changes for 4-2.
    
    Reviewed-on: https://gerrit.libreoffice.org/10735
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 3c57701cf0a169bd8d1893d1b2271d48b8072147)
    
    Change-Id: Ie264a032a71bda336158e18bd2b14c569f23f42d
    Reviewed-on: https://gerrit.libreoffice.org/10822
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sd/source/ui/remotecontrol/AvahiNetworkService.cxx b/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
index 04d8e57..43ee31b 100644
--- a/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
+++ b/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
@@ -35,7 +35,7 @@ static AvahiThreadedPoll *threaded_poll = NULL;
 static AvahiEntryGroup *group = NULL;
 static AvahiNetworkService *avahiService = NULL;
 
-static void create_services(AvahiClient *c);
+static bool create_services(AvahiClient *c);
 
 static void entry_group_callback(AvahiEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
     assert(g == group || group == NULL);
@@ -78,16 +78,19 @@ static void entry_group_callback(AvahiEntryGroup *g, AvahiEntryGroupState state,
     }
 }
 
-static void create_services(AvahiClient *c) {
+static bool create_services(AvahiClient *c) {
     assert(c);
 
     /* If this is the first time we're called, let's create a new
      * entry group if necessary */
+    if(!client)
+        return false;
 
     if (!group)
         if (!(group = avahi_entry_group_new(c, entry_group_callback, NULL))) {
             fprintf(stderr, "avahi_entry_group_new() failed: %s\n", avahi_strerror(avahi_client_errno(c)));
             avahiService->clear();
+            return false;
         }
 
     /* If the group is empty (either because it was just created, or
@@ -113,22 +116,23 @@ static void create_services(AvahiClient *c) {
 
                 avahi_entry_group_reset(group);
 
-                create_services(c);
-                return;
+                return create_services(c);
             }
 
             fprintf(stderr, "Failed to add _impressremote._tcp service: %s\n", avahi_strerror(ret));
             avahiService->clear();
+            return false;
         }
 
         /* Tell the server to register the service */
         if ((ret = avahi_entry_group_commit(group)) < 0) {
             fprintf(stderr, "Failed to commit entry group: %s\n", avahi_strerror(ret));
             avahiService->clear();
+            return false;
         }
     }
 
-    return;
+    return true; //Services we're already created
 }
 
 static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UNUSED void * userdata) {
@@ -174,7 +178,8 @@ void AvahiNetworkService::setup() {
      return;
    }
 
-   create_services(client);
+   if(!create_services(client))
+        return;
 
    /* Finally, start the event loop thread */
    if (avahi_threaded_poll_start(threaded_poll) < 0) {
@@ -184,8 +189,11 @@ void AvahiNetworkService::setup() {
 }
 
 void AvahiNetworkService::clear() {
-  /* Call this when the app shuts down */
-  avahi_threaded_poll_stop(threaded_poll);
-  avahi_client_free(client);
-  avahi_threaded_poll_free(threaded_poll);
+    /* Call this when the app shuts down */
+        if(threaded_poll)
+            avahi_threaded_poll_stop(threaded_poll);
+        if(client)
+            avahi_client_free(client);
+        if(threaded_poll)
+            avahi_threaded_poll_free(threaded_poll);
 }
commit a3ab80ffce5350cbce3645847565ad687411cc32
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Aug 8 10:01:49 2014 -0400

    bnc#885548: Set the date time mode to non-fixed after the import is done.
    
    So that the new revisions will correctly record time stamps.
    
    Change-Id: I7d9b26bed04a95ce2652224faa0f214562818970
    (cherry picked from commit 2a6843cb6c44305ac62c9cd1098a3eec4abaeb7e)
    Reviewed-on: https://gerrit.libreoffice.org/10830
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/filter/oox/revisionfragment.cxx b/sc/source/filter/oox/revisionfragment.cxx
index 463b663..c8c1f14 100644
--- a/sc/source/filter/oox/revisionfragment.cxx
+++ b/sc/source/filter/oox/revisionfragment.cxx
@@ -270,6 +270,7 @@ void RevisionHeadersFragment::finalizeImport()
     }
 
     pCT->SetUser(aSelfUser); // set the default user to the document owner.
+    pCT->SetUseFixDateTime(false);
     rDoc.SetChangeTrack(pCT.release());
 
     // Turn on visibility of tracked changes.
commit 358428c90e383082fcb6089722b33337b23a8d4a
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Aug 7 11:24:18 2014 +0200

    rhbz#1079672: FileDialogHelper: don't hand out stale preview Graphic
    
    The maGraphic is updated from a timer, and if you double-click on a file
    then the dialog may exit with the previous file still previewed in
    maGraphic, so the wrong image is returned by the dialog.
    
    Change-Id: I99094d85d8d68d5c8a842f52e7039dbbbf095995
    (cherry picked from commit f1589f768bbd1d8baea6e442f392831851bdbb3b)
    Reviewed-on: https://gerrit.libreoffice.org/10804
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index c8178a4..28a8060 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -789,23 +789,20 @@ ErrCode FileDialogHelper_Impl::getGraphic( Graphic& rGraphic ) const
 {
     ErrCode nRet = ERRCODE_NONE;
 
-    if ( ! maGraphic )
-    {
-        OUString aPath;;
-        Sequence < OUString > aPathSeq = mxFileDlg->getFiles();
+    // rhbz#1079672 do not return maGraphic, it need not be the selected file
 
-        if ( aPathSeq.getLength() == 1 )
-        {
-            aPath = aPathSeq[0];
-        }
+    OUString aPath;;
+    Sequence<OUString> aPathSeq = mxFileDlg->getFiles();
 
-        if ( !aPath.isEmpty() )
-            nRet = getGraphic( aPath, rGraphic );
-        else
-            nRet = ERRCODE_IO_GENERAL;
+    if (aPathSeq.getLength() == 1)
+    {
+        aPath = aPathSeq[0];
     }
+
+    if (!aPath.isEmpty())
+        nRet = getGraphic(aPath, rGraphic);
     else
-        rGraphic = maGraphic;
+        nRet = ERRCODE_IO_GENERAL;
 
     return nRet;
 }
commit 60d29a89ba8415530833c12d9a91671429d38dd8
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Aug 5 22:56:17 2014 +0200

    SwDoc::CopyPageDesc(): probably sending Modify for first too cannot hurt
    
    Change-Id: I2056bee7555d3f6723ac374863187d82e4ad9edd
    (cherry picked from commit 2e9840d18c09ce5552eec2f9d489d952da1034ae)
    Reviewed-on: https://gerrit.libreoffice.org/10775
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 2963929..b7026de 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -2217,6 +2217,12 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
         {
             rDstDesc.GetLeft().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
         }
+        {
+            rDstDesc.GetFirstMaster().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
+        }
+        {
+            rDstDesc.GetFirstLeft().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
+        }
     }
 }
 
commit 904508f207a99cf7d0106d904c80e11b6704bdf0
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Aug 5 22:50:23 2014 +0200

    fdo#69282: sw: fix updating of page styles via SwDocShell::_LoadStyles()
    
    SwDoc::CopyPageDesc() only copies master and left SwFrmFmt attributes,
    but not first-master and first-left.  They will contain exactly the same
    attributes as master and left but they still need to be copied...
    
    (see also: that FIXME in pagedesc.hxx)
    
    (regression from 75084f6c42c27dc95418df9cefed2fddfb26000e)
    
    Change-Id: I3dcc3627708b5d6a477eb7fef76cf6c42c95c004
    (cherry picked from commit 5c1cc92ee09f9fcc99077cacd3fc55640f03b7b2)
    Reviewed-on: https://gerrit.libreoffice.org/10774
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 2a09e59..2963929 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -2150,6 +2150,22 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
 
         rDstDesc.GetLeft().DelDiffs( aAttrSet );
         rDstDesc.GetLeft().SetFmtAttr( aAttrSet );
+
+        aAttrSet.ClearItem();
+        aAttrSet.Put( rSrcDesc.GetFirstMaster().GetAttrSet() );
+        aAttrSet.ClearItem( RES_HEADER );
+        aAttrSet.ClearItem( RES_FOOTER );
+
+        rDstDesc.GetFirstMaster().DelDiffs( aAttrSet );
+        rDstDesc.GetFirstMaster().SetFmtAttr( aAttrSet );
+
+        aAttrSet.ClearItem();
+        aAttrSet.Put( rSrcDesc.GetFirstLeft().GetAttrSet() );
+        aAttrSet.ClearItem( RES_HEADER );
+        aAttrSet.ClearItem( RES_FOOTER );
+
+        rDstDesc.GetFirstLeft().DelDiffs( aAttrSet );
+        rDstDesc.GetFirstLeft().SetFmtAttr( aAttrSet );
     }
 
     CopyHeader( rSrcDesc.GetMaster(), rDstDesc.GetMaster() );
commit 0177eaf4ec76e9915bb3a384d07d3a1c63c7a0a6
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Aug 5 12:50:05 2014 +0200

    fdo#81516: vcl: limit number of CFFs read from font
    

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list