[Libreoffice-commits] core.git: Branch 'feature/cib_contract3753' - 44 commits - chart2/qa chart2/source configure.ac connectivity/source cui/source desktop/source extensions/source framework/source icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_dark_svg icon-themes/breeze_svg icon-themes/elementary icon-themes/elementary_svg icon-themes/karasa_jaga icon-themes/karasa_jaga_svg icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_dark_svg icon-themes/sifr_svg include/desktop include/oox include/vcl include/xmloff officecfg/registry oox/qa oox/source README.md sc/source sd/source sd/uiconfig solenv/bin solenv/gbuild sw/qa sw/source translations vcl/inc vcl/qt5 vcl/source vcl/unx writerfilter/source xmloff/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 10 15:47:25 UTC 2020


Rebased ref, commits from common ancestor:
commit 995381acda76497a0abca22ec381c27533857c88
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Fri Mar 6 13:10:48 2020 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Mar 10 16:45:21 2020 +0100

    sw: DOCX export: fix bookmark inside sdtDropDown
    
    Word refuses to open a document that has a w:bookmarkEnd inside
    w:sdtContent but with no text content following it.
    
    It turns out that the bookmark position is wrong anyway, it should end
    before the text according to Writer's model.
    
    It shouldn't make a difference whether the end is inside the sdtContent
    or preceding the SDT, so write the text content of the SDT from the
    EndField_Impl().
    
    Another idea would be to move the writing of bookmarks in EndRun()
    before the StartField_Impl() but who knows what that would break.
    
    (regression from d55b26a093bdbced08985dbc7113190b52a8bc66)
    
    Change-Id: I476c0829814b061d80811cc6817923ee06013a26
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90100
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 1f5af453b5994c9e8ccd0756882b98715c75114b)

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index d0edf4d5fcd4..91817f2f2220 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -450,6 +450,7 @@ DECLARE_OOXMLEXPORT_TEST(testInputListExport, "tdf122186_input_list.odt")
         CPPUNIT_ASSERT_EQUAL(OUString("1"), items[0]);
         CPPUNIT_ASSERT_EQUAL(OUString("2"), items[1]);
         CPPUNIT_ASSERT_EQUAL(OUString("3"), items[2]);
+        CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPropertySet, "DefaultText"));
     }
 }
 
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6885e002bf29..99aad24c3da2 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1964,6 +1964,17 @@ void DocxAttributeOutput::WriteSdtDropDownStart(
     m_pSerializer->endElementNS(XML_w, XML_sdtPr);
 
     m_pSerializer->startElementNS(XML_w, XML_sdtContent);
+}
+
+void DocxAttributeOutput::WriteSdtDropDownEnd(OUString const& rSelected,
+        uno::Sequence<OUString> const& rListItems)
+{
+    // note: rSelected might be empty?
+    sal_Int32 nId = comphelper::findValue(rListItems, rSelected);
+    if (nId == -1)
+    {
+        nId = 0;
+    }
 
     // the lastValue only identifies the entry in the list, also export
     // currently selected item's displayText as run content (if one exists)
@@ -1975,6 +1986,8 @@ void DocxAttributeOutput::WriteSdtDropDownStart(
         m_pSerializer->endElementNS(XML_w, XML_t);
         m_pSerializer->endElementNS(XML_w, XML_r);
     }
+
+    WriteSdtEnd();
 }
 
 void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun )
@@ -2221,12 +2234,19 @@ void DocxAttributeOutput::DoWriteFieldRunProperties( const SwTextNode * pNode, s
 
 void DocxAttributeOutput::EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos& rInfos )
 {
-    if (rInfos.eType == ww::eFORMDATE
-        || (rInfos.eType == ww::eFORMDROPDOWN && rInfos.pField))
+    if (rInfos.eType == ww::eFORMDATE)
     {
         WriteSdtEnd();
         return;
     }
+    if (rInfos.eType == ww::eFORMDROPDOWN && rInfos.pField)
+    {
+        // write selected item from End not Start to ensure that any bookmarks
+        // precede it
+        SwDropDownField const& rField(*static_cast<SwDropDownField const*>(rInfos.pField.get()));
+        WriteSdtDropDownEnd(rField.GetSelectedItem(), rField.GetItemSequence());
+        return;
+    }
 
     // The command has to be written before for the hyperlinks
     if ( rInfos.pField )
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index ef95f70fb881..edb6825f1fdc 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -718,6 +718,7 @@ private:
 
     void WriteFormDateStart(const OUString& sFullDate, const OUString& sDateFormat, const OUString& sLang);
     void WriteSdtDropDownStart(OUString const& rName, OUString const& rSelected, uno::Sequence<OUString> const& rListItems);
+    void WriteSdtDropDownEnd(OUString const& rSelected, uno::Sequence<OUString> const& rListItems);
     void WriteSdtEnd();
 
     void StartField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun = false );
commit 99608278c891904d601377fbae77de165396f025
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Jan 2 15:30:36 2020 +0300
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Mar 10 13:18:25 2020 +0100

    Delete google_breakpad::ExceptionHandler before calling _exit()
    
    While debugging tdf#129712 on Windows, I saw this sequence:
    
    1. nullptr was dereferenced (the reason for tdf#129712).
    2. ExceptionHandler::HandleException was called (in
       workdir/UnpackedTarball/breakpad/src/client/windows/handler/exception_handler.cc).
    3. It called ExceptionHandler::WriteMinidumpOnHandlerThread.
    4. Minidump was created in ExceptionHandler::ExceptionHandlerThreadMain.
    5. Document Recovery dialog was shown in Desktop::Exception (in
       desktop/source/app/app.cxx).
    6. After closing dialog, _exit() was called in Desktop::Exception.
    7. All threads except main were terminated.
    8. Another access violation was thrown in the "minimal CRT cleanup".
    9. ExceptionHandler::HandleException called again.
    10. ExceptionHandler::WriteMinidumpOnHandlerThread hung on WaitForSingleObject
        because handler thread that should release the semaphore was terminated
        already at step 7.
    
    The process had to be killed manually.
    
    This change destroys the breakpad handler at the start of Desktop::Exception,
    which de-registers itself (on Windows it uses SetUnhandledExceptionFilter).
    Other than preventing the hang, the rationale also is that keeping the handler
    after first minidump creation is wrong: even if the second minidump creation
    succeeded, uploading it to crashdump server would give not the actual problem,
    but some unrelated stack.
    
    Change-Id: If12d0c7db519693f733b5ab3b8a288cef800a149
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86104
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 12b5892cf9c78dd917f2e50672cd250478e6c7d6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89861
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 76b2f93c95fb..3a4322933b25 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1142,6 +1142,10 @@ void Desktop::Exception(ExceptionCategory nCategory)
     // protect against recursive calls
     static bool bInException = false;
 
+#if HAVE_FEATURE_BREAKPAD
+    CrashReporter::removeExceptionHandler(); // disallow re-entry
+#endif
+
     SystemWindowFlags nOldMode = Application::GetSystemWindowMode();
     Application::SetSystemWindowMode( nOldMode & ~SystemWindowFlags::NOAUTOMODE );
     if ( bInException )
diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx
index 3420f20c4496..743ae43e7c9b 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -36,14 +36,44 @@
 #if defined __clang__
 #pragma clang diagnostic pop
 #endif
+#include <locale>
+#include <codecvt>
 #endif
 
 osl::Mutex CrashReporter::maMutex;
-google_breakpad::ExceptionHandler* CrashReporter::mpExceptionHandler = nullptr;
+std::unique_ptr<google_breakpad::ExceptionHandler> CrashReporter::mpExceptionHandler;
 bool CrashReporter::mbInit = false;
 CrashReporter::vmaKeyValues CrashReporter::maKeyValues;
 
 
+#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
+static bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* /*context*/, bool succeeded)
+{
+    CrashReporter::addKeyValue("DumpFile", OStringToOUString(descriptor.path(), RTL_TEXTENCODING_UTF8), CrashReporter::Write);
+    SAL_WARN("desktop", "minidump generated: " << descriptor.path());
+
+    return succeeded;
+}
+#elif defined WNT
+static bool dumpCallback(const wchar_t* path, const wchar_t* id,
+    void* /*context*/, EXCEPTION_POINTERS* /*exinfo*/,
+    MDRawAssertionInfo* /*assertion*/,
+    bool succeeded)
+{
+    // TODO: moggi: can we avoid this conversion
+#ifdef _MSC_VER
+#pragma warning (disable: 4996)
+#endif
+    std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1;
+    std::string aPath = conv1.to_bytes(std::wstring(path)) + conv1.to_bytes(std::wstring(id)) + ".dmp";
+    CrashReporter::addKeyValue("DumpFile", OStringToOUString(aPath.c_str(), RTL_TEXTENCODING_UTF8), CrashReporter::AddItem);
+    CrashReporter::addKeyValue("GDIHandles", OUString::number(::GetGuiResources(::GetCurrentProcess(), GR_GDIOBJECTS)), CrashReporter::Write);
+    SAL_WARN("desktop", "minidump generated: " << aPath);
+    return succeeded;
+}
+#endif
+
+
 void CrashReporter::writeToFile(std::ios_base::openmode Openmode)
 {
     std::ofstream ini_file(getIniFileName(), Openmode);
@@ -171,10 +201,21 @@ bool CrashReporter::readSendConfig(std::string& response)
     return crashreport::readConfig(CrashReporter::getIniFileName(), &response);
 }
 
