[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-2' - 24 commits - cui/source include/sfx2 include/svx include/vcl jvmfwk/plugins librelogo/source sax/source sc/source sd/CppunitTest_sd_uiimpress.mk sd/Module_sd.mk sd/qa sd/source sfx2/source svx/source sw/qa sw/source translations vcl/inc vcl/qt5 vcl/source vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 12 08:32:43 UTC 2019


 cui/source/tabpages/autocdlg.cxx             |    4 -
 include/sfx2/charmapcontrol.hxx              |    1 
 include/svx/svdedtv.hxx                      |    6 +
 include/vcl/button.hxx                       |    2 
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx   |    3 
 librelogo/source/LibreLogo/LibreLogo.py      |   51 ++++++++++++
 sax/source/tools/fastserializer.cxx          |   43 ++++++++--
 sc/source/core/data/column3.cxx              |   52 ++++++++++++-
 sc/source/core/data/dpcache.cxx              |    4 -
 sd/CppunitTest_sd_uiimpress.mk               |   84 +++++++++++++++++++++
 sd/Module_sd.mk                              |    1 
 sd/qa/unit/data/tdf111522.odp                |binary
 sd/qa/unit/uiimpress.cxx                     |  107 +++++++++++++++++++++++++++
 sd/source/filter/ppt/pptin.cxx               |    2 
 sfx2/source/control/charmapcontrol.cxx       |    5 -
 sfx2/source/doc/guisaveas.cxx                |   35 +++++---
 sfx2/source/doc/objmisc.cxx                  |   13 +++
 svx/source/svdraw/svddrgmt.cxx               |    2 
 svx/source/svdraw/svdedtv.cxx                |   18 ++++
 svx/source/svdraw/svdedtv1.cxx               |   26 +++---
 svx/source/unodraw/UnoGraphicExporter.cxx    |   66 ++++++++--------
 sw/qa/extras/ooxmlexport/data/tdf125324.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx   |    7 +
 sw/source/core/layout/calcmove.cxx           |    4 +
 sw/source/core/text/atrhndl.hxx              |   10 +-
 sw/source/core/text/atrstck.cxx              |   14 +--
 sw/source/core/view/viewsh.cxx               |    4 -
 sw/source/filter/ww8/docxattributeoutput.cxx |    6 -
 sw/source/ui/chrdlg/pardlg.cxx               |    1 
 translations                                 |    2 
 vcl/inc/qt5/Qt5Widget.hxx                    |    5 +
 vcl/qt5/Qt5AccessibleWidget.cxx              |    2 
 vcl/qt5/Qt5Timer.cxx                         |    1 
 vcl/qt5/Qt5Widget.cxx                        |   79 +++++++++----------
 vcl/source/control/button.cxx                |    7 +
 vcl/unx/gtk3/gtk3gtkframe.cxx                |   19 ++++
 vcl/unx/gtk3/gtk3gtkinst.cxx                 |   29 ++++---
 37 files changed, 558 insertions(+), 157 deletions(-)

New commits:
commit 6feaa8cab9e63a1f13a5bb272aad992f9a5b58ae
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 11 09:44:40 2019 +0100
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Wed Jun 12 09:48:36 2019 +0200

    Resolves: tdf#125808 empty labels in pivot table from registered data source
    
    since...
    
    commit 238cadd315901cbacfd9304bb1205e9f53f13eae
    Date:   Wed Apr 10 04:30:25 2019 +0530
    
        dpcache : use case-insensitive normalization of...
    
    Change-Id: I19057bde268ec07561da323bc694536dcad03a95
    Reviewed-on: https://gerrit.libreoffice.org/73821
    Tested-by: Jenkins
    Reviewed-by: Dennis Francis <dennis.francis at collabora.com>

diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index fce310bd1ee6..5420185887e9 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -374,8 +374,8 @@ std::vector<OUString> normalizeLabels(const std::vector<InitColumnData>& rColDat
 
 std::vector<OUString> normalizeLabels(const ScDPCache::DBConnector& rDB, const sal_Int32 nLabelCount)
 {
-    std::vector<OUString> aLabels(nLabelCount+1);
-    aLabels.push_back(ScResId(STR_PIVOT_DATA));
+    std::vector<OUString> aLabels(1u, ScResId(STR_PIVOT_DATA));
+    aLabels.reserve(nLabelCount + 1);
 
     LabelSet aExistingNames;
 
commit eaee30b8ef7649d09ae64c484efa4d4026c2f119
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Jun 7 22:06:46 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jun 11 19:32:21 2019 +0200

    Fix swapping of vector elements
    
    ...which had been broken with edc85fb55f8adc30a1416c6c854c89097060fb21
    "clang-tidy performance-unnecessary-copy-init in idl..reportdesign" (and could
    cause "Tools - Options... - LibreOffice - Advanced - Java Options" to
    erroneously list a single JRE multiple times, instead of listing different
    JREs).
    
    Change-Id: I6799903be39a5c6aa601131fad6eab3edea8d9e4
    Reviewed-on: https://gerrit.libreoffice.org/73679
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit b70ab9e9e5630a965c5e6cc40c2480dddf1e2384)
    Reviewed-on: https://gerrit.libreoffice.org/73802
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 6b1147b149b2..4a634b329f2c 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -733,8 +733,7 @@ void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec)
             }
             if(nCmp == 1) // cur > next
             {
-                vec.at(j-1)= cur;
-                vec.at(j)= next;
+                std::swap(vec.at(j-1), vec.at(j));
             }
         }
         ++cIter;
