[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 17 commits - chart2/source filter/source include/sfx2 include/svx include/vcl sc/source sd/inc sd/qa sd/source setup_native/source sfx2/source slideshow/source svx/source sw/source vcl/quartz vcl/source vcl/unx xmlsecurity/qa xmlsecurity/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Dec 10 12:20:56 UTC 2018


 chart2/source/view/axes/DateHelper.cxx                            |    3 
 chart2/source/view/charttypes/AreaChart.cxx                       |    5 
 chart2/source/view/charttypes/VSeriesPlotter.cxx                  |    7 
 filter/source/msfilter/svdfppt.cxx                                |    5 
 include/sfx2/signaturestate.hxx                                   |    4 
 include/sfx2/strings.hrc                                          |    1 
 include/svx/unoshprp.hxx                                          |    2 
 include/vcl/dialog.hxx                                            |    1 
 sc/source/filter/oox/sheetdatacontext.cxx                         |    2 
 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx       |    2 
 sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx |    4 
 sc/source/ui/inc/TableFillingAndNavigationTools.hxx               |    2 
 sd/inc/sdfilter.hxx                                               |    5 
 sd/qa/unit/data/tdf120527.jpg                                     |binary
 sd/qa/unit/misc-tests.cxx                                         |   44 +++
 sd/source/filter/cgm/sdcgmfilter.cxx                              |    7 
 sd/source/filter/sdfilter.cxx                                     |   37 ++
 sd/source/filter/sdpptwrp.cxx                                     |  126 ++++------
 sd/source/ui/app/sddll.cxx                                        |    3 
 setup_native/source/win32/customactions/inst_msu/inst_msu.cxx     |   66 +++--
 sfx2/source/doc/objserv.cxx                                       |    8 
 slideshow/source/engine/animationnodes/animationcommandnode.cxx   |   24 +
 slideshow/source/engine/animationnodes/animationcommandnode.hxx   |    2 
 svx/source/unodraw/unoshap2.cxx                                   |   14 +
 sw/source/uibase/shells/textsh1.cxx                               |    1 
 vcl/quartz/salvd.cxx                                              |    9 
 vcl/source/window/dialog.cxx                                      |   37 ++
 vcl/source/window/layout.cxx                                      |    2 
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx                        |    6 
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx                         |   12 
 xmlsecurity/qa/unit/signing/signing.cxx                           |    5 
 xmlsecurity/source/xmlsec/xmlstreamio.cxx                         |    6 
 32 files changed, 332 insertions(+), 120 deletions(-)

New commits:
commit 026b57f73f5d322f2616fb8def6fdee46000486c
Merge: e4afe6fc5a26 323d12f278d3
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Mon Dec 10 12:26:50 2018 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Dec 10 12:26:50 2018 +0100

    Merge branch 'libreoffice-6-1' into distro/lhm/libreoffice-6-1+backports
    
    Change-Id: I29c8c7cfbc86a2a4273c15f47de8a741f70cc9b3

commit 323d12f278d3b0a51c7c2b8d3a362a27a6a232d3
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Nov 26 21:14:39 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Dec 9 22:15:24 2018 +0100

    tdf#120527 svx GraphicObjectShape: handle XBitmap for GraphicURL
    
    This restores compatibility for API users who called getByName() on the
    bitmap table and expected that the result can be set as a value for the
    GraphicURL property.
    
    The case is similar to the Writer images, which was handled in commit
    587803ba46055d43b5b108be744fdde17aeabc7c (sw TextGraphicObject: handle
    XBitmap for GraphicURL, 2018-08-08) already.
    
    (cherry picked from commit e30f3e76a9350e2b027d99bba5a46aa0a0ff8256)
    
    Conflicts:
            sd/qa/unit/misc-tests.cxx
    
    Change-Id: I3740a68989b306425d0d6c4d4e350ac163cb4170
    Reviewed-on: https://gerrit.libreoffice.org/64643
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 6341c37f3dc6..a09f242506a9 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -431,7 +431,7 @@
     { OUString(UNO_NAME_GRAPHOBJ_GRAFSTREAMURL),        OWN_ATTR_GRAFSTREAMURL      , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, \
     { OUString(UNO_NAME_GRAPHOBJ_FILLBITMAP),           OWN_ATTR_VALUE_FILLBITMAP   , cppu::UnoType<css::awt::XBitmap>::get()  ,    0,     0},    \
     { OUString(UNO_NAME_GRAPHOBJ_GRAPHIC),              OWN_ATTR_VALUE_GRAPHIC      , cppu::UnoType<css::graphic::XGraphic>::get()  ,   0,     0}, \
-    { OUString(UNO_NAME_GRAPHOBJ_GRAPHIC_URL),          OWN_ATTR_GRAPHIC_URL        , cppu::UnoType<OUString>::get(), 0, 0 }, \
+    { OUString(UNO_NAME_GRAPHOBJ_GRAPHIC_URL),          OWN_ATTR_GRAPHIC_URL        , cppu::UnoType<css::uno::Any>::get(), 0, 0 }, \
     { OUString(UNO_NAME_GRAPHOBJ_IS_SIGNATURELINE),     OWN_ATTR_IS_SIGNATURELINE   , cppu::UnoType<bool>::get(), 0, 0}, \
     { OUString(UNO_NAME_GRAPHOBJ_SIGNATURELINE_ID),     OWN_ATTR_SIGNATURELINE_ID   , cppu::UnoType<OUString>::get(), 0, 0}, \
     { OUString(UNO_NAME_GRAPHOBJ_SIGNATURELINE_SUGGESTED_SIGNER_NAME), OWN_ATTR_SIGNATURELINE_SUGGESTED_SIGNER_NAME, cppu::UnoType<OUString>::get(), 0, 0}, \
diff --git a/sd/qa/unit/data/tdf120527.jpg b/sd/qa/unit/data/tdf120527.jpg
new file mode 100644
index 000000000000..12b393569efb
Binary files /dev/null and b/sd/qa/unit/data/tdf120527.jpg differ
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index ace77cdcc96e..445129b4ece7 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -62,6 +62,7 @@ public:
     void testFillGradient();
     void testTdf44774();
     void testTdf38225();
+    void testTdf120527();
 
     CPPUNIT_TEST_SUITE(SdMiscTest);
     CPPUNIT_TEST(testTdf96206);
@@ -71,6 +72,7 @@ public:
     CPPUNIT_TEST(testFillGradient);
     CPPUNIT_TEST(testTdf44774);
     CPPUNIT_TEST(testTdf38225);
+    CPPUNIT_TEST(testTdf120527);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -361,6 +363,48 @@ void SdMiscTest::testTdf38225()
     CPPUNIT_ASSERT(pStyle);
 }
 
+void SdMiscTest::testTdf120527()
+{
+    sd::DrawDocShellRef xDocShRef
+        = new sd::DrawDocShell(SfxObjectCreateMode::EMBEDDED, false, DocumentType::Draw);
+    uno::Reference<frame::XLoadable> xLoadable(xDocShRef->GetModel(), uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xLoadable.is());
+    xLoadable->initNew();
+
+    // Load a bitmap into the bitmap table.
+    uno::Reference<lang::XMultiServiceFactory> xFactory(xDocShRef->GetModel(), uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xFactory.is());
+    uno::Reference<container::XNameContainer> xBitmaps(
+        xFactory->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xBitmaps.is());
+    OUString aGraphicURL = m_directories.getURLFromSrc("/sd/qa/unit/data/tdf120527.jpg");
+    xBitmaps->insertByName("test", uno::makeAny(aGraphicURL));
+
+    // Create a graphic.
+    uno::Reference<drawing::XShape> xShape(
+        xFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xShape.is());
+    uno::Reference<beans::XPropertySet> xShapeProperySet(xShape, uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xShapeProperySet.is());
+    xShapeProperySet->setPropertyValue("GraphicURL", xBitmaps->getByName("test"));
+
+    // Insert it.
+    uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(xDocShRef->GetModel(),
+                                                                   uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xDrawPagesSupplier.is());
+    uno::Reference<drawing::XDrawPages> xDrawPages = xDrawPagesSupplier->getDrawPages();
+    CPPUNIT_ASSERT(xDrawPages.is());
+    uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPages->getByIndex(0), uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xDrawPage.is());
+    // This failed with a lang.IllegalArgumentException.
+    xDrawPage->add(xShape);
+
+    // Verify that the graphic was actually consumed.
+    uno::Reference<graphic::XGraphic> xGraphic;
+    xShapeProperySet->getPropertyValue("Graphic") >>= xGraphic;
+    CPPUNIT_ASSERT(xGraphic.is());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdMiscTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 6214ef5b360d..ccd37a7250ce 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1367,6 +1367,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
     case OWN_ATTR_GRAPHIC_URL:
     {
         OUString aURL;
+        uno::Reference<awt::XBitmap> xBitmap;
         if (rValue >>= aURL)
         {
             Graphic aGraphic = vcl::graphic::loadFromURL(aURL);
@@ -1376,6 +1377,19 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
                 bOk = true;
             }
         }
+        else if (rValue >>= xBitmap)
+        {
+            uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
+            if (xGraphic.is())
+            {
+                Graphic aGraphic = xGraphic;
+                if (aGraphic)
+                {
+                    static_cast<SdrGrafObj*>(GetSdrObject())->SetGraphic(aGraphic);
+                    bOk = true;
+                }
+            }
+        }
         break;
     }
 
