[Libreoffice-commits] core.git: Branch 'distro/collabora/lof-4.3' - 21 commits - basctl/source configure.ac connectivity/source dbaccess/qa dbaccess/source dbaccess/uiconfig download.lst external/nss filter/source i18npool/source readlicense_oo/docs sc/source svtools/source sw/CppunitTest_sw_odfimport.mk sw/qa sw/source vcl/source writerfilter/source

Caolán McNamara caolanm at redhat.com
Sat Oct 18 01:14:41 PDT 2014


 basctl/source/basicide/moduldl2.cxx                         |   10 
 configure.ac                                                |    2 
 connectivity/source/commontools/DateConversion.cxx          |    6 
 connectivity/source/parse/sqlbison.y                        |    8 
 dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java |    2 
 dbaccess/source/core/api/RowSet.cxx                         |    2 
 dbaccess/source/ui/querydesign/QueryDesignView.cxx          |    2 
 dbaccess/uiconfig/ui/specialsettingspage.ui                 |    2 
 download.lst                                                |    2 
 external/nss/ExternalProject_nss.mk                         |    2 
 external/nss/nss-linux-x86.patch.0                          |   12 
 external/nss/nss-pem.patch                                  |   17 +
 external/nss/nss.aix.patch                                  |  133 ++++-----
 external/nss/nss.patch                                      |  160 ++++++------
 external/nss/nss_macosx.patch                               |   41 +--
 filter/source/graphicfilter/icgm/actimpr.cxx                |   67 +----
 filter/source/graphicfilter/icgm/bundles.cxx                |   10 
 filter/source/graphicfilter/icgm/cgm.cxx                    |   41 ++-
 filter/source/graphicfilter/icgm/cgm.hxx                    |    5 
 filter/source/graphicfilter/icgm/outact.cxx                 |   35 --
 i18npool/source/localedata/data/lt_LT.xml                   |    9 
 readlicense_oo/docs/readme.xrm                              |    2 
 sc/source/core/data/column.cxx                              |    6 
 sc/source/core/data/document10.cxx                          |    4 
 sc/source/core/data/formulacell.cxx                         |    2 
 sc/source/ui/undo/undoblk3.cxx                              |   23 -
 sc/source/ui/view/viewfun6.cxx                              |   24 +
 svtools/source/contnr/svimpbox.cxx                          |    2 
 sw/CppunitTest_sw_odfimport.mk                              |    3 
 sw/qa/extras/odfimport/data/bnc800714.fodt                  |   35 ++
 sw/qa/extras/odfimport/odfimport.cxx                        |   11 
 sw/qa/extras/rtfimport/data/fdo84679.rtf                    |   12 
 sw/qa/extras/rtfimport/rtfimport.cxx                        |   11 
 sw/source/core/bastyp/breakit.cxx                           |    2 
 sw/source/core/text/frmform.cxx                             |    7 
 sw/source/core/uibase/docvw/edtwin2.cxx                     |   17 +
 sw/source/core/uibase/inc/edtwin.hxx                        |    5 
 vcl/source/control/edit.cxx                                 |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                           |    2 
 vcl/source/outdev/text.cxx                                  |    2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx           |   11 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx              |    9 
 42 files changed, 443 insertions(+), 317 deletions(-)

New commits:
commit 52f771da33675841d0d9854c5bbd2561760e2afd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 14 13:16:49 2014 +0100

    valgrind: multiple problems in cgm filter
    
    valgrind: Mismatched free() / delete / delete []
    
    (cherry picked from commit 4d82ccb1edcc700f1ff8387ec51ac8114d5d77e3)
    
    valgrind: Mismatched free() / delete / delete []
    
    (cherry picked from commit 61550120b45640898677c7f765a491737445954f)
    
    valgrind: Source and destination overlap in memcpy
    
    (cherry picked from commit b2b5bc10b6574e4717f651602c970bdb20abd1a7)
    
    sal_True->true
    
    (cherry picked from commit aeea1cab4300371797fc1283c1e8623fa8238908)
    
    check for short reads
    
    (cherry picked from commit 2e234939874575a41673b3ceb4a759afa3b333aa)
    
    valgrind: multiple errors
    
    (cherry picked from commit b251762c6549639975a7e9962c9fb5b365ef2063)
    
    stray ;s all other the place
    
    (cherry picked from commit 740617901dc2e7a1effd211c755ea9d00b32094b)
    
    valgrind: init GroupLevels
    
    (cherry picked from commit b13591d48f58b45f4465ce03bd1248ec1e95584f)
    
    Change-Id: Idccebc826ade29a507e115108d20fd461b7bb4ec
    Reviewed-on: https://gerrit.libreoffice.org/11977
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index 8db2cc3..ba96bde 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -74,9 +74,7 @@ CGMImpressOutAct::CGMImpressOutAct( CGM& rCGM, const uno::Reference< frame::XMod
         }
         mpCGM->mbStatus = bStatRet;
     }
-};
-
-
+}
 
 bool CGMImpressOutAct::ImplInitPage()
 {
@@ -176,9 +174,7 @@ void CGMImpressOutAct::ImplSetLineBundle()
         aAny <<= aLineDash;
         maXPropSet->setPropertyValue( "LineDash", aAny );
     }
-};
-
-
+}
 
 void CGMImpressOutAct::ImplSetFillBundle()
 {
@@ -343,9 +339,7 @@ void CGMImpressOutAct::ImplSetFillBundle()
         aAny <<= aHatch;
         maXPropSet->setPropertyValue( "FillHatch", aAny );
     }
-};
-
-
+}
 
 void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XPropertySet > & rProperty )
 {
@@ -387,9 +381,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty
     }
     aAny <<= aFontDescriptor;
     rProperty->setPropertyValue( "FontDescriptor", aAny );
-};
-
-
+}
 
 void CGMImpressOutAct::InsertPage()
 {
@@ -401,9 +393,7 @@ void CGMImpressOutAct::InsertPage()
             mpCGM->mbStatus = false;
     }
     mnCurrentPage++;
-};
-
-
+}
 
 void CGMImpressOutAct::BeginGroup()
 {
@@ -413,9 +403,7 @@ void CGMImpressOutAct::BeginGroup()
     }
     mnGroupLevel++;
     mnGroupActCount = mpCGM->mnActCount;
-};
-
-
+}
 
 void CGMImpressOutAct::EndGroup()
 {
@@ -446,9 +434,7 @@ void CGMImpressOutAct::EndGroup()
             }
         }
     }
-};
-
-
+}
 
 void CGMImpressOutAct::EndGrouping()
 {
@@ -458,8 +444,6 @@ void CGMImpressOutAct::EndGrouping()
     }
 }
 
-
-
 void CGMImpressOutAct::DrawRectangle( FloatRect& rFloatRect )
 {
     if ( mnGroupActCount != ( mpCGM->mnActCount - 1 ) )         // POWERPOINT HACK !!!
@@ -472,9 +456,7 @@ void CGMImpressOutAct::DrawRectangle( FloatRect& rFloatRect )
             ImplSetFillBundle();
         }
     }
-};
-
-
+}
 
 void CGMImpressOutAct::DrawEllipse( FloatPoint& rCenter, FloatPoint& rSize, double& rOrientation )
 {
@@ -499,9 +481,7 @@ void CGMImpressOutAct::DrawEllipse( FloatPoint& rCenter, FloatPoint& rSize, doub
         }
         ImplSetFillBundle();
     }
-};
-
-
+}
 
 void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize, double& rOrientation,
             sal_uInt32 nType, double& fStartAngle, double& fEndAngle )
@@ -572,9 +552,7 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize
             }
         }
     }
-};
-
-
+}
 
 void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc )
 {
@@ -613,9 +591,7 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc )
 
         }
     }
-};
-
-
+}
 
 void CGMImpressOutAct::DrawPolygon( Polygon& rPoly )
 {
@@ -645,10 +621,7 @@ void CGMImpressOutAct::DrawPolygon( Polygon& rPoly )
         maXPropSet->setPropertyValue( "PolyPolygon", aParam );
         ImplSetFillBundle();
     }
-};
-
-
-
+}
 
 void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly )
 {
@@ -678,9 +651,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly )
         maXPropSet->setPropertyValue( "PolyPolygon", aParam );
         ImplSetLineBundle();
     }
-};
-
-
+}
 
 void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon )
 {
@@ -713,9 +684,7 @@ void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon )
         maXPropSet->setPropertyValue( "PolyPolygonBezier", aParam );
         ImplSetLineBundle();
     }
-};
-
-
+}
 
 void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon )
 {
@@ -758,9 +727,7 @@ void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon )
         maXPropSet->setPropertyValue( "PolyPolygonBezier", aParam);
         ImplSetFillBundle();
     }
-};
-
-
+}
 
 void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, char* pString, sal_uInt32 /*nSize*/, FinalFlag eFlag )
 {
@@ -907,9 +874,7 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha
             nFinalTextCount = maXShapes->getCount();
         }
     }
-};
-
-
+}
 
 void CGMImpressOutAct::AppendText( char* pString, sal_uInt32 /*nSize*/, FinalFlag /*eFlag*/ )
 {
diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx
index bfd8045..a4a9100c 100644
--- a/filter/source/graphicfilter/icgm/bundles.cxx
+++ b/filter/source/graphicfilter/icgm/bundles.cxx
@@ -87,8 +87,6 @@ FillBundle& FillBundle::operator=( FillBundle& rSource )
     return *this;
 };
 
-
-
 FontEntry::FontEntry() :
     pFontName       ( NULL ),
     eCharSetType    ( CST_CCOMPLETE ),
@@ -99,12 +97,10 @@ FontEntry::FontEntry() :
 
 FontEntry::~FontEntry()
 {
-    delete pFontName;
+    delete [] pFontName;
     delete pCharSetValue;
 }
 
-
-
 CGMFList::CGMFList() :
     nFontNameCount      ( 0 ),
     nCharSetCount       ( 0 ),
@@ -209,7 +205,7 @@ void CGMFList::InsertName( sal_uInt8* pSource, sal_uInt32 nSize )
         sal_uInt32 nToCopy = nSize - nToCopyOfs - nPrev;
         if ( nToCopy )
         {
-            memcpy( pFound, pFound + nToCopyOfs, nToCopy );
+            memmove( pFound, pFound + nToCopyOfs, nToCopy );
         }
         nSize -= nToCopyOfs;
     }