commit 8ff1e312029adbf9e425f3d075c1e263a7c4e9c4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 7 15:29:53 2019 +0100
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Tue Jun 11 12:25:04 2019 +0200

    Resolves: tdf#125761 there is no page called 'labelTP_BACKGROUND'
    
    Change-Id: Ia6558039da010b0f6d8385e9791c0abc2ef75eba
    Reviewed-on: https://gerrit.libreoffice.org/73667
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 7d74c451942e..e089b4bed935 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -116,7 +116,6 @@ SwParaDlg::SwParaDlg(weld::Window *pParent,
     {
         RemoveTabPage("labelTP_NUMPARA");
         RemoveTabPage("labelTP_DROPCAPS");
-        RemoveTabPage("labelTP_BACKGROUND");
         RemoveTabPage("labelTP_BORDER");
         RemoveTabPage("area");
         RemoveTabPage("transparence");
commit 57b609f2ac50e03e148477a8a403a70e6f4fd5e1
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Mon May 13 18:14:04 2019 -0800
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Tue Jun 11 12:23:33 2019 +0200

    tdf#123793 Follow up fix for kb nav of special chars popup
    
    Static variable use to determine if initializing can focus properties of
    recent and favorite controls is needed only allows init to ever happen
    once. This patch changes use to a member variable. This corrects the
    problem of kb navigation only works the the first time the popup is shown
    and tab is used to navigate.
    
    Change-Id: I2bbb66071b582c9a4282c79d801b4a36c375ed2d
    Reviewed-on: https://gerrit.libreoffice.org/72264
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <raykowj at gmail.com>
    (cherry picked from commit e8a1db012fbd185f52f38806bcac8bb9917c51c3)
    Reviewed-on: https://gerrit.libreoffice.org/72815
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/include/sfx2/charmapcontrol.hxx b/include/sfx2/charmapcontrol.hxx
index 5b0dbcca811e..a0b74430d9ea 100644
--- a/include/sfx2/charmapcontrol.hxx
+++ b/include/sfx2/charmapcontrol.hxx
@@ -50,6 +50,7 @@ private:
     std::deque<OUString>   maFavCharList;
     std::deque<OUString>   maFavCharFontList;
     VclPtr<Button>         maDlgBtn;
+    bool                   mbNeedsInit = true;
 
     DECL_LINK(CharClickHdl, SvxCharViewControl*, void);
     DECL_STATIC_LINK(SfxCharmapCtrl, FocusHdl, Control&, void);
diff --git a/sfx2/source/control/charmapcontrol.cxx b/sfx2/source/control/charmapcontrol.cxx
index 7f757a7eb4df..6534a9b1efc6 100644
--- a/sfx2/source/control/charmapcontrol.cxx
+++ b/sfx2/source/control/charmapcontrol.cxx
@@ -184,7 +184,6 @@ void SfxCharmapCtrl::updateRecentCharControl()
 
 bool SfxCharmapCtrl::EventNotify( NotifyEvent& rNEvt )
 {
-    static bool bNeedsInit = true;
     if ( maDlgBtn->HasFocus() && rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
     {
         const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode();
@@ -193,14 +192,14 @@ bool SfxCharmapCtrl::EventNotify( NotifyEvent& rNEvt )
         {
             return true;
         }
-        if ( bNeedsInit && nCode == KEY_TAB )
+        if ( mbNeedsInit && nCode == KEY_TAB )
         {
             for(int i = 0; i < 16; i++)
             {
                 m_pRecentCharView[i]->set_property( "can-focus", "true" );
                 m_pFavCharView[i]->set_property( "can-focus", "true" );
             }
-            bNeedsInit = false;
+            mbNeedsInit = false;
         }
     }
     return SfxPopupWindow::EventNotify( rNEvt );
commit d3abad0c05bc49371911d39245e4373e16c60487
Author:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Tue Jun 11 12:15:36 2019 +0200
Commit:     Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Tue Jun 11 12:21:11 2019 +0200

    Update git submodules
    
    * Update translations from branch 'libreoffice-6-2'
      - update translations for 6.2.5 rc1
    
        and force-fix errors using pocheck
    
        Change-Id: I47eaf2b9755da1d0126e2999d734dbc25807e542

diff --git a/translations b/translations
index b4ac8d65832a..cd209b9e5908 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit b4ac8d65832ab402e449f0e294bb3f09c4095fef
+Subproject commit cd209b9e5908240054c1d058899b1ae4a16b51c9
commit 3dd024a28a98a9d4b4efc3c7ec6acaa94d2b25fd
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 7 14:04:07 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Jun 11 12:09:02 2019 +0200

    explictly exclude LibreLogo from XScript usage
    
    Change-Id: I567647f0e2f8b82e4ef2995c673abe82f4564228
    Reviewed-on: https://gerrit.libreoffice.org/73708
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index e245800f2fec..beea5170e44d 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1340,6 +1340,16 @@ namespace
     }
 }
 
+namespace {
+
+// don't allow LibreLogo to be used with our mouseover/etc dom-alike events
+bool UnTrustedScript(const OUString& rScriptURL)
+{
+    return rScriptURL.startsWithIgnoreAsciiCase("vnd.sun.star.script:LibreLogo");
+}
+
+}
+
 ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptContext, const OUString& _rScriptURL,
     const Sequence< Any >& aParams, Any& aRet, Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam, bool bRaiseError, const css::uno::Any* pCaller )
 {
@@ -1352,6 +1362,9 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
     if ( bIsDocumentScript && !lcl_isScriptAccessAllowed_nothrow( _rxScriptContext ) )
         return ERRCODE_IO_ACCESSDENIED;
 
+    if ( UnTrustedScript(_rScriptURL) )
+        return ERRCODE_IO_ACCESSDENIED;
+
     bool bCaughtException = false;
     Any aException;
     try
commit 4d51531130988d87839bb7b0c077a5df43b2a6be
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Mon May 20 21:44:02 2019 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jun 10 22:46:06 2019 +0200

    Resolves: tdf#125109 prefer edit format's acceptance patterns and YMD order
    
    Change-Id: I4036061b9e8f01d99f04f20dfbbd2cf23d3a9b59
    Reviewed-on: https://gerrit.libreoffice.org/72632
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 478e051f4ea13b15120fdf74faf94a6c2cfcb50c)
    Reviewed-on: https://gerrit.libreoffice.org/72848
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 30d9fc26631f..903111b20769 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1947,13 +1947,14 @@ bool ScColumn::ParseString(
 
     sal_uInt32 nIndex = 0;
     sal_uInt32 nOldIndex = 0;
+    SvNumFormatType eNumFormatType = SvNumFormatType::ALL;
     sal_Unicode cFirstChar;
     if (!aParam.mpNumFormatter)
         aParam.mpNumFormatter = GetDoc()->GetFormatTable();
 
     nIndex = nOldIndex = GetNumberFormat( GetDoc()->GetNonThreadedContext(), nRow );
     if ( rString.getLength() > 1
-            && aParam.mpNumFormatter->GetType(nIndex) != SvNumFormatType::TEXT )
+            && (eNumFormatType = aParam.mpNumFormatter->GetType(nIndex)) != SvNumFormatType::TEXT )
         cFirstChar = rString[0];
     else
         cFirstChar = 0; // Text
@@ -2009,11 +2010,56 @@ bool ScColumn::ParseString(
         {
             if (aParam.mbDetectNumberFormat)
             {
-                if (!aParam.mpNumFormatter->IsNumberFormat(rString, nIndex, nVal))
+                // Editing a date prefers the format's locale's edit date
+                // format's date acceptance patterns and YMD order.
+                /* TODO: this could be determined already far above when
+                 * starting to edit a date "cell" and passed down. A problem
+                 * could also be if a new date was typed over or written by a
+                 * macro assuming the current locale if that conflicts somehow.
+                 * You can't have everything. See tdf#116579 and tdf#125109. */
+                if (eNumFormatType == SvNumFormatType::ALL)
+                    eNumFormatType = aParam.mpNumFormatter->GetType(nIndex);
+                bool bForceFormatDate = (eNumFormatType == SvNumFormatType::DATE
+                        || eNumFormatType == SvNumFormatType::DATETIME);
+                const SvNumberformat* pOldFormat = nullptr;
+                NfEvalDateFormat eEvalDateFormat = NF_EVALDATEFORMAT_INTL_FORMAT;
+                if (bForceFormatDate)
+                {
+                    ScRefCellValue aCell = GetCellValue(nRow);
+                    if (aCell.meType == CELLTYPE_VALUE)
+                    {
+                        // Only for an actual date (serial number), not an
+                        // arbitrary string or formula or empty cell.
+                        // Also ensure the edit date format's pattern is used,
+                        // not the display format's.
+                        pOldFormat = aParam.mpNumFormatter->GetEntry( nOldIndex);
+                        if (!pOldFormat)
+                            bForceFormatDate = false;
+                        else
+                        {
+                            nIndex = aParam.mpNumFormatter->GetEditFormat( aCell.getValue(), nOldIndex, eNumFormatType,
+                                    pOldFormat->GetLanguage(), pOldFormat);
+                            eEvalDateFormat = aParam.mpNumFormatter->GetEvalDateFormat();
+                            aParam.mpNumFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL);
+                        }
+                    }
+                    else
+                    {
+                        bForceFormatDate = false;
+                    }
+                }
+
+                const bool bIsNumberFormat = aParam.mpNumFormatter->IsNumberFormat(rString, nIndex, nVal);
+
+                if (bForceFormatDate)
+                    aParam.mpNumFormatter->SetEvalDateFormat( eEvalDateFormat);
+
+                if (!bIsNumberFormat)
                     break;
 
                 // convert back to the original language if a built-in format was detected
-                const SvNumberformat* pOldFormat = aParam.mpNumFormatter->GetEntry( nOldIndex );
+                if (!pOldFormat)
+                    pOldFormat = aParam.mpNumFormatter->GetEntry( nOldIndex );
                 if ( pOldFormat )
                     nIndex = aParam.mpNumFormatter->GetFormatForLanguageIfBuiltIn( nIndex, pOldFormat->GetLanguage() );
 
commit 54b588724005c502590a2f43ea42f6b2fb8fb1f2
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri Jun 7 11:12:31 2019 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Mon Jun 10 17:42:54 2019 +0200

    tdf#117347 sw form controls: fix disappearing FixedText when editing TextField
    
    This is nominally a regression from commit
    af11abf3626e12d2b4b7dd9d255c6c71bf84cd4b (SwViewShell::ImplEndAction:
    still paint directly when non-double-buffering, 2015-09-01), but that
    just uncovered an already existing problem introduced earlier in commit
    2b26c1796d0a05f47cfb01d79ee4f69344efbbb2 (tdf#92577 sw rendercontext:
    paint transparent from controls conditionally, 2015-07-06).
    
    Given that the first commit (as a side-effect) solved the problem the
    second commit tried to solve, it's safe to just revert this.
    
    (Sadly we have no way to test incremental paints with a reasonable
    amount of effort, so no testcase.)
    
    (cherry picked from commit 00dfa6dc890dbbc8140fe613599becb5e4c55486)
    
    Change-Id: Ia59efbf45a0cd5af3580914e1dcee74d89068f03
    Reviewed-on: https://gerrit.libreoffice.org/73658
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    (cherry picked from commit 802e3a960e166b24e18da04a821862620047f37f)
    Reviewed-on: https://gerrit.libreoffice.org/73751
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 77ccf51f2cd4..c0268da684d9 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -432,8 +432,8 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
                             DLPostPaint2(true);
                         }
                     }
-                    else
-                        lcl_PaintTransparentFormControls(*this, aRect); // i#107365
+
+                    lcl_PaintTransparentFormControls(*this, aRect); // i#107365
                 }
 
                 delete pRegion;
commit 507771e499cf3ea658781d4e044ea4400888e3a6
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri Jun 7 17:20:34 2019 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Mon Jun 10 15:46:11 2019 +0200

    Related: tdf#111522 svx: fix crash with view1 doing textedit and resize/rotate
    
    The two actually affected functions are SdrEditView::RotateMarkedObj()
    and SdrDragObjOwn::EndSdrDrag(), but it looks like the other functions
    in SdrEditView are safe to be changed the same way.
    
    I expect IsUndoEnabled() can't be changed, though: that would mean there
    would be no undo for the text edit itself, either.
    
    If other actions still crash, the pattern is the same: put a breakpoint
    on the SdrUndoAction constructor and see the backtrace to find the
    function that calls IsUndoEnabled() without calling CanDoSdrUndo() at
    the same time.
    
    Change-Id: If9324e311ec6e9f68a951559e903e14bb72ea31c
    Reviewed-on: https://gerrit.libreoffice.org/73669
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit 9870ff897f088563426bee9567dd9cb722c2b929)
    Reviewed-on: https://gerrit.libreoffice.org/73748
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
    (cherry picked from commit 79cae65f4725d0a8abd5639dc298002d11b2626c)
    Reviewed-on: https://gerrit.libreoffice.org/73757

diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 910f4a9dd0c3..2d3710faa7ed 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -93,6 +93,13 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf111522)
     // Without the accompanying fix in place, this test would have failed with an assertion failure
     // in SdrObjEditView::SdrEndTextEdit() as mpOldTextEditUndoManager was not nullptr.
     pViewShell2->GetViewFrame()->GetDispatcher()->Execute(SID_UNDO, SfxCallMode::SYNCHRON);