commit ca0cd6985adc7b321b9bc4affe79c4f26eab1722
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Dec 3 21:08:49 2018 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Dec 9 22:14:48 2018 +0100

    Resolves: tdf#120977 intended default button overridden
    
    for those cases where the built-in buttons are not
    inserted
    
    Change-Id: Ibb091832c097a15dc22a7994d94f8db6a4e47520
    Reviewed-on: https://gerrit.libreoffice.org/64492
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 043c2f39bfd5f70885dede547cb3c3b78ed8c5b9)
    Reviewed-on: https://gerrit.libreoffice.org/64619

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 8c952c9b668a..e9a257378d34 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -180,6 +180,7 @@ public:
 
     void            add_button(PushButton* pButton, int nResponse, bool bTransferOwnership);
     void            set_default_response(int nResponse);
+    int             get_default_response();
     vcl::Window*    get_widget_for_response(int nResponse);
 };
 
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index b20ac608762a..285b7c21da15 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1423,6 +1423,43 @@ vcl::Window* Dialog::get_widget_for_response(int response)
     return nullptr;
 }
 
+int Dialog::get_default_response()
+{
+    //copy explicit responses
+    std::map<VclPtr<vcl::Window>, short> aResponses(mpDialogImpl->maResponses);
+
+    //add implicit responses
+    for (vcl::Window* pChild = mpActionArea->GetWindow(GetWindowType::FirstChild); pChild;
+         pChild = pChild->GetWindow(GetWindowType::Next))
+    {
+        if (aResponses.find(pChild) != aResponses.end())
+            continue;
+        switch (pChild->GetType())
+        {
+            case WindowType::OKBUTTON:
+                aResponses[pChild] = RET_OK;
+                break;
+            case WindowType::CANCELBUTTON:
+                aResponses[pChild] = RET_CANCEL;
+                break;
+            case WindowType::HELPBUTTON:
+                aResponses[pChild] = RET_HELP;
+                break;
+            default:
+                break;
+        }
+    }
+
+    for (auto& a : aResponses)
+    {
+        if (a.first->GetStyle() & WB_DEFBUTTON)
+        {
+            return a.second;
+        }
+    }
+    return RET_CANCEL;
+}
+
 void Dialog::set_default_response(int response)
 {
     //copy explicit responses
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 7ee56d5158ab..516155f79ebd 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2231,7 +2231,7 @@ void MessageDialog::create_message_area()
         assert(pButtonBox);
 
         VclPtr<PushButton> pBtn;
-        short nDefaultResponse = RET_CANCEL;
+        short nDefaultResponse = get_default_response();
         switch (m_eButtonsType)
         {
             case VclButtonsType::NONE:
commit 975a1934994ab1e7e5f2ac890f00159c73546a61
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Dec 4 17:48:47 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Dec 9 22:14:31 2018 +0100

    tdf#118373 xmlsecurity: avoid stderr output on libxmlsec version check
    
    Make sure that our normal SAL_WARN() reporting is registered during the
    xmlSecCheckVersionExt() invocation, just like it's registered during
    other libxmlsec API calls.
    
    (cherry picked from commit 099ab643f60efc5be6f151bff89651efd2da1fc9)
    
    Change-Id: Ia19368b55dbae47974f48954f86b50e36d1462ff
    Reviewed-on: https://gerrit.libreoffice.org/64626
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
index 910944e11611..6edd946da4fa 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
@@ -22,8 +22,10 @@
  * Implementation of the I/O interfaces based on stream and URI binding
  */
 #include <xmlsec/xmlstreamio.hxx>
+#include <xmlsec/errorcallback.hxx>
 #include <rtl/ustring.hxx>
 #include <rtl/uri.hxx>
+#include <comphelper/scopeguard.hxx>
 
 #include <libxml/uri.h>
 #include <xmlsec-wrapper.h>
@@ -157,6 +159,10 @@ XSECXMLSEC_DLLPUBLIC int xmlEnableStreamInputCallbacks()
         //Notes: all none default callbacks will lose.
         xmlSecIOCleanupCallbacks() ;
 
+        // Make sure that errors are reported via SAL_WARN().
+        setErrorRecorder();
+        comphelper::ScopeGuard g([] { clearErrorRecorder(); });
+
         // Newer xmlsec wants the callback order in the opposite direction.
         if (xmlSecCheckVersionExt(1, 2, 26, xmlSecCheckVersionABICompatible))
         {
commit 8b550ff4c320e3c3e1495b4a38858c23c420dc86
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 4 16:42:10 2018 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Dec 9 22:13:46 2018 +0100

    tdf#121830, tdf#121942 TogglePause should reset to original...
    
    state on deactivate_st ?
    
    is that how it should work, or should there be an additional TogglePause
    created at import time to get the apparent intended pause effect
    
    Reviewed-on: https://gerrit.libreoffice.org/64548
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 1aa10fcb668f67f4313b7170a4090027e52164c5)
    
    Change-Id: I0573bd8d9534271f2b36d7ab3b8cdc20e0f985a1
    Reviewed-on: https://gerrit.libreoffice.org/64621
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
index 0c9519589ed0..1b764b1c5a4a 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
@@ -38,6 +38,7 @@ AnimationCommandNode::AnimationCommandNode( uno::Reference<animations::XAnimatio
                                              ::std::shared_ptr<BaseContainerNode> const& pParent,
                                              NodeContext const& rContext ) :
     BaseNode( xNode, pParent, rContext ),
+    mbToggled(false),
     mpShape(),
     mxCommandNode( xNode, css::uno::UNO_QUERY_THROW )
 {
@@ -80,12 +81,13 @@ void AnimationCommandNode::activate_st()
         // the command toggles the pause status on a media object
     case EffectCommands::TOGGLEPAUSE:
     {
-        if( mpShape )
+        if (mpShape)
         {
             if( mpShape->isPlaying() )
                 mpShape->pause();
             else
                 mpShape->play();
+            mbToggled = true;
         }
         break;
     }
@@ -109,6 +111,26 @@ void AnimationCommandNode::activate_st()
                    "AnimationCommandNode::deactivate" ) );
 }
 
