[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 30 commits - basic/source comphelper/source embeddedobj/source extras/source filter/source include/oox odk/docs oox/source sc/source sd/source svl/source svtools/source svx/source sw/qa writerfilter/source

Kohei Yoshida kohei.yoshida at collabora.com
Sun May 18 13:16:02 PDT 2014


 basic/source/sbx/sbxdec.cxx                                      |    6 
 comphelper/source/misc/mimeconfighelper.cxx                      |    7 
 embeddedobj/source/commonembedding/persistence.cxx               |   18 +
 embeddedobj/source/msole/olepersist.cxx                          |   11 
 extras/source/autotext/lang/en-AU/acor/DocumentList.xml          |    4 
 extras/source/autotext/lang/en-GB/acor/DocumentList.xml          |    4 
 extras/source/autotext/lang/en-US/acor/DocumentList.xml          |    4 
 extras/source/autotext/lang/en-ZA/acor/DocumentList.xml          |    4 
 extras/source/autotext/lang/ja/acor/DocumentList.xml             |    4 
 extras/source/autotext/lang/ko/acor/DocumentList.xml             |    4 
 extras/source/autotext/lang/zh-CN/acor/DocumentList.xml          |    4 
 extras/source/autotext/lang/zh-TW/acor/DocumentList.xml          |    4 
 filter/source/config/fragments/filters/StarOffice_XML__Math_.xcu |    2 
 include/oox/drawingml/textbodyproperties.hxx                     |    1 
 odk/docs/cpp/Doxyfile                                            |    1 
 odk/docs/idl/Doxyfile                                            |    1 
 oox/source/drawingml/shape.cxx                                   |   26 -
 oox/source/drawingml/textbodyproperties.cxx                      |    4 
 oox/source/drawingml/textbodypropertiescontext.cxx               |    4 
 sc/source/core/data/column3.cxx                                  |   43 +--
 sc/source/core/data/column4.cxx                                  |    4 
 sc/source/core/data/conditio.cxx                                 |   66 ++++
 sc/source/core/tool/interpr4.cxx                                 |    8 
 sc/source/filter/excel/read.cxx                                  |    2 
 sc/source/filter/excel/xestream.cxx                              |    2 
 sc/source/filter/qpro/qpro.cxx                                   |    2 
 sc/source/filter/xml/xmlexprt.cxx                                |   53 +++
 sc/source/ui/cctrl/checklistmenu.cxx                             |    3 
 sc/source/ui/undo/undoblk.cxx                                    |   15 +
 sc/source/ui/view/gridwin.cxx                                    |   55 ++--
 sc/source/ui/view/output.cxx                                     |   96 ++++---
 sc/source/ui/view/output2.cxx                                    |    4 
 sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx           |    3 
 sd/source/ui/view/sdview2.cxx                                    |    4 
 svl/source/numbers/zforfind.cxx                                  |  133 +++++++---
 svl/source/numbers/zforfind.hxx                                  |    7 
 svtools/source/graphic/grfcache.cxx                              |    2 
 svx/source/dialog/graphctl.cxx                                   |   19 -
 svx/source/sdr/properties/itemsettools.cxx                       |    1 
 sw/qa/extras/ooxmlexport/data/fdo78384.docx                      |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx                         |    7 
 sw/qa/extras/rtfimport/data/font-override.rtf                    |   28 ++
 sw/qa/extras/rtfimport/rtfimport.cxx                             |    6 
 writerfilter/source/dmapper/DomainMapper.cxx                     |   11 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                |   11 
 writerfilter/source/dmapper/DomainMapper_Impl.hxx                |    4 
 writerfilter/source/rtftok/rtfsprm.cxx                           |    9 
 writerfilter/source/rtftok/rtfsprm.hxx                           |    1 
 writerfilter/source/rtftok/rtfvalue.cxx                          |   12 
 49 files changed, 535 insertions(+), 189 deletions(-)

New commits:
commit fcfa8a6eac048d617fae10e196dda4f68d4df017
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sun May 18 12:43:06 2014 -0400

    fdo#78786: No need to insert entries here for date members.
    
    Data member entries are inserted when they are added in addDateMember().
    
    (cherry picked from commit 836328d6473ae1a0c472c7dbf8262641c74843cb)
    
    Conflicts:
    	sc/source/ui/cctrl/checklistmenu.cxx
    
    Change-Id: I6cb2e3629053fe2bb49517c4ef8d5c1fee576446
    Reviewed-on: https://gerrit.libreoffice.org/9398
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 999c9bb..5986ea5 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1517,9 +1517,6 @@ void ScCheckListMenuWindow::initMembers()
     {
         if (maMembers[i].mbDate)
         {
-            maChecks.InsertEntry(maMembers[i].maName, NULL, sal_False, LIST_APPEND, NULL,
-                SvLBoxButtonKind_enabledCheckbox );
-
             maChecks.CheckEntry(maMembers[i].maName, maMembers[i].mpParent, maMembers[i].mbVisible);
             // Expand first node of checked dates
             if (!maMembers[i].mpParent && maChecks.IsChecked(maMembers[i].maName,  maMembers[i].mpParent))
commit 2910ed4d076b19dddeb345686d05931bb3107d76
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun May 18 18:38:59 2014 +0200

    Resolves: fdo#78846 wrong AutoCorrect entries
    
    Cherry-picked from master (9868373a6f6db525e963ec79301ecbd74fbfdeba)
    
    Change-Id: Iff2e343c56092ba85a1179f121f460e5ada841f4
    Reviewed-on: https://gerrit.libreoffice.org/9397
    Reviewed-by: Thomas Arnhold <thomas at arnhold.org>
    Tested-by: Thomas Arnhold <thomas at arnhold.org>

diff --git a/extras/source/autotext/lang/en-AU/acor/DocumentList.xml b/extras/source/autotext/lang/en-AU/acor/DocumentList.xml
index 33312da..8332403 100644
--- a/extras/source/autotext/lang/en-AU/acor/DocumentList.xml
+++ b/extras/source/autotext/lang/en-AU/acor/DocumentList.xml
@@ -269,7 +269,7 @@
   <block-list:block block-list:abbreviated-name="dissonent" block-list:name="dissonant"/>
   <block-list:block block-list:abbreviated-name="distribusion" block-list:name="distribution"/>
   <block-list:block block-list:abbreviated-name="divsion" block-list:name="division"/>
-  <block-list:block block-list:abbreviated-name="docuement" block-list:name="documents"/>
+  <block-list:block block-list:abbreviated-name="docuement" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="docuemnt" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documetn" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documnet" block-list:name="document"/>
@@ -310,7 +310,7 @@
   <block-list:block block-list:abbreviated-name="exprienced" block-list:name="experienced"/>
   <block-list:block block-list:abbreviated-name="eyt" block-list:name="yet"/>
   <block-list:block block-list:abbreviated-name="faeture" block-list:name="feature"/>
-  <block-list:block block-list:abbreviated-name="faetures" block-list:name="feature"/>
+  <block-list:block block-list:abbreviated-name="faetures" block-list:name="features"/>
   <block-list:block block-list:abbreviated-name="familair" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familar" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familliar" block-list:name="familiar"/>
diff --git a/extras/source/autotext/lang/en-GB/acor/DocumentList.xml b/extras/source/autotext/lang/en-GB/acor/DocumentList.xml
index d46b7ea..18719ca 100644
--- a/extras/source/autotext/lang/en-GB/acor/DocumentList.xml
+++ b/extras/source/autotext/lang/en-GB/acor/DocumentList.xml
@@ -269,7 +269,7 @@
   <block-list:block block-list:abbreviated-name="dissonent" block-list:name="dissonant"/>
   <block-list:block block-list:abbreviated-name="distribusion" block-list:name="distribution"/>
   <block-list:block block-list:abbreviated-name="divsion" block-list:name="division"/>
-  <block-list:block block-list:abbreviated-name="docuement" block-list:name="documents"/>
+  <block-list:block block-list:abbreviated-name="docuement" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="docuemnt" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documetn" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documnet" block-list:name="document"/>
@@ -310,7 +310,7 @@
   <block-list:block block-list:abbreviated-name="exprienced" block-list:name="experienced"/>
   <block-list:block block-list:abbreviated-name="eyt" block-list:name="yet"/>
   <block-list:block block-list:abbreviated-name="faeture" block-list:name="feature"/>
-  <block-list:block block-list:abbreviated-name="faetures" block-list:name="feature"/>
+  <block-list:block block-list:abbreviated-name="faetures" block-list:name="features"/>
   <block-list:block block-list:abbreviated-name="familair" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familar" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familliar" block-list:name="familiar"/>
diff --git a/extras/source/autotext/lang/en-US/acor/DocumentList.xml b/extras/source/autotext/lang/en-US/acor/DocumentList.xml
index 26abc6f..dc18c01 100644
--- a/extras/source/autotext/lang/en-US/acor/DocumentList.xml
+++ b/extras/source/autotext/lang/en-US/acor/DocumentList.xml
@@ -269,7 +269,7 @@
   <block-list:block block-list:abbreviated-name="dissonent" block-list:name="dissonant"/>
   <block-list:block block-list:abbreviated-name="distribusion" block-list:name="distribution"/>
   <block-list:block block-list:abbreviated-name="divsion" block-list:name="division"/>
-  <block-list:block block-list:abbreviated-name="docuement" block-list:name="documents"/>
+  <block-list:block block-list:abbreviated-name="docuement" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="docuemnt" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documetn" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documnet" block-list:name="document"/>
@@ -310,7 +310,7 @@
   <block-list:block block-list:abbreviated-name="exprienced" block-list:name="experienced"/>
   <block-list:block block-list:abbreviated-name="eyt" block-list:name="yet"/>
   <block-list:block block-list:abbreviated-name="faeture" block-list:name="feature"/>
-  <block-list:block block-list:abbreviated-name="faetures" block-list:name="feature"/>
+  <block-list:block block-list:abbreviated-name="faetures" block-list:name="features"/>
   <block-list:block block-list:abbreviated-name="familair" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familar" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familliar" block-list:name="familiar"/>
diff --git a/extras/source/autotext/lang/en-ZA/acor/DocumentList.xml b/extras/source/autotext/lang/en-ZA/acor/DocumentList.xml
index febfe61..00964f5 100644
--- a/extras/source/autotext/lang/en-ZA/acor/DocumentList.xml
+++ b/extras/source/autotext/lang/en-ZA/acor/DocumentList.xml
@@ -260,7 +260,7 @@
   <block-list:block block-list:abbreviated-name="dissonent" block-list:name="dissonant"/>
   <block-list:block block-list:abbreviated-name="distribusion" block-list:name="distribution"/>
   <block-list:block block-list:abbreviated-name="divsion" block-list:name="division"/>
-  <block-list:block block-list:abbreviated-name="docuement" block-list:name="documents"/>
+  <block-list:block block-list:abbreviated-name="docuement" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="docuemnt" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documetn" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documnet" block-list:name="document"/>
@@ -301,7 +301,7 @@
   <block-list:block block-list:abbreviated-name="exprienced" block-list:name="experienced"/>
   <block-list:block block-list:abbreviated-name="eyt" block-list:name="yet"/>
   <block-list:block block-list:abbreviated-name="faeture" block-list:name="feature"/>
-  <block-list:block block-list:abbreviated-name="faetures" block-list:name="feature"/>
+  <block-list:block block-list:abbreviated-name="faetures" block-list:name="features"/>
   <block-list:block block-list:abbreviated-name="familair" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familar" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familliar" block-list:name="familiar"/>
diff --git a/extras/source/autotext/lang/ja/acor/DocumentList.xml b/extras/source/autotext/lang/ja/acor/DocumentList.xml
index d533d06..8cc47df 100644
--- a/extras/source/autotext/lang/ja/acor/DocumentList.xml
+++ b/extras/source/autotext/lang/ja/acor/DocumentList.xml
@@ -265,7 +265,7 @@
   <block-list:block block-list:abbreviated-name="dissonent" block-list:name="dissonant"/>
   <block-list:block block-list:abbreviated-name="distribusion" block-list:name="distribution"/>
   <block-list:block block-list:abbreviated-name="divsion" block-list:name="division"/>
-  <block-list:block block-list:abbreviated-name="docuement" block-list:name="documents"/>
+  <block-list:block block-list:abbreviated-name="docuement" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="docuemnt" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documetn" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documnet" block-list:name="document"/>
@@ -306,7 +306,7 @@
   <block-list:block block-list:abbreviated-name="exprienced" block-list:name="experienced"/>
   <block-list:block block-list:abbreviated-name="eyt" block-list:name="yet"/>
   <block-list:block block-list:abbreviated-name="faeture" block-list:name="feature"/>
-  <block-list:block block-list:abbreviated-name="faetures" block-list:name="feature"/>
+  <block-list:block block-list:abbreviated-name="faetures" block-list:name="features"/>
   <block-list:block block-list:abbreviated-name="familair" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familar" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familliar" block-list:name="familiar"/>
diff --git a/extras/source/autotext/lang/ko/acor/DocumentList.xml b/extras/source/autotext/lang/ko/acor/DocumentList.xml
index d533d06..8cc47df 100644
--- a/extras/source/autotext/lang/ko/acor/DocumentList.xml
+++ b/extras/source/autotext/lang/ko/acor/DocumentList.xml
@@ -265,7 +265,7 @@
   <block-list:block block-list:abbreviated-name="dissonent" block-list:name="dissonant"/>
   <block-list:block block-list:abbreviated-name="distribusion" block-list:name="distribution"/>
   <block-list:block block-list:abbreviated-name="divsion" block-list:name="division"/>
-  <block-list:block block-list:abbreviated-name="docuement" block-list:name="documents"/>
+  <block-list:block block-list:abbreviated-name="docuement" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="docuemnt" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documetn" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documnet" block-list:name="document"/>
@@ -306,7 +306,7 @@
   <block-list:block block-list:abbreviated-name="exprienced" block-list:name="experienced"/>
   <block-list:block block-list:abbreviated-name="eyt" block-list:name="yet"/>
   <block-list:block block-list:abbreviated-name="faeture" block-list:name="feature"/>
-  <block-list:block block-list:abbreviated-name="faetures" block-list:name="feature"/>
+  <block-list:block block-list:abbreviated-name="faetures" block-list:name="features"/>
   <block-list:block block-list:abbreviated-name="familair" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familar" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familliar" block-list:name="familiar"/>
diff --git a/extras/source/autotext/lang/zh-CN/acor/DocumentList.xml b/extras/source/autotext/lang/zh-CN/acor/DocumentList.xml
index 8298a1d..e7dad2f 100644
--- a/extras/source/autotext/lang/zh-CN/acor/DocumentList.xml
+++ b/extras/source/autotext/lang/zh-CN/acor/DocumentList.xml
@@ -265,7 +265,7 @@
   <block-list:block block-list:abbreviated-name="dissonent" block-list:name="dissonant"/>
   <block-list:block block-list:abbreviated-name="distribusion" block-list:name="distribution"/>
   <block-list:block block-list:abbreviated-name="divsion" block-list:name="division"/>
-  <block-list:block block-list:abbreviated-name="docuement" block-list:name="documents"/>
+  <block-list:block block-list:abbreviated-name="docuement" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="docuemnt" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documetn" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documnet" block-list:name="document"/>
@@ -306,7 +306,7 @@
   <block-list:block block-list:abbreviated-name="exprienced" block-list:name="experienced"/>
   <block-list:block block-list:abbreviated-name="eyt" block-list:name="yet"/>
   <block-list:block block-list:abbreviated-name="faeture" block-list:name="feature"/>
-  <block-list:block block-list:abbreviated-name="faetures" block-list:name="feature"/>
+  <block-list:block block-list:abbreviated-name="faetures" block-list:name="features"/>
   <block-list:block block-list:abbreviated-name="familair" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familar" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familliar" block-list:name="familiar"/>
diff --git a/extras/source/autotext/lang/zh-TW/acor/DocumentList.xml b/extras/source/autotext/lang/zh-TW/acor/DocumentList.xml
index 8298a1d..e7dad2f 100644
--- a/extras/source/autotext/lang/zh-TW/acor/DocumentList.xml
+++ b/extras/source/autotext/lang/zh-TW/acor/DocumentList.xml
@@ -265,7 +265,7 @@
   <block-list:block block-list:abbreviated-name="dissonent" block-list:name="dissonant"/>
   <block-list:block block-list:abbreviated-name="distribusion" block-list:name="distribution"/>
   <block-list:block block-list:abbreviated-name="divsion" block-list:name="division"/>
-  <block-list:block block-list:abbreviated-name="docuement" block-list:name="documents"/>
+  <block-list:block block-list:abbreviated-name="docuement" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="docuemnt" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documetn" block-list:name="document"/>
   <block-list:block block-list:abbreviated-name="documnet" block-list:name="document"/>
@@ -306,7 +306,7 @@
   <block-list:block block-list:abbreviated-name="exprienced" block-list:name="experienced"/>
   <block-list:block block-list:abbreviated-name="eyt" block-list:name="yet"/>
   <block-list:block block-list:abbreviated-name="faeture" block-list:name="feature"/>
-  <block-list:block block-list:abbreviated-name="faetures" block-list:name="feature"/>
+  <block-list:block block-list:abbreviated-name="faetures" block-list:name="features"/>
   <block-list:block block-list:abbreviated-name="familair" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familar" block-list:name="familiar"/>
   <block-list:block block-list:abbreviated-name="familliar" block-list:name="familiar"/>
commit 715a73d35a4e1a31e49f2c0f5af6cf952340ce7d
Author: Eike Rathke <erack at redhat.com>
Date:   Sat May 17 02:33:42 2014 +0200

    resolved fdo#41166 match month and day name word instead of substring
    
    (cherry picked from commit 8e71f81f47c20320c4de7a7aadb7d524f0d8ea76)
    (cherry picked from commit 3885b5d4b00ebb31adabc36c507abd642c03d0d4)
    
    Change-Id: I897dbcee47de574d91ba3e3b40a39a35b779fef8
    Reviewed-on: https://gerrit.libreoffice.org/9387
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 840af0c..9c8bb1c 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -438,6 +438,52 @@ bool ImpSvNumberInputScan::StringPtrContainsImpl( const OUString& rWhat,
 
 
 /**
+ * Whether rString contains word rWhat at nPos
+ */
+bool ImpSvNumberInputScan::StringContainsWord( const OUString& rWhat,
+                                               const OUString& rString, sal_Int32 nPos )
+{
+    if (rWhat.isEmpty() || rString.getLength() < nPos + rWhat.getLength())
+        return false;
+
+    if (StringPtrContainsImpl( rWhat, rString.getStr(), nPos))
+    {
+        nPos += rWhat.getLength();
+        if (nPos == rString.getLength())
+            return true;    // word at end of string
+
+        /* TODO: we COULD invoke bells and whistles word break iterator to find
+         * the next boundary, but really ... this is called for date input, so
+         * how many languages do not separate the day and month names in some
+         * form? */
+
+        // Check simple ASCII first before invoking i18n or anything else.
+        if (rtl::isAsciiAlphanumeric( rString[nPos] ))
+            return false;   // Alpha or numeric is not word gap.
+
+        sal_Int32 nIndex = nPos;
+        const sal_uInt32 c = rString.iterateCodePoints( &nIndex);
+        if (nPos+1 < nIndex)
+            return true;    // Surrogate, assume these to be new words.
+        (void)c;
+
+        const sal_Int32 nType = pFormatter->GetCharClass()->getCharacterType( rString, nPos);
+        using namespace ::com::sun::star::i18n;
+
+        if ((nType & (KCharacterType::UPPER | KCharacterType::LOWER | KCharacterType::DIGIT)) != 0)
+            return false;   // Alpha or numeric is not word gap.
+
+        if ((nType & (KCharacterType::LETTER)) != 0)
+            return true;    // Letter other than alpha is new word. (Is it?)
+
+        return true;        // Catch all remaining as gap until we know better.
+    }
+
+    return false;
+}
+
+
+/**
  * Skips the supplied char
  */
 inline bool ImpSvNumberInputScan::SkipChar( sal_Unicode c, const OUString& rString,
@@ -575,7 +621,7 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
         // if we stopped at the first match.
         for ( sal_Int16 i = 0; i < nMonths; i++ )
         {
-            if ( bScanGenitiveMonths && StringContains( pUpperGenitiveMonthText[i], rString, nPos ) )
+            if ( bScanGenitiveMonths && StringContainsWord( pUpperGenitiveMonthText[i], rString, nPos ) )
             {   // genitive full names first
                 const int nMonthLen = pUpperGenitiveMonthText[i].getLength();
                 if (nMonthLen > nMatchLen)
@@ -584,7 +630,7 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
                     res = i + 1;
                 }
             }
-            else if ( bScanGenitiveMonths && StringContains( pUpperGenitiveAbbrevMonthText[i], rString, nPos ) )
+            else if ( bScanGenitiveMonths && StringContainsWord( pUpperGenitiveAbbrevMonthText[i], rString, nPos ) )
             {   // genitive abbreviated
                 const int nMonthLen = pUpperGenitiveAbbrevMonthText[i].getLength();
                 if (nMonthLen > nMatchLen)
@@ -593,7 +639,7 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
                     res = sal::static_int_cast< short >(-(i+1)); // negative
                 }
             }
-            else if ( bScanPartitiveMonths && StringContains( pUpperPartitiveMonthText[i], rString, nPos ) )
+            else if ( bScanPartitiveMonths && StringContainsWord( pUpperPartitiveMonthText[i], rString, nPos ) )
             {   // partitive full names
                 const int nMonthLen = pUpperPartitiveMonthText[i].getLength();
                 if (nMonthLen > nMatchLen)
@@ -602,7 +648,7 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
                     res = i+1;
                 }
             }
-            else if ( bScanPartitiveMonths && StringContains( pUpperPartitiveAbbrevMonthText[i], rString, nPos ) )
+            else if ( bScanPartitiveMonths && StringContainsWord( pUpperPartitiveAbbrevMonthText[i], rString, nPos ) )
             {   // partitive abbreviated
                 const int nMonthLen = pUpperPartitiveAbbrevMonthText[i].getLength();
                 if (nMonthLen > nMatchLen)
@@ -611,7 +657,7 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
                     res = sal::static_int_cast< short >(-(i+1)); // negative
                 }
             }
-            else if ( StringContains( pUpperMonthText[i], rString, nPos ) )
+            else if ( StringContainsWord( pUpperMonthText[i], rString, nPos ) )
             {   // noun full names
                 const int nMonthLen = pUpperMonthText[i].getLength();
                 if (nMonthLen > nMatchLen)
@@ -620,7 +666,7 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
                     res = i+1;
                 }
             }
-            else if ( StringContains( pUpperAbbrevMonthText[i], rString, nPos ) )
+            else if ( StringContainsWord( pUpperAbbrevMonthText[i], rString, nPos ) )
             {   // noun abbreviated
                 const int nMonthLen = pUpperAbbrevMonthText[i].getLength();
                 if (nMonthLen > nMatchLen)
@@ -630,7 +676,7 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
                 }
             }
             else if ( i == 8 && pUpperAbbrevMonthText[i] == aSeptCorrect &&
-                    StringContains( aSepShortened, rString, nPos ) )
+                    StringContainsWord( aSepShortened, rString, nPos ) )
             {   // #102136# SEPT/SEP
                 const int nMonthLen = aSepShortened.getLength();
                 if (nMonthLen > nMatchLen)
@@ -665,13 +711,13 @@ int ImpSvNumberInputScan::GetDayOfWeek( const OUString& rString, sal_Int32& nPos
         sal_Int16 nDays = pFormatter->GetCalendar()->getNumberOfDaysInWeek();
         for ( sal_Int16 i = 0; i < nDays; i++ )
         {
-            if ( StringContains( pUpperDayText[i], rString, nPos ) )
+            if ( StringContainsWord( pUpperDayText[i], rString, nPos ) )
             {   // full names first
                 nPos = nPos + pUpperDayText[i].getLength();
                 res = i + 1;
                 break;  // for
             }
-            if ( StringContains( pUpperAbbrevDayText[i], rString, nPos ) )
+            if ( StringContainsWord( pUpperAbbrevDayText[i], rString, nPos ) )
             {   // abbreviated
                 nPos = nPos + pUpperAbbrevDayText[i].getLength();
                 res = -(i + 1); // negative
diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx
index 6e24040..002db24 100644
--- a/svl/source/numbers/zforfind.hxx
+++ b/svl/source/numbers/zforfind.hxx
@@ -210,6 +210,13 @@ private:
     void NumberStringDivision( const OUString& rString );
 
 
+    /** Whether rString contains word (!) rWhat at nPos.
+        rWhat will not be matched if it is a substring of a word.
+     */
+    bool StringContainsWord( const OUString& rWhat,
+                             const OUString& rString,
+                             sal_Int32 nPos );
+
     // optimized substring versions
 
     // Whether rString contains rWhat at nPos
commit 6a8e4110580c4475e9e7e3813d533b85a6fc3dcc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri May 16 16:06:10 2014 +0100

    fix memory leak on pasting metafiles into writer
    
    copying from mspaint to writer and then deleting the image in a loop will
    eventually exhaust all memory.
    
    regression since 004a29b9ac66f68af5ea12a2303a4b2be77d8145
    
    Change-Id: I381285cda3823de7df0c1725a339943caf9536fe
    (cherry picked from commit 7d6e159df4c28afde2fff5bd734ec3a8f63cb15a)
    Reviewed-on: https://gerrit.libreoffice.org/9383
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 966cea8..da793f3 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -366,7 +366,7 @@ void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj*
     if( mbSwappedAll )
     {
         delete mpBmpEx, mpBmpEx = NULL;
-        mpMtf = NULL; // No need to delete it as it has already been dereferenced
+        delete mpMtf, mpMtf = NULL;
         delete mpAnimation, mpAnimation = NULL;
 
         // #119176# also reset SvgData
commit ce0bd941138d2ba4b046ca70af03d90772f34700
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri May 16 15:03:31 2014 -0400

    fdo#77315: When in cell edit mode, use the EditView instance already there.
    
    This prevents creation of a temporary EditView instance which would mess up
    the cursor state while the mouse pointer is hovering.
    
    (cherry picked from commit df51f7d486cafb2795a38ae9fedd8fde8827d8a4)
    (cherry picked from commit 8c8de51cc954aaae07f76732e6202398e33afeb7)
    
    Conflicts:
    	sc/source/ui/view/gridwin.cxx
    
    Change-Id: I7759667b105b4389dd4de2673cd2fbe32082c95d
    Reviewed-on: https://gerrit.libreoffice.org/9386
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c49d9ea..1fa83c5 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -63,6 +63,7 @@
 #include <com/sun/star/awt/MouseButton.hpp>
 #include <com/sun/star/script/vba/VBAEventId.hpp>
 #include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
+#include <com/sun/star/text/textfield/Type.hpp>
 
 #include "gridwin.hxx"
 #include "tabvwsh.hxx"
@@ -5190,11 +5191,43 @@ boost::shared_ptr<ScFieldEditEngine> createEditEngine( ScDocShell* pDocSh, const
     return pEngine;
 }
 
+bool extractURLInfo( const SvxFieldItem* pFieldItem, OUString* pName, OUString* pUrl, OUString* pTarget )
+{
+    if (!pFieldItem)
+        return false;
+
+    const SvxFieldData* pField = pFieldItem->GetField();
+    if (pField->GetClassId() != text::textfield::Type::URL)
+        return false;
+
+    const SvxURLField* pURLField = static_cast<const SvxURLField*>(pField);
+
+    if (pName)
+        *pName = pURLField->GetRepresentation();
+    if (pUrl)
+        *pUrl = pURLField->GetURL();
+    if (pTarget)
+        *pTarget = pURLField->GetTargetFrame();
+
+    return true;
+}
+
 }
 
 bool ScGridWindow::GetEditUrl( const Point& rPos,
                                OUString* pName, OUString* pUrl, OUString* pTarget )
 {
+    ScTabViewShell* pViewSh = pViewData->GetViewShell();
+    ScInputHandler* pInputHdl = NULL;
+    if (pViewSh)
+        pInputHdl = pViewSh->GetInputHandler();
+
+    if (pInputHdl && pInputHdl->IsInputMode())
+    {
+        EditView* pView = pInputHdl->GetTableView();
+        return extractURLInfo(pView->GetFieldUnderMousePointer(), pName, pUrl, pTarget);
+    }
+
     //! nPosX/Y mit uebergeben?
     SCsCOL nPosX;
     SCsROW nPosY;
@@ -5303,27 +5336,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
         sal_Bool bRet = false;
         MapMode aOld = GetMapMode();
         SetMapMode(aEditMode);                  // kein return mehr
-
-        const SvxFieldItem* pFieldItem = aTempView.GetFieldUnderMousePointer();
-        if (pFieldItem)
-        {
-            const SvxFieldData* pField = pFieldItem->GetField();
-            if ( pField && pField->ISA(SvxURLField) )
-            {
-                if ( pName || pUrl || pTarget )
-                {
-                    const SvxURLField* pURLField = (const SvxURLField*)pField;
-                    if (pName)
-                        *pName = pURLField->GetRepresentation();
-                    if (pUrl)
-                        *pUrl = pURLField->GetURL();
-                    if (pTarget)
-                        *pTarget = pURLField->GetTargetFrame();
-                }
-                bRet = sal_True;
-            }
-        }
-
+        bRet = extractURLInfo(aTempView.GetFieldUnderMousePointer(), pName, pUrl, pTarget);
         SetMapMode(aOld);
 
         return bRet;
commit a72dabd2bd6273109518448eb2d917781f012af6
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri May 16 23:06:33 2014 -0400

    fdo#77735: Don't proceed when all cells in the range are empty.
    
    That means there is nothing to delete, and proceeding would cause Calc
    to freeze.
    
    Change-Id: I2a8fb5736870ba459082873c8f864283d8b9c664
    (cherry picked from commit bc7e0967be52f5eb7948fbb1c30edc7dd5acc18d)
    Reviewed-on: https://gerrit.libreoffice.org/9388
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 7996cd8..9a3ef12 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -53,6 +53,10 @@ void ScColumn::DeleteBeforeCopyFromClip( sc::CopyFromClipContext& rCxt, const Sc
     sc::SingleColumnSpanSet::SpansType aSpans;
     aSpanSet.getSpans(aSpans);
 
+    if (aSpans.empty())
+        // All cells in the range in the clip are empty.  Nothing to delete.
+        return;
+
     // Translate the clip column spans into the destination column, and repeat as needed.
     std::vector<sc::RowSpan> aDestSpans;
     SCROW nDestOffset = aRange.mnRow1 - nClipRow1;
commit 8004bc6d3522b26b8746cc12f5c18e7324a05766
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri May 16 20:50:24 2014 +0100

    strangely obvious leaky code
    
    Change-Id: I968cbb784d53e0cff0649061c58f752939226a09
    (cherry picked from commit 5b2f1b46b129c41890c54513c6d386407db6718a)
    Reviewed-on: https://gerrit.libreoffice.org/9385
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx
index cea89d0..10472bc 100644
--- a/svx/source/sdr/properties/itemsettools.cxx
+++ b/svx/source/sdr/properties/itemsettools.cxx
@@ -120,6 +120,7 @@ namespace sdr
                         SfxPoolItem* pNewItem = pItem->Clone();
                         pNewItem->ScaleMetrics(nMul, nDiv);
                         rSet.Put(*pNewItem);
+                        delete pNewItem;
                     }
                 }
                 nWhich = aIter.NextWhich();
commit 6bfd9bc8fc1d01d0d2758e814810361f2b68d8c4
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri May 16 16:43:25 2014 +0300

    Use SVM (metafile) instead of PNG for diagrams (SmartArt)
    
    It seemed a bit pointless to waste CPU cycles on PNG-compressing a
    bitmap image only to later then uncompress it anyway. vcl's PNG
    writing code showed up as 13% on the time profile of TiledLibreOffice
    when displaying a document full of SmartArts.
    
    Miklos suggested I try using SVM (which I guess means "StarView
    Metafile") instead. When using SVM, no rendering of diagrams to
    bitmaps during loading is done, but the diagram stays stored in a
    resolution-independent (vector-ish) form. Which means it will be
    rendered nicely and crisply regardless of the zoom level.
    
    At least, that is my understanding, and experimentation (on OS X and Linux)
    seems to confirm.
    
    ce8c0ff07559ddcc729bffd7a68f4c6f281882e3
    
    Change-Id: Ice8c0ff07559ddcc729bffd7a68f4c6f281882e3
    (cherry picked from commit 633003965a4be0c535b43cc3072c5c4a95109d34)
    Reviewed-on: https://gerrit.libreoffice.org/9382
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 8b250b1..0e351d5 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -719,7 +719,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase )
         Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() );
 
         // Rendering format
-        OUString sFormat( "PNG" );
+        OUString sFormat( "SVM" );
 
         // Size of the rendering
         awt::Size aActualSize = mxShape->getSize();
@@ -728,21 +728,15 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase )
         awt::Size aSize = awt::Size( static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Width ) + 0.5 ),
                                      static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Height ) + 0.5 ) );
 