-void CrashReporter::storeExceptionHandler(google_breakpad::ExceptionHandler* pExceptionHandler)
+void CrashReporter::installExceptionHandler()
+{
+    if (!IsDumpEnable())
+        return;
+#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
+    google_breakpad::MinidumpDescriptor descriptor("/tmp");
+    mpExceptionHandler = std::make_unique<google_breakpad::ExceptionHandler>(descriptor, nullptr, dumpCallback, nullptr, true, -1);
+#elif defined WNT
+    mpExceptionHandler = std::make_unique<google_breakpad::ExceptionHandler>(L".", nullptr, dumpCallback, nullptr, google_breakpad::ExceptionHandler::HANDLER_ALL);
+#endif
+}
+
+void CrashReporter::removeExceptionHandler()
 {
-    if(IsDumpEnable())
-        mpExceptionHandler = pExceptionHandler;
+    mpExceptionHandler.reset();
 }
 
 
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx
index 70d396d232b6..064c08579ab9 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -46,22 +46,6 @@
 
 #if HAVE_FEATURE_BREAKPAD
 #include <desktop/crashreport.hxx>
-
-#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
-#include <client/linux/handler/exception_handler.h>
-#elif defined WNT
-#if defined __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wmicrosoft-enum-value"
-#endif
-#include <client/windows/handler/exception_handler.h>
-#if defined __clang__
-#pragma clang diagnostic pop
-#endif
-#include <locale>
-#include <codecvt>
-#endif
-
 #endif
 
 #include <postwin.h>
@@ -75,52 +59,12 @@
 #  define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOGTAG, __VA_ARGS__))
 #endif
 
-#if HAVE_FEATURE_BREAKPAD
-
-#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
-static bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* /*context*/, bool succeeded)
-{
-    CrashReporter::addKeyValue("DumpFile", OStringToOUString(descriptor.path(), RTL_TEXTENCODING_UTF8), CrashReporter::Write);
-    SAL_WARN("desktop", "minidump generated: " << descriptor.path());
-
-    return succeeded;
-}
-#elif defined WNT
-static bool dumpCallback(const wchar_t* path, const wchar_t* id,
-                            void* /*context*/, EXCEPTION_POINTERS* /*exinfo*/,
-                            MDRawAssertionInfo* /*assertion*/,
-                            bool succeeded)
-{
-    // TODO: moggi: can we avoid this conversion
-#ifdef _MSC_VER
-#pragma warning (disable: 4996)
-#endif
-    std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1;
-    std::string aPath = conv1.to_bytes(std::wstring(path)) + conv1.to_bytes(std::wstring(id)) + ".dmp";
-    CrashReporter::addKeyValue("DumpFile", OStringToOUString(aPath.c_str(), RTL_TEXTENCODING_UTF8), CrashReporter::AddItem);
-    CrashReporter::addKeyValue("GDIHandles", OUString::number(::GetGuiResources (::GetCurrentProcess(), GR_GDIOBJECTS)), CrashReporter::Write);
-    SAL_WARN("desktop", "minidump generated: " << aPath);
-    return succeeded;
-}
-#endif
-
-#endif
 extern "C" int DESKTOP_DLLPUBLIC soffice_main()
 {
     sal_detail_initialize(sal::detail::InitializeSoffice, nullptr);
 
 #if HAVE_FEATURE_BREAKPAD
-
-#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
-    google_breakpad::MinidumpDescriptor descriptor("/tmp");
-    google_breakpad::ExceptionHandler eh(descriptor, nullptr, dumpCallback, nullptr, true, -1);
-
-    CrashReporter::storeExceptionHandler(&eh);
-#elif defined WNT
-    google_breakpad::ExceptionHandler eh(L".", nullptr, dumpCallback, nullptr, google_breakpad::ExceptionHandler::HANDLER_ALL);
-
-    CrashReporter::storeExceptionHandler(&eh);
-#endif
+    CrashReporter::installExceptionHandler();
 #endif
 
 #if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && HAVE_FEATURE_UI && HAVE_FEATURE_OPENGL
diff --git a/include/desktop/crashreport.hxx b/include/desktop/crashreport.hxx
index 585c0af5e1a9..8235cff03501 100644
--- a/include/desktop/crashreport.hxx
+++ b/include/desktop/crashreport.hxx
@@ -18,6 +18,7 @@
 #include <config_features.h>
 
 // vector not sort the entries
+#include <memory>
 #include <vector>
 #include <string>
 
@@ -46,7 +47,8 @@ public:
 #if HAVE_FEATURE_BREAKPAD
     static void addKeyValue(const OUString& rKey, const OUString& rValue, tAddKeyHandling AddKeyHandling);
 
-    static void storeExceptionHandler(google_breakpad::ExceptionHandler* pExceptionHandler);
+    static void installExceptionHandler();
+    static void removeExceptionHandler();
 
     static bool crashReportInfoExists();
 
@@ -71,7 +73,7 @@ private:
     typedef std::vector<mpair> vmaKeyValues;
     static vmaKeyValues maKeyValues; // used to temporarily save entries before the old info has been uploaded
 
-    static google_breakpad::ExceptionHandler* mpExceptionHandler;
+    static std::unique_ptr<google_breakpad::ExceptionHandler> mpExceptionHandler;
 
     static std::string getIniFileName();
     static void writeCommonInfo();
commit 6935465f9b56d99557ba627d845b9d1a2f2f2d07
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Mar 3 09:23:30 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Mar 10 12:05:18 2020 +0100

    tdf#93831 xlsx file full of pictures of numbers slow to open
    
    Change-Id: I6c984c84c409519a986eacb265c943307a7b57af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90245
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit edf13fe1247e7ef411a9ff5435385573fad01f56)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90044

diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index 7e7edc655a59..4146a60eb310 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -50,6 +50,7 @@
 #include <biffhelper.hxx>
 
 #include <document.hxx>
+#include <drwlayer.hxx>
 #include <docsh.hxx>
 #include <calcconfig.hxx>
 #include <globstr.hrc>