+void AnimationCommandNode::deactivate_st( NodeState /*eDestState*/ )
+{
+    switch( mxCommandNode->getCommand() ) {
+    // the command toggles the pause status on a media object
+    case EffectCommands::TOGGLEPAUSE:
+    {
+        if (mpShape && mbToggled)
+        {
+            if( mpShape->isPlaying() )
+                mpShape->pause();
+            else
+                mpShape->play();
+            mbToggled = false;
+        }
+        break;
+    }
+
+    }
+}
+
 bool AnimationCommandNode::hasPendingAnimation() const
 {
     return mxCommandNode->getCommand() == EffectCommands::STOPAUDIO || mpShape;
diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.hxx b/slideshow/source/engine/animationnodes/animationcommandnode.hxx
index 675da7c3b0e8..1aacd1b6a071 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.hxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.hxx
@@ -46,9 +46,11 @@ protected:
 
 private:
     virtual void activate_st() override;
+    virtual void deactivate_st( NodeState eDestState ) override;
     virtual bool hasPendingAnimation() const override;
 
 private:
+    bool mbToggled;
     IExternalMediaShapeBaseSharedPtr mpShape;
     css::uno::Reference<css::animations::XCommand > mxCommandNode;
 };
commit 89d65f96128edf3055aaa5cebdaf78d893d01187
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Sat Dec 8 18:19:12 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Dec 9 22:13:25 2018 +0100

    Resolves: tdf#80583 create range list string with proper delimiter
    
    ... which is the to be used function parameter separator here. The
    current document's grammar (from which the separator is obtained
    in ScRangeList::Format() if not specified) may differ from the
    forced English grammar later when compiling the formula, and all
    formula expressions to be inserted use the language independent
    ';' semicolon function parameter separator.
    
    Change-Id: I7a3deb6d50fc57ed434ede1f00bbe8c5c1361e0f
    Reviewed-on: https://gerrit.libreoffice.org/64819
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 470a91cb041782e29664212d096bb16873ba57a0)
    Reviewed-on: https://gerrit.libreoffice.org/64824
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 66672b095831..c31fc9fb4c09 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -334,7 +334,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
 
         // Sum of Squares
         aTemplate.setTemplate("=DEVSQ(%RANGE_LIST%)");
-        aTemplate.applyRangeList("%RANGE_LIST%", aRangeList);
+        aTemplate.applyRangeList("%RANGE_LIST%", aRangeList, ';');
         output.writeFormula(aTemplate.getTemplate());
         output.nextColumn();
 
diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
index 5200e541a8f5..b774f0525789 100644
--- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
+++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
@@ -66,10 +66,10 @@ void FormulaTemplate::applyRange(const OUString& aVariable, const ScRange& aRang
     mTemplate = mTemplate.replaceAll(aVariable, aString);
 }
 
-void FormulaTemplate::applyRangeList(const OUString& aVariable, const ScRangeList& aRangeList)
+void FormulaTemplate::applyRangeList(const OUString& aVariable, const ScRangeList& aRangeList, sal_Unicode cDelimiter)
 {
     OUString aString;
-    aRangeList.Format(aString, ScRefFlags::RANGE_ABS_3D, mpDoc, mpDoc->GetAddressConvention());
+    aRangeList.Format(aString, ScRefFlags::RANGE_ABS_3D, mpDoc, mpDoc->GetAddressConvention(), cDelimiter);
     mTemplate = mTemplate.replaceAll(aVariable, aString);
 }
 
diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
index 9c00bf31e351..578d39665168 100644
--- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
+++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
@@ -46,7 +46,7 @@ public:
     void      autoReplaceUses3D(bool bUse3D) { mbUse3D = bUse3D; }
 
     void      applyRange(const OUString& aVariable, const ScRange& aRange, bool b3D = true);
-    void      applyRangeList(const OUString& aVariable, const ScRangeList& aRangeList);
+    void      applyRangeList(const OUString& aVariable, const ScRangeList& aRangeList, sal_Unicode cDelimiter );
     void      applyAddress(const OUString& aVariable, const ScAddress& aAddress, bool b3D = true);
     void      applyString(const OUString& aVariable, const OUString& aValue);
     void      applyNumber(const OUString& aVariable, sal_Int32 aValue);
commit 743164f4a42d8eae2496fbecc04344b7e1526af5
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sat Dec 8 23:35:37 2018 +0300
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Dec 9 22:13:10 2018 +0100

    tdf#121987: Don't fail installation if failed to enable WU service
    
    Since commit 1882827320ed760de82211cf690b686f8d34ff74, an attempt to
    install UCRT will be performed regardless there is an evidence that it's
    present on the system, to workaround some cases where the existing UCRT
    is broken (tdf#115405, tdf#119910).
    
    But that made other errors to emerge: on systems where users disable WU
    service using some exotic ways, installer is unable to enable the
    service, and fails. [1][2] Examples of such hard-disables are using
    `sc delete` [3] and associating WU service with a guest account. Many
    such cases are reported for Windows 10, where installation of the UCRT
    is not required.
    
    So the solution (imperfect, but possibly the best possible here) is to
    allow installer to continue in case of failure enabling the service.
    This will automatically eliminate all problems related to Win10; and
    also for cases where users are advanced enough (the majority of such
    hard-disable cases should be those), it might be enough to add a
    relevant FAQ entry.
    
    [1] https://ask.libreoffice.org/en/question/172227/cannot-install-631/
    [2] https://ask.libreoffice.org/en/question/175571/installation-failed-unknown-error-win10x64/
    [3] https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/sc-delete
    
    Change-Id: Ie85016eb6f0667f39412a3089fe1b1855cb1fc73
    Reviewed-on: https://gerrit.libreoffice.org/64825
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 53058090beede6a399e2f408f62c28a2921ff8ab)
    Reviewed-on: https://gerrit.libreoffice.org/64829
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx b/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx
index fee4e6feb58b..cc38fdbf2c9e 100644
--- a/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx
+++ b/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx
@@ -166,6 +166,16 @@ bool IsWow64Process()
 #endif
 }
 