-        Sequence< PropertyValue > aFilterData( 7 );
-        aFilterData[ 0 ].Name = "Compression";
-        aFilterData[ 0 ].Value <<= static_cast < sal_Int32 > ( 9 );
-        aFilterData[ 1 ].Name = "Interlaced";
-        aFilterData[ 1 ].Value <<= static_cast < sal_Int32 > ( 1 );
-        aFilterData[ 2 ].Name = "Translucent";
-        aFilterData[ 2 ].Value <<= static_cast < sal_Int32 > ( 1 );
-        aFilterData[ 3 ].Name = "PixelWidth";
-        aFilterData[ 3 ].Value <<= aSize.Width;
-        aFilterData[ 4 ].Name = "PixelHeight";
-        aFilterData[ 4 ].Value <<= aSize.Height;
-        aFilterData[ 5 ].Name = "LogicalWidth";
-        aFilterData[ 5 ].Value <<= aActualSize.Width;
-        aFilterData[ 6 ].Name = "LogicalHeight";
-        aFilterData[ 6 ].Value <<= aActualSize.Height;
+        Sequence< PropertyValue > aFilterData( 4 );
+        aFilterData[ 0 ].Name = "PixelWidth";
+        aFilterData[ 0 ].Value <<= aSize.Width;
+        aFilterData[ 1 ].Name = "PixelHeight";
+        aFilterData[ 1 ].Value <<= aSize.Height;
+        aFilterData[ 2 ].Name = "LogicalWidth";
+        aFilterData[ 2 ].Value <<= aActualSize.Width;
+        aFilterData[ 3 ].Name = "LogicalHeight";
+        aFilterData[ 3 ].Value <<= aActualSize.Height;
 
         Sequence < PropertyValue > aDescriptor( 3 );
         aDescriptor[ 0 ].Name = "OutputStream";