@@ -229,7 +225,7 @@ void CGMFList::InsertName( sal_uInt8* pSource, sal_uInt32 nSize )
         sal_uInt32 nToCopy = nSize - nToCopyOfs - nPrev;
         if ( nToCopy )
         {
-            memcpy( pFound, pFound + nToCopyOfs, nToCopy );
+            memmove( pFound, pFound + nToCopyOfs, nToCopy );
         }
         nSize -= nToCopyOfs;
     }
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index a9808b7..d0aa5fb 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -57,6 +57,7 @@ CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > & rModel )
     , mpChart(NULL)
     , mpOutAct(new CGMImpressOutAct(*this, rModel))
     , mpSource(NULL)
+    , mpEndValidSource(NULL)
     , mnParaSize(0)
     , mnActCount(0)
     , mpBuf(NULL)
@@ -74,7 +75,6 @@ CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > & rModel )
 
 CGM::~CGM()
 {
-
     if ( mpGraphic )
     {
         mpGDIMetaFile->Stop();
@@ -84,7 +84,7 @@ CGM::~CGM()
         *mpGraphic = Graphic( *mpGDIMetaFile );
     }
     for( size_t i = 0, n = maDefRepList.size(); i < n; ++i )
-        delete maDefRepList[ i ];
+        delete [] maDefRepList[i];
     maDefRepList.clear();
     maDefRepSizeList.clear();
     delete mpBitmapInUse;
@@ -103,6 +103,8 @@ sal_uInt32 CGM::GetBackGroundColor()
 sal_uInt32 CGM::ImplGetUI16( sal_uInt32 /*nAlign*/ )
 {
     sal_uInt8* pSource = mpSource + mnParaSize;
+    if (pSource + 2 > mpEndValidSource)
+        throw css::uno::Exception("attempt to read past end of input", 0);
     mnParaSize += 2;
     return ( pSource[ 0 ] << 8 ) +  pSource[ 1 ];
 };
@@ -115,6 +117,8 @@ sal_uInt8 CGM::ImplGetByte( sal_uInt32 nSource, sal_uInt32 nPrecision )
 long CGM::ImplGetI( sal_uInt32 nPrecision )
 {
     sal_uInt8* pSource = mpSource + mnParaSize;
+    if (pSource + nPrecision > mpEndValidSource)
+        throw css::uno::Exception("attempt to read past end of input", 0);
     mnParaSize += nPrecision;
     switch( nPrecision )
     {
@@ -145,6 +149,8 @@ long CGM::ImplGetI( sal_uInt32 nPrecision )
 sal_uInt32 CGM::ImplGetUI( sal_uInt32 nPrecision )
 {
     sal_uInt8* pSource = mpSource + mnParaSize;
+    if (pSource + nPrecision > mpEndValidSource)
+        throw css::uno::Exception("attempt to read past end of input", 0);
     mnParaSize += nPrecision;
     switch( nPrecision )
     {
@@ -194,12 +200,18 @@ double CGM::ImplGetFloat( RealPrecision eRealPrecision, sal_uInt32 nRealSize )
     float   fFloatBuf;
 
 #ifdef OSL_BIGENDIAN
-        bCompatible = sal_True;
+    bCompatible = true;
 #else
-        bCompatible = false;
+    bCompatible = false;
 #endif
+
+    if (mpSource + mnParaSize + nRealSize > mpEndValidSource)
+        throw css::uno::Exception("attempt to read past end of input", 0);
+
     if ( bCompatible )
+    {
         pPtr = mpSource + mnParaSize;
+    }
     else
     {
         if ( nRealSize == 4 )
@@ -620,11 +632,13 @@ void CGM::ImplDefaultReplacement()
         sal_uInt32  nOldElementID = mnElementID;
         sal_uInt32  nOldElementSize = mnElementSize;
         sal_uInt8*  pOldBuf = mpSource;
+        sal_uInt8*  pOldEndValidSource = mpEndValidSource;
 
         for ( size_t i = 0, n = maDefRepList.size(); i < n; ++i )
         {
             sal_uInt8*  pBuf = maDefRepList[ i ];
             sal_uInt32  nElementSize = maDefRepSizeList[ i ];
+            mpEndValidSource = pBuf + nElementSize;
             sal_uInt32  nCount = 0;
             while ( mbStatus && ( nCount < nElementSize ) )
             {
@@ -653,6 +667,7 @@ void CGM::ImplDefaultReplacement()
         mnElementID = nOldElementID;
         mnParaSize = mnElementSize = nOldElementSize;
         mpSource = pOldBuf;
+        mpEndValidSource = pOldEndValidSource;
     }
 }
 
@@ -663,7 +678,9 @@ bool CGM::Write( SvStream& rIStm )
 
     mnParaSize = 0;
     mpSource = mpBuf;
-    rIStm.Read( mpSource, 2 );
+    if (rIStm.Read(mpSource, 2) != 2)
+        return false;
+    mpEndValidSource = mpSource + 2;
     mnEscape = ImplGetUI16();
     mnElementClass = mnEscape >> 12;
     mnElementID = ( mnEscape & 0x0fe0 ) >> 5;
@@ -671,12 +688,18 @@ bool CGM::Write( SvStream& rIStm )
 
     if ( mnElementSize == 31 )
     {
-        rIStm.Read( mpSource + mnParaSize, 2 );
+        if (rIStm.Read(mpSource + mnParaSize, 2) != 2)
+            return false;
+        mpEndValidSource = mpSource + mnParaSize + 2;
         mnElementSize = ImplGetUI16();
     }
     mnParaSize = 0;
-    if ( mnElementSize )
-        rIStm.Read( mpSource + mnParaSize, mnElementSize );
+    if (mnElementSize)
+    {
+        if (rIStm.Read(mpSource, mnElementSize) != mnElementSize)
+            return false;
+        mpEndValidSource = mpSource + mnElementSize;
+    }
 
     if ( mnElementSize & 1 )
         rIStm.SeekRel( 1 );
@@ -744,7 +767,7 @@ ImportCGM( OUString& rFileName, uno::Reference< frame::XModel > & rXModel, sal_u
                 }
             }
         }
-        catch( const ::com::sun::star::uno::Exception& )
+        catch (const css::uno::Exception&)
         {
             nStatus = 0;
         }
diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx
index 25ab80a..7148a40 100644
--- a/filter/source/graphicfilter/icgm/cgm.hxx
+++ b/filter/source/graphicfilter/icgm/cgm.hxx
@@ -79,8 +79,9 @@ class CGM
         ::std::vector< sal_uInt8 * > maDefRepList;
         ::std::vector< sal_uInt32  > maDefRepSizeList;
 
-        sal_uInt8*              mpSource;       // source buffer that is not increased
-                                            // ( instead use mnParaCount to index )
+        sal_uInt8*              mpSource;         // start of source buffer that is not increased
+                                                  // ( instead use mnParaCount to index )
+        sal_uInt8*              mpEndValidSource; // end position in source buffer of last valid data
         sal_uInt32              mnParaSize;     // actual parameter size which has been done so far
         sal_uInt32              mnActCount;     // increased by each action
         sal_uInt8*              mpBuf;          // source stream operation -> then this is allocated for
diff --git a/filter/source/graphicfilter/icgm/outact.cxx b/filter/source/graphicfilter/icgm/outact.cxx
index f7394df..521d894 100644
--- a/filter/source/graphicfilter/icgm/outact.cxx
+++ b/filter/source/graphicfilter/icgm/outact.cxx
@@ -20,37 +20,31 @@
 
 #include <outact.hxx>
 #include <vcl/gradient.hxx>
+#include <string.h>
 
 using namespace ::com::sun::star;
 
-
-
 CGMOutAct::CGMOutAct( CGM& rCGM )
 {
     mpCGM = &rCGM;
     mnCurrentPage = 0;
     mnGroupActCount = mnGroupLevel = 0;
-    mpGroupLevel = new sal_uInt32[ CGM_OUTACT_MAX_GROUP_LEVEL ];
+    mpGroupLevel = new sal_uInt32[CGM_OUTACT_MAX_GROUP_LEVEL];
+    memset(mpGroupLevel, 0, sizeof(sal_uInt32) * CGM_OUTACT_MAX_GROUP_LEVEL);
     mpPoints = (Point*)new sal_Int8[ 0x2000 * sizeof( Point ) ];
     mpFlags = new sal_uInt8[ 0x2000 ];
 
     mnIndex = 0;
     mpGradient = NULL;
-};
-
-
+}
 
 CGMOutAct::~CGMOutAct()
 {
     delete[] (sal_Int8*) mpPoints;
     delete[] mpFlags;
     delete[] mpGroupLevel;
-
-    if ( mpGradient )
-        delete mpGradient;
-};
-
-
+    delete mpGradient;
+}
 
 void CGMOutAct::BeginFigure()
 {
@@ -61,8 +55,6 @@ void CGMOutAct::BeginFigure()
     mnIndex = 0;
 }
 
-
-
 void CGMOutAct::CloseRegion()
 {
     if ( mnIndex > 2 )
@@ -73,8 +65,6 @@ void CGMOutAct::CloseRegion()
     }
 }
 
-
-
 void CGMOutAct::NewRegion()
 {
     if ( mnIndex > 2 )
@@ -85,8 +75,6 @@ void CGMOutAct::NewRegion()
     mnIndex = 0;
 }
 
-
-
 void CGMOutAct::EndFigure()
 {
     NewRegion();
@@ -96,8 +84,6 @@ void CGMOutAct::EndFigure()
     mnIndex = 0;
 }
 
-
-
 void CGMOutAct::RegPolyLine( Polygon& rPolygon, bool bReverse )
 {
     sal_uInt16 nPoints = rPolygon.GetSize();
@@ -123,8 +109,6 @@ void CGMOutAct::RegPolyLine( Polygon& rPolygon, bool bReverse )
     }
 }
 