@@ -344,6 +345,12 @@ void importSheetFragments( WorkbookFragment& rWorkbookHandler, SheetFragmentVect
 
 void WorkbookFragment::finalizeImport()
 {
+    // lock the model to prevent broadcasting, speeds up load a lot
+    getScDocument().InitDrawLayer();
+    auto pModel = getScDocument().GetDrawLayer();
+    bool bWasLocked = pModel->isLocked();
+    pModel->setLock(true);
+
     ISegmentProgressBarRef xGlobalSegment = getProgressBar().createSegment( PROGRESS_LENGTH_GLOBALS );
 
     // read the theme substream
@@ -505,6 +512,8 @@ void WorkbookFragment::finalizeImport()
 
     // attach macros to registered objects now that all objects have been created.
     getBaseFilter().getVbaProject().attachMacros();
+
+    pModel->setLock(bWasLocked);
 }
 
 namespace {
commit f10cbeffba8dc52b971bc3f6644eb0cf4bbeb5eb
Author:     Balazs Varga <balazs.varga991 at gmail.com>
AuthorDate: Mon Mar 2 13:55:35 2020 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Mar 10 11:38:57 2020 +0100

    tdf#131060 tdf#117088 chart view: fix missing or truncated axis labels
    
    if we have enough space under the horizontal X axis.
    
    Note: allow truncation of vertical X axis labels only if they
    are text labels and the position is NEAR_AXIS or OUTSIDE_START.
    
    Regressions from commit 35d062f7879d5414334643cb90bff411726b2168
    (tdf#116163: Limit label height in chart if needed)
    and commit 26caf1bc59c81704f11225e3e431e412deb8c475
    (tdf#114179: Custom size and position of the chart wall)
    
    Change-Id: Idf86bc2b5482bb50a266cda57cc502621c2e08ed
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89829
    Tested-by: László Németh <nemeth at numbertext.org>
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit 7c300296dd727990455449b19b111b9fc49eadad)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90043
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index dc619d91ff66..594277b953f8 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -77,28 +77,29 @@ static void lcl_ResizeTextShapeToFitAvailableSpace( Reference< drawing::XShape >
                                              const AxisLabelProperties& rAxisLabelProperties,
                                              const OUString& rLabel,
                                              const tNameSequence& rPropNames,
-                                             const tAnySequence& rPropValues )
+                                             const tAnySequence& rPropValues,
+                                             const bool bIsHorizontalAxis )
 {
     uno::Reference< text::XTextRange > xTextRange( xShape2DText, uno::UNO_QUERY );
 
     if( !xTextRange.is() )
         return;
 
-    const sal_Int32 nFullHeight = rAxisLabelProperties.m_aFontReferenceSize.Height;
+    const sal_Int32 nFullSize = bIsHorizontalAxis ? rAxisLabelProperties.m_aFontReferenceSize.Height : rAxisLabelProperties.m_aFontReferenceSize.Width;
 
-    if( !nFullHeight || !rLabel.getLength() )
+    if( !nFullSize || !rLabel.getLength() )
         return;
 
-    sal_Int32 nMaxLabelsHeight = nFullHeight - rAxisLabelProperties.m_aMaximumSpaceForLabels.Height - rAxisLabelProperties.m_aMaximumSpaceForLabels.Y;
+    sal_Int32 nMaxLabelsSize = bIsHorizontalAxis ? rAxisLabelProperties.m_aMaximumSpaceForLabels.Height : rAxisLabelProperties.m_aMaximumSpaceForLabels.Width;
     const sal_Int32 nAvgCharWidth = xShape2DText->getSize().Width / rLabel.getLength();
-    const sal_Int32 nTextSize = ShapeFactory::getSizeAfterRotation( xShape2DText,
-                                            rAxisLabelProperties.fRotationAngleDegree ).Height;
+    const sal_Int32 nTextSize = bIsHorizontalAxis ? ShapeFactory::getSizeAfterRotation(xShape2DText, rAxisLabelProperties.fRotationAngleDegree).Height :
+                                                    ShapeFactory::getSizeAfterRotation(xShape2DText, rAxisLabelProperties.fRotationAngleDegree).Width;
 
     if( !nAvgCharWidth )
         return;
 
     const OUString sDots = "...";
-    const sal_Int32 nCharsToRemove = ( nTextSize - nMaxLabelsHeight ) / nAvgCharWidth + 1;
+    const sal_Int32 nCharsToRemove = ( nTextSize - nMaxLabelsSize ) / nAvgCharWidth + 1;
     sal_Int32 nNewLen = rLabel.getLength() - nCharsToRemove - sDots.getLength();
     // Prevent from showing only dots
     if (nNewLen < 0)
@@ -129,6 +130,7 @@ static Reference< drawing::XShape > createSingleLabel(
           , const AxisProperties& rAxisProperties
           , const tNameSequence& rPropNames
           , const tAnySequence& rPropValues
+          , const bool bIsHorizontalAxis
           )
 {
     if(rLabel.isEmpty())
@@ -143,7 +145,7 @@ static Reference< drawing::XShape > createSingleLabel(
                     ->createText( xTarget, aLabel, rPropNames, rPropValues, aATransformation );
 
     if( rAxisProperties.m_bLimitSpaceForLabels )
-        lcl_ResizeTextShapeToFitAvailableSpace(xShape2DText, rAxisLabelProperties, aLabel, rPropNames, rPropValues);
+        lcl_ResizeTextShapeToFitAvailableSpace(xShape2DText, rAxisLabelProperties, aLabel, rPropNames, rPropValues, bIsHorizontalAxis);
 
     LabelPositionHelper::correctPositionForRotation( xShape2DText
         , rAxisProperties.maLabelAlignment.meAlignment, rAxisLabelProperties.fRotationAngleDegree, rAxisProperties.m_bComplexCategories );
@@ -709,6 +711,21 @@ bool VCartesianAxis::createTextShapes(
     const bool bIsHorizontalAxis = pTickFactory->isHorizontalAxis();
     const bool bIsVerticalAxis = pTickFactory->isVerticalAxis();
 
+    if( m_bUseTextLabels && (m_aAxisProperties.m_eLabelPos == css::chart::ChartAxisLabelPosition_NEAR_AXIS ||
+        m_aAxisProperties.m_eLabelPos == css::chart::ChartAxisLabelPosition_OUTSIDE_START))
+    {
+        if (bIsHorizontalAxis)
+        {
+            rAxisLabelProperties.m_aMaximumSpaceForLabels.Y = pTickFactory->getXaxisStartPos().getY();
+            rAxisLabelProperties.m_aMaximumSpaceForLabels.Height = rAxisLabelProperties.m_aFontReferenceSize.Height - rAxisLabelProperties.m_aMaximumSpaceForLabels.Y;
+        }
+        else if (bIsVerticalAxis)
+        {
+            rAxisLabelProperties.m_aMaximumSpaceForLabels.X = 0;
+            rAxisLabelProperties.m_aMaximumSpaceForLabels.Width = pTickFactory->getXaxisStartPos().getX();
+        }
+    }
+
     if (!isBreakOfLabelsAllowed(rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis) &&
         !isAutoStaggeringOfLabelsAllowed(rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis) &&
         !rAxisLabelProperties.isStaggered())
@@ -738,7 +755,7 @@ bool VCartesianAxis::createTextShapes(
         // recalculate the nLimitedSpaceForText in case of 90 and 270 degree if the text break is true
         if ( rAxisLabelProperties.fRotationAngleDegree == 90.0 || rAxisLabelProperties.fRotationAngleDegree == 270.0 )
         {
-            nLimitedSpaceForText = rAxisLabelProperties.m_aFontReferenceSize.Height - pTickFactory->getXaxisStartPos().getY();
+            nLimitedSpaceForText = rAxisLabelProperties.m_aMaximumSpaceForLabels.Height;
             m_aAxisProperties.m_bLimitSpaceForLabels = false;
         }
 
@@ -853,7 +870,7 @@ bool VCartesianAxis::createTextShapes(
             pTickInfo->xTextShape = createSingleLabel( m_xShapeFactory, xTarget
                                     , aAnchorScreenPosition2D, aLabel
                                     , rAxisLabelProperties, m_aAxisProperties
-                                    , aPropNames, aPropValues );
+                                    , aPropNames, aPropValues, bIsHorizontalAxis );
         if(!pTickInfo->xTextShape.is())
             continue;
 
@@ -1022,7 +1039,7 @@ bool VCartesianAxis::createTextShapesSimple(
             pTickInfo->xTextShape = createSingleLabel( m_xShapeFactory, xTarget
                                     , aAnchorScreenPosition2D, aLabel
                                     , rAxisLabelProperties, m_aAxisProperties
-                                    , aPropNames, aPropValues );
+                                    , aPropNames, aPropValues, bIsHorizontalAxis );
         if(!pTickInfo->xTextShape.is())
             continue;
 
diff --git a/sw/qa/extras/layout/data/testTruncatedAxisLabel.odt b/sw/qa/extras/layout/data/testTruncatedAxisLabel.odt
new file mode 100644
index 000000000000..f8eb74904102
Binary files /dev/null and b/sw/qa/extras/layout/data/testTruncatedAxisLabel.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index f9698d48505a..36e34918f9a3 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2410,6 +2410,30 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf122800)
     // This failed, if the textarray length of the first axis label not 22.
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTruncatedAxisLabel)
+{
+    SwDoc* pDoc = createDoc("testTruncatedAxisLabel.odt");
+    SwDocShell* pShell = pDoc->GetDocShell();
+
+    // Dump the rendering of the first page as an XML file.
+    std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+    MetafileXmlDump dumper;
+    xmlDocPtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+    CPPUNIT_ASSERT(pXmlDoc);
+
+    // test the X axis label visibility
+    assertXPathContent(
+        pXmlDoc,
+        "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/textarray[1]/text",
+        "Long axis label truncated 1");
+
+    // test the Y axis label visibility
+    assertXPathContent(
+        pXmlDoc,
+        "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/textarray[3]/text",
+        "-5.00");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf128996)
 {
     SwDoc* pDoc = createDoc("tdf128996.docx");
commit 3885348e2cbd4170f6c183927d01b1934e4d4fa0
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu Feb 27 14:59:50 2020 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Mar 10 11:35:15 2020 +0100

    sw: DOCX export: fix first-line indent of list items
    
    The problem is that since CVS import, if a SwTextNode has a first-line
    indent and is in a list or outline that has LABEL_WIDTH_AND_POSITION
    mode, then MSWordExportBase::OutputTextNode() will throw away the node's
    first-line indent and overwrite it with the numbering's.
    
    Experiments indicate that adding the numbering's value to the node's
    value fixes most cases, but RTL still doesn't work in many cases.
    
    Change-Id: I9707f475dac4e501642ebaf51c0117107fd34a3b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89634
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 74e3c95b9b628a0b326790b62b4e378a12d02997)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89642
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/data/Hau_min_list2.fodt b/sw/qa/extras/ooxmlexport/data/Hau_min_list2.fodt
new file mode 100644
index 000000000000..715fbcde8bfc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Hau_min_list2.fodt
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xm
 lns:xhtml="http://www.w3.org/1999/xhtml" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+  <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
+  <style:font-face style:name="Arial" svg:font-family="Arial"/>
+  <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+  <style:font-face style:name="Lucida Sans Unicode" svg:font-family="'Lucida Sans Unicode'" style:font-pitch="variable"/>
+  <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-pitch="variable"/>
+  <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+  <style:default-style style:family="graphic">
+   <style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+   <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+    <style:tab-stops/>
+   </style:paragraph-properties>
+   <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE"/>
+  </style:default-style>
+  <style:default-style style:family="paragraph">
+   <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+   <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+  </style:default-style>
+  <style:default-style style:family="table">
+   <style:table-properties table:border-model="collapsing"/>
+  </style:default-style>
+  <style:default-style style:family="table-row">
+   <style:table-row-properties fo:keep-together="auto"/>
+  </style:default-style>
+  <style:style style:name="Standard" style:family="paragraph" style:class="text">
+   <style:text-properties fo:font-size="11pt"/>
+  </style:style>
+  <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+   <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" style:line-height-at-least="0.46cm"/>
+  </style:style>
+  <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+   <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/>
+   <style:text-properties style:font-name="Arial1" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Lucida Sans Unicode" style:font-family-asian="'Lucida Sans Unicode'" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+  </style:style>
+  <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+   <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+  </style:style>
+  <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+   <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+  </style:style>
+  <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
+   <style:text-properties fo:font-size="115%" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
+   <style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
+   <style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+  <style:style style:name="Frame" style:family="graphic">
+   <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
+  </style:style>
+  <text:outline-style style:name="Outline">
+   <text:outline-level-style text:level="1" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="2" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="3" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="4" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="5" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="6" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="7" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="8" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="9" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="10" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+  </text:outline-style>
+  <text:list-style style:name="Numbering_20_123" style:display-name="Numbering 123">
+   <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="">
+    <style:list-level-properties text:min-label-width="1cm" text:min-label-distance="0.381cm"/>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="">
+    <style:list-level-properties text:space-before="1cm" text:min-label-distance="0.381cm"/>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-format="">
+    <style:list-level-properties text:space-before="1cm" text:min-label-width="1cm" text:min-label-distance="0.381cm"/>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+    <style:list-level-properties text:min-label-width="1cm" text:min-label-distance="0.381cm"/>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+    <style:list-level-properties text:space-before="1cm" text:min-label-distance="0.381cm"/>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+    <style:list-level-properties text:space-before="1cm" text:min-label-width="1cm" text:min-label-distance="0.381cm"/>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+    <style:list-level-properties text:min-label-distance="0.381cm" fo:text-align="end"/>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+    <style:list-level-properties text:min-label-distance="0.381cm" fo:text-align="end"/>
+   </text:list-level-style-number>
+  </text:list-style>
+ </office:styles>
+ <office:automatic-styles>
+  <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+  </style:style>
+  <style:style style:name="P2" style:family="paragraph" style:parent-style-name="List" style:list-style-name="Numbering_20_123">
+   <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="-0.704cm" style:auto-text-indent="false">
+    <style:tab-stops/>
+   </style:paragraph-properties>
+  </style:style>
+  <style:style style:name="P6" style:family="paragraph" style:parent-style-name="List" style:list-style-name="Numbering_20_123">
+   <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="end" style:justify-single-word="false" fo:text-indent="-0.704cm" style:auto-text-indent="false" style:writing-mode="rl-tb">
+    <style:tab-stops/>
+   </style:paragraph-properties>
+  </style:style>
+  <style:style style:name="P8" style:family="paragraph" style:parent-style-name="List" style:list-style-name="Numbering_20_123">
+   <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0.741cm" style:auto-text-indent="false"/>
+  </style:style>
+  <style:style style:name="P11" style:family="paragraph" style:parent-style-name="List" style:list-style-name="Numbering_20_123">
+   <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="end" style:justify-single-word="false" fo:text-indent="0.741cm" style:auto-text-indent="false" style:writing-mode="rl-tb"/>
+  </style:style>
+  <style:page-layout style:name="pm1">
+   <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" fo:background-color="transparent" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" draw:fill="none" draw:fill-color="#99ccff" style:footnote-max-height="0cm">
+    <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+    <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+   </style:page-layout-properties>
+   <style:header-style>
+    <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+   </style:header-style>
+   <style:footer-style/>
+  </style:page-layout>
+  <style:page-layout style:name="pm2">
+   <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+    <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+    <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+   </style:page-layout-properties>
+   <style:header-style>
+    <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+   </style:header-style>
+   <style:footer-style/>
+  </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+  <style:master-page style:name="Standard" style:page-layout-name="pm1">
+  </style:master-page>
+ </office:master-styles>
+ <office:body>
+  <office:text>
+   <office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
+   <text:sequence-decls>
+    <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+   </text:sequence-decls>
+   <text:list xml:id="list2248535956" text:style-name="Numbering_20_123">
+    <text:list-item>
+     <text:p text:style-name="P2">III.<text:tab/>Level 1</text:p>
+     <text:list>
+      <text:list-item>
+       <text:p text:style-name="P2">level 2 has width</text:p>
+       <text:list>
+        <text:list-item>
+         <text:p text:style-name="P2">level 3 has indent</text:p>
+         <text:list>
+          <text:list-item>
+           <text:p text:style-name="P2">level 4 has width + indent</text:p>
+          </text:list-item>
+         </text:list>
+        </text:list-item>
+       </text:list>
+      </text:list-item>
+     </text:list>
+    </text:list-item>
+    <text:list-item>
+     <text:p text:style-name="P8">level 1 with positive on para</text:p>
+     <text:list>
+      <text:list-item>
+       <text:p text:style-name="P8">level 2</text:p>
+       <text:list>
+        <text:list-item>
+         <text:p text:style-name="P8">level 3</text:p>
+         <text:list>
+          <text:list-item>
+           <text:p text:style-name="P8">level 4</text:p>
+           <text:list>
+            <text:list-item>
+             <text:p text:style-name="P2">III.<text:tab/>Level 5</text:p>
+             <text:list>
+              <text:list-item>
+               <text:p text:style-name="P2">level 6 has width</text:p>
+               <text:list>
+                <text:list-item>
+                 <text:p text:style-name="P2">level 7 has indent</text:p>
+                 <text:list>
+                  <text:list-item>
+                   <text:p text:style-name="P2">level 8 has width + indent</text:p>
+                  </text:list-item>
+                 </text:list>
+                </text:list-item>
+               </text:list>
+              </text:list-item>
+             </text:list>
+            </text:list-item>
+            <text:list-item>
+             <text:p text:style-name="P8">level 5 with positive on para</text:p>
+             <text:list>
+              <text:list-item>
+               <text:p text:style-name="P8">level 6</text:p>
+               <text:list>
+                <text:list-item>
+                 <text:p text:style-name="P8">level 7</text:p>
+                 <text:list>
+                  <text:list-item>
+                   <text:p text:style-name="P8">level 8</text:p>
+                  </text:list-item>
+                 </text:list>
+                </text:list-item>
+               </text:list>
+              </text:list-item>
+             </text:list>
+            </text:list-item>
+           </text:list>
+          </text:list-item>
+         </text:list>
+        </text:list-item>
+       </text:list>
+      </text:list-item>
+     </text:list>
+    </text:list-item>
+   </text:list>
+   <text:p text:style-name="P1"/>
+   <text:list xml:id="list131919252068408" text:continue-numbering="true" text:style-name="Numbering_20_123">
+    <text:list-item>
+     <text:p text:style-name="P6">III.<text:tab/>Level 1</text:p>
+     <text:list>
+      <text:list-item>
+       <text:p text:style-name="P6">level 2 has width</text:p>
+       <text:list>
+        <text:list-item>
+         <text:p text:style-name="P6">level 3 has indent</text:p>
+         <text:list>
+          <text:list-item>
+           <text:p text:style-name="P6">level 4 has width + indent</text:p>
+          </text:list-item>
+         </text:list>
+        </text:list-item>
+       </text:list>
+      </text:list-item>
+     </text:list>
+    </text:list-item>
+    <text:list-item>
+     <text:p text:style-name="P11">level 1 with positive on para</text:p>
+     <text:list>
+      <text:list-item>
+       <text:p text:style-name="P11">level 2</text:p>
+       <text:list>
+        <text:list-item>
+         <text:p text:style-name="P11">level 3</text:p>
+         <text:list>
+          <text:list-item>
+           <text:p text:style-name="P11">level 4</text:p>
+           <text:list>
+            <text:list-item>
+             <text:p text:style-name="P6">III.<text:tab/>Level 5</text:p>
+             <text:list>
+              <text:list-item>
+               <text:p text:style-name="P6">level 6 has width</text:p>
+               <text:list>
+                <text:list-item>
+                 <text:p text:style-name="P6">level 7 has indent</text:p>
+                 <text:list>
+                  <text:list-item>
+                   <text:p text:style-name="P6">level 8 has width + indent</text:p>
+                  </text:list-item>
+                 </text:list>
+                </text:list-item>
+               </text:list>
+              </text:list-item>
+             </text:list>
+            </text:list-item>
+            <text:list-item>
+             <text:p text:style-name="P11">level 5 with positive on para</text:p>
+             <text:list>
+              <text:list-item>
+               <text:p text:style-name="P11">level 6</text:p>
+               <text:list>
+                <text:list-item>
+                 <text:p text:style-name="P11">level 7</text:p>
+                 <text:list>
+                  <text:list-item>
+                   <text:p text:style-name="P11">level 8</text:p>
+                  </text:list-item>
+                 </text:list>
+                </text:list-item>
+               </text:list>
+              </text:list-item>
+             </text:list>
+            </text:list-item>
+           </text:list>
+          </text:list-item>
+         </text:list>
+        </text:list-item>
+       </text:list>
+      </text:list-item>
+     </text:list>
+    </text:list-item>
+   </text:list>
+   <text:p text:style-name="P1"/>
+  </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index d4aa8d886626..7ec5da49be9f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -934,6 +934,108 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125546, "tdf125546.docx")
     assertXPath(pXmlDoc, "//w:rPrChange", 2);
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testLabelWidthAndPosition_Left_FirstLineIndent, "Hau_min_list2.fodt")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+    // list is LABEL_WIDTH_AND_POSITION with SvxAdjust::Left
+    // I) LTR
+    // a) all LTR cases with no number text look good in Word
+    // 1) negative first line indent on paragraph:
+    // no list width/indent: this one was 0 previously; this looks good
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind", "start", "0");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind", "hanging", "399");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind", "end", "0");
+    // list width:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:ind", "start", "567");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:ind", "hanging", "966");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:ind", "end", "0");
+    // list indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:ind", "start", "567");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:ind", "hanging", "399");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:ind", "end", "0");
+    // list width + list indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:ind", "start", "1134");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:ind", "hanging", "966");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:ind", "end", "0");
+    // 2) positive first line indent on paragraph:
+    // no list width/indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:ind", "start", "0");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:ind", "firstLine", "420");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:ind", "end", "0");
+    // list width:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:pPr/w:ind", "start", "567");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:pPr/w:ind", "hanging", "147");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:pPr/w:ind", "end", "0");
+    // list indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind", "start", "567");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind", "firstLine", "420");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind", "end", "0");
+    // list width + list indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr/w:ind", "start", "1134");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr/w:ind", "hanging", "147");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr/w:ind", "end", "0");
+    // b) all LTR cases with number text: the indent looks good but some tabs are wrong
+    // 1) negative first line indent on paragraph:
+    // no list width/indent: this one was 0 previously; this looks good
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:ind", "start", "0");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:ind", "hanging", "399");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:ind", "end", "0");
+    // list width:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr/w:ind", "start", "567");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr/w:ind", "hanging", "966");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr/w:ind", "end", "0");
+    // list indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:ind", "start", "567");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:ind", "hanging", "399");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:ind", "end", "0");
+    // list width + list indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[12]/w:pPr/w:ind", "start", "1134");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[12]/w:pPr/w:ind", "hanging", "966");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[12]/w:pPr/w:ind", "end", "0");
+    // 2) positive first line indent on paragraph:
+    // no list width/indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[13]/w:pPr/w:ind", "start", "0");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[13]/w:pPr/w:ind", "firstLine", "420");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[13]/w:pPr/w:ind", "end", "0");
+    // list width:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[14]/w:pPr/w:ind", "start", "567");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[14]/w:pPr/w:ind", "hanging", "147");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[14]/w:pPr/w:ind", "end", "0");
+    // list indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[15]/w:pPr/w:ind", "start", "567");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[15]/w:pPr/w:ind", "firstLine", "420");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[15]/w:pPr/w:ind", "end", "0");
+    // list width + list indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[16]/w:pPr/w:ind", "start", "1134");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[16]/w:pPr/w:ind", "hanging", "147");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[16]/w:pPr/w:ind", "end", "0");
+    // (w:p[17] is empty)
+    // I) RTL
+    // a) only RTL cases with no number text and no width/indent look good in Word
+    // 1) negative first line indent on paragraph:
+    // no list width/indent
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[18]/w:pPr/w:ind", "start", "0");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[18]/w:pPr/w:ind", "hanging", "399");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[18]/w:pPr/w:ind", "end", "0");
+    // 2) positive first line indent on paragraph:
+    // no list width/indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[22]/w:pPr/w:ind", "start", "0");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[22]/w:pPr/w:ind", "firstLine", "420");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[22]/w:pPr/w:ind", "end", "0");
+    // b) RTL cases with number text: the indent looks good but some tabs are wrong
+    // 1) negative first line indent on paragraph:
+    // no list width/indent
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[26]/w:pPr/w:ind", "start", "0");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[26]/w:pPr/w:ind", "hanging", "399");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[26]/w:pPr/w:ind", "end", "0");
+    // 2) positive first line indent on paragraph:
+    // no list width/indent:
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[30]/w:pPr/w:ind", "start", "0");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[30]/w:pPr/w:ind", "firstLine", "420");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[30]/w:pPr/w:ind", "end", "0");
+    // TODO: other cases
+}
+
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf124604, "tdf124604.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index cac4cdf247e1..05a50e7f8b68 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2816,9 +2816,13 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
                                             SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
                     {
                         if (bParaRTL)
-                            aLR.SetTextFirstLineOfstValue(pFormat->GetAbsLSpace() - pFormat->GetFirstLineOffset()); //TODO: overflow
+                        {
+                            aLR.SetTextFirstLineOfstValue(aLR.GetTextFirstLineOfst() + pFormat->GetAbsLSpace() - pFormat->GetFirstLineOffset()); //TODO: overflow
+                        }
                         else
-                            aLR.SetTextFirstLineOfst(GetWordFirstLineOffset(*pFormat));
+                        {
+                            aLR.SetTextFirstLineOfst(aLR.GetTextFirstLineOfst() + GetWordFirstLineOffset(*pFormat));
+                        }
                     }
 
                     // correct fix for issue i94187