commit 8854c366394f1c96010b56ab93b73a426e0588d1
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri May 16 10:45:40 2014 -0400

    fdo#75056: Overline attribute needs special treatment as well.
    
    Also fix the export of underline types as well.  It was always saved
    as a single line.
    
    (cherry picked from commit fcf5b5c081ded93b12dd888236d0a860b7693ed1)
    
    Change-Id: I88cb0f3702a6afc14544ecbce8f200b5422fd78f
    Signed-off-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index f7c6787..885b5bc 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1164,6 +1164,10 @@ const SvxFieldData* toXMLPropertyStates(
                 if (nIndexWidth == -1 || nIndexWidth > nEntryCount)
                     break;
 
+                sal_Int32 nIndexType = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, "text-underline-type", 0);
+                if (nIndexType == -1 || nIndexType > nEntryCount)
+                    break;
+
                 sal_Int32 nIndexColor = xMapper->FindEntryIndex("CharUnderlineColor", XML_NAMESPACE_STYLE, "text-underline-color");
                 if (nIndexColor == -1 || nIndexColor > nEntryCount)
                     break;
@@ -1175,6 +1179,7 @@ const SvxFieldData* toXMLPropertyStates(
                 const SvxUnderlineItem* pUL = static_cast<const SvxUnderlineItem*>(p);
                 pUL->QueryValue(aAny, MID_TL_STYLE);
                 rPropStates.push_back(XMLPropertyState(nIndexStyle, aAny));
+                rPropStates.push_back(XMLPropertyState(nIndexType,  aAny));
                 rPropStates.push_back(XMLPropertyState(nIndexWidth, aAny));
 
                 pUL->QueryValue(aAny, MID_TL_COLOR);
@@ -1186,10 +1191,38 @@ const SvxFieldData* toXMLPropertyStates(
             break;
             case EE_CHAR_OVERLINE:
             {
-                if (!static_cast<const SvxOverlineItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
-                    continue;
+                // Same with overline.  Do just as we do with underline attributes.
+                sal_Int32 nIndexStyle = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, "text-overline-style", 0);
+                if (nIndexStyle == -1 || nIndexStyle > nEntryCount)
+                    break;
 
-                rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+                sal_Int32 nIndexWidth = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, "text-overline-width", 0);
+                if (nIndexWidth == -1 || nIndexWidth > nEntryCount)
+                    break;
+
+                sal_Int32 nIndexType = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, "text-overline-type", 0);
+                if (nIndexType == -1 || nIndexType > nEntryCount)
+                    break;
+
+                sal_Int32 nIndexColor = xMapper->FindEntryIndex("CharOverlineColor", XML_NAMESPACE_STYLE, "text-overline-color");
+                if (nIndexColor == -1 || nIndexColor > nEntryCount)
+                    break;
+
+                sal_Int32 nIndexHasColor = xMapper->FindEntryIndex("CharOverlineHasColor", XML_NAMESPACE_STYLE, "text-overline-color");
+                if (nIndexHasColor == -1 || nIndexHasColor > nEntryCount)
+                    break;
+
+                const SvxOverlineItem* pOL = static_cast<const SvxOverlineItem*>(p);
+                pOL->QueryValue(aAny, MID_TL_STYLE);
+                rPropStates.push_back(XMLPropertyState(nIndexStyle, aAny));
+                rPropStates.push_back(XMLPropertyState(nIndexType,  aAny));
+                rPropStates.push_back(XMLPropertyState(nIndexWidth, aAny));
+
+                pOL->QueryValue(aAny, MID_TL_COLOR);
+                rPropStates.push_back(XMLPropertyState(nIndexColor, aAny));
+
+                pOL->QueryValue(aAny, MID_TL_HASCOLOR);
+                rPropStates.push_back(XMLPropertyState(nIndexHasColor, aAny));
             }
             break;
             case EE_CHAR_COLOR:
