[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - 26 commits - connectivity/source dbaccess/source embeddedobj/source formula/source include/connectivity include/toolkit sc/inc sc/qa sc/source solenv/gbuild svx/source sw/source toolkit/source vcl/generic vcl/inc

Richard PALO richard at NetBSD.org
Mon Feb 23 02:16:48 PST 2015


 connectivity/source/parse/sqlnode.cxx              |    5 -
 dbaccess/source/ui/browser/sbagrid.cxx             |    1 
 dbaccess/source/ui/dlg/tablespage.cxx              |    1 
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |   15 ++++
 embeddedobj/source/commonembedding/persistence.cxx |    5 +
 formula/source/core/api/FormulaCompiler.cxx        |    2 
 include/connectivity/sqlparse.hxx                  |    5 +
 include/toolkit/helper/listenermultiplexer.hxx     |   10 +--
 include/toolkit/helper/macros.hxx                  |   10 +--
 sc/inc/compiler.hxx                                |    2 
 sc/inc/scmatrix.hxx                                |    9 +-
 sc/qa/unit/ucalc.hxx                               |    2 
 sc/qa/unit/ucalc_formula.cxx                       |   17 +++++
 sc/source/core/tool/compiler.cxx                   |   23 ++++++
 sc/source/core/tool/formularesult.cxx              |    2 
 sc/source/core/tool/interpr1.cxx                   |    6 +
 sc/source/core/tool/interpr4.cxx                   |   15 ++++
 sc/source/core/tool/scmatrix.cxx                   |   23 +++++-
 sc/source/filter/oox/sheetdatabuffer.cxx           |    2 
 sc/source/ui/dbgui/PivotLayoutDialog.cxx           |    9 ++
 sc/source/ui/docshell/docsh4.cxx                   |    7 +-
 sc/source/ui/inc/PivotLayoutDialog.hxx             |    1 
 solenv/gbuild/platform/solaris.mk                  |    5 -
 svx/source/dialog/langbox.cxx                      |   24 ++++---
 sw/source/core/crsr/findtxt.cxx                    |    4 -
 sw/source/core/layout/tabfrm.cxx                   |    2 
 sw/source/core/txtnode/ndtxt.cxx                   |   28 ++++++--
 sw/source/core/undo/unnum.cxx                      |    4 -
 sw/source/core/undo/untbl.cxx                      |   25 +++----
 sw/source/filter/html/htmlgrin.cxx                 |   70 ++++++++++++---------
 sw/source/filter/ww8/rtfsdrexport.cxx              |    3 
 sw/source/ui/chrdlg/drpcps.cxx                     |    4 -
 sw/source/ui/fldui/javaedit.cxx                    |    9 ++
 toolkit/source/helper/listenermultiplexer.cxx      |    9 ++
 vcl/generic/glyphs/graphite_serverfont.cxx         |    4 -
 vcl/inc/graphite_layout.hxx                        |   18 +++--
 36 files changed, 271 insertions(+), 110 deletions(-)

New commits:
commit b5c6bae95eed4df45617ec4cadda59088261a3a1
Author: Richard PALO <richard at NetBSD.org>
Date:   Fri Feb 13 19:17:54 2015 +0100

    Sun ld doesn't support -O1 optimize flag
    reported by Gabriele Bulfon (gbulfon at sonicle)
    
    Change-Id: Ie0ff8fe296054a7a266b4c73c30938bb2b7353ea
    Reviewed-on: https://gerrit.libreoffice.org/14484
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 34a167e1bf9b478069c290dbf977c68639149852)
    Signed-off-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit f081a415221bd8665cceebe91665e2253781b516)

diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 8256620..e4bc23b 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -131,11 +131,8 @@ gb_LinkTarget_LDFLAGS += \
 
 endif
 
-ifneq ($(gb_DEBUGLEVEL),0)
+# sun ld doesn't understand -O1 optimize flag
 gb_LINKEROPTFLAGS :=
-else
-gb_LINKEROPTFLAGS := -Wl,-O1
-endif
 
 ifeq ($(gb_SYMBOL),$(true))
 gb_LINKERSTRIPDEBUGFLAGS :=
commit c5420c816f3977c5f4002d66561eef8111faecbe
Author: Laurent Godard <lgodard.libre at laposte.net>
Date:   Thu Feb 19 10:45:26 2015 +0100

    tdf#89460 test pChangeTrack before using it
    
    Reviewed-on: https://gerrit.libreoffice.org/14553
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit bf5c5f359cf4eb36a0a9a1110ec2aa3393bb87df)
    
    Conflicts:
    	sc/source/ui/docshell/docsh4.cxx
    
    Change-Id: Ic02351c448929daa7d4c5a9a00df9842c2c5aa91
    Reviewed-on: https://gerrit.libreoffice.org/14558
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit bf57bbef91bc40090561d614e4c2070c01aef7cb)

diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index dd9eaf8..13855e6 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -590,8 +590,11 @@ void ScDocShell::Execute( SfxRequest& rReq )
 
                         if ( bDo )
                         {
-                            if ( pChangeTrack->IsProtected() )
-                                bDo = ExecuteChangeProtectionDialog( NULL );
+                            if (pChangeTrack)
+                            {
+                                if ( pChangeTrack->IsProtected() )
+                                    bDo = ExecuteChangeProtectionDialog( NULL );
+                            }
                             if ( bDo )
                             {
                                 pDoc->EndChangeTracking();
commit a7a22ede384cc6e8018bdede253266bba36719ea
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date:   Wed Jan 7 18:50:32 2015 +0100

    tdf#89105: sw: Remove unnecessary downcast
    
    This fixes an infinite loop in SwPaM::DoSearch() that can happen with
    32-bit paragraphs now.
    
    (cherry picked from commit dd9972f5f37063f5fe3eb5e011d2adc73f44d305)
    Signed-off-by: Michael Stahl <mstahl at redhat.com>
    
    Change-Id: I7511862ddf6ed672ba4f09ef6729fb1fa7c1d355
    (cherry picked from commit 620df179e0cc1339017a36840e19280f133b2a1a)

diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 8b0b33c..c8edd1e 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -504,8 +504,8 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
         }
         else
         {
-            nStart = (sal_uInt16)nProxyStart;
-            nEnd = (sal_uInt16)nProxyEnd;
+            nStart = nProxyStart;
+            nEnd = nProxyEnd;
         }
         nStart = nEnd;
     }