+// An exception class to differentiate a non-fatal exception
+class nonfatal_exception : public std::exception
+{
+public:
+    nonfatal_exception(const std::exception& e)
+        : std::exception(e)
+    {
+    }
+};
+
 // Checks if Windows Update service is disabled, and if it is, enables it temporarily.
 class WUServiceEnabler
 {
@@ -195,27 +205,37 @@ public:
 private:
     static CloseServiceHandleGuard EnableWUService(MSIHANDLE hInstall)
     {
-        auto hSCM = Guard(OpenSCManagerW(nullptr, nullptr, SC_MANAGER_ALL_ACCESS));
-        if (!hSCM)
-            ThrowLastError("OpenSCManagerW");
-        WriteLog(hInstall, "Opened service control manager");
-
-        auto hService = Guard(OpenServiceW(hSCM.get(), L"wuauserv",
-                                           SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG
-                                               | SERVICE_QUERY_STATUS | SERVICE_STOP));
-        if (!hService)
-            ThrowLastError("OpenServiceW");
-        WriteLog(hInstall, "Obtained WU service handle");
-
-        if (ServiceStatus(hInstall, hService.get()) == SERVICE_RUNNING
-            || !EnsureServiceEnabled(hInstall, hService.get(), true))
+        try
         {
-            // No need to restore anything back, since we didn't change config
-            hService.reset();
-            WriteLog(hInstall, "Service configuration is unchanged");
-        }
+            auto hSCM = Guard(OpenSCManagerW(nullptr, nullptr, SC_MANAGER_ALL_ACCESS));
+            if (!hSCM)
+                ThrowLastError("OpenSCManagerW");
+            WriteLog(hInstall, "Opened service control manager");
+
+            auto hService = Guard(OpenServiceW(hSCM.get(), L"wuauserv",
+                                               SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG
+                                                   | SERVICE_QUERY_STATUS | SERVICE_STOP));
+            if (!hService)
+                ThrowLastError("OpenServiceW");
+            WriteLog(hInstall, "Obtained WU service handle");
+
+            if (ServiceStatus(hInstall, hService.get()) == SERVICE_RUNNING
+                || !EnsureServiceEnabled(hInstall, hService.get(), true))
+            {
+                // No need to restore anything back, since we didn't change config
+                hService.reset();
+                WriteLog(hInstall, "Service configuration is unchanged");
+            }
 
-        return hService;
+            return hService;
+        }
+        catch (const std::exception& e)
+        {
+            // Allow errors opening service to be logged, but not interrupt installation.
+            // They are likely to happen in situations where people hard-disable WU service,
+            // and for these cases, let people deal with install logs instead of failing.
+            throw nonfatal_exception(e);
+        }
     }
 
     // Returns if the service configuration was actually changed
@@ -476,6 +496,14 @@ extern "C" UINT __stdcall InstallMSU(MSIHANDLE hInstall)
                 ThrowWin32Error("Execution of wusa.exe", nExitCode);
         }
     }
+    catch (nonfatal_exception& e)
+    {
+        // An error that should not interrupt installation
+        WriteLog(hInstall, e.what());
+        WriteLog(hInstall, "Installation of MSU package failed, but installation of product will "
+                           "continue. You may need to install the required update manually");
+        return ERROR_SUCCESS;
+    }
     catch (std::exception& e)
     {
         WriteLog(hInstall, e.what());
commit 626ebc8d81d684d3a845ff787fbaaf416df7e427
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Tue Dec 4 14:42:31 2018 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sat Dec 8 01:04:23 2018 +0100

    tdf#121399 Join cmd reading thread in gtk3_kde5
    
    Stop reading commands from the pipe on kde5 side once
    the "Quit" command has been sent, in order to have
    the thread that is reading commands from stdin finish
    properly.
    
    Join the thread in the 'FilePickerIpc' destructor, rather than
    just deleting it while it may still be running, which
    resulted in 'terminate()' being called.
    
    Change-Id: Ia184987e7994cc1de0208ff2757a3cf06c8b7194
    Reviewed-on: https://gerrit.libreoffice.org/63835
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 93815c2b04f1905e43c695caf5cc2c594bb897ce)
    Reviewed-on: https://gerrit.libreoffice.org/64588
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
index 803e5bedd853..4d7aff80c27c 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
@@ -192,6 +192,12 @@ void readCommands(FilePickerIpc* ipc)
         readCommandArgs(command, args);
 
         emit ipc->commandReceived(messageId, command, args);
+
+        // stop processing once 'Quit' command has been sent
+        if (command == Commands::Quit)
+        {
+            return;
+        }
     }
 }
 
@@ -211,7 +217,11 @@ FilePickerIpc::FilePickerIpc(KDE5FilePicker* filePicker, QObject* parent)
     m_ipcReaderThread = std::unique_ptr<std::thread>{ new std::thread(readCommands, this) };
 }
 
-FilePickerIpc::~FilePickerIpc() = default;
+FilePickerIpc::~FilePickerIpc()
+{
+    // join thread that reads commands
+    m_ipcReaderThread->join();
+};
 
 bool FilePickerIpc::handleCommand(uint64_t messageId, Commands command, QList<QVariant> args)
 {
commit eafe89573f03ba638059bbe014fab1ed6d45d153
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Dec 5 10:14:17 2018 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Dec 6 23:19:12 2018 +0100

    Fix reading 16 bit millisecond value
    
    It had originally been read as 16 bit via >> in
    d2000efb31f864e912c6cf52760eea0e602b6893 "#i106421#: move msfilter to filter",
    then accidentally changed to be read as 32 bit via >> in
    9830fd36dbdb72c79703b0c61efc027fba793c5a "date/time IDL datatypes incompatible
    change" (and later changed to be read as 32 bit explicitly via ReadUInt32 with
    15535e32ddcfee451d4dbc9be9de0b8c9f9d78d4 "convert SvStream::operator>> methods
    to ReadXXX methods").
    
    Change-Id: I5062e67a578d182a0df2726ab8d0bae465f154f3
    Reviewed-on: https://gerrit.libreoffice.org/64604
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    Tested-by: Jenkins
    (cherry picked from commit f84f5b0a0cdb82f444de572f9d8554a96056f874)
    Reviewed-on: https://gerrit.libreoffice.org/64636

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index cc2fc42ad4a6..0f702e8f8531 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2705,6 +2705,7 @@ void ImportComment10( SvxMSDffManager const & rMan, SvStream& rStCtrl, SdrPage*
 
             case PPT_PST_CommentAtom10 :
             {
+                sal_uInt16 millisec = 0;
                 rStCtrl.ReadInt32( nIndex )
                        .ReadInt16( aDateTime.Year )
                        .ReadUInt16( aDateTime.Month )
@@ -2713,11 +2714,11 @@ void ImportComment10( SvxMSDffManager const & rMan, SvStream& rStCtrl, SdrPage*
                        .ReadUInt16( aDateTime.Hours )
                        .ReadUInt16( aDateTime.Minutes )
                        .ReadUInt16( aDateTime.Seconds )
-                       .ReadUInt32( aDateTime.NanoSeconds )
+                       .ReadUInt16( millisec )
                        .ReadInt32( nPosX )
                        .ReadInt32( nPosY );
 
-                aDateTime.NanoSeconds *= ::tools::Time::nanoPerMilli;
+                aDateTime.NanoSeconds = millisec * ::tools::Time::nanoPerMilli;
             }
             break;
         }
commit ec01cd7a2263922f2aaab6bee8aa826fb67cc7ea
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Tue Dec 4 09:24:32 2018 +0100
Commit:     Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Thu Dec 6 16:03:29 2018 +0100

    tdf#121892 Guard Gtk3KDE5FilePicker::execute with SolarMutexGuard
    
    Adhere to what gtk3's file picker does as well.
    Threading is involved in Gtk3KDE5FilePickerIpc::execute().
    
    Change-Id: I4fa0a12f46ed13ef04211cb8577e77d1db5e8eae
    Reviewed-on: https://gerrit.libreoffice.org/64502
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 8dbe0af729c9e054135a0f41706165033441f867)
    Reviewed-on: https://gerrit.libreoffice.org/64586
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
index 919328dd9d6c..8006bc37c7dc 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
@@ -94,7 +94,11 @@ void SAL_CALL Gtk3KDE5FilePicker::setTitle(const OUString& title)
     m_ipc.sendCommand(Commands::SetTitle, title);
 }
 