+
+    // Rotate the shape in window 2 & undo.
+    pView2->MarkObj(pShape2, pView2->GetSdrPageView());
+    pView2->RotateMarkedObj(pShape2->GetLastBoundRect().Center(), /*nAngle=*/45);
+    // Without the accompanying fix in place, this test would have failed with an assertion failure
+    // in SdrObjEditView::SdrEndTextEdit() as mpOldTextEditUndoManager was not nullptr.
+    pViewShell2->GetViewFrame()->GetDispatcher()->Execute(SID_UNDO, SfxCallMode::SYNCHRON);
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index cb0c3d1fa2c5..affd94e14bb6 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1323,7 +1323,7 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/)
     {
         std::unique_ptr<SdrUndoAction> pUndo;
         std::unique_ptr<SdrUndoAction> pUndo2;
-        const bool bUndo = getSdrDragView().IsUndoEnabled();
+        const bool bUndo = getSdrDragView().IsUndoEnabled() && getSdrDragView().CanDoSdrUndo();
 
         if( bUndo )
         {
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index aa8e5d6df761..43f72e63369f 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -85,7 +85,7 @@ void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect)
     long w1=rRect.Right()-x1;
     long h1=rRect.Bottom()-y1;
 
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
     if( bUndo )
         BegUndo(ImpGetDescriptionString(STR_EditPosSize));
 
@@ -205,7 +205,7 @@ void SdrEditView::MoveMarkedObj(const Size& rSiz, bool bCopy)
 
 void SdrEditView::ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy)
 {
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
     if( bUndo )
     {
         OUString aStr {ImpGetDescriptionString(STR_EditResize)};
@@ -239,7 +239,7 @@ void SdrEditView::ResizeMultMarkedObj(const Point& rRef,
     const bool bWdh,
     const bool bHgt)
 {
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
     if( bUndo )
     {
         BegUndo(ImpGetDescriptionString(STR_EditResize));
@@ -299,7 +299,7 @@ long SdrEditView::GetMarkedObjRotate() const
 
 void SdrEditView::RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy)
 {
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
     if( bUndo )
     {
         OUString aStr {ImpGetDescriptionString(STR_EditRotate)};
@@ -354,7 +354,7 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy)
 
 void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool bCopy)
 {
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 
     if( bUndo )
     {
@@ -453,7 +453,7 @@ long SdrEditView::GetMarkedObjShear() const
 
 void SdrEditView::ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear, bool bCopy)
 {
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 
     if( bUndo )
     {
@@ -566,7 +566,7 @@ void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookM
     bool bVertical, bool bNoContortion, bool bCopy)
 {
     tools::Rectangle aMarkRect(GetMarkedObjRect());
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 
     bool bRotate=bNoContortion && eMode==SdrCrookMode::Rotate && IsRotateAllowed();
 
@@ -641,7 +641,7 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const tools::Rectangle& rRef, con
 
 void SdrEditView::DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy)
 {
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 
     if( bUndo )
     {
@@ -750,7 +750,7 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr)
         ShearMarkedObj(aAllSnapRect.Center(),nAngle,true);
     }
 
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 
     // TODO: check if WhichRange is necessary.
     const size_t nMarkCount=GetMarkedObjectCount();
@@ -998,7 +998,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
         nWhich = aIter.NextWhich();
     }
 
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
     if( bUndo )
     {
         BegUndo(ImpGetDescriptionString(STR_EditSetAttributes));
@@ -1176,7 +1176,7 @@ void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, bool bDontRe
 {
     if (AreObjectsMarked())
     {
-        const bool bUndo = IsUndoEnabled();
+        const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 
         if( bUndo )
         {
@@ -1729,7 +1729,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
     if (!GetMarkedObjectCount())
         return;
 
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
     if( bUndo )
     {
         OUString aStr(GetDescriptionOfMarkedObjects());
commit 2980fa249a2680f32915de470a9cd8840780c2a0
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Jun 5 16:28:53 2019 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Mon Jun 10 13:09:11 2019 +0200

    tdf#111522 svx: fix crash with view1 doing text edit and view2 doing sdr undo
    
    If one view has an active text edit, then current code doesn't handle
    manipulating the undo text outside the text edit, so avoid problems by
    simply not adding an undo action to the undo stack for shape creation or
    move.
    
    Other actions might want to do the same in the future: check for
    CanDoSdrUndo() before calling SdrUndoFactory member functions.
    
    [ Found no existing test suite similar to CppunitTest_sw_uiwriter, so
    added one. ]
    
    (cherry picked from commit 3a874f1c80c37e8b35666e1d73161ff762eb7e4c)
    
    Change-Id: I3a364bf4fe6f9b0c13aa07283681b1045368cf7a
    Reviewed-on: https://gerrit.libreoffice.org/73649
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 6fc2e1aab75f..17fc9af93c76 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -186,6 +186,12 @@ public:
     void SetUndoComment(const OUString& rComment, const OUString& rObjDescr) { mpModel->SetUndoComment(rComment,rObjDescr); }
     bool IsUndoEnabled() const;
 
+    /**
+     * Checks if this or other views have an active text edit, in which case object undos are not
+     * created.
+     */
+    bool CanDoSdrUndo() const;
+
     std::vector< std::unique_ptr<SdrUndoAction> > CreateConnectorUndo( SdrObject& rO );
     void AddUndoActions( std::vector< std::unique_ptr<SdrUndoAction> > );
 
diff --git a/sd/CppunitTest_sd_uiimpress.mk b/sd/CppunitTest_sd_uiimpress.mk
new file mode 100644
index 000000000000..7881d15d2ef8
--- /dev/null
+++ b/sd/CppunitTest_sd_uiimpress.mk
@@ -0,0 +1,84 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,sd_uiimpress))
+
+$(eval $(call gb_CppunitTest_use_externals,sd_uiimpress,\
+	boost_headers \
+	libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sd_uiimpress, \
+    sd/qa/unit/uiimpress \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sd_uiimpress, \
+    $(call gb_Helper_optional,AVMEDIA,avmedia) \
+    basegfx \
+    canvastools \
+    comphelper \
+    cppcanvas \
+    cppu \
+    cppuhelper \
+    drawinglayer \
+    editeng \
+    for \
+    forui \
+    i18nlangtag \
+    i18nutil \
+    msfilter \
+    oox \
+    sal \
+    salhelper \
+    sax \
+    sb \
+    sd \
+    sfx \
+    sot \
+    svl \
+    svt \
+    svx \
+    svxcore \
+    test \
+    tl \
+    tk \
+    ucbhelper \
+    unotest \
+    utl \
+    vcl \
+    xo \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sd_uiimpress,\
+    -I$(SRCDIR)/sd/inc \
+    -I$(SRCDIR)/sd/source/ui/inc \
+    -I$(SRCDIR)/sd/source/ui/slidesorter/inc \
+    $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,sd_uiimpress))
+
+$(eval $(call gb_CppunitTest_use_externals,sd_uiimpress,\
+    boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sd_uiimpress))
+$(eval $(call gb_CppunitTest_use_vcl,sd_uiimpress))
+
+$(eval $(call gb_CppunitTest_use_rdb,sd_uiimpress,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sd_uiimpress,\
+	officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sd_uiimpress))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk
index e1ead370b2e3..b0f63ddc1ed1 100644
--- a/sd/Module_sd.mk
+++ b/sd/Module_sd.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sd,\
     CppunitTest_sd_export_tests \
     CppunitTest_sd_filters_test \
     CppunitTest_sd_misc_tests \
+    CppunitTest_sd_uiimpress \
     CppunitTest_sd_html_export_tests \
     CppunitTest_sd_activex_controls_tests \
 ))
diff --git a/sd/qa/unit/data/tdf111522.odp b/sd/qa/unit/data/tdf111522.odp
new file mode 100644
index 000000000000..fd6ebeb6ed22
Binary files /dev/null and b/sd/qa/unit/data/tdf111522.odp differ
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
new file mode 100644
index 000000000000..910f4a9dd0c3
--- /dev/null
+++ b/sd/qa/unit/uiimpress.cxx
@@ -0,0 +1,100 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <test/bootstrapfixture.hxx>
+#include <unotest/macros_test.hxx>
+
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <comphelper/processfactory.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <svl/intitem.hxx>
+#include <svx/svxids.hrc>
+
+#include <DrawDocShell.hxx>
+#include <ViewShell.hxx>
+#include <app.hrc>
+#include <sdpage.hxx>
+#include <unomodel.hxx>
+
+using namespace ::com::sun::star;
+
+/// Impress UI tests.
+class SdUiImpressTest : public test::BootstrapFixture, public unotest::MacrosTest
+{
+protected:
+    uno::Reference<uno::XComponentContext> mxComponentContext;
+    uno::Reference<lang::XComponent> mxComponent;
+
+public:
+    virtual void setUp() override;
+    virtual void tearDown() override;
+};
+
+void SdUiImpressTest::setUp()
+{
+    test::BootstrapFixture::setUp();
+
+    mxComponentContext.set(comphelper::getComponentContext(getMultiServiceFactory()));
+    mxDesktop.set(frame::Desktop::create(mxComponentContext));
+}
+
+void SdUiImpressTest::tearDown()
+{
+    if (mxComponent.is())
+        mxComponent->dispose();
+
+    test::BootstrapFixture::tearDown();
+}
+
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf111522)
+{
+    // Load the document and create two new windows.
+    mxComponent = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/tdf111522.odp"));
+    auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
+    sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell();
+    pViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_NEWWINDOW, SfxCallMode::SYNCHRON);
+    sd::ViewShell* pViewShell1 = pImpressDocument->GetDocShell()->GetViewShell();
+    pViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_NEWWINDOW, SfxCallMode::SYNCHRON);
+    sd::ViewShell* pViewShell2 = pImpressDocument->GetDocShell()->GetViewShell();
+    CPPUNIT_ASSERT(pViewShell1 != pViewShell2);
+
+    // Have slide 1 in window 1, slide 2 in window 2.
+    SfxRequest aRequest(pViewShell2->GetViewFrame(), SID_SWITCHPAGE);
+    aRequest.AppendItem(SfxUInt32Item(ID_VAL_WHATPAGE, 1));
+    aRequest.AppendItem(
+        SfxUInt32Item(ID_VAL_WHATKIND, static_cast<sal_uInt32>(PageKind::Standard)));
+    pViewShell2->ExecuteSlot(aRequest, /*bAsync=*/false);
+
+    // Start text edit in window 1.
+    SdPage* pPage1 = pViewShell1->GetActualPage();
+    SdrObject* pShape1 = pPage1->GetObj(0);
+    SdrView* pView1 = pViewShell1->GetView();
+    pView1->MarkObj(pShape1, pView1->GetSdrPageView());
+    pView1->SdrBeginTextEdit(pShape1);
+    CPPUNIT_ASSERT(pView1->IsTextEdit());
+
+    // Move the shape in window 2 & undo.
+    SdPage* pPage2 = pViewShell2->GetActualPage();
+    CPPUNIT_ASSERT(pPage1 != pPage2);
+    SdrObject* pShape2 = pPage2->GetObj(0);
+    SdrView* pView2 = pViewShell2->GetView();
+    pView2->MarkObj(pShape2, pView2->GetSdrPageView());
+    pView2->MoveMarkedObj(Size(1, 1), /*bCopy=*/false);
+    // Without the accompanying fix in place, this test would have failed with an assertion failure
+    // in SdrObjEditView::SdrEndTextEdit() as mpOldTextEditUndoManager was not nullptr.
+    pViewShell2->GetViewFrame()->GetDispatcher()->Execute(SID_UNDO, SfxCallMode::SYNCHRON);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 2197c3fbc42e..e42e90fcedeb 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -977,7 +977,7 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInser
             rPV.GetObjList()->InsertObject(pObj, SAL_MAX_SIZE);
         }
     }
-    if( IsUndoEnabled() )
+    if( IsUndoEnabled() && CanDoSdrUndo())
         AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj));
 
     if (!(nOptions & SdrInsertFlags::DONTMARK)) {
@@ -1033,4 +1033,20 @@ bool SdrEditView::IsUndoEnabled() const
     return mpModel->IsUndoEnabled();
 }
 