-
-
 void CGMOutAct::SetGradientOffset( long nHorzOfs, long nVertOfs, sal_uInt32 /*nType*/ )
 {
     if ( !mpGradient )
@@ -133,8 +117,6 @@ void CGMOutAct::SetGradientOffset( long nHorzOfs, long nVertOfs, sal_uInt32 /*nT
     mpGradient->YOffset = ( (sal_uInt16)nVertOfs & 0x7f );
 }
 
-
-
 void CGMOutAct::SetGradientAngle( long nAngle )
 {
     if ( !mpGradient )
@@ -142,8 +124,6 @@ void CGMOutAct::SetGradientAngle( long nAngle )
     mpGradient->Angle = sal::static_int_cast< sal_Int16 >(nAngle);
 }
 
-
-
 void CGMOutAct::SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 nColorTo )
 {
     if ( !mpGradient )
@@ -152,8 +132,6 @@ void CGMOutAct::SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 nColorT
     mpGradient->EndColor = nColorTo;
 }
 
-
-
 void CGMOutAct::SetGradientStyle( sal_uInt32 nStyle, double /*fRatio*/ )
 {
     if ( !mpGradient )
@@ -187,5 +165,4 @@ void CGMOutAct::SetGradientStyle( sal_uInt32 nStyle, double /*fRatio*/ )
     }
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 1c2296e96a824212a1ef8125da19651322759f77
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 15 13:47:09 2014 +0100

    Resolves: fdo#85032 max len property of -1 -> crash
    
    Change-Id: Ief903c619204f01784e93fd5e2d582632cef032e
    (cherry picked from commit e45136f1ff9d817dfec27a6a20ba29fffc6c54bf)
    Reviewed-on: https://gerrit.libreoffice.org/11985
    Reviewed-by: Matthew Francis <mjay.francis at gmail.com>
    Tested-by: Matthew Francis <mjay.francis at gmail.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index f117e3f..906355f 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2437,7 +2437,7 @@ bool Edit::IsInsertMode() const
 
 void Edit::SetMaxTextLen(sal_Int32 nMaxLen)
 {
-    mnMaxTextLen = nMaxLen ? nMaxLen : EDIT_NOLIMIT;
+    mnMaxTextLen = nMaxLen > 0 ? nMaxLen : EDIT_NOLIMIT;
 
     if ( mpSubEdit )
         mpSubEdit->SetMaxTextLen( mnMaxTextLen );
commit c45c22d0faefb114ff5b58ad75633d3519027db9
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Oct 15 09:03:39 2014 +0000

    Resolves: #i63015# always default to WinAnsiEncoding...
    
    for non-symbol PDF-Type1 export
    
    Suggested-By: edv at gruene.de
    Reviewed-By: hdu at apache.org
    (cherry picked from commit b8186703cb43d2b57460cb23a7a4e3f989e95426)
    
    Conflicts:
    	vcl/source/gdi/pdfwriter_impl.cxx
    
    Change-Id: I02227724bff301133ac8ce5562ec5ca1ed94f136
    Reviewed-on: https://gerrit.libreoffice.org/11988
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 2f44dd5..5548629 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3491,7 +3491,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
                 "<</Type/Font/Subtype/Type1/BaseFont/" );
             appendName( aInfo.m_aPSName, aLine );
             aLine.append( "\n" );
-            if( !pFont->IsSymbolFont() &&  pEncoding == 0 )
+            if( !pFont->IsSymbolFont() )
                 aLine.append( "/Encoding/WinAnsiEncoding\n" );
             if( nToUnicodeStream )
             {
commit c9ec2401162b4fdea8ad9281fe95174ad6f48048
Author: Aurimas Fišeras <aurimas at members.fsf.org>
Date:   Sat Aug 23 11:56:42 2014 +0300

    added EUR as default currency to Lithuanian locale
    
    Change-Id: I08c82639da2acd5830fa69044b252217b69c5e62
    Reviewed-on: https://gerrit.libreoffice.org/11089
    Reviewed-by: Thomas Arnhold <thomas at arnhold.org>
    Tested-by: Thomas Arnhold <thomas at arnhold.org>
    (cherry picked from commit a150d06bc5cda4f18364256af859fd3e1ee70b4b)
    Signed-off-by: Andras Timar <andras.timar at collabora.com>

diff --git a/i18npool/source/localedata/data/lt_LT.xml b/i18npool/source/localedata/data/lt_LT.xml
index a7f8717..97839ab 100644
--- a/i18npool/source/localedata/data/lt_LT.xml
+++ b/i18npool/source/localedata/data/lt_LT.xml
@@ -413,7 +413,14 @@
     </Calendar>
   </LC_CALENDAR>
   <LC_CURRENCY>
-    <Currency default="true" usedInCompatibleFormatCodes="true">
+    <Currency default="true" usedInCompatibleFormatCodes="false">
+      <CurrencyID>EUR</CurrencyID>
+      <CurrencySymbol>€</CurrencySymbol>
+      <BankSymbol>EUR</BankSymbol>
+      <CurrencyName>Euras</CurrencyName>
+      <DecimalPlaces>2</DecimalPlaces>
+    </Currency>
+    <Currency default="false" usedInCompatibleFormatCodes="true">
       <CurrencyID>LTL</CurrencyID>
       <CurrencySymbol>Lt</CurrencySymbol>
       <BankSymbol>LTL</BankSymbol>
commit 5d0a7ac9fb258e421fd8afccc558a5e14fb026ac
Author: Charu Tyagi <charu.tyagi at ericsson.com>
Date:   Fri Jul 18 14:32:10 2014 +0530

    fdo#81486:custom property with the same name as Document Property not imported
    Change-Id: Ieb9cba7b8969787140d6db3b77765e3a15bf89e1
    Reviewed-on: https://gerrit.libreoffice.org/10381
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/11960
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index ffa4bae..41d12af 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
 #include <DomainMapper_Impl.hxx>
 #include <ConversionHelper.hxx>
 #include <SdtHelper.hxx>
@@ -2856,13 +2860,18 @@ void DomainMapper_Impl::handleAuthor
             //Lines, Manager, NameofApplication, ODMADocId, Pages,
             //Security,
         };
+        uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(m_xTextDocument, uno::UNO_QUERY);
+        uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties();
+        const uno::Reference< beans::XPropertyContainer > xUserProps = xDocumentProperties->getUserDefinedProperties();
+        uno::Reference<beans::XPropertySet>  xUserDefinedProps(xDocumentProperties->getUserDefinedProperties(), uno::UNO_QUERY_THROW);
+        uno::Reference<beans::XPropertySetInfo> xPropertySetInfo =  xUserDefinedProps->getPropertySetInfo();
         //search for a field mapping
         OUString sFieldServiceName;
         sal_uInt16 nMap = 0;
         for( ; nMap < sizeof(aDocProperties) / sizeof(DocPropertyMap);
             ++nMap )
         {
-            if (rFirstParam.equalsAscii(aDocProperties[nMap].pDocPropertyName))
+            if ((rFirstParam.equalsAscii(aDocProperties[nMap].pDocPropertyName)) && (!xPropertySetInfo->hasPropertyByName(rFirstParam)))
             {
                 sFieldServiceName =
                 OUString::createFromAscii
commit f60f27b1de0e48e80c27abfc13f173ff57c91ee0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Oct 14 16:31:13 2014 +0200

    bnc#800714 SwTxtFrm::FormatAdjust: still call SplitFrm if we have columns
    
    Regression from c5a8a2c3cbcee0175127a0662e3d820ea4deea22 (sw34bf05:
    i#84870 - method <SwTxtFrm::FormatAdjust(..)> - do not split text frame
    which only contains on as-character anchored object, 2011-03-11), the
    i#84870 fix was for a document which didn't have columns, and didn't
    consider that this causes a layout loop in case:
    
    1) There are two paragraphs in a section, having multiple columns.
    
    2) The second paragraph has fo:keep-together="always".
    
    In this case originally we tried to call SplitFrm(), realized that it
    didn't help, and then gave up. But after the change, we kept trying to
    satisfy the two conflicting requirements (balance content in the 3
    columns vs keep the second paragraph with the first one).
    
    Fix the problem by not calling SplitFrm() only in case we're not inside
    columns.
    
    (cherry picked from commit 2d35baed5e87ffe7ca371986391cdb3983cdd2b1)
    
    Conflicts:
    	sw/qa/extras/odfimport/odfimport.cxx
    
    Change-Id: I64e969ef5e8f519314f5613f8e6fae626ae085ce
    Reviewed-on: https://gerrit.libreoffice.org/11973
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/CppunitTest_sw_odfimport.mk b/sw/CppunitTest_sw_odfimport.mk
index 60424f6..e57d308 100644
--- a/sw/CppunitTest_sw_odfimport.mk
+++ b/sw/CppunitTest_sw_odfimport.mk
@@ -57,6 +57,9 @@ $(eval $(call gb_CppunitTest_use_components,sw_odfimport,\
 	embeddedobj/util/embobj \
     filter/source/config/cache/filterconfig1 \
     filter/source/storagefilterdetect/storagefd \
+	filter/source/odfflatxml/odfflatxml \
+	filter/source/xmlfilterdetect/xmlfd \
+	filter/source/xmlfilteradaptor/xmlfa \
     framework/util/fwk \
     i18npool/util/i18npool \
 	lingucomponent/source/languageguessing/guesslang \
diff --git a/sw/qa/extras/odfimport/data/bnc800714.fodt b/sw/qa/extras/odfimport/data/bnc800714.fodt
new file mode 100644
index 0000000..a759b7c
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/bnc800714.fodt
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+  <style:style style:name="P1" style:family="paragraph"/>
+  <style:style style:name="P2" style:family="paragraph">
+   <style:paragraph-properties fo:keep-with-next="always"/>
+  </style:style>
+  <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+   <style:graphic-properties style:vertical-pos="top" style:vertical-rel="baseline"/>
+  </style:style>
+  <style:style style:name="Sect1" style:family="section">
+   <style:section-properties text:dont-balance-text-columns="false" style:editable="false">
+    <style:columns fo:column-count="3" fo:column-gap="0cm">
+     <style:column style:rel-width="21845*" fo:start-indent="0cm" fo:end-indent="0cm"/>
+     <style:column style:rel-width="21845*" fo:start-indent="0cm" fo:end-indent="0cm"/>
+     <style:column style:rel-width="21845*" fo:start-indent="0cm" fo:end-indent="0cm"/>
+    </style:columns>
+   </style:section-properties>
+  </style:style>
+ </office:automatic-styles>
+ <office:body>
+  <office:text>
+   <text:p text:style-name="P1">Before.</text:p>
+   <text:section text:style-name="Sect1" text:name="Section1">
+    <text:p text:style-name="P2"><draw:frame draw:style-name="fr1" draw:name="Frame1" text:anchor-type="as-char" svg:width="2cm" draw:z-index="0">
+      <draw:text-box fo:min-height="0.439cm">
+       <text:p/>
+      </draw:text-box>
+     </draw:frame></text:p>
+    <text:p text:style-name="P1">Frame.</text:p>
+   </text:section>
+   <text:p text:style-name="P1">After.</text:p>
+  </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 36aa437..8ca92c0 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -14,6 +14,7 @@
 #include <com/sun/star/style/PageStyleLayout.hpp>
 #include <com/sun/star/table/XCell.hpp>
 #include <com/sun/star/table/BorderLine.hpp>
+#include <com/sun/star/text/XTextSection.hpp>
 #include <com/sun/star/text/XTextTable.hpp>
 
 #include <wrtsh.hxx>
@@ -513,6 +514,16 @@ DECLARE_ODFIMPORT_TEST(testAnnotationFormatting, "annotation-formatting.odt")
     CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(xParagraph, 2), "CharWeight"));
 }
 