commit 76f8ca92c0980bffd209ca27d53dbbff53e6bafe
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu May 15 20:32:05 2014 -0400

    fdo#77537: Exporting font names in edit text needs special handling.
    
    Change-Id: Ia9c29d37eaf962e0245920e50f534dd779af72dc
    (cherry picked from commit 48eccfb812284f43ba24c3be3903537ce954944d)
    Reviewed-on: https://gerrit.libreoffice.org/9366
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 0f157a1..f7c6787 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1109,10 +1109,18 @@ const SvxFieldData* toXMLPropertyStates(
             case EE_CHAR_FONTINFO_CJK:
             case EE_CHAR_FONTINFO_CTL:
             {
-                if (!static_cast<const SvxFontItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
-                    continue;
+                // Apparently font info needs special handling.
+                const SvxFontItem* pItem = static_cast<const SvxFontItem*>(p);
 
-                rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+                sal_Int32 nIndexFontName = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, "font-name", 0);
+
+                if (nIndexFontName == -1 || nIndexFontName >= nEntryCount)
+                    break;
+
+                if (!pItem->QueryValue(aAny, MID_FONT_FAMILY_NAME))
+                    break;
+
+                rPropStates.push_back(XMLPropertyState(nIndexFontName, aAny));
             }
             break;
             case EE_CHAR_WEIGHT:
commit d010dfafae33aedae142b620de829f500946e7bb
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue May 13 22:46:17 2014 -0400

    fdo#76710: Adjust sheet position of conditional format entries.
    
    When inserting or deleting sheets.
    
    Change-Id: Ibf898350e22f092ec38b75ad98957832a5580e6a
    (cherry picked from commit 146f6e7e68ea56f79b72047b97bd9fba66db499d)
    Reviewed-on: https://gerrit.libreoffice.org/9350
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 5e8e549..602446c 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -2004,12 +2004,49 @@ void ScConditionalFormat::InsertCol(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd,
 
 void ScConditionalFormat::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
 {
+    for (size_t i = 0, n = maRanges.size(); i < n; ++i)
+    {
+        // We assume that the start and end sheet indices are equal.
+        ScRange* pRange = maRanges[i];
+        SCTAB nTab = pRange->aStart.Tab();
+
+        if (nTab < rCxt.mnInsertPos)
+            // Unaffected.
+            continue;
+
+        pRange->aStart.IncTab(rCxt.mnSheets);
+        pRange->aEnd.IncTab(rCxt.mnSheets);
+    }
+
     for (CondFormatContainer::iterator it = maEntries.begin(); it != maEntries.end(); ++it)
         it->UpdateInsertTab(rCxt);
 }
 
 void ScConditionalFormat::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
 {
+    for (size_t i = 0, n = maRanges.size(); i < n; ++i)
+    {
+        // We assume that the start and end sheet indices are equal.
+        ScRange* pRange = maRanges[i];
+        SCTAB nTab = pRange->aStart.Tab();
+
+        if (nTab < rCxt.mnDeletePos)
+            // Left of the deleted sheet(s).  Unaffected.
+            continue;
+
+        if (nTab <= rCxt.mnDeletePos+rCxt.mnSheets-1)
+        {
+            // On the deleted sheet(s).
+            pRange->aStart.SetTab(-1);
+            pRange->aEnd.SetTab(-1);
+            continue;
+        }
+
+        // Right of the deleted sheet(s).  Adjust the sheet indices.
+        pRange->aStart.IncTab(-1*rCxt.mnSheets);
+        pRange->aEnd.IncTab(-1*rCxt.mnSheets);
+    }
+
     for (CondFormatContainer::iterator it = maEntries.begin(); it != maEntries.end(); ++it)
         it->UpdateDeleteTab(rCxt);
 }
commit 6490a07fe41657a7477c675b921ff4a6a86c2c47
Author: Luboš Luňák <l.lunak at collabora.com>
Date:   Wed Mar 12 13:44:29 2014 +0100

    std::strlen requires cstring include to build
    
    Or, even simpler, don't bother with the needless namespacing.
    
    Change-Id: I4bbb115c1c2c89881a0bf88ccd54b0f5cb8b3518
    (cherry picked from commit da9bd301c6f62e829daadb2af6a6b9633d4f1cb9)
    Signed-off-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 035a827..df08d2c 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -985,7 +985,7 @@ sax_fastparser::FSHelperPtr& XclExpXmlStream::WriteAttributesInternal( sal_Int32
             rStream->write( " " )
                 ->writeId( nAttribute )
                 ->write( "=\"" )
-                ->writeEscaped( OUString(pValue, std::strlen(pValue), RTL_TEXTENCODING_UTF8) )
+                ->writeEscaped( OUString(pValue, strlen(pValue), RTL_TEXTENCODING_UTF8) )
                 ->write( "\"" );
         }
 
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index c370492..793412a 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -229,7 +229,7 @@ void ScQProReader::readString( OUString &rString, sal_uInt16 nLength )
     sal_Char* pText = new sal_Char[ nLength + 1 ];
     mpStream->Read( pText, nLength );
     pText[ nLength ] = 0;
-    rString = OUString( pText, std::strlen(pText), mpStream->GetStreamCharSet() );
+    rString = OUString( pText, strlen(pText), mpStream->GetStreamCharSet() );
     delete [] pText;
 }
 
commit 0c4ded8d370a93ec5e07350fc6d4813748a49b94
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue May 13 12:35:24 2014 -0400

    fdo#78402: Adjust references of validity entries as appropriate.
    
    Change-Id: I7fd62153c7267a3d606b86d74bebecf6b8d75250
    (cherry picked from commit a93bb27aa46c84410c8848a6118d5d63d47be92c)
    Reviewed-on: https://gerrit.libreoffice.org/9345
    Tested-by: David Tardon <dtardon at redhat.com>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index ae5e098..5e8e549 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -510,13 +510,38 @@ void ScConditionEntry::UpdateReference( sc::RefUpdateContext& rCxt )
 
     if (pFormula1)
     {
-        sc::RefUpdateResult aRes = pFormula1->AdjustReferenceInName(rCxt, aOldSrcPos);
+        sc::RefUpdateResult aRes;
+        switch (rCxt.meMode)
+        {
+            case URM_INSDEL:
+                aRes = pFormula1->AdjustReferenceOnShift(rCxt, aOldSrcPos);
+            break;
+            case URM_MOVE:
+                aRes = pFormula1->AdjustReferenceOnMove(rCxt, aOldSrcPos, aSrcPos);
+            break;
+            default:
+                ;
+        }
+
         if (aRes.mbReferenceModified || bChangedPos)
             DELETEZ(pFCell1);       // is created again in IsValid
     }
+
     if (pFormula2)
     {
-        sc::RefUpdateResult aRes = pFormula2->AdjustReferenceInName(rCxt, aOldSrcPos);
+        sc::RefUpdateResult aRes;
+        switch (rCxt.meMode)
+        {
+            case URM_INSDEL:
+                aRes = pFormula2->AdjustReferenceOnShift(rCxt, aOldSrcPos);
+            break;
+            case URM_MOVE:
+                aRes = pFormula2->AdjustReferenceOnMove(rCxt, aOldSrcPos, aSrcPos);
+            break;
+            default:
+                ;
+        }
+
         if (aRes.mbReferenceModified || bChangedPos)
             DELETEZ(pFCell2);       // is created again in IsValid
     }
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index c5ebbd3..4239001 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1843,6 +1843,8 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
 {
     if (xMat)
     {
+        SCSIZE nCols, nRows;
+        xMat->GetDimensions(nCols, nRows);
         ScMatrixValue nMatVal = xMat->Get(0, 0);
         ScMatValType nMatValType = nMatVal.nType;
         if (ScMatrix::IsNonValueType( nMatValType))
@@ -1850,14 +1852,14 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
             if ( xMat->IsEmptyPath( 0, 0))
             {   // result of empty FALSE jump path
                 FormulaTokenRef xRes = new FormulaDoubleToken( 0.0);
-                PushTempToken( new ScMatrixCellResultToken( xMat, xRes.get()));
+                PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
                 rRetTypeExpr = NUMBERFORMAT_LOGICAL;
             }
             else
             {
                 svl::SharedString aStr( nMatVal.GetString());
                 FormulaTokenRef xRes = new FormulaStringToken( aStr);
-                PushTempToken( new ScMatrixCellResultToken( xMat, xRes.get()));
+                PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
                 rRetTypeExpr = NUMBERFORMAT_TEXT;
             }
         }
@@ -1869,7 +1871,7 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
                 xRes = new FormulaErrorToken( nErr);
             else
                 xRes = new FormulaDoubleToken( nMatVal.fVal);
-            PushTempToken( new ScMatrixCellResultToken( xMat, xRes.get()));
+            PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
             if ( rRetTypeExpr != NUMBERFORMAT_LOGICAL )
                 rRetTypeExpr = NUMBERFORMAT_NUMBER;
         }
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index e0697ba..9db536d 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -48,6 +48,8 @@
 #include "clipparam.hxx"
 #include "sc.hrc"
 #include <refhint.hxx>
+#include <refupdatecontext.hxx>
+#include <validat.hxx>
 
 #include <set>
 
@@ -1266,6 +1268,19 @@ void ScUndoDragDrop::Undo()
         SCTAB nTabDelta = aSrcRange.aStart.Tab() - aDestRange.aStart.Tab();
         sc::RefMovedHint aHint(aDestRange, ScAddress(nColDelta, nRowDelta, nTabDelta));
         pDoc->BroadcastRefMoved(aHint);
+
+        ScValidationDataList* pValidList = pDoc->GetValidationList();
+        if (pValidList)
+        {
+            // Update the references of validation entries.
+            sc::RefUpdateContext aCxt(*pDoc);
+            aCxt.meMode = URM_MOVE;
+            aCxt.maRange = aSrcRange;
+            aCxt.mnColDelta = nColDelta;
+            aCxt.mnRowDelta = nRowDelta;
+            aCxt.mnTabDelta = nTabDelta;
+            pValidList->UpdateReference(aCxt);
+        }
     }
 
     DoUndo(aDestRange);