+bool SdrEditView::CanDoSdrUndo() const
+{
+    size_t nViews = mpModel->GetListenerCount();
+    for (size_t nView = 0; nView < nViews; ++nView)
+    {
+        SdrEditView* pView = dynamic_cast<SdrEditView*>(mpModel->GetListener(nView));
+        if (!pView)
+            continue;
+
+        if (pView->IsTextEdit())
+            return false;
+    }
+
+    return true;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 960dd2c58269..aa8e5d6df761 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -172,7 +172,7 @@ void SdrEditView::AddUndoActions( std::vector< std::unique_ptr<SdrUndoAction> >
 
 void SdrEditView::MoveMarkedObj(const Size& rSiz, bool bCopy)
 {
-    const bool bUndo = IsUndoEnabled();
+    const bool bUndo = IsUndoEnabled() && CanDoSdrUndo();
 
     if( bUndo )
     {
commit bc651b9157fa8f35e28774ffebda1bb7fadb455b
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Jun 7 21:02:19 2019 +1000
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Mon Jun 10 10:55:52 2019 +0200

    tdf#125624: this bugdoc overflows sal_uInt16
    
    Change-Id: I8ecc08d3ef42b9f7cc501017e0e169bde2196317
    Reviewed-on: https://gerrit.libreoffice.org/73654
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 2d5821ceacf399ec9267a3704ee0b2cc8a598f04)
    Reviewed-on: https://gerrit.libreoffice.org/73672
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index 688b0aed12c5..07a1b67c16bb 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -47,8 +47,8 @@ private:
     private:
         SwTextAttr*  m_pInitialArray[ INITIAL_NUM_ATTR ];
         SwTextAttr** m_pArray;
-        sal_uInt16 m_nCount; // number of elements on stack
-        sal_uInt16 m_nSize;  // number of positions in Array
+        sal_uInt32 m_nCount; // number of elements on stack
+        sal_uInt32 m_nSize;  // number of positions in Array
 
     public:
         // Ctor, Dtor
@@ -64,7 +64,7 @@ private:
         void Push( const SwTextAttr& rAttr ) { Insert(rAttr, m_nCount); };
         // insert at specified position, take care for not inserting behind
         // the value returned by Count()
-        void Insert( const SwTextAttr& rAttr, const sal_uInt16 nPos );
+        void Insert( const SwTextAttr& rAttr, const sal_uInt32 nPos );
 
         // remove specified attribute
         void Remove( const SwTextAttr& rAttr );
@@ -73,11 +73,11 @@ private:
         const SwTextAttr* Top() const;
 
         // number of elements on stack
-        sal_uInt16 Count() const { return m_nCount; };
+        sal_uInt32 Count() const { return m_nCount; };
 
         // returns position of rAttr on Stack if found, otherwise USHRT_MAX
         // can be used for Remove of an attribute
-        sal_uInt16 Pos( const SwTextAttr& rAttr ) const;
+        sal_uInt32 Pos( const SwTextAttr& rAttr ) const;
     };
 
     SwAttrStack m_aAttrStack[ NUM_ATTRIBUTE_STACKS ]; // stack collection
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index ecae4e4a8385..626ab3fe30b4 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -270,7 +270,7 @@ inline SwAttrHandler::SwAttrStack::SwAttrStack()
     m_pArray = m_pInitialArray;
 }
 
-void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& rAttr, const sal_uInt16 nPos )
+void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& rAttr, const sal_uInt32 nPos )
 {
     // do we still have enough space?
     if (m_nCount >= m_nSize)
@@ -311,7 +311,7 @@ void SwAttrHandler::SwAttrStack::Insert( const SwTextAttr& rAttr, const sal_uInt
 
 void SwAttrHandler::SwAttrStack::Remove( const SwTextAttr& rAttr )
 {
-    sal_uInt16 nPos = Pos( rAttr );
+    sal_uInt32 nPos = Pos( rAttr );
     if (nPos < m_nCount)
     {
         memmove( m_pArray + nPos, m_pArray + nPos + 1,
@@ -326,20 +326,20 @@ const SwTextAttr* SwAttrHandler::SwAttrStack::Top() const
     return m_nCount ? m_pArray[ m_nCount - 1 ] : nullptr;
 }
 
-sal_uInt16 SwAttrHandler::SwAttrStack::Pos( const SwTextAttr& rAttr ) const
+sal_uInt32 SwAttrHandler::SwAttrStack::Pos( const SwTextAttr& rAttr ) const
 {
     if ( ! m_nCount )
         // empty stack
-        return USHRT_MAX;
+        return std::numeric_limits<sal_uInt32>::max();
 
-    for (sal_uInt16 nIdx = m_nCount; nIdx > 0;)
+    for (sal_uInt32 nIdx = m_nCount; nIdx > 0;)
     {
         if (&rAttr == m_pArray[ --nIdx ])
             return nIdx;
     }
 
     // element not found
-    return USHRT_MAX;
+    return std::numeric_limits<sal_uInt32>::max();
 }
 
 SwAttrHandler::SwAttrHandler()
@@ -487,7 +487,7 @@ bool SwAttrHandler::Push( const SwTextAttr& rAttr, const SfxPoolItem& rItem )
         return true;
     }
 
-    const sal_uInt16 nPos = m_aAttrStack[ nStack ].Count();
+    const sal_uInt32 nPos = m_aAttrStack[ nStack ].Count();
     OSL_ENSURE( nPos, "empty stack?" );
     m_aAttrStack[ nStack ].Insert( rAttr, nPos - 1 );
     return false;
commit 505f0c6c5a650c403f1a6d6090cebc579affb5b7
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Thu Jun 6 13:03:19 2019 +0300
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jun 10 09:56:48 2019 +0200

    Revert "tdf#108687 vcl: always enable tabstop on radio buttons"
    
    This reverts LO 6.2 commit f2cd1c3c7cce2699d1341f726fc90cf30b52612c
    because it caused regression tdf#125609. There are places
    where radio-groups are not properly defined, and things are
    a big mess.  So reverting to previous behaviour for 6.2 stable.
    
    This can be a fairly serious regression, because the value
    of the radio buttons can change just by tabbing around.
    
    Leaving the commit in place for master/6.3, so that a proper
    solution to all problems can be developed and tested.
    
    Change-Id: I3c71e47934c9d979d1cb22e56535f7ea3b33130c
    Reviewed-on: https://gerrit.libreoffice.org/73618
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 5bad4b5e2e15..8f7afce4aecb 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -288,7 +288,7 @@ private:
     bool            mbStateChanged;
     Link<RadioButton&,void> maToggleHdl;
     SAL_DLLPRIVATE void     ImplInitRadioButtonData();
-    static SAL_DLLPRIVATE WinBits  ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
+    SAL_DLLPRIVATE WinBits  ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
     SAL_DLLPRIVATE void     ImplInitSettings( bool bBackground );
     SAL_DLLPRIVATE void     ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext);
     SAL_DLLPRIVATE void     ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 891dc7001ad4..cd59ce4ba5d5 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1859,7 +1859,12 @@ WinBits RadioButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nSty
          (!pPrevWindow || (pPrevWindow->GetType() != WindowType::RADIOBUTTON)) )
         nStyle |= WB_GROUP;
     if ( !(nStyle & WB_NOTABSTOP) )
-        nStyle |= WB_TABSTOP;
+    {
+        if ( IsChecked() )
+            nStyle |= WB_TABSTOP;
+        else
+            nStyle &= ~WB_TABSTOP;
+    }
     return nStyle;
 }
 
commit d3655c22aa393dd70459f42bee547c39306e4bf0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jun 8 17:50:37 2019 +0100
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sun Jun 9 15:47:28 2019 +0200

    Resolves: tdf#120343 show pdf in async pdf export dialog callback
    
    not after dialog async exec begins, but defer to during that response
    callback
    
    Change-Id: I316022c01a87cf251d57b1007ae93fefddada776
    Reviewed-on: https://gerrit.libreoffice.org/73717
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index fa2a1149e7ad..15928451f2b1 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1284,6 +1284,21 @@ uno::Reference< css::frame::XModuleManager2 > const & SfxStoringHelper::GetModul
     return m_xModuleManager;
 }
 
+namespace
+{
+    void LaunchPDFViewer(const INetURLObject& rURL)
+    {
+        // Launch PDF viewer
+        FilterConfigItem aItem( "Office.Common/Filter/PDF/Export/" );
+        bool aViewPDF = aItem.ReadBool( "ViewPDFAfterExport", false );
+
+        if ( aViewPDF )
+        {
+            uno::Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create(::comphelper::getProcessComponentContext()));
+            xSystemShellExecute->execute(rURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), "", SystemShellExecuteFlags::URIS_ONLY);
+        }
+    }
+}
 
 bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xModel,
                                             const OUString& aSlotName,
@@ -1634,6 +1649,11 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
             {
                 SfxStoringHelper::SetDocInfoState(aModel.GetModel(), xOldDocProps);
             }
+
+            // Launch PDF viewer
+            if (nStoreMode & PDFEXPORT_REQUESTED)
+                LaunchPDFViewer(aURL);
+
         };
 
         // use dispatch API to show document info dialog
@@ -1655,19 +1675,10 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
             aModelData.GetStorable()->storeToURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aArgsSequence );
         else
             aModelData.GetStorable()->storeAsURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aArgsSequence );