commit 5760c24f1db822283849ca97e91498f78e99a295
Author: Michael Stahl <mstahl at redhat.com>
Date:   Sat Feb 14 00:17:06 2015 +0100

    tdf#78174: toolkit: work around GCC 4.9 -Os link failure
    
    A build with gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1) for 32-bit x86
    fails because of these undefined symbols:
    
    > nm --demangle workdir/CxxObject/svx/source/fmcomp/fmgridif.o | grep
     \\bWindowListenerMultiplexer::acquire
             U non-virtual thunk to WindowListenerMultiplexer::acquire()
    
    They should probably be generated inline.  Work around by out-lining the
    definition of the methods.
    
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64812
    
    (cherry picked from commit 6b3aa0fe4094e87290bd33a30bd6cd99ee78ce38)
    
    toolkit: export some ListenerMultiplexer types
    
    These are used from svx and apparently some (buggy?) toolchains fail with
    fmgridif.cxx:: undefined reference to `non-virtual thunk
     to WindowListenerMultiplexer::acquire()'
    
    (cherry picked from commit bb182b47ca7362b05c03d583d3547643d9a99562)
    
    Change-Id: I318f7c39bdf1243be385bc6dc0a47862b22e92c5
    Reviewed-on: https://gerrit.libreoffice.org/14510
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 5e6cd9b7a15e7e6a994e8f3e4fafed2928dbf42d)

diff --git a/include/toolkit/helper/listenermultiplexer.hxx b/include/toolkit/helper/listenermultiplexer.hxx
index a3de5ff..61fdbdc 100644
--- a/include/toolkit/helper/listenermultiplexer.hxx
+++ b/include/toolkit/helper/listenermultiplexer.hxx
@@ -83,7 +83,7 @@ DECL_LISTENERMULTIPLEXER_END
 
 //  class FocusListenerMultiplexer
 
-DECL_LISTENERMULTIPLEXER_START( FocusListenerMultiplexer, ::com::sun::star::awt::XFocusListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( FocusListenerMultiplexer, ::com::sun::star::awt::XFocusListener )
     void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 DECL_LISTENERMULTIPLEXER_END
@@ -92,7 +92,7 @@ DECL_LISTENERMULTIPLEXER_END
 
 //  class WindowListenerMultiplexer
 
-DECL_LISTENERMULTIPLEXER_START( WindowListenerMultiplexer, ::com::sun::star::awt::XWindowListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( WindowListenerMultiplexer, ::com::sun::star::awt::XWindowListener )
     void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
@@ -112,7 +112,7 @@ DECL_LISTENERMULTIPLEXER_END
 
 //  class KeyListenerMultiplexer
 
-DECL_LISTENERMULTIPLEXER_START( KeyListenerMultiplexer, ::com::sun::star::awt::XKeyListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( KeyListenerMultiplexer, ::com::sun::star::awt::XKeyListener )
     void SAL_CALL keyPressed( const ::com::sun::star::awt::KeyEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     void SAL_CALL keyReleased( const ::com::sun::star::awt::KeyEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 DECL_LISTENERMULTIPLEXER_END
@@ -130,7 +130,7 @@ DECL_LISTENERMULTIPLEXER_END
 
 //  class MouseMotionListenerMultiplexer
 
-DECL_LISTENERMULTIPLEXER_START( MouseMotionListenerMultiplexer, ::com::sun::star::awt::XMouseMotionListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( MouseMotionListenerMultiplexer, ::com::sun::star::awt::XMouseMotionListener )
     void SAL_CALL mouseDragged( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     void SAL_CALL mouseMoved( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 DECL_LISTENERMULTIPLEXER_END
@@ -138,7 +138,7 @@ DECL_LISTENERMULTIPLEXER_END
 
 //  class PaintListenerMultiplexer
 
-DECL_LISTENERMULTIPLEXER_START( PaintListenerMultiplexer, ::com::sun::star::awt::XPaintListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( PaintListenerMultiplexer, ::com::sun::star::awt::XPaintListener )
     void SAL_CALL windowPaint( const ::com::sun::star::awt::PaintEvent& e ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 DECL_LISTENERMULTIPLEXER_END
 
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx
index e048e75..b212dff 100644
--- a/include/toolkit/helper/macros.hxx
+++ b/include/toolkit/helper/macros.hxx
@@ -112,8 +112,8 @@ class ClassName : public ListenerMultiplexerBase, public InterfaceName \
 public: \
     ClassName( ::cppu::OWeakObject& rSource ); \
     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \
-    void                        SAL_CALL acquire() throw() SAL_OVERRIDE  { ListenerMultiplexerBase::acquire(); } \
-    void                        SAL_CALL release() throw() SAL_OVERRIDE  { ListenerMultiplexerBase::release(); } \
+    void                        SAL_CALL acquire() throw() SAL_OVERRIDE; \
+    void                        SAL_CALL release() throw() SAL_OVERRIDE; \
     void                        SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 
@@ -124,8 +124,8 @@ class TOOLKIT_DLLPUBLIC ClassName : public ListenerMultiplexerBase, public Inter
 public: \
     ClassName( ::cppu::OWeakObject& rSource ); \
     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \
-    void                        SAL_CALL acquire() throw() SAL_OVERRIDE  { ListenerMultiplexerBase::acquire(); } \
-    void                        SAL_CALL release() throw() SAL_OVERRIDE  { ListenerMultiplexerBase::release(); } \
+    void                        SAL_CALL acquire() throw() SAL_OVERRIDE; \
+    void                        SAL_CALL release() throw() SAL_OVERRIDE; \
     void                        SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 
@@ -140,6 +140,8 @@ ClassName::ClassName( ::cppu::OWeakObject& rSource ) \
     : ListenerMultiplexerBase( rSource ) \
 { \
 } \
+void SAL_CALL ClassName::acquire() throw() { ListenerMultiplexerBase::acquire(); } \
+void SAL_CALL ClassName::release() throw() { ListenerMultiplexerBase::release(); } \
 ::com::sun::star::uno::Any ClassName::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) \
 { \
     ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, \
diff --git a/toolkit/source/helper/listenermultiplexer.cxx b/toolkit/source/helper/listenermultiplexer.cxx
index fb4e48c..57bfcb1 100644
--- a/toolkit/source/helper/listenermultiplexer.cxx
+++ b/toolkit/source/helper/listenermultiplexer.cxx
@@ -47,6 +47,15 @@ EventListenerMultiplexer::EventListenerMultiplexer( ::cppu::OWeakObject& rSource
 {
 }
 
+void SAL_CALL EventListenerMultiplexer::acquire() throw ()
+{
+    return ListenerMultiplexerBase::acquire();
+}
+void SAL_CALL EventListenerMultiplexer::release() throw ()
+{
+    return ListenerMultiplexerBase::release();
+}
+
 // ::com::sun::star::uno::XInterface
 ::com::sun::star::uno::Any EventListenerMultiplexer::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception)
 {
commit 2f0c969bf89e11fbcfc16b5d52bfd3ef9548983f
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Feb 11 21:47:23 2015 +0100

    Resolves: tdf#39316 add matrix empty cells to ScInterpreter::QueryMatrixType()
    
    (cherry picked from commit eccbc97c7c224269fe261b8924e7866c3758ec91)
    
    add ScMatrix::IsEmptyResult() for tdf#39316 fix preparation
    
    (cherry picked from commit cf3f1d8dfeb45249eb60a30dba3243fe9a4a65e5)
    
    9f2a3e6fa9f4ef43df672661afef996269b90a7a
    
    Change-Id: Ifa5d59e90afcfff66f2e8683fac2a9090ed615da
    Reviewed-on: https://gerrit.libreoffice.org/14430
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 5b952ced5b2ae6151079206c3e397de653f0ced2)

diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index 851caa4..aebe0e7 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -322,13 +322,16 @@ public:
     /// @return <TRUE/> if string or empty or empty path, in fact non-value.
     bool IsString( SCSIZE nC, SCSIZE nR ) const;
 
-    /// @return <TRUE/> if empty or empty path.
+    /// @return <TRUE/> if empty or empty cell or empty result, not empty path.
     bool IsEmpty( SCSIZE nC, SCSIZE nR ) const;
 
-    /// @return <TRUE/> if empty, not empty result or empty path.
+    /// @return <TRUE/> if empty cell, not empty or empty result or empty path.
     bool IsEmptyCell( SCSIZE nC, SCSIZE nR ) const;
 
-    /// @return <TRUE/> if empty path.
+    /// @return <TRUE/> if empty result, not empty or empty cell or empty path.
+    bool IsEmptyResult( SCSIZE nC, SCSIZE nR ) const;
+
+    /// @return <TRUE/> if empty path, not empty or empty cell or empty result.
     bool IsEmptyPath( SCSIZE nC, SCSIZE nR ) const;
 
     /// @return <TRUE/> if value or boolean.
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 58bc004..473f40d 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1879,6 +1879,16 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
                 PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
                 rRetTypeExpr = NUMBERFORMAT_LOGICAL;
             }
+            else if ( xMat->IsEmptyResult( 0, 0))
+            {   // empty formula result
+                FormulaTokenRef xRes = new ScEmptyCellToken( true, true);   // inherited, display empty
+                PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
+            }
+            else if ( xMat->IsEmpty( 0, 0))
+            {   // empty or empty cell
+                FormulaTokenRef xRes = new ScEmptyCellToken( false, true);  // not inherited, display empty
+                PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
+            }
             else
             {
                 svl::SharedString aStr( nMatVal.GetString());
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index b71cc1d..9afb2a6 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -254,6 +254,7 @@ public:
     bool IsString( SCSIZE nC, SCSIZE nR ) const;
     bool IsEmpty( SCSIZE nC, SCSIZE nR ) const;
     bool IsEmptyCell( SCSIZE nC, SCSIZE nR ) const;
+    bool IsEmptyResult( SCSIZE nC, SCSIZE nR ) const;
     bool IsEmptyPath( SCSIZE nC, SCSIZE nR ) const;
     bool IsValue( SCSIZE nIndex ) const;
     bool IsValue( SCSIZE nC, SCSIZE nR ) const;
@@ -686,8 +687,8 @@ bool ScMatrixImpl::IsString( SCSIZE nC, SCSIZE nR ) const
 
 bool ScMatrixImpl::IsEmpty( SCSIZE nC, SCSIZE nR ) const
 {
-    // Flag must indicate an empty element instead of an
-    // 'empty path' element.
+    // Flag must indicate an 'empty' or 'empty cell' or 'empty result' element,
+    // but not an 'empty path' element.
     ValidColRowReplicated( nC, nR );
     return maMat.get_type(nR, nC) == mdds::mtm::element_empty &&
         maMatFlag.get<TMatFlag>(nR, nC) != SC_MATFLAG_EMPTYPATH;
@@ -695,13 +696,22 @@ bool ScMatrixImpl::IsEmpty( SCSIZE nC, SCSIZE nR ) const
 
 bool ScMatrixImpl::IsEmptyCell( SCSIZE nC, SCSIZE nR ) const
 {
-    // Flag must indicate an 'empty' element instead of an
-    // 'empty result' or 'empty path' element.
+    // Flag must indicate an 'empty cell' element instead of an
+    // 'empty' or 'empty result' or 'empty path' element.
     ValidColRowReplicated( nC, nR );
     return maMat.get_type(nR, nC) == mdds::mtm::element_empty &&
         maMatFlag.get<TMatFlag>(nR, nC) == SC_MATFLAG_EMPTYCELL;
 }
 
+bool ScMatrixImpl::IsEmptyResult( SCSIZE nC, SCSIZE nR ) const
+{
+    // Flag must indicate an 'empty result' element instead of an
+    // 'empty' or 'empty cell' or 'empty path' element.
+    ValidColRowReplicated( nC, nR );
+    return maMat.get_type(nR, nC) == mdds::mtm::element_empty &&
+        maMatFlag.get<TMatFlag>(nR, nC) == SC_MATFLAG_EMPTYRESULT;
+}
+
 bool ScMatrixImpl::IsEmptyPath( SCSIZE nC, SCSIZE nR ) const
 {
     // Flag must indicate an 'empty path' element.
@@ -2117,6 +2127,11 @@ bool ScMatrix::IsEmptyCell( SCSIZE nC, SCSIZE nR ) const
     return pImpl->IsEmptyCell(nC, nR);
 }
 
+bool ScMatrix::IsEmptyResult( SCSIZE nC, SCSIZE nR ) const
+{
+    return pImpl->IsEmptyResult(nC, nR);
+}
+
 bool ScMatrix::IsEmptyPath( SCSIZE nC, SCSIZE nR ) const
 {
     return pImpl->IsEmptyPath(nC, nR);
commit de0412a496454b23d0c65e1bb8f9d4badfd953d7
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sat Feb 14 23:31:08 2015 +0100

    fix windows build
    
    Change-Id: Ifad245fac92e5e94347da3e5ac01ff3ba0a8c50b
    (cherry picked from commit 863c5e9e4b6ff1e4311665485d9e5ff2c08421d8)

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 4d2cf93..f03511e 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -413,7 +413,7 @@ public:
     CPPUNIT_TEST(testFormulaRefUpdateNamedExpressionMove);
     CPPUNIT_TEST(testFormulaRefUpdateNamedExpressionExpandRef);
     CPPUNIT_TEST(testFormulaRefUpdateValidity);
-    CPPUNIT_TEST(testErrorOnExternalReferences);
+    //CPPUNIT_TEST(testErrorOnExternalReferences);
     CPPUNIT_TEST(testMultipleOperations);
     CPPUNIT_TEST(testFuncCOLUMN);
     CPPUNIT_TEST(testFuncCOUNT);
commit 5877dd181bc82ac57ba40244234712bd9548d772
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sat Feb 14 19:52:19 2015 +0100

    tdf#88624 set DocumentBaseURL when saving report
    
    regression from 1d38cb365543924f9c50014e6b2227e77de1d0c9
    
    Change-Id: Ia8cfe47b9d92889b3724f394db5090a59e69dd48
    Reviewed-on: https://gerrit.libreoffice.org/14495
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>
    (cherry picked from commit 4ea953b468995675f2bcac02e1d512228aa7bb6e)

diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index c85e786..2f8fc70 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -1629,7 +1629,10 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn()
 
         aGuard.clear();
         uno::Sequence<beans::PropertyValue> aEmpty;
-        StoreDocToStorage_Impl( m_xObjectStorage, aEmpty, aEmpty, nStorageFormat, m_aEntryName, true );
+        uno::Sequence<beans::PropertyValue> aMediaArgs(1);
+        aMediaArgs[0].Name = "DocumentBaseURL";
+        aMediaArgs[0].Value <<= GetBaseURL_Impl();
+        StoreDocToStorage_Impl( m_xObjectStorage, aMediaArgs, aEmpty, nStorageFormat, m_aEntryName, true );
         aGuard.reset();
     }
 
commit 63f478b98abddf0876564a00c13eaccc40e218fa
Author: Ursache Vladimir <ursache at collabora.co.uk>
Date:   Tue Feb 10 22:55:42 2015 +0200

    tdf#68117 Partially fix boolean labels in XLSX
    
    Change-Id: I731a58c7749e157f6b40c60808687ce629683742
    Reviewed-on: https://gerrit.libreoffice.org/14410
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 9c0910765954fba7611611befc1d42ab19d010ef)

diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index c77f43f..741c7f4 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -192,7 +192,7 @@ void SheetDataBuffer::setBooleanCell( const CellModel& rModel, bool bValue )
         rModel.maCellAddr, bValue ? OUString("TRUE()") : OUString("FALSE()"));
 
     // #108770# set 'Standard' number format for all Boolean cells
-    setCellFormat( rModel, 0 );
+    setCellFormat( rModel );
 }
 
 void SheetDataBuffer::setErrorCell( const CellModel& rModel, const OUString& rErrorCode )
commit 2d470293adb8142daf8bf2fecc6fbd21e0fb22e3
Author: Jan Kantert <jan-lo at kantert.net>
Date:   Fri Feb 13 14:47:31 2015 +0100

    tdf#89330 preserve file name case in an unresolvable external named range
    
    Reviewed-on: https://gerrit.libreoffice.org/14474
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 0a9e7293a570da8a36b2ac4fd1c4a22d6bc084f2)
    
    add unittest for tdf#89330
    
    Reviewed-on: https://gerrit.libreoffice.org/14473
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit e4882717f3dc0375e113ed692374870ab8302a16)
    
    4c5c65733700e7e7245e96f85714221acf23bcfb
    
    Change-Id: Ib8728a4a9c793b162de07a0cef66e242879f2aa1
    Reviewed-on: https://gerrit.libreoffice.org/14483
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit c261beb79c56faf86dcae7d9cf092b11e1b8c66e)

diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 18d788a..6a90c7a 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -347,7 +347,7 @@ private:
     bool IsDoubleReference( const OUString& );
     bool IsMacro( const OUString& );
     bool IsNamedRange( const OUString& );
-    bool IsExternalNamedRange( const OUString& rSymbol );
+    bool IsExternalNamedRange( const OUString& rSymbol, bool& rbInvalidExternalNameRange );
     bool IsDBRange( const OUString& );
     bool IsColRowName( const OUString& );
     bool IsBoolean( const OUString& );
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 328dc59..4d2cf93 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -135,6 +135,7 @@ public:
     void testFormulaRefUpdateNamedExpressionMove();
     void testFormulaRefUpdateNamedExpressionExpandRef();
     void testFormulaRefUpdateValidity();
+    void testErrorOnExternalReferences();
     void testMultipleOperations();
     void testFuncCOLUMN();
     void testFuncCOUNT();
@@ -412,6 +413,7 @@ public:
     CPPUNIT_TEST(testFormulaRefUpdateNamedExpressionMove);
     CPPUNIT_TEST(testFormulaRefUpdateNamedExpressionExpandRef);
     CPPUNIT_TEST(testFormulaRefUpdateValidity);
+    CPPUNIT_TEST(testErrorOnExternalReferences);
     CPPUNIT_TEST(testMultipleOperations);
     CPPUNIT_TEST(testFuncCOLUMN);
     CPPUNIT_TEST(testFuncCOUNT);
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index b1ef561..cbf40d2 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1384,6 +1384,23 @@ void Test::testFormulaRefUpdateRange()
     m_pDoc->DeleteTab(0);
 }
 
+void Test::testErrorOnExternalReferences()
+{
+    // Test tdf#89330
+    m_pDoc->InsertTab(0, "Sheet1");
+    m_pDoc->SetString(ScAddress(0,0,0), "='file:///Path/To/FileA.ods'#$Sheet1.A1A");
+
+    ScFormulaCell* pFC = m_pDoc->GetFormulaCell(ScAddress(0,0,0));
+    CPPUNIT_ASSERT(pFC);
+    CPPUNIT_ASSERT_EQUAL(ScErrorCodes::errNoName, pFC->GetErrCode());
+
+    if (!checkFormula(*m_pDoc, ScAddress(0,0,0), "'file:///Path/To/FileA.ods'#$Sheet1.A1A"))
+        CPPUNIT_FAIL("Formula changed");
+
+    m_pDoc->DeleteTab(0);
+}
+
+
 void Test::testFormulaRefUpdateSheets()
 {
     m_pDoc->InsertTab(0, "Sheet1");
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 98bad50..0e81896 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2927,7 +2927,7 @@ bool ScCompiler::IsNamedRange( const OUString& rUpperName )
         return false;
 }
 
-bool ScCompiler::IsExternalNamedRange( const OUString& rSymbol )
+bool ScCompiler::IsExternalNamedRange( const OUString& rSymbol, bool& rbInvalidExternalNameRange )
 {
     /* FIXME: This code currently (2008-12-02T15:41+0100 in CWS mooxlsc)
      * correctly parses external named references in OOo, as required per RFE
@@ -2935,6 +2935,8 @@ bool ScCompiler::IsExternalNamedRange( const OUString& rSymbol )
      * spec first. Until then don't pretend to support external names that
      * wouldn't survive a save and reload cycle, return false instead. */
 
+    rbInvalidExternalNameRange = false;
+
     if (!pConv)
         return false;
 
@@ -2951,8 +2953,11 @@ bool ScCompiler::IsExternalNamedRange( const OUString& rSymbol )
     aFile = aTmp;
     sal_uInt16 nFileId = pRefMgr->getExternalFileId(aFile);
     if (!pRefMgr->isValidRangeName(nFileId, aName))
+    {
+        rbInvalidExternalNameRange = true;
         // range name doesn't exist in the source document.
         return false;
+    }
 
     const OUString* pRealName = pRefMgr->getRealRangeName(nFileId, aName);
     maRawToken.SetExternalName(nFileId, pRealName ? *pRealName : OUString(aTmp));
@@ -3489,7 +3494,8 @@ bool ScCompiler::NextNewToken( bool bInArray )
     if (mnPredetectedReference)
     {
         OUString aStr( cSymbol);
-        if (!IsPredetectedReference( aStr) && !IsExternalNamedRange( aStr))
+        bool bInvalidExternalNameRange;
+        if (!IsPredetectedReference( aStr) && !IsExternalNamedRange( aStr, bInvalidExternalNameRange ))
         {
             /* TODO: it would be nice to generate a #REF! error here, which
              * would need an ocBad token with additional error value.
@@ -3618,8 +3624,19 @@ bool ScCompiler::NextNewToken( bool bInArray )
         if (IsNamedRange( aUpper ))
             return true;
         // Preserve case of file names in external references.
-        if (IsExternalNamedRange( aOrg ))
+        bool bInvalidExternalNameRange;
+        if (IsExternalNamedRange( aOrg, bInvalidExternalNameRange ))
+            return true;
+        // Preserve case of file names in external references even when range
+        // is not valid and previous check failed tdf#89330
+        if (bInvalidExternalNameRange)
+        {
+            // add ocBad but do not lowercase
+            svl::SharedString aSS = pDoc->GetSharedStringPool().intern(aOrg);
+            maRawToken.SetString(aSS.getData(), aSS.getDataIgnoreCase());
+            maRawToken.NewOpCode( ocBad );
             return true;
+        }
         if (IsDBRange( aUpper ))
             return true;
         // If followed by '(' (with or without space inbetween) it can not be a
commit 387fccea0b02a3e33d9b31a55932b934dc4b51ed
Author: Winfried Donkers <winfrieddonkers at libreoffice.org>
Date:   Wed Feb 11 09:32:09 2015 +0100

    tdf#88576 fix handling of empty arguments in IF(), IFERROR() and IFNA()
    
    Reviewed-on: https://gerrit.libreoffice.org/14415
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 0b75eda1090f92adc678ceff2565da2dc7d9328c)
    
    tdf#88576 check that two parameters are given for IFERROR() and IFNA()
    
    Otherwise the functions failed only for the error case resulting in
     #NULL! error.
    
    (cherry picked from commit 6583f4e30015164af4972921b5bb7880dfb65f65)
    
    eb987637698ab418fc0a60cd873e23878c9f497b
    
    Change-Id: I8acca26cf7398768a9e25f97f3a9e61754ab2179
    Reviewed-on: https://gerrit.libreoffice.org/14423
    Tested-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 14b76ff3a98898fcccfa6e48ca8ae1e7bea802e2)

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 4a63f14..06cc58d 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -238,9 +238,11 @@ void ScInterpreter::ScIfError( bool bNAonly )
 {
     const short* pJump = pCur->GetJump();
     short nJumpCount = pJump[ 0 ];
-    if (!sp)
+    if (!sp || nJumpCount != 2)
     {
-        PushError( errUnknownStackVariable);
+        // Reset nGlobalError here to not propagate the old error, if any.
+        nGlobalError = (sp ? errParameterExpected : errUnknownStackVariable);
+        PushError( nGlobalError);
         aCode.Jump( pJump[ nJumpCount  ], pJump[ nJumpCount ] );
         return;
     }
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 66e02ea..58bc004 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3082,7 +3082,10 @@ void ScInterpreter::ScExternal()
 
 void ScInterpreter::ScMissing()
 {
-    PushTempToken( new FormulaMissingToken );
+    if ( aCode.IsEndOfPath() )
+        PushTempToken( new ScEmptyCellToken( false, false ) );
+    else
+        PushTempToken( new FormulaMissingToken );
 }
 
 #ifndef DISABLE_SCRIPTING
commit 7b218f24b18f739e78f30b2f224ec52c6f4bd116
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 13 10:33:37 2015 +0000

    Resolves: tdf#79569 crash undoing tricky cell merge
    
    Change-Id: I68d774d0d3758cdb67864d7939a7e1167dd9a7df
    (cherry picked from commit 21796a5fb92fd9773017b782a654a8b5a190cc66)
    Reviewed-on: https://gerrit.libreoffice.org/14468
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit b273a7b723d95f5feabf79b6e8a83beead1ce1bf)

diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index e1d4833..7652462 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1344,21 +1344,22 @@ void _SaveBox::CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl
     {
         // search box for StartNode in old table
         SwTableBox* pBox = rTbl.GetTblBox( nSttNode );
-        OSL_ENSURE( pBox, "Where is my TableBox?" );
-
-        SwFrmFmt* pOld = pBox->GetFrmFmt();
-        pBox->RegisterToFormat( *pFmt );
-        if( !pOld->GetDepends() )
-            delete pOld;
+        if (pBox)
+        {
+            SwFrmFmt* pOld = pBox->GetFrmFmt();
+            pBox->RegisterToFormat( *pFmt );
+            if( !pOld->GetDepends() )
+                delete pOld;
 
-        pBox->setRowSpan( nRowSpan );
+            pBox->setRowSpan( nRowSpan );
 
-        SwTableBoxes* pTBoxes = &pBox->GetUpper()->GetTabBoxes();
-        pTBoxes->erase( std::find( pTBoxes->begin(), pTBoxes->end(), pBox ) );
+            SwTableBoxes* pTBoxes = &pBox->GetUpper()->GetTabBoxes();
+            pTBoxes->erase( std::find( pTBoxes->begin(), pTBoxes->end(), pBox ) );
 
-        pBox->SetUpper( &rParent );
-        pTBoxes = &rParent.GetTabBoxes();
-        pTBoxes->push_back( pBox );
+            pBox->SetUpper( &rParent );
+            pTBoxes = &rParent.GetTabBoxes();
+            pTBoxes->push_back( pBox );
+        }
     }
 
     if( pNext )
commit d8bd515d58b21552813bb16bdcec0b34193ae968
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 13 09:50:15 2015 +0000

    Resolves: tdf#76636 crash on merging certain cells imported from a .doc
    
    Change-Id: I61d5088a6f2e0b444b2943a2f9ce9feeb2e09c11
    (cherry picked from commit e1f4022b9ea7ae99a31773c445d8229ba3bdea93)
    Reviewed-on: https://gerrit.libreoffice.org/14464
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit a3c8e7deea306ba3efb513c8fa7311a995f7fc73)

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 110459d..556fe22 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4965,7 +4965,7 @@ long SwCellFrm::GetLayoutRowSpan() const
     if ( nRet < 1 )
     {
         const SwFrm* pRow = GetUpper();
-        const SwTabFrm* pTab = static_cast<const SwTabFrm*>(pRow->GetUpper());
+        const SwTabFrm* pTab = pRow ? static_cast<const SwTabFrm*>(pRow->GetUpper()) : NULL;
 
         if ( pTab && pTab->IsFollow() && pRow == pTab->GetFirstNonHeadlineRow() )
             nRet = -nRet;
commit 5c8a3f2aba8c1f5a5d0573e9369119e321c55564
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Feb 12 23:47:21 2015 +0100

    Resolves: tdf#81429 select corresponding listbox entry if not current
    
    Change-Id: Ib475a43601ee22d33677ac45cd6ef9dba7e7c431
    (cherry picked from commit a448f1bb9221f30f73574c580b506e00bf2ae61a)
    Reviewed-on: https://gerrit.libreoffice.org/14458
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit dd8a5ecbc0afd7646583fa56b8e6efc3f040012c)

diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 533ae4e..312fe6e 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -713,21 +713,29 @@ IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, SvxLanguageComboBox*, /*pEd*/ )
         const sal_Int32 nPos = GetEntryPos( aStr);
         if (nPos != COMBOBOX_ENTRY_NOTFOUND)
         {
-            // Advance start of full selection by one so the next character
-            // will already continue the string instead of having to type the
-            // same character again to start a new string. The selection
-            // includes formatting characters and is reverse when obtained from
-            // the Edit control.
             Selection aSel( GetSelection());
+
+            // Select the corresponding listbox entry if not current. This
+            // invalidates the Edit Selection thus has to happen between
+            // obtaining the Selection and setting the new Selection.
+            sal_Int32 nSelPos = ImplGetSelectEntryPos();
+            if (nSelPos != nPos)
+                ImplSelectEntryPos( nPos, true);
+
+            // If typing into the Edit control led us here, advance start of a
+            // full selection by one so the next character will already
+            // continue the string instead of having to type the same character
+            // again to start a new string. The selection includes formatting
+            // characters and is reverse when obtained from the Edit control.
             if (aSel.Max() == 1)
             {
                 OUString aText( GetText());
                 if (aSel.Min() == aText.getLength())
-                {
                     ++aSel.Max();
-                    SetSelection( aSel);
-                }
             }
+
+            SetSelection( aSel);
+
             meEditedAndValid = EDITED_NO;
         }
         else
commit d110b7e8de1d811fe5b34c41c94a65d4f2de0fba
Author: Winfried Donkers <winfrieddonkers at libreoffice.org>
Date:   Thu Jan 15 10:35:32 2015 +0100

    fdo#87534 fix HYPERLINK behaviour when used in names
    
    When using HYPERLINK() in names, the hyperlink was set to disabled
    on copying token. After fix, behaviour is consistent.
    
    Note: reducing the fix to 1 line does not work, a set hyperlink
    is only to be copied when applicable.
    
    Change-Id: I27ad24ed8912afa548f08d249ad51d18a792c275
    Reviewed-on: https://gerrit.libreoffice.org/13920
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 944886f6d96843ca4f5833ecca48a693c81abc3b)
    Reviewed-on: https://gerrit.libreoffice.org/14449
    (cherry picked from commit 8e89b2673af9e135b74ad93b08737962d6fee3d8)

diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 2e066af..d41de27 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1714,6 +1714,8 @@ void FormulaCompiler::PopTokenArray()
         else if ( !pArr->IsRecalcModeNormal() && p->pArr->IsRecalcModeNormal() )
             p->pArr->SetMaskedRecalcMode( pArr->GetRecalcMode() );
         p->pArr->SetCombinedBitsRecalcMode( pArr->GetRecalcMode() );
+        if ( pArr->IsHyperLink() )  // fdo 87534
+            p->pArr->SetHyperLink( true );
         if( p->bTemp )
             delete pArr;
         pArr = p->pArr;
commit 6687c994b5d5b70f500712bf7df1dc7e41e14876
Author: Martin Hosken <martin_hosken at sil.org>
Date:   Mon Feb 9 16:49:12 2015 +0700

    Resolves: tdf#89252 Fix bold, regular font spacing bug for Graphite fonts
    
    Change-Id: I31a09fa753ed15e302e5407ce8a0c46f3b13e099
    Reviewed-on: https://gerrit.libreoffice.org/14380
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 0ed14401925d16932ed98bc418d395adac047b39)
    Reviewed-on: https://gerrit.libreoffice.org/14439
    (cherry picked from commit 0c2447648961bc8fa4776f996604fead893e3be4)

diff --git a/vcl/generic/glyphs/graphite_serverfont.cxx b/vcl/generic/glyphs/graphite_serverfont.cxx
index 09159e4..3549c01 100644
--- a/vcl/generic/glyphs/graphite_serverfont.cxx
+++ b/vcl/generic/glyphs/graphite_serverfont.cxx
@@ -48,7 +48,7 @@ GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) thro
     , mpFeatures(NULL)
     , mpStr(NULL)
 {
-    gr_font * pFont = rServerFont.GetGraphiteFace()->font(rServerFont.GetFontSelData().mnHeight);
+    gr_font * pFont = rServerFont.GetGraphiteFace()->font(rServerFont.GetFontSelData().mnHeight, rServerFont.NeedsArtificialBold(), rServerFont.NeedsArtificialItalic());
     if (!pFont)
     {
         pFont = gr_make_font_with_advance_fn(
@@ -57,7 +57,7 @@ GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) thro
                &rServerFont,
                freetypeServerFontAdvance,
                rServerFont.GetGraphiteFace()->face());
-        rServerFont.GetGraphiteFace()->addFont(rServerFont.GetFontSelData().mnHeight, pFont);
+        rServerFont.GetGraphiteFace()->addFont(rServerFont.GetFontSelData().mnHeight, pFont, rServerFont.NeedsArtificialBold(), rServerFont.NeedsArtificialItalic());
     }
     maImpl.SetFont(pFont);
     OString aLang("");
diff --git a/vcl/inc/graphite_layout.hxx b/vcl/inc/graphite_layout.hxx
index 6a84d54..c53b551 100644
--- a/vcl/inc/graphite_layout.hxx
+++ b/vcl/inc/graphite_layout.hxx
@@ -52,7 +52,8 @@ namespace grutils { class GrFeatureParser; }
 class GraphiteFaceWrapper
 {
 public:
-    typedef std::map<int, gr_font*> GrFontMap;
+    typedef std::pair<int, int> GrFontMapKey;
+    typedef std::map<GrFontMapKey, gr_font*> GrFontMap;
     GraphiteFaceWrapper(gr_face * pFace) : m_pFace(pFace) {}
     ~GraphiteFaceWrapper()
     {
@@ -63,18 +64,21 @@ public:
         gr_face_destroy(m_pFace);
     }
     const gr_face * face() const { return m_pFace; }
-    gr_font * font(int ppm) const
+    gr_font * font(int ppm, bool isBold, bool isItalic) const
     {
-        GrFontMap::const_iterator i = m_fonts.find(ppm);
+        int styleKey = int(isBold) | (int(isItalic) << 1);
+        GrFontMap::const_iterator i = m_fonts.find(GrFontMapKey(ppm, styleKey));
         if (i != m_fonts.end())
             return i->second;
         return NULL;
     };
-    void addFont(int ppm, gr_font * pFont)
+    void addFont(int ppm, gr_font * pFont, bool isBold, bool isItalic)
     {
-        if (m_fonts[ppm])
-            gr_font_destroy(m_fonts[ppm]);
-        m_fonts[ppm] = pFont;
+        int styleKey = int(isBold) | (int(isItalic) << 1);
+        GrFontMapKey key(ppm, styleKey);
+        if (m_fonts[key])
+            gr_font_destroy(m_fonts[key]);
+        m_fonts[key] = pFont;
     }
 private:
     gr_face * m_pFace;
commit 4c4ef415e2087084f474c02c104d08fff37e0268
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Feb 6 23:32:54 2015 +0100

    Resolves: tdf#83461 do not override MatColsRows if already set
    
    ScMatrixFormulaCellToken::SetMatColsRows() via
    ScFormulaCell::SetMatColsRows() is used during document import and
    preselected cell area input of an array formula. Do not override
    existing values with subsequent result matrix dimensions.
    
    Change-Id: I9e844b5064ea276f3cbcb680eb1127c344328e00
    (cherry picked from commit e32eff2bb4c12fdc33e476b9f12bb4bb71d22ebc)
    Reviewed-on: https://gerrit.libreoffice.org/14355
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit cd1f5a81b7602040a7c88b30fd8dbde844fa2f71)

diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx
index 658eb97..d50006b 100644
--- a/sc/source/core/tool/formularesult.cxx
+++ b/sc/source/core/tool/formularesult.cxx
@@ -168,7 +168,7 @@ void ScFormulaResult::SetToken( const formula::FormulaToken* p )
         {
             const ScMatrixFormulaCellToken* pNewMatFormula =
                 dynamic_cast<const ScMatrixFormulaCellToken*>(pMatResult);
-            if (pNewMatFormula)
+            if (pNewMatFormula && (pMatFormula->GetMatCols() <= 0 || pMatFormula->GetMatRows() <= 0))
             {
                 SAL_WARN( "sc", "ScFormulaResult::SetToken: pNewMatFormula and pMatFormula, overriding matrix formula dimension; intended?");
                 pMatFormula->SetMatColsRows( pNewMatFormula->GetMatCols(),
commit 6a330f8ae8639e13391b1129a6428b9602e989a4
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Jan 28 18:24:40 2015 +0100

    Query Design: use correct name for columns that come from another query.
    
    Change-Id: I25b4ccdc2f50ba89687e1f4c871f286251a28e21
    Reviewed-on: https://gerrit.libreoffice.org/14344
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 97b11a21b64f4bac5af67819549f6e384d61c086)

diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 1e003cb..ede688b 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1157,7 +1157,8 @@ OUString OSQLParser::stringToDouble(const OUString& _rValue,sal_Int16 _nScale)
 
 OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString& rStatement,
                                           const Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter,
-                                         const Reference< XPropertySet > & xField)
+                                         const Reference< XPropertySet > & xField,
+                                         bool bUseRealName)
 {
     // Guard the parsing
     ::osl::MutexGuard aGuard(getMutex());
@@ -1181,7 +1182,7 @@ OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString
             // #75243# use the RealName of the column if there is any otherwise the name which could be the alias
             // of the field
             Reference< XPropertySetInfo> xInfo = m_xField->getPropertySetInfo();
-            if ( xInfo->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME)))
+            if ( bUseRealName && xInfo->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME)))
                 m_xField->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME)) >>= aString;
             else
                 m_xField->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aString;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 33bab8f..880cafc 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -3080,10 +3080,23 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE
     }
 
     OUString sTest(_sCriteria);
+    // _rxColumn, if it is a "lookup" column, not a computed column,
+    // is guaranteed to be the column taken from the *source* of the column,
+    // that is either a table or another query.
+    // _rxColumn is *not* taken from the columns of the query we are constructing
+    // (and rightfully so, since it may not be part of these columns; SELECT A FROM t WHERE B = foo)
+    // If it is a computed column, we just constructed it above, with same Name and RealName.
+    // In all cases, we should use the "external" name of the column, not the "RealName";
+    // the latter is the name that the column had in the source of the source query.
+    // An example: we are designing "SELECT A, B FROM q WHERE C='foo'"
+    // q itself is query "SELECT aye AS A, bee as B, cee as C FROM t"
+    // We are currently treating the entry "C='foo'"
+    // Then _rxColumn has Name "C" and RealName "cee". We should *obviously* use "C", not "cee".
     OSQLParseNode* pParseNode = rParser.predicateTree(  _rsErrorMessage,
                                                         sTest,
                                                         static_cast<OQueryController&>(getController()).getNumberFormatter(),
-                                                        _rxColumn);
+                                                        _rxColumn,
+                                                        false);
     return pParseNode;
 }
 
diff --git a/include/connectivity/sqlparse.hxx b/include/connectivity/sqlparse.hxx
index f6a7b0f..7888899 100644
--- a/include/connectivity/sqlparse.hxx
+++ b/include/connectivity/sqlparse.hxx
@@ -191,9 +191,12 @@ namespace connectivity
                        bool bInternational = false);
 
         // Check a Predicate
+        // set bUseRealName to false if you pass a xField that comes from where you got that field,
+        // as opposed from to from yourself.
         OSQLParseNode* predicateTree(OUString& rErrorMessage, const OUString& rStatement,
                        const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter,
-                       const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xField);
+                       const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xField,
+                       bool bUseRealName = true);
 
         // Access to the context
         const IParseContext& getContext() const {return *m_pContext;}
commit 04c1ce2f65da7ebad1b1e918e90e4c03177d480d
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Thu Feb 5 21:29:29 2015 +0100

    tdf#89070 Table filter dialog: properly initialise OTableTreeListBox
    
    regression from .ui conversion:
    
    commit 5c72a213c7c4b588d0c1e0884ff2c46c22425faf
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Tue Jan 21 14:41:16 2014 +0000
    
        convert table filter page to .ui
    
        Change-Id: I7bfb7698e2a5303b492766fba564c7b9033bcc52
    
    Change-Id: Ic7d41d64d4c15eabf7b7f83a17482c473154434a
    Reviewed-on: https://gerrit.libreoffice.org/14343
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 120f748e81aefa863d6c425b85563dbbb70ae4c1)

diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index a12bf47..01da2ed 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -81,6 +81,7 @@ namespace dbaui
         get(m_pTables, "TablesFilterPage");
 
         get(m_pTablesList, "treeview");
+        m_pTablesList->init(true);
         m_pTablesList->set_width_request(56 * m_pTablesList->approximate_char_width());
         m_pTablesList->set_height_request(12 * m_pTablesList->GetTextHeight());
 
commit 2dbacb1bc92b999537cd59d882ca08548d865143
Author: Katarina Behrens <bubli at bubli.org>
Date:   Tue Feb 10 23:27:28 2015 +0100

    tdf#79239: make the dialog closable with 'X' button again
    
    that one of window manager, top-right corner mostly. We need to
    reimplement Close() method for this class - I don't quite get why
    this has to be the case, but all classes derived from ScAnyRefDlg
    do it as well.
    
    Change-Id: I3e94b7ee09f9b3581d054818d36ea4fb0fd55f78
    (cherry picked from commit bd472c8a91976cda5fc5a45fccd2c782c6d44e73)

diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 67e1907..dfe8cdc 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -609,16 +609,21 @@ void ScPivotLayoutDialog::PushDataFieldNames(std::vector<ScDPName>& rDataFieldNa
     return mpListBoxData->PushDataFieldNames(rDataFieldNames);
 }
 
+bool ScPivotLayoutDialog::Close()
+{
+    return DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
+}
+
 IMPL_LINK( ScPivotLayoutDialog, OKClicked, PushButton*, /*pButton*/ )
 {
     ApplyChanges();
-    DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
+    Close();
     return 0;
 }
 
 IMPL_LINK( ScPivotLayoutDialog, CancelClicked, PushButton*, /*pButton*/ )
 {
-    DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
+    Close();
     return 0;
 }
 
diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx
index c63177b..0d43227 100644
--- a/sc/source/ui/inc/PivotLayoutDialog.hxx
+++ b/sc/source/ui/inc/PivotLayoutDialog.hxx
@@ -95,6 +95,7 @@ private:
     DECL_LINK(ToggleSource,           void*);
     DECL_LINK(ToggleDestination,      void*);
     DECL_LINK(SourceEditModified, void*);
+    virtual bool Close() SAL_OVERRIDE;
 
     ScPivotParam maPivotParameters;
 
commit 551d8a2ce7e318c0a99f79c2ea708a909e260c8c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 10 09:49:16 2015 +0000

    Resolves: tdf#83073 use loaded graphic's width/height as defaults
    
    (cherry picked from commit 4327ee505f8507f653c8f4db9ac7503db2e15c3a)
    
    Conflicts:
    	sw/source/filter/html/htmlgrin.cxx
    
    Change-Id: Idad25f82d884c40c55b886fd7634a6c6e51693c4
    Reviewed-on: https://gerrit.libreoffice.org/14402
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit d330d1cb36b81026e448dc371075b7bc8c75d33e)

diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 9e95fa8..8cc516f 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -312,6 +312,7 @@ void SwHTMLParser::InsertImage()
     OUString sGrfNm;
     sal_Int16 eVertOri = text::VertOrientation::TOP;
     sal_Int16 eHoriOri = text::HoriOrientation::NONE;
+    bool bWidthProvided=false, bHeightProvided=false;
     long nWidth=0, nHeight=0;
     long nVSpace=0, nHSpace=0;
 
@@ -361,6 +362,7 @@ void SwHTMLParser::InsertImage()
                 bPrcWidth = (rOption.GetString().indexOf('%') != -1);
                 if( bPrcWidth && nWidth>100 )
                     nWidth = 100;
+                bWidthProvided = true;
                 break;
             case HTML_O_HEIGHT:
                 // erstmal nur als Pixelwerte merken!
@@ -368,6 +370,7 @@ void SwHTMLParser::InsertImage()
                 bPrcHeight = (rOption.GetString().indexOf('%') != -1);
                 if( bPrcHeight && nHeight>100 )
                     nHeight = 100;
+                bHeightProvided = true;
                 break;
             case HTML_O_VSPACE:
                 nVSpace = rOption.GetNumber();
@@ -461,6 +464,42 @@ IMAGE_SETEVENT:
         }
     }
 
+    Graphic aGraphic;
+    INetURLObject aGraphicURL( sGrfNm );
+    if( aGraphicURL.GetProtocol() == INET_PROT_DATA )
+    {
+        // use embedded base64 encoded data
+        ::com::sun::star::uno::Sequence< sal_Int8 > aPass;
+        OUString sBase64Data = sGrfNm.replaceAt(0,22,"");
+        ::sax::Converter::decodeBase64(aPass, sBase64Data);
+        if( aPass.hasElements() )
+        {
+            SvMemoryStream aStream(aPass.getArray(), aPass.getLength(), STREAM_READ);
+            if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, "", aStream))
+                sGrfNm = "";
+        }
+    }
+    // sBaseURL is empty if the source is clipboard
+    else if (sBaseURL.isEmpty())
+    {
+        if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, aGraphicURL))
+            sGrfNm = "";
+    }
+
+    if (!sGrfNm.isEmpty())
+    {
+        aGraphic.SetDefaultType();
+    }
+
+    if (!bHeightProvided || !bWidthProvided)
+    {
+        Size aPixelSize = aGraphic.GetSizePixel(Application::GetDefaultDevice());
+        if (!bWidthProvided)
+            nWidth = aPixelSize.Width();
+        if (!bHeightProvided)
+            nHeight = aPixelSize.Height();
+    }
+
     SfxItemSet aItemSet( pDoc->GetAttrPool(), pCSS1Parser->GetWhichMap() );
     SvxCSS1PropertyInfo aPropInfo;
     if( HasStyleOptions( aStyle, aId, aClass ) )
@@ -694,31 +733,6 @@ IMAGE_SETEVENT:
     aFrmSize.SetHeightPercent( nPrcHeight );
     aFrmSet.Put( aFrmSize );
 
-    Graphic aGraphic;
-    INetURLObject aGraphicURL( sGrfNm );
-    if( aGraphicURL.GetProtocol() == INET_PROT_DATA )
-    {
-        // use embedded base64 encoded data
-        ::com::sun::star::uno::Sequence< sal_Int8 > aPass;
-        OUString sBase64Data = sGrfNm.replaceAt(0,22,"");
-        ::sax::Converter::decodeBase64(aPass, sBase64Data);
-        if( aPass.hasElements() )
-        {
-            SvMemoryStream aStream(aPass.getArray(), aPass.getLength(), STREAM_READ);
-            if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, "", aStream))
-                sGrfNm = "";
-        }
-    }
-    // sBaseURL is empty if the source is clipboard
-    else if (sBaseURL.isEmpty())
-    {
-        if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, aGraphicURL))
-            sGrfNm = "";
-    }
-    if (!sGrfNm.isEmpty())
-    {
-        aGraphic.SetDefaultType();
-    }
     // passing empty sGrfNm here, means we don't want the graphic to be linked
     SwFrmFmt *pFlyFmt = pDoc->Insert( *pPam, sGrfNm, aEmptyOUStr, &aGraphic,
                                       &aFrmSet, NULL, NULL );
@@ -742,10 +756,10 @@ IMAGE_SETEVENT:
         if( !sAltNm.isEmpty() )
             pGrfNd->SetTitle( sAltNm );
 
-    if( bSetTwipSize )
-        pGrfNd->SetTwipSize( aGrfSz );
+        if( bSetTwipSize )
+            pGrfNd->SetTwipSize( aGrfSz );
 
-    pGrfNd->SetChgTwipSize( bChangeFrmSize, bChangeFrmSize );
+        pGrfNd->SetChgTwipSize( bChangeFrmSize, bChangeFrmSize );
 
         if( bSetScaleImageMap )
             pGrfNd->SetScaleImageMap( true );
commit 4887faea7c9b530f98473eda31b0f1ee492aee23
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 11 14:02:08 2015 +0000

    Resolves: tdf#89179 fix Undo of Numbering Level change crash
    
    regression from long paras presumably
    
    Change-Id: Ib89169e52e42fcbe6f8e1ab0a2eb9871d38ff06d
    (cherry picked from commit 29d2666d92e1105473f339609ba59e54a286b71c)
    Reviewed-on: https://gerrit.libreoffice.org/14419
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit f45183c3c652b2c023d571ef56775ce5d3b27d2a)

diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index cb7e6f6..27456c98 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -52,7 +52,7 @@ SwUndoInsNum::SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
     sReplaceRule( rReplaceRule ), nLRSavePos( 0 )
 {
     // No selection!
-    nEndNode = 0, nEndCntnt = USHRT_MAX;
+    nEndNode = 0, nEndCntnt = COMPLETE_STRING;
     nSttNode = rPos.nNode.GetIndex();
     nSttCntnt = rPos.nContent.GetIndex();
 }
@@ -224,7 +224,7 @@ void SwUndoMoveNum::UndoImpl(::sw::UndoRedoContext & rContext)
 {
     sal_uLong nTmpStt = nSttNode, nTmpEnd = nEndNode;
 
-    if( nEndNode || USHRT_MAX != nEndCntnt )        // section?
+    if (nEndNode || nEndCntnt != COMPLETE_STRING)        // section?
     {
         if( nNewStt < nSttNode )        // moved forwards
             nEndNode = nEndNode - ( nSttNode - nNewStt );
commit 0b329e0e7f1b435430ea65575ae2661a24ca4d25
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sun Jan 25 19:01:00 2015 +0100

    tdf#73059 isDBReadOnly ensure connection before trying to retrieve it
    
    Change-Id: I03f9b8ea72bd6906df61ccf05ead3670d7f90eb7
    Reviewed-on: https://gerrit.libreoffice.org/14345
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 605c8d7f4c7b5b431747ced10243e01529b31777)

diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 889e94a..ee7065d 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -991,6 +991,7 @@ bool SbaGridControl::IsReadOnlyDB() const
         if (xColumns.is())
         {
             Reference< XRowSet >  xDataSource(xColumns->getParent(), UNO_QUERY);
+            ::dbtools::ensureRowSetConnection( xDataSource, getContext(), false ); // NOT SURE ABOUT FALSE
             Reference< XChild >  xConn(::dbtools::getConnection(xDataSource),UNO_QUERY);
             if (xConn.is())
             {
commit 17c7abf7488e33c17ef8fa7eb3563d4a66e47d41
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Feb 5 15:19:33 2015 +0100

    sw: fix ASAN detected error in RtfSdrExport::Commit()
    
    EscherPropertyContainer may allocate a 1-byte buffer if there are no
    vertices / segments. (happens in sw_filters_test)
    
     in EscherPropertyContainer::CreateCustomShapeProperties(MSO_SPT, com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) filter/source/msfilter/escherex.cxx:3853:25
    
    Change-Id: I56dedbd57d38cd017183060e924cb1340ea58ebf
    (cherry picked from commit e73799f8a9310f04074bc0dd88d9092094338576)
    Reviewed-on: https://gerrit.libreoffice.org/14336
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit 7a046ddda3d8c7b8b94c6825349c7c143aafda68)

diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index d8706a2..a6ac55c 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -259,7 +259,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRec
             EscherPropSortStruct aSegments;
 
             if (rProps.GetOpt(ESCHER_Prop_pVertices, aVertices) &&
-                    rProps.GetOpt(ESCHER_Prop_pSegmentInfo, aSegments))
+                rProps.GetOpt(ESCHER_Prop_pSegmentInfo, aSegments) &&
+                aVertices.nPropSize >= 6 && aSegments.nPropSize >= 6)
             {
                 const sal_uInt8* pVerticesIt = aVertices.pBuf + 6;
                 sal_Size nVerticesPos = 6;
commit 3a4433bb93705969bd17bcf0003c2b37407f7905
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 30 10:13:04 2015 +0000

    Resolves: tdf#82942 updating field contents with incorrect attribute positions
    
    Updating a SwTxtInputFld requires expanding the contents of the node.
    
    Expanding the contents of the node requires all the positions of fields in the
    node to be correct in order to expand them to the right place.
    
    So on updating a SwTxtNode wait until all the attributes positions are adjusted
    to be correct before expanding the SwTxtInputFlds in that node
    
    (cherry picked from commit 95f4b2f4a6dfe47842336116d94edd175a6da960)
    
    Conflicts:
    	sw/source/core/txtnode/ndtxt.cxx
    
    Change-Id: I76500239a103e56be412707a708a303a58236070
    Reviewed-on: https://gerrit.libreoffice.org/14254
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 6aa163f33d48326905f47e1f37ea26f992f4235f)

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 0c1d094..615f271 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -839,6 +839,8 @@ void SwTxtNode::Update(
     {
         if ( bNegative )
         {
+            std::vector<SwTxtInputFld*> aTxtInputFlds;
+
             const sal_Int32 nChangeEnd = nChangePos + nChangeLen;
             for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); ++n )
             {
@@ -881,12 +883,18 @@ void SwTxtNode::Update(
                 {
                     SwTxtInputFld* pTxtInputFld = dynamic_cast<SwTxtInputFld*>(pHint);
                     if ( pTxtInputFld )
-                    {
-                        pTxtInputFld->UpdateFieldContent();
-                    }
+                        aTxtInputFlds.push_back(pTxtInputFld);
                 }
             }
 
+            //wait until all the attribute positions are correct
+            //before updating the field contents
+            for (std::vector<SwTxtInputFld*>::iterator aI = aTxtInputFlds.begin(); aI != aTxtInputFlds.end(); ++aI)
+            {
+                SwTxtInputFld* pTxtInputFld = *aI;
+                pTxtInputFld->UpdateFieldContent();
+            }
+
             m_pSwpHints->MergePortions( *this );
         }
         else
@@ -896,6 +904,7 @@ void SwTxtNode::Update(
             bool bMergePortionsNeeded = false;
             const sal_uInt16 coArrSz =
                 static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) - static_cast<sal_uInt16>(RES_CHRATR_BEGIN);
+            std::vector<SwTxtInputFld*> aTxtInputFlds;
 
             bool aDontExp[ coArrSz ];
             memset( &aDontExp, 0, coArrSz * sizeof(bool) );
@@ -993,11 +1002,18 @@ void SwTxtNode::Update(
                 {
                     SwTxtInputFld* pTxtInputFld = dynamic_cast<SwTxtInputFld*>(pHint);
                     if ( pTxtInputFld )
-                    {
-                        pTxtInputFld->UpdateFieldContent();
-                    }
+                        aTxtInputFlds.push_back(pTxtInputFld);
                 }
             }
+
+            //wait until all the attribute positions are correct
+            //before updating the field contents
+            for (std::vector<SwTxtInputFld*>::iterator aI = aTxtInputFlds.begin(); aI != aTxtInputFlds.end(); ++aI)
+            {
+                SwTxtInputFld* pTxtInputFld = *aI;
+                pTxtInputFld->UpdateFieldContent();
+            }
+
             if (bMergePortionsNeeded)
             {
                 m_pSwpHints->MergePortions(*this); // does Resort too
commit baa5f52108f6d13d1cace3166c1e785b1a5fcd92
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 4 11:31:14 2015 +0000

    tdf#88854 crash on opening drop caps
    
    Change-Id: I3ab56e4909d2a20dc8f0bafe0273e81065296f17
    (cherry picked from commit 727c3e088698dfd21cf4beaa5455d4c4d5b495fb)
    Reviewed-on: https://gerrit.libreoffice.org/14319
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit ccf8e201bd825df0227af8ab9161c11e9db05bc7)

diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 5edfda1..ff3b11f 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -393,7 +393,9 @@ void SwDropCapsPict::DrawPrev( const Point& rPt )
 
         rFnt.DrawPrev( this, mpPrinter, aPt, maText, nStart, nEnd - nStart );
 
-        aPt.X() += maScriptChanges[ nIdx ].textWidth;
+        if (!maScriptChanges.empty())
+            aPt.X() += maScriptChanges[ nIdx ].textWidth;
+
         if ( !GetNextScriptSegment(nIdx, nStart, nEnd, nScript) )
             break;
     }
commit 47e38347eb85e6a71363e4cea84c5de1916027be
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 4 17:11:14 2015 +0000

    Resolves: tdf#68137 crash in traversing script fields
    
    use the same guards as the SwFldEditDlg does
    
    (cherry picked from commit 38a65f76bc944ea730ebac7640dc135248ec3da0)
    
    Conflicts:
    	sw/source/ui/fldui/javaedit.cxx
    
    Change-Id: I7d135cf969d9925cec57a90ef0fba8fe40f664eb
    Reviewed-on: https://gerrit.libreoffice.org/14324
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 9980636a5c3a499c299a8b6f4b93965f18bb4311)

diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index 6841271..4d70536 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -77,8 +77,8 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) :
     aFont.SetWeight( WEIGHT_LIGHT );
     m_pEditED->SetFont( aFont );
 
-    pMgr = new SwFldMgr;
-    pFld = (SwScriptField*)pMgr->GetCurFld();
+    pMgr = new SwFldMgr(pSh);
+    pFld = static_cast<SwScriptField*>(pMgr->GetCurFld());
 
     bNew = !(pFld && pFld->GetTyp()->Which() == RES_SCRIPTFLD);
 
@@ -92,6 +92,7 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) :
 
 SwJavaEditDialog::~SwJavaEditDialog()
 {
+    pSh->EnterStdMode();
     delete pMgr;
     delete pFileDlg;
     Application::SetDefDialogParent( pOldDefDlgParent );
@@ -99,6 +100,8 @@ SwJavaEditDialog::~SwJavaEditDialog()
 
 IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, PrevHdl)
 {
+    pSh->EnterStdMode();
+
     SetFld();
     pMgr->GoPrev();
     pFld = (SwScriptField*)pMgr->GetCurFld();
@@ -111,6 +114,8 @@ IMPL_LINK_NOARG_INLINE_END(SwJavaEditDialog, PrevHdl)
 
 IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, NextHdl)
 {
+    pSh->EnterStdMode();
+
     SetFld();
     pMgr->GoNext();
     pFld = (SwScriptField*)pMgr->GetCurFld();


More information about the Libreoffice-commits mailing list