commit 20dee53e0c2535d1a75e9a32fec49c0fcb79ac54
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Mar 5 14:21:43 2020 +0000
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Mar 10 11:29:19 2020 +0100

    crash after master document navigator update
    
    master document navigator will otherwise crash on using update
    selection/all/etc if there is no tooltip requested (which does a "hard" update)
    before user uses the up/down buttons to move the areas around
    
    Change-Id: I913df2d0922fbabdf3409a25c30b4cce6113dc8d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90028
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 2b056fca6ffe..d2c5357e6f01 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -793,6 +793,8 @@ IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu, bool)
 
 void    SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
 {
+    bool bUpdateHard = false;
+
     SvTreeListEntry* pEntry = FirstSelected();
     SwGlblDocContent* pCont = pEntry ? static_cast<SwGlblDocContent*>(pEntry->GetUserData()) : nullptr;
     // If a RequestHelp is called during the dialogue,
@@ -828,12 +830,13 @@ void    SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
                     m_pActiveShell->UpdateTableOf(*pContent->GetTOX());
                 pSelEntry = NextSelected(pSelEntry);
             }
-
+            bUpdateHard = true;
         }
         break;
         case CTX_UPDATE_INDEX:
         {
             nSlot = FN_UPDATE_TOX;
+            bUpdateHard = true;
         }
         break;
         case CTX_UPDATE_LINK:
