[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - 43 commits - chart2/source configure.ac cppcanvas/source external/jfreereport forms/source oox/source sc/inc sc/sdi sc/source sd/qa sfx2/uiconfig svl/source svx/source sw/qa sw/source vcl/osx vcl/source vcl/unx wizards/com writerfilter/source xmloff/source

Andras Timar andras.timar at collabora.com
Mon Sep 28 01:32:29 PDT 2015


 chart2/source/controller/dialogs/DataBrowser.cxx                   |   34 ++--
 chart2/source/controller/dialogs/DataBrowser.hxx                   |    2 
 chart2/source/inc/DiagramHelper.hxx                                |    1 
 chart2/source/tools/DiagramHelper.cxx                              |   49 ++++++
 chart2/source/view/main/VDataSeries.cxx                            |    8 -
 configure.ac                                                       |    2 
 cppcanvas/source/mtfrenderer/emfplus.cxx                           |   37 +++--
 external/jfreereport/UnpackedTarball_jfreereport_libformula.mk     |    1 
 external/jfreereport/patches/libformula-minutes_truncation.patch.1 |   17 ++
 forms/source/component/clickableimage.cxx                          |   21 ++
 forms/source/component/clickableimage.hxx                          |    5 
 oox/source/docprop/ooxmldocpropimport.cxx                          |    7 
 oox/source/drawingml/transform2dcontext.cxx                        |    3 
 oox/source/ppt/slidefragmenthandler.cxx                            |    2 
 sc/inc/compare.hxx                                                 |    8 -
 sc/inc/dbdata.hxx                                                  |    5 
 sc/inc/refdata.hxx                                                 |    5 
 sc/inc/scmatrix.hxx                                                |    3 
 sc/sdi/scalc.sdi                                                   |    6 
 sc/source/core/data/column2.cxx                                    |   14 +
 sc/source/core/data/column3.cxx                                    |    4 
 sc/source/core/data/documen7.cxx                                   |   20 +-
 sc/source/core/inc/interpre.hxx                                    |    4 
 sc/source/core/tool/compare.cxx                                    |   22 ++-
 sc/source/core/tool/compiler.cxx                                   |   14 +
 sc/source/core/tool/dbdata.cxx                                     |   21 ++
 sc/source/core/tool/interpr1.cxx                                   |   33 ++--
 sc/source/core/tool/interpr4.cxx                                   |   20 ++
 sc/source/core/tool/interpr5.cxx                                   |   10 -
 sc/source/core/tool/refdata.cxx                                    |   73 +++++++++-
 sc/source/core/tool/scmatrix.cxx                                   |   15 +-
 sc/source/filter/xml/xmlexprt.cxx                                  |    9 -
 sc/source/ui/Accessibility/AccessibleEditObject.cxx                |   12 +
 sc/source/ui/app/inputhdl.cxx                                      |   51 ++----
 sc/source/ui/docshell/dbdocfun.cxx                                 |    3 
 sc/source/ui/inc/inputhdl.hxx                                      |    3 
 sc/source/ui/view/cellsh1.cxx                                      |    2 
 sc/source/ui/view/output2.cxx                                      |   52 ++++---
 sd/qa/unit/data/pptx/tdf93097.pptx                                 |binary
 sd/qa/unit/data/pptx/tdf93830.pptx                                 |binary
 sd/qa/unit/import-tests.cxx                                        |   37 +++++
 sfx2/uiconfig/ui/newstyle.ui                                       |    1 
 svl/source/numbers/zforfind.cxx                                    |   57 ++++++-
 svl/source/numbers/zforfind.hxx                                    |    1 
 svl/source/numbers/zformat.cxx                                     |    2 
 svx/source/sdr/contact/viewcontactofsdrpathobj.cxx                 |   71 +++++++--
 svx/source/sidebar/graphic/GraphicPropertyPanel.cxx                |    1 
 sw/qa/extras/ooxmlimport/data/tdf90611.docx                        |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx                           |   14 +
 sw/qa/extras/rtfimport/data/tdf90046.rtf                           |    8 +
 sw/qa/extras/rtfimport/data/tdf92061.rtf                           |    5 
 sw/qa/extras/rtfimport/rtfimport.cxx                               |   15 ++
 sw/source/core/access/accnotextframe.cxx                           |    3 
 sw/source/core/layout/paintfrm.cxx                                 |    4 
 sw/source/core/unocore/unoftn.cxx                                  |   11 +
 vcl/osx/DropTarget.cxx                                             |   20 ++
 vcl/osx/DropTarget.hxx                                             |    2 
 vcl/source/control/ilstbox.cxx                                     |   10 -
 vcl/source/filter/wmf/enhwmf.cxx                                   |   10 -
 vcl/source/outdev/font.cxx                                         |    6 
 vcl/unx/gtk/window/gtksalframe.cxx                                 |   12 +
 wizards/com/sun/star/wizards/web/Process.py                        |    2 
 wizards/com/sun/star/wizards/web/WWD_Events.py                     |    4 
 writerfilter/source/dmapper/DomainMapper.cxx                       |    2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                  |   13 +
 writerfilter/source/dmapper/DomainMapper_Impl.hxx                  |    4 
 writerfilter/source/dmapper/GraphicImport.cxx                      |    8 -
 writerfilter/source/rtftok/rtfdocumentimpl.cxx                     |    3 
 xmloff/source/style/xmlnumfi.cxx                                   |    6 
 69 files changed, 730 insertions(+), 200 deletions(-)

New commits:
commit 897eb805902b0e6bdb9657294e8d307910faab7e
Author: Andras Timar <andras.timar at collabora.com>
Date:   Mon Sep 28 10:33:49 2015 +0200

    Bump version to 4.3-11
    
    Change-Id: I4886dfbcf957bceef62f87b07c41aebb6be887cb

diff --git a/configure.ac b/configure.ac
index 29b7656..9886a0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
 
-AC_INIT([LibreOffice],[4.3.10.10],[],[],[https://libreoffice-from-collabora.com/])
+AC_INIT([LibreOffice],[4.3.10.11],[],[],[https://libreoffice-from-collabora.com/])
 
 AC_PREREQ([2.59])
 
commit 9711db24fff84dad65c74dec1a6fcefe2a97816c
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Jul 16 17:52:29 2015 +0200

    Resolves: tdf#88402 remember sort "has headers" at anonymous database ranges
    
    (cherry picked from commit 33255f974fc712b9e9e2965a350c65a2195a7ae6)
    Reviewed-on: https://gerrit.libreoffice.org/17140
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 83d0bb881f7e9a9fb95332a075e577048ae6773f)
    
    Change-Id: I4a126f40589fd401f3a63f74be5e86e3df947ef6

diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index c42e970..8023935 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -112,6 +112,10 @@ public:
     void        GetSortParam(ScSortParam& rSortParam) const;
     void        SetSortParam(const ScSortParam& rSortParam);
 
+    /** Remember some more settings of ScSortParam, only to be called at
+        anonymous DB ranges as it at least overwrites bHasHeader. */
+    void        UpdateFromSortParam( const ScSortParam& rSortParam );
+
     SC_DLLPUBLIC void       GetQueryParam(ScQueryParam& rQueryParam) const;
     SC_DLLPUBLIC void       SetQueryParam(const ScQueryParam& rQueryParam);
     SC_DLLPUBLIC bool       GetAdvancedQuerySource(ScRange& rSource) const;
@@ -206,6 +210,7 @@ public:
         ScDBData* getByRange(const ScRange& rRange);
         void insert(ScDBData* p);
         bool empty() const;
+        bool has( const ScDBData* p ) const;
         bool operator== (const AnonDBs& r) const;
     };
 
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index e8f171f..1ce7d28 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -332,6 +332,11 @@ void ScDBData::SetSortParam( const ScSortParam& rSortParam )
     bByRow = rSortParam.bByRow;
 }
 
+void ScDBData::UpdateFromSortParam( const ScSortParam& rSortParam )
+{
+    bHasHeader = rSortParam.bHasHeader;
+}
+
 void ScDBData::GetQueryParam( ScQueryParam& rQueryParam ) const
 {
     rQueryParam = *mpQueryParam;
@@ -641,6 +646,17 @@ public:
     }
 };
 
+class FindByPointer : public unary_function<ScDBData, bool>
+{
+    const ScDBData* mpDBData;
+public:
+    FindByPointer(const ScDBData* pDBData) : mpDBData(pDBData) {}
+    bool operator() (const ScDBData& r) const
+    {
+        return &r == mpDBData;
+    }
+};
+
 }
 
 ScDBCollection::NamedDBs::NamedDBs(ScDBCollection& rParent, ScDocument& rDoc) :
@@ -791,6 +807,11 @@ bool ScDBCollection::AnonDBs::empty() const
     return maDBs.empty();
 }
 
+bool ScDBCollection::AnonDBs::has( const ScDBData* p ) const
+{
+    return find_if( maDBs.begin(), maDBs.end(), FindByPointer(p)) != maDBs.end();
+}
+
 bool ScDBCollection::AnonDBs::operator== (const AnonDBs& r) const
 {
     return maDBs == r.maDBs;
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index c4e81bc..0b094ef7 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -530,6 +530,9 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
     }
 
     pDBData->SetSortParam(rSortParam);
+    // Remember additional settings on anonymous database ranges.
+    if (pDBData == pDoc->GetAnonymousDBData( nTab) || pDoc->GetDBCollection()->getAnonDBs().has( pDBData))
+        pDBData->UpdateFromSortParam( rSortParam);
 
     ScRange aDirtyRange(
         aLocalParam.nCol1, nStartRow, nTab,
commit 27e6c7c457ab43dcff79153265a906b6a7e9b9f9
Author: Oliver Specht <oliver.specht at cib.de>
Date:   Thu Sep 3 10:36:53 2015 +0200

    tdf#79018: Prevent line break as footnote label
    
    footnote labels must not contain line breaks
    
    Reviewed-on: https://gerrit.libreoffice.org/18292
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 089d7f53ea232972961c14706a54187f075fa973)
    Reviewed-on: https://gerrit.libreoffice.org/18297
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit adf39dbade8652ceca9007484bfa20f04c5ebec0)
    Signed-off-by: Michael Stahl <mstahl at redhat.com>
    
    (cherry picked from commit ab6a83bc4cb13976ed2971502c2a4cc827151a7f)
    
    Conflicts:
    	sw/source/core/unocore/unoftn.cxx
    
    Change-Id: I00d334197b960c4ed17fdee3ea8a1c734cbfa4c1

diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index bdf91c6..118ec52 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -262,6 +262,13 @@ SwXFootnote::setLabel(const OUString& aLabel) throw (uno::RuntimeException, std:
 {
     SolarMutexGuard aGuard;
 
+    OUString newLabel(aLabel);
+    //new line must not occur as footnote label
+    if(newLabel.indexOf('\n') >=0 )
+    {
+       newLabel = newLabel.replace('\n', ' ');
+    }
+
     SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
     if(pFmt)
     {
@@ -270,11 +277,11 @@ SwXFootnote::setLabel(const OUString& aLabel) throw (uno::RuntimeException, std:
         SwTxtNode& rTxtNode = (SwTxtNode&)pTxtFtn->GetTxtNode();
 
         SwPaM aPam(rTxtNode, *pTxtFtn->GetStart());
-        GetDoc()->SetCurFtn(aPam, aLabel, pFmt->GetNumber(), pFmt->IsEndNote());
+        GetDoc()->SetCurFtn(aPam, newLabel, pFmt->GetNumber(), pFmt->IsEndNote());
     }
     else if (m_pImpl->m_bIsDescriptor)
     {
-        m_pImpl->m_sLabel = aLabel;
+        m_pImpl->m_sLabel = newLabel;
     }
     else
     {
commit 5bfc93bc689c9a694c4d7279499c4acf2217469d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Sep 4 16:06:46 2015 +0200

    tdf#92505 vcl: fix substituting missing glyphs
    
    Commit a6b00d16eb27a5e7e31c721671001a909ecef960 (Related bnc#822625:
    Cache FontEntry with the original FontSelectPattern.) and the follow-up
    16a62079018aea0e72636bdb00576487b4e830b9 (Oops, this reference can't be
    const., 2014-05-28) changed the font cache key, so that it's directly
    what was the argument to ImplFontCache::GetFontEntry(), which leads to
    missing glyphs in the bugdoc, e.g. the 4 check mark characters are
    rendered as a check mark only in the DejaVu Sans case on my machine, the
    other 3 cases result in placeholders.
    
    Fix the problem by changing back the key to aFontSelData, which is
    possibly modified in ImplFontCache::GetFontEntry() before used as a key.
    
    Change-Id: I80eb4ba0f986a10100b6ae421d1346f235ce83b7
    (cherry picked from commit e047caf4bb461fb168d9fe08228c049938ca1698)
    Reviewed-on: https://gerrit.libreoffice.org/18561
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 5357a18eb3bb8bf6f795d852b942b80c9080f0f3)

diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 9df60e3..6a2e3b6 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1239,7 +1239,6 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
 ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
     FontSelectPattern& aFontSelData )
 {
-    const FontSelectPattern aFontSelDataOrig(aFontSelData);
     // check if a directly matching logical font instance is already cached,
     // the most recently used font usually has a hit rate of >50%
     ImplFontEntry *pEntry = NULL;
@@ -1326,9 +1325,8 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
         }
 #endif
 
-        // Add the new entry to the cache with the original FontSelectPattern,
-        // so that we can find it next time as a direct cache hit.
-        maFontInstanceList[ aFontSelDataOrig ] = pEntry;
+        // add the new entry to the cache
+        maFontInstanceList[ aFontSelData ] = pEntry;
     }
 
     mpFirstEntry = pEntry;
commit 5a114e7c6e1b2f8bccf36e9d3ab6c82ac2868b9b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Sep 4 11:49:25 2015 +0200

    tdf#93097 oox: fix import of metadata from non-relative stream paths
    
    Commit ef2668bad976f1fbb70759887cafd35ea7833655 (PPTX import: fix
    missing document metadata, 2014-08-28) implemented metadata import for
    the PPTX filter, but in case the metadata stream is not an existing one,
    then OHierarchyHolder_Impl::GetListPathFromString() invoked by
    OStorage::openStreamElementByHierarchicalName() throws.
    
    The bugdoc is generated by a 3rd-party tool that always starts the
    stream path with a slash, and MSO seems to just ignore that: so let's do
    the same to be able to open the document.
    
    (cherry picked from commit 46cf9bb76b29f2bfa6639d9aaf4f26dee365bc0c)
    
    Conflicts:
    	sd/qa/unit/import-tests.cxx
    
    Reviewed-on: https://gerrit.libreoffice.org/18372
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    
    Conflicts:
    	sd/qa/unit/import-tests.cxx
    
    (cherry picked from commit 1b635af9c337b929737d2ed807c9decc2ff6643b)
    
    Conflicts:
    	sd/qa/unit/import-tests.cxx
    
    Change-Id: I6c0715adeb19b9055669f6a45055415dd2c44e28

diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx
index 8b60efa..7d5ba35 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -80,8 +80,13 @@ Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& rxSto
             const StringPair& rEntry = rEntries[ nEntryIndex ];
             if ( rEntry.First == "Target" )
             {
+                // The stream path is always a relative one, ignore the leading "/" if it's there.
+                OUString aStreamPath = rEntry.Second;
+                if (aStreamPath.startsWith("/"))
+                    aStreamPath = aStreamPath.copy(1);
+
                 Reference< XExtendedStorageStream > xExtStream(
-                    xHierarchy->openStreamElementByHierarchicalName( rEntry.Second, ElementModes::READ ), UNO_QUERY_THROW );
+                    xHierarchy->openStreamElementByHierarchicalName( aStreamPath, ElementModes::READ ), UNO_QUERY_THROW );
                 Reference< XInputStream > xInStream = xExtStream->getInputStream();
                 if( xInStream.is() )
                 {
diff --git a/sd/qa/unit/data/pptx/tdf93097.pptx b/sd/qa/unit/data/pptx/tdf93097.pptx
new file mode 100644
index 0000000..687110d
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf93097.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 2eba3c3..24398d8 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -105,6 +105,7 @@ public:
     void testBnc822341();
 #endif
     void testTdf93830();
+    void testTdf93097();
 
     CPPUNIT_TEST_SUITE(SdFiltersTest);
     CPPUNIT_TEST(testDocumentLayout);
@@ -148,6 +149,7 @@ public:
 
     CPPUNIT_TEST(testBnc910045);
     CPPUNIT_TEST(testTdf93830);
+    CPPUNIT_TEST(testTdf93097);
 
     CPPUNIT_TEST_SUITE_END();
 };
@@ -1415,6 +1417,16 @@ void SdFiltersTest::testTdf93830()
     xDocShRef->DoClose();
 }
 
+void SdFiltersTest::testTdf93097()
+{
+    // Throwing metadata import aborted the filter, check that metadata is now imported.
+    sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/tdf93097.pptx") );
+    uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
+    uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties();
+    CPPUNIT_ASSERT_EQUAL(OUString("ss"), xDocumentProperties->getTitle());
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
commit 13eb06f272d48178d420744fcf3243d2abf14aef
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sun Sep 6 16:38:45 2015 +0300

    tdf#91554 OK button should be disabled initially
    
    Regression of eb505c259d0d7bd05d1bb5be5a14ad8613c2a9c7.
    
    Change-Id: I4623c41617d92a808513f18154a7531e6dfd5463
    (cherry picked from commit fdbad6761f5634982bb7b837bb145b3bd580832b)
    Reviewed-on: https://gerrit.libreoffice.org/18371
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    (cherry picked from commit e952d86183eeb5852aefcf341ba25d039447818a)

diff --git a/sfx2/uiconfig/ui/newstyle.ui b/sfx2/uiconfig/ui/newstyle.ui
index c846d07..97b6c29 100644
--- a/sfx2/uiconfig/ui/newstyle.ui
+++ b/sfx2/uiconfig/ui/newstyle.ui
@@ -22,6 +22,7 @@
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
+                <property name="sensitive">False</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="has_default">True</property>
commit 049f8b238328e0688d7915a26f48b945ed171f0a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 1 09:39:58 2015 +0100

    Resolves: tdf#91060 don't crash on loading certain pptx
    
    Change-Id: Ibf32ef644222a59c5fe6a9736ff64739ab24b74f
    (cherry picked from commit c874bf3f7bd6bbe31416506d9b4213bcbbbac4fa)
    Reviewed-on: https://gerrit.libreoffice.org/18227
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit 5d210fba65ec1cc145366117da5fecd349d4fada)

diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 62e64da..1d7e3f8 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -193,7 +193,7 @@ SlideFragmentHandler::~SlideFragmentHandler() throw ()
     case PPT_TOKEN( cmLst ):
         break;
     case PPT_TOKEN( cm ):
-        if(!mpSlidePersistPtr->getCommentsList().cmLst.empty())
+        if (!mpSlidePersistPtr->getCommentsList().cmLst.empty() && !getCharVector().empty())
         {
             // set comment text for earlier comment
             mpSlidePersistPtr->getCommentsList().cmLst.back().setText( getCharVector().back() );
commit abe62e4d15862b5c7fa55051d562600e4d7429ca
Author: Andras Timar <andras.timar at collabora.com>
Date:   Tue Sep 1 10:46:42 2015 +0200

    tdf#93830 txXfrm offset workaround works in rounded rectangle case as well
    
    Reviewed-on: https://gerrit.libreoffice.org/18226
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    (cherry picked from commit cc88a88caad591270760d947848ad0a032d32bdb)
    
    Conflicts:
    	sd/qa/unit/import-tests.cxx
    
    (cherry picked from commit ce4a43f6be7ad71acc9ab513cc5db20d5cf5f36a)
    
    Conflicts:
    	sd/qa/unit/import-tests.cxx
    
    Change-Id: I5d8df5c0d55e8dfd7c978b16b2b220c127f3dac9

diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx
index 97015f3..ffb41fb 100644
--- a/oox/source/drawingml/transform2dcontext.cxx
+++ b/oox/source/drawingml/transform2dcontext.cxx
@@ -65,7 +65,8 @@ ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken,
                     {
                         const OUString sXValue = rAttribs.getString( XML_x ).get();
                         const OUString sYValue = rAttribs.getString( XML_y ).get();
-                        if( !sXValue.isEmpty() && nType == XML_rect )
+
+                        if( !sXValue.isEmpty() )
                             mrShape.getTextBody()->getTextProperties().moTextOffLeft = GetCoordinate( sXValue.toInt32() - mrShape.getPosition().X );
                         if( !sYValue.isEmpty() )
                             mrShape.getTextBody()->getTextProperties().moTextOffUpper = GetCoordinate( sYValue.toInt32() - mrShape.getPosition().Y );
diff --git a/sd/qa/unit/data/pptx/tdf93830.pptx b/sd/qa/unit/data/pptx/tdf93830.pptx
new file mode 100644
index 0000000..8415daf
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf93830.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index b52fb0c..2eba3c3 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -104,6 +104,7 @@ public:
 #if !defined WNT
     void testBnc822341();
 #endif
+    void testTdf93830();
 
     CPPUNIT_TEST_SUITE(SdFiltersTest);
     CPPUNIT_TEST(testDocumentLayout);
@@ -146,6 +147,7 @@ public:
 #endif
 
     CPPUNIT_TEST(testBnc910045);
+    CPPUNIT_TEST(testTdf93830);
 
     CPPUNIT_TEST_SUITE_END();
 };
@@ -1390,6 +1392,29 @@ void SdFiltersTest::testBnc910045()
     CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor);
 }
 