-sal_Int16 SAL_CALL Gtk3KDE5FilePicker::execute() { return m_ipc.execute(); }
+sal_Int16 SAL_CALL Gtk3KDE5FilePicker::execute()
+{
+    SolarMutexGuard g;
+    return m_ipc.execute();
+}
 
 void SAL_CALL Gtk3KDE5FilePicker::setMultiSelectionMode(sal_Bool multiSelect)
 {
commit 9fae95fef82bab8e0760d49ccce51a30ab705941
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Wed Nov 21 19:07:41 2018 +0000
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Dec 6 11:28:53 2018 +0100

    fix tdf#121468: preload fixes for Impress filters
    
    was: Re-factor internal filter logic, and impl. preload properly.
    
    Reviewed-on: https://gerrit.libreoffice.org/63761
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    (cherry picked from commit 7b34fb18a4d60bfc4e32b7c382ac596cbc2e776f)
    Reviewed-on: https://gerrit.libreoffice.org/63850
    
    Conflicts:
            sd/inc/sdfilter.hxx
            sd/source/ui/app/sddll.cxx
    
    Change-Id: I4c55ceb19d5db2c1e4756901d0d8b14878641a99
    Reviewed-on: https://gerrit.libreoffice.org/64616
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx
index df1421f51727..7042505c913e 100644
--- a/sd/inc/sdfilter.hxx
+++ b/sd/inc/sdfilter.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_SD_INC_SDFILTER_HXX
 
 #include <sal/types.h>
+#include <osl/module.h>
 #include <rtl/ustring.hxx>
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/task/XStatusIndicator.hpp>
@@ -44,7 +45,9 @@ public:
     virtual bool            Export() = 0;
 
 #ifndef DISABLE_DYNLOADING
-    static ::osl::Module*       OpenLibrary( const OUString& rLibraryName );
+    static void Preload();
+    /// Open library @rLibraryName and lookup symbol @rFnSymbol
+    static oslGenericFunction GetLibrarySymbol( const OUString& rLibraryName, const OUString &rFnSymbol );
 #endif
 
 protected:
diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx
index 7bd04a246b10..91a0f62b1be2 100644
--- a/sd/source/filter/cgm/sdcgmfilter.cxx
+++ b/sd/source/filter/cgm/sdcgmfilter.cxx
@@ -61,17 +61,14 @@ namespace
     class CGMPointer
     {
         ImportCGMPointer m_pPointer;
-#ifndef DISABLE_DYNLOADING
-        std::unique_ptr<osl::Module> m_xLibrary;
-#endif
     public:
         CGMPointer()
         {
 #ifdef DISABLE_DYNLOADING
             m_pPointer = ImportCGM;
 #else
-            m_xLibrary.reset(SdFilter::OpenLibrary("icg"));
-            m_pPointer = m_xLibrary ? reinterpret_cast<ImportCGMPointer>(m_xLibrary->getFunctionSymbol("ImportCGM")) : nullptr;
+            m_pPointer = reinterpret_cast<ImportCGMPointer>(
+                SdFilter::GetLibrarySymbol("icg", "ImportCGM"));
 #endif
         }
         ImportCGMPointer get() { return m_pPointer; }
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index b822baa21c5c..fbffe2cf5ed9 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -58,14 +58,41 @@ OUString SdFilter::ImplGetFullLibraryName( const OUString& rLibraryName )
 }
 
 #ifndef DISABLE_DYNLOADING
+
+typedef std::map<OUString, std::unique_ptr<osl::Module>> SdModuleMap;
+static SdModuleMap g_SdModuleMap;
+
 extern "C" { static void thisModule() {} }
 
-::osl::Module* SdFilter::OpenLibrary( const OUString& rLibraryName )
+oslGenericFunction SdFilter::GetLibrarySymbol( const OUString& rLibraryName, const OUString &rFnSymbol )
+{
+    osl::Module *pMod = nullptr;
+    auto it = g_SdModuleMap.find(rLibraryName);
+    if (it != g_SdModuleMap.end())
+        pMod = it->second.get();
+
+    if (!pMod)
+    {
+        pMod = new osl::Module;
+        if (pMod->loadRelative(&thisModule, ImplGetFullLibraryName(rLibraryName),
+                               SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY))
+            g_SdModuleMap[rLibraryName] = std::unique_ptr<osl::Module>(pMod);
+        else
+        {
+            delete pMod;
+            pMod = nullptr;
+        }
+    }
+    if (!pMod)
+        return nullptr;
+    else
+        return pMod->getFunctionSymbol(rFnSymbol);
+}
+
+void SdFilter::Preload()
 {
-    std::unique_ptr< osl::Module > mod(new osl::Module);
-    return mod->loadRelative(&thisModule, ImplGetFullLibraryName(rLibraryName),
-                             SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY)
-        ? mod.release() : nullptr;
+    (void)GetLibrarySymbol("sdfilt", "ImportPPT");
+    (void)GetLibrarySymbol("icg", "ImportCGM");
 }
 
 #endif
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index df3f4da8d010..0eaf9934a22b 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -74,7 +74,7 @@ SdPPTFilter::~SdPPTFilter()
 
 bool SdPPTFilter::Import()
 {
-    bool    bRet = false;
+    bool bRet = false;
     tools::SvRef<SotStorage> pStorage = new SotStorage( mrMedium.GetInStream(), false );
     if( !pStorage->GetError() )
     {
@@ -97,24 +97,18 @@ bool SdPPTFilter::Import()
                 mrMedium.SetError(ERRCODE_SVX_READ_FILTER_PPOINT);
             else
             {
-#ifndef DISABLE_DYNLOADING
-                ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
-                if ( pLibrary )
-                {
-                    ImportPPTPointer PPTImport = reinterpret_cast< ImportPPTPointer >( pLibrary->getFunctionSymbol( "ImportPPT" ) );
-                    if ( PPTImport )
-                        bRet = PPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium );
-
-                    if ( !bRet )
-                        mrMedium.SetError(SVSTREAM_WRONGVERSION);
-                    pLibrary->release(); //TODO: let it get unloaded?
-                    delete pLibrary;
-                }
+#ifdef DISABLE_DYNLOADING
+                ImportPPTPointer pPPTImport = ImportPPT;
 #else
-                bRet = ImportPPT( &mrDocument, *pDocStream, *pStorage, mrMedium );
+                ImportPPTPointer pPPTImport = reinterpret_cast< ImportPPTPointer >(
+                    SdFilter::GetLibrarySymbol(mrMedium.GetFilter()->GetUserData(), "ImportPPT"));
+#endif
+
+                if ( pPPTImport )
+                    bRet = pPPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium );
+
                 if ( !bRet )
                     mrMedium.SetError(SVSTREAM_WRONGVERSION);
-#endif
             }
 
             delete pDocStream;
@@ -126,58 +120,50 @@ bool SdPPTFilter::Import()
 
 bool SdPPTFilter::Export()
 {
-#ifndef DISABLE_DYNLOADING
-    ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
-#endif
-    bool        bRet = false;
+    bool bRet = false;
 
-#ifndef DISABLE_DYNLOADING
-    if( pLibrary )
-#endif
+    if( mxModel.is() )
     {
-        if( mxModel.is() )
-        {
-            tools::SvRef<SotStorage>    xStorRef = new SotStorage( mrMedium.GetOutStream(), false );
-#ifndef DISABLE_DYNLOADING
-            ExportPPTPointer PPTExport = reinterpret_cast<ExportPPTPointer>(pLibrary->getFunctionSymbol( "ExportPPT" ));
+        tools::SvRef<SotStorage> xStorRef = new SotStorage( mrMedium.GetOutStream(), false );
+
+#ifdef DISABLE_DYNLOADING
+        ExportPPTPointer PPTExport = ExportPPT;
 #else
-            ExportPPTPointer PPTExport = ExportPPT;
+        ExportPPTPointer PPTExport = reinterpret_cast< ExportPPTPointer >(
+            SdFilter::GetLibrarySymbol(mrMedium.GetFilter()->GetUserData(), "ExportPPT"));
 #endif
 
-            if( PPTExport && xStorRef.is() )
-            {
-                sal_uInt32          nCnvrtFlags = 0;
-                const SvtFilterOptions& rFilterOptions = SvtFilterOptions::Get();
-                if ( rFilterOptions.IsMath2MathType() )
-                    nCnvrtFlags |= OLE_STARMATH_2_MATHTYPE;
-                if ( rFilterOptions.IsWriter2WinWord() )
-                    nCnvrtFlags |= OLE_STARWRITER_2_WINWORD;
-                if ( rFilterOptions.IsCalc2Excel() )
-                    nCnvrtFlags |= OLE_STARCALC_2_EXCEL;
-                if ( rFilterOptions.IsImpress2PowerPoint() )
-                    nCnvrtFlags |= OLE_STARIMPRESS_2_POWERPOINT;
-                if ( rFilterOptions.IsEnablePPTPreview() )
-                    nCnvrtFlags |= 0x8000;
-
-                mrDocument.SetSwapGraphicsMode( SdrSwapGraphicsMode::TEMP );
-
-                CreateStatusIndicator();
-
-                //OUString sBaseURI( "BaseURI");
-                std::vector< PropertyValue > aProperties;
-                PropertyValue aProperty;
-                aProperty.Name = "BaseURI";
-                aProperty.Value <<= mrMedium.GetBaseURL( true );
-                aProperties.push_back( aProperty );
-
-                bRet = PPTExport( aProperties, xStorRef, mxModel, mxStatusIndicator, pBas, nCnvrtFlags );
-                xStorRef->Commit();
-            }
+        if( PPTExport && xStorRef.is() )
+        {
+            sal_uInt32          nCnvrtFlags = 0;
+            const SvtFilterOptions& rFilterOptions = SvtFilterOptions::Get();
+            if ( rFilterOptions.IsMath2MathType() )
+                nCnvrtFlags |= OLE_STARMATH_2_MATHTYPE;
+            if ( rFilterOptions.IsWriter2WinWord() )
+                nCnvrtFlags |= OLE_STARWRITER_2_WINWORD;
+            if ( rFilterOptions.IsCalc2Excel() )
+                nCnvrtFlags |= OLE_STARCALC_2_EXCEL;
+            if ( rFilterOptions.IsImpress2PowerPoint() )
+                nCnvrtFlags |= OLE_STARIMPRESS_2_POWERPOINT;
+            if ( rFilterOptions.IsEnablePPTPreview() )
+                nCnvrtFlags |= 0x8000;
+
+            mrDocument.SetSwapGraphicsMode( SdrSwapGraphicsMode::TEMP );
+
+            CreateStatusIndicator();
+
+            //OUString sBaseURI( "BaseURI");
+            std::vector< PropertyValue > aProperties;
+            PropertyValue aProperty;
+            aProperty.Name = "BaseURI";
+            aProperty.Value <<= mrMedium.GetBaseURL( true );
+            aProperties.push_back( aProperty );
+
+            bRet = PPTExport( aProperties, xStorRef, mxModel, mxStatusIndicator, pBas, nCnvrtFlags );
+            xStorRef->Commit();
         }
-#ifndef DISABLE_DYNLOADING
-        delete pLibrary;
-#endif
     }
+
     return bRet;
 }
 
@@ -186,20 +172,14 @@ void SdPPTFilter::PreSaveBasic()
     const SvtFilterOptions& rFilterOptions = SvtFilterOptions::Get();
     if( rFilterOptions.IsLoadPPointBasicStorage() )
     {
-#ifndef DISABLE_DYNLOADING
-        ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
-        if( pLibrary )
-        {
-            SaveVBAPointer pSaveVBA= reinterpret_cast<SaveVBAPointer>(pLibrary->getFunctionSymbol( "SaveVBA" ));
-            if( pSaveVBA )
-            {
-                pSaveVBA( static_cast<SfxObjectShell&>(mrDocShell), pBas );
-            }
-            delete pLibrary;
-        }
+#ifdef DISABLE_DYNLOADING
+        SaveVBAPointer pSaveVBA= SaveVBA;
 #else
-        SaveVBA( (SfxObjectShell&) mrDocShell, pBas );
+        SaveVBAPointer pSaveVBA = reinterpret_cast< SaveVBAPointer >(
+            SdFilter::GetLibrarySymbol(mrMedium.GetFilter()->GetUserData(), "SaveVBA"));
 #endif
+        if( pSaveVBA )
+            pSaveVBA( static_cast<SfxObjectShell&>(mrDocShell), pBas );
     }
 }
 
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index 072702db97d7..35b7ca6f5113 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -95,6 +95,8 @@
 #include <vcl/FilterConfigItem.hxx>
 #include <o3tl/make_unique.hxx>
 #include <sdabstdlg.hxx>
+#include <sdfilter.hxx>
+#include <sdmod.hxx>
 
 using namespace ::com::sun::star;
 
@@ -293,6 +295,7 @@ void SdDLL::Init()
 extern "C" SAL_DLLPUBLIC_EXPORT
 void lok_preload_hook()
 {
+    SdFilter::Preload();
     SdAbstractDialogFactory::Create();
 }
 
commit e5871345dbf77bd09df6dd7bd201d3f9e84e2390
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Nov 26 09:21:18 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Dec 6 11:10:40 2018 +0100

    sfx2: show partial signatures even if cert validation fails
    
    (cherry picked from commit 4a59a8aba8c9d451edff790d9281d0095c1bd78e)
    
    Conflicts:
            xmlsecurity/qa/unit/signing/signing.cxx
    
    Change-Id: I6060b7130827346ac5d6955bf38ebe3b476819fd
    Reviewed-on: https://gerrit.libreoffice.org/64174
    Tested-by: Jenkins
    Reviewed-by: Sophie Gautier <gautier.sophie at gmail.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/sfx2/signaturestate.hxx b/include/sfx2/signaturestate.hxx
index a1fd09360906..8bdfdfac75d9 100644
--- a/include/sfx2/signaturestate.hxx
+++ b/include/sfx2/signaturestate.hxx
@@ -33,7 +33,9 @@ enum class SignatureState
     NOTVALIDATED  = 4,
     // signature and certificate are ok, but not all files are signed, as it was the case in
     // OOo 2.x - OOo 3.1.1. This state is only used together with document signatures.
-    PARTIAL_OK    = 5
+    PARTIAL_OK    = 5,
+    /// Certificate could not be validated and the document is only partially signed.
+    NOTVALIDATED_PARTIAL_OK = 6
 };
 
 #endif // INCLUDED_SFX2_SIGNATURESTATE_HXX
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 6d871b648d4f..82b71b7294e8 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -260,6 +260,7 @@
 #define STR_SIGNATURE_INVALID                   NC_("STR_SIGNATURE_INVALID", "The signature was valid, but the document has been modified")
 #define STR_SIGNATURE_NOTVALIDATED              NC_("STR_SIGNATURE_NOTVALIDATED", "The signature is OK, but the certificate could not be validated.")
 #define STR_SIGNATURE_PARTIAL_OK                NC_("STR_SIGNATURE_PARTIAL_OK", "The signature is OK, but the document is only partially signed.")