@@ -843,6 +846,7 @@ void    SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
             if(CTX_UPDATE_ALL == nSelectedPopupEntry)
                 nSlot = FN_UPDATE_TOX;
             pCont = nullptr;
+            bUpdateHard = true;
         }
         break;
         case CTX_EDIT:
@@ -1014,7 +1018,7 @@ void    SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
         GotoContent(pCont);
     if(nSlot)
         rDispatch.Execute(nSlot);
-    if(Update( false ))
+    if (Update(bUpdateHard))
         Display();
 }
 
@@ -1098,7 +1102,7 @@ bool    SwGlobalTree::Update(bool bHard)
 {
     SwView* pActView = GetParentWindow()->GetCreateView();
     bool bRet = false;
-    if(pActView && pActView->GetWrtShellPtr())
+    if (pActView && pActView->GetWrtShellPtr())
     {
         const SwWrtShell* pOldShell = m_pActiveShell;
         m_pActiveShell = pActView->GetWrtShellPtr();
@@ -1153,7 +1157,6 @@ bool    SwGlobalTree::Update(bool bHard)
                 *m_pSwGlblDocContents = std::move( *pTempContents );
             }
         }
-
     }
     else
     {
commit 358d34e12d8f88543ddca8c0e852712e6ef1b10c
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Mar 7 23:15:13 2020 +0100
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Mar 10 07:26:33 2020 +0100

    tdf#131212: Implement change user password in Firebird
    
    Command retrieved from https://firebirdsql.org/refdocs/langrefupd25-security-sql-user-mgmt.html
    
    Change-Id: Idd16c74cd3b00f8a5c9cc135e11ac032811557f3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90177
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90182

diff --git a/connectivity/source/drivers/firebird/User.cxx b/connectivity/source/drivers/firebird/User.cxx
index 024d7eb4958a..a2e6f71e3bed 100644
--- a/connectivity/source/drivers/firebird/User.cxx
+++ b/connectivity/source/drivers/firebird/User.cxx
@@ -16,15 +16,22 @@ using namespace ::connectivity::sdbcx;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::sdbc;
 
-User::User():
+User::User(const css::uno::Reference< css::sdbc::XConnection >& rConnection):
     OUser(true) // Case Sensitive
+    , m_xConnection(rConnection)
 {}
 
-User::User(const OUString& rName):
+User::User(const css::uno::Reference< css::sdbc::XConnection >& rConnection, const OUString& rName):
     OUser(rName,
           true) // Case Sensitive
+    , m_xConnection(rConnection)
 {}
 
+void User::changePassword(const OUString&, const OUString& newPassword)
+{
+    m_xConnection->createStatement()->execute("ALTER USER " + m_Name + " PASSWORD '" + newPassword + "'");
+}
+
 //----- IRefreshableGroups ----------------------------------------------------
 void User::refreshGroups()
 {
diff --git a/connectivity/source/drivers/firebird/User.hxx b/connectivity/source/drivers/firebird/User.hxx
index d2cc091000b9..ff1de34ea5fb 100644
--- a/connectivity/source/drivers/firebird/User.hxx
+++ b/connectivity/source/drivers/firebird/User.hxx
@@ -11,6 +11,7 @@
 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_USER_HXX
 
 #include <connectivity/sdbcx/VUser.hxx>
+#include <com/sun/star/sdbc/XConnection.hpp>
 
 namespace connectivity
 {
@@ -22,17 +23,19 @@ namespace connectivity
          */
         class User: public ::connectivity::sdbcx::OUser
         {
+            css::uno::Reference< css::sdbc::XConnection > m_xConnection;
 
         public:
             /**
              * Create a "new" descriptor, which isn't yet in the database.
              */
-            User();
+            User(const css::uno::Reference< css::sdbc::XConnection >& rConnection);
             /**
              * For a user that already exists in the db.
              */
-            User(const OUString& rName);
+            User(const css::uno::Reference< css::sdbc::XConnection >& rConnection, const OUString& rName);
 
+            virtual void SAL_CALL changePassword(const OUString&, const OUString& newPassword) override;
             // IRefreshableGroups::
             virtual void refreshGroups() override;
         };
diff --git a/connectivity/source/drivers/firebird/Users.cxx b/connectivity/source/drivers/firebird/Users.cxx
index 0423d9c33181..061200fde5d3 100644
--- a/connectivity/source/drivers/firebird/Users.cxx
+++ b/connectivity/source/drivers/firebird/Users.cxx
@@ -47,7 +47,7 @@ void Users::impl_refresh()
 
 ObjectType Users::createObject(const OUString& rName)
 {
-    return new User(rName);
+    return new User(m_xMetaData->getConnection(), rName);
 }
 
 uno::Reference< XPropertySet > Users::createDescriptor()
@@ -55,7 +55,7 @@ uno::Reference< XPropertySet > Users::createDescriptor()
     // There is some internal magic so that the same class can be used as either
     // a descriptor or as a normal user. See VUser.cxx for the details. In our
     // case we just need to ensure we use the correct constructor.
-    return new User;
+    return new User(m_xMetaData->getConnection());
 }
 
 //----- XAppend ---------------------------------------------------------------
commit 62cb87d17ca8cbcccbcadbd36c7697a5074d55ec
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 6 12:35:53 2020 +0000
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Mar 9 11:12:06 2020 +0100

    failure seen as setting length of -1 and returning null
    
    Change-Id: I84e7b3a4ad63e70499910f09bd4c70a43137fa10
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90103
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit beabc0deddce2a5ce0a9f9b20316a7798a08318c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90031
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 111de9935891..786aa40474d6 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3392,8 +3392,12 @@ public:
             gint length(0);
             const guchar *rawdata = gtk_selection_data_get_data_with_length(m_pData,
                                                                             &length);
-            css::uno::Sequence<sal_Int8> aSeq(reinterpret_cast<const sal_Int8*>(rawdata), length);
-            aRet <<= aSeq;
+            // seen here was rawhide == nullptr and length set to -1
+            if (rawdata)
+            {
+                css::uno::Sequence<sal_Int8> aSeq(reinterpret_cast<const sal_Int8*>(rawdata), length);
+                aRet <<= aSeq;
+            }
         }
 
         gtk_selection_data_free(m_pData);
commit 92438b37a470b603642775fb44dc08b8f6b78042
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Mar 8 13:58:35 2020 +0100
Commit:     Lionel Elie Mamane <lionel at mamane.lu>
CommitDate: Sun Mar 8 18:27:43 2020 +0100

    tdf#131217: position arg in Blob::getBytes begins at 1 not 0 (Firebird)
    
    See part of bt here:
    https://bugs.documentfoundation.org/show_bug.cgi?id=131217#c5
    
    According to:
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=38ce989b4f9d2aead097e5a2e95b819def7e2624
    position can't be 0
    
    Change-Id: Ia7bf973b820b8642b45eb0bbc125011cab99de9c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90186
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    (cherry picked from commit bb51f81507a405266d251297684bd3ab60998197)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90036
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>

diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index b2ca13fb56f3..3d0401678d60 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -1247,7 +1247,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
             if (xDescriptionBlob.is())
             {
                 sal_Int32 aBlobLength = static_cast<sal_Int32>(xDescriptionBlob->length());
-                aDescription = OUString(reinterpret_cast<char*>(xDescriptionBlob->getBytes(0, aBlobLength).getArray()),
+                aDescription = OUString(reinterpret_cast<char*>(xDescriptionBlob->getBytes(1, aBlobLength).getArray()),
                                         aBlobLength,
                                         RTL_TEXTENCODING_UTF8);
             }
@@ -1414,7 +1414,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
                 // TODO: we should actually be using CLOB here instead.
                 // However we haven't implemented CLOB yet, so use BLOB.
                 sal_Int32 aBlobLength = static_cast<sal_Int32>(xBlob->length());
-                sDescription = OUString(reinterpret_cast<char*>(xBlob->getBytes(0, aBlobLength).getArray()),
+                sDescription = OUString(reinterpret_cast<char*>(xBlob->getBytes(1, aBlobLength).getArray()),
                                         aBlobLength,
                                         RTL_TEXTENCODING_UTF8);
             }
commit 58bbb4dc19f939e1173b9c7ed93878a006311c4d
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Mar 8 00:25:16 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Mar 8 17:08:52 2020 +0100

    tdf#131210: avoid infinite loop in 'Date acceptance patterns'
    
    Change-Id: Ib049b5d44f91e2b36c068e1ef351ae81707d885e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90035
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 256aacc6b888..41af4ee7cf62 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -7698,11 +7698,13 @@ public:
 
     virtual void replace_selection(const OUString& rText) override
     {
+        disable_notify_events();
         gtk_editable_delete_selection(GTK_EDITABLE(m_pEntry));
         OString sText(OUStringToOString(rText, RTL_TEXTENCODING_UTF8));
         gint position = gtk_editable_get_position(GTK_EDITABLE(m_pEntry));
         gtk_editable_insert_text(GTK_EDITABLE(m_pEntry), sText.getStr(), sText.getLength(),
                                  &position);
+        enable_notify_events();
     }
 
     virtual void set_position(int nCursorPos) override
commit f96d0ae4a0e768995ce5a27ccc524112163dff80
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Thu Mar 5 18:40:42 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Mar 8 15:13:21 2020 +0100

    tdf#131137: Fix Checkbox "Do not distort objects in curve" does nothing
    
    includes too:
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=9e8839c934da9744b8f584debc0ad026e49f4a28
    which was just an oops.
    
    See https://bugs.documentfoundation.org/show_bug.cgi?id=131137#c3
    and above all
    https://bugs.documentfoundation.org/show_bug.cgi?id=131137#c4
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90054
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    (cherry picked from commit 6d9930f307f08d2c32ee1bcca577cf643955cec9)
    
    Change-Id: Ibd38d13be7ef6956d6c26e6f5f71a6751a56b25e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90029
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 2adcd977111f..2331510efb5c 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -198,7 +198,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, weld::DialogController*
     , m_xHeightLb(m_xBuilder->weld_label("heightlbl"))
     , m_xFiInfo2(m_xBuilder->weld_label("info2"))
     , m_xMtrFldOriginalHeight(m_xBuilder->weld_metric_spin_button("metricHeightFields", FieldUnit::MM))
-    , m_xCbxDistrot(m_xBuilder->weld_check_button("distrotcb"))
+    , m_xCbxDistort(m_xBuilder->weld_check_button("distortcb"))
     , m_xMtrFldInfo1(m_xBuilder->weld_metric_spin_button("metricInfo1Fields", FieldUnit::MM))
     , m_xMtrFldInfo2(m_xBuilder->weld_metric_spin_button("metricInfo2Fields", FieldUnit::MM))
 {
@@ -219,7 +219,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, weld::DialogController*
     SetFieldUnit( *m_xMtrFldTabstop , eFUnit );
 
     // Impress is default mode, let' hide the entire scale frame etc.
-    m_xCbxDistrot->hide();
+    m_xCbxDistort->hide();
     m_xScaleFrame->hide();
 
     // fill ListBox with metrics
@@ -342,7 +342,8 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs )
         m_xCbxEnableSdremote->get_state_changed_from_saved()        ||
         m_xCbxEnablePresenterScreen->get_state_changed_from_saved() ||
         m_xCbxCompatibility->get_state_changed_from_saved()         ||
-        m_xCbxUsePrinterMetrics->get_state_changed_from_saved() )
+        m_xCbxUsePrinterMetrics->get_state_changed_from_saved()     ||
+        m_xCbxDistort->get_state_changed_from_saved())
     {
         SdOptionsMiscItem aOptsItem;
 
@@ -359,6 +360,7 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs )
             m_xCbxUsePrinterMetrics->get_active()
             ? css::document::PrinterIndependentLayout::DISABLED
             : css::document::PrinterIndependentLayout::ENABLED);