+void SdFiltersTest::testTdf93830()
+{
+    // Text shape offset was ignored
+    sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/tdf93830.pptx") );
+
+    uno::Reference< drawing::XDrawPagesSupplier > xDoc(
+        xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
+
+    uno::Reference< drawing::XDrawPage > xPage(
+        xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
+
+    // Get the first text box from group shape
+    uno::Reference< container::XIndexAccess > xShape( xPage->getByIndex(0), uno::UNO_QUERY );
+    uno::Reference< beans::XPropertySet > xPropSet( xShape->getByIndex(2), uno::UNO_QUERY );
+    CPPUNIT_ASSERT_MESSAGE( "no textbox shape", xPropSet.is() );
+
+    sal_Int32 nTextLeftDistance = 0;
+    xPropSet->getPropertyValue( "TextLeftDistance" ) >>= nTextLeftDistance;
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(4152), nTextLeftDistance);
+
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
commit 1f05e16a2cbeac406deb042249b2a7ca3d154c82
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Sat Aug 29 00:57:20 2015 +1000

    bnc#930818: allow for EMF+ record padding up to 11 bytes
    
    When an array of EMF+ has extra bytes in the end, that are less than 12,
    they should not be  treated as another EMF+ record, but simply ignored.
    
    Conflicts:
    	cppcanvas/source/mtfrenderer/emfplus.cxx
    
    Change-Id: I34701c00916812c8a6a4b69730f602da81719b35
    (cherry picked from commit a427022a74163ad8711c66ddd848211e87b05197)

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index aa3cb27..d77bf11 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1063,31 +1063,35 @@ namespace cppcanvas
 
             void Read (SvMemoryStream &s, sal_uInt32 dataSize, bool bUseWholeStream)
             {
-                sal_uInt32 header, unknown;
+                sal_uInt32 header, bitmapType;
 
                 s.ReadUInt32( header ).ReadUInt32( type );
 
                 SAL_INFO("cppcanvas.emf", "EMF+\timage\nEMF+\theader: 0x" << std::hex << header << " type: " << type << std::dec );
 
                 if (type == 1) { // bitmap
-                    s.ReadInt32( width ).ReadInt32( height ).ReadInt32( stride ).ReadInt32( pixelFormat ).ReadUInt32( unknown );
+                    s.ReadInt32( width ).ReadInt32( height ).ReadInt32( stride ).ReadInt32( pixelFormat ).ReadUInt32( bitmapType );
                     SAL_INFO("cppcanvas.emf", "EMF+\tbitmap width: " << width << " height: " << height << " stride: " << stride << " pixelFormat: 0x" << std::hex << pixelFormat << std::dec);
-                    if (width == 0) { // non native formats
+                    if ((bitmapType != 0) || (width == 0)) { // non native formats
                         GraphicFilter filter;
 
                         filter.ImportGraphic (graphic, OUString(), s);
                         SAL_INFO("cppcanvas.emf", "EMF+\tbitmap width: "  << graphic.GetBitmap().GetSizePixel().Width() << " height: " << graphic.GetBitmap().GetSizePixel().Height());
                     }
 
-                } else if (type == 2) {
+                } else if (type == 2) { // metafile
                     sal_Int32 mfType, mfSize;
 
                     s.ReadInt32( mfType ).ReadInt32( mfSize );
-                    SAL_INFO("cppcanvas.emf", "EMF+\tmetafile type: " << mfType << " dataSize: " << mfSize << " real size calculated from record dataSize: " << dataSize - 16);
+                    if (bUseWholeStream)
+                        dataSize = s.remainingSize();
+                    else
+                        dataSize -= 16;
+                    SAL_INFO("cppcanvas.emf", "EMF+\tmetafile type: " << mfType << " dataSize: " << mfSize << " real size calculated from record dataSize: " << dataSize);
 
                     GraphicFilter filter;
                     // workaround buggy metafiles, which have wrong mfSize set (n#705956 for example)
-                    SvMemoryStream mfStream (((char *)s.GetData()) + s.Tell(), bUseWholeStream ? s.remainingSize() : dataSize - 16, STREAM_READ);
+                    SvMemoryStream mfStream (const_cast<char *>(static_cast<char const *>(s.GetData()) + s.Tell()), dataSize, STREAM_READ);
 
                     filter.ImportGraphic (graphic, OUString(), mfStream);
 
@@ -1746,11 +1750,14 @@ namespace cppcanvas
                                            OutDevState& rState, const CanvasSharedPtr& rCanvas )
         {
             sal_uInt32 length = pAct->GetDataSize ();
-            SvMemoryStream rMF ((void*) pAct->GetData (), length, STREAM_READ);
+            SvMemoryStream rMF (const_cast<sal_uInt8 *>(pAct->GetData ()), length, STREAM_READ);
 
-            length -= 4;
+            if (length < 12) {
+                SAL_INFO("cppcanvas.emf", "length is less than required header size");
+            }
 
-            while (length > 0) {
+            // 12 is minimal valid EMF+ record size; remaining bytes are padding
+            while (length >= 12) {
                 sal_uInt16 type, flags;
                 sal_uInt32 size, dataSize;
                 sal_Size next;
@@ -1761,6 +1768,11 @@ namespace cppcanvas
 
                 if (size < 12) {
                     SAL_INFO("cppcanvas.emf", "Size field is less than 12 bytes");
+                } else if (size > length) {
+                    SAL_INFO("cppcanvas.emf", "Size field is greater than bytes left");
+                }
+                if (dataSize > (size-12)) {
+                    SAL_INFO("cppcanvas.emf", "DataSize field is greater than Size-12");
                 }
 
                 SAL_INFO("cppcanvas.emf", "EMF+ record size: " << size << " type: " << type << " flags: " << flags << " data size: " << dataSize);
@@ -1772,14 +1784,15 @@ namespace cppcanvas
                         mMStream.Seek(0);
                     }
 
-                    // 1st 4 bytes are unknown
-                    mMStream.Write (((const char *)rMF.GetData()) + rMF.Tell() + 4, dataSize - 4);
+                    OSL_ENSURE(dataSize >= 4, "No room for TotalObjectSize in EmfPlusContinuedObjectRecord");
+                    // 1st 4 bytes are TotalObjectSize
+                    mMStream.Write (static_cast<const char *>(rMF.GetData()) + rMF.Tell() + 4, dataSize - 4);
                     SAL_INFO("cppcanvas.emf", "EMF+ read next object part size: " << size << " type: " << type << " flags: " << flags << " data size: " << dataSize);
                 } else {
                     if (mbMultipart) {
                         SAL_INFO("cppcanvas.emf", "EMF+ multipart record flags: " << mMFlags);
                         mMStream.Seek (0);
-                        processObjectRecord (mMStream, mMFlags, dataSize, true);
+                        processObjectRecord (mMStream, mMFlags, 0, true);
                     }
                     mbMultipart = false;
                 }
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 4d10989..e89a951 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -295,10 +295,8 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, bool& bHaveDC)
 
     bHaveDC = false;
 
-    OSL_ASSERT(length >= 4);
-    // reduce by 32bit length itself, skip in SeekRel if
-    // impossibly unavailable
-    sal_uInt32 nRemainder = length >= 4 ? length-4 : length;
+    // skip in SeekRel if impossibly unavailable
+    sal_uInt32 nRemainder = length;
 
     const size_t nRequiredHeaderSize = 12;
     while (nRemainder >= nRequiredHeaderSize)
@@ -534,7 +532,9 @@ bool EnhWMFReader::ReadEnhWMF()
 
                 // EMF+ comment (FIXME: BE?)
                 if( id == 0x2B464D45 && nRecSize >= 12 )
-                    ReadEMFPlusComment( length, bHaveDC );
+                    // [MS-EMF] 2.3.3: DataSize includes both CommentIdentifier and CommentRecordParm fields.
+                    // We have already read 4-byte CommentIdentifier, so reduce length appropriately
+                    ReadEMFPlusComment( length-4, bHaveDC );
                 // GDIC comment, doesn't do anything useful yet
                 else if( id == 0x43494447 && nRecSize >= 12 ) {
                     // TODO: ReadGDIComment()
commit 0cd78fa1f553d5d01ca9f28fb04213ed9b126397
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Aug 10 15:10:09 2015 +0200

    tdf#92997 obtain a date/time edit format according to field value
    
    Bloody workaround hack for the fact that Chart does not handle
    category/x-axis times internally and is not able to pass its own axis
    numberformat to its own databrowser editor.
    
    (cherry picked from commit 711b34d590e659ed754f7c57b3b5eb12acfbbd78)
    
    Conflicts:
    	chart2/source/controller/dialogs/DataBrowser.cxx
    
    Change-Id: I016695ad0104366c0bb636b449a2014ade31aca3
    Reviewed-on: https://gerrit.libreoffice.org/17630
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 3af71f7e35876f12f182cc6ebc41981e6279a1fd)

diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index bf4f089..a27d4e7 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -48,6 +48,7 @@
 
 #include <com/sun/star/container/XIndexReplace.hpp>
 #include <com/sun/star/util/XNumberFormats.hpp>
+#include <com/sun/star/util/NumberFormat.hpp>
 
 #include <algorithm>
 #include <functional>
@@ -683,12 +684,19 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const
                 aResult = aText;
             else if( aAny>>=fDouble )
             {
-                sal_Int32 nLabelColor;
-                bool bColorChanged = false;
-                sal_Int32 nDateNumberFormat = DiagramHelper::getDateNumberFormat( Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY) );
                 if( ! ::rtl::math::isNan( fDouble ) && m_spNumberFormatterWrapper.get() )
+                {
+                    // If a numberformat was available here we could directly
+                    // obtain the corresponding edit format in
+                    // getDateTimeInputNumberFormat() instead of doing the
+                    // guess work.
+                    sal_Int32 nNumberFormat = DiagramHelper::getDateTimeInputNumberFormat(
+                            Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY), fDouble );
+                    sal_Int32 nLabelColor;
+                    bool bColorChanged = false;
                     aResult = m_spNumberFormatterWrapper->getFormattedString(
-                        nDateNumberFormat, fDouble, nLabelColor, bColorChanged );
+                        nNumberFormat, fDouble, nLabelColor, bColorChanged );
+                }
             }
         }
         else
@@ -1118,18 +1126,14 @@ sal_uInt32 DataBrowser::GetNumberFormatKey( sal_Int32 nRow, sal_uInt16 nCol ) co
     return m_apDataBrowserModel->getNumberFormatKey( lcl_getColumnInData( nCol ), lcl_getRowInData( nRow ));
 }
 
-bool DataBrowser::isDateString( const OUString& aInputString, double& fOutDateValue )
+bool DataBrowser::isDateTimeString( const OUString& aInputString, double& fOutDateTimeValue )
 {
     sal_uInt32 nNumberFormat=0;
     SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : 0;
-    if( !aInputString.isEmpty() &&  pSvNumberFormatter && pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateValue ) )
+    if( !aInputString.isEmpty() &&  pSvNumberFormatter && pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateTimeValue ) )
     {
-        Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( m_xChartDoc, uno::UNO_QUERY );
-        Reference< util::XNumberFormats > xNumberFormats;
-        if( xNumberFormatsSupplier.is() )
-             xNumberFormats = Reference< util::XNumberFormats >( xNumberFormatsSupplier->getNumberFormats() );
-        if( DiagramHelper::isDateNumberFormat( nNumberFormat, xNumberFormats ) )
-            return true;
+        short nType = pSvNumberFormatter->GetType( nNumberFormat);
+        return (nType & util::NumberFormat::DATE) || (nType & util::NumberFormat::TIME);
     }
     return false;
 }
@@ -1171,10 +1175,10 @@ bool DataBrowser::SaveModified()
         case DataBrowserModel::TEXTORDATE:
         {
             OUString aText( m_aTextEditField.GetText() );
-            double fDateValue = 0.0;
+            double fValue = 0.0;
             bChangeValid = false;
-            if( isDateString( aText, fDateValue ) )
-                bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, uno::makeAny( fDateValue ) );
+            if( isDateTimeString( aText, fValue ) )
+                bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, uno::makeAny( fValue ) );
             if(!bChangeValid)
                 bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, uno::makeAny( aText ) );
         }
diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx
index f32363a..88420e0 100644
--- a/chart2/source/controller/dialogs/DataBrowser.hxx
+++ b/chart2/source/controller/dialogs/DataBrowser.hxx
@@ -85,7 +85,7 @@ public:
     */
     double GetCellNumber( long nRow, sal_uInt16 nColumnId ) const;
 
-    bool isDateString( const OUString& aInputString, double& fOutDateValue );
+    bool isDateTimeString( const OUString& aInputString, double& fOutDateTimeValue );
 
     // Window
     virtual void Resize() SAL_OVERRIDE;
diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx
index 375aa70..5d73f8e 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -244,6 +244,7 @@ public:
     static bool isSupportingDateAxis( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram );
     static bool isDateNumberFormat( sal_Int32 nNumberFormat, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& xNumberFormats );
     static sal_Int32 getDateNumberFormat( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
+    static sal_Int32 getDateTimeInputNumberFormat( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier, double fNumber );
 
     static sal_Int32 getPercentNumberFormat( const ::com::sun::star::uno::Reference<
                 ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index dec53af..9ea830b 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1189,6 +1189,55 @@ sal_Int32 DiagramHelper::getDateNumberFormat( const Reference< util::XNumberForm
     return nRet;
 }
 
+sal_Int32 DiagramHelper::getDateTimeInputNumberFormat( const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier, double fNumber )
+{
+    sal_Int32 nRet = 0;
+
+    // Get the most detailed date/time format according to fNumber.
+    NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
+    SvNumberFormatter* pNumFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
+    if (!pNumFormatter)
+        SAL_WARN("chart2", "DiagramHelper::getDateTimeInputNumberFormat - no SvNumberFormatter");
+    else
+    {
+        // Categorize the format according to the implementation of
+        // SvNumberFormatter::GetEditFormat(), making assumptions about what
+        // would be time only.
+        /* TODO: implement a method at SvNumberFormatter that does this and
+         * call instead, if Chart isn't able transport the proper format of the
+         * Axis, which of course would be much better.. */
+        short nType;
+        if (0.0 <= fNumber && fNumber < 1.0)
+        {
+            // Clearly a time.
+            nType = util::NumberFormat::TIME;
+            nRet = pNumFormatter->GetFormatIndex( NF_TIME_HHMM, LANGUAGE_SYSTEM);
+        }
+        else if (fabs( fNumber) * 24 < 0x7fff)
+        {
+            // Assuming time within 32k hours or 3.7 years.
+            nType = util::NumberFormat::TIME;
+            nRet = pNumFormatter->GetFormatIndex( NF_TIME_HH_MMSS, LANGUAGE_SYSTEM);
+        }
+        else if (rtl::math::approxFloor( fNumber) != fNumber)
+        {
+            // Date+Time.
+            nType = util::NumberFormat::DATETIME;
+            nRet = pNumFormatter->GetFormatIndex( NF_DATETIME_SYS_DDMMYYYY_HHMMSS, LANGUAGE_SYSTEM);
+        }
+        else
+        {
+            // Date only.
+            nType = util::NumberFormat::DATE;
+            nRet = pNumFormatter->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_SYSTEM);
+        }
+
+        // Obtain the corresponding edit format.
+        nRet = pNumFormatter->GetEditFormat( fNumber, nRet, nType, LANGUAGE_SYSTEM, NULL);
+    }
+    return nRet;
+}
+
 sal_Int32 DiagramHelper::getPercentNumberFormat( const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
 {
     sal_Int32 nRet=-1;
commit 8591c93f27736cf4fb810a43e2911060a0015094
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jul 20 19:13:06 2015 +0200

    Resolves: tdf#58838 do not use collation for Equal/NotEqual operators
    
    Unicode collation ignores control characters and other specific
    characters, see
    http://www.unicode.org/charts/collation/chart_Ignored.html
    and thus is not suitable to be used for Equal/NotEqual operators.
    
    (cherry picked from commit 1e5e7b9323c3321a380edf86097ccc2e3f0a7a7a)
    
    Conflicts:
    	sc/source/core/tool/interpr1.cxx
    
    Change-Id: Ib84713e1da59d92e07bc974d93b6def8217bb067
    Reviewed-on: https://gerrit.libreoffice.org/17238
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit faf178d59cf9793e8b9a1b3c4b8afcc96bd72dc6)

diff --git a/sc/inc/compare.hxx b/sc/inc/compare.hxx
index 5f99ef2..a4ac35f 100644
--- a/sc/inc/compare.hxx
+++ b/sc/inc/compare.hxx
@@ -63,9 +63,13 @@ private:
 };
 
 /** @param pOptions
-        NULL means case sensitivity document option is to be used!
+        Used for comparing two strings, if given.
+        NULL means that for comparing two strings ScQueryOp rComp.meOp is
+        tested for SC_EQUAL and SC_NOT_EQUAL, else pOptions->aQueryEntry.eOp
+        Case sensitivity document option is always to be passed in
+        rComp.mbIgnoreCase.
  */
-double CompareFunc( const Compare::Cell& rCell1, const Compare::Cell& rCell2, bool bIgnoreCase, CompareOptions* pOptions = NULL );
+double CompareFunc( const Compare& rComp, CompareOptions* pOptions = NULL );
 double CompareFunc( const Compare::Cell& rCell1, double fCell2, CompareOptions* pOptions = NULL );
 double CompareFunc( double fCell1, double fCell2 );
 
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index ede3e5c..f350671 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -406,7 +406,7 @@ void ScChoseJump();
 // Returns true if last jump was executed and result matrix pushed.
 bool JumpMatrix( short nStackLevel );
 
-double Compare();
+double Compare( ScQueryOp eOp );
 /** @param pOptions
         NULL means case sensitivity document option is to be used!
  */
diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index 6395f2f..b883605 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -43,8 +43,11 @@ CompareOptions::CompareOptions( ScDocument* pDoc, const ScQueryEntry& rEntry, bo
     // struct if needed.
 }
 
-double CompareFunc( const Compare::Cell& rCell1, const Compare::Cell& rCell2, bool bIgnoreCase, CompareOptions* pOptions )
+double CompareFunc( const Compare& rComp, CompareOptions* pOptions )
 {
+    const Compare::Cell& rCell1 = rComp.maCells[0];
+    const Compare::Cell& rCell2 = rComp.maCells[1];
+
     // Keep DoubleError if encountered
     // #i40539# if bEmpty is set, bVal/nVal are uninitialized
     if (!rCell1.mbEmpty && rCell1.mbValue && !rtl::math::isFinite(rCell1.mfValue))
@@ -134,7 +137,7 @@ double CompareFunc( const Compare::Cell& rCell1, const Compare::Cell& rCell2, bo
                 sal_Int32 nStart = 0;
                 sal_Int32 nStop  = rCell1.maStr.getLength();
                 bool bMatch = rEntry.GetSearchTextPtr(
-                        !bIgnoreCase)->SearchForward(
+                        !rComp.mbIgnoreCase)->SearchForward(
                             rCell1.maStr.getString(), &nStart, &nStop);
                 if (bMatch && pOptions->bMatchWholeCell && (nStart != 0 || nStop != rCell1.maStr.getLength()))
                     bMatch = false;     // RegEx must match entire string.
@@ -143,12 +146,12 @@ double CompareFunc( const Compare::Cell& rCell1, const Compare::Cell& rCell2, bo
             else if (rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL)
             {
                 ::utl::TransliterationWrapper* pTransliteration =
-                    (bIgnoreCase ? ScGlobal::GetpTransliteration() :
+                    (rComp.mbIgnoreCase ? ScGlobal::GetpTransliteration() :
                      ScGlobal::GetCaseTransliteration());
                 bool bMatch = false;
                 if (pOptions->bMatchWholeCell)
                 {
-                    if (bIgnoreCase)
+                    if (rComp.mbIgnoreCase)
                         bMatch = rCell1.maStr.getDataIgnoreCase() == rCell2.maStr.getDataIgnoreCase();
                     else
                         bMatch = rCell1.maStr.getData() == rCell2.maStr.getData();
@@ -165,14 +168,21 @@ double CompareFunc( const Compare::Cell& rCell1, const Compare::Cell& rCell2, bo
                 }
                 fRes = (bMatch ? 0 : 1);
             }
-            else if (bIgnoreCase)
+            else if (rComp.mbIgnoreCase)
                 fRes = (double) ScGlobal::GetCollator()->compareString(
                         rCell1.maStr.getString(), rCell2.maStr.getString());
             else
                 fRes = (double) ScGlobal::GetCaseCollator()->compareString(
                         rCell1.maStr.getString(), rCell2.maStr.getString());
         }
-        else if (bIgnoreCase)
+        else if (rComp.meOp == SC_EQUAL || rComp.meOp == SC_NOT_EQUAL)
+        {
+            if (rComp.mbIgnoreCase)
+                fRes = (rCell1.maStr.getDataIgnoreCase() == rCell2.maStr.getDataIgnoreCase()) ? 0 : 1;
+            else
+                fRes = (rCell1.maStr.getData() == rCell2.maStr.getData()) ? 0 : 1;
+        }
+        else if (rComp.mbIgnoreCase)
             fRes = (double) ScGlobal::GetCollator()->compareString(
                 rCell1.maStr.getString(), rCell2.maStr.getString());
         else
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index c30c0551..8f1effe 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -796,9 +796,10 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
     return false;
 }
 
-double ScInterpreter::Compare()
+double ScInterpreter::Compare( ScQueryOp eOp )
 {
     sc::Compare aComp;
+    aComp.meOp = eOp;
     aComp.mbIgnoreCase = pDok->GetDocOptions().IsIgnoreCase();
     for( short i = 1; i >= 0; i-- )
     {
@@ -883,7 +884,7 @@ double ScInterpreter::Compare()
     if( nGlobalError )
         return 0;
     nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
-    return sc::CompareFunc(aComp.maCells[0], aComp.maCells[1], aComp.mbIgnoreCase);
+    return sc::CompareFunc(aComp);
 }
 
 
@@ -993,8 +994,7 @@ sc::RangeMatrix ScInterpreter::CompareMat( ScQueryOp eOp, sc::CompareOptions* pO
                             rCell.mbEmpty = false;
                         }
                     }
-                    aRes.mpMat->PutDouble(
-                        sc::CompareFunc(aComp.maCells[0], aComp.maCells[1], aComp.mbIgnoreCase, pOptions), j, k);
+                    aRes.mpMat->PutDouble( sc::CompareFunc( aComp, pOptions), j, k);
                 }
                 else
                     aRes.mpMat->PutString(mrStrPool.intern(ScGlobal::GetRscString(STR_NO_VALUE)), j, k);
@@ -1085,7 +1085,7 @@ void ScInterpreter::ScEqual()
         PushMatrix(aMat);
     }
     else
-        PushInt( int(Compare() == 0) );
+        PushInt( int(Compare( SC_EQUAL) == 0) );
 }
 
 
@@ -1103,7 +1103,7 @@ void ScInterpreter::ScNotEqual()
         PushMatrix(aMat);
     }
     else
-        PushInt( int(Compare() != 0) );
+        PushInt( int(Compare( SC_NOT_EQUAL) != 0) );
 }
 
 
@@ -1121,7 +1121,7 @@ void ScInterpreter::ScLess()
         PushMatrix(aMat);
     }
     else
-        PushInt( int(Compare() < 0) );
+        PushInt( int(Compare( SC_LESS) < 0) );
 }
 
 
@@ -1139,7 +1139,7 @@ void ScInterpreter::ScGreater()
         PushMatrix(aMat);
     }
     else
-        PushInt( int(Compare() > 0) );
+        PushInt( int(Compare( SC_GREATER) > 0) );
 }
 
 
@@ -1157,7 +1157,7 @@ void ScInterpreter::ScLessEqual()
         PushMatrix(aMat);
     }
     else
-        PushInt( int(Compare() <= 0) );
+        PushInt( int(Compare( SC_LESS_EQUAL) <= 0) );
 }
 
 
@@ -1175,7 +1175,7 @@ void ScInterpreter::ScGreaterEqual()
         PushMatrix(aMat);
     }
     else
-        PushInt( int(Compare() >= 0) );
+        PushInt( int(Compare( SC_GREATER_EQUAL) >= 0) );
 }
 
 
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 3977882..4569e7c 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -1389,7 +1389,7 @@ class CompareMatrixFunc : std::unary_function<MatrixImplType::element_block_type
 
     void compare()
     {
-        double fVal = sc::CompareFunc(mrComp.maCells[0], mrComp.maCells[1], mrComp.mbIgnoreCase, mpOptions);
+        double fVal = sc::CompareFunc( mrComp, mpOptions);
         maResValues.push_back(evaluate(fVal, mrComp.meOp));
     }
 
commit 3b562fccdb6d8dfcb1c20752a7499c29158101fe
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Sat Aug 15 15:03:41 2015 +0200

    tdf#76649 Skip NaN initial values for min and max
    
    min and max were initiated as aValuesX[0] which could be NaN
    test i before evaluating aValuesX[i]
    
    Change-Id: I229f4c8f8fda54684e1c817ea7da06fd87eb79b9
    Reviewed-on: https://gerrit.libreoffice.org/17773
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 9a4bbe65829ad1e1dcd2a28e8b25422da0eeb4af)

diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 2f4b968..8c07960 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -537,9 +537,13 @@ void VDataSeries::getMinMaxXValue(double& fMin, double& fMax) const
     {
         double aValue;
 
-        fMax = fMin = aValuesX[0];
+        sal_Int32 i = 0;
+        while ( i < aValuesX.getLength() && ::rtl::math::isNan( aValuesX[i] ) )
+            i++;
+        if ( i < aValuesX.getLength() )
+            fMax = fMin = aValuesX[i++];
 
-        for (sal_Int32 i = 1; i < aValuesX.getLength(); i++)
+        for ( ; i < aValuesX.getLength(); i++)
         {
             aValue = aValuesX[i];
             if ( aValue > fMax)
commit cf7e32372f6231f65ac332cb2bb7acb2fffc8260
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Aug 15 00:47:03 2015 +0200

    Resolves: tdf#93358 resync attribute pattern that may have changed
    
    Change-Id: If3ce8feec940c7212fe467f39db868630522b17e
    (cherry picked from commit f089de7dc5c367a3123129b08a9050b3bacc4eba)
    Reviewed-on: https://gerrit.libreoffice.org/17766
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 8006e35e934bd2c24c377d39f72f810e5c69ed59)

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 06ee75a..7dae3d9 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -825,7 +825,18 @@ void ScColumn::GetOptimalHeight(
             }
 
             if (bStdOnly)
-                if (HasEditCells(nStart,nEnd,nEditPos))     // includes mixed script types
+            {
+                bool bHasEditCells = HasEditCells(nStart,nEnd,nEditPos);
+                // Call to HasEditCells() may change pattern due to
+                // calculation, => sync always.
+                // We don't know which row changed first, but as pPattern
+                // covered nStart to nEnd we can pick nStart. Worst case we
+                // have to repeat that for every row in range if every row
+                // changed.
+                pPattern = aIter.Resync( nStart, nStart, nEnd);
+                if (bHasEditCells && nEnd < nEditPos)
+                    bHasEditCells = false;              // run into that again
+                if (bHasEditCells)                      // includes mixed script types
                 {
                     if (nEditPos == nStart)
                     {
@@ -841,6 +852,7 @@ void ScColumn::GetOptimalHeight(
                         nEnd = nEditPos - 1;            // standard - part
                     }
                 }
+            }
 
             sc::SingleColumnSpanSet aSpanSet;
             aSpanSet.scan(*this, nStart, nEnd);
commit 838d9110d66e2c68a44b94390dc97d92019820b5
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Jul 21 00:58:21 2015 +0200

    Resolves: tdf#92448 check for numeric '.' only if sheet separator is '.'
    
    Change-Id: I427da08eed3fc5daed2bac4d588b66a3f03fd28c
    (cherry picked from commit 2fd3560e0815b547ada7d7f6557857fe3c8678ba)
    Reviewed-on: https://gerrit.libreoffice.org/17245
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 2f9469cf81b22351e8c423bfda6387f70d873c4d)

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 1f2e4de..c021829 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2761,7 +2761,7 @@ bool ScCompiler::IsReference( const OUString& rName )
     if ( ch1 == cDecSep )
         return false;
     // Who was that imbecile introducing '.' as the sheet name separator!?!
-    if ( rtl::isAsciiDigit( ch1 ) )
+    if ( rtl::isAsciiDigit( ch1 ) && pConv->getSpecialSymbol( Convention::SHEET_SEPARATOR) == '.' )
     {
         // Numerical sheet name is valid.
         // But English 1.E2 or 1.E+2 is value 100, 1.E-2 is 0.01
commit b600ba0e43e8df84a8903fc72cc918ee27751794
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Thu Aug 13 12:55:04 2015 +0300

    tdf#78111 Sane preferred width for the color mode combobox
    
    Don't let long strings (in some languages) make it request so much space.
    
    Change-Id: I5b2af9d7cc54d1ba772ae75971cfff27bee31a05
    (cherry picked from commit d2f218f54369c6d7fb38d0b701aa86fdf5aae843)
    Reviewed-on: https://gerrit.libreoffice.org/17778
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 987d1153d75b9be6d631783cb22b661bd3ab2582)

diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
index 656aeae..15e7197 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
@@ -58,6 +58,7 @@ GraphicPropertyPanel::GraphicPropertyPanel(
     get(mpMtrBrightness, "setbrightness");
     get(mpMtrContrast, "setcontrast");
     get(mpLBColorMode, "setcolormode");
+    mpLBColorMode->set_width_request(mpLBColorMode->get_preferred_size().Width());
     get(mpMtrTrans, "settransparency");
     get(mpMtrRed, "setred");
     get(mpMtrGreen, "setgreen");
commit 8d5f6c4c68164012260f32ddd91ba6f34fedaddc
Author: mmeof2 <manikmalhotra92 at gmail.com>
Date:   Sat Aug 1 19:26:40 2015 +0400

    tdf#44621: Fixed drag and drop in OSX 10.7+
    
    Change-Id: I8f9e1e9205dd9611f4bc1ef47c8cde2e284b403f
    Reviewed-on: https://gerrit.libreoffice.org/17461
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
    Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
    (cherry picked from commit 9f3f0f40975a1dad8273ee8e02189a3c4a138f4e)

diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index 7ee0f5b..8c91f87 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -104,7 +104,8 @@ namespace /* private */
 
 -(BOOL)performDragOperation:(id <NSDraggingInfo>)sender
 {
-    return mDropTarget->performDragOperation(sender);
+    (void) sender;
+    return mDropTarget->performDragOperation();
 }
 
 -(void)concludeDragOperation:(id <NSDraggingInfo>)sender
@@ -200,7 +201,10 @@ NSDragOperation DropTarget::draggingEntered(id sender)
         sal_Int8 currentAction = determineDropAction(mDragSourceSupportedActions, sender);
 
         NSRect bounds = [mView bounds];
-        NSPoint dragLocation = [sender draggedImageLocation];
+        NSPoint mouseLoc = [NSEvent mouseLocation];
+
+        id wnd = [mView window];
+        NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil];
 
         CocoaToVCL(dragLocation, bounds);
 
@@ -238,7 +242,10 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
     {
         sal_Int8 currentAction = determineDropAction(currentDragSourceActions, sender);
         NSRect bounds = [mView bounds];
-        NSPoint dragLocation = [sender draggedImageLocation];
+        NSPoint mouseLoc = [NSEvent mouseLocation];
+
+        id wnd = [mView window];
+        NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil];
 
         CocoaToVCL(dragLocation, bounds);
 
@@ -287,7 +294,7 @@ BOOL DropTarget::prepareForDragOperation(id /*sender*/)
     return 1;
 }
 
-BOOL DropTarget::performDragOperation(id sender)
+BOOL DropTarget::performDragOperation()
 {
     bool bSuccess = false;
 
@@ -301,7 +308,10 @@ BOOL DropTarget::performDragOperation(id sender)
         }
 
         NSRect bounds = [mView bounds];
-        NSPoint dragLocation = [sender draggedImageLocation];
+        NSPoint mouseLoc = [NSEvent mouseLocation];
+
+        id wnd = [mView window];
+        NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil];
 
         CocoaToVCL(dragLocation, bounds);
 
diff --git a/vcl/osx/DropTarget.hxx b/vcl/osx/DropTarget.hxx
index d67b647..be0b3da 100644
--- a/vcl/osx/DropTarget.hxx
+++ b/vcl/osx/DropTarget.hxx
@@ -125,7 +125,7 @@ public:
   NSDragOperation draggingUpdated(id sender);
   void draggingExited(id sender);
   BOOL prepareForDragOperation(id sender);
-  BOOL performDragOperation(id sender);
+  BOOL performDragOperation();
   void concludeDragOperation(id sender);
 
   /* If multiple actions are supported by the drag source and
commit bfba5fe3c9c27c62c0ed7d0029fc7a1274b5a24e
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Aug 10 21:03:28 2015 +0200

    Resolves: tdf#86024 do not attempt to shorten numeric value output
    
    Regression of 087a79db1272858f107656c5ca3c6efb45680986
    
    Change-Id: I903e05234882c79e6da6499cb17e16fd7226f91c
    (cherry picked from commit 2a06a052b920f696a794c2fb847fce63038220e9)
    Reviewed-on: https://gerrit.libreoffice.org/17637
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 73b8b634b886781372ba77f7bc729457deebd453)

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 7548a6d..e70e46b 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2040,32 +2040,40 @@ void ScOutputData::DrawStrings( bool bPixelToLogic )
 
                             OUString aShort = aString;
 
-                            double fVisibleRatio = 1.0;
-                            double fTextWidth = aVars.GetTextSize().Width();
-                            sal_Int32 nTextLen = aString.getLength();
-                            if (eOutHorJust == SVX_HOR_JUSTIFY_LEFT && aAreaParam.mnRightClipLength > 0)
+                            // But never fiddle with numeric values.
+                            // (Which was the cause of tdf#86024).
+                            // The General automatic format output takes
+                            // care of this, or fixed width numbers either fit
+                            // or display as ###.
+                            if (!bCellIsValue)
                             {
-                                fVisibleRatio = (fTextWidth - aAreaParam.mnRightClipLength) / fTextWidth;
-                                if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
+                                double fVisibleRatio = 1.0;
+                                double fTextWidth = aVars.GetTextSize().Width();
+                                sal_Int32 nTextLen = aString.getLength();
+                                if (eOutHorJust == SVX_HOR_JUSTIFY_LEFT && aAreaParam.mnRightClipLength > 0)
                                 {
-                                    // Only show the left-end segment.
-                                    sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1;
-                                    aShort = aShort.copy(0, nShortLen);
+                                    fVisibleRatio = (fTextWidth - aAreaParam.mnRightClipLength) / fTextWidth;
+                                    if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
+                                    {
+                                        // Only show the left-end segment.
+                                        sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1;
+                                        aShort = aShort.copy(0, nShortLen);
+                                    }
                                 }
-                            }
-                            else if (eOutHorJust == SVX_HOR_JUSTIFY_RIGHT && aAreaParam.mnLeftClipLength > 0)
-                            {
-                                fVisibleRatio = (fTextWidth - aAreaParam.mnLeftClipLength) / fTextWidth;
-                                if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
+                                else if (eOutHorJust == SVX_HOR_JUSTIFY_RIGHT && aAreaParam.mnLeftClipLength > 0)
                                 {
-                                    // Only show the right-end segment.
-                                    sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1;
-                                    aShort = aShort.copy(nTextLen-nShortLen);
-
-                                    // Adjust the text position after shortening of the string.
-                                    double fShortWidth = pFmtDevice->GetTextWidth(aShort);
-                                    double fOffset = fTextWidth - fShortWidth;
-                                    aDrawTextPos.Move(fOffset, 0);
+                                    fVisibleRatio = (fTextWidth - aAreaParam.mnLeftClipLength) / fTextWidth;
+                                    if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
+                                    {
+                                        // Only show the right-end segment.
+                                        sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1;
+                                        aShort = aShort.copy(nTextLen-nShortLen);
+
+                                        // Adjust the text position after shortening of the string.
+                                        double fShortWidth = pFmtDevice->GetTextWidth(aShort);
+                                        double fOffset = fTextWidth - fShortWidth;
+                                        aDrawTextPos.Move(fOffset, 0);
+                                    }
                                 }
                             }
 
commit f2a02223ce9002556aee20854b32bcbd0f4ebadd
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Aug 9 12:30:40 2015 +0200

    tdf#79741: Macro with Find @ Replace crash Calc
    
    0x00002aaaaf4bd163 in SfxItemSet::GetItemState (this=0x0, nWhich=26182, bSrchInParent=true, ppItem=0x7fffffff1730)
        at /home/julien/compile-libreoffice/libreoffice/svl/source/items/itemset.cxx:422
    422	        SfxItemArray ppFnd = pAktSet->m_pItems;
    (gdb) bt
    0  0x00002aaaaf4bd163 in SfxItemSet::GetItemState(unsigned short, bool, SfxPoolItem const**) const (this=0x0, nWhich=26182, bSrchInParent=true, ppItem=0x7fffffff1730)
        at /home/julien/compile-libreoffice/libreoffice/svl/source/items/itemset.cxx:422
    1  0x00002aaaaf4bd306 in SfxItemSet::HasItem(unsigned short, SfxPoolItem const**) const (this=0x0, nWhich=26182, ppItem=0x7fffffff1730)
        at /home/julien/compile-libreoffice/libreoffice/svl/source/items/itemset.cxx:463
    2  0x00002aaacd9902c9 in ScCellShell::ExecuteEdit(SfxRequest&) (this=0x312fe10, rReq=...) at /home/julien/compile-libreoffice/libreoffice/sc/source/ui/view/cellsh1.cxx:1032
    
    See https://gerrit.libreoffice.org/#/c/17603/ for details
    Thank you Maxim!
    
    Change-Id: Ie4cf31e3764c02f335830c59674a94acd6c209df
    Reviewed-on: https://gerrit.libreoffice.org/17603
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
    Tested-by: Maxim Monastirsky <momonasmon at gmail.com>
    (cherry picked from commit 958ec9ccfe3bbe54369f9e9105c10beae80d9548)
    Reviewed-on: https://gerrit.libreoffice.org/17615
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit ed09c7638e3ea40fc40b51af5cf0b2018c5c78c9)
    Reviewed-on: https://gerrit.libreoffice.org/17649
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit d29b9d1da867245c08928579d4fd5efffc7eca57)

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 1835459..8c54eaf 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3232,7 +3232,7 @@ SfxVoidItem SolverDialog SID_OPENDLG_OPTSOLVER
 ]
 
 SfxVoidItem SearchResultsDialog SID_SEARCH_RESULTS_DIALOG
-()
+(SfxBoolItem Visible SID_SEARCH_RESULTS_DIALOG)
 [
     /* flags: */
     AutoUpdate = FALSE,