+#define STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK   NC_("STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK", "The certificate could not be validated and the document is only partially signed.")
 #define STR_SIGNATURE_OK                        NC_("STR_SIGNATURE_OK", "This document is digitally signed and the signature is valid.")
 #define STR_SIGNATURE_SHOW                      NC_("STR_SIGNATURE_SHOW", "Show Signatures")
 
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 8267795cc6cd..f69afb5e059e 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1067,6 +1067,10 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
                         sMessage = SfxResId(STR_SIGNATURE_OK);
                         aInfoBarType = InfoBarType::Info;
                         break;
+                    case SignatureState::NOTVALIDATED_PARTIAL_OK:
+                        sMessage = SfxResId(STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK);
+                        aInfoBarType = InfoBarType::Warning;
+                        break;
                     //FIXME SignatureState::Unknown, own message?
                     default:
                         break;
@@ -1284,7 +1288,9 @@ SignatureState SfxObjectShell::ImplCheckSignaturesInformation( const uno::Sequen
         }
     }
 
-    if ( nResult == SignatureState::OK && !bCertValid )
+    if (nResult == SignatureState::OK && !bCertValid && !bCompleteSignature)
+        nResult = SignatureState::NOTVALIDATED_PARTIAL_OK;
+    else if (nResult == SignatureState::OK && !bCertValid)
         nResult = SignatureState::NOTVALIDATED;
     else if ( nResult == SignatureState::OK && bCertValid && !bCompleteSignature)
         nResult = SignatureState::PARTIAL_OK;
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index cf3adf2ad42c..6b124654a292 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -488,13 +488,14 @@ void SigningTest::testOOXMLPartial()
     SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
     CPPUNIT_ASSERT(pObjectShell);
     // This was SignatureState::BROKEN due to missing RelationshipTransform and SHA-256 support.