+DECLARE_ODFIMPORT_TEST(testBnc800714, "bnc800714.fodt")
+{
+    // Document's second paragraph wants to be together with the third one, but:
+    // - it's in a section with multiple columns
+    // - contains a single as-char anchored frame
+    // This was a layout loop.
+    CPPUNIT_ASSERT(getProperty< uno::Reference<text::XTextSection> >(getParagraph(2), "TextSection").is());
+    CPPUNIT_ASSERT(getProperty<bool>(getParagraph(2), "ParaKeepTogether"));
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 1d688d8..3699c39 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -978,10 +978,15 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
                      ? 1 : 0;
     // --> OD #i84870#
     // no split of text frame, which only contains a as-character anchored object
-    const bool bOnlyContainsAsCharAnchoredObj =
+    bool bOnlyContainsAsCharAnchoredObj =
             !IsFollow() && nStrLen == 1 &&
             GetDrawObjs() && GetDrawObjs()->Count() == 1 &&
             (*GetDrawObjs())[0]->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR;
+
+    // Still try split text frame if we have columns.
+    if (FindColFrm())
+        bOnlyContainsAsCharAnchoredObj = false;
+
     if ( nNew && bOnlyContainsAsCharAnchoredObj )
     {
         nNew = 0;
commit 2715563f2cd2fd00d16cc72585ef597397e0db4f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Oct 14 15:21:25 2014 +0200

    readme: official builds don't actually run on Mac OS X 10.5
    
    Change-Id: I31c0ec00d08f1ddf0624f93d41d9ce5d9194039e
    Reviewed-on: https://gerrit.libreoffice.org/11969
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
    Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/readlicense_oo/docs/readme.xrm b/readlicense_oo/docs/readme.xrm
index df8a5e6..f14b315 100644
--- a/readlicense_oo/docs/readme.xrm
+++ b/readlicense_oo/docs/readme.xrm
@@ -34,7 +34,7 @@
 			<div class="MAC" id="SystemRequirements_OSX">
 				<ul>
 					<li>
-						<p id="macxiOSX" xml:lang="en-US">MacOSX 10.5 (Leopard) or higher, Intel or PowerPC processor</p>
+						<p id="macxiOSX" xml:lang="en-US">MacOSX 10.6 (Snow Leopard) or higher</p>
 					</li>
 				</ul>
 			</div>
commit 9a9575df840b32e80ba1b6325d1fbee22a1c509d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 9 11:13:10 2014 +0100

    Resolves: fdo#84809 crash when button is too short for text
    
    regression from 4c539fac018dfd44cd8db52161a8cb930c627da7
    
    commit 4c539fac018dfd44cd8db52161a8cb930c627da7
    Date:   Tue Dec 17 05:18:35 2013 -0600
        vcl get rid of xub_StrLen and STRING_LEN in outdev3
    
    before this there was a dubious cast which hid the problem
    
    Change-Id: I7c01c0f0ac211196a62acaf02297f29ae829403d
    (cherry picked from commit 3144b8deaf8397d719b7ad7a56b309655a53d90a)
    Reviewed-on: https://gerrit.libreoffice.org/11871
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index b7bb028..e426368 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1496,7 +1496,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
             long nMaxTextWidth = ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, _rLayout );
             nLines = (sal_Int32)(nHeight/nTextHeight);
             nFormatLines = aMultiLineInfo.Count();
-            if ( !nLines )
+            if (nLines <= 0)
                 nLines = 1;
             if ( nFormatLines > nLines )
             {
commit 3f4d7dd37f09198c6b846f4eacb79a236d2957eb
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sat Oct 11 14:18:10 2014 -0400

    fdo#80846: Broadcast changes before EndUndo().
    
    EndUndo() calls PostDataChanged(), which renders the recalculated formula
    cells.  Not broadcasting before EndUndo causes some dependent formula
    cells to not get recalculated.
    
    This one unfortunately is not currently unit-testable as this behavior
    depends on the presence of ScTabViewShell....
    
    Change-Id: I86288608b7f2627cda7c74be27a18029832775ef
    (cherry picked from commit 424bfaa773e58d6b609ac7f64907db4b542d1315)
    Reviewed-on: https://gerrit.libreoffice.org/11927
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 03edabf..6784134 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -170,12 +170,20 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
         SetChangeTrack();
     }
 
+    if (nFlags & IDF_CONTENTS)
+    {
+        // Broadcast only when the content changes. fdo#74687
+        if (mpDataSpans)
+            BroadcastChanges(*mpDataSpans);
+        else
+            BroadcastChanges(aRange);
+    }
+
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
     if ( !( (pViewShell) && pViewShell->AdjustRowHeight(
                                 aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
 /*A*/   pDocShell->PostPaint( aRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
 
-    pDocShell->PostDataChanged();
     if (pViewShell)
         pViewShell->CellContentChanged();
 
@@ -188,15 +196,6 @@ void ScUndoDeleteContents::Undo()
     DoChange( true );
     EndUndo();
 
-    if (nFlags & IDF_CONTENTS)
-    {
-        // Broadcast only when the content changes. fdo#74687
-        if (mpDataSpans)
-            BroadcastChanges(*mpDataSpans);
-        else
-            BroadcastChanges(aRange);
-    }
-
     HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange);
 }
 
@@ -206,10 +205,6 @@ void ScUndoDeleteContents::Redo()
     DoChange( false );
     EndRedo();
 
-    if (nFlags & IDF_CONTENTS)
-        // Broadcast only when the content changes. fdo#74687
-        BroadcastChanges(aRange);
-
     HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange);
 }
 
commit 54425ca38fe88de0e303db75fb6a54a6926fbd9d
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sun Oct 12 10:18:09 2014 -0400

    fdo#83901: ROW() and COLUMN() to be properly recalculated on cell move.
    
    For cases where ROW or COLUMN references another cell that has shifted.
    
    Change-Id: Ic4bef8672dab811ceff6886d9af0388306a66485
    (cherry picked from commit 0b29a16d1dcffd75e49bd7ad3da867b0d0ebfa38)
    Reviewed-on: https://gerrit.libreoffice.org/11934
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 1676e1b..42da658 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2096,6 +2096,12 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void>
             if (pCode->IsRecalcModeOnRefMove())
                 aRes.mbValueChanged = true;
         }
+        else if (aRes.mbReferenceModified && pCode->IsRecalcModeOnRefMove())
+        {
+            // The cell itself hasn't shifted. But it may have ROW or COLUMN
+            // referencing another cell that has.
+            aRes.mbValueChanged = true;
+        }
 
         if (aRes.mbNameModified)
             recompileTokenArray(*pTop);
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 2059aee..96eb323 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2758,7 +2758,7 @@ bool ScFormulaCell::UpdateReferenceOnShift(
 
     if (bOnRefMove)
         // Cell may reference itself, e.g. ocColumn, ocRow without parameter
-        bOnRefMove = (bValChanged || (aPos != aOldPos));
+        bOnRefMove = (bValChanged || (aPos != aOldPos) || bRefModified);
 
     bool bNewListening = false;
     bool bInDeleteUndo = false;
commit 96e482e08826ce0aed2f39b7643730fb41b7f608
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Oct 10 16:21:29 2014 +0200

    fdo#84679 RTF import: fix paragraph spacing handling in tables
    
    Regression from commit 1be0a3fa9ebb22b607c54b47739d4467acfed259
    (n#825305: writerfilter RTF import: override style properties like Word,
    2014-06-17), we failed to do the proper deduplication in buffered
    content, like tables. Fix this by adapting
    RTFDocumentImpl::replayBuffer() to RTFDocumentImpl::checkNeedPap(),
    which already did the proper deduplication.
    
    To be fair, the inconsistency was there earlier since
    9f5263c477b82fef5aa9c3e79fb6af92aa049e24 (fdo#44736 RTF import: ignore
    direct formatting which equals to style, 2012-11-25), but it caused no
    real harm earlier.
    
    (cherry picked from commit e34906d20c9febc420b115fa2a8b171826dea0be)
    
    Change-Id: I0673408088d9d83768f0780ea92ece87913d03f3
    Reviewed-on: https://gerrit.libreoffice.org/11914
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/extras/rtfimport/data/fdo84679.rtf b/sw/qa/extras/rtfimport/data/fdo84679.rtf
new file mode 100644
index 0000000..64611be
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo84679.rtf
@@ -0,0 +1,12 @@
+{\rtf1
+{\stylesheet
+{\ql \sa160\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 
+\af31507\afs28\alang1054 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext0 \sqformat \spriority0 Normal;}
+}
+\pard\plain\par
+\trowd
+\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10\cellx3121
+\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10\cellx6238
+A1\cell A2\cell \row
+\pard\plain\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 12c6b52..cc51a42 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1887,6 +1887,17 @@ DECLARE_RTFIMPORT_TEST(testPictureWrapPolygon, "picture-wrap-polygon.rtf")
     CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(-67)), getProperty<sal_Int32>(getShape(1), "VertOrientPosition"));
 }
 