-    }
-
-    // Launch PDF viewer
-    if ( nStoreMode & PDFEXPORT_REQUESTED )
-    {
-        FilterConfigItem aItem( "Office.Common/Filter/PDF/Export/" );
-        bool aViewPDF = aItem.ReadBool( "ViewPDFAfterExport", false );
 
-        if ( aViewPDF )
-        {
-            uno::Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) );
-            xSystemShellExecute->execute( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "", SystemShellExecuteFlags::URIS_ONLY );
-        }
+        // Launch PDF viewer
+        if (nStoreMode & PDFEXPORT_REQUESTED)
+            LaunchPDFViewer(aURL);
     }
 
     return bDialogUsed;
commit ee46d8e8c7375044e792ce330c80bf313e59b5e7
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Sun Jun 2 13:58:01 2019 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jun 8 22:18:56 2019 +0200

    tdf#119109 sw: tweak assertion in PrepareMake()
    
    Empty section frames cause trouble for the assert added in
    e14056e6e88d9b8d988b7b88b2776a8fc952031b:
    
    * existing ones may be skipped by MoveBwd(), so a SwTextFrame moves to
      the previous page but the SwSectionFrame that was its mpPrev remains
      on this page; e.g. ooo110854-1.rtf
    
    * a SwSectionFrame moves backward, then some SwTextFrame in it splits
      and the follow tries to move forward, resulting in *new*
      SwSectionFrames on this page that are empty (because the follow is
      eventually joined again); e.g. abi3213-1.rtf
    
    So if there's a section frame, assume it's SNAFU and don't assert.
    
    Change-Id: Ibdca2aa39fae123583e5edf5173f80e8b70ef335
    Reviewed-on: https://gerrit.libreoffice.org/73333
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 1416c5426a757d32f223cab46bf9038bd7f21d48)
    Reviewed-on: https://gerrit.libreoffice.org/73616
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index b7b083ee88d4..871f77a2f96e 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -318,6 +318,8 @@ void SwFrame::PrepareMake(vcl::RenderContext* pRenderContext)
                     if (isLast && pFrame->GetUpper() != GetUpper())
                     {
                         assert(GetUpper()->Lower() == this
+                            // empty section frames are created all the time...
+                            || GetUpper()->Lower()->IsSctFrame()
                             // tab frame/section frame may split multiple times
                             || (   SwFlowFrame::CastFlowFrame(pFrame)
                                 && SwFlowFrame::CastFlowFrame(GetUpper()->Lower())
@@ -440,6 +442,8 @@ void SwFrame::PrepareCursor()
                 if (isLast && pFrame->GetUpper() != GetUpper())
                 {
                     assert(GetUpper()->Lower() == this
+                        // empty section frames are created all the time...
+                        || GetUpper()->Lower()->IsSctFrame()
                         // tab frame/section frame may split multiple times
                         || (   SwFlowFrame::CastFlowFrame(pFrame)
                             && SwFlowFrame::CastFlowFrame(GetUpper()->Lower())
commit fd4324c64a6919ef46328608b447decc5c5f2d49
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Jun 3 16:36:23 2019 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jun 8 18:56:47 2019 +0200

    tdf#125062: distort hairline borders only if selection is used
    
    Regression from 046df0a876b3d948bb1e14443c00c180bc8cccaa
    
    Use the fix for tdf#105998 only when 'selection' option is checked
    in the save dialog
    
    Change-Id: I8c4127c780736408e905ead48e0d3ee6ae149197
    Reviewed-on: https://gerrit.libreoffice.org/73391
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
    Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
    (cherry picked from commit 6c31c2b01dd32cc7ba1230f2c4a98b8f7def219b)
    Reviewed-on: https://gerrit.libreoffice.org/73559
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 80ff5b14c23b..1e111f7d2ab6 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -178,7 +178,7 @@ namespace {
 
     /** creates a bitmap that is optionally transparent from a metafile
     */
-    BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf, const Size* pSize )
+    BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf,bool bIsSelection, const Size* pSize )
     {
         // use new primitive conversion tooling
         basegfx::B2DRange aRange(basegfx::B2DPoint(0.0, 0.0));
@@ -211,35 +211,39 @@ namespace {
 
         if(!aRect.IsEmpty())
         {
-            // tdf#105998 Correct the Metafile using information from it's real sizes measured
-            // using rMtf.GetBoundRect above and a copy
-            const Size aOnePixelInMtf(
-                Application::GetDefaultDevice()->PixelToLogic(
-                    Size(1, 1),
-                    rMtf.GetPrefMapMode()));
             GDIMetaFile aMtf(rMtf);
-            const Size aHalfPixelInMtf(
-                (aOnePixelInMtf.getWidth() + 1) / 2,
-                (aOnePixelInMtf.getHeight() + 1) / 2);
-            const bool bHairlineBR(
-                !aHairlineRect.IsEmpty() && (aRect.Right() == aHairlineRect.Right() || aRect.Bottom() == aHairlineRect.Bottom()));
-
-            // Move the content to (0,0), usually TopLeft ist slightly
-            // negative. For better visualization, add a half pixel, too
-            aMtf.Move(
-                aHalfPixelInMtf.getWidth() - aRect.Left(),
-                aHalfPixelInMtf.getHeight() - aRect.Top());
-
-            // Do not Scale, but set the PrefSize. Some levels deeper the
-            // MetafilePrimitive will add a mapping to the decomposition
-            // (and possibly a clipping) to map the graphic content to
-            // a unit coordinate system.
-            // Size is the measured size plus one pixel if needed (bHairlineBR)
-            // and the moved half pixwel from above
-            aMtf.SetPrefSize(
-                Size(
-                    aRect.getWidth() + (bHairlineBR ? aOnePixelInMtf.getWidth() : 0) + aHalfPixelInMtf.getWidth(),
-                    aRect.getHeight() + (bHairlineBR ? aOnePixelInMtf.getHeight() : 0) + aHalfPixelInMtf.getHeight()));
+
+            if (bIsSelection)
+            {
+                // tdf#105998 Correct the Metafile using information from it's real sizes measured
+                // using rMtf.GetBoundRect above and a copy
+                const Size aOnePixelInMtf(
+                    Application::GetDefaultDevice()->PixelToLogic(
+                        Size(1, 1),
+                        rMtf.GetPrefMapMode()));
+                const Size aHalfPixelInMtf(
+                    (aOnePixelInMtf.getWidth() + 1) / 2,
+                    (aOnePixelInMtf.getHeight() + 1) / 2);
+                const bool bHairlineBR(
+                    !aHairlineRect.IsEmpty() && (aRect.Right() == aHairlineRect.Right() || aRect.Bottom() == aHairlineRect.Bottom()));
+
+                // Move the content to (0,0), usually TopLeft ist slightly
+                // negative. For better visualization, add a half pixel, too
+                aMtf.Move(
+                    aHalfPixelInMtf.getWidth() - aRect.Left(),
+                    aHalfPixelInMtf.getHeight() - aRect.Top());
+
+                // Do not Scale, but set the PrefSize. Some levels deeper the
+                // MetafilePrimitive will add a mapping to the decomposition
+                // (and possibly a clipping) to map the graphic content to
+                // a unit coordinate system.
+                // Size is the measured size plus one pixel if needed (bHairlineBR)
+                // and the moved half pixwel from above
+                aMtf.SetPrefSize(
+                    Size(
+                        aRect.getWidth() + (bHairlineBR ? aOnePixelInMtf.getWidth() : 0) + aHalfPixelInMtf.getWidth(),
+                        aRect.getHeight() + (bHairlineBR ? aOnePixelInMtf.getHeight() : 0) + aHalfPixelInMtf.getHeight()));
+            }
 
             return convertMetafileToBitmapEx(aMtf, aRange, nMaximumQuadraticPixels);
         }
@@ -778,7 +782,7 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr
                 if( rSettings.mbTranslucent )
                 {
                     Size aOutSize;
-                    aGraphic = GetBitmapFromMetaFile( aGraphic.GetGDIMetaFile(), CalcSize( rSettings.mnWidth, rSettings.mnHeight, aNewSize, aOutSize ) );
+                    aGraphic = GetBitmapFromMetaFile( aGraphic.GetGDIMetaFile(), false, CalcSize( rSettings.mnWidth, rSettings.mnHeight, aNewSize, aOutSize ) );
                 }
             }
         }
@@ -968,7 +972,7 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr
             if( !bVectorType )
             {
                 Size aOutSize;
-                aGraphic = GetBitmapFromMetaFile( aMtf, CalcSize( rSettings.mnWidth, rSettings.mnHeight, aBoundSize, aOutSize ) );
+                aGraphic = GetBitmapFromMetaFile( aMtf, true, CalcSize( rSettings.mnWidth, rSettings.mnHeight, aBoundSize, aOutSize ) );
             }
             else
             {
commit 5d47b7b3f6a134037f1f3d8c018505244d7be484
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Thu Jun 6 14:25:32 2019 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jun 7 20:48:32 2019 +0200

    sanitize LibreLogo calls
    
    Change-Id: Ie4d9858e5b4b3e55ab08416fb9338d2df34ee5e1
    Reviewed-on: https://gerrit.libreoffice.org/73627
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit 1b63fa32bbd4a5b89d2ee3a53b28de4250c8dad3)
    Reviewed-on: https://gerrit.libreoffice.org/73655
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index e58537b2338a..2fa16ed81822 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -145,6 +145,7 @@ __LineStyle_DOTTED__ = 2
 class __Doc__:
     def __init__(self, doc):
         self.doc = doc
+        self.secure = False
         try:
             self.drawpage = doc.DrawPage # Writer
         except:
@@ -468,10 +469,58 @@ class LogoProgram(threading.Thread):
         self.code = code
         threading.Thread.__init__(self)
 
+    def secure(self):
+        # 0 = secure
+        if _.secure:
+            return 0
+
+        # 1 = forms, fields or embedded objects are forbidden
+        if _.doc.DrawPage.Forms.getCount() > 0 or _.doc.getTextFields().createEnumeration().hasMoreElements() or _.doc.getEmbeddedObjects().getCount() > 0:
+            return 1
+
+        # 2 = hyperlinks with script events
+        nodes = _.doc.Text.createEnumeration()
+        while nodes.hasMoreElements():
+            node = nodes.nextElement()
+            if node.supportsService("com.sun.star.text.Paragraph"):
+                portions = node.createEnumeration()
+                while portions.hasMoreElements():
+                    portion = portions.nextElement()
+                    if portion.PropertySetInfo.hasPropertyByName("HyperLinkEvents"):
+                        events = portion.getPropertyValue("HyperLinkEvents")
+                        for event in events.getElementNames():
+                            attributes = events.getByName(event)
+                            for attribute in attributes:
+                                if attribute.Name == "EventType" and attribute.Value == "Script":
+                                    return 2
+
+        # 2 = images with script events
+        images = _.doc.DrawPage.createEnumeration()
+        while images.hasMoreElements():
+            image = images.nextElement()
+            try:
+                events = image.Events
+                for event in events.getElementNames():
+                    attributes = events.getByName(event)
+                    for attribute in attributes:
+                        if attribute.Name == "EventType" and attribute.Value == "Script":
+                            return 2
+            except:
+                pass
+
+        _.secure = True
+        return 0
+
     def run(self):
         global __thread__
         try:
-            exec(self.code)
+            # check document security
+            secid = self.secure()
+            if secid > 0:
+                parent = _.doc.CurrentController.Frame.ContainerWindow
+                MessageBox(parent, "Document objects with%s script events" % [" possible", ""][secid-1], "LibreLogo program can't start", "errorbox")
+            else:
+                exec(self.code)
             if _.origcursor[0] and _.origcursor[1]:
                 __dispatcher__(".uno:Escape")
                 try:
commit 019c3f7b55ef40e5ad704e49f7538c5efe469caf
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sun May 5 23:22:09 2019 +0000
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Fri Jun 7 16:27:54 2019 +0200

    Qt5 make Qt5Widdget's frame a private reference
    
    Kind of a regression from commit 4d382636b0b1 ("qt5: Add basic
    a11y support"), which made it public for a single call.
    
    Change-Id: I631a861a98388223770cfca2704c3ddee6a0a8a0
    Reviewed-on: https://gerrit.libreoffice.org/71836
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
    (cherry picked from commit 8c71d28069acffa2d4590a4acf95a98d1415b563)
    Reviewed-on: https://gerrit.libreoffice.org/73650
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/vcl/inc/qt5/Qt5Widget.hxx b/vcl/inc/qt5/Qt5Widget.hxx
index d96afa64aeb0..30998a8a1c6d 100644
--- a/vcl/inc/qt5/Qt5Widget.hxx
+++ b/vcl/inc/qt5/Qt5Widget.hxx
@@ -42,6 +42,8 @@ class Qt5Widget : public QWidget
 {
     Q_OBJECT
 
+    Qt5Frame& m_rFrame;
+
     bool handleKeyEvent(QKeyEvent*, bool);
     void handleMouseButtonEvent(QMouseEvent*, bool);
 
@@ -71,7 +73,8 @@ public slots:
 
 public:
     Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f = Qt::WindowFlags());
-    Qt5Frame* m_pFrame;
+
+    Qt5Frame& getFrame() const { return m_rFrame; }
     void startDrag(sal_Int8 nSourceActions);
 };
 
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index e2cc0a31765c..9757eab27837 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -718,7 +718,7 @@ QAccessibleInterface* Qt5AccessibleWidget::customFactory(const QString& classnam
     if (classname == QLatin1String("Qt5Widget") && object && object->isWidgetType())
     {
         Qt5Widget* pWidget = static_cast<Qt5Widget*>(object);
-        vcl::Window* pWindow = pWidget->m_pFrame->GetWindow();
+        vcl::Window* pWindow = pWidget->getFrame().GetWindow();
 
         if (pWindow)
             return new Qt5AccessibleWidget(pWindow->GetAccessible());
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 62d02e58565d..2137109beac7 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -47,12 +47,12 @@
 void Qt5Widget::paintEvent(QPaintEvent* pEvent)
 {
     QPainter p(this);
-    if (!m_pFrame->m_bNullRegion)
-        p.setClipRegion(m_pFrame->m_aRegion);
+    if (!m_rFrame.m_bNullRegion)
+        p.setClipRegion(m_rFrame.m_aRegion);
 
-    if (m_pFrame->m_bUseCairo)
+    if (m_rFrame.m_bUseCairo)
     {
-        cairo_surface_t* pSurface = m_pFrame->m_pSurface.get();
+        cairo_surface_t* pSurface = m_rFrame.m_pSurface.get();
         cairo_surface_flush(pSurface);
 
         QImage aImage(cairo_image_surface_get_data(pSurface), size().width(), size().height(),
@@ -60,55 +60,55 @@ void Qt5Widget::paintEvent(QPaintEvent* pEvent)
         p.drawImage(pEvent->rect().topLeft(), aImage, pEvent->rect());
     }
     else
-        p.drawImage(pEvent->rect().topLeft(), *m_pFrame->m_pQImage, pEvent->rect());
+        p.drawImage(pEvent->rect().topLeft(), *m_rFrame.m_pQImage, pEvent->rect());
 }
 
 void Qt5Widget::resizeEvent(QResizeEvent* pEvent)
 {
-    if (m_pFrame->m_bUseCairo)
+    if (m_rFrame.m_bUseCairo)
     {
         int width = size().width();
         int height = size().height();
 
-        if (m_pFrame->m_pSvpGraphics)
+        if (m_rFrame.m_pSvpGraphics)
         {
             cairo_surface_t* pSurface
                 = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
             cairo_surface_set_user_data(pSurface, SvpSalGraphics::getDamageKey(),
-                                        &m_pFrame->m_aDamageHandler, nullptr);
-            m_pFrame->m_pSvpGraphics->setSurface(pSurface, basegfx::B2IVector(width, height));
-            UniqueCairoSurface old_surface(m_pFrame->m_pSurface.release());
-            m_pFrame->m_pSurface.reset(pSurface);
+                                        &m_rFrame.m_aDamageHandler, nullptr);
+            m_rFrame.m_pSvpGraphics->setSurface(pSurface, basegfx::B2IVector(width, height));
+            UniqueCairoSurface old_surface(m_rFrame.m_pSurface.release());
+            m_rFrame.m_pSurface.reset(pSurface);
 
             int min_width = qMin(pEvent->oldSize().width(), pEvent->size().width());
             int min_height = qMin(pEvent->oldSize().height(), pEvent->size().height());
 
             SalTwoRect rect(0, 0, min_width, min_height, 0, 0, min_width, min_height);
 
-            m_pFrame->m_pSvpGraphics->copySource(rect, old_surface.get());
+            m_rFrame.m_pSvpGraphics->copySource(rect, old_surface.get());
         }
     }
     else
     {
         QImage* pImage = nullptr;
 
-        if (m_pFrame->m_pQImage)
+        if (m_rFrame.m_pQImage)
             pImage = new QImage(
-                m_pFrame->m_pQImage->copy(0, 0, pEvent->size().width(), pEvent->size().height()));
+                m_rFrame.m_pQImage->copy(0, 0, pEvent->size().width(), pEvent->size().height()));
         else
         {
             pImage = new QImage(size(), Qt5_DefaultFormat32);
             pImage->fill(Qt::transparent);
         }
 
-        m_pFrame->m_pQt5Graphics->ChangeQImage(pImage);
-        m_pFrame->m_pQImage.reset(pImage);
+        m_rFrame.m_pQt5Graphics->ChangeQImage(pImage);
+        m_rFrame.m_pQImage.reset(pImage);
     }
 
-    m_pFrame->maGeometry.nWidth = size().width();
-    m_pFrame->maGeometry.nHeight = size().height();
+    m_rFrame.maGeometry.nWidth = size().width();
+    m_rFrame.maGeometry.nHeight = size().height();
 
-    m_pFrame->CallCallback(SalEvent::Resize, nullptr);
+    m_rFrame.CallCallback(SalEvent::Resize, nullptr);
 }
 
 void Qt5Widget::handleMouseButtonEvent(QMouseEvent* pEvent, bool bReleased)
@@ -139,7 +139,7 @@ void Qt5Widget::handleMouseButtonEvent(QMouseEvent* pEvent, bool bReleased)
         nEventType = SalEvent::MouseButtonUp;
     else
         nEventType = SalEvent::MouseButtonDown;
-    m_pFrame->CallCallback(nEventType, &aEvent);
+    m_rFrame.CallCallback(nEventType, &aEvent);
 }
 
 void Qt5Widget::mousePressEvent(QMouseEvent* pEvent) { handleMouseButtonEvent(pEvent, false); }
@@ -157,7 +157,7 @@ void Qt5Widget::mouseMoveEvent(QMouseEvent* pEvent)
     aEvent.mnCode = GetKeyModCode(pEvent->modifiers()) | GetMouseModCode(pEvent->buttons());
     aEvent.mnButton = 0;
 
-    m_pFrame->CallCallback(SalEvent::MouseMove, &aEvent);
+    m_rFrame.CallCallback(SalEvent::MouseMove, &aEvent);
     pEvent->accept();
 }
 
@@ -185,7 +185,7 @@ void Qt5Widget::wheelEvent(QWheelEvent* pEvent)
     aEvent.mnNotchDelta = nDelta > 0 ? 1 : -1;
     aEvent.mnScrollLines = 3;
 
-    m_pFrame->CallCallback(SalEvent::WheelMouse, &aEvent);
+    m_rFrame.CallCallback(SalEvent::WheelMouse, &aEvent);
     pEvent->accept();
 }
 
@@ -212,7 +212,7 @@ void Qt5Widget::dragMoveEvent(QDragMoveEvent* event)
 {
     QPoint point = event->pos();
 
-    m_pFrame->draggingStarted(point.x(), point.y(), event->possibleActions(), event->mimeData());
+    m_rFrame.draggingStarted(point.x(), point.y(), event->possibleActions(), event->mimeData());
     QWidget::dragMoveEvent(event);
 }
 
@@ -220,22 +220,22 @@ void Qt5Widget::dropEvent(QDropEvent* event)
 {
     QPoint point = event->pos();
 
-    m_pFrame->dropping(point.x(), point.y(), event->mimeData());
+    m_rFrame.dropping(point.x(), point.y(), event->mimeData());
     QWidget::dropEvent(event);
 }
 
-void Qt5Widget::moveEvent(QMoveEvent*) { m_pFrame->CallCallback(SalEvent::Move, nullptr); }
+void Qt5Widget::moveEvent(QMoveEvent*) { m_rFrame.CallCallback(SalEvent::Move, nullptr); }
 
 void Qt5Widget::showEvent(QShowEvent*)
 {
-    QSize aSize(m_pFrame->GetQWidget()->size());
+    QSize aSize(m_rFrame.GetQWidget()->size());
     SalPaintEvent aPaintEvt(0, 0, aSize.width(), aSize.height(), true);
-    m_pFrame->CallCallback(SalEvent::Paint, &aPaintEvt);
+    m_rFrame.CallCallback(SalEvent::Paint, &aPaintEvt);
 }
 
 void Qt5Widget::closeEvent(QCloseEvent* /*pEvent*/)
 {
-    m_pFrame->CallCallback(SalEvent::Close, nullptr);
+    m_rFrame.CallCallback(SalEvent::Close, nullptr);
 }
 
 static sal_uInt16 GetKeyCode(int keyval, Qt::KeyboardModifiers modifiers)
@@ -395,9 +395,9 @@ bool Qt5Widget::handleKeyEvent(QKeyEvent* pEvent, bool bDown)
 
     bool bStopProcessingKey;
     if (bDown)
-        bStopProcessingKey = m_pFrame->CallCallback(SalEvent::KeyInput, &aEvent);
+        bStopProcessingKey = m_rFrame.CallCallback(SalEvent::KeyInput, &aEvent);
     else
-        bStopProcessingKey = m_pFrame->CallCallback(SalEvent::KeyUp, &aEvent);
+        bStopProcessingKey = m_rFrame.CallCallback(SalEvent::KeyUp, &aEvent);
     return bStopProcessingKey;
 }
 
@@ -427,12 +427,9 @@ void Qt5Widget::keyReleaseEvent(QKeyEvent* pEvent)
         pEvent->accept();
 }
 
-void Qt5Widget::focusInEvent(QFocusEvent*) { m_pFrame->CallCallback(SalEvent::GetFocus, nullptr); }
+void Qt5Widget::focusInEvent(QFocusEvent*) { m_rFrame.CallCallback(SalEvent::GetFocus, nullptr); }
 
-void Qt5Widget::focusOutEvent(QFocusEvent*)
-{
-    m_pFrame->CallCallback(SalEvent::LoseFocus, nullptr);
-}
+void Qt5Widget::focusOutEvent(QFocusEvent*) { m_rFrame.CallCallback(SalEvent::LoseFocus, nullptr); }
 
 void Qt5Widget::showTooltip(const OUString& rTooltip)
 {
@@ -442,7 +439,7 @@ void Qt5Widget::showTooltip(const OUString& rTooltip)
 
 Qt5Widget::Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f)
     : QWidget(Q_NULLPTR, f)
-    , m_pFrame(&rFrame)
+    , m_rFrame(rFrame)
 {
     create();
     setMouseTracking(true);
@@ -476,13 +473,13 @@ void Qt5Widget::inputMethodEvent(QInputMethodEvent* pEvent)
 
     if (!pEvent->commitString().isEmpty())
     {
-        vcl::DeletionListener aDel(m_pFrame);
+        vcl::DeletionListener aDel(&m_rFrame);
         aInputEvent.maText = toOUString(pEvent->commitString());
         aInputEvent.mnCursorPos = aInputEvent.maText.getLength();
-        m_pFrame->CallCallback(SalEvent::ExtTextInput, &aInputEvent);
+        m_rFrame.CallCallback(SalEvent::ExtTextInput, &aInputEvent);
         pEvent->accept();
         if (!aDel.isDeleted())
-            m_pFrame->CallCallback(SalEvent::EndExtTextInput, nullptr);
+            m_rFrame.CallCallback(SalEvent::EndExtTextInput, nullptr);
     }
     else
     {
@@ -531,7 +528,7 @@ void Qt5Widget::inputMethodEvent(QInputMethodEvent* pEvent)
             }
         }
 
-        m_pFrame->CallCallback(SalEvent::ExtTextInput, &aInputEvent);
+        m_rFrame.CallCallback(SalEvent::ExtTextInput, &aInputEvent);
         pEvent->accept();
     }
 }