-    // We expect NOTVALIDATED in case the root CA is not imported on the system, and PARTIAL_OK otherwise, so accept both.
+    // We expect NOTVALIDATED_PARTIAL_OK in case the root CA is not imported on the system, and PARTIAL_OK otherwise, so accept both.
+    // But reject NOTVALIDATED, hiding incompleteness is not OK.
     SignatureState nActual = pObjectShell->GetDocumentSignatureState();
     CPPUNIT_ASSERT_MESSAGE(
         (OString::number(
              static_cast<std::underlying_type<SignatureState>::type>(nActual))
          .getStr()),
-        (nActual == SignatureState::NOTVALIDATED
+        (nActual == SignatureState::NOTVALIDATED_PARTIAL_OK
          || nActual == SignatureState::PARTIAL_OK));
 }
 
commit 41f19175c2e4c344c582c8b57a803f5ec4e5aaad
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Wed Dec 5 00:21:17 2018 +0100
Commit:     Markus Mohrhard <markus.mohrhard at googlemail.com>
CommitDate: Wed Dec 5 23:01:47 2018 +0100

    Resolves: tdf#121887 RowModel::mnRow is 1-based, always
    
    Basically this was always wrong.
    
    Original code didn't treat the r attribute as optional and
    resulted in an invalid -1 row for such cases, hence the RowModel
    wasn't applied later.
    
    Then
    
    commit af8e6f4f544ecd01d3eda5f38bbd4779d5e8b2c6
    CommitDate: Wed May 29 22:05:02 2013 +0200
    
        r is an optional attribute in c and r, fdo#65059
    
    introduced a 0-based SheetDataContext::mnRow but assigned that to
    a 1-based RowModel::mnRow as well if r attribute was missing, and
    did not update SheetDataContext::mnRow if r attribute was given.
    
    commit ff56553e34dfed01b9226ce7a516dbeb6da32124
    CommitDate: Thu Mar 13 18:39:22 2014 -0400
    
        fdo#76032: This row index is 1-based whereas our own mnRow is 0-based.
    
    then correctly assigned the decremented r attribute to
    SheetDataContext::mnRow but did not touch the assignment to
    RowModel::mnRow if r was not given. Probably confused by the
    ++mnRow already there which is correct but not sufficient for the
    assignment.
    
    Which we now finally fix herewith..
    
    Change-Id: Iae1563ed01b95e7852ddad4fd59374c07186b493
    Reviewed-on: https://gerrit.libreoffice.org/64580
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 76fbe494785faee1313d1c0be8ed2ca7b0d74f68)
    Reviewed-on: https://gerrit.libreoffice.org/64639
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index 5f17d8c419b6..9732ce668d5c 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -272,7 +272,7 @@ void SheetDataContext::importRow( const AttributeList& rAttribs )
         mnRow = nRow-1; // to 0-based row index.
     }
     else
-        aModel.mnRow = ++mnRow;
+        aModel.mnRow = (++mnRow + 1);   // increment 0-based row index, to 1-based model row
     mrAddressConv.checkRow( mnRow, true);
     mnCol = -1;
 
commit 7be57e1f047a11cea355232db6926879199f198b
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Fri Nov 23 14:14:17 2018 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Dec 5 19:06:44 2018 +0100

    sw: fix wrong title of AutoFormat with redlining dialog
    
    (regression from 9fcef57a34dbd88a98621dfaf8668fa076dd98f1)
    
    (cherry picked from commit 564260804ee3a8846b921188e36bc269fc8ba98e)
    
    Change-Id: Id6ea5841dd25a30519deb825c3ae0aaa7469c250
    Reviewed-on: https://gerrit.libreoffice.org/64475
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 96fe601d5546..503f52b502fc 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -290,6 +290,7 @@ static short lcl_AskRedlineFlags(weld::Window *pWin)
 {
     std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pWin, "modules/swriter/ui/queryredlinedialog.ui"));
     std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryRedlineDialog"));
+    xQBox->set_title(SwResId(STR_AUTOCORRECT));
     return xQBox->run();
 }
 