@@ -3249,9 +3249,9 @@ SfxVoidItem SearchResultsDialog SID_SEARCH_RESULTS_DIALOG
 
     /* config: */
     AccelConfig = TRUE,
-    MenuConfig = TRUE,
+    MenuConfig = FALSE,
     StatusBarConfig = FALSE,
-    ToolBoxConfig = TRUE,
+    ToolBoxConfig = FALSE,
     GroupId = GID_OPTIONS;
 ]
 
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 9ca1e1a..72b0948 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1002,7 +1002,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
         case SID_SEARCH_RESULTS_DIALOG:
         {
             const SfxPoolItem* pItem = NULL;
-            if (pReqArgs->HasItem(SID_SEARCH_RESULTS_DIALOG, &pItem))
+            if (pReqArgs && pReqArgs->HasItem(SID_SEARCH_RESULTS_DIALOG, &pItem))
             {
                 bool bVisible = static_cast<const SfxBoolItem*>(pItem)->GetValue();
                 SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
commit aa19d78a09ab90ee58e79af15c52baf1f01df640
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Aug 6 18:22:16 2015 +0200

    Resolves: tdf#93080 short day name and month name may interfere
    
    (cherry picked from commit c7d66949beecab92dc8f1380c54751710aa0b7a2)
    
    Conflicts:
    	svl/source/numbers/zforfind.cxx
    
    Change-Id: I088633e4cff278e1add8eeea8828f9ba9c9fb140
    Reviewed-on: https://gerrit.libreoffice.org/17546
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit d81179c7abeb0601a545e5512e5311b84cb3816a)

diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 9bdee3a..8caafb0 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -110,6 +110,7 @@ void ImpSvNumberInputScan::Reset()
 {
     nMonth       = 0;
     nMonthPos    = 0;
+    nDayOfWeek   = 0;
     nTimePos     = 0;
     nSign        = 0;
     nESign       = 0;
@@ -2100,6 +2101,33 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
     {
         const sal_Int32 nMonthStart = nPos;
         short nTempMonth = GetMonth(rString, nPos);
+        if (nTempMonth < 0)
+        {
+            // Short month and day names may be identical in some locales, e.g.
+            // "mar" for "martes" or "marzo" in Spanish.
+            // Do not let a month name immediately take precedence if a day
+            // name was meant instead. Assume that both could be valid, until
+            // encountered differently or the final evaluation in
+            // IsNumberFormat() checks, but continue with weighing the month
+            // name higher unless we have both day of week and month name here.
+            sal_Int32 nTempPos = nMonthStart;
+            nDayOfWeek = GetDayOfWeek( rString, nTempPos);
+            if (nDayOfWeek < 0)
+            {
+                SkipChar( '.', rString, nTempPos ); // abbreviated
+                SkipString( pFormatter->GetLocaleData()->getLongDateDayOfWeekSep(), rString, nTempPos );
+                SkipBlanks( rString, nTempPos);
+                short nTempTempMonth = GetMonth( rString, nTempPos);
+                if (nTempTempMonth)
+                {
+                    // Fall into the else branch below that handles both.
+                    nTempMonth = 0;
+                    nPos = nMonthStart;
+                    nDayOfWeek = 0;
+                    // Do not set nDayOfWeek hereafter, anywhere.
+                }
+            }
+        }
         if ( nTempMonth )    // month (Jan 1)?
         {
             if (nPos < rString.getLength())         // Jan1 without separator is not a date
@@ -2120,14 +2148,14 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
         }
         else
         {
-            int nDayOfWeek = GetDayOfWeek( rString, nPos );
-            if ( nDayOfWeek )
+            int nTempDayOfWeek = GetDayOfWeek( rString, nPos );
+            if ( nTempDayOfWeek )
             {
                 // day of week is just parsed away
                 eScannedType = NUMBERFORMAT_DATE;       // !!! it IS a date !!!
                 if ( nPos < rString.getLength() )
                 {
-                    if ( nDayOfWeek < 0 )
+                    if ( nTempDayOfWeek < 0 )
                     {
                         // abbreviated
                         if ( rString[ nPos ] == (sal_Unicode)'.' )
@@ -2801,12 +2829,12 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
             nPos = nPos + rSep.getLength();
             SkipBlanks(rString, nPos);
         }
-        int nDayOfWeek = GetDayOfWeek( rString, nPos );
-        if ( nDayOfWeek )
+        int nTempDayOfWeek = GetDayOfWeek( rString, nPos );
+        if ( nTempDayOfWeek )
         {
             if ( nPos < rString.getLength() )
             {
-                if ( nDayOfWeek < 0 )
+                if ( nTempDayOfWeek < 0 )
                 {   // short
                     if ( rString[ nPos ] == (sal_Unicode)'.' )
                     {
@@ -3497,6 +3525,14 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString,         // s
                 break;
 
             case NUMBERFORMAT_DATE:
+                if (nMonth < 0 && nDayOfWeek < 0 && nAnzNums == 3)
+                {
+                    // If both, short month name and day of week name were
+                    // detected, and also numbers for full date, assume that we
+                    // have a day of week instead of month name.
+                    nMonth = 0;
+                    nMonthPos = 0;
+                }
                 if (nMonth)
                 {                               // month name and numbers
                     if (nAnzNums > 2)
@@ -3543,6 +3579,15 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString,         // s
                 break;
 
             case NUMBERFORMAT_DATETIME:
+                if (nMonth < 0 && nDayOfWeek < 0 && nAnzNums >= 5)
+                {
+                    // If both, abbreviated month name and day of week name
+                    // were detected, and also at least numbers for full date
+                    // plus time including minutes, assume that we have a day
+                    // of week instead of month name.
+                    nMonth = 0;
+                    nMonthPos = 0;
+                }
                 if (nMonth)
                 {                               // month name and numbers
                     if (nDecPos)
diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx
index 1f03fb9..8ceeee6 100644
--- a/svl/source/numbers/zforfind.hxx
+++ b/svl/source/numbers/zforfind.hxx
@@ -108,6 +108,7 @@ private:
                                                 // negative => short format
     short  nMonthPos;                           // 1 = front, 2 = middle
                                                 // 3 = end
+    int    nDayOfWeek;                          // Temporary (!) day of week (1..7,-1..-7) if date
     sal_uInt16 nTimePos;                        // Index of first time separator (+1)
     short  nDecPos;                             // Index of substring containing "," (+1)
     short  nNegCheck;                           // '( )' for negative
commit 853255aef611be01e2a887cbd6cc177953cdea14
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Aug 4 23:36:13 2015 +0200

    tdf#76845: wizards: fix Web wizard XSLT deadlock on Windows
    
    The web wizard runs some XSLT over the exported file.  It registers
    a handler that is called when the output stream is closed, and this
    Process.streamClosedHandler() calls terminate(), which causes the
    deadlock, because it wants to join() the extra XSLT thread but the
    handler is actually called from the XSLT thread itself.
    
    Fix that by moving the terminate() to another function that runs in the
    main thread.
    
    It does not deadlock on Unixes because osl_joinWithThread() actually
    detects an attempt to join the calling thread and returns early.
    
    Change-Id: Ia176562fa28b97c7e8956c1e8975c9aa6ee23236
    (cherry picked from commit 62de18ab98289fc80984299f13ad71e4a4452ea3)
    Reviewed-on: https://gerrit.libreoffice.org/17514
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 07a659e6e60a25d5c6ce0dd58a60879df292d885)

diff --git a/wizards/com/sun/star/wizards/web/Process.py b/wizards/com/sun/star/wizards/web/Process.py
index 3502b58..06097ab 100644
--- a/wizards/com/sun/star/wizards/web/Process.py
+++ b/wizards/com/sun/star/wizards/web/Process.py
@@ -375,6 +375,7 @@ class Process(ProcessErrors):
             self.tf.start()
             while (not self.tfCompleted):
                 pass
+            self.tf.terminate()
             task.advance(True)
 
 
@@ -400,7 +401,6 @@ class Process(ProcessErrors):
         print ("DEBUG !!! Stream 'error' event handler")
 
     def streamClosedHandler(self, parent):
-        parent.tf.terminate()
         parent.tfCompleted = True
 
     # I broke the export method to two methods
commit b63ce61dcb9c6417eacbbecb6d1fc7ec8bc12b9d
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Jul 13 16:03:15 2015 +0200

    tdf#92693: ReportBuilder: MINUTES() rounded to nearest for fractional minutes
    
    ... instead of the correct truncation.
    
    Thanks to Lionel for the idea of the fix and his patience for newbies like me!
    
    Change-Id: I9864aeb08de2c054ee47aa6b04a31bdb4e20dc8c
    Reviewed-on: https://gerrit.libreoffice.org/17050
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Julien Nabet <serval2412 at yahoo.fr>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 8a12cb1a98186deaedf21446592e2aedbda52e80)

diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk b/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk
index 2bc3229..bb78966 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libformula,\
 $(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libformula,\
 	external/jfreereport/patches/common_build.patch \
 	external/jfreereport/patches/libformula-time-notz.patch \
+	external/jfreereport/patches/libformula-minutes_truncation.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/patches/libformula-minutes_truncation.patch.1 b/external/jfreereport/patches/libformula-minutes_truncation.patch.1
new file mode 100644
index 0000000..0df98db
--- /dev/null
+++ b/external/jfreereport/patches/libformula-minutes_truncation.patch.1
@@ -0,0 +1,17 @@
+Seulement dans jfreereport_libformula: bin
+Seulement dans jfreereport_libformula: build.log
+Seulement dans jfreereport_libformula: dist
+diff -ur jfreereport_libformula.org/source/org/pentaho/reporting/libraries/formula/function/datetime/MinuteFunction.java jfreereport_libformula/source/org/pentaho/reporting/libraries/formula/function/datetime/MinuteFunction.java
+--- jfreereport_libformula.org/source/org/pentaho/reporting/libraries/formula/function/datetime/MinuteFunction.java	2015-07-13 15:55:31.752539618 +0200
++++ jfreereport_libformula/source/org/pentaho/reporting/libraries/formula/function/datetime/MinuteFunction.java	2015-07-13 15:56:27.084394065 +0200
+@@ -74,7 +74,7 @@
+     
+     // Multiply the minutes with 60 to get the minutes as ints 
+     final BigDecimal minutes = minutesFraction.multiply(MINUTES);
+-    final BigDecimal minutesAsInt = minutes.setScale(0, BigDecimal.ROUND_HALF_UP);
++    final BigDecimal minutesAsInt = NumberUtil.performIntRounding(minutes);
+     return new TypeValuePair(NumberType.GENERIC_NUMBER, minutesAsInt);
+   }
+-}
+\ Pas de fin de ligne à la fin du fichier
++}
commit 5af4e8e37e187949724ac4f57573341429bdebf8
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jul 24 14:40:53 2015 +0200

    tdf#90046: RTF import: ensure that a run is started before \footnote
    
    Avoids crashing with empty context stacks.
    
    (cherry picked from commit a61fd02c819433a1206b3b3e61017ba2d0d3d467)
    Reviewed-on: https://gerrit.libreoffice.org/17333
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 7e086276cd27bac93040bfd7ff5f5dbdfc0b9f86)
    
    Conflicts:
    	writerfilter/source/rtftok/rtfdocumentimpl.cxx
    
    Change-Id: I0ee8b457fdbb19b55f5c15876b7253680cde6e23

diff --git a/sw/qa/extras/rtfimport/data/tdf90046.rtf b/sw/qa/extras/rtfimport/data/tdf90046.rtf
new file mode 100644
index 0000000..656adb5
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf90046.rtf
@@ -0,0 +1,8 @@
+{\rtf1\ansi\deflang1035
+{\fonttbl {\f0\fcharset0 Arial;} }
+
+\pard\ltrpar\uc1\lang1035
+{\super \chftn
+{\footnote {\pard\plain\super \chftn }{\plain\ltrch\f0 \fs18 \cf1 \uc0\u77 \u97 }
+}}
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 1eb7ca6..79cfcef 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2066,6 +2066,15 @@ DECLARE_RTFIMPORT_TEST(testFdo85889pca, "fdo85889-pca.rtf")
     CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange->getString());
 }
 
+DECLARE_RTFIMPORT_TEST(testTdf90046, "tdf90046.rtf")
+{
+    // this was crashing on importing the footnote
+    uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xFootnotes(xFootnotesSupplier->getFootnotes(), uno::UNO_QUERY);
+    uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(OUString("Ma"), xTextRange->getString());
+}
+
 DECLARE_RTFIMPORT_TEST(testFdo85889mac, "fdo85889-mac.rtf")
 {
     uno::Reference<text::XTextRange> xTextRange = getRun(getParagraph(1), 1);
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index be1eae9..0ba1af8 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1657,6 +1657,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
         }
         break;
     case RTF_FOOTNOTE:
+        checkFirstRun();
         if (!m_pSuperstream)
         {
             Id nId = NS_ooxml::LN_footnote;
commit 3775e7ae5d36e85a9cee17e519925084fc327815
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 16 16:16:40 2015 +0100

    coverity#1311944 Logically dead code
    
    for the record its a SwFormatChg we get here at the crash time
    
    regression from
    
    commit 7de992bcc66c973bb6b247184cac38f01cd1104a
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Mon Jul 13 12:38:18 2015 +0100
    
        fix a11y crash seen on close of tdf#92573
    
        its not the reported crash, which has "gone away" which might
        be a duplicate of tdf#90502
    
        the switch only handled RES_TITLE_CHANGED and RES_DESCRIPTION_CHANGED so if its
        anything else, e.g. OBJ_DYING, then don't attempt GetNoTextNode
    
    Change-Id: I290d6e633811423c3acc198aba7a60943518ec4a
    (cherry picked from commit 34c0b8869784cb44a516c97213ef24566a4ed111)
    Reviewed-on: https://gerrit.libreoffice.org/17138
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit a9354ec39705da856ed46b3837bbff8a34317fe3)

diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index f24eb0e..a72bb88 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -102,7 +102,7 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
             return; // probably was deleted - avoid doing anything
     }
 
-    if (nWhich != RES_TITLE_CHANGED || nWhich != RES_DESCRIPTION_CHANGED)
+    if (nWhich != RES_TITLE_CHANGED && nWhich != RES_DESCRIPTION_CHANGED)
         return;
 
     const SwNoTxtNode *pNd = GetNoTxtNode();
commit 4939ae4c11ff79ae89320af97494edd919118db7
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jul 20 11:46:17 2015 +0200

    check annotation caption pointers, blind fix for rhbz#1242099
    
    Apparently there may have been situations when the caption or its shape
    could not be obtained for whatever reason.
    
    (cherry picked from commit 47d90af52a548429224c38b5c58a70116e0f7907)
    
    Conflicts:
    	sc/source/filter/xml/xmlexprt.cxx
    
    Change-Id: Ie9b97d4b3999cb4645bb6b8b688b3666cfd71ccc
    Reviewed-on: https://gerrit.libreoffice.org/17222
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 27f3821c44b7d326c116183fb063c9254d55ccc8)

diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 2c67fcb..06f8356 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3720,9 +3720,12 @@ void ScXMLExport::WriteAnnotation(ScMyCell& rMyCell)
         pCurrentCell = &rMyCell;
 
         SdrCaptionObj* pNoteCaption = pNote->GetOrCreateCaption(rMyCell.maCellAddress);
-        Reference<drawing::XShape> xShape( pNoteCaption->getUnoShape(), uno::UNO_QUERY );
-
-        GetShapeExport()->exportShape(xShape, SEF_DEFAULT|SEF_EXPORT_ANNOTATION, NULL);
+        if (pNoteCaption)
+        {
+            Reference<drawing::XShape> xShape( pNoteCaption->getUnoShape(), uno::UNO_QUERY );
+            if (xShape.is())
+                GetShapeExport()->exportShape(xShape, SEF_DEFAULT|SEF_EXPORT_ANNOTATION, NULL);
+        }
 
         pCurrentCell = NULL;
 
commit c6630d19660c9f4bb095629bf13ee9f2b6b41ae4
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Jul 17 18:14:27 2015 +0200

    Resolves: tdf#92767 use ISO 8601 for internal date string representation
    
    Change-Id: I481bf3295feb64827de2122234a9300d0b8ced40
    (cherry picked from commit 3e17ed1fc2845da5a279d21ffa3ea51d637e515e)
    Reviewed-on: https://gerrit.libreoffice.org/17173
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    (cherry picked from commit 8bd758740c8d5e2da3125c6eb05fdd2bd07faf8b)

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 90f9b65..3f0ebd4 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1965,6 +1965,10 @@ class FilterEntriesHandler
             fVal = rtl::math::approxFloor(fVal);
             mbHasDates = true;
             bDate = true;
+            // Convert string representation to ISO 8601 date to eliminate
+            // locale dependent behaviour later when filtering for dates.
+            sal_uInt32 nIndex = pFormatter->GetFormatIndex( NF_DATE_DIN_YYYYMMDD);
+            pFormatter->GetInputLineString( fVal, nIndex, aStr);
         }
         // maybe extend ScTypedStrData enum is also an option here
         mrStrings.push_back(ScTypedStrData(aStr, fVal, ScTypedStrData::Value,bDate));
commit d2a787d635df81290f0bae4c16ba61978af2bb82
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 15 10:09:16 2015 +0100

    Resolves: tdf#63955 clip 19km long line to some sane limit
    
    Change-Id: If9757a5fa2bb93b56b9cf9f566972f687a4a3a45
    Reviewed-on: https://gerrit.libreoffice.org/17036
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit d1046e7c3f66e5f3384ee1ef534ef28346702fc6)
    
    refactor ensuring polygon has at least a line in it
    
    just split that out into a standalone function, no logic
    change
    
    Change-Id: I061d5d716b3fc2a9fb6385e7fb249ce300752130
    (cherry picked from commit 83b3349bb94d4c48db4da8fe5f8fdb9b19e633b9)
    Reviewed-on: https://gerrit.libreoffice.org/17074
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    (cherry picked from commit f9f5f2279ab96c824e347275b5d22b6564ca4a63)

diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index c95a47b..d8bea70 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -20,13 +20,14 @@
 
 #include <sdr/contact/viewcontactofsdrpathobj.hxx>
 #include <svx/svdopath.hxx>
+#include <svx/svdpage.hxx>
 #include <svx/sdr/primitive2d/sdrattributecreator.hxx>
 #include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <basegfx/polygon/b2dpolygonclipper.hxx>
 #include <sdr/primitive2d/sdrpathprimitive2d.hxx>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 
 
-
 namespace sdr
 {
     namespace contact
@@ -40,26 +41,14 @@ namespace sdr
         {
         }
 
-        drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrPathObj::createViewIndependentPrimitive2DSequence() const
+        static sal_uInt32 ensureGeometry(basegfx::B2DPolyPolygon& rUnitPolyPolygon)
         {
-            const SfxItemSet& rItemSet = GetPathObj().GetMergedItemSet();
-            const drawinglayer::attribute::SdrLineFillShadowTextAttribute aAttribute(
-                drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute(
-                    rItemSet,
-                    GetPathObj().getText(0),
-                    false));
-            basegfx::B2DPolyPolygon aUnitPolyPolygon(GetPathObj().GetPathPoly());
-            Point aGridOff = GetPathObj().GetGridOffset();
-            // Hack for calc, transform position of object according
-            // to current zoom so as objects relative position to grid
-            // appears stable
-            aUnitPolyPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) );
-            sal_uInt32 nPolyCount(aUnitPolyPolygon.count());
+            sal_uInt32 nPolyCount(rUnitPolyPolygon.count());
             sal_uInt32 nPointCount(0);
 
             for(sal_uInt32 a(0); a < nPolyCount; a++)
             {
-                nPointCount += aUnitPolyPolygon.getB2DPolygon(a).count();
+                nPointCount += rUnitPolyPolygon.getB2DPolygon(a).count();
             }
 
             if(!nPointCount)
@@ -68,20 +57,66 @@ namespace sdr
                 basegfx::B2DPolygon aFallbackLine;
                 aFallbackLine.append(basegfx::B2DPoint(0.0, 0.0));
                 aFallbackLine.append(basegfx::B2DPoint(1000.0, 1000.0));
-                aUnitPolyPolygon = basegfx::B2DPolyPolygon(aFallbackLine);
+                rUnitPolyPolygon = basegfx::B2DPolyPolygon(aFallbackLine);
 
                 nPolyCount = 1;
             }
 
+            return nPolyCount;
+        }
+
+        drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrPathObj::createViewIndependentPrimitive2DSequence() const
+        {
+            const SfxItemSet& rItemSet = GetPathObj().GetMergedItemSet();
+            const drawinglayer::attribute::SdrLineFillShadowTextAttribute aAttribute(
+                drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute(
+                    rItemSet,
+                    GetPathObj().getText(0),
+                    false));
+            basegfx::B2DPolyPolygon aUnitPolyPolygon(GetPathObj().GetPathPoly());
+            Point aGridOff = GetPathObj().GetGridOffset();
+            // Hack for calc, transform position of object according
+            // to current zoom so as objects relative position to grid
+            // appears stable
+            aUnitPolyPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) );
+            sal_uInt32 nPolyCount(ensureGeometry(aUnitPolyPolygon));
+
             // prepare object transformation and unit polygon (direct model data)
             basegfx::B2DHomMatrix aObjectMatrix;