+DECLARE_RTFIMPORT_TEST(testFdo84679, "fdo84679.rtf")
+{
+    // The problem was that the paragraph in A1 had some bottom margin, but it should not.
+    uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+    uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+    uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+    // This was 282.
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 9f35f26..3fdc5ef 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -445,7 +445,9 @@ void RTFDocumentImpl::setNeedSect(bool bNeedSect)
 
 writerfilter::Reference<Properties>::Pointer_t RTFDocumentImpl::getProperties(RTFSprms& rAttributes, RTFSprms& rSprms)
 {
-    int nStyle = m_aStates.top().nCurrentStyleIndex;
+    int nStyle = 0;
+    if (!m_aStates.empty())
+        nStyle = m_aStates.top().nCurrentStyleIndex;
     RTFReferenceTable::Entries_t::iterator it = m_aStyleTableEntries.find(nStyle);
     if (it != m_aStyleTableEntries.end())
     {
@@ -1402,10 +1404,9 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer,
         rBuffer.pop_front();
         if (boost::get<0>(aTuple) == BUFFER_PROPS)
         {
+            // Construct properties via getProperties() and not directly, to take care of deduplication.
             writerfilter::Reference<Properties>::Pointer_t const pProp(
-                new RTFReferenceProperties(
-                    boost::get<1>(aTuple)->getAttributes(),
-                    boost::get<1>(aTuple)->getSprms())
+                getProperties(boost::get<1>(aTuple)->getAttributes(), boost::get<1>(aTuple)->getSprms())
             );
             Mapper().props(pProp);
         }
commit 91d47fea73c906ce36666140f6a51aa9f7b726ec
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Oct 5 21:14:46 2014 +0200

    fdo#84073: change ODBC/JDBC escapes to lowercase
    
    Change-Id: I19ce3acb9575fbef8273bbd84cb4dc322e101ac8
    Reviewed-on: https://gerrit.libreoffice.org/11885
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index 1f63db8..1cab87e 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -136,7 +136,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
                     if ( bOk )
                     {
                         if (bQuote)
-                            aRet.appendAscii("{TS '");
+                            aRet.appendAscii("{ts '");
                         aRet.append(DBTypeConversion::toDateTimeString(aDateTime));
                         if (bQuote)
                             aRet.appendAscii("'}");
@@ -166,7 +166,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
                         bOk = _rVal >>= aDate;
                     OSL_VERIFY_RES( bOk, "DBTypeConversion::toSQLString: _rVal is not date!");
                     if (bQuote)
-                        aRet.appendAscii("{D '");
+                        aRet.appendAscii("{d '");
                     aRet.append(DBTypeConversion::toDateString(aDate));
                     if (bQuote)
                         aRet.appendAscii("'}");
@@ -193,7 +193,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
                         bOk = _rVal >>= aTime;
                     OSL_VERIFY_RES( bOk,"DBTypeConversion::toSQLString: _rVal is not time!");
                     if (bQuote)
-                        aRet.appendAscii("{T '");
+                        aRet.appendAscii("{t '");
                     aRet.append(DBTypeConversion::toTimeString(aTime));
                     if (bQuote)
                         aRet.appendAscii("'}");
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 231c9e1..a5b9f2f 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -4638,6 +4638,14 @@ OString OSQLParser::TokenIDToStr(sal_uInt32 nTokenID, const IParseContext* pCont
 		aStr = yytname[YYTRANSLATE(nTokenID)];
 		if(aStr.startsWith("SQL_TOKEN_"))
 			aStr = aStr.copy(10);
+		switch( nTokenID )
+		{
+			case SQL_TOKEN_OJ:
+			case SQL_TOKEN_TS:
+			case SQL_TOKEN_T:
+			case SQL_TOKEN_D:
+				aStr = aStr.toAsciiLowerCase();
+		}
 	}
 	return aStr;
 }
diff --git a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
index fc9a5a6..8d6eec6 100644
--- a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
+++ b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
@@ -51,7 +51,7 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase
             + " OR ( \"ID\" = 3 AND \"Postal\" = '6' AND \"Address\" = '7' )"
             + " OR ( \"Address\" = '8' )"
             + " OR ( \"Postal\" = '9' )"
-            + " OR ( NOW( ) = {D '2010-01-01' } )";
+            + " OR ( NOW( ) = {d '2010-01-01' } )";
     private final static String INNERPRODUCTSQUERY = "products (inner)";
 
 
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 1bfb73c..33bab8f 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1073,7 +1073,7 @@ namespace
                                     {
                                         // create outer join
                                         if ( bUseEscape )
-                                            aStr += "{ OJ ";
+                                            aStr += "{ oj ";
                                         aStr += aJoin;
                                         if ( bUseEscape )
                                             aStr += " }";
diff --git a/dbaccess/uiconfig/ui/specialsettingspage.ui b/dbaccess/uiconfig/ui/specialsettingspage.ui
index 3574615..0072f8c 100644
--- a/dbaccess/uiconfig/ui/specialsettingspage.ui
+++ b/dbaccess/uiconfig/ui/specialsettingspage.ui
@@ -76,7 +76,7 @@
             </child>
             <child>
               <object class="GtkCheckButton" id="useoj">
-                <property name="label" translatable="yes">Use Outer Join syntax '{OJ }'</property>
+                <property name="label" translatable="yes">Use Outer Join syntax '{oj }'</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
commit 2831b55105f4505e79b51071cf2a43008a19c8a2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 9 16:08:22 2014 +0100

    Resolves: fdo#65823 crash on negative position in redlined word
    
    there is possibly something deeper wrong here I think after all, see
    946ea643185af680508a0333f63c086ed3f454a3 Resolves: fdo#84649 as well but for
    now silence this and I can investigate further later
    
    Change-Id: I1323584d1f71c14634d56ad4e4a705496b1bd1c0
    (cherry picked from commit d7418f8831acdff907d404c1701870b00e974df6)
    Reviewed-on: https://gerrit.libreoffice.org/11884
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index 0e3aeea..9aec54d 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -105,7 +105,7 @@ sal_uInt16 SwBreakIt::GetRealScriptOfText( const OUString& rTxt, sal_Int32 nPos
             --nPos;
         nScript = xBreak->getScriptType( rTxt, nPos );
         sal_Int32 nChgPos = 0;
-        if ( i18n::ScriptType::WEAK == nScript && nPos + 1 < rTxt.getLength() )
+        if (i18n::ScriptType::WEAK == nScript && nPos >= 0 && nPos + 1 < rTxt.getLength())
         {
             // A weak character followed by a mark may be meant to combine with
             // the mark, so prefer the following character's script
commit ae7807ab66000823687219e23c9226ddf408ff10
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 9 15:40:08 2014 +0100

    Resolves: fdo#60904 allow export of VBAProject
    
    xModLibContainerExport has a "VBAProject" entry but
    xDlgLibContainerExport doesn't, so just export the
    one we do have
    
    Change-Id: I15f7794904a5aff7679f2cf9fd654d741fd5cbe3
    Reviewed-on: https://gerrit.libreoffice.org/11883
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 598a170..c04bbda 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1104,8 +1104,14 @@ void LibPage::implExportLib( const OUString& aLibName, const OUString& aTargetUR
     if ( xModLibContainerExport.is() )
         xModLibContainerExport->exportLibrary( aOULibName, aTargetURL, Handler );
 
-    if ( xDlgLibContainerExport.is() )
-        xDlgLibContainerExport->exportLibrary( aOULibName, aTargetURL, Handler );
+    if (!xDlgLibContainerExport.is())
+        return;
+    Reference<container::XNameAccess> xNameAcc(xDlgLibContainerExport, UNO_QUERY);
+    if (!xNameAcc.is())
+        return;
+    if (!xNameAcc->hasByName(aOULibName))
+        return;
+    xDlgLibContainerExport->exportLibrary(aOULibName, aTargetURL, Handler);
 }
 
 // Implementation XCommandEnvironment
commit 8f53a54249e04f255256b8d9b4c55242a16893f6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 9 13:50:20 2014 +0100

    Resolves: fdo#82270 Grabbing focus can invalidate the entries
    
    Change-Id: Ie9b4f936cebdcf2a37e66abef456c6b0c0e26201
    (cherry picked from commit fef9bf4e39b041c7f13e4d1584e3086068e781fc)
    Reviewed-on: https://gerrit.libreoffice.org/11878
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 79ae60b..d08660d 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2049,6 +2049,8 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
         nCurTabPos = FIRST_ENTRY_TAB;
     nFlags &= (~F_FILLING);
     pView->GrabFocus();
+    //fdo#82270 Grabbing focus can invalidate the entries, re-fetch
+    pEntry = GetEntry(aPos);
     // the entry can still be invalid!
     if( !pEntry || !pView->GetViewData( pEntry ))
         return;
commit 715ed4b3f9675ddcd1e311d4fff96a87d84c553f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 9 10:38:34 2014 +0100

    Resolves: fdo#55546 center ellipsis tooltips that don't fit on screen
    
    (cherry picked from commit 912ecaf565e68d2ca3fb9584712313e712749f75)
    
    Conflicts:
    	sw/source/uibase/docvw/edtwin2.cxx
    	sw/source/uibase/inc/edtwin.hxx
    
    Change-Id: Ic44c9032878892fa33c839e5aaac1996e7bed943
    Reviewed-on: https://gerrit.libreoffice.org/11874
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/uibase/docvw/edtwin2.cxx b/sw/source/core/uibase/docvw/edtwin2.cxx
index bbcaaf1..9fd7355 100644
--- a/sw/source/core/uibase/docvw/edtwin2.cxx
+++ b/sw/source/core/uibase/docvw/edtwin2.cxx
@@ -94,6 +94,17 @@ static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon )
     return sBuf.makeStringAndClear();
 }
 
+OUString SwEditWin::ClipLongToolTip(const OUString& rTxt)
+{
+    OUString sDisplayTxt(rTxt);
+    long nTextWidth = GetTextWidth(sDisplayTxt);
+    long nMaxWidth = GetDesktopRectPixel().GetWidth() * 2 / 3;
+    nMaxWidth = PixelToLogic(Size(nMaxWidth, 0)).Width();
+    if (nTextWidth > nMaxWidth)
+        sDisplayTxt = GetEllipsisString(sDisplayTxt, nMaxWidth, TEXT_DRAW_CENTERELLIPSIS);
+    return sDisplayTxt;
+}
+
 void SwEditWin::RequestHelp(const HelpEvent &rEvt)
 {
     SwWrtShell &rSh = m_rView.GetWrtShell();
@@ -369,7 +380,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
                     aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() ));
                     aRect.Right()  = aPt.X();
                     aRect.Bottom() = aPt.Y();
-                    Help::ShowQuickHelp( this, aRect, sTxt, nStyle );
+                    OUString sDisplayTxt(ClipLongToolTip(sTxt));
+                    Help::ShowQuickHelp(this, aRect, sDisplayTxt, nStyle);
                 }
             }
 
@@ -410,7 +422,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
                 sTxt = SW_RESSTR(nTabRes);
                 Size aTxtSize( GetTextWidth(sTxt), GetTextHeight());
                 Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize);
-                Help::ShowQuickHelp(this, aRect, sTxt);
+                OUString sDisplayTxt(ClipLongToolTip(sTxt));
+                Help::ShowQuickHelp(this, aRect, sDisplayTxt);
             }
             bContinue = false;
         }
diff --git a/sw/source/core/uibase/inc/edtwin.hxx b/sw/source/core/uibase/inc/edtwin.hxx
index aade966..7e5396d 100644
--- a/sw/source/core/uibase/inc/edtwin.hxx
+++ b/sw/source/core/uibase/inc/edtwin.hxx
@@ -285,6 +285,11 @@ public:
     void    SetUseInputLanguage( bool bNew );
     bool    IsUseInputLanguage() const { return m_bUseInputLanguage; }
 