commit 9d7897521efd0c37693241e84c562ea32750740e
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Oct 8 11:21:45 2018 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Dec 5 13:31:23 2018 +0100

    tdf#121778: Work around odd macOS 10.14 graphicsContextWithWindow failure
    
    Although Stephan's original commit message below talks mainly about a
    unit test, this change helps at least in tdf#121778, too, and possibly
    other cases.
    
    It is interesting that wihout this change, a lot of these warnings are
    printed before the crash:
    warn:vcl.quartz:42670:52899343:vcl/quartz/salvd.cxx:312: No context
    
    Original commit message:
    
    When running on macOS 10.14, both master and libreoffice-6-1 (at least) started
    to fail CppunitTest_vcl_bitmap_render_test with
    
    > /Users/stephan/Software/lo2/core/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx:90: Assertion
    > Test name: BitmapRenderTest::testTdf113918
    > equality assertion failed
    > - Expected: mcBlueOrIndex: 255, mcGreen: 255, mcRed: 255, mcAlpha: 0
    > - Actual  : mcBlueOrIndex: 1, mcGreen: 112, mcRed: 15, mcAlpha: 0
    
    in --enable-debug/--enable-dbgutil builds.
    
    I tracked that down to the OSL_DEBUG_LEVEL>0--only call to
    Scheduler::ProcessEventsToIdle in test::BootstrapFixture::setUp
    (test/source/bootstrapfixture.cxx).  If that call is also included in non-debug
    (i.e., OSL_DEBUG_LEVEL=0) builds, or if it is removed from all builds and
    instead an unsuspecting
    
      [NSApp nextEventMatchingMask: 0 untilDate: nil inMode: NSDefaultRunLoopMode dequeue: NO];
    
    is added directly before the call to
    
      pVDev->SetOutputSizePixel(Size(2480, 3508));
    
    at the start of BitmapRenderTest::testTdf113918
    (vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx:76), the test always fails.
    
    What happens is that, after such a nextEventMatchingMask call done, the call to
    NSGraphicsContext graphicsContextWithWindow in AquaSalVirtualDevice::SetSize (as
    called from the SetOutputSizePixel call in the test) returns nil, for unclear
    reasons.
    
    Until those underlying reasons are understood, change the code of SetSize to
    "fall back to a bitmap context" also in case the graphicsContextWithWindow call
    returned nil.
    
    Reviewed-on: https://gerrit.libreoffice.org/61519
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit e659c6a1857fbb8e5a6e8ff60fe241483eea32dd)
    
    Change-Id: I604ebd2c444b58610e4ed73ec70af87b0a08e864
    Reviewed-on: https://gerrit.libreoffice.org/64576
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx
index 03f37fe67366..355a78de96d2 100644
--- a/vcl/quartz/salvd.cxx
+++ b/vcl/quartz/salvd.cxx
@@ -272,7 +272,14 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
                     xCGContext = static_cast<CGContextRef>([pNSContext graphicsPort]);
                 }
             }
-            else
+            // At least on macOS 10.14 during CppunitTests (that have hidden windows), it happens
+            // that the above
+            //
+            //   [NSGraphicsContext graphicsContextWithWindow: pNSWindow]
+            //
+            // returns nil for unclear reasons; so use the below fallback even if there is a
+            // pNSWindow but obtaining a graphics context for it fails:
+            if (xCGContext == nullptr)
             {
                 // fall back to a bitmap context
                 mnBitmapDepth = 32;
commit a9d6f0e078e5e6653bd620ddbdbc24de93c7ae51
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Dec 3 12:18:57 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 4 16:40:19 2018 +0100

    sw: convert assert(bSelected out of sync) to SAL_WARN for now
    
    This evidently happens sometimes, but when it does it it's
    impossible to reproduce... Let's use SAL_WARN for now.
    
    Change-Id: Id724fd52060bfae45f9eeb16163ddfc94e53af03
    Reviewed-on: https://gerrit.libreoffice.org/64447
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit d1138d72ed4f5c2ada2dd53f4b091964d8a284e6)
    Reviewed-on: https://gerrit.libreoffice.org/64451
    (cherry picked from commit 8f85d3db0b8b1dcfc399be4afbbc68a04c558a64)
    Reviewed-on: https://gerrit.libreoffice.org/64514
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index f75a6fda8cdd..9196f1d3e8da 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -91,7 +91,7 @@ void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet )
     if( IsSelected() )
     {
         rStateSet.AddState( AccessibleStateType::SELECTED );
-        assert(m_bIsSelected && "bSelected out of sync");
+        SAL_WARN_IF(!m_bIsSelected, "sw.a11y", "bSelected out of sync");
         ::rtl::Reference < SwAccessibleContext > xThis( this );
         GetMap()->SetCursorContext( xThis );
     }
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index d173c1166ecb..87b2246bb64a 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -82,7 +82,7 @@ void SwAccessibleFrameBase::GetStates(
     if( IsSelected() )
     {
         rStateSet.AddState( AccessibleStateType::SELECTED );
-        assert(m_bIsSelected && "bSelected out of sync");
+        SAL_WARN_IF(!m_bIsSelected, "sw.a11y", "bSelected out of sync");
         ::rtl::Reference < SwAccessibleContext > xThis( this );
         GetMap()->SetCursorContext( xThis );
 
commit 0a906dc78b575d696d402fb81900700e6e8e761e
Author:     Markus Mohrhard <markus.mohrhard at googlemail.com>
AuthorDate: Thu Nov 29 19:11:58 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Dec 3 11:24:29 2018 +0100

    tdf#42915, NaN in a date axis can destroy the whole chart
    
    The NaN value forces the scaling of the axis to be based on years
    and introduces gaps in the rendering.
    
    Change-Id: I78219be289d76edb53b5672209e1c031ab62def9
    Reviewed-on: https://gerrit.libreoffice.org/64267
    Tested-by: Jenkins
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    
    related tdf#42915, pass NaN through date transformation
    
    Many places in chart2 use NaN to mean no available value. Not propagating
    NaN through the helper disables all this functionality.
    
    Change-Id: I37f966007b5b7cc16778c5c6903710fbd144631b
    Reviewed-on: https://gerrit.libreoffice.org/64266
    Tested-by: Jenkins
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-on: https://gerrit.libreoffice.org/64304
    (cherry picked from commit 55c5382591305a872b961d54571e3c823728ccb2)
    Reviewed-on: https://gerrit.libreoffice.org/64310
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/view/axes/DateHelper.cxx b/chart2/source/view/axes/DateHelper.cxx
index 046760436acd..dfe772e45f66 100644
--- a/chart2/source/view/axes/DateHelper.cxx
+++ b/chart2/source/view/axes/DateHelper.cxx
@@ -69,6 +69,9 @@ bool DateHelper::IsLessThanOneYearAway( const Date& rD1, const Date& rD2 )
 
 double DateHelper::RasterizeDateValue( double fValue, const Date& rNullDate, long TimeResolution )
 {
+    if (rtl::math::isNan(fValue))
+        return fValue;
+
     Date aDate(rNullDate); aDate.AddDays(::rtl::math::approxFloor(fValue));
     switch(TimeResolution)
     {
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 2a8d773244e0..186cad53fe73 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -728,7 +728,12 @@ void AreaChart::createShapes()
                     //collect data point information (logic coordinates, style ):
                     double fLogicX = pSeries->getXValue(nIndex);
                     if (bDateCategory)
+                    {
+                        if (rtl::math::isNan(fLogicX))
+                            continue;
+
                         fLogicX = DateHelper::RasterizeDateValue( fLogicX, m_aNullDate, m_nTimeResolution );
+                    }
                     double fLogicY = pSeries->getYValue(nIndex);
 
                     if( m_nDimension==3 && m_bArea && rXSlot.m_aSeriesVector.size()!=1 )
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index ea7d5555c8be..78bc3037d36c 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1460,10 +1460,17 @@ long VSeriesPlotter::calculateTimeResolutionOnXAxis()
         if( !rDateCategories.empty() )
         {
             std::vector< double >::const_iterator aIt = rDateCategories.begin(), aEnd = rDateCategories.end();
+            while (rtl::math::isNan(*aIt) && aIt != aEnd)
+            {
+                ++aIt;
+            }
             Date aPrevious(aNullDate); aPrevious.AddDays(rtl::math::approxFloor(*aIt));
             ++aIt;
             for(;aIt!=aEnd;++aIt)
             {
+                if (rtl::math::isNan(*aIt))
+                    continue;
+
                 Date aCurrent(aNullDate); aCurrent.AddDays(rtl::math::approxFloor(*aIt));
                 if( nRet == css::chart::TimeUnit::YEAR )
                 {


More information about the Libreoffice-commits mailing list