commit c3579a60b7e606ca73e665777ead7c1ab6844420
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue May 13 14:02:45 2014 -0400

    fdo#78471: Don't forget to record the ID of the last record for BIFF5.
    
    Shared formula import code depends on this.
    
    Change-Id: Iecb009252c56673df33e0d681de825911154903a
    (cherry picked from commit 286760359bae7e21a772dd104ab17a1df69a57b0)
    Reviewed-on: https://gerrit.libreoffice.org/9347
    Tested-by: David Tardon <dtardon at redhat.com>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index a8f0fe6..4c69155 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -90,7 +90,7 @@ FltError ImportExcel::Read( void )
     sal_Size nProgressBasePos = 0;
     sal_Size nProgressBaseSize = 0;
 
-    while( eAkt != Z_Ende )
+    for (; eAkt != Z_Ende; mnLastRecId = nOpcode)
     {
         if( eAkt == Z_Biff5E )
         {
commit c251144bc13a659b6ea5a0c0a30e239618ef9626
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu May 15 23:28:55 2014 +0200

    fdo#78159: fix import of OOoXML embedded objects
    
    MimeConfigurationHelper::GetDefaultFilterFromServiceName() checks that
    there is both an import and an export filter, and for OOoXML the export
    has been removed; tweak the check to require only import for OOoXML.
    
    Currently it still works invoke the OOoXML filter, but it is clearly
    better to store the embedded documents only in ODF, so tweak
    OCommonEmbeddedObject::store* methods to do that.
    
    (regression from aeeaccf59abbc485d7786486f1accc1cb4d4dbf7)
    
    Change-Id: Ib71f23fd110cbd4b570517f2dde2c53e3aa6301d
    (cherry picked from commit 0b3d0fb2d9256dc6bae6af69ed494487004def75)
    Reviewed-on: https://gerrit.libreoffice.org/9365
    Tested-by: David Tardon <dtardon at redhat.com>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index 0c6ffb7..6e09603 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -743,7 +743,12 @@ OUString MimeConfigurationHelper::GetDefaultFilterFromServiceName( const OUStrin
                         sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( "Flags", (sal_Int32)0 );
 
                         // that should be import, export, own filter and not a template filter ( TemplatePath flag )
-                        sal_Int32 nRequired = ( SFX_FILTER_OWN | SFX_FILTER_EXPORT | SFX_FILTER_IMPORT );
+                        sal_Int32 const nRequired = (SFX_FILTER_OWN
+                            // fdo#78159 for OOoXML, there is code to convert
+                            // to ODF in OCommonEmbeddedObject::store*
+                            // so accept it even though there's no export
+                            | (SOFFICE_FILEFORMAT_60 == nVersion ? 0 : SFX_FILTER_EXPORT)
+                            | SFX_FILTER_IMPORT );
                         if ( ( ( nFlags & nRequired ) == nRequired ) && !( nFlags & SFX_FILTER_TEMPLATEPATH ) )
                         {
                             // if there are more than one filter the preffered one should be used
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index b3e9208..36741eb 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -1169,6 +1169,12 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
     {
         SAL_WARN( "embeddedobj.common", "Can not retrieve target storage media type!" );
     }
+    if (nTargetStorageFormat == SOFFICE_FILEFORMAT_60)
+    {
+        SAL_INFO("embeddedobj.common", "fdo#78159: Storing OOoXML as ODF");
+        nTargetStorageFormat = SOFFICE_FILEFORMAT_CURRENT;
+        // setting MediaType is done later anyway, no need to do it here
+    }
 
     try
     {
@@ -1300,6 +1306,12 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
     {
         SAL_WARN( "embeddedobj.common", "Can not retrieve target storage media type!" );
     }
+    if (nTargetStorageFormat == SOFFICE_FILEFORMAT_60)
+    {
+        SAL_INFO("embeddedobj.common", "fdo#78159: Storing OOoXML as ODF");
+        nTargetStorageFormat = SOFFICE_FILEFORMAT_CURRENT;
+        // setting MediaType is done later anyway, no need to do it here
+    }
 
     try
     {
@@ -1589,6 +1601,12 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn()
         {
             SAL_WARN( "embeddedobj.common", "Can not retrieve storage media type!" );
         }
+        if (nStorageFormat == SOFFICE_FILEFORMAT_60)
+        {
+            SAL_INFO("embeddedobj.common", "fdo#78159: Storing OOoXML as ODF");
+            nStorageFormat = SOFFICE_FILEFORMAT_CURRENT;
+            // setting MediaType is done later anyway, no need to do it here
+        }
 
         aGuard.clear();
         StoreDocToStorage_Impl( m_xObjectStorage, nStorageFormat, GetBaseURL_Impl(), m_aEntryName, sal_True );
commit 48681f1cae6f8fdb975afdea9bb546b6b564b7a7
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon May 12 20:59:29 2014 -0400

    fdo#78391: When numbers are auto-fit, reset clipping parameters.
    
    Else it would get processed further to a surprising result.
    
    Change-Id: I3d6f0d680e0c4c3ffe1d28dcbaf51a156f569359
    (cherry picked from commit 162029e55af8f681966497ab7f20277888eac478)
    Reviewed-on: https://gerrit.libreoffice.org/9335
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 75739d4..d14c901 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1850,7 +1850,11 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic )
                                     (long) ( aVars.GetLeftTotal() * mnPPTX ) +
                                     (long) ( aVars.GetMargin()->GetRightMargin() * mnPPTX );
                         if ( nNeededWidth <= aAreaParam.maClipRect.GetWidth() )
+                        {
+                            // Cell value is no longer clipped.  Reset relevant parameters.
                             aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false;
+                            aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0;
+                        }
 
                         //  If the "###" replacement doesn't fit into the cells, no clip marks
                         //  are shown, as the "###" already denotes too little space.
commit 8a296a3d81b48db837a06535b72e44ab7475dc0c
Author: Andras Timar <andras.timar at collabora.com>
Date:   Fri May 9 22:38:52 2014 +0200

    Revert "fdo#45260: Objects having line thickness misplaced while pasting."
    
    This reverts commit c35c4769d8cabe0f01ef9911056d7a9d1d2f4b04.
    Fixes fdo#78413
    
    Change-Id: If0865cced045410d4e8f9603b55568ade6781b39
    (cherry picked from commit de8f5f2af78877bc63b462195ce63341f6ba7817)
    Reviewed-on: https://gerrit.libreoffice.org/9297
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index cc6229f..2572576 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -112,9 +112,7 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
 
     // #112978# need to use GetAllMarkedBoundRect instead of GetAllMarkedRect to get
     // fat lines correctly
-    // This seems to be broken on LibreOffice. So reverted this temporarily
-    // to fix fdo#45260
-    const Rectangle                 aMarkRect( GetAllMarkedRect() );
+    const Rectangle                 aMarkRect( GetAllMarkedBoundRect() );
     TransferableObjectDescriptor    aObjDesc;
     SdrOle2Obj*                     pSdrOleObj = NULL;
     SdrPageView*                    pPgView = GetSdrPageView();
commit 73685bd84715471c80ecbc1fcf0009c118d8e7b8
Author: David Tardon <dtardon at redhat.com>
Date:   Thu May 15 13:41:16 2014 +0200

    fix for doxygen 1.8.7
    
    Earlier versions apparently used HTML as default if no output format was
    specified. 1.8.7 no longer does that.
    
    Change-Id: Ia8f908f54b344530e1b50e8800c032f782fb36e9
    (cherry picked from commit 2e9a77aa2d8e83f6296cd9204759d18b0ec5f0b5)
    Reviewed-on: https://gerrit.libreoffice.org/9362
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/odk/docs/cpp/Doxyfile b/odk/docs/cpp/Doxyfile
index 26c8893..c34915a 100644
--- a/odk/docs/cpp/Doxyfile
+++ b/odk/docs/cpp/Doxyfile
@@ -24,6 +24,7 @@ WARN_FORMAT = "$file:$line: $text"
 INPUT = %
 RECURSIVE = YES
 
+GENERATE_HTML = YES
 HTML_OUTPUT = .
 
 GENERATE_LATEX = NO
diff --git a/odk/docs/idl/Doxyfile b/odk/docs/idl/Doxyfile
index 6eead54..c065b33 100644
--- a/odk/docs/idl/Doxyfile
+++ b/odk/docs/idl/Doxyfile
@@ -13,6 +13,7 @@ STRIP_FROM_PATH = %
 INPUT = %
 RECURSIVE = YES
 
+GENERATE_HTML = YES
 HTML_OUTPUT = .
 GENERATE_LATEX = NO
 
commit 61fa8bbe45021c689b44ea80d99666c48084c07f
Author: David Tardon <dtardon at redhat.com>
Date:   Sat May 10 10:13:44 2014 +0200

    Related: rhbz#1071604 don't paint anim. effect icon
    
    ... unless the slide does have custom animations. This drops dep of Draw
    on libanimcore, which is in module impress, so it might not be present.
    If it is not present, the Pages panel is not drawn.
    
    Change-Id: I9d7377a4fb3289e230887752bc4a105ca1c9f812
    (cherry picked from commit 90af0348216a5a3c2eecd660e012500d2917b279)
    Reviewed-on: https://gerrit.libreoffice.org/9300
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index 0eafa0b..60c51fa 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -94,7 +94,8 @@ void PageObjectPainter::PaintPageObject (
         PaintPreview(rDevice, rpDescriptor);
         PaintPageNumber(rDevice, rpDescriptor);
         PaintTransitionEffect(rDevice, rpDescriptor);
-        PaintCustomAnimationEffect(rDevice, rpDescriptor);
+        if (rpDescriptor->GetPage()->hasAnimationNode())
+            PaintCustomAnimationEffect(rDevice, rpDescriptor);
         rDevice.SetAntialiasing(nSavedAntialiasingMode);
     }
 }
commit 7355cba2c619c203ba1962aa710cb47273e08184
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Mar 3 18:54:01 2014 +0100

    fdo#78313 RTF import: retain font colors
    
    This is a cherry-pick of two master commits:
    
    RTFValue::equals: consider the number of attributes/sprms as well
    
    (cherry picked from commit 4452fa9a2e741834a19c9b322fc8d9c8b06450de)
    
    Related: fdo#77600 RTF import: RTFValue::equals: compare attribute content
    
    Previously only the number of nested sprms / attributes was compared.
    With this, the font of the bugdoc is correctly Arial, not Times.
    
    (cherry picked from commit 8e8f9388c323ad3c32cef3f91609ad19386b7d56)
    
    Conflicts:
    	writerfilter/source/rtftok/rtfsprm.hxx
    
    Change-Id: I351de414b6734336b31c1334dbd2349072f16002
    Reviewed-on: https://gerrit.libreoffice.org/9316
    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/font-override.rtf b/sw/qa/extras/rtfimport/data/font-override.rtf
new file mode 100644
index 0000000..a41d2ab
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/font-override.rtf
@@ -0,0 +1,28 @@
+{\rtf1\ansi\deff4\adeflang1025
+{\fonttbl
+{\f0\froman\fprq2\fcharset0 Times New Roman;}
+{\f1\froman\fprq2\fcharset2 Symbol;}
+{\f2\fswiss\fprq2\fcharset0 Arial;}
+{\f3\froman\fprq2\fcharset0 Liberation Serif
+{\*\falt Times New Roman}
+;}
+{\f4\froman\fprq2\fcharset0 Times New Roman;}
+{\f5\fswiss\fprq2\fcharset0 Liberation Sans
+{\*\falt Arial}
+;}
+{\f6\froman\fprq2\fcharset0 Tahoma;}
+{\f7\froman\fprq2\fcharset0 Arial;}
+{\f8\fnil\fprq2\fcharset0 Droid Sans Fallback;}
+{\f9\fnil\fprq2\fcharset0 Lucida Sans;}
+{\f10\fswiss\fprq0\fcharset1 Lucida Sans;}
+{\f11\fnil\fprq2\fcharset0 Arial;}
+}
+{\colortbl;\red0\green0\blue0;\red5\green99\blue193;\red128\green128\blue128;\red0\green0\blue10;}
+{\stylesheet
+{\s0\snext0\ql\widctlpar\ltrpar
+\cf0\kerning1\dbch\af12\langfe1033\dbch\af12\afs20\alang1025\fs24\loch\f4\lang1033 Normal;}
+}
+\pard\plain\s0
+{\af11\f7
+This should be Arial.}
+\par }
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 50cbff8..a5c8ffd 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1638,6 +1638,12 @@ DECLARE_RTFIMPORT_TEST(testFdo75735, "fdo75735.rtf")
     CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty< uno::Sequence<style::TabStop> >(getParagraph(2), "ParaTabStops").getLength());
 }
 
+DECLARE_RTFIMPORT_TEST(testFontOverride, "font-override.rtf")
+{
+    // This was "Times New Roman".
+    CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(getRun(getParagraph(1), 1), "CharFontName"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx
index c6d9172..c79c6e2 100644
--- a/writerfilter/source/rtftok/rtfsprm.cxx
+++ b/writerfilter/source/rtftok/rtfsprm.cxx
@@ -143,6 +143,15 @@ void RTFSprms::deduplicate(RTFSprms& rReference)
     }
 }
 
+bool RTFSprms::equals(RTFValue& rOther)
+{
+    RTFSprms::Iterator_t i = m_pSprms->begin();
+    while (i != m_pSprms->end())
+        if (!i->second->equals(rOther))
+            return false;
+    return true;
+}
+
 void RTFSprms::ensureCopyBeforeWrite()
 {
     if (m_pSprms->m_nRefCount > 1) {
diff --git a/writerfilter/source/rtftok/rtfsprm.hxx b/writerfilter/source/rtftok/rtfsprm.hxx
index 19f0514..a889207 100644
--- a/writerfilter/source/rtftok/rtfsprm.hxx
+++ b/writerfilter/source/rtftok/rtfsprm.hxx
@@ -60,6 +60,7 @@ namespace writerfilter {
             Iterator_t begin() { return m_pSprms->begin(); }
             Iterator_t end() { return m_pSprms->end(); }
             void clear();
+            bool equals(RTFValue& rOther);
         private:
             void ensureCopyBeforeWrite();
             boost::intrusive_ptr<RTFSprmsImpl> m_pSprms;
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 7af638f..132233c 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -210,7 +210,17 @@ RTFValue* RTFValue::Clone()
 
 bool RTFValue::equals(RTFValue& rOther)
 {
-    return m_nValue == rOther.m_nValue;
+    if (m_nValue != rOther.m_nValue)
+        return false;
+    if (m_pAttributes->size() != rOther.m_pAttributes->size())
+        return false;
+    else if (!m_pAttributes->equals(rOther))
+        return false;
+    if (m_pSprms->size() != rOther.m_pSprms->size())
+        return false;
+    else if (!m_pSprms->equals(rOther))
+        return false;
+    return true;
 }
 
 RTFSprms& RTFValue::getAttributes()
commit 703262de20ea73409ec3de332b8a2df41ab40e16
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 14 09:54:22 2014 +0200

    writerfilter: DomainMapper_Impl::SetSymbolData() should take an int
    
    One wonders how did this work so far.
    
    Change-Id: I6aee6a2f7e15c1c4931ca5d65b6ad39d025ff9ed
    (cherry picked from commit 671eb12dee290607ed66f3b325f28e7bd4695cba)
    Signed-off-by: Andras Timar <andras.timar at collabora.com>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 4c0694b..9659627 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -328,7 +328,7 @@ void DomainMapper_Impl::RemoveLastParagraph( )
     }
 }
 
-void DomainMapper_Impl::SetSymbolData( bool nSymbolData )
+void DomainMapper_Impl::SetSymbolData( sal_Int32 nSymbolData )
 {
     m_nSymboldata = nSymbolData;
 }
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 337731e..d213a59 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -463,7 +463,7 @@ public:
     void SetParaSectpr(bool bParaSectpr);
     bool GetParaSectpr();
 
-    void SetSymbolData( bool nSymbolData );
+    void SetSymbolData( sal_Int32 nSymbolData );
     sal_Int32 GetSymbolData();
     /// Setter method for m_bSdt.
     void SetSdt(bool bSdt);
commit 20854d352fa2c2e1ea9c51896c7e57b8f1a107fa
Author: Rohit Deshmukh <rohit.deshmukh at synerzip.com>
Date:   Thu May 8 16:33:44 2014 +0530

    fdo#78384: Fix for corruption if file contains symbols.
    
    * In case of symbol, symbol character get imported first and then font of symbols.
    * So we are storing symbol character and when we parse symbol font then create UNO object for text.
    
    Reviewed-on: https://gerrit.libreoffice.org/9281
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit f51640c5f40d5132b396a9fb6589420383df1610)
    Signed-off-by: Andras Timar <andras.timar at collabora.com>
    
    Conflicts:
    	sw/qa/extras/ooxmlexport/ooxmlexport.cxx
    	writerfilter/source/dmapper/DomainMapper_Impl.cxx
    
    Change-Id: If5b79521c6a59aec02b165e8120dafdd472cdaeb

diff --git a/sw/qa/extras/ooxmlexport/data/fdo78384.docx b/sw/qa/extras/ooxmlexport/data/fdo78384.docx
new file mode 100644
index 0000000..ee10264
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo78384.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index a8a56cd..9a8ca99 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2051,6 +2051,13 @@ DECLARE_OOXMLEXPORT_TEST(testFdo71785, "fdo71785.docx")
     // crashtest
 }
 
+DECLARE_OOXMLEXPORT_TEST(testFDO78384,"fdo78384.docx")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+    if (!pXmlDoc)
+        return;
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w:rFonts","ascii","Wingdings");
+}
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 2e151c8..01cec9b 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -893,7 +893,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
         }
         else //it's a _real_ symbol
         {
-            utext( reinterpret_cast < const sal_uInt8 * >( &nIntValue ), 1 );
+            m_pImpl->SetSymbolData(nIntValue);
         }
         break;
         case NS_rtf::LN_CHAR: //footnote symbol character