+        aOptsItem.GetOptionsMisc().SetCrookNoContortion( m_xCbxDistort->get_active() );
         rAttrs->Put( aOptsItem );
 
         bModified = true;
@@ -410,6 +412,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
     m_xCbxEnablePresenterScreen->set_active( aOptsItem.GetOptionsMisc().IsEnablePresenterScreen() );
     m_xCbxCompatibility->set_active( aOptsItem.GetOptionsMisc().IsSummationOfParagraphs() );
     m_xCbxUsePrinterMetrics->set_active( aOptsItem.GetOptionsMisc().GetPrinterIndependentLayout()==1 );
+    m_xCbxDistort->set_active( aOptsItem.GetOptionsMisc().IsCrookNoContortion() );
     m_xCbxStartWithTemplate->save_state();
     m_xCbxMarkedHitMovesAlways->save_state();
     m_xCbxQuickEdit->save_state();
@@ -421,6 +424,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
     m_xCbxEnablePresenterScreen->save_state();
     m_xCbxCompatibility->save_state();
     m_xCbxUsePrinterMetrics->save_state();
+    m_xCbxDistort->save_state();
 
     // metric
     sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC );
@@ -519,7 +523,7 @@ void SdTpOptionsMisc::SetDrawMode()
     m_xMtrFldOriginalWidth->show();
     m_xFiInfo2->show();
     m_xMtrFldOriginalHeight->show();
-    m_xCbxDistrot->show();
+    m_xCbxDistort->show();
     m_xCbxCompatibility->hide();
 }
 
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index 1cc5a88f2ffa..d66a5317e6b1 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -102,7 +102,7 @@ private:
     std::unique_ptr<weld::Label> m_xHeightLb;
     std::unique_ptr<weld::Label> m_xFiInfo2;
     std::unique_ptr<weld::MetricSpinButton> m_xMtrFldOriginalHeight;