+    /** fdo#55546 cut very long tooltips to 2/3 of the width of the screen
+        via center ellipsis
+     */
+    OUString ClipLongToolTip(const OUString& rTxt);
+
     SwFrameControlsManager& GetFrameControlsManager() { return m_aFrameControlsManager; }
 
     SwEditWin(Window *pParent, SwView &);
commit 0fae4a0b8b87f5a8ad8631d3a255ab5bdcbf8db8
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Mon Oct 6 12:22:03 2014 +0200

    fdo#84658 on reexec, cancel modification before resetting IsModification state
    
    Change-Id: I878bff4d36ca1c2dd9474c937b03d0b366a6e911
    Reviewed-on: https://gerrit.libreoffice.org/11824
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 216e2da..c136c03 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -561,6 +561,8 @@ void ORowSet::freeResources( bool _bComplete )
     }
     m_aClones.clear();
 
+    doCancelModification();
+
     m_aBookmark     = Any();
     m_bBeforeFirst  = true;
     m_bAfterLast    = false;
commit 8ba9755b7314bc7233a714ac74991a1fee3de726
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Oct 9 23:40:29 2014 +0200

    Avoid bashizm in AbsolutePath() function
    
    &> is another bashizm. Avoid that since configure is run using POSIX
    shell. Some POSIX compatible shells like mksh do not understand bash
    syntax.
    
    "cd - &> /dev/null" was causing "cd -" command to go into background
    which means we never changed back to original directory thus fooling
    configure script later:
    
    config.status: error: cannot find input file: `config_host.mk.in'
    
    "&>" was also redirecting stderr which we don't want to do anymore since
    it hides real and interesting errors.
    
    Change-Id: I286a32e6a200afca883b159d9196f606e0fe7063
    Reviewed-on: https://gerrit.libreoffice.org/11896
    Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
    Tested-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
    (cherry picked from commit d5b0697cebd7d66ee90d12f7b893c193ae36eaa6)
    Reviewed-on: https://gerrit.libreoffice.org/11897
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/configure.ac b/configure.ac
index af8021f..0d80786 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,7 +72,7 @@ AbsolutePath()
     if test -d "$rel" ; then
         cd "$rel" || AC_MSG_ERROR([absolute path resolution failed for "$rel".])
         absolute_path="$(pwd)"
-        cd - &> /dev/null
+        cd - > /dev/null
     else
         AC_MSG_ERROR([Failed to resolve absolute path.  "$rel" does not exist or is not a directory.])
     fi
commit a48b20c3f6a5ef02a554336339d5823acaae8aeb
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Oct 9 21:10:35 2014 +0200

    InsertCurrentTime: in input mode inherit matching format if set
    
    In case a date or time cell format was set, inherit that format for
    Ctrl+; or Ctrl+: date/time insertion while editing the cell.
    
    Change-Id: If13e680fc74ab36611f8c11d992dba4b9c91ddb4
    (cherry picked from commit 980fd719648fb5b7cbe93ba23c1ee2f180ffcee8)
    Reviewed-on: https://gerrit.libreoffice.org/11893
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 1af27f9..b65eaf3 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -268,22 +268,29 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
     const sal_uInt32 nCurNumFormat = rDoc.GetNumberFormat(aCurPos);
     SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
     const SvNumberformat* pCurNumFormatEntry = pFormatter->GetEntry(nCurNumFormat);
+    const short nCurNumFormatType = (pCurNumFormatEntry ?
+            (pCurNumFormatEntry->GetType() & ~NUMBERFORMAT_DEFINED) : NUMBERFORMAT_UNDEFINED);
 
     if (bInputMode)
     {
         double fVal = 0.0;
+        sal_uInt32 nFormat = 0;
         switch (nReqFmt)
         {
             case NUMBERFORMAT_DATE:
                 {
                     Date aActDate( Date::SYSTEM );
                     fVal = aActDate - *pFormatter->GetNullDate();
+                    if (nCurNumFormatType == NUMBERFORMAT_DATE)
+                        nFormat = nCurNumFormat;
                 }
                 break;
             case NUMBERFORMAT_TIME:
                 {
                     Time aActTime( Time::SYSTEM );
                     fVal = aActTime.GetTimeInDays();
+                    if (nCurNumFormatType == NUMBERFORMAT_TIME)
+                        nFormat = nCurNumFormat;
                 }
                 break;
             default:
@@ -294,15 +301,20 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
                 {
                     DateTime aActDateTime( DateTime::SYSTEM );
                     fVal = aActDateTime - DateTime( *pFormatter->GetNullDate());
+                    if (nCurNumFormatType == NUMBERFORMAT_DATETIME)
+                        nFormat = nCurNumFormat;
                 }
                 break;
         }
 
-        LanguageType nLang = (pCurNumFormatEntry ? pCurNumFormatEntry->GetLanguage() : ScGlobal::eLnge);
-        sal_uInt32 nFormat = pFormatter->GetStandardFormat( nReqFmt, nLang);
-        // This would return a more precise format with seconds and 100th
-        // seconds for a time request.
-        //nFormat = pFormatter->GetStandardFormat( fVal, nFormat, nReqFmt, nLang);
+        if (!nFormat)
+        {
+            const LanguageType nLang = (pCurNumFormatEntry ? pCurNumFormatEntry->GetLanguage() : ScGlobal::eLnge);
+            nFormat = pFormatter->GetStandardFormat( nReqFmt, nLang);
+            // This would return a more precise format with seconds and 100th
+            // seconds for a time request.
+            //nFormat = pFormatter->GetStandardFormat( fVal, nFormat, nReqFmt, nLang);
+        }
         OUString aString;
         Color* pColor;
         pFormatter->GetOutputString( fVal, nFormat, aString, &pColor);
@@ -318,8 +330,6 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
     }
     else
     {
-        const short nCurNumFormatType = (pCurNumFormatEntry ?
-                (pCurNumFormatEntry->GetType() & ~NUMBERFORMAT_DEFINED) : NUMBERFORMAT_UNDEFINED);
         bool bForceReqFmt = false;
         const double fCell = rDoc.GetValue( aCurPos);
         // Combine requested date/time stamp with existing cell time/date, if any.
commit f6c001df20aa8844f55d760b86283cd0c85dca7b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 29 16:58:50 2014 +0100

    bump nss from 3.15.3 to 3.16.5
    
    Reviewed-on: https://gerrit.libreoffice.org/11700
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 726172e3eb8370125b89f853cebb1fb901547ebe)
    Signed-off-by: Michael Stahl <mstahl at redhat.com>
    
    Conflicts:
    	external/nss/ExternalProject_nss.mk
    	external/nss/nspr-build-config.patch
    	external/nss/nss_macosx.patch
    
    Change-Id: I8318982eb1cee1a694dbdd504e0ca106a29d807e

diff --git a/download.lst b/download.lst
index 9c0de03..6f26f2e 100644
--- a/download.lst
+++ b/download.lst
@@ -103,7 +103,7 @@ export MWAW_TARBALL := libmwaw-0.3.1.tar.bz2
 export MYSQLCPPCONN_TARBALL := 0981bda6548a8c8233ffce2b6e4b2a23-mysql-connector-c++-1.1.0.tar.gz
 export MYTHES_TARBALL := 46e92b68e31e858512b680b3b61dc4c1-mythes-1.2.3.tar.gz
 export NEON_TARBALL := ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz
-export NSS_TARBALL := 06beb053e257d9e22641339c905c6eba-nss-3.15.3-with-nspr-4.10.2.tar.gz
+export NSS_TARBALL := b279551b7638d0e36d1199548124c247-nss-3.16.5-with-nspr-4.10.6.tar.gz
 export ODFGEN_MD5SUM := c22c83c17cda0754382ada4e116594b7
 export ODFGEN_TARBALL := libodfgen-0.1.1.tar.bz2
 export OPENCOLLADA_MD5SUM := 4ca8a6ef0afeefc864e9ef21b9f14bd6
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index 8fd1085..d88810f 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,nss,\
 
 $(call gb_ExternalProject_get_state_target,nss,configure):
 	$(call gb_ExternalProject_run,configure,\
-		$(if $(filter MSC,$(COM)),LIB="$(ILIB)") \
+		$(if $(filter MSC,$(COM)),INCLUDE="$(COMPATH)/include" LIB="$(ILIB)") \
 		nspr/configure --includedir=$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/include \
 			$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
 			$(if $(filter MSC-X86_64,$(COM)-$(CPUNAME)),--enable-64bit) \
diff --git a/external/nss/nss-linux-x86.patch.0 b/external/nss/nss-linux-x86.patch.0
index e23a786..95a489b 100644
--- a/external/nss/nss-linux-x86.patch.0
+++ b/external/nss/nss-linux-x86.patch.0
@@ -1,10 +1,10 @@
---- nss/lib/freebl/Makefile
-+++ nss/lib/freebl/Makefile
-@@ -195,6 +195,7 @@
- ifeq ($(CPU_ARCH),x86)
-     ASFILES  = mpi_x86.s
+--- nss/lib/freebl/Makefile	2014-09-29 16:52:50.356265282 +0100
++++ nss/lib/freebl/Makefile	2014-09-29 16:53:01.823340024 +0100
+@@ -110,6 +110,7 @@
+ ifeq (OS2,$(OS_TARGET))
+     ASFILES  = mpi_x86_os2.s
      DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE 
 +    DEFINES += -DMP_USE_UINT_DIGIT
      DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
+     DEFINES += -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
      DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
-     # The floating point ECC code doesn't work on Linux x86 (bug 311432).
diff --git a/external/nss/nss-pem.patch b/external/nss/nss-pem.patch
index c2f34fe..c3f28bc 100644
--- a/external/nss/nss-pem.patch
+++ b/external/nss/nss-pem.patch
@@ -5230,7 +5230,7 @@ new file mode 100644
 index 0000000..1179f2a
 --- /dev/null
 +++ b/b/nss/lib/ckfw/pem/rsawrapr.c
-@@ -0,0 +1,808 @@
+@@ -0,0 +1,823 @@
 +/*
 + * PKCS#1 encoding and decoding functions.
 + * This file is believed to contain no code licensed from other parties.
@@ -5435,6 +5435,21 @@ index 0000000..1179f2a
 +}
 +
 +/*
++ * RSA block types
++ *
++ * The actual values are important -- they are fixed, *not* arbitrary.
++ * The explicit value assignments are not needed (because C would give
++ * us those same values anyway) but are included as a reminder...
++ */
++typedef enum {
++    RSA_BlockPrivate0 = 0,      /* unused, really */
++    RSA_BlockPrivate = 1,       /* pad for a private-key operation */
++    RSA_BlockPublic = 2,        /* pad for a public-key operation */
++    RSA_BlockRaw = 4,           /* simply justify the block appropriately */
++    RSA_BlockTotal
++} RSA_BlockType;
++
++/*
 + * Format one block of data for public/private key encryption using
 + * the rules defined in PKCS #1.
 + */
diff --git a/external/nss/nss.aix.patch b/external/nss/nss.aix.patch
index c83ae57..da9aacb 100644
--- a/external/nss/nss.aix.patch
+++ b/external/nss/nss.aix.patch
@@ -1,16 +1,7 @@
---- a/a/nspr/configure	2010-08-18 07:23:01.000000000 -0500
-+++ b/b/nspr/configure	2010-08-18 07:33:11.000000000 -0500
-@@ -2973,7 +2973,8 @@
- #define SYSV 1
- EOF
- 
--    DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
-+    MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@'
-+    DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib'
-     ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
- echo "configure:3477: checking for sys/atomic_op.h" >&5
-@@ -3102,7 +3103,6 @@
+diff -ru a/nspr/configure b/nspr/configure
+--- a/a/nspr/configure	2014-09-29 16:47:42.984012225 +0100
++++ b/b/nspr/configure	2014-09-29 16:50:33.907375937 +0100
+@@ -6369,7 +6369,6 @@
          AIX_LINK_OPTS='-brtl -bnso -berok'
          ;;
      esac
@@ -18,9 +9,10 @@
      AIX_WRAP='$(DIST)/lib/aixwrap.o'
      AIX_TMP='./_aix_tmp.o'
      if test -n "$USE_64"; then
---- a/a/nspr/configure.in	2010-08-18 07:23:01.000000000 -0500
-+++ b/b/nspr/configure.in	2010-08-18 07:32:36.000000000 -0500
-@@ -831,7 +831,8 @@
+diff -ru a/nspr/configure.in b/nspr/configure.in
+--- a/a/nspr/configure.in	2014-09-29 16:46:35.257394860 +0100
++++ b/b/nspr/configure.in	2014-09-29 16:50:33.908375942 +0100
+@@ -1229,7 +1229,8 @@
      AC_DEFINE(XP_UNIX)
      AC_DEFINE(AIX)
      AC_DEFINE(SYSV)
@@ -30,7 +22,7 @@
      AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
      case "${target_os}" in
      aix3.2*)
-@@ -871,10 +872,9 @@
+@@ -1269,10 +1270,9 @@
          AC_DEFINE(HAVE_SOCKLEN_T)
          AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
          USE_IPV6=1
@@ -42,9 +34,10 @@
      AIX_WRAP='$(DIST)/lib/aixwrap.o'
      AIX_TMP='./_aix_tmp.o'
      if test -n "$USE_64"; then
---- a/a/nspr/pr/src/Makefile.in	2010-08-18 07:23:04.000000000 -0500
-+++ b/b/nspr/pr/src/Makefile.in	2010-08-18 07:24:49.000000000 -0500
-@@ -110,7 +110,6 @@
+diff -ru a/nspr/pr/src/Makefile.in b/nspr/pr/src/Makefile.in
+--- a/a/nspr/pr/src/Makefile.in	2014-09-29 16:46:35.281395079 +0100
++++ b/b/nspr/pr/src/Makefile.in	2014-09-29 16:50:33.909375948 +0100
+@@ -74,7 +74,6 @@
  endif
  
  ifeq ($(OS_ARCH),AIX)
@@ -52,9 +45,58 @@
  OS_LIBS		= -lodm -lcfg
  ifeq ($(CLASSIC_NSPR),1)
  ifeq ($(OS_RELEASE),4.1)
---- a/a/nss/coreconf/AIX.mk	2010-08-18 07:23:06.000000000 -0500
-+++ b/b/nss/coreconf/AIX.mk	2010-08-18 07:26:26.000000000 -0500
-@@ -62,35 +62,30 @@
+diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
+--- a/a/nss/cmd/platlibs.mk	2014-09-29 16:47:42.987012253 +0100
++++ b/b/nss/cmd/platlibs.mk	2014-09-29 16:50:33.910375955 +0100
+@@ -134,7 +134,7 @@
+ 	$(NULL)
+ 
+ ifeq ($(OS_ARCH), AIX) 
+-EXTRA_SHARED_LIBS += -brtl 
++EXTRA_SHARED_LIBS += -Wl,-brtl 
+ endif
+ 
+ # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
+@@ -180,7 +180,7 @@
+ 	$(NULL)
+ 
+ ifeq ($(OS_ARCH), AIX) 
+-EXTRA_SHARED_LIBS += -brtl 
++EXTRA_SHARED_LIBS += -Wl,-brtl 
+ endif
+ 
+ # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
+diff -ru a/nss/cmd/shlibsign/Makefile b/nss/cmd/shlibsign/Makefile
+--- a/a/nss/cmd/shlibsign/Makefile	2014-09-29 16:46:35.139393785 +0100
++++ b/b/nss/cmd/shlibsign/Makefile	2014-09-29 16:50:33.910375955 +0100
+@@ -43,6 +43,9 @@
+ 
+ endif
+ 
++ifeq ($(OS), AIX)
++EXTRA_SHARED_LIBS += -lpthreads
++endif
+ 
+ # sign any and all shared libraries that contain the word freebl
+ ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1)
+diff -ru a/nss/cmd/shlibsign/mangle/Makefile b/nss/cmd/shlibsign/mangle/Makefile
+--- a/a/nss/cmd/shlibsign/mangle/Makefile	2014-09-29 16:46:35.139393785 +0100
++++ b/b/nss/cmd/shlibsign/mangle/Makefile	2014-09-29 16:50:33.910375955 +0100
+@@ -43,7 +43,9 @@
+ 
+ endif
+ 
+-
++ifeq ($(OS), AIX)
++EXTRA_SHARED_LIBS += -lpthreads
++endif
+ 
+ #######################################################################
+ # (5) Execute "global" rules. (OPTIONAL)                              #
+diff -ru a/nss/coreconf/AIX.mk b/nss/coreconf/AIX.mk
+--- a/a/nss/coreconf/AIX.mk	2014-09-29 16:46:35.040392883 +0100
++++ b/b/nss/coreconf/AIX.mk	2014-09-29 16:50:33.909375948 +0100
+@@ -30,35 +30,30 @@
  
  DEFAULT_COMPILER = xlc_r
  
@@ -96,48 +138,3 @@
  ifeq ($(USE_64), 1)
  	OS_CFLAGS	+= -DAIX_64BIT
  	OBJECT_MODE=64
---- a/a/nss/cmd/platlibs.mk	2010-08-18 07:23:18.000000000 -0500
-+++ b/b/nss/cmd/platlibs.mk	2010-08-18 07:26:48.000000000 -0500
-@@ -136,7 +136,7 @@
- 	$(NULL)
- 
- ifeq ($(OS_ARCH), AIX) 
--EXTRA_SHARED_LIBS += -brtl 
-+EXTRA_SHARED_LIBS += -Wl,-brtl 
- endif
- 
- # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
-@@ -186,7 +186,7 @@
- 	$(NULL)
- 
- ifeq ($(OS_ARCH), AIX) 
--EXTRA_SHARED_LIBS += -brtl 
-+EXTRA_SHARED_LIBS += -Wl,-brtl 
- endif
- 
- # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
---- a/a/nss/cmd/shlibsign/mangle/Makefile	2010-08-18 07:23:20.000000000 -0500
-+++ b/b/nss/cmd/shlibsign/mangle/Makefile	2010-08-18 07:42:44.000000000 -0500
-@@ -75,7 +75,9 @@
- 
- endif
- 
--
-+ifeq ($(OS), AIX)
-+EXTRA_SHARED_LIBS += -lpthreads
-+endif
- 
- #######################################################################
- # (5) Execute "global" rules. (OPTIONAL)                              #
---- a/a/nss/cmd/shlibsign/Makefile	2010-08-18 08:00:17.000000000 -0500
-+++ b/b/nss/cmd/shlibsign/Makefile	2010-08-18 07:55:55.000000000 -0500
-@@ -45,6 +45,9 @@
- 
- endif
- 
-+ifeq ($(OS), AIX)
-+EXTRA_SHARED_LIBS += -lpthreads
-+endif
- 
- # sign any and all shared libraries that contain the word freebl
- ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1)
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index 95a0049..6a01ca8 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -1,6 +1,7 @@
---- a/a/nspr/configure	2010-02-08 19:41:35.000000000 +0100
-+++ b/b/nspr/configure	2010-06-11 16:35:54.960188991 +0200
-@@ -3900,7 +3900,7 @@
+diff -ru a/nspr/configure b/nspr/configure
+--- a/a/nspr/configure	2014-09-29 16:46:38.427423757 +0100
++++ b/b/nspr/configure	2014-09-29 16:47:42.984012225 +0100
+@@ -7018,7 +7018,7 @@
      PR_MD_CSRCS=linux.c
      MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
      DSO_CFLAGS=-fPIC
@@ -9,9 +10,61 @@
      _OPTIMIZE_FLAGS=-O2
      _DEBUG_FLAGS="-g -fno-inline"  # most people on linux use gcc/gdb, and that
                                     # combo is not yet good at debugging inlined
---- a/a/nss/coreconf/FreeBSD.mk	2009-11-23 05:06:29.000000000 -0500
-+++ b/b/nss/coreconf/FreeBSD.mk	2012-08-28 20:27:20.000000000 -0400
-@@ -57,6 +57,7 @@
+diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
+--- a/a/nss/cmd/platlibs.mk	2014-09-29 16:46:38.306422654 +0100
++++ b/b/nss/cmd/platlibs.mk	2014-09-29 16:47:42.987012253 +0100
+@@ -10,17 +10,22 @@
+ 
+ ifeq ($(OS_ARCH), SunOS) 
+ ifeq ($(USE_64), 1)
+-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
++#In OOo we would probable put the executables next to libs
++EXTRA_SHARED_LIBS += -R '$$ORIGIN'
+ else
+-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
++EXTRA_SHARED_LIBS += -R '$$ORIGIN'
+ endif
+ endif
+ 
++ifeq ($(OS_ARCH), FreeBSD)
++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
++endif
++
+ ifeq ($(OS_ARCH), Linux)
+ ifeq ($(USE_64), 1)
+-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
+ else
+-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
+ endif
+ endif
+ 
+diff -ru a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk
+--- a/a/nss/coreconf/arch.mk	2014-09-29 16:46:38.175421471 +0100
++++ b/b/nss/coreconf/arch.mk	2014-09-29 16:47:42.986012244 +0100
+@@ -280,10 +280,15 @@
+ # IMPL_STRATEGY may be defined too.
+ #
+ 
+-OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
++# OBJDIR_NAME is used to build the directory containing the built objects, for 
++# example mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ
++# We need to deliver the contents of that folder into the solver. To make that easier
++# in the makefile we rename this directory to "out". 
++#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
++OBJDIR_NAME = out
+ 
+ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+-ifndef BUILD_OPT
++ifdef THIS_HAS_BEEN_DISABLED_TO_GET_out
+ #
+ # Define USE_DEBUG_RTL if you want to use the debug runtime library
+ # (RTL) in the debug build
+diff -ru a/nss/coreconf/FreeBSD.mk b/nss/coreconf/FreeBSD.mk
+--- a/a/nss/coreconf/FreeBSD.mk	2014-09-29 16:46:38.189421588 +0100
++++ b/b/nss/coreconf/FreeBSD.mk	2014-09-29 16:47:42.984012225 +0100
+@@ -25,6 +25,7 @@
  
  DSO_CFLAGS		= -fPIC
  DSO_LDOPTS		= -shared -Wl,-soname -Wl,$(notdir $@)
@@ -19,9 +72,10 @@
  
  #
  # The default implementation strategy for FreeBSD is pthreads.
---- a/a/nss/coreconf/Linux.mk	2010-01-15 23:19:00.000000000 +0100
-+++ b/b/nss/coreconf/Linux.mk	2010-06-11 16:35:54.981151732 +0200
-@@ -46,8 +46,11 @@
+diff -ru a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk
+--- a/a/nss/coreconf/Linux.mk	2014-09-29 16:46:38.189421588 +0100
++++ b/b/nss/coreconf/Linux.mk	2014-09-29 16:47:42.985012235 +0100
+@@ -16,8 +16,11 @@
  	IMPL_STRATEGY = _PTH
  endif
  
@@ -35,7 +89,7 @@
  RANLIB			= ranlib
  
  DEFAULT_COMPILER = gcc
-@@ -147,7 +150,7 @@
+@@ -145,7 +148,7 @@
  # incorrectly reports undefined references in the libraries we link with, so
  # we don't use -z defs there.
  ZDEFS_FLAG		= -Wl,-z,defs
@@ -44,7 +98,7 @@
  LDFLAGS			+= $(ARCHFLAG)
  
  # On Maemo, we need to use the -rpath-link flag for even the standard system
-@@ -158,8 +161,13 @@
+@@ -176,8 +179,13 @@
  endif
  endif
  
@@ -58,9 +112,22 @@
  
  # The -rpath '$$ORIGIN' linker option instructs this library to search for its
  # dependencies in the same directory where it resides.
---- a/a/nss/coreconf/SunOS5.mk	2009-06-11 02:55:32.000000000 +0200
-+++ b/b/nss/coreconf/SunOS5.mk	2010-06-11 16:35:54.985571182 +0200
-@@ -89,8 +89,12 @@
+diff -ru a/nss/coreconf/rules.mk b/nss/coreconf/rules.mk
+--- a/a/nss/coreconf/rules.mk	2014-09-29 16:46:38.188421578 +0100
++++ b/b/nss/coreconf/rules.mk	2014-09-29 16:47:42.986012244 +0100
+@@ -261,7 +261,7 @@
+ ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
+ 	$(AR) $(subst /,\\,$(OBJS))
+ else
+-	$(AR) $(OBJS)
++	$(AR) cr $@ $(OBJS)
+ endif
+ 	$(RANLIB) $@
+ 
+diff -ru a/nss/coreconf/SunOS5.mk b/nss/coreconf/SunOS5.mk
+--- a/a/nss/coreconf/SunOS5.mk	2014-09-29 16:46:38.175421471 +0100
++++ b/b/nss/coreconf/SunOS5.mk	2014-09-29 16:47:42.985012235 +0100
+@@ -48,8 +48,12 @@
  	    # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
  	endif
  else
@@ -75,71 +142,12 @@
  	ASFLAGS   += -Wa,-P
  	OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
  	ifndef BUILD_OPT
---- a/a/nss/coreconf/arch.mk	2009-06-05 04:14:49.000000000 +0200
-+++ b/b/nss/coreconf/arch.mk	2010-06-11 16:35:54.990913282 +0200
-@@ -324,10 +324,15 @@
- # IMPL_STRATEGY may be defined too.
- #
- 
--OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
-+# OBJDIR_NAME is used to build the directory containing the built objects, for 
-+# example mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ
-+# We need to deliver the contents of that folder into the solver. To make that easier
-+# in the makefile we rename this directory to "out". 
-+#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
-+OBJDIR_NAME = out
- 
- ifeq (,$(filter-out WIN%,$(OS_TARGET)))
--ifndef BUILD_OPT
-+ifdef THIS_HAS_BEEN_DISABLED_TO_GET_out
- #
- # Define USE_DEBUG_RTL if you want to use the debug runtime library
- # (RTL) in the debug build
---- a/a/nss/coreconf/rules.mk
-+++ b/b/nss/coreconf/rules.mk
-@@ -293,7 +293,7 @@
- ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
- 	$(AR) $(subst /,\\,$(OBJS))
- else
--	$(AR) $(OBJS)
-+	$(AR) cr $@ $(OBJS)
- endif
- 	$(RANLIB) $@
- 
---- a/a/nss/Makefile
-+++ b/b/nss/Makefile
+diff -ru a/nss/Makefile b/nss/Makefile
+--- a/a/nss/Makefile	2014-09-29 16:46:38.171421425 +0100
++++ b/b/nss/Makefile	2014-09-29 16:47:42.987012253 +0100
 @@ -1,3 +1,5 @@
 +export AR
 +export RANLIB
  #! gmake
  #
  # This Source Code Form is subject to the terms of the Mozilla Public
---- a/a/nss/cmd/platlibs.mk	2010-02-04 19:59:10.000000000 +0100
-+++ b/b/nss/cmd/platlibs.mk	2010-06-11 16:35:55.004869805 +0200
-@@ -41,17 +41,22 @@
- 
- ifeq ($(OS_ARCH), SunOS) 
- ifeq ($(USE_64), 1)
--EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
-+#In OOo we would probable put the executables next to libs
-+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
- else
--EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
-+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
- endif
- endif
- 
-+ifeq ($(OS_ARCH), FreeBSD)
-+EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
-+endif
-+
- ifeq ($(OS_ARCH), Linux)
- ifeq ($(USE_64), 1)
--EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
-+EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
- else
--EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
-+EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN'
- endif
- endif
- 
diff --git a/external/nss/nss_macosx.patch b/external/nss/nss_macosx.patch
index 853cd34..7c099bc 100644
--- a/external/nss/nss_macosx.patch
+++ b/external/nss/nss_macosx.patch
@@ -1,19 +1,8 @@
---- a/a/nss/Makefile	2008-12-03 00:24:39.000000000 +0100
-+++ b/b/nss/Makefile	2009-11-27 13:36:22.662753328 +0100
-@@ -104,6 +104,9 @@
- ifeq ($(OS_TARGET),WIN95)
- NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
- endif
-+ifdef MACOS_SDK_DIR
-+NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
-+endif
- ifdef USE_DEBUG_RTL
- NSPR_CONFIGURE_OPTS += --enable-debug-rtl
- endif
---- a/a/nspr/configure
-+++ b/b/nspr/configure
-@@ -3888,7 +3889,7 @@
- fi
+diff -ru a/nspr/configure b/nspr/configure
+--- a/a/nspr/configure	2014-09-29 16:50:33.907375937 +0100
++++ b/b/nspr/configure	2014-09-29 16:51:59.213931947 +0100
+@@ -6577,7 +6579,7 @@
+ 
  
      DSO_CFLAGS=-fPIC
 -    DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
@@ -21,9 +10,10 @@
      _OPTIMIZE_FLAGS=-O2
      MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
      STRIP="$STRIP -x -S"
---- a/a/nss/coreconf/Darwin.mk
-+++ b/b/nss/coreconf/Darwin.mk
-@@ -39,8 +39,12 @@
+diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
+--- a/a/nss/coreconf/Darwin.mk	2014-09-29 16:50:22.992304799 +0100
++++ b/b/nss/coreconf/Darwin.mk	2014-09-29 16:51:59.214931953 +0100
+@@ -7,8 +7,12 @@
  
  DEFAULT_COMPILER = gcc
  
@@ -91,3 +81,16 @@
  
  MKSHLIB		= $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
  DLL_SUFFIX	= dylib
+diff -ru a/nss/Makefile b/nss/Makefile
+--- a/a/nss/Makefile	2014-09-29 16:50:22.990304789 +0100
++++ b/b/nss/Makefile	2014-09-29 16:51:59.207931908 +0100
+@@ -72,6 +72,9 @@
+ ifeq ($(OS_TARGET),WIN95)
+ NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
+ endif
++ifdef MACOS_SDK_DIR
++NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
++endif
+ ifdef USE_DEBUG_RTL
+ NSPR_CONFIGURE_OPTS += --enable-debug-rtl
+ endif
commit 2eb5e619b21c1c9a3889b2eb2be15f206d209acc
Author: Matthew J. Francis <mjay.francis at gmail.com>
Date:   Thu Oct 9 13:02:18 2014 +0800

    fdo#84810 Avoid calc crash when using Paste Special - Link
    
    Change-Id: I52c072578ccc0b9f75a850613056e74d400eb532
    Reviewed-on: https://gerrit.libreoffice.org/11867
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>
    (cherry picked from commit 2b6619c597a791775e2d41a68f7e85ef75d1aaa2)
    Reviewed-on: https://gerrit.libreoffice.org/11875

diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index e468dd3..baf7314 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -76,6 +76,8 @@ bool ScDocument::CopyOneCellFromClip(
         return false;
 
     ScCellValue& rSrcCell = rCxt.getSingleCell();
+    const ScPatternAttr* pAttr = pClipDoc->GetPattern(aSrcPos);
+    rCxt.setSingleCellPattern(pAttr);
     if (rCxt.isAsLink())
     {
         ScSingleRefData aRef;
@@ -89,8 +91,6 @@ bool ScDocument::CopyOneCellFromClip(
     else
     {
         rSrcCell.set(pClipDoc->GetRefCellValue(aSrcPos));
-        const ScPatternAttr* pAttr = pClipDoc->GetPattern(aSrcPos);
-        rCxt.setSingleCellPattern(pAttr);
 
         // Check the paste flag to see whether we want to paste this cell.  If the
         // flag says we don't want to paste this cell, we'll return with true.


More information about the Libreoffice-commits mailing list