-            const bool bIsLine(
+            bool bIsLine(
                 !aUnitPolyPolygon.areControlPointsUsed()
                 && 1 == nPolyCount
                 && 2 == aUnitPolyPolygon.getB2DPolygon(0).count());
 
             if(bIsLine)
             {
+                const SdrPage* pPage = GetPathObj().GetPage();
+                if (pPage)
+                {
+                    //tdf#63955 if we have an extremely long line then clip it
+                    //to a very generous range of -1 page width/height vs +1
+                    //page width/height to avoid oom and massive churn
+                    //generating a huge polygon chain to cover the length in
+                    //applyLineDashing if this line is dashed
+                    double fPageWidth = pPage->GetWdt();
+                    double fPageHeight = pPage->GetHgt();
+                    basegfx::B2DRange aClipRange(-fPageWidth, -fPageHeight,
+                                                 fPageWidth*2, fPageHeight*2);
+                    aUnitPolyPolygon = basegfx::tools::clipPolyPolygonOnRange(aUnitPolyPolygon,
+                                                                       aClipRange, true, true);
+                    nPolyCount = ensureGeometry(aUnitPolyPolygon);
+
+                    // re-check that we have't been clipped out to oblivion
+                    bIsLine =
+                        !aUnitPolyPolygon.areControlPointsUsed()
+                        && 1 == nPolyCount
+                        && 2 == aUnitPolyPolygon.getB2DPolygon(0).count();
+                }
+            }
+
+            if(bIsLine)
+            {
+
                 // special handling for single line mode (2 points)
                 const basegfx::B2DPolygon aSubPolygon(aUnitPolyPolygon.getB2DPolygon(0));
                 const basegfx::B2DPoint aStart(aSubPolygon.getB2DPoint(0));
commit 23fcbb8211be2310eabcf486fa8d38cb60f9e634
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 13 12:38:18 2015 +0100

    fix a11y crash seen on close of tdf#92573
    
    its not the reported crash, which has "gone away" which might
    be a duplicate of tdf#90502
    
    the switch only handled RES_TITLE_CHANGED and RES_DESCRIPTION_CHANGED so if its
    anything else, e.g. OBJ_DYING, then don't attempt GetNoTextNode
    
    (cherry picked from commit 7de992bcc66c973bb6b247184cac38f01cd1104a)
    
    Change-Id: I642beb66613481cbc7ee18647f0204a67d670a84
    Reviewed-on: https://gerrit.libreoffice.org/16991
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    (cherry picked from commit b3780aab0736776866fc4d6c9453871e30557d01)

diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index c88eef7..f24eb0e 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -102,6 +102,9 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
             return; // probably was deleted - avoid doing anything
     }
 
+    if (nWhich != RES_TITLE_CHANGED || nWhich != RES_DESCRIPTION_CHANGED)
+        return;
+
     const SwNoTxtNode *pNd = GetNoTxtNode();
     OSL_ENSURE( pNd == aDepend.GetRegisteredIn(), "invalid frame" );
     switch( nWhich )
commit 28a3531b7bf5ecf232c76f0a5cce86599b87c33e
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Wed Jul 15 23:23:48 2015 +0200

    tdf#47832: Pictures on buttons, created in forms, gone after reopening form
    
    When image is set to a Button control the correspoding graphic object
    lives only temporarily, after the graphic is copied from the graphic
    object it's destroyed so save can't find it by graphic ID.
    Use the same solution which works for ImageControls: use a graphic object
    member for the control, so save can find it.
    
    (cherry picked from commit 70f152983f3425a77df2f65b4798417640d47b76)
    
    fix windows build (from Noel Grandin)
    
    (cherry picked from commit 4c5498ec5ee478e27fd62bdcf9de1208c692422c)
    
    Conflicts:
    	forms/source/component/clickableimage.cxx
    
    Reviewed-on: https://gerrit.libreoffice.org/17092
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    (cherry picked from commit c22ac6d4a2d8b9e8875060c4468acb69eb35521d)
    
    Conflicts:
    	forms/source/component/clickableimage.hxx
    
    Change-Id: If99a3efc4727a07df9d2daaefbdacc9565920005

diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index a99066c..f65ad3d 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -31,6 +31,8 @@
 #include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/awt/ActionEvent.hpp>
 #include <com/sun/star/awt/XActionListener.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/graphic/GraphicObject.hpp>
 #include <tools/urlobj.hxx>
 #include <tools/debug.hxx>
 #include <vcl/svapp.hxx>
@@ -62,6 +64,7 @@ namespace frm
     using namespace ::com::sun::star::util;
     using namespace ::com::sun::star::frame;
     using namespace ::com::sun::star::form::submission;
+    using namespace ::com::sun::star::graphic;
     using ::com::sun::star::awt::MouseEvent;
     using ::com::sun::star::task::XInteractionHandler;
 
@@ -452,6 +455,7 @@ namespace frm
             const OUString& rDefault )
         :OControlModel( _rxFactory, _rUnoControlModelTypeName, rDefault )
         ,OPropertyChangeListener(m_aMutex)