@@ -911,7 +911,16 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
         }
         else //a real symbol
             if (m_pImpl->GetTopContext())
+            {
                 m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME, uno::makeAny( sStringValue ));
+                /*
+                 * In case of symbol, symbol character get imported first and then font of symbols.
+                 * So we are storing symbol character and when we parse symbol font then create UNO object for text.
+                 */
+                sal_Int32 symboldata = m_pImpl->GetSymbolData();
+                utext( reinterpret_cast < const sal_uInt8 * >( &(symboldata) ), 1 );
+            }
+
         break;
         case NS_ooxml::LN_CT_Underline_val:
             handleUnderlineType(nIntValue, m_pImpl->GetTopContext());
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8cbe6f1..4c0694b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -152,6 +152,7 @@ DomainMapper_Impl::DomainMapper_Impl(
         m_bIsFirstSection( true ),
         m_bIsColumnBreakDeferred( false ),
         m_bIsPageBreakDeferred( false ),
+        m_nSymboldata(-1),
         m_pLastSectionContext( ),
         m_pLastCharacterContext(),
         m_nCurrentTabStopIndex( 0 ),
@@ -327,6 +328,16 @@ void DomainMapper_Impl::RemoveLastParagraph( )
     }
 }
 
+void DomainMapper_Impl::SetSymbolData( bool nSymbolData )
+{
+    m_nSymboldata = nSymbolData;
+}
+
+sal_Int32 DomainMapper_Impl::GetSymbolData()
+{
+    return m_nSymboldata;
+}
+
 void DomainMapper_Impl::SetIsLastParagraphInSection( bool bIsLast )
 {
     m_bIsLastParaInSection = bIsLast;
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index dec00c8..337731e 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -337,6 +337,7 @@ private:
     BookmarkMap_t                                                                   m_aBookmarkMap;
 
     _PageMar                                                                        m_aPageMargins;
+    sal_Int32                                                                       m_nSymboldata;
 
 
     // TableManagers are stacked: one for each stream to avoid any confusion
@@ -461,6 +462,9 @@ public:
     bool GetIsFirstParagraphInSection();
     void SetParaSectpr(bool bParaSectpr);
     bool GetParaSectpr();
+
+    void SetSymbolData( bool nSymbolData );
+    sal_Int32 GetSymbolData();
     /// Setter method for m_bSdt.
     void SetSdt(bool bSdt);
     /// Getter method for m_bSdt.
commit 9d3a31e94a20477e4fcb7ebe04c1c20f47bdc786
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Sun May 11 23:07:27 2014 +0200

    fdo#78159 Restore EXPORT to ODF 1.0 for Math
    
    Partially revert commit aeeaccf59abbc485d7786486f1accc1cb4d4dbf7
    It is a quick fix for 4-2 since AutoText "FN" (Formula Numbering) is broken
    
    Change-Id: I22daf58bf31f61a05a981ed1db9a81f2d8dc3859
    Reviewed-on: https://gerrit.libreoffice.org/9319
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/filter/source/config/fragments/filters/StarOffice_XML__Math_.xcu b/filter/source/config/fragments/filters/StarOffice_XML__Math_.xcu
index 2f60ca6..cb094ea 100644
--- a/filter/source/config/fragments/filters/StarOffice_XML__Math_.xcu
+++ b/filter/source/config/fragments/filters/StarOffice_XML__Math_.xcu
@@ -16,7 +16,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->
     <node oor:name="StarOffice XML (Math)" oor:op="replace">
-        <prop oor:name="Flags"><value>IMPORT TEMPLATE OWN ALIEN ENCRYPTION</value></prop>
+        <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN ALIEN ENCRYPTION</value></prop>
         <prop oor:name="UIComponent"/>
         <prop oor:name="FilterService"/>
         <prop oor:name="UserData"><value></value></prop>
commit 9cf43fd5c714a02331ec6a2bbb0e3d452f3a1c63
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue May 13 05:22:47 2014 +0200

    i#64348 basic: fix CDec() crash if string is empty
    
    Change-Id: I92e9472e14c00a6550081f0d58a352faa5b78b98
    Reviewed-on: https://gerrit.libreoffice.org/9336
    Tested-by: David Tardon <dtardon at redhat.com>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index 276b788..25d7936 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -194,6 +194,8 @@ void SbxDecimal::setUInt( unsigned int val )
 
 bool SbxDecimal::setString( OUString* pOUString )
 {
+    assert(pOUString);
+
     static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );
 
     // Convert delimiter
@@ -472,7 +474,9 @@ start:
         case SbxLPSTR:
         case SbxSTRING:
         case SbxBYREF | SbxSTRING:
-            pnDecRes->setString( p->pOUString ); break;
+            if( p->pOUString )
+                pnDecRes->setString( p->pOUString );
+            break;
         case SbxOBJECT:
         {
             SbxValue* pVal = PTR_CAST(SbxValue,p->pObj);
commit 6015a51f49127b83b9e89e2b04ea4b1d4c2673cc
Author: David Tardon <dtardon at redhat.com>
Date:   Mon May 12 14:02:13 2014 +0200

    fdo#78119 find the longest match for month name
    
    (cherry picked from commit 624e5c34ce815af6f65ce6699ad6b3f2aa1bf0da)
    
    Change-Id: Idad7b083ce5528f5c735f3a8bd091819bf043fc8
    Reviewed-on: https://gerrit.libreoffice.org/#/c/9329
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 3726c33..840af0c 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -561,6 +561,7 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
     static const OUString aSepShortened("SEP");
 
     short res = 0; // no month found
+    int nMatchLen = 0;
 
     if (rString.getLength() > nPos) // only if needed
     {
@@ -569,52 +570,78 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
             InitText();
         }
         sal_Int16 nMonths = pFormatter->GetCalendar()->getNumberOfMonthsInYear();
+        // Find the longest match. This is needed for, e.g., Czech, as Červen (June)
+        // is fully contained in Červenec (July), so the latter could never be found
+        // if we stopped at the first match.
         for ( sal_Int16 i = 0; i < nMonths; i++ )
         {
             if ( bScanGenitiveMonths && StringContains( pUpperGenitiveMonthText[i], rString, nPos ) )
             {   // genitive full names first
-                nPos = nPos + pUpperGenitiveMonthText[i].getLength();
-                res = i + 1;
-                break;  // for
+                const int nMonthLen = pUpperGenitiveMonthText[i].getLength();
+                if (nMonthLen > nMatchLen)
+                {
+                    nMatchLen = nMonthLen;
+                    res = i + 1;
+                }
             }
             else if ( bScanGenitiveMonths && StringContains( pUpperGenitiveAbbrevMonthText[i], rString, nPos ) )
             {   // genitive abbreviated
-                nPos = nPos + pUpperGenitiveAbbrevMonthText[i].getLength();
-                res = sal::static_int_cast< short >(-(i+1)); // negative
-                break;  // for
+                const int nMonthLen = pUpperGenitiveAbbrevMonthText[i].getLength();
+                if (nMonthLen > nMatchLen)
+                {
+                    nMatchLen = nMonthLen;
+                    res = sal::static_int_cast< short >(-(i+1)); // negative
+                }
             }
             else if ( bScanPartitiveMonths && StringContains( pUpperPartitiveMonthText[i], rString, nPos ) )
             {   // partitive full names
-                nPos = nPos + pUpperPartitiveMonthText[i].getLength();
-                res = i+1;
-                break;  // for
+                const int nMonthLen = pUpperPartitiveMonthText[i].getLength();
+                if (nMonthLen > nMatchLen)
+                {
+                    nMatchLen = nMonthLen;
+                    res = i+1;
+                }
             }
             else if ( bScanPartitiveMonths && StringContains( pUpperPartitiveAbbrevMonthText[i], rString, nPos ) )
             {   // partitive abbreviated
-                nPos = nPos + pUpperPartitiveAbbrevMonthText[i].getLength();
-                res = sal::static_int_cast< short >(-(i+1)); // negative
-                break;  // for
+                const int nMonthLen = pUpperPartitiveAbbrevMonthText[i].getLength();
+                if (nMonthLen > nMatchLen)
+                {
+                    nMatchLen = nMonthLen;
+                    res = sal::static_int_cast< short >(-(i+1)); // negative
+                }
             }
             else if ( StringContains( pUpperMonthText[i], rString, nPos ) )
             {   // noun full names
-                nPos = nPos + pUpperMonthText[i].getLength();
-                res = i+1;
-                break;  // for
+                const int nMonthLen = pUpperMonthText[i].getLength();
+                if (nMonthLen > nMatchLen)
+                {
+                    nMatchLen = nMonthLen;
+                    res = i+1;
+                }
             }
             else if ( StringContains( pUpperAbbrevMonthText[i], rString, nPos ) )
             {   // noun abbreviated
-                nPos = nPos + pUpperAbbrevMonthText[i].getLength();
-                res = sal::static_int_cast< short >(-(i+1)); // negative
-                break;  // for
+                const int nMonthLen = pUpperAbbrevMonthText[i].getLength();
+                if (nMonthLen > nMatchLen)
+                {
+                    nMatchLen = nMonthLen;
+                    res = sal::static_int_cast< short >(-(i+1)); // negative
+                }
             }
             else if ( i == 8 && pUpperAbbrevMonthText[i] == aSeptCorrect &&
                     StringContains( aSepShortened, rString, nPos ) )
             {   // #102136# SEPT/SEP
-                nPos = nPos + aSepShortened.getLength();
-                res = sal::static_int_cast< short >(-(i+1)); // negative
-                break;  // for
+                const int nMonthLen = aSepShortened.getLength();
+                if (nMonthLen > nMatchLen)
+                {
+                    nMatchLen = nMonthLen;
+                    res = sal::static_int_cast< short >(-(i+1)); // negative
+                }
             }
         }
+
+        nPos += nMatchLen;
     }
 
     return res;
commit 267beb34c84a66bfded10854d27617d9a925c8c6
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Tue Mar 4 22:49:08 2014 +0100

    OLE: Turn an OSL_ENSURE() into a real condition (related: fdo#65631)
    
    This is part of some STAMPIT workaround; no idea what it is, but for sure it
    causes problems with PowerPoint OLE in Writer - so let's avoid updating if it
    is not "STAMPIT".
    
    This appears to help for the problem in fdo#65631 comment #9 on master,
    let's see if the same is true if it's backported to 4.2...
    
    (cherry picked from commit a94e973bf5b5d0755a53881867961691633a4cbd)
    Signed-off-by: Michael Stahl <mstahl at redhat.com>
    
    Change-Id: I266b419ba3461c547f7ee8e447ef64a47a8511e8

diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx
index 528d0fc..077a847 100644
--- a/embeddedobj/source/msole/olepersist.cxx
+++ b/embeddedobj/source/msole/olepersist.cxx
@@ -885,13 +885,12 @@ void OleEmbeddedObject::OnViewChanged_Impl()
     // - if the verb execution is in progress and the view is changed the object will be stored
     // after the execution, so there is no need to send the notification.
     // - the STAMPIT object can never be active.
-    if ( m_aVerbExecutionController.CanDoNotification()
-      && m_pOleComponent && m_nUpdateMode == embed::EmbedUpdateModes::ALWAYS_UPDATE )
+    if (m_aVerbExecutionController.CanDoNotification() &&
+            m_pOleComponent && m_nUpdateMode == embed::EmbedUpdateModes::ALWAYS_UPDATE &&
+            (MimeConfigurationHelper::ClassIDsEqual(m_aClassID, MimeConfigurationHelper::GetSequenceClassID(0x852ee1c9, 0x9058, 0x44ba, 0x8c, 0x6c, 0x0c, 0x5f, 0xc6, 0x6b, 0xdb, 0x8d)) ||
+             MimeConfigurationHelper::ClassIDsEqual(m_aClassID, MimeConfigurationHelper::GetSequenceClassID(0xcf1b4491, 0xbea3, 0x4c9f, 0xa7, 0x0f, 0x22, 0x1b, 0x1e, 0xca, 0xef, 0x3e)))
+       )
     {
-        OSL_ENSURE( MimeConfigurationHelper::ClassIDsEqual( m_aClassID, MimeConfigurationHelper::GetSequenceClassID( 0x852ee1c9, 0x9058, 0x44ba, 0x8c,0x6c,0x0c,0x5f,0xc6,0x6b,0xdb,0x8d ) )
-                    || MimeConfigurationHelper::ClassIDsEqual( m_aClassID, MimeConfigurationHelper::GetSequenceClassID( 0xcf1b4491, 0xbea3, 0x4c9f, 0xa7,0x0f,0x22,0x1b,0x1e,0xca,0xef,0x3e ) ),
-                    "Expected to be triggered for STAMPIT only! Please contact developers!\n" );
-
         // The view is changed while the object is in running state, save the new object
         m_xCachedVisualRepresentation = uno::Reference< io::XStream >();
         SaveObject_Impl();
commit a29ddb2a595c334557a78fcb941ef9332271ecf0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 8 11:22:25 2014 +0000

    Resolves: rhbz#1096486 avoid access to nonexisting parent dialog
    
    was Related: rhbz#1047174
    
    (cherry picked from commit 794f5af121906668870a58700aed25b660381240)
    
    Change-Id: I0bf9116d088adde838993ac5e909a6f3481f883e
    Reviewed-on: https://gerrit.libreoffice.org/9326
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 4fc18b7..d70bb3d 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -309,6 +309,8 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
     KeyCode aCode( rKEvt.GetKeyCode() );
     bool    bProc = false;
 
+    Dialog* pDialog = GetParentDialog();
+
     switch ( aCode.GetCode() )
     {
         case KEY_DELETE:
@@ -318,8 +320,8 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
             {
                 pView->DeleteMarked();
                 bProc = true;
-                if( !pView->AreObjectsMarked() )
-                    GetParentDialog()->GrabFocusToFirstControl();
+                if (!pView->AreObjectsMarked() && pDialog)
+                    pDialog->GrabFocusToFirstControl();
             }
         }
         break;
@@ -328,9 +330,11 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
         {
             if ( bSdrMode )
             {
+                bool bGrabFocusToFirstControl = true;
                 if ( pView->IsAction() )
                 {
                     pView->BrkAction();
+                    bGrabFocusToFirstControl = false;
                 }
                 else if ( pView->AreObjectsMarked() )
                 {
@@ -340,16 +344,11 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
                     if(pHdl)
                     {
                         ((SdrHdlList&)rHdlList).ResetFocusHdl();
+                        bGrabFocusToFirstControl = false;
                     }
-                    else
-                    {
-                        GetParentDialog()->GrabFocusToFirstControl();
-                    }
-                }
-                else
-                {
-                    GetParentDialog()->GrabFocusToFirstControl();
                 }
+                if (bGrabFocusToFirstControl && pDialog)
+                    pDialog->GrabFocusToFirstControl();
                 bProc = true;
             }
         }
commit 979a1c32f393fd8b21b1b8cc7f986acee1c48e08
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sun May 11 19:50:53 2014 -0400

    fdo#78535: Don't process borders of 0 width.
    
    Or they would get drawn for real.
    
    Change-Id: Iec24e70a80ff8aa1ef7512e71249a99243297c4e
    (cherry picked from commit 224b235971a01971de626d38ccc8506d0a55771b)
    Reviewed-on: https://gerrit.libreoffice.org/9323
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 1a5cdde..30d2ee8 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1716,50 +1716,62 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
 
                         const svx::frame::Style noStyle;
                         // Horizontal lines
-                        long nUpperRotate = lcl_getRotate( mpDoc, nTab, nX, nY - 1 );
-                        pProcessor->process( svx::frame::CreateBorderPrimitives(
-                                    aPoints[bLayoutRTL?1:0], aPoints[bLayoutRTL?0:1], aTopLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aLeftLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aRightLine,
-                                    pForceColor, nUpperRotate, nAttrRotate ) );
-
-                        long nLowerRotate = lcl_getRotate( mpDoc, nTab, nX, nY + 1 );
-                        pProcessor->process( svx::frame::CreateBorderPrimitives(
-                                    aPoints[bLayoutRTL?2:3], aPoints[bLayoutRTL?3:2], aBottomLine,
-                                    aLeftLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aRightLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    pForceColor, 18000 - nAttrRotate, 18000 - nLowerRotate ) );
+                        if (aTopLine.Prim() || aTopLine.Secn())
+                        {
+                            long nUpperRotate = lcl_getRotate( mpDoc, nTab, nX, nY - 1 );
+                            pProcessor->process( svx::frame::CreateBorderPrimitives(
+                                        aPoints[bLayoutRTL?1:0], aPoints[bLayoutRTL?0:1], aTopLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aLeftLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aRightLine,
+                                        pForceColor, nUpperRotate, nAttrRotate ) );
+                        }
+
+                        if (aBottomLine.Prim() || aBottomLine.Secn())
+                        {
+                            long nLowerRotate = lcl_getRotate( mpDoc, nTab, nX, nY + 1 );
+                            pProcessor->process( svx::frame::CreateBorderPrimitives(
+                                        aPoints[bLayoutRTL?2:3], aPoints[bLayoutRTL?3:2], aBottomLine,
+                                        aLeftLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aRightLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        pForceColor, 18000 - nAttrRotate, 18000 - nLowerRotate ) );
+                        }
 
                         // Vertical slanted lines
-                        long nLeftRotate = lcl_getRotate( mpDoc, nTab, nX - 1, nY );
-                        pProcessor->process( svx::frame::CreateBorderPrimitives(
-                                    aPoints[0], aPoints[3], aLeftLine,
-                                    aTopLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aBottomLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    pForceColor, nAttrRotate, nLeftRotate ) );
-
-                        long nRightRotate = lcl_getRotate( mpDoc, nTab, nX + 1, nY );
-                        pProcessor->process( svx::frame::CreateBorderPrimitives(
-                                    aPoints[1], aPoints[2], aRightLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aTopLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aBottomLine,
-                                    pForceColor, 18000 - nRightRotate, 18000 - nAttrRotate ) );
+                        if (aLeftLine.Prim() || aLeftLine.Secn())
+                        {
+                            long nLeftRotate = lcl_getRotate( mpDoc, nTab, nX - 1, nY );
+                            pProcessor->process( svx::frame::CreateBorderPrimitives(
+                                        aPoints[0], aPoints[3], aLeftLine,
+                                        aTopLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aBottomLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        pForceColor, nAttrRotate, nLeftRotate ) );
+                        }
+
+                        if (aRightLine.Prim() || aRightLine.Secn())
+                        {
+                            long nRightRotate = lcl_getRotate( mpDoc, nTab, nX + 1, nY );
+                            pProcessor->process( svx::frame::CreateBorderPrimitives(
+                                        aPoints[1], aPoints[2], aRightLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aTopLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aBottomLine,
+                                        pForceColor, 18000 - nRightRotate, 18000 - nAttrRotate ) );
+                        }
                     }
                 }
                 nPosX += nColWidth * nLayoutSign;
commit 721c4372c0e307fe226e242b2f61b56c304fa952
Author: Muthu Subramanian <sumuthu at collabora.com>
Date:   Wed Mar 26 16:13:08 2014 +0530

    n#862510: anchorCtr controls the anchoring as well.
    
    (cherry picked from commit c17eb67460293fbe72ffa8e80cd10743df493afa)
    Signed-off-by: Andras Timar <andras.timar at collabora.com>
    
    Conflicts:
    	oox/source/drawingml/textbodypropertiescontext.cxx
    
    Change-Id: Ib244d89a9f7d400b3891d477314cd5f0193552e0

diff --git a/include/oox/drawingml/textbodyproperties.hxx b/include/oox/drawingml/textbodyproperties.hxx
index 3fb0684..af68f20 100644
--- a/include/oox/drawingml/textbodyproperties.hxx
+++ b/include/oox/drawingml/textbodyproperties.hxx
@@ -34,6 +34,7 @@ struct TextBodyProperties
 {
     PropertyMap                                     maPropertyMap;
     OptValue< sal_Int32 >                           moRotation;
+    bool                                            mbAnchorCtr;
     OptValue< sal_Int32 >                           moVert;
     boost::optional< sal_Int32 >                    moInsets[4];
     boost::optional< sal_Int32 >                    moTextOffX;
diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx
index 36f39d9..9e53897 100644
--- a/oox/source/drawingml/textbodyproperties.cxx
+++ b/oox/source/drawingml/textbodyproperties.cxx
@@ -80,8 +80,8 @@ void TextBodyProperties::pushRotationAdjustments( sal_Int32 nRotation )
         // Hack for n#760986
         // TODO: Preferred method would be to have a textbox on top
         // of the shape and the place it according to the (off,ext)
-        if( nOff == 0 && moTextOffX ) nVal = *moTextOffX;
-        if( nOff == 1 && moTextOffY ) nVal = *moTextOffY;
+        if( nOff == 0 && moTextOffX && mbAnchorCtr ) nVal = *moTextOffX;
+        if( nOff == 1 && moTextOffY && mbAnchorCtr ) nVal = *moTextOffY;
         if( nVal < 0 ) nVal = 0;
 
         if( moInsets[i] )
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx
index 358db9f..b580be3 100644
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -56,9 +56,9 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper& rPa
             mrTextBodyProp.moInsets[i] = GetCoordinate( sValue );
     }
 
-    bool bAnchorCenter = rAttribs.getBool( XML_anchorCtr, false );
+    mrTextBodyProp.mbAnchorCtr = rAttribs.getBool( XML_anchorCtr, false );
     if( rAttribs.hasAttribute( XML_anchorCtr ) ) {
-        if( bAnchorCenter )
+        if( mrTextBodyProp.mbAnchorCtr )
             mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<=
                 TextHorizontalAdjust_CENTER;
     }
commit ab817868dc98f0e54394e1ee050cdb9ea992f827
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri May 9 22:19:15 2014 -0400

    fdo#77056: Treat empty cells as if they have a value of 0.0.
    
    Change-Id: Ibe64cf7177a5298c1878e0014c049dc9c82b1344
    (cherry picked from commit 83a88b942134314e86ac612d0ef70a8e4919e4af)
    Reviewed-on: https://gerrit.libreoffice.org/9298
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 6f5e4e2..cbb38d7 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1166,6 +1166,23 @@ class MixDataHandler
 
     bool mbSkipEmpty;
 
+    void doFunction( size_t nDestRow, double fVal1, double fVal2 )
+    {
+        bool bOk = lcl_DoFunction(fVal1, fVal2, mnFunction);
+
+        if (bOk)
+            miNewCellsPos = maNewCells.set(miNewCellsPos, nDestRow-mnRowOffset, fVal1);
+        else
+        {
+            ScAddress aPos(mrDestColumn.GetCol(), nDestRow, mrDestColumn.GetTab());
+
+            ScFormulaCell* pFC = new ScFormulaCell(&mrDestColumn.GetDoc(), aPos);
+            pFC->SetErrCode(errNoValue);
+
+            miNewCellsPos = maNewCells.set(miNewCellsPos, nDestRow-mnRowOffset, pFC);
+        }
+    }
+
 public:
     MixDataHandler(
         sc::ColumnBlockPosition& rBlockPos,
@@ -1188,22 +1205,15 @@ public:
         mrBlockPos.miCellPos = aPos.first;
         switch (aPos.first->type)
         {
+            case sc::element_type_empty:
             case sc::element_type_numeric:
             {
-                // Both src and dest are of numeric type.
-                bool bOk = lcl_DoFunction(f, sc::numeric_block::at(*aPos.first->data, aPos.second), mnFunction);
-
-                if (bOk)
-                    miNewCellsPos = maNewCells.set(miNewCellsPos, nRow-mnRowOffset, f);
-                else
-                {
-                    ScFormulaCell* pFC =
-                        new ScFormulaCell(
-                            &mrDestColumn.GetDoc(), ScAddress(mrDestColumn.GetCol(), nRow, mrDestColumn.GetTab()));
+                double fSrcVal = 0.0;
+                if (aPos.first->type == sc::element_type_numeric)
+                    fSrcVal = sc::numeric_block::at(*aPos.first->data, aPos.second);
 
-                    pFC->SetErrCode(errNoValue);
-                    miNewCellsPos = maNewCells.set(miNewCellsPos, nRow-mnRowOffset, pFC);
-                }
+                // Both src and dest are of numeric type.
+                doFunction(nRow, f, fSrcVal);
             }
             break;
             case sc::element_type_formula:
@@ -1237,7 +1247,6 @@ public:
             break;
             case sc::element_type_string:
             case sc::element_type_edittext:
-            case sc::element_type_empty:
             {
                 // Destination cell is not a number. Just take the source cell.
                 miNewCellsPos = maNewCells.set(miNewCellsPos, nRow-mnRowOffset, f);
@@ -1354,9 +1363,9 @@ public:
             {
                 case sc::element_type_numeric:
                 {
-                    double fVal = sc::numeric_block::at(*aPos.first->data, aPos.second);
-                    miNewCellsPos = maNewCells.set(
-                            miNewCellsPos, nDestRow-mnRowOffset, fVal);
+                    double fVal1 = 0.0;
+                    double fVal2 = sc::numeric_block::at(*aPos.first->data, aPos.second);
+                    doFunction(nDestRow, fVal1, fVal2);
                 }
                 break;
                 case sc::element_type_string:


More information about the Libreoffice-commits mailing list