@@ -543,7 +540,7 @@ QVariant Qt5Widget::inputMethodQuery(Qt::InputMethodQuery property) const
         case Qt::ImCursorRectangle:
         {
             SalExtTextInputPosEvent aPosEvent;
-            m_pFrame->CallCallback(SalEvent::ExtTextInputPos, &aPosEvent);
+            m_rFrame.CallCallback(SalEvent::ExtTextInputPos, &aPosEvent);
             return QVariant(
                 QRect(aPosEvent.mnX, aPosEvent.mnY, aPosEvent.mnWidth, aPosEvent.mnHeight));
         }
commit a62583681703f28bb421da26e343fd0be9f8fe50
Author:     Patrick Jaap <patrick.jaap at tu-dresden.de>
AuthorDate: Mon Jun 3 17:27:03 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jun 7 11:48:35 2019 +0200

    tdf#125324 table export: do not ignore default values
    
    It seems like Writer default values for table positioning
    differ from OOXML spec. if nothing is given.
    So write them anyway during export.
    
    Change-Id: If5bf77de71b457a826be8f1559212e7d06c5237c
    Reviewed-on: https://gerrit.libreoffice.org/73402
    Tested-by: Jenkins
    Reviewed-by: Patrick Jaap <patrick.jaap at tu-dresden.de>
    (cherry picked from commit dac2ff37431151d13589801fa4767633b4df72b9)
    Reviewed-on: https://gerrit.libreoffice.org/73609
    (cherry picked from commit 48653935ec71ab703c3a4c387dc192bae4643356)
    Reviewed-on: https://gerrit.libreoffice.org/73641
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf125324.docx b/sw/qa/extras/ooxmlexport/data/tdf125324.docx
new file mode 100644
index 000000000000..9382e295f00c
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf125324.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index ca211e0e7eb9..d9f1978705cf 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -112,6 +112,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf123460, "tdf123460.docx")
     CPPUNIT_ASSERT_EQUAL(true, bCaught);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf125324, "tdf125324.docx")