+        ,m_xGraphicObject()
         ,m_pMedium(NULL)
         ,m_pProducer( NULL )
         ,m_bDispatchUrlInternal(false)
@@ -466,6 +470,7 @@ namespace frm
     OClickableImageBaseModel::OClickableImageBaseModel( const OClickableImageBaseModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
         :OControlModel( _pOriginal, _rxFactory )
         ,OPropertyChangeListener( m_aMutex )
+        ,m_xGraphicObject( _pOriginal->m_xGraphicObject )
         ,m_pMedium( NULL )
         ,m_pProducer( NULL )
         ,m_bDispatchUrlInternal(false)
@@ -498,6 +503,7 @@ namespace frm
     void OClickableImageBaseModel::implConstruct()
     {
         m_pProducer = new ImageProducer;
+        m_pProducer->SetDoneHdl( LINK( this, OClickableImageBaseModel, OnImageImportDone ) );
         increment( m_refCount );
         {
             m_xProducer = m_pProducer;
@@ -857,6 +863,21 @@ namespace frm
         }
     }
 
+    IMPL_LINK( OClickableImageBaseModel, OnImageImportDone, Graphic*, i_pGraphic )
+    {
+        const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? Graphic(i_pGraphic->GetBitmapEx()).GetXGraphic() : NULL );
+        if ( !xGraphic.is() )
+        {
+            m_xGraphicObject.clear();
+        }
+        else
+        {
+            m_xGraphicObject = css::graphic::GraphicObject::create( m_xContext );
+            m_xGraphicObject->setGraphic( xGraphic );
+        }
+        return 1L;
+    }
+
 
     // OImageProducerThread_Impl
 
diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx
index ef96764..9861cfa 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -33,6 +33,7 @@
 #include <com/sun/star/form/submission/XSubmission.hpp>
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#include <com/sun/star/graphic/XGraphicObject.hpp>
 #include <cppuhelper/implbase3.hxx>
 
 
@@ -64,6 +65,8 @@ namespace frm
 
         // ImageProducer stuff
         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer>    m_xProducer;
+        // Store the image in a graphic object to make it accesible via graphic cache using graphic ID.
+        ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > m_xGraphicObject;
         SfxMedium*                              m_pMedium;          // Download-Medium
         ImageProducer*                          m_pProducer;
         bool                                m_bDispatchUrlInternal; // property: is not allowed to set : 1
@@ -143,6 +146,8 @@ namespace frm
 
         // to be called from within the cloning-ctor of your derived class
         void implInitializeImageURL( );
+
+        DECL_LINK( OnImageImportDone, ::Graphic* );
     };
 
 
commit c08248f12e3939051a0b2c153cc8d9a35a8806bf
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Jul 4 16:20:32 2015 +0200

    tdf#92404: Web Wizard - no result / crash
    
    Fixes
    Traceback (most recent call last):
      File "/home/laci/m/bibisect/lo-linux-dbgutil-daily/opt/program/wizards/web/WWD_Events.py", line 249, in addDocument
        oLoadDocs = self.LoadDocs(self.xMSF, self.xUnoDialog, files, self)
    TypeError: __init__() missing 1 required positional argument: 'parent_'
    
    and:
    Traceback (most recent call last):
      File "/home/julien/compile-libreoffice/libreoffice/instdir/program/wizards/web/WWD_Events.py", line 252, in addDocument
        oLoadDocs.loadDocuments()
      File "/home/julien/compile-libreoffice/libreoffice/instdir/program/wizards/web/WWD_Events.py", line 934, in loadDocuments
        doc.cp_URL = FileAccess.connectURLs(files[0], self.files[i])
    NameError: global name 'files' is not defined
    
    Change-Id: I737117a6981e541f12453bb9d9b2680f5fb79142
    Reviewed-on: https://gerrit.libreoffice.org/16756
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 2f0d1a23759c1b973593bfba642d01fb3df3c269)
    Reviewed-on: https://gerrit.libreoffice.org/17035
    (cherry picked from commit 903295a5a0445b45f3866b691e58be522354ec05)

diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py b/wizards/com/sun/star/wizards/web/WWD_Events.py
index 72b393e..4f2208c 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.py
@@ -246,7 +246,7 @@ class WWD_Events(WWD_Startup):
                 sd = self.getStatusDialog()
                 sd.setLabel(self.resources.resValidatingDocuments)
                 sd.execute(self, task, self.resources.prodName)
-                oLoadDocs = self.LoadDocs(self.xMSF, self.xUnoDialog, files, self)
+                oLoadDocs = self.LoadDocs(self.xMSF, self.xUnoDialog, files, task, self)
                 oLoadDocs.loadDocuments()
                 task.removeTaskListener(sd)
             else:
@@ -926,7 +926,7 @@ class WWD_Events(WWD_Startup):
                 if start == 0:
                     doc.cp_URL = self.files[i]
                 else:
-                    doc.cp_URL = FileAccess.connectURLs(files[0], self.files[i])
+                    doc.cp_URL = FileAccess.connectURLs(self.files[0], self.files[i])
 
                 '''
                 so - i check each document and if it is ok I add it.
commit a2b2fb3b28ef574aa6b476ece412e4a608d6cdd7
Author: Winfried Donkers <winfrieddonkers at libreoffice.org>
Date:   Thu Jun 25 17:26:20 2015 +0200

    tdf#89031 remove agressiveness from Calc function suggestions
    
    Change-Id: I7751a038f8482addc0e45c0461666bbd1c959d12
    Reviewed-on: https://gerrit.libreoffice.org/16478
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit f3d748937a177cbbc0033bcf54d0d0fd57a1b409)
    Reviewed-on: https://gerrit.libreoffice.org/17009
    Reviewed-on: https://gerrit.libreoffice.org/17013
    (cherry picked from commit b0adce1f6a0e45cfa6fa7f827144d3aebcd5aac8)

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 75a723a..375659a 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -801,8 +801,7 @@ void ScInputHandler::HideTipBelow()
     aManualTip = OUString();
 }
 
-void ScInputHandler::ShowArgumentsTip( const OUString& rParagraph, OUString& rSelText, const ESelection& rSel,
-        bool bTryFirstSel )
+void ScInputHandler::ShowArgumentsTip( OUString& rSelText )
 {
     ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
     const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
@@ -929,34 +928,6 @@ void ScInputHandler::ShowArgumentsTip( const OUString& rParagraph, OUString& rSe
                 }
             }
         }
-        else if (bTryFirstSel)
-        {
-            sal_Int32 nPosition = 0;
-            OUString aText = pEngine->GetWord( 0, rSel.nEndPos-1 );
-            /* XXX: dubious, what is this condition supposed to exactly match? */
-            if (rSel.nEndPos <= aText.getLength() && aText[ rSel.nEndPos-1 ] == '=')
-            {
-                break;
-            }
-            OUString aNew;
-            nPosition = aText.getLength()+1;
-            ScTypedCaseStrSet::const_iterator it =
-                findText(*pFormulaDataPara, pFormulaDataPara->end(), aText, aNew, false);
-            if (it != pFormulaDataPara->end())
-            {
-                if( nPosition < rParagraph.getLength() && rParagraph[ nPosition ] =='(' )
-                {
-                    ShowTipBelow( aNew );
-                    bFound = true;
-                }
-                else
-                    break;
-            }
-            else
-            {
-                break;
-            }
-        }
         else
         {
             break;
@@ -983,7 +954,7 @@ void ScInputHandler::ShowTipCursor()
         {
             OUString aSelText( aParagraph.copy( 0, aSel.nEndPos ));
 
-            ShowArgumentsTip( aParagraph, aSelText, aSel, true);
+            ShowArgumentsTip( aSelText );
         }
     }
 }
@@ -1079,6 +1050,12 @@ void ScInputHandler::UseFormulaData()
         if ( aSel.nEndPos > aParagraph.getLength() )
             return;
 
+        if ( aParagraph.getLength() > aSel.nEndPos &&
+             ( ScGlobal::pCharClass->isLetterNumeric( aParagraph, aSel.nEndPos ) ||
+               aParagraph[ aSel.nEndPos ] == '_' ||
+               aParagraph[ aSel.nEndPos ] == '.'   ) )
+            return;
+
         //  Is the cursor at the end of a word?
         if ( aSel.nEndPos > 0 )
         {
@@ -1094,6 +1071,16 @@ void ScInputHandler::UseFormulaData()
                 miAutoPosFormula = findText(*pFormulaData, miAutoPosFormula, aText, aNew, false);
                 if (miAutoPosFormula != pFormulaData->end())
                 {
+                    // check if partial function name is not Between quotes
+                    bool bBetweenQuotes = false;
+                    for ( int n = 0; n < aSelText.getLength(); n++ )
+                    {
+                        if ( aSelText[ n ] == '"' )
+                            bBetweenQuotes = !bBetweenQuotes;
+                    }
+                    if ( bBetweenQuotes )
+                        return;  // we're between quotes
+
                     if (aNew[aNew.getLength()-1] == cParenthesesReplacement)

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list