-    std::unique_ptr<weld::CheckButton> m_xCbxDistrot;
+    std::unique_ptr<weld::CheckButton> m_xCbxDistort;
     std::unique_ptr<weld::MetricSpinButton> m_xMtrFldInfo1;
     std::unique_ptr<weld::MetricSpinButton> m_xMtrFldInfo2;
 
diff --git a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
index 064ff490b914..6c0365bd9f10 100644
--- a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
+++ b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
@@ -287,8 +287,8 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="distrotcb">
-                    <property name="label" translatable="yes" context="optimpressgeneralpage|distrotcb">Do not distort objects in curve</property>
+                  <object class="GtkCheckButton" id="distortcb">
+                    <property name="label" translatable="yes" context="optimpressgeneralpage|distortcb">Do not distort objects in curve</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
commit ee5a599516e4c9480b5dbd0a471baa237c74b53d
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Fri Mar 6 18:15:18 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Mar 7 15:44:45 2020 +0100

    tdf#131164: Fix crash on Tools>User Administration (Firebird)
    
    see https://bugs.documentfoundation.org/show_bug.cgi?id=131164#c8
    
    Change-Id: If55a7b015e4e14575c3933a98c70ed4aaf4d7c73
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90123
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    (cherry picked from commit dada19a89cbdc5f089fe1200275a1688a1ff1967)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90032
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/connectivity/source/drivers/firebird/Catalog.cxx b/connectivity/source/drivers/firebird/Catalog.cxx
index 7dc3593d577a..6207625296f6 100644
--- a/connectivity/source/drivers/firebird/Catalog.cxx
+++ b/connectivity/source/drivers/firebird/Catalog.cxx
@@ -71,8 +71,8 @@ void Catalog::refreshUsers()
 {
     OUString const sSql("SELECT DISTINCT RDB$USER FROM RDB$USER_PRIVILEGES");
 
-    uno::Reference< XResultSet > xUsers = m_xMetaData->getConnection()
-                                            ->createStatement()->executeQuery(sSql);
+    Reference<XStatement> xStmt= m_xMetaData->getConnection()->createStatement();
+    uno::Reference< XResultSet > xUsers = xStmt->executeQuery(sSql);
 
     if (!xUsers.is())
         return;
commit 2478e861e221b2080309614ca7b29ca6c06af92f
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Mon Feb 17 10:52:11 2020 +0300
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Mar 6 22:20:41 2020 +0100

    tdf#129096: Document Recovery: Use TypeDetection on load
    
    Loading of recovered document happend before via XFilter::filter
    is not updating media descriptor of document. But this is
    important for password protected documents to store entered password
    and used encryption type.
    
    To avoid this problem let's use TypeDetection which during its work
    will ask user for password and store all the info in modified media
    descriptor before actual recovery attempt.
    
    Change-Id: Ide2ebf0955e0937cdc7c9d7165593b71f904649b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88844
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Jenkins
    (cherry picked from commit 8461127750e1fe92a615409505256132e54fb8e8)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89788
    Reviewed-by: Vasily Melenchuk <vasily.melenchuk at cib.de>

diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 74b62628ba58..78129e97f7ba 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -57,6 +57,7 @@
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
 #include <com/sun/star/document/XDocumentRecovery.hpp>
+#include <com/sun/star/document/XExtendedFilterDetection.hpp>
 #include <com/sun/star/util/XCloseable.hpp>
 #include <com/sun/star/awt/XWindow2.hpp>
 #include <com/sun/star/task/XStatusIndicatorFactory.hpp>
@@ -3339,6 +3340,37 @@ void AutoRecovery::implts_openOneDoc(const OUString&               sURL       ,
         }
         else
         {
+            OUString sFilterName;
+            lDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] >>= sFilterName;
+            if (!sFilterName.isEmpty()
+                && (   sFilterName == "Calc MS Excel 2007 XML"
+                    || sFilterName == "Impress MS PowerPoint 2007 XML"
+                    || sFilterName == "MS Word 2007 XML"))
+                // TODO: Propbably need to check other affected formats + templates?
+            {
+                // tdf#129096: in case of recovery of password protected OOXML document it is done not
+                // the same way as ordinal loading. Inside XDocumentRecovery::recoverFromFile
+                // there is a call to XFilter::filter which has constant media descriptor and thus
+                // all encryption data used in document is lost. To avoid this try to walkaround
+                // with explicit call to FormatDetector. It will try to load document, prompt for password
+                // and store this info in media descriptor we will use for recoverFromFile call.
+                Reference< css::document::XExtendedFilterDetection > xDetection(
+                    m_xContext->getServiceManager()->createInstanceWithContext(
+                        "com.sun.star.comp.oox.FormatDetector", m_xContext),
+                    UNO_QUERY_THROW);
+                lDescriptor[utl::MediaDescriptor::PROP_URL()] <<= sURL;
+                Sequence< css::beans::PropertyValue > aDescriptorSeq = lDescriptor.getAsConstPropertyValueList();
+                OUString sType = xDetection->detect(aDescriptorSeq);
+
+                OUString sNewFilterName;
+                lDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] >>= sNewFilterName;
+                if (!sType.isEmpty() && sNewFilterName == sFilterName)
+                {
+                    // Filter detection was okay, update media descriptor with one received from FilterDetect
+                    lDescriptor = aDescriptorSeq;
+                }
+            }
+
             // let it recover itself
             Reference< XDocumentRecovery > xDocRecover( xModel, UNO_QUERY_THROW );
             xDocRecover->recoverFromFile(
commit 3269f4fa5477104fbea363937ec84dfab2f914d9
Author:     Jan-Marek Glogowski <jan-marek.glogowski at extern.cib.de>
AuthorDate: Tue Feb 25 09:50:48 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Mar 6 21:42:24 2020 +0100

    tdf#131000 fix stuck combo box property editor
    
    If you create a combo box control with a lot of entries, like a
    large cell range in Calc, LO will take a long time to render that
    cell content into the small, line-height MultiLineEdit (MLE).
    
    This doesn't happen for master, because it contains commit
    1efeb17837c22499f00299c033ae59ba3910f7d7 ("weld Property
    Browser"), which changed the whole dialog and is much too large
    for a backport. A debugger shows LO is stuck in TextEngine::
    CreateLines, which is part of the MLE resize call stack. Checking
    the master patch, it also replaces the MLE with a mere Edit. And
    since editing now always happens in the popup, no functionality
    is lost.
    
    So this patch just does just that MLE => Edit replacement for old
    releases. This results in a much faster visible / usable property
    editor. For the attached test document with 4000 entries, resize
    time goes down to 5s instead of minutes.
    
    Fun fact: since you can't actually edit that entry in the example
    bug document, because its content depends on Cell data, all the
    "work" is basically mood.
    
    Change-Id: I7583e0ed1a70765c9f3bd7ff730e920a833bf30b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89417
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 7d79231e1ecd..776b691e0fb1 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -934,11 +934,10 @@ namespace pcr
     {
         SetCompoundControl( true );
 
-        m_pImplEdit = VclPtr<MultiLineEdit>::Create( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) );
+        m_pImplEdit = VclPtr<Edit>::Create( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) );
         SetSubEdit( m_pImplEdit );
         m_pImplEdit->Show();
 
-        if ( _nStyle & WB_DROPDOWN )
         {
             m_pDropdownButton = VclPtr<PushButton>::Create( this, WB_NOLIGHTBORDER | WB_RECTSTYLE | WB_NOTABSTOP);
             m_pDropdownButton->SetSymbol(SymbolType::SPIN_DOWN);
diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx
index f78c225e1175..ca79424345a5 100644
--- a/extensions/source/propctrlr/standardcontrol.hxx
+++ b/extensions/source/propctrlr/standardcontrol.hxx
@@ -343,7 +343,7 @@ namespace pcr
     class DropDownEditControl final : public Edit
     {
         VclPtr<OMultilineFloatingEdit>      m_pFloatingEdit;
-        VclPtr<MultiLineEdit>               m_pImplEdit;
+        VclPtr<Edit>                        m_pImplEdit;
         VclPtr<PushButton>                  m_pDropdownButton;
         MultiLineOperationMode              m_nOperationMode;
         bool                                m_bDropdown : 1;
commit dfed8bca32312884eb6166cbd8aba1d3397cd813
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Mar 4 15:08:31 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Mar 5 11:58:15 2020 +0100

    tdf#129796 junk in reference edit box
    
    regression from
        commit ebdf70cc68989d209965768edc8a3bdf27543c48
        Date:   Fri Sep 20 15:18:01 2019 +0200
        convert SwFieldTypesEnum to scoped enum
    
    Change-Id: Ifec7eb3bb3570f277aed365dcf38da477e437fea
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89968
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 0c225c7c2b47d7ec57ab7f3f2a900aaac78031d0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90026

diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index f3626ddac505..3064dc2f4933 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -397,7 +397,7 @@ void SwFieldVarPage::SubTypeHdl(const weld::TreeView* pBox)
                 m_xNameED->set_text( sName );
 
                 // User- or SetField ?
-                if (GetFieldMgr().GetFieldType(SwFieldIds::User, sName))
+                if (!GetFieldMgr().GetFieldType(SwFieldIds::User, sName)) // SetExp
                 {
                     // is there a corresponding SetField
                     SwSetExpFieldType* pSetTyp = static_cast<SwSetExpFieldType*>(
commit 9c3171d4209f8eceb0152d7d9f70456c5813914e
Author:     Heiko Tietze <tietze.heiko at gmail.com>
AuthorDate: Tue Feb 25 11:58:02 2020 +0100
Commit:     Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Wed Mar 4 21:17:58 2020 +0100

    Resolves tdf#127782 - New Print dialog is too high
    
    Amends Iea41f9cf335b75210de0acf5688fddd5e3dd3dbb
    
    Change-Id: Ic669332245ad9c5ee6366765da8a5bc632dd159c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89423
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tietze at documentfoundation.org>
    (cherry picked from commit b268715912d4c2034b9b9d38e75446bef7bbb11f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89921

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index b42a1ce41213..7d340559806a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -147,8 +147,8 @@ void PrintDialog::PrintPreviewWindow::Resize()
 
 void PrintDialog::PrintPreviewWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 {
-    pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 55,
-                                   pDrawingArea->get_text_height() * 40);
+    pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 45,
+                                   pDrawingArea->get_text_height() * 30);
     CustomWidgetController::SetDrawingArea(pDrawingArea);
 }
 
commit 2ef34d0272fca823ca5d5e795343e8a8ebced583
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Mar 3 17:19:52 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Mar 4 16:24:05 2020 +0100

    tdf#130680 sw_redlinehide: fix crash in SwUndoDelete
    
    The problem is that the code that adjusts pLastNode in
    SwContentNode::DelFrames() assumes that the nodes are deleted forward
    but MoveNode() runs backward so the only solution is to put pLastNode
    temporarily onto some node without checking if it has been fully
    deleted, while skipping over tables and sections.
    
    At the end of MoveNode() it must be on a valid (not fully deleted) node
    again.
    
    (regression from b86ff2c6a88aa41379e74f11e8ec8497ff85ffd0)
    
    Change-Id: If54c01f885e0c040aed9068823deae7dd167fd50
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89896
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 4769f431d93139eb3c470e5bb4e7c3c33d46a41f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89910
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 7ecaa5138b4c..37083c1d7fbc 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1386,15 +1386,26 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout)
                             }
                         }
                     }