+{
+    discardDumpedLayout();
+    xmlDocPtr pXmlDoc = parseLayoutDump();
+    assertXPath(pXmlDoc, "/root/page/body/txt[2]/anchored/fly/tab/infos/bounds", "top", "4193");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 39f1318f1bce..0438a1e54caf 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3859,15 +3859,13 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
                 OString sTblpYSpec = convertToOOXMLVertOrient( pFrame->GetFrameFormat().GetVertOrient().GetVertOrient() );
 
                 sOrientation = convertToOOXMLVertOrientRel( pFrame->GetFrameFormat().GetVertOrient().GetRelationOrient() );
-                if(sOrientation != "page") // do not write default
-                    attrListTablePos->add( FSNS( XML_w, XML_vertAnchor ), sOrientation.getStr() );
+                attrListTablePos->add( FSNS( XML_w, XML_vertAnchor ), sOrientation.getStr() );
 
                 if( !sTblpYSpec.isEmpty() )
                     attrListTablePos->add( FSNS( XML_w, XML_tblpYSpec ), sTblpYSpec.getStr() );
 
                 sOrientation = convertToOOXMLHoriOrientRel( pFrame->GetFrameFormat().GetHoriOrient().GetRelationOrient() );
-                if(sOrientation != "page") // do not wirte default
-                    attrListTablePos->add( FSNS( XML_w, XML_horzAnchor ), sOrientation.getStr() );
+                attrListTablePos->add( FSNS( XML_w, XML_horzAnchor ), sOrientation.getStr() );
 
                 if( !sTblpXSpec.isEmpty() )
                     attrListTablePos->add( FSNS( XML_w, XML_tblpXSpec ), sTblpXSpec.getStr() );
commit d93ebeb0f785489050dcbe55c5111d639b4b4c1e
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Wed May 29 21:08:38 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jun 7 11:47:42 2019 +0200

    Resolves: tdf#125279 do not double _x005F_ escapement
    
    Reading OOXML _x005F_ escaped content may not get unescaped, so
    when writing back to OOXML do not attempt to escape it again, i.e.
    write _x005F_xHHHH_ as is and not as _x005F_x005F_xHHHH_.
    
    This is more a workaround, the proper fix would be to unescape
    _x005F_ content upon read. But then the entire "invalid XML
    character" escapement and handling control characters rat tail
    would come into play.
    
    Change-Id: I3d31dc84a362753c23a8c89f7a5d7bfd06e4367b
    Reviewed-on: https://gerrit.libreoffice.org/73187
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit f677885fec59f252f36673ee4d8c0b4863625a4d)
    Reviewed-on: https://gerrit.libreoffice.org/73219
    Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index d299ca73ce08..364dec9db2e1 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -196,6 +196,7 @@ namespace sax_fastparser {
                 break;
                 default:
                             {
+                                char c1, c2, c3, c4;
                                 // Escape characters not valid in XML 1.0 as
                                 // _xHHHH_. A literal "_xHHHH_" has to be
                                 // escaped as _x005F_xHHHH_ (effectively
@@ -206,22 +207,44 @@ namespace sax_fastparser {
                                 if (c == '_' && i >= nNextXescape && i <= nLen - kXescapeLen &&
                                         pStr[i+6] == '_' &&
                                         ((pStr[i+1] | 0x20) == 'x') &&
-                                        isHexDigit( pStr[i+2] ) &&
-                                        isHexDigit( pStr[i+3] ) &&
-                                        isHexDigit( pStr[i+4] ) &&
-                                        isHexDigit( pStr[i+5] ))
+                                        isHexDigit( c1 = pStr[i+2] ) &&
+                                        isHexDigit( c2 = pStr[i+3] ) &&
+                                        isHexDigit( c3 = pStr[i+4] ) &&
+                                        isHexDigit( c4 = pStr[i+5] ))
                                 {
                                     // OOXML has the odd habit to write some
                                     // names using this that when re-saving
                                     // should *not* be escaped, specifically
                                     // _x0020_ for blanks in w:xpath values.
-                                    if (strncmp( pStr+i+2, "0020", 4) != 0)
+                                    if (!(c1 == '0' && c2 == '0' && c3 == '2' && c4 == '0'))
                                     {
-                                        writeBytes( "_x005F_", kXescapeLen);
-                                        // Remember this escapement so in
-                                        // _xHHHH_xHHHH_ only the first '_' is
-                                        // escaped.
-                                        nNextXescape = i + kXescapeLen;
+                                        // When encountering "_x005F_xHHHH_"
+                                        // assume that is an already escaped
+                                        // sequence that was not unescaped and
+                                        // shall be written as is, to not end
+                                        // up with "_x005F_x005F_xHHHH_" and
+                                        // repeated..
+                                        if (c1 == '0' && c2 == '0' && c3 == '5' && (c4 | 0x20) == 'f' &&
+                                                i + kXescapeLen <= nLen - 6 &&
+                                                pStr[i+kXescapeLen+5] == '_' &&
+                                                ((pStr[i+kXescapeLen+0] | 0x20) == 'x') &&
+                                                isHexDigit( pStr[i+kXescapeLen+1] ) &&
+                                                isHexDigit( pStr[i+kXescapeLen+2] ) &&
+                                                isHexDigit( pStr[i+kXescapeLen+3] ) &&
+                                                isHexDigit( pStr[i+kXescapeLen+4] ))
+                                        {
+                                            writeBytes( &c, 1 );
+                                            // Remember this fake escapement.
+                                            nNextXescape = i + kXescapeLen + 6;
+                                        }
+                                        else
+                                        {
+                                            writeBytes( "_x005F_", kXescapeLen);
+                                            // Remember this escapement so in
+                                            // _xHHHH_xHHHH_ only the first '_'
+                                            // is escaped.
+                                            nNextXescape = i + kXescapeLen;
+                                        }
                                         break;
                                     }
                                 }
commit 8eff9425897a42acb3f95750a4a2654e4f428444
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed May 29 15:41:15 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jun 7 11:46:51 2019 +0200

    tdf#124694 gtk3 GtkFixed takes the max size of all its children...
    
    as its preferred size, causing it to not clip its child, but grow instead to
    match
    
    Change-Id: I57f740177aae619d11966f5382a6cc5f7a964be3
    Reviewed-on: https://gerrit.libreoffice.org/73170
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 2127a52d2c1e..adcde282e3b1 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -913,11 +913,30 @@ void GtkSalFrame::resizeWindow( long nWidth, long nHeight )
         window_resize(nWidth, nHeight);
 }
 
+// tdf#124694 GtkFixed takes the max size of all its children as its
+// preferred size, causing it to not clip its child, but grow instead.
+
+static void
+ooo_fixed_get_preferred_height(GtkWidget*, gint *minimum, gint *natural)
+{
+    *minimum = 0;
+    *natural = 0;
+}
+
+static void
+ooo_fixed_get_preferred_width(GtkWidget*, gint *minimum, gint *natural)
+{
+    *minimum = 0;
+    *natural = 0;
+}
+
 static void
 ooo_fixed_class_init(GtkFixedClass *klass)
 {
     GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
     widget_class->get_accessible = ooo_fixed_get_accessible;
+    widget_class->get_preferred_height = ooo_fixed_get_preferred_height;
+    widget_class->get_preferred_width = ooo_fixed_get_preferred_width;
 }
 
 /*
commit d0c5664add278379e07cec673f28d6aec35b1f81
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun May 26 16:42:27 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jun 7 11:46:28 2019 +0200

    Resolves: tdf#125348 some an initial fixed width for the treeview
    
    the final width will be determined by the width of the entry boxes above it
    
    Change-Id: Ifcac2a2ef220cbacf5cd0ef6531e4a04e10a7326
    Reviewed-on: https://gerrit.libreoffice.org/72989
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/73020
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index ee0ab7f2e37a..6a3223aebc33 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -775,7 +775,9 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage(TabPageParent pParent,
 {
     sNew = m_xNewReplacePB->get_label();
     sModify = m_xReplacePB->get_label();
-    m_xReplaceTLB->set_size_request(-1, m_xReplaceTLB->get_height_rows(10));
+    // tdf#125348 set some small but fixed initial width size, final width will
+    // depend on the size of the entry boxes
+    m_xReplaceTLB->set_size_request(42, m_xReplaceTLB->get_height_rows(10));
 
     SfxModule *pMod = SfxApplication::GetModule(SfxToolsModule::Writer);
     bSWriter = pMod == SfxModule::GetActiveModule();
commit 3309893de4e99a7d89fb1e9b4616631b1f040df0
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jun 6 13:31:52 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jun 7 09:23:54 2019 +0200

    tdf#125556 URL fragment leaked from one object..
    
    to another when importing Powerpoint ppt file
    
    regression from
        commit 4245454d0c3d6df2d0e0a75aed6f22f0a26ce3e2
        Date:   Wed Feb 28 15:50:29 2018 +0200
        loplugin:useuniqueptr in SdrPowerPointImport
    
    Change-Id: I5f415dfa1f6125629b9f3be1d799cb596c64c605
    Reviewed-on: https://gerrit.libreoffice.org/73607
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 7fa7ad359a02..520618b15163 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -396,9 +396,9 @@ bool ImplSdPPTImport::Import()
 
                                     nPropCount /= 6;    // 6 properties per hyperlink
 
-                                    SdHyperlinkEntry aHyperlink;
                                     for ( i = 0; i < nPropCount; i++ )
                                     {
+                                        SdHyperlinkEntry aHyperlink;
                                         aHyperlink.nIndex = 0;
                                         aPropItem.ReadUInt32( nType );
                                         if ( nType != VT_I4 )
commit c132889c2430afd007c71afd42d71420df4caa5a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 29 15:23:28 2019 +0000
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Thu Jun 6 13:46:32 2019 +0200

    Resolves: rhbz#1712823 prefer help strings to a11y strings when available
    
    Reviewed-on: https://gerrit.libreoffice.org/69934
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit b70053ba681a9b62afd6fa700ad94256d98d8dc7)
    
    Change-Id: I50b36f697b8dd9ff8108392d48a7050702edbfbe
    Reviewed-on: https://gerrit.libreoffice.org/72880
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index a69e4df05806..5123db7c9f2e 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -6514,6 +6514,13 @@ public:
         return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
     }
 
+    virtual OUString get_accessible_description() const override
+    {
+        AtkObject* pAtkObject = default_drawing_area_get_accessible(m_pWidget);
+        const char* pStr = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr;
+        return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
+    }
+
     virtual ~GtkInstanceDrawingArea() override
     {
         g_object_steal_data(G_OBJECT(m_pDrawingArea), "g-lo-GtkInstanceDrawingArea");
@@ -7579,16 +7586,7 @@ namespace
         const ImplSVData* pSVData = ImplGetSVData();
         if (pSVData->maHelpData.mbBalloonHelp)
         {
-            /*This is how I would prefer things to be, only a few like this though*/
-            AtkObject* pAtkObject = gtk_widget_get_accessible(pWidget);
-            const char* pDesc = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr;
-            if (pDesc)
-            {
-                gtk_tooltip_set_text(tooltip, pDesc);
-                return true;
-            }
-
-            /*So fallback to existing mechanism which needs help installed*/
+            /*Current mechanism which needs help installed*/
             OString sHelpId = ::get_help_id(pWidget);
             Help* pHelp = !sHelpId.isEmpty() ? Application::GetHelp() : nullptr;
             if (pHelp)
@@ -7600,10 +7598,19 @@ namespace
                     return true;
                 }
             }