+                    assert(GetIndex() <= pMerged->pLastNode->GetIndex());
                     if (this == pMerged->pLastNode)
                     {
-                        pMerged->pLastNode = GetNodes()[GetIndex()-1]->GetTextNode();
-                        // at first glance nothing guarantees this...
-                        // but the redline must end on a text-node...
-                        // so everything before this node that isn't a text
-                        // node should have been deleted already so that
-                        // there's a text node before.
-                        assert(pMerged->pLastNode->IsTextNode());
+                        // tdf#130680 find the previous node that is a
+                        // listener of pMerged; see CheckParaRedlineMerge()
+                        for (sal_uLong i = GetIndex() - 1;
+                             this == pMerged->pLastNode; --i)
+                        {
+                            SwNode *const pNode = GetNodes()[i];
+                            if (pNode->IsTextNode())
+                            {
+                                pMerged->pLastNode = pNode->GetTextNode();
+                            }
+                            else if (SwEndNode const*const pEnd = pNode->GetEndNode())
+                            {
+                                SwStartNode const*const pStart(pEnd->StartOfSectionNode());
+                                i = pStart->GetIndex(); // skip table or section
+                            }
+                        }
+                        assert(pMerged->pFirstNode->GetIndex() <= pMerged->pLastNode->GetIndex());
                     }
                     // avoid re-parenting mess (ModifyChangedHint)
                     pMerged->listener.EndListening(this);
commit c3a1880bd26f80272829205b221ebd2b8d1cfafe
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Mar 2 10:23:42 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Mar 4 15:21:22 2020 +0100

    tdf#126904 calc right arrow large unexpected column jump in protected sheet
    
    regression from
        commit 7282014e362a1529a36c88eb308df8ed359c2cfa
        Date:   Fri Feb 1 15:15:16 2019 +0100
        tdf#50916 Makes numbers of columns dynamic.
    
    Change-Id: I3b6f6e5430c97ef52f63c406eb3c3b39b9dd578e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89809
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 7ae33e175007d04021f5e911e3f7f6cbd0966804)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89914
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 6983f2fee4b7..7ed4acd64386 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -739,6 +739,7 @@ void ScTabView::SkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL nOldX, SC
 
     bool bSkipCell = false;
     bool bHFlip = false;
+    auto nMaxCol = pDoc->ClampToAllocatedColumns(nTab, pDoc->MaxCol());
     do
     {
         bSkipCell = pDoc->ColHidden(rCurX, nTab) || pDoc->IsHorOverlapped(rCurX, rCurY, nTab);
@@ -749,7 +750,7 @@ void ScTabView::SkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL nOldX, SC
 
         if (bSkipCell)
         {
-            if (rCurX <= 0 || rCurX >= pDoc->MaxCol())
+            if (rCurX <= 0 || rCurX >= nMaxCol)
             {
                 if (bHFlip)
                 {
commit 612a8bd9cfda531b6c610118f7c3b22fef047e83
Author:     Bakos Attila <bakos.attilakaroly at nisz.hu>
AuthorDate: Thu Feb 6 12:01:17 2020 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Mar 4 10:55:32 2020 +0100

    tdf#123873 DOCX IMPORT: fix unhandled textwrap for objects
    
    The OLE objects (in this case charts) had bad wrap option setting
    and this lead to misplaced objects. Now this parameter is set
    according to the file.
    
    Change-Id: I506be91b6801f0ffc3942e514f81119d895fdcb8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88091
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>
    Tested-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit affe9c8384475fc85027703332bc0f1b36eaa0a6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89908
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf123873.docx b/sw/qa/extras/ooxmlexport/data/tdf123873.docx
new file mode 100644
index 000000000000..b1de7f71f75a
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf123873.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 2365be2a5984..5c1bdc0582b9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -43,6 +43,16 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128207, "tdf128207.docx")
     assertXPathContent(p_XmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:drawing/wp:anchor/wp:positionH/wp:posOffset", "4445");
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123873, "tdf123873.docx")
+{
+    //OLE Object were overlapped due to missing wrap import
+    xmlDocPtr p_XmlDoc = parseExport("word/document.xml");
+    CPPUNIT_ASSERT(p_XmlDoc);
+    assertXPath(
+        p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:drawing/wp:anchor/wp:wrapTopAndBottom");
+}
+
+
 DECLARE_OOXMLIMPORT_TEST(testTdf129888vml, "tdf129888vml.docx")
 {
     //the line shape has anchor in the first cell however it has to
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index fc189d7dcf9d..8e13daa08efb 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -6142,6 +6142,8 @@ void  DomainMapper_Impl::ImportGraphic(const writerfilter::Reference< Properties
             xEmbeddedProps->setPropertyValue("VertOrient", xShapeProps->getPropertyValue("VertOrient"));
             xEmbeddedProps->setPropertyValue("VertOrientPosition", xShapeProps->getPropertyValue("VertOrientPosition"));
             xEmbeddedProps->setPropertyValue("VertOrientRelation", xShapeProps->getPropertyValue("VertOrientRelation"));
+            //tdf123873 fix missing textwrap import
+            xEmbeddedProps->setPropertyValue("TextWrap", xShapeProps->getPropertyValue("TextWrap"));
         }
     }
     //insert it into the document at the current cursor position
commit 7d210f5c9bf7db39f0043d8d218b337b9a78053d
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Mar 2 20:23:04 2020 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Mar 4 10:53:52 2020 +0100

    tdf#84399 VML import: map <v:shape o:spt="202"> to TextShape
    
    This partially reverts commit 81f9fe3a14f0fc99afbfa7ce3a26a9c7855d0919
    (fdo#74401 VML groupshape import: only handle v:rect as TextShape,
    2014-03-19), which wanted to map triangles to custom shapes.
    
    It was overlooked that we can have not only explicit rectangles and
    custom shapes, but also <v:shape> elements which have their shape type
    explicitly set to TextBox. The later is now again handled similar to
    rectangles. This keeps the triangle case working, but fixes the <v:shape
    o:spt="202"> case.
    
    We need to make this decision while parsing the XML, so some rework is
    needed to have earlier access to its container (group shape or draw
    page) and also to its shape type.
    
    (cherry picked from commit 198685ded79d64b21023ee85e9a15fa1b32705a0)
    
    Conflicts:
            include/oox/vml/vmlshapecontainer.hxx
    
    Change-Id: I33a4b3cd03b0df5d93cffa19e7ea834113df2bdc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89876
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx
index dc4db50c27fe..2b3677df106d 100644
--- a/include/oox/vml/vmlshape.hxx
+++ b/include/oox/vml/vmlshape.hxx
@@ -264,6 +264,9 @@ public:
     void                convertFormatting(
                             const css::uno::Reference< css::drawing::XShape >& rxShape ) const;
 
+    void setContainer(ShapeContainer* pContainer);
+    ShapeContainer* getContainer() const;
+
 protected:
     explicit            ShapeBase( Drawing& rDrawing );
 
@@ -284,6 +287,7 @@ protected:
 
 protected:
     ShapeModel          maShapeModel;       ///< The model structure containing shape data.
+    ShapeContainer*     mpContainer = nullptr;
 };
 
 
diff --git a/include/oox/vml/vmlshapecontainer.hxx b/include/oox/vml/vmlshapecontainer.hxx
index ff39d5f7212c..72fc9286536e 100644

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list