+
+            /*This is how I would prefer things to be, only a few like this though*/
+            AtkObject* pAtkObject = gtk_widget_get_accessible(pWidget);
+            const char* pDesc = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr;
+            if (pDesc && pDesc[0])
+            {
+                gtk_tooltip_set_text(tooltip, pDesc);
+                return true;
+            }
         }
 
         const char* pDesc = gtk_widget_get_tooltip_text(pWidget);
-        if (pDesc)
+        if (pDesc && pDesc[0])
         {
             gtk_tooltip_set_text(tooltip, pDesc);
             return true;
commit e70af1096275e7705fa71bb5ca0fc564746a98c7
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sat Jun 1 22:23:58 2019 +0000
Commit:     Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Wed Jun 5 22:22:35 2019 +0200

    Qt5 use precise timer to prevent unneeded restarts
    
    We just have one driving timer. Not much to sync with. Gets rid
    of these annoying scheduler restart messages. The idea of coarse,
    synced timer events sounds nice to have, but LO currently can't
    handle it in a sensible sense..
    
    Change-Id: I169c2bb582aca0e03b00e24dc364ac9b19162c3b
    Reviewed-on: https://gerrit.libreoffice.org/73392
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
    (cherry picked from commit 677db60166106e33bc2329f868f96cf2fb85f11b)
    Reviewed-on: https://gerrit.libreoffice.org/73411
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit f85d99ede4054876f608819e808c9b03c6a03481)
    Reviewed-on: https://gerrit.libreoffice.org/73464
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/vcl/qt5/Qt5Timer.cxx b/vcl/qt5/Qt5Timer.cxx
index 7fcb7e17dcda..348c9a825ae6 100644
--- a/vcl/qt5/Qt5Timer.cxx
+++ b/vcl/qt5/Qt5Timer.cxx
@@ -29,6 +29,7 @@
 Qt5Timer::Qt5Timer()
 {
     m_aTimer.setSingleShot(true);
+    m_aTimer.setTimerType(Qt::PreciseTimer);
     connect(&m_aTimer, SIGNAL(timeout()), this, SLOT(timeoutActivated()));
     connect(this, SIGNAL(startTimerSignal(int)), this, SLOT(startTimer(int)));
     connect(this, SIGNAL(stopTimerSignal()), this, SLOT(stopTimer()));


More information about the Libreoffice-commits mailing list